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.

77 lines
2.2 KiB

  1. #ifndef UserNode_h
  2. #define UserNode_h
  3. #include "resource.h"
  4. #include ".\atlsnap.h"
  5. #include <objidl.h>
  6. #include "pop3.h"
  7. #include <P3Admin.h>
  8. class CDomainNode;
  9. //////////////////////////////////////////////////////////////////////////////////
  10. //
  11. // CUserNode
  12. //
  13. //////////////////////////////////////////////////////////////////////////////////
  14. class CUserNode : public CSnapInItemImpl<CUserNode>
  15. {
  16. public:
  17. static const GUID* m_NODETYPE;
  18. static const OLECHAR* m_SZNODETYPE;
  19. static const OLECHAR* m_SZDISPLAY_NAME;
  20. static const CLSID* m_SNAPIN_CLASSID;
  21. CComPtr<IControlbar> m_spControlBar;
  22. BEGIN_SNAPINCOMMAND_MAP(CUserNode, FALSE)
  23. SNAPINCOMMAND_ENTRY ( IDM_USER_TOP_LOCK, OnUserLock )
  24. SNAPINCOMMAND_ENTRY ( IDM_USER_TOP_UNLOCK, OnUserLock )
  25. END_SNAPINCOMMAND_MAP()
  26. CUserNode(IP3User* pUser, CDomainNode* pParent);
  27. virtual ~CUserNode()
  28. {
  29. }
  30. STDMETHOD(QueryPagesFor)(DATA_OBJECT_TYPES type)
  31. {
  32. if ( type == CCT_RESULT )
  33. {
  34. return S_OK;
  35. }
  36. return S_FALSE;
  37. }
  38. STDMETHOD(GetScopePaneInfo)(SCOPEDATAITEM *pScopeDataItem);
  39. STDMETHOD(GetResultPaneInfo)(RESULTDATAITEM *pResultDataItem);
  40. STDMETHOD(Notify)( MMC_NOTIFY_TYPE event,
  41. LPARAM arg,
  42. LPARAM param,
  43. IComponentData* pComponentData,
  44. IComponent* pComponent,
  45. DATA_OBJECT_TYPES type);
  46. LPOLESTR GetResultPaneColInfo(int nCol);
  47. // MenuItem Implementations
  48. STDMETHOD(AddMenuItems) (LPCONTEXTMENUCALLBACK piCallback, long* pInsertionAllowed, DATA_OBJECT_TYPES type );
  49. STDMETHOD(OnUserLock) (bool& bHandled, CSnapInObjectRootBase* pObj );
  50. private:
  51. // User Information
  52. CComPtr<IP3User> m_spUser;
  53. // Parent Information
  54. CDomainNode* m_pParent;
  55. // Column text needs to be allocated by us, so we'll free them in the destructor
  56. CComBSTR m_bstrSize;
  57. CComBSTR m_bstrNumMessages;
  58. CComBSTR m_bstrState;
  59. };
  60. #endif // UserNode_h