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.

236 lines
6.0 KiB

  1. /*++
  2. Copyright (c) 1997-2000 Microsoft Corporation
  3. Module Name:
  4. rndcnf.h
  5. Abstract:
  6. Definitions for CConference class.
  7. --*/
  8. #ifndef __RNDCNF_H
  9. #define __RNDCNF_H
  10. #include "sdpblb.h"
  11. #include "rnddo.h"
  12. #pragma once
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CConference
  15. /////////////////////////////////////////////////////////////////////////////
  16. const DWORD NTP_OFFSET = 0x83aa7e80;
  17. const SHORT FIRST_POSSIBLE_YEAR = 1970;
  18. // 123456789012Z
  19. const WCHAR WSTR_GEN_TIME_ZERO[] = L"000000000000Z";
  20. // 1234567890
  21. const DWORD MAX_TTL = 2000000000;
  22. const DWORD NUM_MEETING_ATTRIBUTES =
  23. MEETING_ATTRIBUTES_END - MEETING_ATTRIBUTES_BEGIN - 1;
  24. template <class T>
  25. class ITDirectoryObjectConferenceVtbl : public ITDirectoryObjectConference
  26. {
  27. };
  28. class CConference :
  29. public CDirectoryObject,
  30. public CComDualImpl<ITDirectoryObjectConferenceVtbl<CConference>, &IID_ITDirectoryObjectConference, &LIBID_RENDLib>
  31. {
  32. // Add the following line to your object if you get a message about
  33. // GetControllingUnknown() being undefined
  34. // DECLARE_GET_CONTROLLING_UNKNOWN()
  35. public:
  36. BEGIN_COM_MAP(CConference)
  37. COM_INTERFACE_ENTRY(ITDirectoryObjectConference)
  38. COM_INTERFACE_ENTRY_CHAIN(CDirectoryObject)
  39. COM_INTERFACE_ENTRY_AGGREGATE_BLIND(m_pIUnkConfBlob)
  40. END_COM_MAP()
  41. //DECLARE_NOT_AGGREGATABLE(CConference)
  42. // Remove the comment from the line above if you don't want your object to
  43. // support aggregation.
  44. //
  45. // ITDirectoryObject overrides (not implemented by CDirectoryObject)
  46. //
  47. STDMETHOD (get_Name) (
  48. OUT BSTR *ppName
  49. );
  50. STDMETHOD (put_Name) (
  51. IN BSTR Val
  52. );
  53. STDMETHOD (get_DialableAddrs) (
  54. IN long AddressTypes, //defined in tapi.h
  55. OUT VARIANT * pVariant
  56. );
  57. STDMETHOD (EnumerateDialableAddrs) (
  58. IN DWORD dwAddressTypes, //defined in tapi.h
  59. OUT IEnumDialableAddrs ** pEnumDialableAddrs
  60. );
  61. STDMETHOD (GetTTL)(
  62. OUT DWORD * pdwTTL
  63. );
  64. //
  65. // ITDirectoryObjectPrivate overrides (not implemented by CDirectoryObject)
  66. //
  67. STDMETHOD (GetAttribute)(
  68. IN OBJECT_ATTRIBUTE Attribute,
  69. OUT BSTR * ppAttributeValue
  70. );
  71. STDMETHOD (SetAttribute)(
  72. IN OBJECT_ATTRIBUTE Attribute,
  73. IN BSTR pAttributeValue
  74. );
  75. //
  76. // ITDirectoryObjectConference
  77. //
  78. STDMETHOD(get_StartTime)(OUT DATE *pDate);
  79. STDMETHOD(put_StartTime)(IN DATE Date);
  80. STDMETHOD(get_StopTime)(OUT DATE *pDate);
  81. STDMETHOD(put_StopTime)(IN DATE Date);
  82. STDMETHOD(get_IsEncrypted)(OUT VARIANT_BOOL *pfEncrypted);
  83. STDMETHOD(put_IsEncrypted)(IN VARIANT_BOOL fEncrypted);
  84. STDMETHOD(get_Description)(OUT BSTR *ppDescription);
  85. STDMETHOD(put_Description)(IN BSTR pDescription);
  86. STDMETHOD(get_Url)(OUT BSTR *ppUrl);
  87. STDMETHOD(put_Url)(IN BSTR pUrl);
  88. STDMETHOD(get_AdvertisingScope)(
  89. OUT RND_ADVERTISING_SCOPE *pAdvertisingScope
  90. );
  91. STDMETHOD(put_AdvertisingScope)(
  92. IN RND_ADVERTISING_SCOPE AdvertisingScope
  93. );
  94. STDMETHOD(get_Originator)(OUT BSTR *ppOriginator);
  95. STDMETHOD(put_Originator)(IN BSTR pOriginator);
  96. STDMETHOD(get_Protocol)(OUT BSTR *ppProtocol);
  97. /* removed from interface (was not implemented and never will be) */
  98. /* STDMETHOD(put_Protocol)(IN BSTR pProtocol); */
  99. /* also removed because they were simultaneously useless and buggy */
  100. /* STDMETHOD(get_ConferenceType)(OUT BSTR *ppType); */
  101. /* STDMETHOD(put_ConferenceType)(IN BSTR pType); */
  102. //
  103. // IDispatch methods
  104. //
  105. STDMETHOD(GetIDsOfNames)(REFIID riid,
  106. LPOLESTR* rgszNames,
  107. UINT cNames,
  108. LCID lcid,
  109. DISPID* rgdispid
  110. );
  111. STDMETHOD(Invoke)(DISPID dispidMember,
  112. REFIID riid,
  113. LCID lcid,
  114. WORD wFlags,
  115. DISPPARAMS* pdispparams,
  116. VARIANT* pvarResult,
  117. EXCEPINFO* pexcepinfo,
  118. UINT* puArgErr
  119. );
  120. protected:
  121. HRESULT UpdateConferenceBlob(
  122. IN IUnknown *pIUnkConfBlob
  123. );
  124. HRESULT WriteAdvertisingScope(
  125. IN DWORD AdvertisingScope
  126. );
  127. HRESULT GetSingleValueBstr(
  128. IN OBJECT_ATTRIBUTE Attribute,
  129. OUT BSTR * AttributeValue
  130. );
  131. HRESULT GetSingleValueWstr(
  132. IN OBJECT_ATTRIBUTE Attribute,
  133. IN DWORD dwSize,
  134. OUT WCHAR * AttributeValue
  135. );
  136. HRESULT SetSingleValue(
  137. IN OBJECT_ATTRIBUTE Attribute,
  138. IN WCHAR * AttributeValue
  139. );
  140. HRESULT GetStartTime();
  141. HRESULT GetStopTime();
  142. HRESULT WriteStartTime(
  143. IN DWORD NtpStartTime
  144. );
  145. HRESULT WriteStopTime(
  146. IN DWORD NtpStopTime
  147. );
  148. HRESULT
  149. SetDefaultValue(
  150. IN REG_INFO RegInfo[],
  151. IN DWORD dwItems
  152. );
  153. HRESULT SetDefaultSD();
  154. public:
  155. CConference::CConference()
  156. : m_pIUnkConfBlob(NULL),
  157. m_pITConfBlob(NULL),
  158. m_pITConfBlobPrivate(NULL)
  159. {
  160. m_Type = OT_CONFERENCE;
  161. }
  162. HRESULT Init(BSTR pName);
  163. HRESULT Init(BSTR pName, BSTR pProtocol, BSTR pBlob);
  164. HRESULT FinalConstruct();
  165. virtual void FinalRelease();
  166. protected:
  167. IUnknown *m_pIUnkConfBlob;
  168. ITConferenceBlob *m_pITConfBlob;
  169. ITConfBlobPrivate *m_pITConfBlobPrivate;
  170. CTstr m_Attributes[NUM_MEETING_ATTRIBUTES];
  171. };
  172. #endif