Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

130 lines
3.1 KiB

  1. /*****************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /*****************************************************************/
  5. /*
  6. * History:
  7. * KeithMo 22-Jul-1992 Created.
  8. *
  9. */
  10. #ifndef _LMOEDOM_HXX_
  11. #define _LMOEDOM_HXX_
  12. #include "lmoenum.hxx"
  13. #include "string.hxx"
  14. /*************************************************************************
  15. NAME: DOMAIN_ENUM
  16. SYNOPSIS: Base class for server enumerations.
  17. INTERFACE: DOMAIN_ENUM - Class constructor.
  18. ~DOMAIN_ENUM - Class destructor.
  19. CallAPI - Invoke the enumeration API.
  20. PARENT: LOC_LM_ENUM
  21. USES: NLS_STR
  22. HISTORY:
  23. KeithMo 22-Jul-1992 Created.
  24. **************************************************************************/
  25. DLL_CLASS DOMAIN_ENUM : public LOC_LM_ENUM
  26. {
  27. private:
  28. virtual APIERR CallAPI( BYTE ** ppbBuffer,
  29. UINT * pcEntriesRead );
  30. protected:
  31. DOMAIN_ENUM( const TCHAR * pszServer,
  32. UINT level );
  33. }; // class DOMAIN_ENUM
  34. /*************************************************************************
  35. NAME: DOMAIN0_ENUM
  36. SYNOPSIS: Info level 0 domain enumeration class.
  37. INTERFACE: DOMAIN0_ENUM - Class constructor.
  38. ~DOMAIN0_ENUM - Class destructor.
  39. PARENT: DOMAIN_ENUM
  40. HISTORY:
  41. KeithMo 22-Jul-1992 Created.
  42. **************************************************************************/
  43. DLL_CLASS DOMAIN0_ENUM : public DOMAIN_ENUM
  44. {
  45. private:
  46. static int __cdecl CompareDomains0( const void * p1,
  47. const void * p2 );
  48. public:
  49. DOMAIN0_ENUM( const TCHAR * pszServer = NULL );
  50. VOID Sort( VOID );
  51. }; // class DOMAIN0_ENUM
  52. /*************************************************************************
  53. NAME: DOMAIN0_ENUM_OBJ
  54. SYNOPSIS: This is basically the return type from the DOMAIN0_ENUM_ITER
  55. iterator.
  56. INTERFACE: DOMAIN0_ENUM_OBJ - Class constructor.
  57. ~DOMAIN0_ENUM_OBJ - Class destructor.
  58. QueryName - Returns the domain name.
  59. PARENT: ENUM_OBJ_BASE
  60. HISTORY:
  61. KeithMo 22-Jul-1992 Created.
  62. **************************************************************************/
  63. DLL_CLASS DOMAIN0_ENUM_OBJ : public ENUM_OBJ_BASE
  64. {
  65. public:
  66. //
  67. // Provide properly-casted buffer Query/Set methods.
  68. //
  69. const SERVER_INFO_100 * QueryBufferPtr( VOID ) const
  70. { return (const SERVER_INFO_100 *)ENUM_OBJ_BASE::QueryBufferPtr(); }
  71. VOID SetBufferPtr( const SERVER_INFO_100 * pBuffer )
  72. { ENUM_OBJ_BASE::SetBufferPtr( (const BYTE *)pBuffer ); }
  73. //
  74. // Accessors.
  75. //
  76. DECLARE_ENUM_ACCESSOR( QueryName, const TCHAR *, sv100_name );
  77. }; // class DOMAIN0_ENUM_OBJ
  78. DECLARE_LM_ENUM_ITER_OF( DOMAIN0, SERVER_INFO_100 );
  79. #endif // _LMOEDOM_HXX_