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.

70 lines
2.1 KiB

  1. #ifndef RootNode_h
  2. #define RootNode_h
  3. #include "resource.h"
  4. #include <atlsnap.h>
  5. #include <objidl.h>
  6. #include "pop3.h"
  7. #include <P3Admin.h>
  8. class CServerNode;
  9. typedef std::list<CServerNode*> SERVERLIST;
  10. //////////////////////////////////////////////////////////////////////////////////
  11. //
  12. // CRootNode
  13. //
  14. //////////////////////////////////////////////////////////////////////////////////
  15. class CRootNode : public CSnapInItemImpl<CRootNode>
  16. {
  17. public:
  18. static const GUID* m_NODETYPE;
  19. static const OLECHAR* m_SZNODETYPE;
  20. static const OLECHAR* m_SZDISPLAY_NAME;
  21. static const CLSID* m_SNAPIN_CLASSID;
  22. CComPtr<IControlbar> m_spControlBar;
  23. BEGIN_SNAPINCOMMAND_MAP(CRootNode, FALSE)
  24. SNAPINCOMMAND_ENTRY( IDM_POP3_TOP_CONNECT, OnConnect )
  25. END_SNAPINCOMMAND_MAP()
  26. CRootNode();
  27. virtual ~CRootNode();
  28. STDMETHOD(QueryPagesFor)(DATA_OBJECT_TYPES type)
  29. {
  30. if ( type == CCT_SCOPE || type == CCT_RESULT )
  31. {
  32. return S_OK;
  33. }
  34. return S_FALSE;
  35. }
  36. STDMETHOD(GetScopePaneInfo)(SCOPEDATAITEM *pScopeDataItem);
  37. STDMETHOD(GetResultPaneInfo)(RESULTDATAITEM *pResultDataItem);
  38. STDMETHOD(GetResultViewType)( LPOLESTR* ppViewType, long* pViewOptions );
  39. STDMETHOD(Notify)( MMC_NOTIFY_TYPE event,
  40. LPARAM arg,
  41. LPARAM param,
  42. IComponentData* pComponentData,
  43. IComponent* pComponent,
  44. DATA_OBJECT_TYPES type);
  45. // MenuItem Implementations
  46. STDMETHOD(AddMenuItems) (LPCONTEXTMENUCALLBACK piCallback, long* pInsertionAllowed, DATA_OBJECT_TYPES type );
  47. STDMETHOD(OnConnect) (bool& bHandled, CSnapInObjectRootBase* pObj );
  48. // IPersistStream Implementations
  49. STDMETHOD(Load) (IStream *pStream);
  50. STDMETHOD(Save) (IStream *pStream);
  51. public:
  52. // Public function for children to delete themselves
  53. HRESULT DeleteServer(CServerNode* pServerNode);
  54. private:
  55. SERVERLIST m_lServers;
  56. };
  57. #endif // RootNode_h