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.

155 lines
3.9 KiB

  1. /**********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1990, 1991 **/
  4. /**********************************************************************/
  5. /*
  6. lmoechar.hxx
  7. This file contains the class declarations for the CHARDEVQ_ENUM and
  8. CHARDEVQ1_ENUM enumerator classes and their associated iterator
  9. classes.
  10. CHARDEVQ_ENUM is a base enumeration class intended to be subclassed for
  11. the desired info level. CHARDEVQ1_ENUM is an info level 1 enumerator.
  12. FILE HISTORY:
  13. KeithMo 28-Jul-1991 Created.
  14. KeithMo 12-Aug-1991 Code review cleanup.
  15. KeithMo 07-Oct-1991 Win32 Conversion.
  16. */
  17. #ifndef _LMOECHAR_HXX
  18. #define _LMOECHAR_HXX
  19. /*************************************************************************
  20. NAME: CHARDEVQ_ENUM
  21. SYNOPSIS: This is a base enumeration class intended to be subclassed
  22. for the desired info level.
  23. INTERFACE: CHARDEVQ_ENUM() - Class constructor.
  24. CallAPI() - Invoke the enumeration API.
  25. PARENT: LOC_LM_ENUM
  26. USES: NLS_STR
  27. CAVEATS:
  28. NOTES:
  29. HISTORY:
  30. KeithMo 28-Jul-1991 Created.
  31. KeithMo 12-Aug-1991 Code review cleanup.
  32. **************************************************************************/
  33. DLL_CLASS CHARDEVQ_ENUM : public LOC_LM_ENUM
  34. {
  35. private:
  36. NLS_STR _nlsUserName;
  37. virtual APIERR CallAPI( BYTE ** ppbBuffer,
  38. UINT * pcEntriesRead );
  39. protected:
  40. CHARDEVQ_ENUM( const TCHAR * pszServer,
  41. const TCHAR * pszUserName,
  42. UINT uLevel );
  43. }; // class CHARDEVQ_ENUM
  44. /*************************************************************************
  45. NAME: CHARDEVQ1_ENUM
  46. SYNOPSIS: CHARDEVQ1_ENUM is an enumerator for enumerating the
  47. connections to a particular server.
  48. INTERFACE: CHARDEVQ1_ENUM() - Class constructor.
  49. PARENT: CHARDEVQ_ENUM
  50. USES: None.
  51. CAVEATS:
  52. NOTES:
  53. HISTORY:
  54. KeithMo 28-Jul-1991 Created.
  55. **************************************************************************/
  56. DLL_CLASS CHARDEVQ1_ENUM : public CHARDEVQ_ENUM
  57. {
  58. public:
  59. CHARDEVQ1_ENUM( const TCHAR * pszServerName,
  60. const TCHAR * pszUserName );
  61. }; // class CHARDEVQ1_ENUM
  62. /*************************************************************************
  63. NAME: CHARDEVQ1_ENUM_OBJ
  64. SYNOPSIS: This is basically the return type from the
  65. CHARDEVQ1_ENUM_ITER iterator.
  66. INTERFACE: CHARDEVQ1_ENUM_OBJ - Class constructor.
  67. ~CHARDEVQ1_ENUM_OBJ - Class destructor.
  68. QueryBufferPtr - Replaces ENUM_OBJ_BASE method.
  69. QueryName - Returns the queue name.
  70. QueryPriority - Returns the queue priority.
  71. QueryDevices - Returns the attached devices.
  72. QueryNumUsers - Returns the number of queued users.
  73. QueryNumAhead - ??
  74. PARENT: ENUM_OBJ_BASE
  75. HISTORY:
  76. KeithMo 07-Oct-1991 Created.
  77. **************************************************************************/
  78. DLL_CLASS CHARDEVQ1_ENUM_OBJ : public ENUM_OBJ_BASE
  79. {
  80. public:
  81. //
  82. // Provide properly-casted buffer Query/Set methods.
  83. //
  84. const struct chardevQ_info_1 * QueryBufferPtr( VOID ) const
  85. { return (const struct chardevQ_info_1 *)ENUM_OBJ_BASE::QueryBufferPtr(); }
  86. VOID SetBufferPtr( const struct chardevQ_info_1 * pBuffer );
  87. //
  88. // Accessors.
  89. //
  90. DECLARE_ENUM_ACCESSOR( QueryName, const TCHAR *, cq1_dev );
  91. DECLARE_ENUM_ACCESSOR( QueryPriority, UINT, cq1_priority );
  92. DECLARE_ENUM_ACCESSOR( QueryDevices, const TCHAR *, cq1_devs );
  93. DECLARE_ENUM_ACCESSOR( QueryNumUsers, UINT, cq1_numusers );
  94. DECLARE_ENUM_ACCESSOR( QueryNumAhead, UINT, cq1_numahead );
  95. }; // class CHARDEVQ1_ENUM_OBJ
  96. DECLARE_LM_ENUM_ITER_OF( CHARDEVQ1, struct chardevQ_info_1 )
  97. #endif // _LMOECHAR_HXX