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.

115 lines
4.0 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : OutboundRules.h //
  3. // //
  4. // DESCRIPTION : Header file for the Fax Outbound Routing Rules Node //
  5. // //
  6. // AUTHOR : yossg //
  7. // //
  8. // HISTORY : //
  9. // Sep 29 1999 yossg Create //
  10. // Dec 24 1999 yossg Reogenize as node with result children list //
  11. // Dec 30 1999 yossg create ADD/REMOVE rule //
  12. // //
  13. // Copyright (C) 1999 Microsoft Corporation All Rights Reserved //
  14. /////////////////////////////////////////////////////////////////////////////
  15. #ifndef H_FAXOUTBOUNDROUTINGRULES_H
  16. #define H_FAXOUTBOUNDROUTINGRULES_H
  17. #include "snapin.h"
  18. #include "snpnres.h"
  19. #include "OutboundRule.h"
  20. class CFaxOutboundRoutingNode;
  21. class CFaxOutboundRoutingRuleNode;
  22. class CFaxOutboundRoutingRulesNode : public CNodeWithResultChildrenList<
  23. CFaxOutboundRoutingRulesNode,
  24. CFaxOutboundRoutingRuleNode,
  25. CSimpleArray<CFaxOutboundRoutingRuleNode*>,
  26. FALSE>
  27. {
  28. public:
  29. BEGIN_SNAPINCOMMAND_MAP(CFaxOutboundRoutingRuleNode, FALSE)
  30. SNAPINCOMMAND_ENTRY(IDM_NEW_OUTRULE, OnNewRule)
  31. END_SNAPINCOMMAND_MAP()
  32. BEGIN_SNAPINTOOLBARID_MAP(CFaxOutboundRoutingRuleNode)
  33. END_SNAPINTOOLBARID_MAP()
  34. SNAPINMENUID(IDR_OUTRULES_MENU)
  35. //
  36. // Constructor
  37. //
  38. CFaxOutboundRoutingRulesNode(CSnapInItem * pParentNode, CSnapin * pComponentData) :
  39. CNodeWithResultChildrenList<CFaxOutboundRoutingRulesNode, CFaxOutboundRoutingRuleNode, CSimpleArray<CFaxOutboundRoutingRuleNode*>, FALSE>(pParentNode, pComponentData )
  40. {
  41. m_dwNumOfOutboundRules = 0;
  42. }
  43. //
  44. // Destructor
  45. //
  46. ~CFaxOutboundRoutingRulesNode()
  47. {
  48. }
  49. //
  50. // get data from RPC
  51. //
  52. HRESULT InitRPC(PFAX_OUTBOUND_ROUTING_RULE *pFaxRulesConfig);
  53. virtual HRESULT PopulateResultChildrenList();
  54. virtual HRESULT InsertColumns(IHeaderCtrl *pHeaderCtrl);
  55. virtual HRESULT SetVerbs(IConsoleVerb *pConsoleVerb);
  56. void InitParentNode(CFaxOutboundRoutingNode *pParentNode)
  57. {
  58. m_pParentNode = pParentNode;
  59. }
  60. virtual HRESULT OnRefresh(LPARAM arg,
  61. LPARAM param,
  62. IComponentData *pComponentData,
  63. IComponent * pComponent,
  64. DATA_OBJECT_TYPES type);
  65. HRESULT DoRefresh(CSnapInObjectRootBase *pRoot);
  66. STDMETHOD(QueryPagesFor)(DATA_OBJECT_TYPES type)
  67. {
  68. if (type == CCT_SCOPE || type == CCT_RESULT)
  69. return S_OK;
  70. return S_FALSE;
  71. }
  72. HRESULT InitDisplayName();
  73. HRESULT DeleteRule(DWORD dwAreaCode, DWORD dwCountryCode,
  74. CFaxOutboundRoutingRuleNode *pChildNode);
  75. HRESULT OnNewRule (bool &bHandled, CSnapInObjectRootBase *pRoot);
  76. HRESULT OnShowContextHelp(
  77. IDisplayHelp* pDisplayHelp, LPOLESTR helpFile);
  78. private:
  79. static CColumnsInfo m_ColsInfo;
  80. DWORD m_dwNumOfOutboundRules;
  81. CFaxOutboundRoutingNode * m_pParentNode;
  82. };
  83. typedef CNodeWithResultChildrenList<CFaxOutboundRoutingRulesNode, CFaxOutboundRoutingRuleNode, CSimpleArray<CFaxOutboundRoutingRuleNode*>, FALSE>
  84. CBaseFaxOutboundRulesNode;
  85. #endif //H_FAXOUTBOUNDROUTINGRULES_H