blob: 025e9fd73860ae497b04a8085ec0bcb1e83833d9 (
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
57
58
59
60
61
62
63
64
65
66
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
//=======================================================================================//
#ifndef SV_RECORDINGSESSION_H
#define SV_RECORDINGSESSION_H
#ifdef _WIN32
#pragma once
#endif
//----------------------------------------------------------------------------------------
#include "baserecordingsession.h"
#include "basethinker.h"
#include "utlbuffer.h"
#include "sv_filepublish.h"
#include "replay/replaytime.h"
#include "sessioninfoheader.h"
//----------------------------------------------------------------------------------------
class IFilePublisher;
//----------------------------------------------------------------------------------------
class CServerRecordingSession : public CBaseRecordingSession
{
typedef CBaseRecordingSession BaseClass;
public:
CServerRecordingSession( IReplayContext *pContext );
~CServerRecordingSession();
virtual bool Read( KeyValues *pIn );
virtual void Write( KeyValues *pOut );
virtual void OnDelete();
virtual void SetLocked( bool bLocked );
virtual void PopulateWithRecordingData( int nCurrentRecordingStartTick );
void NotifyReplayRequested() { m_bReplaysRequested = true; }
double GetSecondsToExpiration() const;
bool SessionExpired() const;
#ifdef _DEBUG
void VerifyLocks();
#endif
private:
virtual bool ShouldDitchSession() const;
bool m_bReplaysRequested;
int m_nLifeSpan;
CReplayTime m_RecordTime;
};
//----------------------------------------------------------------------------------------
inline CServerRecordingSession *SV_CastSession( CBaseRecordingSession *pSession )
{
return static_cast< CServerRecordingSession * >( pSession );
}
//----------------------------------------------------------------------------------------
#endif // SV_RECORDINGSESSION_H
|