~unity-team/libqtdbusmock/trunk

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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
 * Copyright (C) 2013 Canonical, Ltd.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of version 3 of the GNU Lesser General Public License as published
 * by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Author: Pete Woods <pete.woods@canonical.com>
 */

#ifndef QTDBUSMOCK_DBUSMOCK_H_
#define QTDBUSMOCK_DBUSMOCK_H_

#include <libqtdbustest/DBusTestRunner.h>
#include <libqtdbusmock/MockInterface.h>
#include <libqtdbusmock/NetworkManagerMockInterface.h>
#include <libqtdbusmock/NotificationDaemonMockInterface.h>
#include <libqtdbusmock/OfonoMockInterface.h>
#include <libqtdbusmock/OfonoModemInterface.h>
#include <libqtdbusmock/OfonoConnectionManagerInterface.h>
#include <libqtdbusmock/OfonoSimManagerInterface.h>
#include <libqtdbusmock/OfonoNetworkRegistrationInterface.h>
#include <libqtdbusmock/MockInterfaceClasses.h>
#include <libqtdbusmock/URfkillInterface.h>
#include <libqtdbusmock/URfkillKillswitchInterface.h>

namespace QtDBusMock {

class DBusMockPrivate;

class Q_DECL_EXPORT DBusMock {
public:
	DBusMock(QtDBusTest::DBusTestRunner &testRunner);

	virtual ~DBusMock();

	Q_DECL_EXPORT
	static void registerMetaTypes();

	virtual void registerTemplate(const QString &service,
	                              const QString &templateName,
	                              QDBusConnection::BusType busType);

	virtual void registerTemplate(const QString &service,
	                              const QString &templateName,
	                              const QVariantMap& parameters,
	                              QDBusConnection::BusType busType);

	virtual void registerBluez4(const QVariantMap& parameters = QVariantMap());

	virtual void registerBluez5(const QVariantMap& parameters = QVariantMap());

	virtual void registerGnomeScreensaver(const QVariantMap& parameters = QVariantMap());

	virtual void registerLogind(const QVariantMap& parameters = QVariantMap());

	virtual void registerNetworkManager();

	virtual void registerNetworkManager(const QVariantMap& parameters);

	virtual void registerNotificationDaemon();

	virtual void registerNotificationDaemon(const QVariantMap& parameters);

	virtual void registerOfono();

	virtual void registerOfono(const QVariantMap& parameters);

	virtual void registerPolicyKit(const QVariantMap& parameters = QVariantMap());

	virtual void registerTimeDate(const QVariantMap& parameters = QVariantMap());

	virtual void registerURfkill();

	virtual void registerURfkill(const QVariantMap& parameters);

	virtual void registerUpower(const QVariantMap& parameters = QVariantMap());

	virtual void registerCustomMock(const QString &name, const QString &path,
			const QString &interface, QDBusConnection::BusType);

	virtual NetworkManagerMockInterface & networkManagerInterface();

	virtual NotificationDaemonMockInterface & notificationDaemonInterface();

	virtual OrgFreedesktopDBusMockInterface & mockInterface(const QString &name,
			const QString &path, const QString &interface,
			QDBusConnection::BusType busType);

	virtual OfonoMockInterface & ofonoInterface();

	virtual OfonoModemInterface & ofonoModemInterface(const QString &path);

	virtual OfonoSimManagerInterface & ofonoSimManagerInterface(const QString &path);

	virtual OfonoConnectionManagerInterface & ofonoConnectionManagerInterface(const QString &path);

	virtual OfonoNetworkRegistrationInterface & ofonoNetworkRegistrationInterface(const QString &path);

	virtual OrgFreedesktopURfkillInterface & urfkillInterface();

	virtual OrgFreedesktopURfkillKillswitchInterface & urfkillKillswitchInterface(const QString& device);

private:
	QSharedPointer<DBusMockPrivate> d;
};

}

#endif /* QTDBUSMOCK_DBUSMOCK_H_ */