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.

74 lines
1.5 KiB

  1. #ifndef _BASENODE_H
  2. #define _BASENODE_H
  3. #include<mmc.h>
  4. static const GUID GUID_MainNode = { /* 94759c36-36ec-46bf-b63a-613013ed1162 */
  5. 0x94759c36,
  6. 0x36ec,
  7. 0x46bf,
  8. {0xb6, 0x3a, 0x61, 0x30, 0x13, 0xed, 0x11, 0x62}
  9. };
  10. enum nodeType
  11. { MAIN_NODE = 1 , CONNECTION_NODE, UNDEF_NODE };
  12. class CBaseNode :
  13. public IDataObject
  14. {
  15. ULONG m_cref;
  16. nodeType m_nNodeType;
  17. public:
  18. CBaseNode( );
  19. virtual ~CBaseNode( ) { }
  20. STDMETHOD( QueryInterface )( REFIID , PVOID * );
  21. STDMETHOD_( ULONG , AddRef )( );
  22. STDMETHOD_( ULONG , Release )( );
  23. // IDataObject
  24. STDMETHOD( GetData )( LPFORMATETC , LPSTGMEDIUM );
  25. STDMETHOD( GetDataHere )( LPFORMATETC , LPSTGMEDIUM );
  26. STDMETHOD( QueryGetData )( LPFORMATETC );
  27. STDMETHOD( GetCanonicalFormatEtc )( LPFORMATETC , LPFORMATETC );
  28. STDMETHOD( SetData )( LPFORMATETC , LPSTGMEDIUM , BOOL );
  29. STDMETHOD( EnumFormatEtc )( DWORD , LPENUMFORMATETC * );
  30. STDMETHOD( DAdvise )( LPFORMATETC , ULONG , LPADVISESINK , PULONG );
  31. STDMETHOD( DUnadvise )( DWORD );
  32. STDMETHOD( EnumDAdvise )( LPENUMSTATDATA * );
  33. // BaseNode methods are left to the derived object
  34. void SetNodeType( nodeType nNodeType )
  35. {
  36. m_nNodeType = nNodeType;
  37. }
  38. nodeType GetNodeType( void )
  39. {
  40. return m_nNodeType;
  41. }
  42. virtual BOOL AddMenuItems( LPCONTEXTMENUCALLBACK , PLONG ) { return FALSE; }
  43. virtual DWORD GetImageIdx( ){ return 0; }
  44. };
  45. #endif // _BASENODE_H