blob: 9359e66c6b9366fec9fb3ae0158dc24210974f85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
//=======================================================================================//
#ifndef SESSIONINFOHEADER_H
#define SESSIONINFOHEADER_H
#ifdef _WIN32
#pragma once
#endif
//----------------------------------------------------------------------------------------
#include "replay/shared_defs.h"
#include "compression.h"
#include "strtools.h"
//----------------------------------------------------------------------------------------
#define SESSION_INFO_VERSION 1
//----------------------------------------------------------------------------------------
struct SessionInfoHeader_t
{
inline SessionInfoHeader_t()
{
V_memset( this, 0, sizeof( SessionInfoHeader_t ) );
m_nCompressorType = COMPRESSORTYPE_INVALID;
m_uVersion = SESSION_INFO_VERSION;
}
//
// Session info files may be around for days, during which this format may change - so
// we need to be careful not to break it.
//
// Therefore, any changes to data here should be reflected in the size of m_aUnused.
//
uint8 m_uVersion;
char m_szSessionName[MAX_SESSIONNAME_LENGTH]; // Name of session
bool m_bRecording; // Is this session currenty recording?
int32 m_nNumBlocks; // # blocks in the session so far if recording, or total if not recording
CompressorType_t m_nCompressorType; // COMPRESSORTYPE_INVALID if header is not compressed
uint8 m_aHash[16]; // MD5 digest on payload
uint32 m_uPayloadSize; // Size of the payload - the compressed payload if it's compressed
uint32 m_uPayloadSizeUC; // Size of the uncompressed payload, if its compressed, otherwise 0
uint8 m_aUnused[128];
};
//----------------------------------------------------------------------------------------
bool ReadSessionInfoHeader( const void *pBuf, int nBufSize, SessionInfoHeader_t &outHeader );
//----------------------------------------------------------------------------------------
#endif // SESSIONINFOHEADER_H
|