Leaked source code of windows server 2003
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.

81 lines
2.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Passport **/
  3. /** Copyright(c) Microsoft Corporation, 1999 - 2001 **/
  4. /**********************************************************************/
  5. /*
  6. profile.h
  7. com object for profile
  8. FILE HISTORY:
  9. */
  10. // Profile.h : Declaration of the CProfile
  11. #ifndef __PROFILE_H_
  12. #define __PROFILE_H_
  13. #include "resource.h" // main symbols
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CProfile
  16. class ATL_NO_VTABLE CProfile :
  17. public CComObjectRootEx<CComMultiThreadModel>,
  18. public CComCoClass<CProfile, &CLSID_Profile>,
  19. public ISupportErrorInfo,
  20. public IDispatchImpl<IPassportProfile, &IID_IPassportProfile, &LIBID_PASSPORTLib>
  21. {
  22. public:
  23. CProfile();
  24. ~CProfile();
  25. public:
  26. DECLARE_REGISTRY_RESOURCEID(IDR_PROFILE)
  27. DECLARE_PROTECT_FINAL_CONSTRUCT()
  28. BEGIN_COM_MAP(CProfile)
  29. COM_INTERFACE_ENTRY(IPassportProfile)
  30. COM_INTERFACE_ENTRY(IDispatch)
  31. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  32. END_COM_MAP()
  33. // ISupportsErrorInfo
  34. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  35. // IPassportProfile
  36. public:
  37. HRESULT get_IsSecure(VARIANT_BOOL* pbIsSecure);
  38. BOOL IsSecure(void);
  39. STDMETHOD(get_unencryptedProfile)(/*[out, retval]*/ BSTR *pVal);
  40. STDMETHOD(put_unencryptedProfile)(/*[in]*/ BSTR newVal);
  41. STDMETHOD(get_SchemaName)(/*[out, retval]*/ BSTR *pVal);
  42. STDMETHOD(put_SchemaName)(/*[in]*/ BSTR newVal);
  43. STDMETHOD(get_IsValid)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  44. STDMETHOD(get_ByIndex)(/*[in]*/ int index, /*[out, retval]*/ VARIANT *pVal);
  45. STDMETHOD(put_ByIndex)(/*[in]*/ int index, /*[in]*/ VARIANT newVal);
  46. STDMETHOD(get_Attribute)(/*[in]*/ BSTR name, /*[out, retval]*/ VARIANT *pVal);
  47. STDMETHOD(put_Attribute)(/*[in]*/ BSTR name, /*[in]*/ VARIANT newVal);
  48. STDMETHOD(get_updateString)(/*[out,retval]*/ BSTR *pVal);
  49. STDMETHOD(incrementVersion)(void);
  50. protected:
  51. UINT* m_bitPos;
  52. UINT* m_pos;
  53. BSTR m_schemaName;
  54. BSTR m_raw;
  55. BOOL m_valid;
  56. BOOL m_secure;
  57. CProfileSchema* m_schema;
  58. int m_versionAttributeIndex;
  59. void** m_updates;
  60. void parse(LPCOLESTR raw, DWORD dwByteLen);
  61. private:
  62. };
  63. #endif //__PROFILE_H_