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.

69 lines
1.8 KiB

  1. /*++
  2. Copyright (C) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. smnode.h
  5. Abstract:
  6. Base class representing a node in the MMC user interface.
  7. --*/
  8. #ifndef _CLASS_SMNODE_
  9. #define _CLASS_SMNODE_
  10. class CSmNode;
  11. class CSmRootNode;
  12. class CSmLogService;
  13. class CSmCounterLogService;
  14. class CSmTraceLogService;
  15. class CSmAlertService;
  16. class CSmNode
  17. {
  18. // constructor/destructor
  19. public:
  20. CSmNode();
  21. virtual ~CSmNode();
  22. // public methods
  23. public:
  24. const CString& GetDisplayName( void );
  25. const CString& GetMachineName( void );
  26. const CString& GetMachineDisplayName( void );
  27. const CString& GetDescription( void );
  28. const CString& GetType( void );
  29. DWORD SetMachineName( const CString& );
  30. BOOL IsLocalMachine ( void );
  31. virtual CSmRootNode* CastToRootNode( void ) { return NULL; };
  32. virtual CSmLogService* CastToLogService( void ) { return NULL; };
  33. virtual CSmCounterLogService* CastToCounterLogService( void ) { return NULL; };
  34. virtual CSmTraceLogService* CastToTraceLogService( void ) { return NULL; };
  35. virtual CSmAlertService* CastToAlertService( void ) { return NULL; };
  36. protected:
  37. DWORD SetDisplayName( const CString& );
  38. void SetDescription( const CString& ); // Throws exception on error
  39. DWORD SetType( const CString& );
  40. private:
  41. CString m_strName;
  42. CString m_strMachineName;
  43. CString m_strMachineDisplayName;
  44. CString m_strDesc;
  45. CString m_strType;
  46. CSmNode* m_pParentNode;
  47. };
  48. typedef CSmNode SMNODE;
  49. typedef CSmNode* PSMNODE;
  50. #endif //_CLASS_SMNODE_