Source code of Windows XP (NT5)
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.

119 lines
3.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. root.h
  7. TAPI root node information (the root node is not displayed
  8. in the MMC framework but contains information such as
  9. all of the servers in this snapin).
  10. FILE HISTORY:
  11. */
  12. #ifndef _ROOT_H
  13. #define _ROOT_H
  14. #ifndef _TAPIHAND_H
  15. #include "tapihand.h"
  16. #endif
  17. #ifndef _TASK_H
  18. #include <task.h>
  19. #endif
  20. #define COMPUTERNAME_LEN_MAX 255
  21. typedef enum _ROOT_TASKS
  22. {
  23. ROOT_TASK_GETTING_STARTED,
  24. ROOT_TASK_ADD_SERVER,
  25. ROOT_TASK_MANAGE_TAPI,
  26. ROOT_TASK_LAUNCH_TAPI,
  27. ROOT_TASK_MAX
  28. } ROOT_TASKS;
  29. class CRootTasks : public CTaskList
  30. {
  31. public:
  32. HRESULT Init(BOOL bExtension, BOOL bThisMachine, BOOL bNetServices);
  33. private:
  34. CStringArray m_arrayMouseOverBitmaps;
  35. CStringArray m_arrayMouseOffBitmaps;
  36. CStringArray m_arrayTaskText;
  37. CStringArray m_arrayTaskHelp;
  38. };
  39. /*---------------------------------------------------------------------------
  40. Class: CTapiRootHandler
  41. ---------------------------------------------------------------------------*/
  42. class CTapiRootHandler : public CTapiHandler
  43. {
  44. // Interface
  45. public:
  46. CTapiRootHandler(ITFSComponentData *pCompData);
  47. // Node handler functionality we override
  48. OVERRIDE_NodeHandler_HasPropertyPages();
  49. OVERRIDE_NodeHandler_CreatePropertyPages();
  50. OVERRIDE_NodeHandler_OnAddMenuItems();
  51. OVERRIDE_NodeHandler_OnCommand();
  52. OVERRIDE_NodeHandler_GetString();
  53. // base handler functionality we override
  54. OVERRIDE_BaseHandlerNotify_OnExpand();
  55. OVERRIDE_BaseHandlerNotify_OnPropertyChange();
  56. // Result handler functionality
  57. OVERRIDE_BaseResultHandlerNotify_OnResultSelect();
  58. OVERRIDE_ResultHandler_AddMenuItems();
  59. OVERRIDE_ResultHandler_Command();
  60. OVERRIDE_ResultHandler_OnGetResultViewType();
  61. OVERRIDE_ResultHandler_TaskPadNotify();
  62. OVERRIDE_ResultHandler_EnumTasks();
  63. OVERRIDE_ResultHandler_TaskPadGetTitle();
  64. public:
  65. // helper routines
  66. void CreateLocalTapiServer();
  67. HRESULT AddServer(LPCWSTR pServerIp,
  68. LPCTSTR pServerName,
  69. BOOL bNewServer,
  70. DWORD dwServerOptions = 0x00000000,
  71. DWORD dwRefreshInterval = 0xffffffff,
  72. BOOL bExtension = FALSE,
  73. DWORD dwLineBuffSize = 0,
  74. DWORD dwPhoneBuffSize = 0
  75. );
  76. HRESULT GetGroupName(CString * pstrGroupName);
  77. HRESULT SetGroupName(LPCTSTR pszGroupName);
  78. BOOL IsServerInList(ITFSNode * pRootNode, LPCTSTR pszNewName);
  79. HRESULT AddServerSortedIp(ITFSNode * pNewNode, BOOL bNewServer);
  80. HRESULT AddServerSortedName(ITFSNode * pNewNode, BOOL bNewServer);
  81. public:
  82. // CTapiHandler overrides
  83. virtual HRESULT InitializeNode(ITFSNode * pNode);
  84. // Implementation
  85. private:
  86. // Command handlers
  87. HRESULT OnAddMachine(ITFSNode * pNode);
  88. HRESULT OnImportOldList(ITFSNode * pNode);
  89. BOOL OldServerListExists();
  90. // helpers
  91. HRESULT CheckMachine(ITFSNode * pRootNode, LPDATAOBJECT pDataObject);
  92. HRESULT RemoveOldEntries(ITFSNode * pRootNode, LPCTSTR pszAddr);
  93. protected:
  94. CString m_strTaskpadTitle;
  95. BOOL m_bTaskPadView;
  96. };
  97. #endif _ROOT_H