2
* Copyright (C) 2014 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
#include "MockDevice.h"
20
#include "MockFingerprintReader.h"
21
#include "MockObserver.h"
22
#include "MockOperation.h"
23
#include "MockService.h"
24
#include "MockTemplateStore.h"
29
void BackendPlugin::registerTypes(const char *uri)
31
Q_ASSERT(uri == QLatin1String("Biometryd"));
33
qmlRegisterType<MockObserver>(uri, 0, 0, "Observer");
34
qmlRegisterType<MockUser>(uri, 0, 0, "User");
36
qmlRegisterUncreatableType<MockDevice>(uri, 0, 0, "Device", "Rely on Biometryd.instance");
38
qmlRegisterUncreatableType<MockOperation>(uri, 0, 0, "Operation", "Rely on Biometryd.instance");
39
qmlRegisterUncreatableType<MockSizeQuery>(uri, 0, 0, "SizeQuery", "Rely on Biometryd.instance");
40
qmlRegisterUncreatableType<MockEnrollment>(uri, 0, 0, "Enrollment", "Rely on Biometryd.instance");
41
qmlRegisterUncreatableType<MockClearance>(uri, 0, 0, "Clearance", "Rely on Biometryd.instance");
42
qmlRegisterUncreatableType<MockTemplateStore>(uri, 0, 0, "TemplateStore", "Rely on Biometryd.instance");
43
qmlRegisterUncreatableType<MockRemoval>(uri, 0, 0, "Removal", "Rely on Biometryd.instance");
44
qmlRegisterUncreatableType<MockList>(uri, 0, 0, "List", "Rely on Biometryd.instance");
46
qmlRegisterSingletonType<MockService>(
47
uri, 0, 0, "Biometryd",
48
[](QQmlEngine*, QJSEngine*) -> QObject*
50
return new MockService;
53
qmlRegisterSingletonType<MockFingerprintReader>(
54
uri, 0, 0, "FingerprintReader",
55
[](QQmlEngine*, QJSEngine*) -> QObject*
57
return new MockFingerprintReader;