blob: 15f41cb34088ddcd428d9c2365eca33eafeae3c0 (
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
//=======================================================================================//
#ifndef SV_PUBLISHMANAGER_H
#define SV_PUBLISHMANAGER_H
#ifdef _WIN32
#pragma once
#endif
//----------------------------------------------------------------------------------------
#include "baserecordingsessionmanager.h"
//----------------------------------------------------------------------------------------
class CServerRecordingSession;
//----------------------------------------------------------------------------------------
//
// Manages and serializes all replay recording session data on the server
//
class CServerRecordingSessionManager : public CBaseRecordingSessionManager
{
typedef CBaseRecordingSessionManager BaseClass;
public:
CServerRecordingSessionManager( IReplayContext *pContext );
~CServerRecordingSessionManager();
void Think();
const char *GetNewSessionName() const;
virtual CBaseRecordingSession *OnSessionStart( int nCurrentRecordingStartTick, const char *pSessionName );
virtual void OnSessionEnd();
void EnableCleanupOnSessionEnd( bool bState );
// Offload session data to external fileserver? Cached once per session based on replay_fileserver_offload_enable.
bool ShouldOffload() const { return m_bOffload; }
protected:
//
// CGenericPersistentManager
//
virtual CBaseRecordingSession *Create();
virtual int GetVersion() const;
virtual bool ShouldSerializeIndexWithFullPath() { return false; } // On the server, write one file per session
virtual IReplayContext *GetReplayContext() const;
virtual bool CanDeleteSession( ReplayHandle_t hSession ) const;
virtual bool ShouldUnloadSessions() const { return true; }
virtual void OnAllSessionsDeleted();
private:
float m_flNextScheduledCleanup;
bool m_bOffload;
};
//----------------------------------------------------------------------------------------
#endif // SV_PUBLISHMANAGER_H
|