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.

160 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxOutboundRouting.cpp
  5. Abstract:
  6. Implementation of CFaxOutboundRouting class.
  7. Author:
  8. Iv Garber (IvG) Jun, 2000
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #include "FaxComEx.h"
  13. #include "FaxOutboundRouting.h"
  14. #include "FaxOutboundRoutingRules.h"
  15. #include "FaxOutboundRoutingGroups.h"
  16. //
  17. //===================== SUPPORT ERROR INFO ======================================
  18. //
  19. STDMETHODIMP
  20. CFaxOutboundRouting::InterfaceSupportsErrorInfo(
  21. REFIID riid
  22. )
  23. /*++
  24. Routine name : CFaxOutboundRouting::InterfaceSupportsErrorInfo
  25. Routine description:
  26. ATL's implementation of Support Error Info.
  27. Author:
  28. Iv Garber (IvG), Jun, 2000
  29. Arguments:
  30. riid [in] - reference to the Interface.
  31. Return Value:
  32. Standard HRESULT code
  33. --*/
  34. {
  35. static const IID* arr[] =
  36. {
  37. &IID_IFaxOutboundRouting
  38. };
  39. for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
  40. {
  41. if (InlineIsEqualGUID(*arr[i],riid))
  42. return S_OK;
  43. }
  44. return S_FALSE;
  45. }
  46. //
  47. //================== GET RULES COLLECTION OBJECT ==============================
  48. //
  49. STDMETHODIMP
  50. CFaxOutboundRouting::GetRules(
  51. IFaxOutboundRoutingRules **ppRules
  52. )
  53. /*++
  54. Routine name : CFaxOutboundRouting::GetRules
  55. Routine description:
  56. Return Rules Collection Object
  57. Author:
  58. Iv Garber (IvG), Jun, 2000
  59. Arguments:
  60. ppRules [out] - the Rules Collection Object
  61. Return Value:
  62. Standard HRESULT code
  63. Notes:
  64. Rules Collection is not cached at this level. It is created from the scratch
  65. each time user asks for it.
  66. --*/
  67. {
  68. HRESULT hr = S_OK;
  69. DBG_ENTER (_T("CFaxOutboundRouting::GetRules"), hr);
  70. CObjectHandler<CFaxOutboundRoutingRules, IFaxOutboundRoutingRules> ObjectCreator;
  71. hr = ObjectCreator.GetObject(ppRules, m_pIFaxServerInner);
  72. if (FAILED(hr))
  73. {
  74. AtlReportError(CLSID_FaxOutboundRouting, GetErrorMsgId(hr), IID_IFaxOutboundRouting, hr);
  75. return hr;
  76. }
  77. return hr;
  78. }
  79. //
  80. //================== GET GROUPS COLLECTION OBJECT ==============================
  81. //
  82. STDMETHODIMP
  83. CFaxOutboundRouting::GetGroups(
  84. IFaxOutboundRoutingGroups **ppGroups
  85. )
  86. /*++
  87. Routine name : CFaxOutboundRouting::GetGroups
  88. Routine description:
  89. Return Groups Collection Object
  90. Author:
  91. Iv Garber (IvG), Jun, 2000
  92. Arguments:
  93. ppGroups [out] - the Groups Collection Object
  94. Return Value:
  95. Standard HRESULT code
  96. Notes:
  97. Groups Collection is not cached at this level. It is created from the scratch
  98. each time user asks for it.
  99. --*/
  100. {
  101. HRESULT hr = S_OK;
  102. DBG_ENTER (_T("CFaxOutboundRouting::GetGroups"), hr);
  103. CObjectHandler<CFaxOutboundRoutingGroups, IFaxOutboundRoutingGroups> ObjectCreator;
  104. hr = ObjectCreator.GetObject(ppGroups, m_pIFaxServerInner);
  105. if (FAILED(hr))
  106. {
  107. AtlReportError(CLSID_FaxOutboundRouting, GetErrorMsgId(hr), IID_IFaxOutboundRouting, hr);
  108. return hr;
  109. }
  110. return hr;
  111. }