forked from linuxdeepin/deepin-face
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbusfaceservice.h
50 lines (40 loc) · 1.32 KB
/
dbusfaceservice.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
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef DBUSFACESERVICE_H
#define DBUSFACESERVICE_H
#include "definehead.h"
#include "drivermanger.h"
#include <QDebug>
#include <QSharedPointer>
#include <QtDBus/QtDBus>
class DbusFaceService : public QObject, public QDBusContext
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", SERVERINTERFACE)
Q_PROPERTY(bool Claim READ getClaim)
Q_PROPERTY(QStringList List READ getList)
Q_PROPERTY(qint32 CharaType READ getCharaType)
Q_SIGNALS:
// Standard Notifications dbus implementation
void ErollStatus(QString, qint32, QString);
void VerifyStatus(QString, qint32, QString);
public:
DbusFaceService(QObject *parent = nullptr);
void charaTypeChange();
bool getClaim() const;
QStringList getList() const;
qint32 getCharaType() const;
public Q_SLOTS:
QDBusUnixFileDescriptor EnrollStart(QString chara, qint32 charaType, QString actionId);
void EnrollStop(QString actionId);
QDBusUnixFileDescriptor VerifyStart(QStringList charas, QString actionId);
void VerifyStop(QString actionId);
void Delete(QString chara);
protected Q_SLOTS:
void exitApp();
private:
QSharedPointer<DriverManger> m_spDriverManger;
QTimer *m_spTimer;
};
#endif // DBUSFACESERVICE_H