Leaked source code of windows server 2003
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.

247 lines
5.9 KiB

  1. /*****************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /*****************************************************************/
  5. /*
  6. * History:
  7. * RustanL 03-Jan-1991 Created
  8. * RustanL 10-Jan-1991 Added SHARE1 subclass and iterator
  9. * ChuckC 23-Mar-1991 code rev cleanup
  10. * KeithMo 28-Jul-1991 Added SHARE2 subclass and iterator
  11. * KeithMo 07-Oct-1991 Win32 Conversion.
  12. * Yi-HsinS 20-Nov-1992 Added _fSticky
  13. *
  14. */
  15. #ifndef _LMOESH_HXX_
  16. #define _LMOESH_HXX_
  17. #include "lmoenum.hxx"
  18. /**********************************************************\
  19. NAME: SHARE_ENUM
  20. WORKBOOK:
  21. SYNOPSIS: SHARE ENUM class
  22. INTERFACE:
  23. PARENT: LOC_LM_ENUM
  24. USES:
  25. CAVEATS:
  26. NOTES:
  27. HISTORY:
  28. RustanL 03-Jan-1991 Created
  29. RustanL 10-Jan-1991 Added SHARE1 subclass and iterator
  30. \**********************************************************/
  31. DLL_CLASS SHARE_ENUM : public LOC_LM_ENUM
  32. {
  33. private:
  34. BOOL _fSticky;
  35. virtual APIERR CallAPI( BYTE ** ppbBuffer,
  36. UINT * pcEntriesRead );
  37. protected:
  38. SHARE_ENUM( const TCHAR * pszServer, UINT uLevel, BOOL fSticky = FALSE );
  39. }; // class SHARE_ENUM
  40. /**********************************************************\
  41. NAME: SHARE1_ENUM
  42. WORKBOOK:
  43. SYNOPSIS: SHARE ENUM level 1 object
  44. INTERFACE:
  45. SHARE1_ENUM() - constructor
  46. ~SHARE1_ENUM() - constructor
  47. PARENT: SHARE_ENUM
  48. USES:
  49. CAVEATS:
  50. NOTES:
  51. HISTORY:
  52. RustanL 03-Jan-1991 Created
  53. RustanL 10-Jan-1991 Added SHARE1 subclass and iterator
  54. \**********************************************************/
  55. DLL_CLASS SHARE1_ENUM : public SHARE_ENUM
  56. {
  57. public:
  58. SHARE1_ENUM( const TCHAR * pszServer, BOOL fSticky = FALSE );
  59. }; // class SHARE1_ENUM
  60. /*************************************************************************
  61. NAME: SHARE1_ENUM_OBJ
  62. SYNOPSIS: This is basically the return type from the SHARE1_ENUM_ITER
  63. iterator.
  64. INTERFACE: SHARE1_ENUM_OBJ - Class constructor.
  65. ~SHARE1_ENUM_OBJ - Class destructor.
  66. QueryBufferPtr - Replaces ENUM_OBJ_BASE method.
  67. QueryName - Returns the sharepoint name.
  68. QueryResourceType - Returns the resource type.
  69. QueryComment - Returns the sharepoint comment.
  70. PARENT: ENUM_OBJ_BASE
  71. HISTORY:
  72. KeithMo 07-Oct-1991 Created.
  73. **************************************************************************/
  74. DLL_CLASS SHARE1_ENUM_OBJ : public ENUM_OBJ_BASE
  75. {
  76. public:
  77. //
  78. // Provide properly-casted buffer Query/Set methods.
  79. //
  80. const struct share_info_1 * QueryBufferPtr( VOID ) const
  81. { return (const struct share_info_1 *)ENUM_OBJ_BASE::QueryBufferPtr(); }
  82. VOID SetBufferPtr( const struct share_info_1 * pBuffer );
  83. //
  84. // Accessors.
  85. //
  86. DECLARE_ENUM_ACCESSOR( QueryName, const TCHAR *, shi1_netname );
  87. DECLARE_ENUM_ACCESSOR( QueryResourceType, UINT, shi1_type );
  88. DECLARE_ENUM_ACCESSOR( QueryComment, const TCHAR *, shi1_remark );
  89. }; // class SHARE1_ENUM_OBJ
  90. DECLARE_LM_ENUM_ITER_OF( SHARE1, struct share_info_1 );
  91. /*************************************************************************
  92. NAME: SHARE2_ENUM
  93. SYNOPSIS: SHARE2_ENUM is an enumerator for enumerating the
  94. sharepoints on a particular server.
  95. INTERFACE: SHARE2_ENUM() - Class constructor.
  96. PARENT: SHARE_ENUM
  97. USES: None.
  98. CAVEATS:
  99. NOTES:
  100. HISTORY:
  101. KeithMo 28-Jul-1991 Created.
  102. **************************************************************************/
  103. DLL_CLASS SHARE2_ENUM : public SHARE_ENUM
  104. {
  105. public:
  106. SHARE2_ENUM( const TCHAR * pszServer, BOOL fSticky = FALSE );
  107. }; // class SHARE2_ENUM
  108. /*************************************************************************
  109. NAME: SHARE2_ENUM_OBJ
  110. SYNOPSIS: This is basically the return type from the SHARE2_ENUM_ITER
  111. iterator.
  112. INTERFACE: SHARE2_ENUM_OBJ - Class constructor.
  113. ~SHARE2_ENUM_OBJ - Class destructor.
  114. QueryBufferPtr - Replaces ENUM_OBJ_BASE method.
  115. QueryName - Returns the sharepoint name.
  116. QueryType - Returns the sharepoint type.
  117. QueryComment - Returns the sharepoint comment.
  118. QueryPermissions - Returns the sharepoint permissions.
  119. QueryMaxUses - Returns the maximum number of
  120. uses allowed.
  121. QueryCurrentUses - Returns the current number of
  122. uses connected to the sharepoint.
  123. QueryPath - Returns the sharepoint path.
  124. QueryPassword - Returns the sharepoint password.
  125. PARENT: ENUM_OBJ_BASE
  126. HISTORY:
  127. KeithMo 07-Oct-1991 Created.
  128. **************************************************************************/
  129. DLL_CLASS SHARE2_ENUM_OBJ : public ENUM_OBJ_BASE
  130. {
  131. public:
  132. //
  133. // Provide properly-casted buffer Query/Set methods.
  134. //
  135. const struct share_info_2 * QueryBufferPtr( VOID ) const
  136. { return (const struct share_info_2 *)ENUM_OBJ_BASE::QueryBufferPtr(); }
  137. VOID SetBufferPtr( const struct share_info_2 * pBuffer );
  138. //
  139. // Accessors.
  140. //
  141. DECLARE_ENUM_ACCESSOR( QueryName, const TCHAR *, shi2_netname );
  142. DECLARE_ENUM_ACCESSOR( QueryType, UINT, shi2_type );
  143. DECLARE_ENUM_ACCESSOR( QueryComment, const TCHAR *, shi2_remark );
  144. DECLARE_ENUM_ACCESSOR( QueryPermissions,UINT, shi2_permissions );
  145. DECLARE_ENUM_ACCESSOR( QueryMaxUses, UINT, shi2_max_uses );
  146. DECLARE_ENUM_ACCESSOR( QueryCurrentUses,UINT, shi2_current_uses );
  147. DECLARE_ENUM_ACCESSOR( QueryPath, const TCHAR *, shi2_path );
  148. DECLARE_ENUM_ACCESSOR( QueryPassword, const TCHAR *, shi2_passwd );
  149. }; // class SHARE2_ENUM_OBJ
  150. DECLARE_LM_ENUM_ITER_OF( SHARE2, struct share_info_2 )
  151. #endif // _LMOESH_HXX_