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.

156 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. Module Name:
  4. rnduser.h
  5. Abstract:
  6. Definitions for CUser class.
  7. Author:
  8. Mu Han (muhan) 12-5-1997
  9. --*/
  10. #ifndef __RNDUSER_H
  11. #define __RNDUSER_H
  12. #pragma once
  13. #include "rnddo.h"
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CUser
  16. /////////////////////////////////////////////////////////////////////////////
  17. const DWORD NUM_USER_ATTRIBUTES =
  18. USER_ATTRIBUTES_END - USER_ATTRIBUTES_BEGIN - 1;
  19. template <class T>
  20. class ITDirectoryObjectUserVtbl : public ITDirectoryObjectUser
  21. {
  22. };
  23. class CUser :
  24. public CDirectoryObject,
  25. public CComDualImpl<
  26. ITDirectoryObjectUserVtbl<CUser>,
  27. &IID_ITDirectoryObjectUser,
  28. &LIBID_RENDLib
  29. >
  30. {
  31. public:
  32. BEGIN_COM_MAP(CUser)
  33. COM_INTERFACE_ENTRY(ITDirectoryObjectUser)
  34. COM_INTERFACE_ENTRY_CHAIN(CDirectoryObject)
  35. END_COM_MAP()
  36. //
  37. // ITDirectoryObject overrides (not implemented by CDirectoryObject)
  38. //
  39. STDMETHOD (get_Name) (
  40. OUT BSTR *pVal
  41. );
  42. STDMETHOD (put_Name) (
  43. IN BSTR Val
  44. );
  45. STDMETHOD (get_DialableAddrs) (
  46. IN long dwAddressTypes, //defined in tapi.h
  47. OUT VARIANT * pVariant
  48. );
  49. STDMETHOD (EnumerateDialableAddrs) (
  50. IN DWORD dwAddressTypes, //defined in tapi.h
  51. OUT IEnumDialableAddrs ** pEnumDialableAddrs
  52. );
  53. STDMETHOD (GetTTL)(
  54. OUT DWORD * pdwTTL
  55. );
  56. //
  57. // ITDirectoryObjectPrivate overrides (not implemented by CDirectoryObject)
  58. //
  59. STDMETHOD (GetAttribute)(
  60. IN OBJECT_ATTRIBUTE Attribute,
  61. OUT BSTR * ppAttributeValue
  62. );
  63. STDMETHOD (SetAttribute)(
  64. IN OBJECT_ATTRIBUTE Attribute,
  65. IN BSTR pAttributeValue
  66. );
  67. //
  68. // ITDirectoryObjectUser
  69. //
  70. STDMETHOD (get_IPPhonePrimary) (
  71. OUT BSTR *ppName
  72. );
  73. STDMETHOD (put_IPPhonePrimary) (
  74. IN BSTR newVal
  75. );
  76. //
  77. // IDispatch methods
  78. //
  79. STDMETHOD(GetIDsOfNames)(REFIID riid,
  80. LPOLESTR* rgszNames,
  81. UINT cNames,
  82. LCID lcid,
  83. DISPID* rgdispid
  84. );
  85. STDMETHOD(Invoke)(DISPID dispidMember,
  86. REFIID riid,
  87. LCID lcid,
  88. WORD wFlags,
  89. DISPPARAMS* pdispparams,
  90. VARIANT* pvarResult,
  91. EXCEPINFO* pexcepinfo,
  92. UINT* puArgErr
  93. );
  94. public:
  95. CUser()
  96. {
  97. m_Type = OT_USER;
  98. }
  99. HRESULT Init(BSTR bName);
  100. virtual ~CUser() {}
  101. protected:
  102. HRESULT GetSingleValueBstr(
  103. IN OBJECT_ATTRIBUTE Attribute,
  104. OUT BSTR * AttributeValue
  105. );
  106. HRESULT SetSingleValue(
  107. IN OBJECT_ATTRIBUTE Attribute,
  108. IN WCHAR * AttributeValue
  109. );
  110. HRESULT SetDefaultSD();
  111. protected:
  112. CTstr m_Attributes[NUM_USER_ATTRIBUTES];
  113. };
  114. #endif