SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
SLAVLogic.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2019 SEGS Team (see AUTHORS.md)
5  * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
6  */
7 
8 #ifndef SLAVLOGIC_H
9 #define SLAVLOGIC_H
10 
11 #include <QObject>
12 
13 class AppVersionManifest;
14 struct ServerDescriptor;
15 
16 class SLAVLogic : public QObject
17 {
18  Q_OBJECT
19  AppVersionManifest *m_current_manifest;
20  class ServerConnection *m_serv_conn;
21  class UpdaterDlg *m_ui_impl;
22 
23  bool needToOverwriteBaseInstall();
24  void createBackupIfNeeded();
25  void copyFilesOverBase();
26  void calculateHashes(AppVersionManifest *manifest);
27 public:
28  explicit SLAVLogic(QObject *parent = 0);
29 
30  void connectUI();
31  void start();
32 signals:
33  // Notifying the UI
34  void needUpdate(AppVersionManifest *manifest,const QString &changeLog);
35 private slots:
36  void onHashingProgress(QString chan,float percent);
37  void onThreadError(QString v);
38 public slots:
39  // called from Network
40  void onManifestReceived(const QString & manifest_url, const QString &manifestData);
41  // called from UI
42  void onUpdateRequested(ServerDescriptor * manifest);
43 };
44 
45 #endif // SLAVLOGIC_H
Definition: ProjectManifest.h:28
void onUpdateRequested(ServerDescriptor *manifest)
Definition: SLAVLogic.cpp:85
Definition: UpdaterDlg.h:23
SLAVLogic(QObject *parent=0)
Definition: SLAVLogic.cpp:34
Definition: ProjectDescriptor.h:24
Definition: ServerConnection.h:28
void needUpdate(AppVersionManifest *manifest, const QString &changeLog)
void onManifestReceived(const QString &manifest_url, const QString &manifestData)
Definition: SLAVLogic.cpp:68
void connectUI()
Definition: SLAVLogic.cpp:45
Definition: SLAVLogic.h:16
void start()
Definition: SLAVLogic.cpp:50