Source code of Windows XP (NT5)
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.

102 lines
2.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1997 **/
  4. /**********************************************************************/
  5. /*
  6. ripstrm.h
  7. RIP node configuration object.
  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 _RIPSTRM_H
  14. #define _RIPSTRM_H
  15. #ifndef _XSTREAM_H
  16. #include "xstream.h"
  17. #endif
  18. #ifndef _IPXADMIN_H
  19. #include "ipxadmin.h"
  20. #endif
  21. #ifndef _COLUMN_H
  22. #include "column.h"
  23. #endif
  24. #ifndef _CONFIG_H
  25. // #include "config.h"
  26. #endif
  27. enum
  28. {
  29. RIP_COLUMNS = 0,
  30. RIP_COLUMNS_MAX_COUNT = 1,
  31. };
  32. enum
  33. {
  34. RIPSTRM_STATS_RIPPARAMS = 0,
  35. RIPSTRM_STATS_COUNT,
  36. };
  37. enum RIPSTRM_TAG
  38. {
  39. RIPSTRM_TAG_VERSION = XFER_TAG(1, XFER_DWORD),
  40. RIPSTRM_TAG_VERSIONADMIN = XFER_TAG(2, XFER_DWORD),
  41. RIPSTRM_TAG_STATS_RIPPARAMS_COLUMNS = XFER_TAG(3, XFER_COLUMNDATA_ARRAY),
  42. RIPSTRM_TAG_STATS_RIPPARAMS_SORT = XFER_TAG(4, XFER_DWORD),
  43. RIPSTRM_TAG_STATS_RIPPARAMS_ASCENDING = XFER_TAG(5, XFER_DWORD),
  44. RIPSTRM_TAG_STATS_RIPPARAMS_POSITION = XFER_TAG(6, XFER_RECT),
  45. };
  46. /*---------------------------------------------------------------------------
  47. Class: RipConfigStream
  48. This holds the configuration information for the IP administration
  49. nodes. This does NOT hold the configuration information for the columns.
  50. That is stored in the Component Configuration streams.
  51. ---------------------------------------------------------------------------*/
  52. class RipConfigStream : public ConfigStream
  53. {
  54. public:
  55. RipConfigStream();
  56. virtual HRESULT InitNew(); // set defaults
  57. virtual HRESULT SaveTo(IStream *pstm);
  58. virtual HRESULT SaveAs(UINT nVersion, IStream *pstm);
  59. virtual HRESULT LoadFrom(IStream *pstm);
  60. virtual HRESULT GetSize(ULONG *pcbSize);
  61. // --------------------------------------------------------
  62. // Accessors
  63. // --------------------------------------------------------
  64. virtual HRESULT GetVersionInfo(DWORD *pnVersion, DWORD *pnAdminVersion);
  65. private:
  66. HRESULT XferVersion0(IStream *pstm, XferStream::Mode mode, ULONG *pcbSize);
  67. };
  68. class RipComponentConfigStream : public ConfigStream
  69. {
  70. public:
  71. virtual HRESULT XferVersion0(IStream *pstm, XferStream::Mode mode, ULONG *pcbSize);
  72. protected:
  73. };
  74. #endif _RIPSTRM_H