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.

82 lines
2.9 KiB

  1. /******************************************************************
  2. SrvScal.h -- WBEM provider class declaration
  3. MODULE:
  4. DhcpProv.dll
  5. DESCRIPTION:
  6. Contains the declaration of the DHCP_Server_Scalar class and
  7. the indices definitions for the static table of manageable objects.
  8. REVISION:
  9. 08/03/98 - created
  10. ******************************************************************/
  11. #include "Props.h" // needed for CDHCP_Property definition
  12. #ifndef _SRVSCAL_H
  13. #define _SRVSCAL_H
  14. // Property set identification
  15. #define PROVIDER_NAME_DHCP_SERVER "DHCP_Server"
  16. #define PROVIDER_NAMESPACE_DHCP "root\\dhcp"
  17. // indices for the DHCP_Server_Property static table (defined in SrvScal.cpp)
  18. #define IDX_SRV_StartTime 0
  19. #define IDX_SRV_TotalNoOfAcks 1
  20. #define IDX_SRV_TotalNoOfDeclines 2
  21. #define IDX_SRV_TotalNoOfDiscovers 3
  22. #define IDX_SRV_TotalNoOfNacks 4
  23. #define IDX_SRV_TotalNoOfOffers 5
  24. #define IDX_SRV_TotalNoOfReleases 6
  25. #define IDX_SRV_TotalNoOfRequests 7
  26. #define IDX_SRV_ServerVersion 8
  27. #define IDX_SRV_APIProtocol 9
  28. #define IDX_SRV_DatabaseName 10
  29. #define IDX_SRV_DatabasePath 11
  30. #define IDX_SRV_BackupPath 12
  31. #define IDX_SRV_BackupInterval 13
  32. #define IDX_SRV_DatabaseLoggingFlag 14
  33. #define IDX_SRV_RestoreFlag 15
  34. #define IDX_SRV_DatabaseCleanupInterval 16
  35. #define IDX_SRV_DebugFlag 17
  36. #define IDX_SRV_PingRetries 18
  37. #define IDX_SRV_BootFileTable 19
  38. #define IDX_SRV_AuditLog 20
  39. // external definition for the static table of manageable objects (properties)
  40. extern const CDHCP_Property DHCP_Server_Property[];
  41. // the number of entries into the DHCP_Server_Property static table
  42. #define NUM_SERVER_PROPERTIES (sizeof(DHCP_Server_Property)/sizeof(CDHCP_Property))
  43. class CDHCP_Server : public Provider
  44. {
  45. private:
  46. // Loader function for the properties values.
  47. BOOL LoadInstanceProperties(CInstance* pInstance);
  48. protected:
  49. // Reading Functions
  50. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  51. virtual HRESULT GetObject(CInstance* pInstance, long lFlags = 0L);
  52. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  53. // Writing Functions
  54. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  55. virtual HRESULT DeleteInstance(const CInstance& Instance, long lFlags = 0L);
  56. // Other Functions
  57. virtual HRESULT ExecMethod( const CInstance& Instance,
  58. const BSTR bstrMethodName,
  59. CInstance *pInParams,
  60. CInstance *pOutParams,
  61. long lFlags = 0L );
  62. public:
  63. // Constructor/destructor
  64. CDHCP_Server(const CHString& chsClassName, LPCSTR lpszNameSpace);
  65. virtual ~CDHCP_Server();
  66. };
  67. #endif