Source code of Windows XP (NT5)

77 lines
2.5 KiB

  1. /******************************************************************
  2. SNetFn.h -- Properties action functions declarations (GET/SET)
  3. MODULE:
  4. DhcpProv.dll
  5. DESCRIPTION:
  6. Contains the declaration of the CDHCP_Subnet_Parameters class, modeling all
  7. the datastructures used to retrieve the information from the DHCP Subnet.
  8. Contains the declarations for the action functions associated to
  9. each manageable property from the class CDHCP_Server
  10. REVISION:
  11. 08/03/98 - created
  12. ******************************************************************/
  13. #include "Props.h" // needed for MFN_PROPERTY_ACTION_DECL definition
  14. #ifndef _SNETFN_H
  15. #define _SNETFN_H
  16. // gathers the data structures needed for retrieving data from the DHCP Server.
  17. class CDHCP_Subnet_Parameters
  18. {
  19. public:
  20. DHCP_IP_ADDRESS m_dwSubnetAddress;
  21. LPDHCP_MIB_INFO m_pMibInfo;
  22. LPSCOPE_MIB_INFO m_pScopeMibInfo;
  23. LPDHCP_SUBNET_INFO m_pSubnetInfo;
  24. CDHCP_Subnet_Parameters(DHCP_IP_ADDRESS dwSubnetAddress);
  25. CDHCP_Subnet_Parameters(DHCP_IP_ADDRESS dwSubnetAddress, DHCP_IP_ADDRESS dwSubnetMask);
  26. ~CDHCP_Subnet_Parameters();
  27. BOOL CheckExistsInfoPtr();
  28. BOOL GetMibInfo(LPDHCP_MIB_INFO& MibInfo, LPSCOPE_MIB_INFO &pScopeMibInfo, BOOL fRefresh);
  29. BOOL GetSubnetInfo(LPDHCP_SUBNET_INFO& SubnetInfo, BOOL fRefresh);
  30. BOOL CommitNew(DWORD &returnCode);
  31. BOOL CommitSet(DWORD &returnCode);
  32. BOOL DeleteSubnet();
  33. };
  34. // the repository defines the SET methods as the _PRMFUNCS_SET_PREFIX
  35. // concatenated with the property name
  36. #define _SNET_SET_PREFIX L"Set"
  37. // GET function for the (RO)"Address" property
  38. MFN_PROPERTY_ACTION_DECL(fnSNetGetAddress);
  39. // GET function for the (RO)"Mask" property
  40. MFN_PROPERTY_ACTION_DECL(fnSNetGetMask);
  41. // GET function for the (RW) "Name" property
  42. MFN_PROPERTY_ACTION_DECL(fnSNetGetName);
  43. MFN_PROPERTY_ACTION_DECL(fnSNetSetName);
  44. // GET function for the (RW)"Comment" property
  45. MFN_PROPERTY_ACTION_DECL(fnSNetGetComment);
  46. MFN_PROPERTY_ACTION_DECL(fnSNetSetComment);
  47. // GET function for the (RW)"State" property
  48. MFN_PROPERTY_ACTION_DECL(fnSNetGetState);
  49. MFN_PROPERTY_ACTION_DECL(fnSNetSetState);
  50. // GET function for the (RO)"NumberOfAddressesInUse" property
  51. MFN_PROPERTY_ACTION_DECL(fnSNetGetNumberOfAddressesInUse);
  52. // GET function for the (RO)"NumberOfAddressesFree" property
  53. MFN_PROPERTY_ACTION_DECL(fnSNetGetNumberOfAddressesFree);
  54. // GET function for the (RO)"NumberOfPendingOffers" property
  55. MFN_PROPERTY_ACTION_DECL(fnSNetGetNumberOfPendingOffers);
  56. #endif