-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathReplayProvider.h
More file actions
58 lines (43 loc) · 1.2 KB
/
ReplayProvider.h
File metadata and controls
58 lines (43 loc) · 1.2 KB
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
/*
** RLReplayManager
**
** Copyright (C) 2015 Tobias Taschner <github@tc84.de>
**
** Licensed under GPL v3 or later
*/
#ifndef ReplayProvider_H
#define ReplayProvider_H
#include "Replay.h"
#include <wx/vector.h>
#include <wx/sharedptr.h>
#include <wx/fswatcher.h>
#include <wx/event.h>
class ReplayProvider: public wxEvtHandler
{
public:
typedef wxSharedPtr<ReplayProvider> Ptr;
ReplayProvider(ReplayProvider* parent, const wxString& path = wxString(), const wxString& description = wxString());
wxVector<Replay::Ptr> replay;
wxVector<ReplayProvider::Ptr> provider;
const wxString& GetDescription() const
{
return m_description;
}
ReplayProvider* GetParent() const
{
return m_parent;
}
ReplayProvider* GetRoot() const;
Replay* FindReplay(const wxString& filename) const;
bool Import(const wxString& filename, bool move = false);
private:
ReplayProvider* m_parent;
wxString m_description;
wxString m_localPath;
wxFileSystemWatcher m_fsWatcher;
void FindFilesInFolder(const wxString& path);
void OnFileSystemChange(wxFileSystemWatcherEvent& event);
};
wxDECLARE_EVENT(wxEVT_REPLAY_REMOVED, wxCommandEvent);
wxDECLARE_EVENT(wxEVT_REPLAY_ADDED, wxCommandEvent);
#endif // ReplayProvider_H