forked from CPP-Final-Project/Chat_Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMessageSaver_Service.h
46 lines (29 loc) · 905 Bytes
/
MessageSaver_Service.h
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
#pragma once
#ifndef MESSAGESAVER_SERVICE_H
#define MESSAGESAVER_SERVICE_H
#include <QString>
#include <QObject>
#include <QTimer>
#include <QThread>
#include <plog/Initializers/RollingFileInitializer.h>
#include <plog/Log.h>
#include "LocalStorage_Service.h"
#include "RatingCounter_Service.h"
class MessageSaver_Service : public QObject
{
Q_OBJECT
private:
explicit MessageSaver_Service(QObject* parent_ = nullptr);
static QSharedPointer<MessageSaver_Service> shp_instance;
static bool is_started;
static QSharedPointer<QTimer> shp_timer;
static QSharedPointer<QThread> shp_thread;
public:
MessageSaver_Service(const MessageSaver_Service&) = delete;
MessageSaver_Service& operator=(const MessageSaver_Service&) = delete;
static bool start(const float& minutes_);
public slots:
void test();
void safeExit();
};
#endif //MESSAGESAVER_SERVICE_H