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.

109 lines
4.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 2000
  6. //
  7. // File: sdowrap.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _RAS_SDO_WRAPPER_H_
  11. #define _RAS_SDO_WRAPPER_H_
  12. #pragma warning( disable : 4786 )
  13. class CSdoWrapper
  14. {
  15. public:
  16. CSdoWrapper(){};
  17. ~CSdoWrapper();
  18. virtual HRESULT Init(ULONG collectionId, ISdo* pISdo, ISdoDictionaryOld* pIDic);
  19. virtual HRESULT PutProperty(ULONG id, VARIANT* pVar);
  20. virtual HRESULT GetProperty(ULONG id, VARIANT* pVar);
  21. virtual HRESULT RemoveProperty(ULONG id);
  22. virtual HRESULT Commit(BOOL bCommit = TRUE);
  23. operator ISdo*() { return (ISdo*)m_spISdo;};
  24. operator ISdoCollection*() { return (ISdoCollection*)m_spISdoCollection;};
  25. operator ISdoDictionaryOld*() { return (ISdoDictionaryOld*)m_spIDictionary;};
  26. protected:
  27. // the two interfaces for the object
  28. CComPtr<ISdo> m_spISdo;
  29. CComPtr<ISdoCollection> m_spISdoCollection;
  30. // dictioanry object
  31. CComPtr<ISdoDictionaryOld> m_spIDictionary;
  32. CMap<ULONG, ULONG, ISdo*, ISdo*> m_mapProperties;
  33. };
  34. class CUserSdoWrapper
  35. {
  36. public:
  37. CUserSdoWrapper(){};
  38. ~CUserSdoWrapper()
  39. {
  40. // to test if the AV is here, so do it explicitly
  41. m_spISdo.Release();
  42. };
  43. virtual HRESULT Init(ISdo* pISdo)
  44. {
  45. ASSERT(pISdo);
  46. m_spISdo = pISdo;
  47. return S_OK;
  48. };
  49. virtual HRESULT PutProperty(ULONG id, VARIANT* pVar);
  50. virtual HRESULT GetProperty(ULONG id, VARIANT* pVar);
  51. virtual HRESULT RemoveProperty(ULONG id);
  52. virtual HRESULT Commit(BOOL bCommit = TRUE);
  53. operator ISdo*() { return (ISdo*)m_spISdo;};
  54. protected:
  55. // the two interfaces for the object
  56. CComPtr<ISdo> m_spISdo;
  57. };
  58. #define PROPERTY_USER_IAS_ATTRIBUTE_ALLOW_DIALIN PROPERTY_USER_ALLOW_DIALIN
  59. #define PROPERTY_USER_msRADIUSFramedIPAddress PROPERTY_USER_RADIUS_FRAMED_IP_ADDRESS
  60. #define PROPERTY_USER_msSavedRADIUSFramedIPAddress PROPERTY_USER_SAVED_RADIUS_FRAMED_IP_ADDRESS
  61. #define PROPERTY_USER_msRADIUSCallbackNumber PROPERTY_USER_RADIUS_CALLBACK_NUMBER
  62. #define PROPERTY_USER_msSavedRADIUSCallbackNumber PROPERTY_USER_SAVED_RADIUS_CALLBACK_NUMBER
  63. #define PROPERTY_USER_msNPCallingStationID PROPERTY_USER_CALLING_STATION_ID
  64. #define PROPERTY_USER_msSavedNPCallingStationID PROPERTY_USER_SAVED_CALLING_STATION_ID
  65. #define PROPERTY_USER_msRADIUSFramedRoute PROPERTY_USER_RADIUS_FRAMED_ROUTE
  66. #define PROPERTY_USER_msSavedRADIUSFramedRoute PROPERTY_USER_SAVED_RADIUS_FRAMED_ROUTE
  67. #define PROPERTY_USER_RADIUS_ATTRIBUTE_SERVICE_TYPE PROPERTY_USER_SERVICE_TYPE
  68. // profile
  69. // Constraints Dialog
  70. #define PROPERTY_PROFILE_msNPTimeOfDay IAS_ATTRIBUTE_NP_TIME_OF_DAY
  71. #define PROPERTY_PROFILE_msNPCalledStationId IAS_ATTRIBUTE_NP_CALLED_STATION_ID
  72. #define PROPERTY_PROFILE_msNPAllowedPortTypes IAS_ATTRIBUTE_NP_ALLOWED_PORT_TYPES
  73. #define PROPERTY_PROFILE_msRADIUSIdleTimeout RADIUS_ATTRIBUTE_IDLE_TIMEOUT
  74. #define PROPERTY_PROFILE_msRADIUSSessionTimeout RADIUS_ATTRIBUTE_SESSION_TIMEOUT
  75. // Networking Dialog
  76. #define PROPERTY_PROFILE_msRADIUSFramedIPAddress RADIUS_ATTRIBUTE_FRAMED_IP_ADDRESS
  77. #define PROPERTY_PROFILE_msRASFilter MS_ATTRIBUTE_FILTER
  78. // Multilink Dialog
  79. #define PROPERTY_PROFILE_msRADIUSPortLimit RADIUS_ATTRIBUTE_PORT_LIMIT
  80. #define PROPERTY_PROFILE_msRASBapLinednLimit RAS_ATTRIBUTE_BAP_LINE_DOWN_LIMIT
  81. #define PROPERTY_PROFILE_msRASBapLinednTime RAS_ATTRIBUTE_BAP_LINE_DOWN_TIME
  82. #define PROPERTY_PROFILE_msRASBapRequired RAS_ATTRIBUTE_BAP_REQUIRED
  83. // Authentication Dialog
  84. #define PROPERTY_PROFILE_msNPAuthenticationType IAS_ATTRIBUTE_NP_AUTHENTICATION_TYPE
  85. #define PROPERTY_PROFILE_msNPAllowedEapType IAS_ATTRIBUTE_NP_ALLOWED_EAP_TYPE
  86. // Encryption Dialog
  87. #define PROPERTY_PROFILE_msRASAllowEncryption RAS_ATTRIBUTE_ENCRYPTION_POLICY
  88. #define PROPERTY_PROFILE_msRASEncryptionType RAS_ATTRIBUTE_ENCRYPTION_TYPE
  89. #endif // _RAS_SDO_WRAPPER_H_