EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BulkMgrService.h
Go to the documentation of this file.
1 
12 #ifndef __BULKMGR_SERVICE_H_INCL__
13 #define __BULKMGR_SERVICE_H_INCL__
14 
15 #include "PyService.h"
16 #include "cache/BulkDB.h"
17 
18 class BulkMgrService : public PyService
19 {
20 public:
22  virtual ~BulkMgrService();
23 public:
24 
25 protected:
26  class Dispatcher;
27  Dispatcher *const m_dispatch;
28 
29  PyCallable_DECL_CALL(UpdateBulk);
30  PyCallable_DECL_CALL(GetAllBulkIDs);
31  PyCallable_DECL_CALL(GetVersion);
32  PyCallable_DECL_CALL(GetChunk);
33  PyCallable_DECL_CALL(GetFullFiles);
34  PyCallable_DECL_CALL(GetFullFilesChunk);
35  PyCallable_DECL_CALL(GetUnsubmittedChanges);
36  PyCallable_DECL_CALL(GetUnsubmittedChunk);
37 
38 private:
39 
40  enum bulkStatus {
41  updateBulkStatusOK = 0, // client data == server data - no change
42  updateBulkStatusWrongBranch = 1, // client != server. calls GetFullFiles then GetVersion
43  updateBulkStatusHashMismatch = 2, // client missing files - compares server (returned) fileIDs with local fileIDs
44  updateBulkStatusClientNewer = 3, // client != server. calls GetFullFiles then GetVersion
45  updateBulkStatusNeedToUpdate = 4, // this one will be complicated. see notes in cpp
46  updateBulkStatusTooManyRevisions = 5 // server has too many updates to bring client files up-to-date. calls GetFullFiles then GetVersion
47  };
48 };
49 
50 #endif
51 
PyCallable_DECL_CALL(UpdateBulk)
Dispatcher *const m_dispatch
BulkMgrService(PyServiceMgr *mgr)
virtual ~BulkMgrService()