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.

59 lines
2.0 KiB

  1. #pragma once
  2. #include "delebase.h"
  3. #include <map>
  4. using namespace std;
  5. class CUDDISiteNode;
  6. typedef map<int, CDelegationBase*> CChildMap;
  7. typedef pair<int, CDelegationBase*> CChildMapEntry;
  8. class CUDDIServicesNode : public CDelegationBase
  9. {
  10. public:
  11. CUDDIServicesNode();
  12. virtual ~CUDDIServicesNode();
  13. virtual const _TCHAR *GetDisplayName( int nCol = 0 );
  14. virtual const GUID & getNodeType() { return thisGuid; }
  15. virtual const int GetBitmapIndex() { return INDEX_UDDISERVICES; }
  16. virtual BOOL ChildExists( const WCHAR *pwszName );
  17. virtual BOOL IsDirty();
  18. virtual HRESULT Load( IStream *pStm );
  19. virtual HRESULT Save( IStream *pStm, BOOL fClearDirty );
  20. virtual ULONG GetSizeMax();
  21. public:
  22. //
  23. // Virtual functions go here (for MMCN_*)
  24. //
  25. virtual HRESULT OnExpand( IConsoleNameSpace *pConsoleNameSpace, IConsole *pConsole, HSCOPEITEM parent );
  26. virtual HRESULT OnShowContextHelp( IDisplayHelp *m_ipDisplayHelp, LPOLESTR helpFile );
  27. virtual HRESULT OnShow( IConsole *pConsole, BOOL bShow, HSCOPEITEM scopeitem );
  28. virtual HRESULT OnAddMenuItems( IContextMenuCallback *pContextMenuCallback, long *pInsertionsAllowed );
  29. virtual HRESULT OnMenuCommand( IConsole *pConsole, IConsoleNameSpace *pConsoleNameSpace, long lCommandID, IDataObject *pDataObject );
  30. virtual HRESULT OnRefresh( IConsole *pConsole );
  31. virtual HRESULT OnSelect( CComponent *pComponent, IConsole *pConsole, BOOL bScope, BOOL bSelect );
  32. virtual HRESULT RemoveChildren( IConsoleNameSpace *pNS );
  33. void SetRemoteComputerName( LPCTSTR szRemoteComputerName );
  34. LPCTSTR GetRemoteComputerName();
  35. CDelegationBase* FindChild( LPCTSTR szName );
  36. private:
  37. BOOL LoadUDDISites( HWND hwndConsole, const tstring& szComputerName );
  38. BOOL SaveUDDISites();
  39. void ClearChildMap();
  40. private:
  41. CChildMap m_mapChildren;
  42. LONG_PTR m_ppHandle;
  43. BOOL m_bIsDirty;
  44. tstring m_strDisplayName;
  45. tstring m_strRemoteComputerName;
  46. enum menuItems { IDM_NEW_DBSERVER = 1 };
  47. static const GUID thisGuid;
  48. };