-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphonemanager.h
63 lines (53 loc) · 1.48 KB
/
phonemanager.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef PHONEMANAGER_H
#define PHONEMANAGER_H
#include <QObject>
#include <QDateTime>
#include <QTimer>
#include <QSettings>
#include "buttonmonitorthread.h"
#include "displaymanager.h"
#include "mainwindow.h"
#include "ncidclient.h"
class PhoneManager : public QObject
{
Q_OBJECT
public:
explicit PhoneManager(QObject *parent = 0, MainWindow *pMainWindow=0);
virtual ~PhoneManager();
signals:
void setOutputState( int iOutput, bool bState );
void dndStatus( bool bEnabled );
void dndEndTime( QDateTime endTime );
void lastCallChanged(QString, QString, QString);
public slots:
void onButtonChange(int iBtn, bool bState);
void onIncrementDnd();
void onDecrementDnd();
void onCancelDnd();
void onClockTick();
private slots:
void loadConfiguration();
void loggedCall(NcidClient::CallInfo);
void incomingCall(const NcidClient::CallInfo);
void ncidServerConnected(bool);
void displayCall(const NcidClient::CallInfo);
private:
void enableDnd();
void disableDnd();
void connectToNcidServer();
bool m_bDndActive;
int m_iConsecutiveDecrement;
QDateTime m_dndEndTime;
QTimer m_clockTimer;
QTimer m_btnIncrementTimer;
QTimer m_btnDecrementTimer;
ButtonMonitorThread *m_pButtonMonitorThread;
DisplayManager *m_pDisplayManager;
QSettings *m_settings;
NcidClient *m_ncidClient;
QString m_ncidHostIP;
int m_ncidHostPort;
bool m_connected;
bool m_callReported;
};
#endif // PHONEMANAGER_H