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.

114 lines
3.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 2002 **/
  4. /**********************************************************************/
  5. /*
  6. root.h
  7. IPSecMon 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 _IPSMHAND_H
  15. #include "ipsmhand.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_MAX
  26. } ROOT_TASKS;
  27. class CRootTasks : public CTaskList
  28. {
  29. public:
  30. HRESULT Init(BOOL bExtension, BOOL bThisMachine, BOOL bNetServices);
  31. private:
  32. CStringArray m_arrayMouseOverBitmaps;
  33. CStringArray m_arrayMouseOffBitmaps;
  34. CStringArray m_arrayTaskText;
  35. CStringArray m_arrayTaskHelp;
  36. };
  37. /*---------------------------------------------------------------------------
  38. Class: CIpsmRootHandler
  39. ---------------------------------------------------------------------------*/
  40. class CIpsmRootHandler : public CIpsmHandler
  41. {
  42. // Interface
  43. public:
  44. CIpsmRootHandler(ITFSComponentData *pCompData);
  45. // Node handler functionality we override
  46. OVERRIDE_NodeHandler_HasPropertyPages();
  47. OVERRIDE_NodeHandler_CreatePropertyPages();
  48. OVERRIDE_NodeHandler_OnAddMenuItems();
  49. OVERRIDE_NodeHandler_OnCommand();
  50. OVERRIDE_NodeHandler_GetString();
  51. // base handler functionality we override
  52. OVERRIDE_BaseHandlerNotify_OnExpand();
  53. OVERRIDE_BaseHandlerNotify_OnPropertyChange();
  54. // Result handler functionality
  55. OVERRIDE_BaseResultHandlerNotify_OnResultSelect();
  56. OVERRIDE_ResultHandler_AddMenuItems();
  57. OVERRIDE_ResultHandler_Command();
  58. OVERRIDE_ResultHandler_OnGetResultViewType();
  59. OVERRIDE_ResultHandler_TaskPadNotify();
  60. OVERRIDE_ResultHandler_EnumTasks();
  61. OVERRIDE_ResultHandler_TaskPadGetTitle();
  62. public:
  63. // helper routines
  64. HRESULT AddServer(LPCWSTR pServerIp,
  65. LPCTSTR pServerName,
  66. BOOL bNewServer,
  67. DWORD dwServerOptions = 0x00000000,
  68. DWORD dwRefreshInterval = 0xffffffff,
  69. BOOL bExtension = FALSE,
  70. DWORD dwLineBuffSize = 0,
  71. DWORD dwPhoneBuffSize = 0
  72. );
  73. BOOL IsServerInList(ITFSNode * pRootNode, LPCTSTR pszNewName);
  74. HRESULT AddServerSortedIp(ITFSNode * pNewNode, BOOL bNewServer);
  75. HRESULT AddServerSortedName(ITFSNode * pNewNode, BOOL bNewServer);
  76. public:
  77. // CIpsmHandler overrides
  78. virtual HRESULT InitializeNode(ITFSNode * pNode);
  79. // Implementation
  80. private:
  81. // Command handlers
  82. HRESULT OnAddMachine(ITFSNode * pNode);
  83. HRESULT OnImportOldList(ITFSNode * pNode);
  84. BOOL OldServerListExists();
  85. // helpers
  86. HRESULT CheckMachine(ITFSNode * pRootNode, LPDATAOBJECT pDataObject);
  87. HRESULT RemoveOldEntries(ITFSNode * pRootNode, LPCTSTR pszAddr);
  88. protected:
  89. CString m_strTaskpadTitle;
  90. BOOL m_bTaskPadView;
  91. };
  92. #endif _ROOT_H