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.

78 lines
2.2 KiB

  1. // SegRec.h : Declaration of the CSegRec
  2. #include "resource.h" // main symbols
  3. #include "Wsb.h" // Wsb Collectable Class
  4. #include "wsbdb.h"
  5. /////////////////////////////////////////////////////////////////////////////
  6. // seg
  7. class CSegRec :
  8. public CWsbDbEntity,
  9. public ISegRec,
  10. public CComCoClass<CSegRec,&CLSID_CSegRec>
  11. {
  12. public:
  13. CSegRec() {}
  14. BEGIN_COM_MAP(CSegRec)
  15. COM_INTERFACE_ENTRY(ISegRec)
  16. COM_INTERFACE_ENTRY2(IWsbDbEntity, CWsbDbEntity)
  17. COM_INTERFACE_ENTRY(IWsbDbEntityPriv)
  18. COM_INTERFACE_ENTRY(IPersistStream)
  19. COM_INTERFACE_ENTRY(IWsbCollectable)
  20. COM_INTERFACE_ENTRY(IWsbTestable)
  21. END_COM_MAP()
  22. DECLARE_REGISTRY(CSegRec, _T("Seg.SegRec.1"), _T("Seg.SegRec"), IDS_SEGREC_DESC, THREADFLAGS_BOTH)
  23. // ISegRec
  24. public:
  25. STDMETHOD(FinalConstruct)(void);
  26. void FinalRelease(void);
  27. // IPersist
  28. public:
  29. STDMETHOD(GetClassID)(LPCLSID pClsid);
  30. // IPersistStream
  31. public:
  32. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  33. STDMETHOD(Load)(IStream* pStream);
  34. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  35. // IWsbTestable
  36. public:
  37. STDMETHOD(Test)(USHORT *pTestsPassed, USHORT* pTestsFailed);
  38. // IWsbDbEntity
  39. public:
  40. STDMETHOD(Print)(IStream* pStream);
  41. STDMETHOD(UpdateKey)(IWsbDbKey *pKey);
  42. WSB_FROM_CWSBDBENTITY;
  43. // ISegmentRecord
  44. public:
  45. STDMETHOD(GetSegmentRecord)(GUID* pBagId, LONGLONG *pSegStartLoc, LONGLONG *pSegLen, USHORT *pSegFlags, GUID *pPrimPos, LONGLONG *pSecPos );
  46. STDMETHOD(SetSegmentRecord)(GUID bagId, LONGLONG segStartLoc, LONGLONG SegLen, USHORT SegFlags, GUID PrimPos, LONGLONG SecPos );
  47. STDMETHOD(Split)(GUID bagId, LONGLONG segStartLoc, LONGLONG segLen, ISegRec* pSegRec1, ISegRec* pSegRec2);
  48. STDMETHOD(GetSegmentFlags)(USHORT *pSegFlags);
  49. STDMETHOD(SetSegmentFlags)(USHORT SegFlags);
  50. STDMETHOD(GetPrimPos)(GUID* pPrimPos);
  51. STDMETHOD(SetPrimPos)(GUID PrimPos);
  52. STDMETHOD(GetSecPos)(LONGLONG *pSecPos);
  53. STDMETHOD(SetSecPos)(LONGLONG SecPos);
  54. private:
  55. GUID m_BagId;
  56. LONGLONG m_SegStartLoc;
  57. LONGLONG m_SegLen;
  58. USHORT m_SegFlags;
  59. GUID m_PrimPos;
  60. LONGLONG m_SecPos;
  61. };