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.

86 lines
2.1 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. rtrstrm.h
  7. Root node configuration data.
  8. Use this to get/set configuration data. This class will take
  9. care of versioning of config formats as well as serializing
  10. of the data.
  11. FILE HISTORY:
  12. */
  13. #ifndef _RTRSTRM_H
  14. #define _RTRSTRM_H
  15. #ifndef _XSTREAM_H
  16. #include "xstream.h"
  17. #endif
  18. #ifndef _IFADMIN_H
  19. #include "ifadmin.h"
  20. #endif
  21. #ifndef _COLUMN_H
  22. #include "column.h"
  23. #endif
  24. enum RTRSTRM_TAG
  25. {
  26. RTRSTRM_TAG_VERSION = XFER_TAG(1, XFER_DWORD),
  27. RTRSTRM_TAG_VERSIONADMIN = XFER_TAG(2, XFER_DWORD),
  28. RTRSTRM_TAG_SERVER = XFER_TAG(3, XFER_DWORD) ,
  29. RTRSTRM_TAG_NAME = XFER_TAG(4, XFER_STRING),
  30. RTRSTRM_TAG_OVERRIDE = XFER_TAG(5, XFER_DWORD),
  31. };
  32. class RouterAdminConfigStream : public ConfigStream
  33. {
  34. public:
  35. RouterAdminConfigStream();
  36. HRESULT InitNew(); // set defaults
  37. HRESULT SaveTo(IStream *pstm);
  38. HRESULT SaveAs(UINT nVersion, IStream *pstm);
  39. HRESULT LoadFrom(IStream *pstm);
  40. HRESULT GetSize(ULONG *pcbSize);
  41. BOOL GetDirty() { return m_fDirty; }
  42. void SetDirty(BOOL fDirty) { m_fDirty = fDirty; };
  43. // --------------------------------------------------------
  44. // Accessors
  45. // --------------------------------------------------------
  46. HRESULT GetVersionInfo(DWORD *pnVersion, DWORD *pnAdminVersion);
  47. HRESULT GetLocationInfo(BOOL *pfServer, CString *pstName, BOOL *pfOverride);
  48. HRESULT SetLocationInfo(BOOL fServer, LPCTSTR pszName, BOOL fOverride);
  49. private:
  50. DWORD m_nVersionAdmin;
  51. DWORD m_nVersion;
  52. DWORD m_fServer;
  53. DWORD m_fOverride;
  54. CString m_stName;
  55. BOOL m_fDirty;
  56. HRESULT XferVersion0(IStream *pstm, XferStream::Mode mode, ULONG *pcbSize);
  57. };
  58. class RouterComponentConfigStream : public ConfigStream
  59. {
  60. protected:
  61. virtual HRESULT XferVersion0(IStream *pstm, XferStream::Mode mode, ULONG *pcbSize);
  62. };
  63. #endif _RTRSTRM_H