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.

148 lines
4.8 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : OutboundDevice.h //
  3. // //
  4. // DESCRIPTION : Header file for the Outbound Routing Device node. //
  5. // //
  6. // AUTHOR : yossg //
  7. // //
  8. // HISTORY : //
  9. // Dec 23 1999 yossg Create //
  10. // //
  11. // Copyright (C) 1999 Microsoft Corporation All Rights Reserved //
  12. /////////////////////////////////////////////////////////////////////////////
  13. #ifndef H_FAXOUTBOUNDROUTINGDEVICE_H
  14. #define H_FAXOUTBOUNDROUTINGDEVICE_H
  15. #include "snapin.h"
  16. #include "snpnode.h"
  17. #include "Icons.h"
  18. //#include "ppFaxInboundRoutingMethodGeneral.h"
  19. //class CppFaxInboundRoutingMethod;
  20. class CFaxOutboundRoutingGroupNode;
  21. class CFaxOutboundRoutingDeviceNode : public CSnapinNode <CFaxOutboundRoutingDeviceNode, FALSE>
  22. {
  23. public:
  24. BEGIN_SNAPINCOMMAND_MAP(CFaxOutboundRoutingDeviceNode, FALSE)
  25. SNAPINCOMMAND_ENTRY(IDM_MOVEUP, OnMoveUp)
  26. SNAPINCOMMAND_ENTRY(IDM_MOVEDOWN, OnMoveDown)
  27. SNAPINCOMMAND_ENTRY(ID_MOVEUP_BUTTON, OnMoveUp)
  28. SNAPINCOMMAND_ENTRY(ID_MOVEDOWN_BUTTON, OnMoveDown)
  29. END_SNAPINCOMMAND_MAP()
  30. BEGIN_SNAPINTOOLBARID_MAP(CFaxOutboundRoutingDeviceNode)
  31. SNAPINTOOLBARID_ENTRY(IDR_TOOLBAR_DEVICE_UD)
  32. END_SNAPINTOOLBARID_MAP()
  33. SNAPINMENUID(IDR_OUTDEVICE_MENU)
  34. //
  35. // Constructor
  36. //
  37. CFaxOutboundRoutingDeviceNode (CSnapInItem * pParentNode, CSnapin * pComponentData) :
  38. CSnapinNode<CFaxOutboundRoutingDeviceNode, FALSE>(pParentNode, pComponentData )
  39. {
  40. // for any case of ERROR_BAD_UNIT - device not found
  41. m_bstrDeviceName = L"???";
  42. m_bstrDescription = L"???";
  43. m_bstrDescription = L"???";
  44. m_fIsChildOfAllDevicesGroup = FALSE;
  45. }
  46. //
  47. // Destructor
  48. //
  49. ~CFaxOutboundRoutingDeviceNode()
  50. {
  51. }
  52. LPOLESTR GetResultPaneColInfo(int nCol);
  53. void InitParentNode(CFaxOutboundRoutingGroupNode *pParentNode)
  54. {
  55. m_pParentNode = pParentNode;
  56. }
  57. STDMETHOD(QueryPagesFor)(DATA_OBJECT_TYPES type)
  58. {
  59. if (type == CCT_SCOPE || type == CCT_RESULT)
  60. return S_OK;
  61. return S_FALSE;
  62. }
  63. virtual HRESULT SetVerbs(IConsoleVerb *pConsoleVerb);
  64. virtual HRESULT OnDelete(LPARAM arg,
  65. LPARAM param,
  66. IComponentData *pComponentData,
  67. IComponent *pComponent,
  68. DATA_OBJECT_TYPES type,
  69. BOOL fSilent = FALSE);
  70. VOID SetOrder(UINT uiNewOrder) { m_uiOrder = uiNewOrder; return; }
  71. VOID SetOrder(UINT uiNewOrder, UINT uiNewMaxOrder);
  72. HRESULT ReselectItemInView(IConsole *pConsole);
  73. HRESULT Init(DWORD dwDeviceID,
  74. UINT uiOrd,
  75. UINT uiMaxOrd,
  76. CFaxOutboundRoutingGroupNode * pParentNode);
  77. VOID MarkAsChildOfAllDevicesGroup() {m_fIsChildOfAllDevicesGroup = TRUE;}
  78. void UpdateMenuState (UINT id, LPTSTR pBuf, UINT *flags);
  79. BOOL UpdateToolbarButton(UINT id, BYTE fsState);
  80. HRESULT OnShowContextHelp(
  81. IDisplayHelp* pDisplayHelp, LPOLESTR helpFile);
  82. private:
  83. //
  84. // Parent Node
  85. //
  86. CFaxOutboundRoutingGroupNode * m_pParentNode;
  87. //
  88. // members
  89. //
  90. DWORD m_dwDeviceID;
  91. UINT m_uiOrder;
  92. CComBSTR m_bstrDeviceName;
  93. CComBSTR m_bstrDescription;
  94. CComBSTR m_bstrProviderName;
  95. UINT m_uiMaxOrder;
  96. BOOL m_fIsChildOfAllDevicesGroup;
  97. CComBSTR m_buf;
  98. //
  99. // Menu item handlers
  100. //
  101. HRESULT OnMoveUp (bool &bHandled, CSnapInObjectRootBase *pRoot);
  102. HRESULT OnMoveDown(bool &bHandled, CSnapInObjectRootBase *pRoot);
  103. //
  104. // Init
  105. //
  106. HRESULT InitRPC (PFAX_PORT_INFO_EX * pFaxDeviceConfig);
  107. HRESULT InitMembers (PFAX_PORT_INFO_EX * pFaxDeviceConfig,
  108. DWORD dwDeviceID,
  109. UINT uiOrd,
  110. UINT uiMaxOrd);
  111. };
  112. //typedef CSnapinNode<CFaxOutboundRoutingDeviceNode, FALSE> CBaseFaxInboundRoutingMethodNode;
  113. #endif H_FAXOUTBOUNDROUTINGDEVICE_H