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.

104 lines
2.9 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. reppart.h
  7. WINS replication partners node information.
  8. FILE HISTORY:
  9. */
  10. #ifndef _REPPART_H
  11. #define _REPPART_H
  12. #ifndef _WINSHAND_H
  13. #include "winshand.h"
  14. #endif
  15. class CWinsServerObj;
  16. class CIpNamePair;
  17. #ifndef _TREGKEY_H
  18. #include "tregkey.h"
  19. #endif
  20. #ifndef _SERVER_H
  21. #include "server.h"
  22. #endif
  23. typedef CArray<CWinsServerObj, CWinsServerObj> RepPartnersArray;
  24. /*---------------------------------------------------------------------------
  25. Class: CReplicationPartnersHandler
  26. ---------------------------------------------------------------------------*/
  27. class CReplicationPartnersHandler : public CWinsHandler
  28. {
  29. // Interface
  30. public:
  31. CReplicationPartnersHandler(ITFSComponentData *pCompData);
  32. // base handler functionality we override
  33. OVERRIDE_NodeHandler_HasPropertyPages();
  34. OVERRIDE_NodeHandler_CreatePropertyPages();
  35. OVERRIDE_NodeHandler_OnAddMenuItems();
  36. OVERRIDE_NodeHandler_OnCommand();
  37. OVERRIDE_BaseHandlerNotify_OnCreateNodeId2();
  38. OVERRIDE_ResultHandler_CompareItems();
  39. STDMETHODIMP_(LPCTSTR) GetString(ITFSNode * pNode, int nCol);
  40. // helper routines
  41. HRESULT GetGroupName(CString * pstrGroupName);
  42. HRESULT SetGroupName(LPCTSTR pszGroupName);
  43. public:
  44. // CWinsHandler overrides
  45. virtual HRESULT InitializeNode(ITFSNode * pNode);
  46. OVERRIDE_BaseHandlerNotify_OnPropertyChange();
  47. OVERRIDE_BaseHandlerNotify_OnExpand();
  48. OVERRIDE_BaseResultHandlerNotify_OnResultSelect();
  49. OVERRIDE_BaseResultHandlerNotify_OnResultRefresh();
  50. OVERRIDE_BaseResultHandlerNotify_OnResultDelete();
  51. OVERRIDE_ResultHandler_OnGetResultViewType();
  52. HRESULT Load(ITFSNode * pNode);
  53. HRESULT Store(ITFSNode * pNode);
  54. void GetServerName(ITFSNode * pNode,CString &strName);
  55. int IsInList(const CIpNamePair & inpTarget, BOOL bBoth = TRUE ) const;
  56. HRESULT CreateNodes(ITFSNode * pNode);
  57. HRESULT OnReplicateNow(ITFSNode * pNode);
  58. HRESULT OnCreateRepPartner(ITFSNode * pNode);
  59. HRESULT OnRefreshNode(ITFSNode * spNode, LPDATAOBJECT pDataObject);
  60. HRESULT RemoveChildren(ITFSNode * pNode);
  61. DWORD UpdateReg(ITFSNode * pNode, CWinsServerObj * ws);
  62. DWORD AddRegEntry(ITFSNode * pNode, CWinsServerObj & ws);
  63. HRESULT HandleResultMessage(ITFSNode * pNode);
  64. public:
  65. RepPartnersArray m_RepPartnersArray;
  66. typedef CString REGKEYNAME;
  67. //
  68. // Registry Names
  69. //
  70. static const REGKEYNAME lpstrPullRoot;
  71. static const REGKEYNAME lpstrPushRoot;
  72. static const REGKEYNAME lpstrNetBIOSName;
  73. static const REGKEYNAME lpstrPersistence;
  74. // Implementation
  75. private:
  76. CString m_strDescription;
  77. };
  78. #endif _REPPART_H