aboutsummaryrefslogtreecommitdiff
path: root/Maintenance/maintenance.h
blob: b7a63a2682ab0d36bf6057310c9a1e35a226e762 (plain)
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
#ifndef MAINTENANCE_H
#define MAINTENANCE_H

#include <QTimer>

#include "Core/CoreObject/coreobject.h"
#include "Database/databaseinterface.h"

class Maintenance: public QObject
{
    Q_OBJECT

public:
    Maintenance(const QSharedPointer<CoreObject> &coreObject);
    bool scheduleMaintenance();

private:
    QSharedPointer<CoreObject> _coreObject;

    // schedule timer
    QTimer _maintenanceTimer;

private:
    int updateStats();
    int pruneBeacons();
    int pruneServerInfo();
    int prunePlayers();

private slots:
    void onMaintenanceTimerAction();
};

#endif // MAINTENANCE_H