Imported Upstream version 878.70.2
[platform/upstream/mdnsresponder.git] / mDNSMacOSX / BonjourTop / source / CaptureFile.h
1 //
2 //  CaptureFile.h
3 //  TestTB
4 //
5 //  Created by Terrin Eager on 9/14/12.
6 //
7 //
8
9 #ifndef __TestTB__CaptureFile__
10 #define __TestTB__CaptureFile__
11
12 #include <iostream>
13 #include "bjtypes.h"
14 #include "bjsocket.h"
15 #include "Frame.h"
16
17 class CCaptureFile
18 {
19 public:
20     CCaptureFile();
21     virtual ~CCaptureFile();
22     bool Open(const char* pFileName);
23     bool NextFrame();
24     bool Close();
25
26     Frame m_CurrentFrame;
27
28
29
30     __uint32_t GetDeltaTime();
31
32     __uint32_t GetBufferLen(BJ_UINT8* pStart);
33
34     __uint32_t GetWiredLength(){ return m_nWireLen;};
35
36
37 private:
38     bool Init();
39     bool Clear();
40
41     FILE* m_hFile;
42     BJ_UINT8* m_pFrameHeader;
43     BJ_UINT8* m_pFrameData;
44     BJ_UINT8* m_pFileHeader;
45     __uint32_t  m_nCaptureLen;
46     __uint32_t  m_nWireLen;
47     __uint32_t  m_TimeSec;
48
49     __uint32_t m_nFirstFrameTime;
50
51     Frame::BJ_DATALINKTYPE m_datalinkType;
52
53 };
54
55 #endif /* defined(__TestTB__CaptureFile__) */