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.

120 lines
3.6 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. OVERRIDE_BaseHandlerNotify_OnRemoveChildren();
  57. // Result handler functionality
  58. OVERRIDE_BaseResultHandlerNotify_OnResultSelect();
  59. OVERRIDE_ResultHandler_AddMenuItems();
  60. OVERRIDE_ResultHandler_Command();
  61. OVERRIDE_ResultHandler_OnGetResultViewType();
  62. OVERRIDE_ResultHandler_TaskPadNotify();
  63. OVERRIDE_ResultHandler_EnumTasks();
  64. OVERRIDE_ResultHandler_TaskPadGetTitle();
  65. public:
  66. // helper routines
  67. void CreateLocalTapiServer();
  68. HRESULT AddServer(LPCWSTR pServerIp,
  69. LPCTSTR pServerName,
  70. BOOL bNewServer,
  71. DWORD dwServerOptions = 0x00000000,
  72. DWORD dwRefreshInterval = 0xffffffff,
  73. BOOL bExtension = FALSE,
  74. DWORD dwLineBuffSize = 0,
  75. DWORD dwPhoneBuffSize = 0
  76. );
  77. HRESULT GetGroupName(CString * pstrGroupName);
  78. HRESULT SetGroupName(LPCTSTR pszGroupName);
  79. BOOL IsServerInList(ITFSNode * pRootNode, LPCTSTR pszNewName);
  80. HRESULT AddServerSortedIp(ITFSNode * pNewNode, BOOL bNewServer);
  81. HRESULT AddServerSortedName(ITFSNode * pNewNode, BOOL bNewServer);
  82. public:
  83. // CTapiHandler overrides
  84. virtual HRESULT InitializeNode(ITFSNode * pNode);
  85. // Implementation
  86. private:
  87. // Command handlers
  88. HRESULT OnAddMachine(ITFSNode * pNode);
  89. HRESULT OnImportOldList(ITFSNode * pNode);
  90. BOOL OldServerListExists();
  91. // helpers
  92. HRESULT CheckMachine(ITFSNode * pRootNode, LPDATAOBJECT pDataObject);
  93. HRESULT RemoveOldEntries(ITFSNode * pRootNode, LPCTSTR pszAddr);
  94. protected:
  95. CString m_strTaskpadTitle;
  96. BOOL m_bTaskPadView;
  97. };
  98. #endif _ROOT_H