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.

72 lines
2.5 KiB

  1. /******************************************************************
  2. LsScal.h -- WBEM provider class declaration
  3. MODULE:
  4. DhcpProv.dll
  5. DESCRIPTION:
  6. Contains the declaration of the DHCP_Lease class and
  7. the indices definitions for its static table of manageable objects.
  8. REVISION:
  9. 08/14/98 - created
  10. ******************************************************************/
  11. #include "Props.h" // needed for CDHCP_Property definition
  12. #ifndef _LSSCAL_H
  13. #define _LSSCAL_H
  14. // indices for the DHCP_Lease_Property static table (defined in LsScal.cpp)
  15. #define IDX_Ls_Subnet 0
  16. #define IDX_Ls_Address 1
  17. #define IDX_Ls_SubnetMask 2
  18. #define IDX_Ls_UniqueClientIdentifier 3
  19. #define IDX_Ls_Name 4
  20. #define IDX_Ls_Comment 5
  21. #define IDX_Ls_LeaseExpiryDate 6
  22. #define IDX_Ls_Type 7
  23. #define IDX_Ls_State 8
  24. class CDHCP_Lease_Parameters;
  25. // external definition for the static table of manageable objects (properties)
  26. extern const CDHCP_Property DHCP_Lease_Property[];
  27. // the number of entries into the DHCP_Subnet_Property static table
  28. #define NUM_LEASE_PROPERTIES (sizeof(DHCP_Lease_Property)/sizeof(CDHCP_Property))
  29. class CDHCP_Lease : public Provider
  30. {
  31. protected:
  32. // Loader function for the properties values.
  33. BOOL LoadInstanceProperties(CInstance* pInstance);
  34. // Loader function for the properties values, which returns the key info from the pInstance;
  35. BOOL LoadInstanceProperties(CInstance* pInstance, DWORD &dwSubnet, DWORD &dwAddress);
  36. // Loader function for the lease parameters;
  37. BOOL LoadLeaseParams(CDHCP_Lease_Parameters *pLeaseParams, CInstance *pInstance);
  38. // Reading Functions
  39. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  40. virtual HRESULT GetObject(CInstance* pInstance, long lFlags = 0L);
  41. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  42. // Writing Functions
  43. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  44. virtual HRESULT DeleteInstance(const CInstance& Instance, long lFlags = 0L);
  45. // Other Functions
  46. virtual HRESULT ExecMethod( const CInstance& Instance,
  47. const BSTR bstrMethodName,
  48. CInstance *pInParams,
  49. CInstance *pOutParams,
  50. long lFlags = 0L );
  51. public:
  52. // Constructor/destructor
  53. CDHCP_Lease(const CHString& chsClassName, LPCSTR lpszNameSpace);
  54. virtual ~CDHCP_Lease();
  55. };
  56. #endif