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
2.1 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Declaration of class CFileNode
  3. #ifndef __FILE_NODE__
  4. #define __FILE_NODE__
  5. #include "utils.h"
  6. class CPNode
  7. {
  8. // Construction and Destruction
  9. public:
  10. CPNode(LPCTSTR szName );
  11. virtual ~CPNode();
  12. // Data members
  13. protected:
  14. TCHAR m_szName[MAX_PATH];
  15. TCHAR m_szPath[MAX_PATH];
  16. BOOL m_bRemovable;
  17. CPNode *m_pNext;
  18. // Operations
  19. public:
  20. HRESULT Insert(CPNode* pNewNode);
  21. CPNode* GetNext() const;
  22. HRESULT SetStr( LPTSTR lpszMember, LPCTSTR lpszNew);
  23. HRESULT SetName(LPCTSTR lpszName) { return SetStr( m_szName, lpszName ); };
  24. LPCTSTR GetName() const;
  25. HRESULT SetPath(LPCTSTR lpszPath) { return SetStr( m_szPath, lpszPath ); };
  26. LPCTSTR GetPath() const;
  27. void SetRemovable( BOOL bRemovable ) { m_bRemovable = bRemovable; };
  28. BOOL GetRemovable(void) { return m_bRemovable; };
  29. };
  30. class CPackageNode : public CPNode
  31. {
  32. // Construction and Destruction
  33. public:
  34. CPackageNode(LPCTSTR szName, LPCTSTR szNamespace = NULL, LPCTSTR szPath = NULL);
  35. virtual ~CPackageNode();
  36. // Data members
  37. protected:
  38. TCHAR m_szNamespace[MAX_PATH];
  39. BOOL m_fIsSystemClass;
  40. // Operations
  41. public:
  42. CPackageNode* GetNextPackageNode() const { return (CPackageNode *)m_pNext; };
  43. HRESULT SetNamespace(LPCTSTR lpszNamespace) { return SetStr( m_szNamespace, lpszNamespace ); };
  44. LPCTSTR GetNamespace() const;
  45. HRESULT SetIsSystemClass(BOOL fIsSystemClass) { m_fIsSystemClass = fIsSystemClass; return S_OK; };
  46. BOOL GetIsSystemClass() { return m_fIsSystemClass; };
  47. };
  48. class CFileNode : public CPNode
  49. {
  50. // Construction and Destruction
  51. public:
  52. CFileNode(LPCTSTR szName, LPCTSTR szSection, LPCTSTR szPath = NULL);
  53. virtual ~CFileNode();
  54. // Data members
  55. protected:
  56. TCHAR m_szSection[MAX_PATH];
  57. // Operations
  58. public:
  59. CFileNode* GetNextFileNode() const { return (CFileNode *)m_pNext; };
  60. HRESULT SetSection(LPCTSTR lpszSection) { return SetStr( m_szSection, lpszSection ); };
  61. LPCTSTR GetSection() const;
  62. };
  63. #endif