Merge lp:~pete-woods/libqtdbusmock/add-connection-bindings into lp:libqtdbusmock

Proposed by Pete Woods on 2016-11-25
Status: Merged
Approved by: Pete Woods on 2016-12-06
Approved revision: 48
Merged at revision: 44
Proposed branch: lp:~pete-woods/libqtdbusmock/add-connection-bindings
Merge into: lp:libqtdbusmock
Diff against target: 314 lines (+69/-43)
16 files modified
CMakeLists.txt (+0/-12)
cmake/FindGMock.cmake (+0/-10)
data/nm-manager-mock.xml (+15/-0)
debian/changelog (+8/-0)
debian/control (+1/-0)
debian/libqtdbusmock1.symbols (+2/-0)
src/libqtdbusmock/CMakeLists.txt (+1/-0)
src/libqtdbusmock/DBusMock.cpp (+3/-0)
src/libqtdbusmock/DBusMock.h (+1/-4)
src/libqtdbusmock/DeclareMetatypes.h (+24/-0)
src/libqtdbusmock/ExportInterfaces.h (+7/-4)
src/libqtdbusmock/Method.h (+1/-4)
src/libqtdbusmock/MethodCall.h (+1/-4)
src/libqtdbusmock/MockInterfaceClasses.h (+3/-0)
src/libqtdbusmock/NamedMethodCall.h (+1/-4)
tests/CMakeLists.txt (+1/-1)
To merge this branch: bzr merge lp:~pete-woods/libqtdbusmock/add-connection-bindings
Reviewer Review Type Date Requested Status
Charles Kerr (community) 2016-11-25 Approve on 2016-12-01
Review via email: mp+311818@code.launchpad.net

Commit message

Add bindings for NetworkManager mock interface methods for adding connection settings

Description of the change

Add bindings for NetworkManager mock interface methods for adding connection settings

To post a comment you must log in.
dobey (dobey) :
Charles Kerr (charlesk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-08-08 10:01:36 +0000
3+++ CMakeLists.txt 2016-12-06 12:07:40 +0000
4@@ -53,23 +53,11 @@
5 -Wextra
6 )
7
8-#set(DOXYFILE_SOURCE_DIR "include")
9-#set(DOXYFILE_EXTRA_SOURCES "doc")
10-#include(UseDoxygen)
11-#if(DOXYGEN_FOUND AND BUILD_DOXYGEN)
12-# install(
13-# DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html
14-# DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/libusermetrics-doc/
15-# )
16-#endif()
17-
18 configure_file(
19 "${SOURCE_DIR}/libqtdbusmock/config.h.in"
20 "${SOURCE_BINARY_DIR}/libqtdbusmock/config.h"
21 )
22
23-
24-#add_subdirectory("po")
25 add_subdirectory("src")
26 add_subdirectory("data")
27
28
29=== removed file 'cmake/FindGMock.cmake'
30--- cmake/FindGMock.cmake 2013-07-24 09:42:07 +0000
31+++ cmake/FindGMock.cmake 1970-01-01 00:00:00 +0000
32@@ -1,10 +0,0 @@
33-# Build with system gmock and embedded gtest
34-set (GMOCK_INCLUDE_DIRS "/usr/include/gmock/include" CACHE PATH "gmock source include directory")
35-set (GMOCK_SOURCE_DIR "/usr/src/gmock" CACHE PATH "gmock source directory")
36-set (GTEST_INCLUDE_DIRS "${GMOCK_SOURCE_DIR}/gtest/include" CACHE PATH "gtest source include directory")
37-
38-add_subdirectory(${GMOCK_SOURCE_DIR} "${CMAKE_CURRENT_BINARY_DIR}/gmock")
39-
40-set(GTEST_LIBRARIES gtest)
41-set(GTEST_MAIN_LIBRARIES gtest_main)
42-set(GMOCK_LIBRARIES gmock gmock_main)
43
44=== modified file 'data/nm-manager-mock.xml'
45--- data/nm-manager-mock.xml 2015-09-15 10:00:27 +0000
46+++ data/nm-manager-mock.xml 2016-12-06 12:07:40 +0000
47@@ -41,6 +41,14 @@
48 <arg name="path" type="s" direction="out"/>
49 </method>
50
51+ <method name="AddDeviceConnection">
52+ <arg name="device_name" type="s" direction="in"/>
53+ <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QtDBusMock::VariantDictMap"/>
54+ <arg name="settings" type="a{sa{sv}}" direction="in"/>
55+
56+ <arg name="path" type="s" direction="out"/>
57+ </method>
58+
59 <method name="AddActiveConnection">
60 <arg name="devices" type="as" direction="in"/>
61 <arg name="connection_device" type="s" direction="in"/>
62@@ -74,6 +82,13 @@
63 <arg name="name" type="s" direction="in"/>
64 <arg name="value" type="v" direction="in"/>
65 </method>
66+
67+ <method name="SettingsAddConnection">
68+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QtDBusMock::VariantDictMap"/>
69+ <arg name="settings" type="a{sa{sv}}" direction="in"/>
70+
71+ <arg name="path" type="s" direction="out"/>
72+ </method>
73
74 <method name="RemoveWifiConnection">
75 <arg name="device_path" type="s" direction="in"/>
76
77=== modified file 'debian/changelog'
78--- debian/changelog 2015-10-09 11:12:09 +0000
79+++ debian/changelog 2016-12-06 12:07:40 +0000
80@@ -1,3 +1,11 @@
81+libqtdbusmock (0.6-0ubuntu1) UNRELEASED; urgency=medium
82+
83+ * Add AddDeviceConnection, SettingsAddConnection methods to network manager mock interface.
84+ * Switch to cmake-extras version of FindGMock.
85+ * CHange to pragma once for header guard macros.
86+
87+ -- Pete <pete.woods@canonical.com> Fri, 25 Nov 2016 10:33:33 +0000
88+
89 libqtdbusmock (0.5+15.10.20151009-0ubuntu1) wily; urgency=medium
90
91 [ Pete Woods ]
92
93=== modified file 'debian/control'
94--- debian/control 2015-10-09 10:55:52 +0000
95+++ debian/control 2016-12-06 12:07:40 +0000
96@@ -3,6 +3,7 @@
97 Priority: optional
98 Maintainer: Ubuntu Developers <ubunu-devel.discuss@lists.ubuntu.com>
99 Build-Depends: cmake,
100+ cmake-extras,
101 debhelper (>= 9),
102 gettext,
103 google-mock (>= 1.6.0+svn437),
104
105=== modified file 'debian/libqtdbusmock1.symbols'
106--- debian/libqtdbusmock1.symbols 2015-10-09 11:12:09 +0000
107+++ debian/libqtdbusmock1.symbols 2016-12-06 12:07:40 +0000
108@@ -75,6 +75,7 @@
109 (c++)"NetworkManagerMockInterface::AddAccessPoint(QString const&, QString const&, QString const&, QString const&, unsigned int, unsigned int, unsigned int, unsigned char, unsigned int)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.3+15.04.20150331
110 (c++)"NetworkManagerMockInterface::SetDeviceActive(QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.3+15.04.20150331
111 (c++)"NetworkManagerMockInterface::AddWiFiConnection(QString const&, QString const&, QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.3+15.04.20150331
112+ (c++)"NetworkManagerMockInterface::AddDeviceConnection(QString const&, QMap<QString, QMap<QString, QVariant> > const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
113 (c++)"NetworkManagerMockInterface::RemoveAccessPoint(QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.3+15.04.20150331
114 (c++)"NetworkManagerMockInterface::AddActiveConnection(QStringList const&, QString const&, QString const&, QString const&, unsigned int)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.3+15.04.20150331
115 (c++)"NetworkManagerMockInterface::RemoveWifiConnection(QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.3+15.04.20150331
116@@ -84,6 +85,7 @@
117 (c++)"NetworkManagerMockInterface::SetDeviceDisconnected(QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.4+15.10.20151006.3
118 (c++)"NetworkManagerMockInterface::SetGlobalConnectionState(unsigned int)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.3+15.04.20150331
119 (c++)"NetworkManagerMockInterface::SetProperty(QString const&, QString const&, QString const&, QDBusVariant const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0.3+15.04.20150331
120+ (c++)"NetworkManagerMockInterface::SettingsAddConnection(QMap<QString, QMap<QString, QVariant> > const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
121 (c++)"OrgFreedesktopDBusMockInterface::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.1
122 (c++)"OrgFreedesktopDBusMockInterface::qt_metacast(char const*)@Base" 0.1
123 (c++)"OrgFreedesktopDBusMockInterface::MethodCalled(QString const&, QList<QVariant> const&)@Base" 0.1
124
125=== modified file 'src/libqtdbusmock/CMakeLists.txt'
126--- src/libqtdbusmock/CMakeLists.txt 2015-03-31 10:37:05 +0000
127+++ src/libqtdbusmock/CMakeLists.txt 2016-12-06 12:07:40 +0000
128@@ -11,6 +11,7 @@
129 QTDBUSMOCK_PUBLIC_HEADERS
130 "${CMAKE_CURRENT_BINARY_DIR}/config.h"
131 DBusMock.h
132+ DeclareMetatypes.h
133 ExportInterfaces.h
134 Method.h
135 MethodCall.h
136
137=== modified file 'src/libqtdbusmock/DBusMock.cpp'
138--- src/libqtdbusmock/DBusMock.cpp 2015-10-09 10:55:52 +0000
139+++ src/libqtdbusmock/DBusMock.cpp 2016-12-06 12:07:40 +0000
140@@ -66,6 +66,9 @@
141 Method::registerMetaType();
142 MethodCall::registerMetaType();
143 NamedMethodCall::registerMetaType();
144+
145+ qRegisterMetaType<VariantDictMap>("QtDBusMock::VariantDictMap");
146+ qDBusRegisterMetaType<VariantDictMap>();
147 }
148
149 void DBusMock::registerTemplate(const QString &service,
150
151=== modified file 'src/libqtdbusmock/DBusMock.h'
152--- src/libqtdbusmock/DBusMock.h 2015-10-09 10:55:52 +0000
153+++ src/libqtdbusmock/DBusMock.h 2016-12-06 12:07:40 +0000
154@@ -16,8 +16,7 @@
155 * Author: Pete Woods <pete.woods@canonical.com>
156 */
157
158-#ifndef QTDBUSMOCK_DBUSMOCK_H_
159-#define QTDBUSMOCK_DBUSMOCK_H_
160+#pragma once
161
162 #include <libqtdbustest/DBusTestRunner.h>
163 #include <libqtdbusmock/MockInterface.h>
164@@ -114,5 +113,3 @@
165 };
166
167 }
168-
169-#endif /* QTDBUSMOCK_DBUSMOCK_H_ */
170
171=== added file 'src/libqtdbusmock/DeclareMetatypes.h'
172--- src/libqtdbusmock/DeclareMetatypes.h 1970-01-01 00:00:00 +0000
173+++ src/libqtdbusmock/DeclareMetatypes.h 2016-12-06 12:07:40 +0000
174@@ -0,0 +1,24 @@
175+/*
176+ * Copyright (C) 2016 Canonical, Ltd.
177+ *
178+ * This library is free software; you can redistribute it and/or modify it under
179+ * the terms of version 3 of the GNU Lesser General Public License as published
180+ * by the Free Software Foundation.
181+ *
182+ * This library is distributed in the hope that it will be useful, but WITHOUT
183+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
184+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
185+ * details.
186+ *
187+ * You should have received a copy of the GNU Lesser General Public License
188+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
189+ *
190+ * Author: Pete Woods <pete.woods@canonical.com>
191+ */
192+
193+#pragma once
194+
195+#include <QtCore/QObject>
196+#include <QtCore/QVariantMap>
197+
198+Q_DECLARE_METATYPE(QMap<QString,QVariantMap>)
199
200=== modified file 'src/libqtdbusmock/ExportInterfaces.h'
201--- src/libqtdbusmock/ExportInterfaces.h 2013-08-05 12:09:47 +0000
202+++ src/libqtdbusmock/ExportInterfaces.h 2016-12-06 12:07:40 +0000
203@@ -16,16 +16,19 @@
204 * Author: Pete Woods <pete.woods@canonical.com>
205 */
206
207-#ifndef LIBQTDBUSMOCK_EXPORTINTERFACES_H_
208-#define LIBQTDBUSMOCK_EXPORTINTERFACES_H_
209+#pragma once
210
211 #include <QtCore/QObject>
212 class Q_DECL_EXPORT OrgFreedesktopDBusMockInterface;
213 class Q_DECL_EXPORT NetworkManagerMockInterface;
214 class Q_DECL_EXPORT OrgFreedesktopDBusPropertiesInterface;
215
216+namespace QtDBusMock {
217+
218+typedef QMap<QString, QVariantMap> VariantDictMap;
219+
220+}
221+
222 #include <libqtdbusmock/MockInterface.h>
223 #include <libqtdbusmock/NetworkManagerMockInterface.h>
224 #include <libqtdbusmock/PropertiesInterface.h>
225-
226-#endif /* LIBQTDBUSMOCK_EXPORTINTERFACES_H_ */
227
228=== modified file 'src/libqtdbusmock/Method.h'
229--- src/libqtdbusmock/Method.h 2013-08-05 12:59:22 +0000
230+++ src/libqtdbusmock/Method.h 2016-12-06 12:07:40 +0000
231@@ -16,8 +16,7 @@
232 * Author: Pete Woods <pete.woods@canonical.com>
233 */
234
235-#ifndef LIBQTDBUSMOCK_METHOD_H_
236-#define LIBQTDBUSMOCK_METHOD_H_
237+#pragma once
238
239 #include <QtDBus>
240
241@@ -72,5 +71,3 @@
242 QtDBusMock::Method &method);
243
244 Q_DECLARE_METATYPE(QtDBusMock::Method)
245-
246-#endif // LIBQTDBUSMOCK_METHOD_H_
247
248=== modified file 'src/libqtdbusmock/MethodCall.h'
249--- src/libqtdbusmock/MethodCall.h 2013-08-05 12:59:22 +0000
250+++ src/libqtdbusmock/MethodCall.h 2016-12-06 12:07:40 +0000
251@@ -16,8 +16,7 @@
252 * Author: Pete Woods <pete.woods@canonical.com>
253 */
254
255-#ifndef LIBQTDBUSMOCK_METHODCALLS_H_
256-#define LIBQTDBUSMOCK_METHODCALLS_H_
257+#pragma once
258
259 #include <QtDBus>
260
261@@ -60,5 +59,3 @@
262 QtDBusMock::MethodCall &methodCalls);
263
264 Q_DECLARE_METATYPE(QtDBusMock::MethodCall)
265-
266-#endif // LIBQTDBUSMOCK_METHODCALLS_H_
267
268=== modified file 'src/libqtdbusmock/MockInterfaceClasses.h'
269--- src/libqtdbusmock/MockInterfaceClasses.h 2013-08-05 12:09:47 +0000
270+++ src/libqtdbusmock/MockInterfaceClasses.h 2016-12-06 12:07:40 +0000
271@@ -16,8 +16,11 @@
272 * Author: Pete Woods <pete.woods@canonical.com>
273 */
274
275+#pragma once
276+
277 #include <libqtdbusmock/ExportInterfaces.h>
278
279 #include <libqtdbusmock/Method.h>
280 #include <libqtdbusmock/MethodCall.h>
281 #include <libqtdbusmock/NamedMethodCall.h>
282+
283
284=== modified file 'src/libqtdbusmock/NamedMethodCall.h'
285--- src/libqtdbusmock/NamedMethodCall.h 2013-08-05 12:59:22 +0000
286+++ src/libqtdbusmock/NamedMethodCall.h 2016-12-06 12:07:40 +0000
287@@ -16,8 +16,7 @@
288 * Author: Pete Woods <pete.woods@canonical.com>
289 */
290
291-#ifndef LIBQTDBUSMOCK_NAMEDMETHODCALL_H_
292-#define LIBQTDBUSMOCK_NAMEDMETHODCALL_H_
293+#pragma once
294
295 #include <QtDBus>
296
297@@ -66,5 +65,3 @@
298 QtDBusMock::NamedMethodCall &methodCalls);
299
300 Q_DECLARE_METATYPE(QtDBusMock::NamedMethodCall)
301-
302-#endif // LIBQTDBUSMOCK_NAMEDMETHODCALL_H_
303
304=== modified file 'tests/CMakeLists.txt'
305--- tests/CMakeLists.txt 2013-08-07 11:02:23 +0000
306+++ tests/CMakeLists.txt 2016-12-06 12:07:40 +0000
307@@ -1,6 +1,6 @@
308
309 set(CMAKE_AUTOMOC OFF)
310-include(FindGMock)
311+find_package(GMock REQUIRED)
312 set(CMAKE_AUTOMOC ON)
313
314 find_package("Valgrind" REQUIRED)

Subscribers

People subscribed via source and target branches

to all changes: