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.

117 lines
3.8 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : Devices.h //
  3. // //
  4. // DESCRIPTION : Header file for CFaxDevicesNode class //
  5. // This is the "Fax" node in the scope pane. //
  6. // //
  7. // AUTHOR : yossg //
  8. // //
  9. // HISTORY : //
  10. // Sep 22 1999 yossg create //
  11. // Dec 1 1999 yossg Change totaly for New Mockup (0.7) //
  12. // Aug 3 2000 yossg Add Device status real-time notification //
  13. // Windows XP //
  14. // Feb 14 2001 yossg Add Manual Receive support //
  15. // //
  16. // Copyright (C) 1999 - 2000 Microsoft Corporation All Rights Reserved //
  17. /////////////////////////////////////////////////////////////////////////////
  18. #ifndef H_DEVICES_H
  19. #define H_DEVICES_H
  20. #include "snapin.h"
  21. #include "snpnscp.h" //#include "snpnode.h"
  22. class CFaxDevicesAndProvidersNode;
  23. class CFaxDevicesNode : public CNodeWithScopeChildrenList<CFaxDevicesNode, FALSE>
  24. {
  25. public:
  26. BEGIN_SNAPINCOMMAND_MAP(CFaxDevicesNode, FALSE)
  27. END_SNAPINCOMMAND_MAP()
  28. BEGIN_SNAPINTOOLBARID_MAP(CFaxDevicesNode)
  29. END_SNAPINTOOLBARID_MAP()
  30. CFaxDevicesNode(CSnapInItem * pParentNode, CSnapin * pComponentData) :
  31. CNodeWithScopeChildrenList<CFaxDevicesNode, FALSE>(pParentNode, pComponentData )
  32. {
  33. m_pFaxDevicesConfig = NULL;
  34. m_dwNumOfDevices = FXS_ITEMS_NEVER_COUNTED;
  35. m_bIsCollectingDeviceNotification = FALSE;
  36. }
  37. ~CFaxDevicesNode()
  38. {
  39. if (m_pFaxDevicesConfig)
  40. {
  41. FaxFreeBuffer(m_pFaxDevicesConfig);
  42. }
  43. }
  44. //
  45. // get data from RPC
  46. //
  47. HRESULT InitRPC();
  48. //
  49. // MMC functions
  50. //
  51. virtual HRESULT PopulateScopeChildrenList();
  52. virtual HRESULT InsertColumns(IHeaderCtrl* pHeaderCtrl);
  53. virtual HRESULT SetVerbs(IConsoleVerb *pConsoleVerb);
  54. // virtual
  55. HRESULT OnPropertyChange(
  56. LPARAM arg
  57. , LPARAM param
  58. , IComponentData * pComponentData
  59. , IComponent * pComponent
  60. , DATA_OBJECT_TYPES type
  61. );
  62. // virtual
  63. HRESULT OnRefresh(LPARAM arg,
  64. LPARAM param,
  65. IComponentData *pComponentData,
  66. IComponent * pComponent,
  67. DATA_OBJECT_TYPES type);
  68. void InitParentNode(CFaxDevicesAndProvidersNode *pParentNode)
  69. {
  70. m_pParentNode = pParentNode;
  71. }
  72. HRESULT DoRefresh();
  73. HRESULT InitDisplayName();
  74. HRESULT RepopulateScopeChildrenList();
  75. HRESULT UpdateDeviceStatusChange( DWORD dwDeviceId, DWORD dwNewStatus);
  76. HRESULT OnShowContextHelp(
  77. IDisplayHelp* pDisplayHelp, LPOLESTR helpFile);
  78. private:
  79. static CColumnsInfo m_ColsInfo;
  80. CFaxDevicesAndProvidersNode * m_pParentNode;
  81. PFAX_PORT_INFO_EX m_pFaxDevicesConfig;
  82. DWORD m_dwNumOfDevices;
  83. BOOL m_bIsCollectingDeviceNotification;
  84. HRESULT UpdateTheView();
  85. };
  86. typedef CNodeWithScopeChildrenList<CFaxDevicesNode, FALSE>
  87. CBaseFaxDevicesNode;
  88. #endif //H_DEVICES_H