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.

65 lines
2.2 KiB

  1. /******************************************************************
  2. SNetScal.h -- WBEM provider class declaration
  3. MODULE:
  4. DhcpProv.dll
  5. DESCRIPTION:
  6. Contains the declaration of the DHCP_Subnet_Scalar class and
  7. the indices definitions for its static table of manageable objects.
  8. REVISION:
  9. 08/03/98 - created
  10. ******************************************************************/
  11. #include "Props.h" // needed for CDHCP_Property definition
  12. #ifndef _SNETSCAL_H
  13. #define _SNETSCAL_H
  14. // indices for the DHCP_Subnet_Property static table (defined in SrvScal.cpp)
  15. #define IDX_SNET_Address 0
  16. #define IDX_SNET_Mask 1
  17. #define IDX_SNET_Name 2
  18. #define IDX_SNET_Comment 3
  19. #define IDX_SNET_State 4
  20. #define IDX_SNET_NbAddrInUse 5
  21. #define IDX_SNET_NbAddrFree 6
  22. #define IDX_SNET_NbPendingOffers 7
  23. // external definition for the static table of manageable objects (properties)
  24. extern const CDHCP_Property DHCP_Subnet_Property[];
  25. // the number of entries into the DHCP_Subnet_Property static table
  26. #define NUM_SUBNET_PROPERTIES (sizeof(DHCP_Subnet_Property)/sizeof(CDHCP_Property))
  27. class CDHCP_Subnet : public Provider
  28. {
  29. private:
  30. // Loader function for the properties values.
  31. BOOL LoadInstanceProperties(CInstance* pInstance);
  32. protected:
  33. // Reading Functions
  34. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  35. virtual HRESULT GetObject(CInstance* pInstance, long lFlags = 0L);
  36. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  37. // Writing Functions
  38. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  39. virtual HRESULT DeleteInstance(const CInstance& Instance, long lFlags = 0L);
  40. // Other Functions
  41. virtual HRESULT ExecMethod( const CInstance& Instance,
  42. const BSTR bstrMethodName,
  43. CInstance *pInParams,
  44. CInstance *pOutParams,
  45. long lFlags = 0L );
  46. public:
  47. // Constructor/destructor
  48. CDHCP_Subnet(const CHString& chsClassName, LPCSTR lpszNameSpace);
  49. virtual ~CDHCP_Subnet();
  50. };
  51. #endif