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.

248 lines
4.9 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxFolders.cpp
  5. Abstract:
  6. Implementation of CFaxFolders
  7. Author:
  8. Iv Garber (IvG) Apr, 2000
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #include "FaxComEx.h"
  13. #include "FaxFolders.h"
  14. //
  15. //==================== INTERFACE SUPPORT ERROR INFO =====================
  16. //
  17. STDMETHODIMP
  18. CFaxFolders::InterfaceSupportsErrorInfo(
  19. REFIID riid
  20. )
  21. /*++
  22. Routine name : CFaxFolders::InterfaceSupportsErrorInfo
  23. Routine description:
  24. ATL's implementation of Interface Support Error Info
  25. Author:
  26. Iv Garber (IvG), Apr, 2000
  27. Arguments:
  28. riid [in] - Reference of the Interface
  29. Return Value:
  30. Standard HRESULT code
  31. --*/
  32. {
  33. static const IID* arr[] =
  34. {
  35. &IID_IFaxFolders,
  36. &IID_IFaxOutgoingQueue, // Contained object
  37. &IID_IFaxIncomingQueue, // Contained object
  38. &IID_IFaxOutgoingArchive, // Contained object
  39. &IID_IFaxIncomingArchive // Contained object
  40. };
  41. for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
  42. {
  43. if (InlineIsEqualGUID(*arr[i],riid))
  44. return S_OK;
  45. }
  46. return S_FALSE;
  47. } // CFaxFolders::InterfaceSupportErrorInfo
  48. //
  49. //==================== GET OUTGOING QUEUE ====================================
  50. //
  51. STDMETHODIMP
  52. CFaxFolders::get_OutgoingQueue(
  53. IFaxOutgoingQueue **ppOutgoingQueue
  54. )
  55. /*++
  56. Routine name : CFaxFolders::get_OutgoingQueue
  57. Routine description:
  58. Return OutgoingQueue
  59. Author:
  60. Iv Garber (IvG), Apr, 2000
  61. Arguments:
  62. ppOutgoingQueue [out] - ptr to put the IOutgoingQueue Ifc
  63. Return Value:
  64. Standard HRESULT code
  65. --*/
  66. {
  67. HRESULT hr = S_OK;
  68. DBG_ENTER (_T("CFaxFolders::get_OutgoingQueue"), hr);
  69. CObjectHandler<CFaxOutgoingQueue, IFaxOutgoingQueue> ObjectCreator;
  70. hr = ObjectCreator.GetContainedObject(ppOutgoingQueue, &m_pOutgoingQueue, m_pIFaxServerInner);
  71. if (FAILED(hr))
  72. {
  73. AtlReportError(CLSID_FaxFolders,
  74. GetErrorMsgId(hr),
  75. IID_IFaxFolders,
  76. hr);
  77. return hr;
  78. }
  79. return hr;
  80. } // CFaxFolders::get_OutgoingQueue()
  81. //
  82. //==================== GET INCOMING ARCHIVE ====================================
  83. //
  84. STDMETHODIMP
  85. CFaxFolders::get_IncomingArchive(
  86. IFaxIncomingArchive **ppIncomingArchive
  87. )
  88. /*++
  89. Routine name : CFaxFolders::get_IncomingArchive
  90. Routine description:
  91. Return Incoming Archive
  92. Author:
  93. Iv Garber (IvG), Apr, 2000
  94. Arguments:
  95. pIncomingArchive [out] - The ptr to the place to put IncomingArchive
  96. Return Value:
  97. Standard HRESULT code
  98. --*/
  99. {
  100. HRESULT hr = S_OK;
  101. DBG_ENTER (_T("CFaxFolders::get_IncomingArchive"), hr);
  102. CObjectHandler<CFaxIncomingArchive, IFaxIncomingArchive> ObjectCreator;
  103. hr = ObjectCreator.GetContainedObject(ppIncomingArchive, &m_pIncomingArchive, m_pIFaxServerInner);
  104. if (FAILED(hr))
  105. {
  106. AtlReportError(CLSID_FaxFolders,
  107. GetErrorMsgId(hr),
  108. IID_IFaxFolders,
  109. hr);
  110. return hr;
  111. }
  112. return hr;
  113. } // CFaxFolders::get_IncomingArchive()
  114. //
  115. //==================== GET INCOMING QUEUE ====================================
  116. //
  117. STDMETHODIMP
  118. CFaxFolders::get_IncomingQueue(
  119. IFaxIncomingQueue **ppIncomingQueue
  120. )
  121. /*++
  122. Routine name : CFaxFolders::get_IncomingQueue
  123. Routine description:
  124. Return Incoming Queue
  125. Author:
  126. Iv Garber (IvG), Apr, 2000
  127. Arguments:
  128. pIncomingQueue [out] - The Incoming Queue
  129. Return Value:
  130. Standard HRESULT code
  131. --*/
  132. {
  133. HRESULT hr = S_OK;
  134. DBG_ENTER (_T("CFaxFolders::get_IncomingQueue"), hr);
  135. CObjectHandler<CFaxIncomingQueue, IFaxIncomingQueue> ObjectCreator;
  136. hr = ObjectCreator.GetContainedObject(ppIncomingQueue, &m_pIncomingQueue, m_pIFaxServerInner);
  137. if (FAILED(hr))
  138. {
  139. AtlReportError(CLSID_FaxFolders,
  140. GetErrorMsgId(hr),
  141. IID_IFaxFolders,
  142. hr);
  143. return hr;
  144. }
  145. return hr;
  146. } // CFaxFolders::get_IncomingQueue()
  147. //
  148. //==================== GET OUTGOING ARCHIVE ====================================
  149. //
  150. STDMETHODIMP
  151. CFaxFolders::get_OutgoingArchive(
  152. IFaxOutgoingArchive **ppOutgoingArchive
  153. )
  154. /*++
  155. Routine name : CFaxFolders::get_OutgoingArchive
  156. Routine description:
  157. Return Outgoing Archive Object
  158. Author:
  159. Iv Garber (IvG), Apr, 2000
  160. Arguments:
  161. pOutgoingArchive [out] - The ptr to put Outgoing Archive Object
  162. Return Value:
  163. Standard HRESULT code
  164. --*/
  165. {
  166. HRESULT hr = S_OK;
  167. DBG_ENTER (_T("CFaxFolders::get_OutgoingArchive"), hr);
  168. CObjectHandler<CFaxOutgoingArchive, IFaxOutgoingArchive> ObjectCreator;
  169. hr = ObjectCreator.GetContainedObject(ppOutgoingArchive, &m_pOutgoingArchive, m_pIFaxServerInner);
  170. if (FAILED(hr))
  171. {
  172. AtlReportError(CLSID_FaxFolders,
  173. GetErrorMsgId(hr),
  174. IID_IFaxFolders,
  175. hr);
  176. return hr;
  177. }
  178. return hr;
  179. } // CFaxFolders::get_OutgoingArchive()