Merge lp:~unity-api-team/libqtdbusmock/ofono-urfkill into lp:libqtdbusmock

Proposed by Pete Woods on 2015-01-19
Status: Merged
Approved by: Pete Woods on 2015-04-01
Approved revision: 66
Merged at revision: 36
Proposed branch: lp:~unity-api-team/libqtdbusmock/ofono-urfkill
Merge into: lp:libqtdbusmock
Diff against target: 1339 lines (+1140/-5)
16 files modified
data/nm-manager-mock.xml (+47/-0)
data/notification-daemon-mock.xml (+37/-0)
data/ofono-connectionmanager.xml (+19/-0)
data/ofono-mock.xml (+11/-0)
data/ofono-modem-mock.xml (+19/-0)
data/ofono-networkregistration.xml (+32/-0)
data/ofono-simmanager.xml (+51/-0)
data/org.freedesktop.URfkill.Device.xml (+143/-0)
data/org.freedesktop.URfkill.Killswitch.xml (+78/-0)
data/org.freedesktop.URfkill.xml (+388/-0)
debian/changelog (+6/-0)
debian/control (+1/-1)
debian/libqtdbusmock1.symbols (+36/-4)
src/libqtdbusmock/CMakeLists.txt (+123/-0)
src/libqtdbusmock/DBusMock.cpp (+119/-0)
src/libqtdbusmock/DBusMock.h (+30/-0)
To merge this branch: bzr merge lp:~unity-api-team/libqtdbusmock/ofono-urfkill
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing on 2015-03-09
Unity Team 2015-01-19 Pending
Review via email: mp+246916@code.launchpad.net

Commit Message

Add delegates for urfkill and ofono

Description of the Change

Add delegates for urfkill and ofono

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/nm-manager-mock.xml'
2--- data/nm-manager-mock.xml 2013-08-05 08:20:31 +0000
3+++ data/nm-manager-mock.xml 2015-03-31 10:40:18 +0000
4@@ -7,6 +7,8 @@
5 <arg name="device_name" type="s" direction="in"/>
6 <arg name="interface_name" type="s" direction="in"/>
7 <arg name="state" type="i" direction="in"/>
8+
9+ <arg name="path" type="s" direction="out"/>
10 </method>
11
12 <method name="AddAccessPoint">
13@@ -19,6 +21,8 @@
14 <arg name="rate" type="u" direction="in"/>
15 <arg name="strength" type="y" direction="in"/>
16 <arg name="security" type="u" direction="in"/>
17+
18+ <arg name="path" type="s" direction="out"/>
19 </method>
20
21 <method name="AddWiFiConnection">
22@@ -26,6 +30,49 @@
23 <arg name="connection_name" type="s" direction="in"/>
24 <arg name="ssid" type="s" direction="in"/>
25 <arg name="key_mgmt" type="s" direction="in"/>
26+
27+ <arg name="path" type="s" direction="out"/>
28+ </method>
29+
30+ <method name="AddActiveConnection">
31+ <arg name="devices" type="as" direction="in"/>
32+ <arg name="connection_device" type="s" direction="in"/>
33+ <arg name="specific_object" type="s" direction="in"/>
34+ <arg name="active_connection_name" type="s" direction="in"/>
35+ <arg name="state" type="u" direction="in"/>
36+
37+ <arg name="path" type="s" direction="out"/>
38+ </method>
39+
40+ <method name="SetDeviceActive">
41+ <arg name="device_path" type="s" direction="in"/>
42+ <arg name="connection_path" type="s" direction="in"/>
43+ </method>
44+
45+ <method name="SetGlobalConnectionState">
46+ <arg name="state" type="u" direction="in"/>
47+ </method>
48+
49+ <method name="SetProperty">
50+ <arg name="path" type="s" direction="in"/>
51+ <arg name="iface" type="s" direction="in"/>
52+ <arg name="name" type="s" direction="in"/>
53+ <arg name="value" type="v" direction="in"/>
54+ </method>
55+
56+ <method name="RemoveWifiConnection">
57+ <arg name="device_path" type="s" direction="in"/>
58+ <arg name="connection_path" type="s" direction="in"/>
59+ </method>
60+
61+ <method name="RemoveAccessPoint">
62+ <arg name="device_path" type="s" direction="in"/>
63+ <arg name="access_point_path" type="s" direction="in"/>
64+ </method>
65+
66+ <method name="RemoveActiveConnection">
67+ <arg name="device_path" type="s" direction="in"/>
68+ <arg name="active_connection_path" type="s" direction="in"/>
69 </method>
70
71 </interface>
72
73=== added file 'data/notification-daemon-mock.xml'
74--- data/notification-daemon-mock.xml 1970-01-01 00:00:00 +0000
75+++ data/notification-daemon-mock.xml 2015-03-31 10:40:18 +0000
76@@ -0,0 +1,37 @@
77+<?xml version='1.0' encoding='utf8'?>
78+<node name="/">
79+ <interface name="org.freedesktop.Notifications">
80+ <method name="GetCapabilities">
81+ <arg direction="out" type="as"/>
82+ </method>
83+
84+ <method name="CloseNotification">
85+ <arg direction="in" name="id" type="u"/>
86+ </method>
87+
88+ <method name="GetServerInformation">
89+ <arg direction="out" name="name" type="s"/>
90+ <arg direction="out" name="vendor" type="s"/>
91+ <arg direction="out" name="version" type="s"/>
92+ <arg direction="out" name="specVersion" type="s"/>
93+ </method>
94+
95+ <method name="Notify">
96+ <arg direction="in" name="app_name" type="s"/>
97+ <arg direction="in" name="replaces_id" type="u"/>
98+ <arg direction="in" name="app_icon" type="s"/>
99+ <arg direction="in" name="summary" type="s"/>
100+ <arg direction="in" name="body" type="s"/>
101+ <arg direction="in" name="actions" type="as"/>
102+ <annotation name="org.qtproject.QtDBus.QtTypeName.In6" value="QVariantMap"/>
103+ <arg direction="in" name="hints" type="a{sv}"/>
104+ <arg direction="in" name="expire_timeout" type="i"/>
105+ <arg direction="out" type="u"/>
106+ </method>
107+
108+ <signal name="NotificationClosed">
109+ <arg direction="out" name="id" type="u"/>
110+ <arg direction="out" name="reason" type="u"/>
111+ </signal>
112+ </interface>
113+</node>
114
115=== added file 'data/ofono-connectionmanager.xml'
116--- data/ofono-connectionmanager.xml 1970-01-01 00:00:00 +0000
117+++ data/ofono-connectionmanager.xml 2015-03-31 10:40:18 +0000
118@@ -0,0 +1,19 @@
119+<?xml version='1.0' encoding='utf8'?>
120+<node name="/">
121+ <interface name="org.ofono.ConnectionManager">
122+ <method name="GetProperties">
123+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
124+ <arg direction="out" name="properties" type="a{sv}" />
125+ </method>
126+
127+ <method name="SetProperty">
128+ <arg direction="in" name="name" type="s" />
129+ <arg direction="in" name="property" type="v" />
130+ </method>
131+
132+ <signal name="PropertyChanged">
133+ <arg type="s" name="name" />
134+ <arg type="v" name="value" />
135+ </signal>
136+ </interface>
137+</node>
138
139=== added file 'data/ofono-mock.xml'
140--- data/ofono-mock.xml 1970-01-01 00:00:00 +0000
141+++ data/ofono-mock.xml 2015-03-31 10:40:18 +0000
142@@ -0,0 +1,11 @@
143+<?xml version='1.0' encoding='utf8'?>
144+<node name="/">
145+ <interface name="org.freedesktop.DBus.Mock">
146+ <method name="AddModem">
147+ <arg direction="in" name="name" type="s" />
148+ <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
149+ <arg direction="in" name="properties" type="a{sv}" />
150+ <arg direction="out" type="s" />
151+ </method>
152+ </interface>
153+</node>
154\ No newline at end of file
155
156=== added file 'data/ofono-modem-mock.xml'
157--- data/ofono-modem-mock.xml 1970-01-01 00:00:00 +0000
158+++ data/ofono-modem-mock.xml 2015-03-31 10:40:18 +0000
159@@ -0,0 +1,19 @@
160+<?xml version='1.0' encoding='utf8'?>
161+<node name="/">
162+ <interface name="org.ofono.Modem">
163+ <method name="GetProperties">
164+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
165+ <arg direction="out" name="properties" type="a{sv}" />
166+ </method>
167+
168+ <method name="SetProperty">
169+ <arg direction="in" name="name" type="s" />
170+ <arg direction="in" name="property" type="v" />
171+ </method>
172+
173+ <signal name="PropertyChanged">
174+ <arg type="s" name="name" />
175+ <arg type="v" name="value" />
176+ </signal>
177+ </interface>
178+</node>
179
180=== added file 'data/ofono-networkregistration.xml'
181--- data/ofono-networkregistration.xml 1970-01-01 00:00:00 +0000
182+++ data/ofono-networkregistration.xml 2015-03-31 10:40:18 +0000
183@@ -0,0 +1,32 @@
184+<?xml version='1.0' encoding='utf8'?>
185+<node name="/">
186+ <interface name="org.ofono.NetworkRegistration">
187+ <method name="GetProperties">
188+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
189+ <arg direction="out" name="properties" type="a{sv}" />
190+ </method>
191+
192+ <method name="SetProperty">
193+ <arg direction="in" name="name" type="s" />
194+ <arg direction="in" name="property" type="v" />
195+ </method>
196+
197+ <method name="Register">
198+ </method>
199+
200+ <method name="GetOperators">
201+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVector&lt;QPair&lt;QDBusObjectPath, QVariantMap>>"/>
202+ <arg direction="out" name="operators_with_properties" type="a(oa{sv})" />
203+ </method>
204+
205+ <method name="Scan">
206+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVector&lt;QPair&lt;QDBusObjectPath, QVariantMap>>"/>
207+ <arg direction="out" name="operators_with_properties" type="a(oa{sv})" />
208+ </method>
209+
210+ <signal name="PropertyChanged">
211+ <arg type="s" name="name" />
212+ <arg type="v" name="value" />
213+ </signal>
214+ </interface>
215+</node>
216
217=== added file 'data/ofono-simmanager.xml'
218--- data/ofono-simmanager.xml 1970-01-01 00:00:00 +0000
219+++ data/ofono-simmanager.xml 2015-03-31 10:40:18 +0000
220@@ -0,0 +1,51 @@
221+<?xml version='1.0' encoding='utf8'?>
222+<node name="/">
223+ <interface name="org.ofono.SimManager">
224+ <method name="GetProperties">
225+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
226+ <arg direction="out" name="properties" type="a{sv}" />
227+ </method>
228+
229+ <method name="SetProperty">
230+ <arg direction="in" name="name" type="s" />
231+ <arg direction="in" name="property" type="v" />
232+ </method>
233+
234+ <method name="ChangePin">
235+ <arg direction="in" name="type" type="s" />
236+ <arg direction="in" name="oldpin" type="s" />
237+ <arg direction="in" name="newpin" type="s" />
238+ </method>
239+
240+ <method name="EnterPin">
241+ <arg direction="in" name="type" type="s" />
242+ <arg direction="in" name="pin" type="s" />
243+ </method>
244+
245+ <method name="ResetPin">
246+ <arg direction="in" name="type" type="s" />
247+ <arg direction="in" name="puk" type="s" />
248+ <arg direction="in" name="newpin" type="s" />
249+ </method>
250+
251+ <method name="LockPin">
252+ <arg direction="in" name="type" type="s" />
253+ <arg direction="in" name="pin" type="s" />
254+ </method>
255+
256+ <method name="UnlockPin">
257+ <arg direction="in" name="type" type="s" />
258+ <arg direction="in" name="pin" type="s" />
259+ </method>
260+
261+ <method name="GetIcon">
262+ <arg direction="in" name="id" type="y" />
263+ <arg direction="out" name="icon" type="ay" />
264+ </method>
265+
266+ <signal name="PropertyChanged">
267+ <arg type="s" name="name" />
268+ <arg type="v" name="value" />
269+ </signal>
270+ </interface>
271+</node>
272
273=== added file 'data/org.freedesktop.URfkill.Device.xml'
274--- data/org.freedesktop.URfkill.Device.xml 1970-01-01 00:00:00 +0000
275+++ data/org.freedesktop.URfkill.Device.xml 2015-03-31 10:40:18 +0000
276@@ -0,0 +1,143 @@
277+<!DOCTYPE node PUBLIC
278+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
279+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
280+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
281+
282+ <interface name="org.freedesktop.URfkill.Device">
283+ <doc:doc>
284+ <doc:description>
285+ <doc:para>
286+ Objects implementing this interface are usually discovered through
287+ the <doc:tt>org.freedesktop.URfkill</doc:tt> interface on
288+ the <doc:tt>/org/freedesktop/URfkill</doc:tt> object on
289+ the D-Bus system bus service with the well-known
290+ name <doc:tt>org.freedesktop.URfkill</doc:tt> using
291+ the
292+ <doc:ref type="method" to="Rfkill.EnumerateDevices">EnumerateDevices</doc:ref>
293+ method.
294+ </doc:para>
295+ <doc:para>
296+ <doc:example language="shell" title="simple example">
297+ <doc:code>
298+$ gdbus call -y \
299+ -d org.freedesktop.URfkill \
300+ -o /org/freedesktop/URfkill/devices/0 \
301+ -m org.freedesktop.DBus.Properties.GetAll \
302+ "org.freedesktop.URfkill.Device"
303+
304+({'index': &lt;uint32 0&gt;, 'type': &lt;uint32 2&gt;, 'name': &lt;'tpacpi_bluetooth_sw'&gt;, 'soft': &lt;true&gt;, 'hard': &lt;true&gt;, 'platform': &lt;true&gt;},)
305+ </doc:code>
306+ </doc:example>
307+ </doc:para>
308+ </doc:description>
309+ </doc:doc>
310+
311+ <!-- ************************************************************ -->
312+
313+ <signal name="Changed">
314+ <doc:doc>
315+ <doc:description>
316+ <doc:para>
317+ Emitted when a property of the device is changed.
318+ </doc:para>
319+ <doc:para>
320+ Note: This signal is deprecated since 0.4.0. Use the standard signal,
321+ PropertiesChanged from org.freedesktop.DBus.Properties instead.
322+ </doc:para>
323+ </doc:description>
324+ </doc:doc>
325+ </signal>
326+
327+ <!-- ************************************************************ -->
328+
329+ <property name="index" type="u" access="read">
330+ <doc:doc>
331+ <doc:description>
332+ <doc:para>
333+ The index of the rfkill device
334+ </doc:para>
335+ </doc:description>
336+ </doc:doc>
337+ </property>
338+
339+ <property name="type" type="u" access="read">
340+ <doc:doc>
341+ <doc:description>
342+ <doc:para>
343+ The type of the rfkill device
344+ </doc:para>
345+ <doc:list>
346+ <doc:item>
347+ <doc:term>0</doc:term><doc:definition>All</doc:definition>
348+ </doc:item>
349+ <doc:item>
350+ <doc:term>1</doc:term><doc:definition>WLAN</doc:definition>
351+ </doc:item>
352+ <doc:item>
353+ <doc:term>2</doc:term><doc:definition>Bluetooth</doc:definition>
354+ </doc:item>
355+ <doc:item>
356+ <doc:term>3</doc:term><doc:definition>UWB</doc:definition>
357+ </doc:item>
358+ <doc:item>
359+ <doc:term>4</doc:term><doc:definition>WIMAX</doc:definition>
360+ </doc:item>
361+ <doc:item>
362+ <doc:term>5</doc:term><doc:definition>WWAN</doc:definition>
363+ </doc:item>
364+ <doc:item>
365+ <doc:term>6</doc:term><doc:definition>GPS</doc:definition>
366+ </doc:item>
367+ <doc:item>
368+ <doc:term>7</doc:term><doc:definition>FM</doc:definition>
369+ </doc:item>
370+ <doc:item>
371+ <doc:term>8</doc:term><doc:definition>NFC</doc:definition>
372+ </doc:item>
373+ </doc:list>
374+ </doc:description>
375+ </doc:doc>
376+ </property>
377+
378+ <property name="name" type="s" access="read">
379+ <doc:doc>
380+ <doc:description>
381+ <doc:para>
382+ The name of the rfkill device
383+ </doc:para>
384+ </doc:description>
385+ </doc:doc>
386+ </property>
387+
388+ <property name="soft" type="b" access="read">
389+ <doc:doc>
390+ <doc:description>
391+ <doc:para>
392+ Whether the soft block of the device is on or not
393+ </doc:para>
394+ </doc:description>
395+ </doc:doc>
396+ </property>
397+
398+ <property name="hard" type="b" access="read">
399+ <doc:doc>
400+ <doc:description>
401+ <doc:para>
402+ Whether the hard block of the device is on or not
403+ </doc:para>
404+ </doc:description>
405+ </doc:doc>
406+ </property>
407+
408+ <property name="platform" type="b" access="read">
409+ <doc:doc>
410+ <doc:description>
411+ <doc:para>
412+ Whether the device is generated by a platform driver or not
413+ </doc:para>
414+ </doc:description>
415+ </doc:doc>
416+ </property>
417+
418+ </interface>
419+</node>
420
421=== added file 'data/org.freedesktop.URfkill.Killswitch.xml'
422--- data/org.freedesktop.URfkill.Killswitch.xml 1970-01-01 00:00:00 +0000
423+++ data/org.freedesktop.URfkill.Killswitch.xml 2015-03-31 10:40:18 +0000
424@@ -0,0 +1,78 @@
425+<!DOCTYPE node PUBLIC
426+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
427+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
428+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
429+
430+ <interface name="org.freedesktop.URfkill.Killswitch">
431+ <doc:doc>
432+ <doc:description>
433+ <doc:para>
434+ Objects implementing this interface represent different types
435+ of killswitches and are discovered through the
436+ <doc:tt>org.freedesktop.URfkill.Killswitch</doc:tt> interface
437+ on the <doc:tt>/org/freedesktop/URfkill/TYPENAME</doc:tt>
438+ object on the D-Bus system bus service with the well-known
439+ name <doc:tt>org.freedesktop.URfkill</doc:tt>. The TYPENAME
440+ could be <doc:tt>"WLAN"</doc:tt>, <doc:tt>"BLUETOOTH"</doc:tt>,
441+ <doc:tt>"UWB"</doc:tt>, <doc:tt>"WIMAX"</doc:tt>,
442+ <doc:tt>"WWAN"</doc:tt>, <doc:tt>"GPS"</doc:tt>,
443+ <doc:tt>"FM"</doc:tt>, or <doc:tt>"NFC"</doc:tt>.
444+ </doc:para>
445+ <doc:para>
446+ <doc:example language="shell" title="simple example">
447+ <doc:code>
448+$ gdbus call -y \
449+ -d org.freedesktop.URfkill \
450+ -o /org/freedesktop/URfkill/WLAN \
451+ -m org.freedesktop.DBus.Properties.GetAll \
452+ "org.freedesktop.URfkill.Killswitch"
453+
454+({'state': &lt;2&gt;},)
455+ </doc:code>
456+ </doc:example>
457+ </doc:para>
458+ </doc:description>
459+ </doc:doc>
460+
461+ <signal name="StateChanged">
462+ <doc:doc>
463+ <doc:description>
464+ <doc:para>
465+ Emitted when the state of the killswitch changed.
466+ </doc:para>
467+ <doc:para>
468+ Note: This signal is deprecated since 0.4.0. Use the standard signal,
469+ PropertiesChanged from org.freedesktop.DBus.Properties instead.
470+ </doc:para>
471+ </doc:description>
472+ </doc:doc>
473+ </signal>
474+
475+ <!-- ************************************************************ -->
476+
477+ <property name="state" type="i" access="read">
478+ <doc:doc>
479+ <doc:description>
480+ <doc:para>
481+ The state of the killswitch
482+ </doc:para>
483+ <doc:list>
484+ <doc:item>
485+ <doc:term>-1</doc:term><doc:definition>killswitch is not available.</doc:definition>
486+ </doc:item>
487+ <doc:item>
488+ <doc:term>0</doc:term><doc:definition>killswitch is unblocked.</doc:definition>
489+ </doc:item>
490+ <doc:item>
491+ <doc:term>1</doc:term><doc:definition>killswitch is soft-blocked.</doc:definition>
492+ </doc:item>
493+ <doc:item>
494+ <doc:term>2</doc:term><doc:definition>killswitch is hard-blocked.</doc:definition>
495+ </doc:item>
496+ </doc:list>
497+ </doc:description>
498+ </doc:doc>
499+ </property>
500+
501+ </interface>
502+</node>
503
504=== added file 'data/org.freedesktop.URfkill.xml'
505--- data/org.freedesktop.URfkill.xml 1970-01-01 00:00:00 +0000
506+++ data/org.freedesktop.URfkill.xml 2015-03-31 10:40:18 +0000
507@@ -0,0 +1,388 @@
508+<!DOCTYPE node PUBLIC
509+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
510+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
511+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
512+
513+ <interface name="org.freedesktop.URfkill">
514+ <doc:doc>
515+ <doc:description>
516+ <doc:para>
517+ The urfkill service is available via the system message
518+ bus. To access the service, use
519+ the <doc:tt>org.freedesktop.URfkill</doc:tt> interface on
520+ the <doc:tt>/org/freedesktop/URfkill</doc:tt> object on
521+ the D-Bus system bus service with the well-known
522+ name <doc:tt>org.freedesktop.URfkill</doc:tt>.
523+ </doc:para>
524+ <doc:para>
525+ <doc:example language="shell" title="simple example">
526+ <doc:code>
527+$ gdbus call -y \
528+ -d org.freedesktop.URfkill \
529+ -o /org/freedesktop/URfkill \
530+ -m org.freedesktop.URfkill.EnumerateDevices
531+
532+([objectpath '/org/freedesktop/URfkill/devices/0', '/org/freedesktop/URfkill/devices/1'],)
533+ </doc:code>
534+ </doc:example>
535+ </doc:para>
536+ </doc:description>
537+ </doc:doc>
538+
539+ <!-- ************************************************************ -->
540+
541+ <method name="Block">
542+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
543+ <arg type="u" name="type" direction="in">
544+ <doc:doc><doc:summary>
545+ The type of devices to be blocked/unblocked
546+ </doc:summary></doc:doc>
547+ </arg>
548+ <arg type="b" name="block" direction="in">
549+ <doc:doc><doc:summary>
550+ TRUE to block the devices, FALSE to unblock
551+ </doc:summary></doc:doc>
552+ </arg>
553+ <arg type="b" name="ret" direction="out">
554+ <doc:doc><doc:summary>
555+ TRUE for success, otherwise FALSE
556+ </doc:summary></doc:doc>
557+ </arg>
558+
559+ <doc:doc>
560+ <doc:description>
561+ <doc:para>
562+ Block or unblock the devices belonging to the type.
563+ The types are defined as the followings:
564+ </doc:para>
565+ <doc:list>
566+ <doc:item>
567+ <doc:term>0</doc:term><doc:definition>All</doc:definition>
568+ </doc:item>
569+ <doc:item>
570+ <doc:term>1</doc:term><doc:definition>WLAN</doc:definition>
571+ </doc:item>
572+ <doc:item>
573+ <doc:term>2</doc:term><doc:definition>Bluetooth</doc:definition>
574+ </doc:item>
575+ <doc:item>
576+ <doc:term>3</doc:term><doc:definition>UWB</doc:definition>
577+ </doc:item>
578+ <doc:item>
579+ <doc:term>4</doc:term><doc:definition>WIMAX</doc:definition>
580+ </doc:item>
581+ <doc:item>
582+ <doc:term>5</doc:term><doc:definition>WWAN</doc:definition>
583+ </doc:item>
584+ <doc:item>
585+ <doc:term>6</doc:term><doc:definition>GPS</doc:definition>
586+ </doc:item>
587+ <doc:item>
588+ <doc:term>7</doc:term><doc:definition>FM</doc:definition>
589+ </doc:item>
590+ </doc:list>
591+ <doc:para>
592+ Note: This method only changes soft block. Hard block is controlled
593+ by BIOS or the hardware and there is no way to change the
594+ state of hard block through kernel functions.
595+ </doc:para>
596+ </doc:description>
597+ <doc:permission>
598+ This method is restricted to the active session user.
599+ </doc:permission>
600+ </doc:doc>
601+ </method>
602+
603+ <!-- ************************************************************ -->
604+
605+ <method name="BlockIdx">
606+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
607+ <arg type="u" name="index" direction="in">
608+ <doc:doc><doc:summary>
609+ The index of the device to be blocked/unblocked
610+ </doc:summary></doc:doc>
611+ </arg>
612+ <arg type="b" name="block" direction="in">
613+ <doc:doc><doc:summary>
614+ TRUE to block the device, FALSE to unblock
615+ </doc:summary></doc:doc>
616+ </arg>
617+ <arg type="b" name="ret" direction="out">
618+ <doc:doc><doc:summary>
619+ TRUE for success, otherwise FALSE
620+ </doc:summary></doc:doc>
621+ </arg>
622+
623+ <doc:doc>
624+ <doc:description>
625+ <doc:para>
626+ Block or unblock the device by the index.
627+ </doc:para>
628+ <doc:para>
629+ Note: This method only changes soft block. Hard block is controlled
630+ by BIOS or the hardware and there is no way to change the
631+ state of hard block through kernel functions.
632+ </doc:para>
633+ </doc:description>
634+ <doc:permission>
635+ This method is restricted to the currently active session user.
636+ </doc:permission>
637+ </doc:doc>
638+ </method>
639+
640+ <!-- ************************************************************ -->
641+
642+ <method name="EnumerateDevices">
643+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
644+ <arg type="ao" name="array" direction="out">
645+ <doc:doc><doc:summary>
646+ An array of the object pathes for the devices
647+ </doc:summary></doc:doc>
648+ </arg>
649+
650+ <doc:doc>
651+ <doc:description>
652+ <doc:para>
653+ Enumerate all rfkill objects on the system.
654+ </doc:para>
655+ </doc:description>
656+ </doc:doc>
657+ </method>
658+
659+ <!-- ************************************************************ -->
660+
661+ <method name="FlightMode">
662+ <arg type="b" name="block" direction="in">
663+ <doc:doc><doc:summary>
664+ TRUE of flight mode should be enabled, otherwise FALSE
665+ </doc:summary></doc:doc>
666+ </arg>
667+ <arg type="b" name="ret" direction="out">
668+ <doc:doc><doc:summary>
669+ TRUE if successful, otherwise FALSE
670+ </doc:summary></doc:doc>
671+ </arg>
672+
673+ <doc:doc>
674+ <doc:description>
675+ <doc:para>
676+ Enable or disable flight mode.
677+ </doc:para>
678+ </doc:description>
679+ </doc:doc>
680+ </method>
681+
682+ <!-- ************************************************************ -->
683+
684+ <method name="IsFlightMode">
685+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
686+ <arg type="b" name="is_flight_mode" direction="out">
687+ <doc:doc><doc:summary>
688+ TRUE if flight mode is enabled, otherwise FALSE
689+ </doc:summary></doc:doc>
690+ </arg>
691+
692+ <doc:doc>
693+ <doc:description>
694+ <doc:para>
695+ Get whether flight mode is enabled or not.
696+ </doc:para>
697+ </doc:description>
698+ </doc:doc>
699+ </method>
700+
701+ <!-- ************************************************************ -->
702+
703+ <method name="IsInhibited">
704+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
705+ <arg type="b" name="is_inhibited" direction="out">
706+ <doc:doc><doc:summary>
707+ TRUE if the key control is inhibited, otherwise FALSE
708+ </doc:summary></doc:doc>
709+ </arg>
710+
711+ <doc:doc>
712+ <doc:description>
713+ <doc:para>
714+ Get whether the rfkill key handling function is inhibited or not.
715+ </doc:para>
716+ </doc:description>
717+ </doc:doc>
718+ </method>
719+
720+ <!-- ************************************************************ -->
721+
722+ <method name="Inhibit">
723+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
724+ <arg type="s" name="reason" direction="in">
725+ <doc:doc><doc:summary>
726+ The reason to inhibit the key control
727+ </doc:summary></doc:doc>
728+ </arg>
729+ <arg type="u" name="inhibit_cookie" direction="out">
730+ <doc:doc><doc:summary>
731+ The cookie
732+ </doc:summary></doc:doc>
733+ </arg>
734+
735+ <doc:doc>
736+ <doc:description>
737+ <doc:para>
738+ Inhibit the rfkill key handling function for the session.
739+ </doc:para>
740+ </doc:description>
741+ </doc:doc>
742+ </method>
743+
744+ <!-- ************************************************************ -->
745+
746+ <method name="Uninhibit">
747+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
748+ <arg type="u" name="inhibit_cookie" direction="in">
749+ <doc:doc><doc:summary>
750+ The cookie
751+ </doc:summary></doc:doc>
752+ </arg>
753+
754+ <doc:doc>
755+ <doc:description>
756+ <doc:para>
757+ Cancel a previous call to <doc:ref type="method" to="org.freedesktop.URfkill.Inhibit">Inhibit()</doc:ref>
758+ identified by the cookie.
759+ </doc:para>
760+ </doc:description>
761+ </doc:doc>
762+ </method>
763+
764+ <!-- ************************************************************ -->
765+
766+ <signal name="DeviceAdded">
767+ <arg type="o" name="device" direction="out">
768+ <doc:doc><doc:summary>
769+ The object path for the device that was added
770+ </doc:summary></doc:doc>
771+ </arg>
772+
773+ <doc:doc>
774+ <doc:description>
775+ <doc:para>
776+ Emitted when a device is added.
777+ </doc:para>
778+ </doc:description>
779+ </doc:doc>
780+ </signal>
781+
782+ <!-- ************************************************************ -->
783+
784+ <signal name="DeviceRemoved">
785+ <arg type="o" name="device" direction="out">
786+ <doc:doc><doc:summary>
787+ The object path for the device that was removed
788+ </doc:summary></doc:doc>
789+ </arg>
790+
791+ <doc:doc>
792+ <doc:description>
793+ <doc:para>
794+ Emitted when a device is removed.
795+ </doc:para>
796+ </doc:description>
797+ </doc:doc>
798+ </signal>
799+
800+ <!-- ************************************************************ -->
801+
802+ <signal name="DeviceChanged">
803+ <arg type="o" name="device" direction="out">
804+ <doc:doc><doc:summary>
805+ The object path for the device that was changed
806+ </doc:summary></doc:doc>
807+ </arg>
808+
809+ <doc:doc>
810+ <doc:description>
811+ <doc:para>
812+ Emitted when a device is changed.
813+ </doc:para>
814+ </doc:description>
815+ </doc:doc>
816+ </signal>
817+
818+ <!-- ************************************************************ -->
819+
820+ <signal name="FlightModeChanged">
821+ <arg type="b" name="flight_mode" direction="out">
822+ <doc:doc><doc:summary>
823+ TRUE if flight mode has been enabled, otherwise FALSE
824+ </doc:summary></doc:doc>
825+ </arg>
826+
827+ <doc:doc>
828+ <doc:description>
829+ <doc:para>
830+ Emitted when flight mode is enabled or disabled.
831+ </doc:para>
832+ </doc:description>
833+ </doc:doc>
834+ </signal>
835+
836+ <!-- ************************************************************ -->
837+
838+ <signal name="UrfkeyPressed">
839+ <arg type="i" name="keycode" direction="out">
840+ <doc:doc><doc:summary>
841+ The keycode emitted from the input device
842+ </doc:summary></doc:doc>
843+ </arg>
844+
845+ <doc:doc>
846+ <doc:description>
847+ <doc:para>
848+ Emitted when a rfkill key is pressed. The keycode is defined in
849+ &lt;linux/input.h&gt;.
850+ </doc:para>
851+ <doc:list>
852+ <doc:item>
853+ <doc:term>237</doc:term><doc:definition>KEY_BLUETOOTH</doc:definition>
854+ </doc:item>
855+ <doc:item>
856+ <doc:term>238</doc:term><doc:definition>KEY_WLAN</doc:definition>
857+ </doc:item>
858+ <doc:item>
859+ <doc:term>239</doc:term><doc:definition>KEY_UWB</doc:definition>
860+ </doc:item>
861+ <doc:item>
862+ <doc:term>246</doc:term><doc:definition>KEY_WIMAX</doc:definition>
863+ </doc:item>
864+ <doc:item>
865+ <doc:term>247</doc:term><doc:definition>KEY_RFKILL</doc:definition>
866+ </doc:item>
867+ </doc:list>
868+ </doc:description>
869+ </doc:doc>
870+ </signal>
871+
872+ <!-- ************************************************************ -->
873+
874+ <property name="DaemonVersion" type="s" access="read">
875+ <doc:doc>
876+ <doc:description>
877+ <doc:para>
878+ The version the running daemon. e.g. 0.2.0
879+ </doc:para>
880+ </doc:description>
881+ </doc:doc>
882+ </property>
883+
884+ <property name="KeyControl" type="b" access="read">
885+ <doc:doc>
886+ <doc:description>
887+ <doc:para>
888+ Whether the key control is enabled or not
889+ </doc:para>
890+ </doc:description>
891+ </doc:doc>
892+ </property>
893+
894+ </interface>
895+</node>
896
897=== modified file 'debian/changelog'
898--- debian/changelog 2014-07-30 17:58:36 +0000
899+++ debian/changelog 2015-03-31 10:40:18 +0000
900@@ -1,3 +1,9 @@
901+libqtdbusmock (0.3-0ubuntu1) UNRELEASED; urgency=medium
902+
903+ * Add support for urfkill, ofono and futher network manager support.
904+
905+ -- Pete Woods <pete.woods@canonical.com> Fri, 06 Mar 2015 15:30:04 +0000
906+
907 libqtdbusmock (0.2+14.10.20140730-0ubuntu1) utopic; urgency=medium
908
909 [ Mathieu Trudel-Lapierre ]
910
911=== modified file 'debian/control'
912--- debian/control 2014-01-28 10:15:03 +0000
913+++ debian/control 2015-03-31 10:40:18 +0000
914@@ -9,7 +9,7 @@
915 libqtdbustest1-dev,
916 network-manager-dev,
917 pkg-config,
918- python3-dbusmock,
919+ python3-dbusmock (>= 0.14),
920 qtbase5-dev,
921 valgrind [!arm64 !ppc64el],
922 Standards-Version: 3.9.4
923
924=== modified file 'debian/libqtdbusmock1.symbols'
925--- debian/libqtdbusmock1.symbols 2014-07-25 03:53:40 +0000
926+++ debian/libqtdbusmock1.symbols 2015-03-31 10:40:18 +0000
927@@ -36,8 +36,19 @@
928 (c++)"QtDBusMock::DBusMock::registerMetaTypes()@Base" 0.1
929 (c++)"QtDBusMock::DBusMock::registerCustomMock(QString const&, QString const&, QString const&, QDBusConnection::BusType)@Base" 0.1
930 (c++)"QtDBusMock::DBusMock::registerNetworkManager()@Base" 0.1
931+ (c++)"QtDBusMock::DBusMock::registerNotificationDaemon()@Base" 0replaceme
932+ (c++)"QtDBusMock::DBusMock::registerOfono()@Base" 0replaceme
933+ (c++)"QtDBusMock::DBusMock::registerURfkill()@Base" 0replaceme
934 (c++)"QtDBusMock::DBusMock::registerTemplate(QString const&, QString const&, QDBusConnection::BusType)@Base" 0changeme
935 (c++)"QtDBusMock::DBusMock::networkManagerInterface()@Base" 0.1
936+ (c++)"QtDBusMock::DBusMock::notificationDaemonInterface()@Base" 0replaceme
937+ (c++)"QtDBusMock::DBusMock::ofonoInterface()@Base" 0replaceme
938+ (c++)"QtDBusMock::DBusMock::ofonoModemInterface(QString const&)@Base" 0replaceme
939+ (c++)"QtDBusMock::DBusMock::ofonoSimManagerInterface(QString const&)@Base" 0replaceme
940+ (c++)"QtDBusMock::DBusMock::ofonoConnectionManagerInterface(QString const&)@Base" 0replaceme
941+ (c++)"QtDBusMock::DBusMock::ofonoNetworkRegistrationInterface(QString const&)@Base" 0replaceme
942+ (c++)"QtDBusMock::DBusMock::urfkillInterface()@Base" 0replaceme
943+ (c++)"QtDBusMock::DBusMock::urfkillKillswitchInterface(QString const&)@Base" 0replaceme
944 (c++)"QtDBusMock::DBusMock::DBusMock(QtDBusTest::DBusTestRunner&)@Base" 0.1
945 (c++)"QtDBusMock::DBusMock::DBusMock(QtDBusTest::DBusTestRunner&)@Base" 0.1
946 (c++)"QtDBusMock::DBusMock::~DBusMock()@Base" 0.1
947@@ -47,10 +58,17 @@
948 (c++)"NetworkManagerMockInterface::qt_metacast(char const*)@Base" 0.1
949 (c++)"NetworkManagerMockInterface::staticMetaObject@Base" 0.1
950 (c++)"NetworkManagerMockInterface::NetworkManagerMockInterface(QString const&, QString const&, QDBusConnection const&, QObject*)@Base" 0.1
951- (c++)"NetworkManagerMockInterface::NetworkManagerMockInterface(QString const&, QString const&, QDBusConnection const&, QObject*)@Base" 0.1
952- (c++)"NetworkManagerMockInterface::~NetworkManagerMockInterface()@Base" 0.1
953- (c++)"NetworkManagerMockInterface::~NetworkManagerMockInterface()@Base" 0.1
954- (c++)"NetworkManagerMockInterface::~NetworkManagerMockInterface()@Base" 0.1
955+ (c++)"NetworkManagerMockInterface::~NetworkManagerMockInterface()@Base" 0.1
956+ (c++)"NetworkManagerMockInterface::AddWiFiDevice(QString const&, QString const&, int)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
957+ (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" 0replaceme
958+ (c++)"NetworkManagerMockInterface::SetDeviceActive(QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
959+ (c++)"NetworkManagerMockInterface::AddWiFiConnection(QString const&, QString const&, QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
960+ (c++)"NetworkManagerMockInterface::RemoveAccessPoint(QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
961+ (c++)"NetworkManagerMockInterface::AddActiveConnection(QStringList const&, QString const&, QString const&, QString const&, unsigned int)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
962+ (c++)"NetworkManagerMockInterface::RemoveWifiConnection(QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
963+ (c++)"NetworkManagerMockInterface::RemoveActiveConnection(QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
964+ (c++)"NetworkManagerMockInterface::SetGlobalConnectionState(unsigned int)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
965+ (c++)"NetworkManagerMockInterface::SetProperty(QString const&, QString const&, QString const&, QDBusVariant const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
966 (c++)"OrgFreedesktopDBusMockInterface::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.1
967 (c++)"OrgFreedesktopDBusMockInterface::qt_metacast(char const*)@Base" 0.1
968 (c++)"OrgFreedesktopDBusMockInterface::MethodCalled(QString const&, QList<QVariant> const&)@Base" 0.1
969@@ -60,6 +78,20 @@
970 (c++)"OrgFreedesktopDBusMockInterface::~OrgFreedesktopDBusMockInterface()@Base" 0.1
971 (c++)"OrgFreedesktopDBusMockInterface::~OrgFreedesktopDBusMockInterface()@Base" 0.1
972 (c++)"OrgFreedesktopDBusMockInterface::~OrgFreedesktopDBusMockInterface()@Base" 0.1
973+ (c++)"OrgFreedesktopDBusMockInterface::AddMethods(QString const&, QList<QtDBusMock::Method> const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
974+ (c++)"OrgFreedesktopDBusMockInterface::ClearCalls()::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
975+ (c++)"OrgFreedesktopDBusMockInterface::EmitSignal(QString const&, QString const&, QString const&, QList<QVariant> const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
976+ (c++)"OrgFreedesktopDBusMockInterface::AddProperty(QString const&, QString const&, QDBusVariant const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
977+ (c++)"OrgFreedesktopDBusMockInterface::AddTemplate(QString const&, QMap<QString, QVariant> const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
978+ (c++)"OrgFreedesktopDBusMockInterface::RemoveObject(QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
979+ (c++)"OrgFreedesktopDBusMockInterface::AddProperties(QString const&, QMap<QString, QVariant> const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
980+ (c++)"OrgFreedesktopDBusMockInterface::GetMethodCalls(QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
981+ (c++)"OrgFreedesktopDBusMockInterface::GetCalls()::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
982+ (c++)"OrgFreedesktopDBusMockInterface::AddMethod(QString const&, QString const&, QString const&, QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
983+ (c++)"OrgFreedesktopDBusMockInterface::AddObject(QString const&, QString const&, QMap<QString, QVariant> const&, QList<QtDBusMock::Method> const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
984+ (c++)"OrgFreedesktopDBusPropertiesInterface::Get(QString const&, QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
985+ (c++)"OrgFreedesktopDBusPropertiesInterface::Set(QString const&, QString const&, QVariant const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
986+ (c++)"OrgFreedesktopDBusPropertiesInterface::GetAll(QString const&)::{lambda()#1}::operator()() const::qstring_literal@Base" 0replaceme
987 (c++)"OrgFreedesktopDBusPropertiesInterface::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.1
988 (c++)"OrgFreedesktopDBusPropertiesInterface::qt_metacast(char const*)@Base" 0.1
989 (c++)"OrgFreedesktopDBusPropertiesInterface::staticMetaObject@Base" 0.1
990
991=== modified file 'src/libqtdbusmock/CMakeLists.txt'
992--- src/libqtdbusmock/CMakeLists.txt 2013-08-05 12:54:11 +0000
993+++ src/libqtdbusmock/CMakeLists.txt 2015-03-31 10:40:18 +0000
994@@ -19,6 +19,15 @@
995 "${CMAKE_CURRENT_BINARY_DIR}/MockInterface.h"
996 "${CMAKE_CURRENT_BINARY_DIR}/PropertiesInterface.h"
997 "${CMAKE_CURRENT_BINARY_DIR}/NetworkManagerMockInterface.h"
998+ "${CMAKE_CURRENT_BINARY_DIR}/NotificationDaemonMockInterface.h"
999+ "${CMAKE_CURRENT_BINARY_DIR}/OfonoMockInterface.h"
1000+ "${CMAKE_CURRENT_BINARY_DIR}/OfonoModemInterface.h"
1001+ "${CMAKE_CURRENT_BINARY_DIR}/OfonoConnectionManagerInterface.h"
1002+ "${CMAKE_CURRENT_BINARY_DIR}/OfonoSimManagerInterface.h"
1003+ "${CMAKE_CURRENT_BINARY_DIR}/OfonoNetworkRegistrationInterface.h"
1004+ "${CMAKE_CURRENT_BINARY_DIR}/URfkillInterface.h"
1005+ "${CMAKE_CURRENT_BINARY_DIR}/URfkillDeviceInterface.h"
1006+ "${CMAKE_CURRENT_BINARY_DIR}/URfkillKillswitchInterface.h"
1007 )
1008
1009 set_source_files_properties(
1010@@ -43,6 +52,48 @@
1011 INCLUDE "libqtdbusmock/ExportInterfaces.h"
1012 )
1013
1014+set_source_files_properties(
1015+ "${DATA_DIR}/notification-daemon-mock.xml"
1016+ PROPERTIES
1017+ NO_NAMESPACE YES
1018+ CLASSNAME NotificationDaemonMockInterface
1019+)
1020+
1021+set_source_files_properties(
1022+ "${DATA_DIR}/ofono-mock.xml"
1023+ PROPERTIES
1024+ NO_NAMESPACE YES
1025+ CLASSNAME OfonoMockInterface
1026+)
1027+
1028+set_source_files_properties(
1029+ "${DATA_DIR}/ofono-modem-mock.xml"
1030+ PROPERTIES
1031+ NO_NAMESPACE YES
1032+ CLASSNAME OfonoModemInterface
1033+)
1034+
1035+set_source_files_properties(
1036+ "${DATA_DIR}/ofono-simmanager.xml"
1037+ PROPERTIES
1038+ NO_NAMESPACE YES
1039+ CLASSNAME OfonoSimManagerInterface
1040+)
1041+
1042+set_source_files_properties(
1043+ "${DATA_DIR}/ofono-connectionmanager.xml"
1044+ PROPERTIES
1045+ NO_NAMESPACE YES
1046+ CLASSNAME OfonoConnectionManagerInterface
1047+)
1048+
1049+set_source_files_properties(
1050+ "${DATA_DIR}/ofono-networkregistration.xml"
1051+ PROPERTIES
1052+ NO_NAMESPACE YES
1053+ CLASSNAME OfonoNetworkRegistrationInterface
1054+)
1055+
1056 qt5_add_dbus_interface(
1057 QTDBUSMOCK_SRC
1058 "${DATA_DIR}/org.freedesktop.DBus.Mock.xml"
1059@@ -61,6 +112,78 @@
1060 NetworkManagerMockInterface
1061 )
1062
1063+qt5_add_dbus_interface(
1064+ QTDBUSMOCK_SRC
1065+ "${DATA_DIR}/notification-daemon-mock.xml"
1066+ NotificationDaemonMockInterface
1067+)
1068+
1069+qt5_add_dbus_interface(
1070+ QTDBUSMOCK_SRC
1071+ "${DATA_DIR}/ofono-mock.xml"
1072+ OfonoMockInterface
1073+)
1074+
1075+qt5_add_dbus_interface(
1076+ QTDBUSMOCK_SRC
1077+ "${DATA_DIR}/ofono-modem-mock.xml"
1078+ OfonoModemInterface
1079+)
1080+
1081+qt5_add_dbus_interface(
1082+ QTDBUSMOCK_SRC
1083+ "${DATA_DIR}/ofono-connectionmanager.xml"
1084+ OfonoConnectionManagerInterface
1085+)
1086+
1087+qt5_add_dbus_interface(
1088+ QTDBUSMOCK_SRC
1089+ "${DATA_DIR}/ofono-simmanager.xml"
1090+ OfonoSimManagerInterface
1091+)
1092+
1093+qt5_add_dbus_interface(
1094+ QTDBUSMOCK_SRC
1095+ "${DATA_DIR}/ofono-networkregistration.xml"
1096+ OfonoNetworkRegistrationInterface
1097+)
1098+
1099+set_source_files_properties(
1100+ "${DATA_DIR}/org.freedesktop.URfkill.xml"
1101+ PROPERTIES
1102+ NO_NAMESPACE YES
1103+)
1104+
1105+set_source_files_properties(
1106+ "${DATA_DIR}/org.freedesktop.URfkill.Device.xml"
1107+ PROPERTIES
1108+ NO_NAMESPACE YES
1109+)
1110+
1111+set_source_files_properties(
1112+ "${DATA_DIR}/org.freedesktop.URfkill.Killswitch.xml"
1113+ PROPERTIES
1114+ NO_NAMESPACE YES
1115+)
1116+
1117+qt5_add_dbus_interface(
1118+ QTDBUSMOCK_SRC
1119+ "${DATA_DIR}/org.freedesktop.URfkill.xml"
1120+ URfkillInterface
1121+)
1122+
1123+qt5_add_dbus_interface(
1124+ QTDBUSMOCK_SRC
1125+ "${DATA_DIR}/org.freedesktop.URfkill.Device.xml"
1126+ URfkillDeviceInterface
1127+)
1128+
1129+qt5_add_dbus_interface(
1130+ QTDBUSMOCK_SRC
1131+ "${DATA_DIR}/org.freedesktop.URfkill.Killswitch.xml"
1132+ URfkillKillswitchInterface
1133+)
1134+
1135 add_library(
1136 qtdbusmock
1137 SHARED
1138
1139=== modified file 'src/libqtdbusmock/DBusMock.cpp'
1140--- src/libqtdbusmock/DBusMock.cpp 2014-07-25 03:53:40 +0000
1141+++ src/libqtdbusmock/DBusMock.cpp 2015-03-31 10:40:18 +0000
1142@@ -35,6 +35,22 @@
1143
1144 QScopedPointer<NetworkManagerMockInterface> m_networkManagerMock;
1145
1146+ QScopedPointer<NotificationDaemonMockInterface> m_notificationDaemonMock;
1147+
1148+ QScopedPointer<OfonoMockInterface> m_ofonoInterface;
1149+
1150+ QMap<QString, QSharedPointer<OfonoModemInterface>> m_ofonoModemInterface;
1151+
1152+ QMap<QString, QSharedPointer<OfonoSimManagerInterface>> m_ofonoSimManagerInterface;
1153+
1154+ QMap<QString, QSharedPointer<OfonoConnectionManagerInterface>> m_ofonoConnectionManagerInterface;
1155+
1156+ QMap<QString, QSharedPointer<OfonoNetworkRegistrationInterface>> m_ofonoNetworkRegistrationInterface;
1157+
1158+ QScopedPointer<OrgFreedesktopURfkillInterface> m_urfkillInterface;
1159+
1160+ QMap<QString, QSharedPointer<OrgFreedesktopURfkillKillswitchInterface> > m_urfkillKillSwitchInterfaces;
1161+
1162 QMap<QString, QSharedPointer<OrgFreedesktopDBusMockInterface> > m_mockInterfaces;
1163 };
1164
1165@@ -66,6 +82,18 @@
1166 registerTemplate(NM_DBUS_SERVICE, "networkmanager", QDBusConnection::SystemBus);
1167 }
1168
1169+void DBusMock::registerNotificationDaemon() {
1170+ registerTemplate("org.freedesktop.Notifications", "notification_daemon", QDBusConnection::SessionBus);
1171+}
1172+
1173+void DBusMock::registerOfono() {
1174+ registerTemplate("org.ofono", "ofono", QDBusConnection::SystemBus);
1175+}
1176+
1177+void DBusMock::registerURfkill() {
1178+ registerTemplate("org.freedesktop.URfkill", "urfkill", QDBusConnection::SystemBus);
1179+}
1180+
1181 void DBusMock::registerCustomMock(const QString &name, const QString &path,
1182 const QString &interface, QDBusConnection::BusType busType) {
1183 QStringList args;
1184@@ -88,6 +116,97 @@
1185 return *d->m_networkManagerMock;
1186 }
1187
1188+NotificationDaemonMockInterface & DBusMock::notificationDaemonInterface() {
1189+ if (d->m_notificationDaemonMock.isNull()) {
1190+ d->m_notificationDaemonMock.reset(
1191+ new NotificationDaemonMockInterface("org.freedesktop.Notifications",
1192+ "/org/freedesktop/Notifications",
1193+ d->m_testRunner.sessionConnection()));
1194+ }
1195+ return *d->m_notificationDaemonMock;
1196+}
1197+
1198+OfonoMockInterface & DBusMock::ofonoInterface() {
1199+ if (d->m_ofonoInterface.isNull()) {
1200+ d->m_ofonoInterface.reset(
1201+ new OfonoMockInterface("org.ofono", "/",
1202+ d->m_testRunner.systemConnection()));
1203+ }
1204+ return *d->m_ofonoInterface;
1205+}
1206+
1207+OfonoModemInterface & DBusMock::ofonoModemInterface(const QString& path) {
1208+ QSharedPointer<OfonoModemInterface> interface =
1209+ d->m_ofonoModemInterface[path];
1210+ if (!interface) {
1211+ interface.reset(
1212+ new OfonoModemInterface("org.ofono", path,
1213+ d->m_testRunner.systemConnection()));
1214+ d->m_ofonoModemInterface[path] = interface;
1215+ }
1216+ return *interface;
1217+}
1218+
1219+OfonoSimManagerInterface & DBusMock::ofonoSimManagerInterface(const QString& path) {
1220+ QSharedPointer<OfonoSimManagerInterface> interface =
1221+ d->m_ofonoSimManagerInterface[path];
1222+ if (!interface) {
1223+ interface.reset(
1224+ new OfonoSimManagerInterface("org.ofono", path,
1225+ d->m_testRunner.systemConnection()));
1226+ d->m_ofonoSimManagerInterface[path] = interface;
1227+ }
1228+ return *interface;
1229+}
1230+
1231+OfonoConnectionManagerInterface & DBusMock::ofonoConnectionManagerInterface(const QString& path) {
1232+ QSharedPointer<OfonoConnectionManagerInterface> interface =
1233+ d->m_ofonoConnectionManagerInterface[path];
1234+ if (!interface) {
1235+ interface.reset(
1236+ new OfonoConnectionManagerInterface("org.ofono", path,
1237+ d->m_testRunner.systemConnection()));
1238+ d->m_ofonoConnectionManagerInterface[path] = interface;
1239+ }
1240+ return *interface;
1241+}
1242+
1243+OfonoNetworkRegistrationInterface & DBusMock::ofonoNetworkRegistrationInterface(const QString& path) {
1244+ QSharedPointer<OfonoNetworkRegistrationInterface> interface =
1245+ d->m_ofonoNetworkRegistrationInterface[path];
1246+ if (!interface) {
1247+ interface.reset(
1248+ new OfonoNetworkRegistrationInterface("org.ofono", path,
1249+ d->m_testRunner.systemConnection()));
1250+ d->m_ofonoNetworkRegistrationInterface[path] = interface;
1251+ }
1252+ return *interface;
1253+}
1254+
1255+OrgFreedesktopURfkillInterface & DBusMock::urfkillInterface() {
1256+ if (d->m_urfkillInterface.isNull()) {
1257+ d->m_urfkillInterface.reset(
1258+ new OrgFreedesktopURfkillInterface(
1259+ "org.freedesktop.URfkill", "/org/freedesktop/URfkill",
1260+ d->m_testRunner.systemConnection()));
1261+ }
1262+ return *d->m_urfkillInterface;
1263+}
1264+
1265+OrgFreedesktopURfkillKillswitchInterface & DBusMock::urfkillKillswitchInterface(const QString& device)
1266+{
1267+ QSharedPointer<OrgFreedesktopURfkillKillswitchInterface> interface = d->m_urfkillKillSwitchInterfaces[device];
1268+ if (!interface) {
1269+ interface.reset(
1270+ new OrgFreedesktopURfkillKillswitchInterface(
1271+ "org.freedesktop.URfkill",
1272+ QString("/org/freedesktop/URfkill/%1").arg(device),
1273+ d->m_testRunner.systemConnection()));
1274+ d->m_urfkillKillSwitchInterfaces[device] = interface;
1275+ }
1276+ return *interface;
1277+}
1278+
1279 OrgFreedesktopDBusMockInterface & DBusMock::mockInterface(const QString &name,
1280 const QString &path, const QString &interface,
1281 QDBusConnection::BusType busType) {
1282
1283=== modified file 'src/libqtdbusmock/DBusMock.h'
1284--- src/libqtdbusmock/DBusMock.h 2014-07-25 15:09:44 +0000
1285+++ src/libqtdbusmock/DBusMock.h 2015-03-31 10:40:18 +0000
1286@@ -22,7 +22,15 @@
1287 #include <libqtdbustest/DBusTestRunner.h>
1288 #include <libqtdbusmock/MockInterface.h>
1289 #include <libqtdbusmock/NetworkManagerMockInterface.h>
1290+#include <libqtdbusmock/NotificationDaemonMockInterface.h>
1291+#include <libqtdbusmock/OfonoMockInterface.h>
1292+#include <libqtdbusmock/OfonoModemInterface.h>
1293+#include <libqtdbusmock/OfonoConnectionManagerInterface.h>
1294+#include <libqtdbusmock/OfonoSimManagerInterface.h>
1295+#include <libqtdbusmock/OfonoNetworkRegistrationInterface.h>
1296 #include <libqtdbusmock/MockInterfaceClasses.h>
1297+#include <libqtdbusmock/URfkillInterface.h>
1298+#include <libqtdbusmock/URfkillKillswitchInterface.h>
1299
1300 namespace QtDBusMock {
1301
1302@@ -43,15 +51,37 @@
1303
1304 virtual void registerNetworkManager();
1305
1306+ virtual void registerNotificationDaemon();
1307+
1308+ virtual void registerOfono();
1309+
1310+ virtual void registerURfkill();
1311+
1312 virtual void registerCustomMock(const QString &name, const QString &path,
1313 const QString &interface, QDBusConnection::BusType);
1314
1315 virtual NetworkManagerMockInterface & networkManagerInterface();
1316
1317+ virtual NotificationDaemonMockInterface & notificationDaemonInterface();
1318+
1319 virtual OrgFreedesktopDBusMockInterface & mockInterface(const QString &name,
1320 const QString &path, const QString &interface,
1321 QDBusConnection::BusType busType);
1322
1323+ virtual OfonoMockInterface & ofonoInterface();
1324+
1325+ virtual OfonoModemInterface & ofonoModemInterface(const QString &path);
1326+
1327+ virtual OfonoSimManagerInterface & ofonoSimManagerInterface(const QString &path);
1328+
1329+ virtual OfonoConnectionManagerInterface & ofonoConnectionManagerInterface(const QString &path);
1330+
1331+ virtual OfonoNetworkRegistrationInterface & ofonoNetworkRegistrationInterface(const QString &path);
1332+
1333+ virtual OrgFreedesktopURfkillInterface & urfkillInterface();
1334+
1335+ virtual OrgFreedesktopURfkillKillswitchInterface & urfkillKillswitchInterface(const QString& device);
1336+
1337 private:
1338 QSharedPointer<DBusMockPrivate> d;
1339 };

Subscribers

People subscribed via source and target branches

to all changes: