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.

170 lines
4.6 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. srvprop.hxx
  7. Class declarations for the SERVER_PROPERTIES.
  8. This file contains the class definitions for the SERVER_PROPERTIES.
  9. The SERVER_PROPERTIES class implements the Server Manager main
  10. property sheet.
  11. FILE HISTORY:
  12. NarenG 1-Oct-1992 Tailored to suit AFP needs.
  13. */
  14. #ifndef _SRVPROP_HXX
  15. #define _SRVPROP_HXX
  16. #include <bltnslt.hxx>
  17. #include <prompt.hxx>
  18. /*************************************************************************
  19. NAME: SERVER_PROPERTIES
  20. SYNOPSIS: Server Manager main property sheet object.
  21. INTERFACE: SERVER_PROPERTIES - Class constructor. Takes a handle
  22. to the "owning" window, and a
  23. pointer to a SERVER_2 object which
  24. represents the target server.
  25. ~SERVER_PROPERTIES - Class destructor.
  26. OnCommand - Called during command processing.
  27. This method is responsible for
  28. handling commands from the various
  29. graphical buttons in the button
  30. bar.
  31. QueryHelpContext - Called when the user presses "F1"
  32. or the "Help" button. Used for
  33. selecting the appropriate help
  34. text for display.
  35. Refresh - Called during refresh processing
  36. to read the "dynamic" information
  37. from the server.
  38. BUGBUG: The dialog refresh
  39. mechanism is not yet in place.
  40. SetupButtonBar - Initializes the graphical button
  41. bar.
  42. InitializeButton - Initializes a single graphical
  43. button. Called by
  44. SetupButtonBar().
  45. PARENTS: SRV_BASE_DIALOG
  46. USES: SLT
  47. SLE
  48. FONT
  49. GRAPHICAL_BUTTON
  50. SERVER_2
  51. DEC_SLT
  52. CAVEATS:
  53. NOTES:
  54. HISTORY:
  55. NarenG 1-Oct-1992 Tailored to suit AFP needs.
  56. **************************************************************************/
  57. class SERVER_PROPERTIES : public DIALOG_WINDOW
  58. {
  59. private:
  60. //
  61. // This data member represents a handle to the target server.
  62. //
  63. AFP_SERVER_HANDLE _hServer;
  64. //
  65. // The following DEC_SLTs represent the current usage statistics.
  66. //
  67. DEC_SLT _sltCurrentActiveSessions;
  68. DEC_SLT _sltCurrentOpenFiles;
  69. DEC_SLT _sltCurrentFileLocks;
  70. //
  71. // The following data members implement the graphical
  72. // button bar.
  73. //
  74. FONT _fontHelv;
  75. GRAPHICAL_BUTTON _gbUsers;
  76. GRAPHICAL_BUTTON _gbVolumes;
  77. GRAPHICAL_BUTTON _gbOpenFiles;
  78. GRAPHICAL_BUTTON _gbServerParms;
  79. //
  80. // This method refreshes the "dynamic" server data (the
  81. // Current Usage statistics).
  82. //
  83. DWORD Refresh( VOID );
  84. //
  85. // This method initializes the graphical button bar.
  86. //
  87. APIERR SetupButtonBar( VOID );
  88. //
  89. // Initialize a single graphical button. This method
  90. // is called only by SetupButtonBar().
  91. //
  92. VOID InitializeButton( GRAPHICAL_BUTTON * pgb,
  93. MSGID msg,
  94. BMID bmid );
  95. const TCHAR * _pszServerName;
  96. protected:
  97. //
  98. // Called during command processing, mainly to handle
  99. // commands from the graphical button bar.
  100. //
  101. virtual BOOL OnCommand( const CONTROL_EVENT & event );
  102. //
  103. // Called during help processing to select the appropriate
  104. // help text for display.
  105. //
  106. virtual ULONG QueryHelpContext( VOID );
  107. public:
  108. //
  109. // Usual constructor/destructor goodies.
  110. //
  111. SERVER_PROPERTIES( HWND hWndOwner,
  112. AFP_SERVER_HANDLE hServer,
  113. const TCHAR * pszServerName );
  114. ~SERVER_PROPERTIES();
  115. }; // class SERVER_PROPERTIES
  116. #endif // _SRVPROP_HXX