Merge lp:~unity-api-team/indicator-network/port-to-qdbus-14.09 into lp:indicator-network/14.09

Proposed by Pete Woods
Status: Merged
Approved by: Pete Woods
Approved revision: 475
Merged at revision: 473
Proposed branch: lp:~unity-api-team/indicator-network/port-to-qdbus-14.09
Merge into: lp:indicator-network/14.09
Diff against target: 24141 lines (+12119/-8529)
143 files modified
CMakeLists.txt (+8/-15)
cmake/FindGObjectIntrospection.cmake (+0/-61)
cmake/FindValgrind.cmake (+13/-13)
cmake/UseGObjectIntrospection.cmake (+0/-100)
data/com.ubuntu.connectivity1.NetworkingStatus.xml (+11/-0)
data/com.ubuntu.connectivity1.Private.xml (+15/-0)
data/nm-access-point.xml (+93/-0)
data/nm-active-connection.xml (+145/-0)
data/nm-device-wifi.xml (+132/-0)
data/nm-device.xml (+598/-0)
data/nm-manager.xml (+412/-0)
data/nm-settings-connection.xml (+157/-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/control (+6/-8)
sniffer/CMakeLists.txt (+36/-0)
sniffer/eventprinter.h (+70/-0)
sniffer/i-n-extractor.cpp (+152/-0)
src/CMakeLists.txt (+3/-2)
src/connectivity-cpp/CMakeLists.txt (+6/-16)
src/connectivity-cpp/dbus-cpp/services/nm.h (+0/-979)
src/connectivity-cpp/dbus-cpp/services/ofono.h (+0/-339)
src/connectivity-cpp/dbus-cpp/services/urfkill.h (+0/-338)
src/connectivity-cpp/dbus-cpp/services/util.h (+0/-36)
src/connectivity-cpp/include/connectivity/networking/service.h (+0/-83)
src/connectivity-cpp/include/connectivity/networking/service/tethering/service.h (+0/-59)
src/connectivity-cpp/include/connectivity/networking/service/tor/service.h (+0/-46)
src/connectivity-cpp/include/connectivity/networking/service/vpn/service.h (+0/-49)
src/connectivity-cpp/src/CMakeLists.txt (+24/-5)
src/connectivity-cpp/src/platform/nmofono/CMakeLists.txt (+0/-42)
src/connectivity-cpp/src/platform/nmofono/bounded_integer.h (+0/-178)
src/connectivity-cpp/src/platform/nmofono/manager_ref.h (+0/-483)
src/connectivity-cpp/src/platform/nmofono/ofono_nm_connectivity_manager.cpp (+0/-338)
src/connectivity-cpp/src/platform/nmofono/service.cpp (+0/-18)
src/connectivity-cpp/src/platform/nmofono/service.h (+0/-47)
src/connectivity-cpp/src/platform/nmofono/set_name_for_thread.cpp (+0/-24)
src/connectivity-cpp/src/platform/nmofono/set_name_for_thread.h (+0/-28)
src/connectivity-cpp/src/platform/util.cpp (+0/-33)
src/dbus-cpp/CMakeLists.txt (+0/-1)
src/dbus-cpp/services/ofono.h (+0/-1574)
src/indicator/CMakeLists.txt (+97/-28)
src/indicator/connectivity-service/connectivity-service.cpp (+155/-337)
src/indicator/connectivity-service/connectivity-service.h (+55/-19)
src/indicator/factory.cpp (+129/-0)
src/indicator/factory.h (+67/-0)
src/indicator/indicator-menu.cpp (+99/-0)
src/indicator/indicator-menu.h (+14/-63)
src/indicator/main.cpp (+27/-69)
src/indicator/menu-builder.cpp (+143/-0)
src/indicator/menu-builder.h (+19/-154)
src/indicator/menuitems/access-point-item.cpp (+15/-44)
src/indicator/menuitems/access-point-item.h (+6/-2)
src/indicator/menuitems/item.h (+2/-1)
src/indicator/menuitems/modem-info-item.cpp (+23/-33)
src/indicator/menuitems/modem-info-item.h (+11/-9)
src/indicator/menuitems/switch-item.cpp (+75/-0)
src/indicator/menuitems/switch-item.h (+22/-50)
src/indicator/menuitems/text-item.cpp (+42/-0)
src/indicator/menuitems/text-item.h (+7/-27)
src/indicator/menuitems/wifi-link-item.cpp (+14/-30)
src/indicator/menuitems/wifi-link-item.h (+1/-1)
src/indicator/menuitems/wwan-link-item.cpp (+38/-42)
src/indicator/modem-manager.cpp (+97/-175)
src/indicator/modem-manager.h (+15/-9)
src/indicator/modem.cpp (+527/-282)
src/indicator/modem.h (+110/-74)
src/indicator/nmofono/kill-switch-impl.cpp (+90/-46)
src/indicator/nmofono/kill-switch-impl.h (+23/-13)
src/indicator/nmofono/link.h (+15/-5)
src/indicator/nmofono/manager-impl.cpp (+186/-193)
src/indicator/nmofono/manager-impl.h (+19/-20)
src/indicator/nmofono/manager.cpp (+1/-18)
src/indicator/nmofono/manager.h (+37/-36)
src/indicator/nmofono/wifi/access-point-impl.cpp (+50/-32)
src/indicator/nmofono/wifi/access-point-impl.h (+24/-22)
src/indicator/nmofono/wifi/access-point.cpp (+36/-0)
src/indicator/nmofono/wifi/access-point.h (+16/-6)
src/indicator/nmofono/wifi/grouped-access-point-impl.cpp (+67/-81)
src/indicator/nmofono/wifi/grouped-access-point-impl.h (+14/-16)
src/indicator/nmofono/wifi/wifi-link-impl.cpp (+346/-325)
src/indicator/nmofono/wifi/wifi-link-impl.h (+25/-31)
src/indicator/nmofono/wifi/wifi-link.h (+14/-6)
src/indicator/root-state.cpp (+93/-90)
src/indicator/root-state.h (+10/-4)
src/indicator/sections/quick-access-section.cpp (+58/-55)
src/indicator/sections/quick-access-section.h (+4/-3)
src/indicator/sections/wifi-section.cpp (+51/-54)
src/indicator/sections/wifi-section.h (+4/-2)
src/indicator/sections/wwan-section.cpp (+24/-23)
src/indicator/sections/wwan-section.h (+1/-1)
src/indicator/sim-unlock-dialog.cpp (+163/-144)
src/indicator/sim-unlock-dialog.h (+16/-5)
src/indicator/util/unix-signal-handler.cpp (+101/-0)
src/indicator/util/unix-signal-handler.h (+59/-0)
src/menumodel-cpp/CMakeLists.txt (+6/-0)
src/menumodel-cpp/action-group-exporter.cpp (+128/-0)
src/menumodel-cpp/action-group-exporter.h (+17/-51)
src/menumodel-cpp/action-group-merger.cpp (+108/-0)
src/menumodel-cpp/action-group-merger.h (+18/-101)
src/menumodel-cpp/action-group.cpp (+59/-0)
src/menumodel-cpp/action-group.h (+22/-59)
src/menumodel-cpp/action.cpp (+31/-39)
src/menumodel-cpp/action.h (+15/-13)
src/menumodel-cpp/gio-helpers/util.cpp (+19/-37)
src/menumodel-cpp/gio-helpers/util.h (+4/-50)
src/menumodel-cpp/gio-helpers/variant.h (+21/-2)
src/menumodel-cpp/menu-exporter.h (+1/-0)
src/menumodel-cpp/menu-item.cpp (+119/-0)
src/menumodel-cpp/menu-item.h (+25/-107)
src/menumodel-cpp/menu-merger.h (+9/-12)
src/menumodel-cpp/menu-model.h (+4/-1)
src/menumodel-cpp/menu.cpp (+170/-0)
src/menumodel-cpp/menu.h (+24/-160)
src/notify-cpp/notification.cpp (+92/-58)
src/notify-cpp/notification.h (+39/-17)
src/notify-cpp/snapdecision/sim-unlock.cpp (+122/-85)
src/notify-cpp/snapdecision/sim-unlock.h (+45/-23)
src/qdbus-stubs/CMakeLists.txt (+115/-0)
src/qdbus-stubs/DBusTypes.h (+51/-0)
src/qdbus-stubs/backend-utils.h (+42/-0)
src/secret-agent/CMakeLists.txt (+0/-1)
tests/CMakeLists.txt (+1/-0)
tests/autopilot/indicator_network/data/pin-unlock.xml (+3/-3)
tests/data/phonesim/pin-unlock.xml (+3/-3)
tests/integration/CMakeLists.txt (+2/-35)
tests/integration/indicator/CMakeLists.txt (+34/-0)
tests/integration/indicator/TestIndicatorNetworkService.cpp (+3258/-23)
tests/menuharness/CMakeLists.txt (+15/-0)
tests/menuharness/MatchResult.cpp (+179/-0)
tests/menuharness/MatchResult.h (+61/-0)
tests/menuharness/MatchUtils.cpp (+72/-0)
tests/menuharness/MatchUtils.h (+35/-0)
tests/menuharness/MenuItemMatcher.cpp (+837/-0)
tests/menuharness/MenuItemMatcher.h (+122/-0)
tests/menuharness/MenuMatcher.cpp (+201/-0)
tests/menuharness/MenuMatcher.h (+90/-0)
tests/unit/CMakeLists.txt (+5/-1)
tests/unit/indicator/menuitems/CMakeLists.txt (+1/-4)
tests/unit/indicator/menuitems/test-access-point-item.cpp (+6/-11)
tests/unit/menumodel-cpp/test-menu-exporter.cpp (+11/-23)
tests/unit/secret-agent/CMakeLists.txt (+0/-1)
tests/utils/main.cpp (+30/-14)
To merge this branch: bzr merge lp:~unity-api-team/indicator-network/port-to-qdbus-14.09
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+254772@code.launchpad.net

Commit message

Port all dbus interactions to QDBus

Description of the change

Port all dbus interactions to QDBus

To post a comment you must log in.
474. By Pete Woods

Insert the WifiLinkItem before the settings item

475. By Pete Woods

Cleanup

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 2015-02-16 18:34:37 +0000
3+++ CMakeLists.txt 2015-04-01 15:30:55 +0000
4@@ -18,6 +18,10 @@
5 add_definitions(-DINDICATOR_NETWORK_TRACE_MESSAGES)
6 endif()
7
8+add_definitions(
9+ -DQT_NO_KEYWORDS=1
10+)
11+
12 find_package(PkgConfig REQUIRED)
13 include(EnableCoverageReport)
14 include(GNUInstallDirs)
15@@ -44,14 +48,6 @@
16 )
17 include_directories(${GLIB_INCLUDE_DIRS})
18
19-set(NM_REQUIRED_VERSION 0.9)
20-pkg_check_modules(
21- NM REQUIRED
22- libnm-glib>=${NM_REQUIRED_VERSION}
23- libnm-util>=${NM_REQUIRED_VERSION}
24-)
25-include_directories(${NM_INCLUDE_DIRS})
26-
27 set(OFONO_REQUIRED_VERSION 1.12)
28 pkg_check_modules(
29 OFONO REQUIRED
30@@ -85,16 +81,12 @@
31 pkg_check_modules(QTDBUSMOCK REQUIRED libqtdbusmock-1 REQUIRED)
32 include_directories(${QTDBUSMOCK_INCLUDE_DIRS})
33
34-pkg_check_modules(QMENUMODEL REQUIRED qmenumodel REQUIRED)
35-include_directories(${QMENUMODEL_INCLUDE_DIRS})
36-
37 pkg_check_modules(GIO REQUIRED gio-2.0>=${GLIB_REQUIRED_VERSION})
38 include_directories(${GIO_INCLUDE_DIRS})
39
40+set(CMAKE_AUTOMOC ON)
41 set(CMAKE_INCLUDE_CURRENT_DIR ON)
42
43-find_package(GObjectIntrospection 0.9.12)
44-
45 include_directories(${CMAKE_BINARY_DIR})
46
47 set(COMMON_FLAGS "-Wall -Wextra -Wpedantic -fno-permissive -fPIC -fvisibility=hidden -pthread")
48@@ -102,7 +94,7 @@
49 # "nice bug" in cmake... http://www.cmake.org/Bug/view.php?id=15058
50 # let's not set C_FLAGS as it will break pthreads detection \o/
51 #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${COMMON_FLAGS}")
52-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${COMMON_FLAGS} -fno-strict-aliasing -fvisibility-inlines-hidden")
53+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 ${COMMON_FLAGS} -fno-strict-aliasing -fvisibility-inlines-hidden")
54
55 configure_file(
56 "config.h.in"
57@@ -136,5 +128,6 @@
58 ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure
59 )
60
61-enable_coverage_report(TARGETS menumodel_cpp connectivity-cpp indicator-secret-agent
62+#///! TODO: The following needs to be updated once this project takes form again and new unit tests are written
63+enable_coverage_report(TARGETS menumodel_cpp indicator-secret-agent
64 FILTER ${CMAKE_SOURCE_DIR}/tests/* ${CMAKE_BINARY_DIR}/*)
65
66=== removed file 'cmake/FindGObjectIntrospection.cmake'
67--- cmake/FindGObjectIntrospection.cmake 2013-08-27 13:48:41 +0000
68+++ cmake/FindGObjectIntrospection.cmake 1970-01-01 00:00:00 +0000
69@@ -1,61 +0,0 @@
70-# - try to find gobject-introspection
71-#
72-# Once done this will define
73-#
74-# INTROSPECTION_FOUND - system has gobject-introspection
75-# INTROSPECTION_SCANNER - the gobject-introspection scanner, g-ir-scanner
76-# INTROSPECTION_COMPILER - the gobject-introspection compiler, g-ir-compiler
77-# INTROSPECTION_GENERATE - the gobject-introspection generate, g-ir-generate
78-# INTROSPECTION_GIRDIR
79-# INTROSPECTION_TYPELIBDIR
80-# INTROSPECTION_CFLAGS
81-# INTROSPECTION_LIBS
82-#
83-# Copyright (C) 2010, Pino Toscano, <pino@kde.org>
84-#
85-# Redistribution and use is allowed according to the terms of the BSD license.
86-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
87-
88-macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname)
89- execute_process(
90- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${_varname} gobject-introspection-1.0
91- OUTPUT_VARIABLE _result
92- RESULT_VARIABLE _null
93- )
94-
95- if (_null)
96- else()
97- string(REGEX REPLACE "[\r\n]" " " _result "${_result}")
98- string(REGEX REPLACE " +$" "" _result "${_result}")
99- separate_arguments(_result)
100- set(${_outvar} ${_result} CACHE INTERNAL "")
101- endif()
102-endmacro(_GIR_GET_PKGCONFIG_VAR)
103-
104-find_package(PkgConfig)
105-if(PKG_CONFIG_FOUND)
106- if(PACKAGE_FIND_VERSION_COUNT GREATER 0)
107- set(_gir_version_cmp ">=${PACKAGE_FIND_VERSION}")
108- endif()
109- pkg_check_modules(_pc_gir gobject-introspection-1.0${_gir_version_cmp})
110- if(_pc_gir_FOUND)
111- set(INTROSPECTION_FOUND TRUE)
112- _gir_get_pkgconfig_var(INTROSPECTION_SCANNER "g_ir_scanner")
113- _gir_get_pkgconfig_var(INTROSPECTION_COMPILER "g_ir_compiler")
114- _gir_get_pkgconfig_var(INTROSPECTION_GENERATE "g_ir_generate")
115- _gir_get_pkgconfig_var(INTROSPECTION_GIRDIR "girdir")
116- _gir_get_pkgconfig_var(INTROSPECTION_TYPELIBDIR "typelibdir")
117- set(INTROSPECTION_CFLAGS "${_pc_gir_CFLAGS}")
118- set(INTROSPECTION_LIBS "${_pc_gir_LIBS}")
119- endif()
120-endif()
121-
122-mark_as_advanced(
123- INTROSPECTION_SCANNER
124- INTROSPECTION_COMPILER
125- INTROSPECTION_GENERATE
126- INTROSPECTION_GIRDIR
127- INTROSPECTION_TYPELIBDIR
128- INTROSPECTION_CFLAGS
129- INTROSPECTION_LIBS
130-)
131
132=== modified file 'cmake/FindValgrind.cmake'
133--- cmake/FindValgrind.cmake 2013-09-17 13:43:54 +0000
134+++ cmake/FindValgrind.cmake 2015-04-01 15:30:55 +0000
135@@ -14,10 +14,7 @@
136 set(VALGRIND_PROGRAM_OPTIONS
137 "--suppressions=${CMAKE_SOURCE_DIR}/tests/data/valgrind.suppression"
138 "--error-exitcode=1"
139- "--trace-children=yes"
140- "--trace-children-skip=*/python*,python*"
141 "--leak-check=full"
142- "--leak-resolution=high"
143 "--gen-suppressions=all"
144 "--quiet"
145 )
146@@ -28,14 +25,17 @@
147 VALGRIND_PROGRAM
148 )
149
150-function(add_valgrind_test NAME EXECUTABLE)
151- if(ENABLE_MEMCHECK_OPTION)
152- add_test(${NAME} ${VALGRIND_PROGRAM} ${VALGRIND_PROGRAM_OPTIONS} "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}")
153- set_tests_properties(
154- ${NAME}
155- PROPERTIES ENVIRONMENT "G_SLICE=always-malloc G_DEBUG=gc-friendly"
156- )
157- else()
158- add_test(${NAME} ${EXECUTABLE})
159- endif()
160+function(add_valgrind_test)
161+ foreach(_arg ${ARGN})
162+ if ("VALGRIND" STREQUAL ${_arg})
163+ if(ENABLE_MEMCHECK_OPTION AND VALGRIND_PROGRAM)
164+ list(APPEND _vgargs ${VALGRIND_PROGRAM} ${VALGRIND_PROGRAM_OPTIONS})
165+ endif()
166+ else()
167+ list(APPEND _vgargs ${_arg})
168+ endif()
169+ endforeach()
170+
171+ add_test(${_vgargs})
172 endfunction()
173+
174
175=== removed file 'cmake/UseGObjectIntrospection.cmake'
176--- cmake/UseGObjectIntrospection.cmake 2013-08-27 13:48:41 +0000
177+++ cmake/UseGObjectIntrospection.cmake 1970-01-01 00:00:00 +0000
178@@ -1,100 +0,0 @@
179-# Copyright (C) 2010, Pino Toscano, <pino@kde.org>
180-#
181-# Redistribution and use is allowed according to the terms of the BSD license.
182-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
183-
184-include(ListOperations)
185-
186-macro(_gir_list_prefix _outvar _listvar _prefix)
187- set(${_outvar})
188- foreach(_item IN LISTS ${_listvar})
189- list(APPEND ${_outvar} ${_prefix}${_item})
190- endforeach()
191-endmacro(_gir_list_prefix)
192-
193-macro(gir_add_introspections introspections_girs)
194-
195- foreach(gir IN LISTS ${introspections_girs})
196-
197- set(_gir_name "${gir}")
198-
199- ## Transform the gir filename to something which can reference through a variable
200- ## without automake/make complaining, eg Gtk-2.0.gir -> Gtk_2_0_gir
201- string(REPLACE "-" "_" _gir_name "${_gir_name}")
202- string(REPLACE "." "_" _gir_name "${_gir_name}")
203-
204- # Namespace and Version is either fetched from the gir filename
205- # or the _NAMESPACE/_VERSION variable combo
206- set(_gir_namespace "${${_gir_name}_NAMESPACE}")
207- if (_gir_namespace STREQUAL "")
208- string(REGEX REPLACE "([^-]+)-.*" "\\1" _gir_namespace "${gir}")
209- endif ()
210- set(_gir_version "${${_gir_name}_VERSION}")
211- if (_gir_version STREQUAL "")
212- string(REGEX REPLACE ".*-([^-]+).gir" "\\1" _gir_version "${gir}")
213- endif ()
214-
215- # _PROGRAM is an optional variable which needs it's own --program argument
216- set(_gir_program "${${_gir_name}_PROGRAM}")
217- if (NOT _gir_program STREQUAL "")
218- set(_gir_program "--program=${_gir_program}")
219- endif ()
220-
221- # Variables which provides a list of things
222- _gir_list_prefix(_gir_libraries ${_gir_name}_LIBS "--library=")
223- _gir_list_prefix(_gir_packages ${_gir_name}_PACKAGES "--pkg=")
224- _gir_list_prefix(_gir_includes ${_gir_name}_INCLUDES "--include=")
225- _gir_list_prefix(_gir_export_packages ${_gir_name}_EXPORT_PACKAGES "--pkg-export=")
226-
227- # Reuse the LIBTOOL variable from by automake if it's set
228- set(_gir_libtool "--no-libtool")
229-
230- add_custom_command(
231- COMMAND ${INTROSPECTION_SCANNER}
232- ${INTROSPECTION_SCANNER_ARGS}
233- --namespace=${_gir_namespace}
234- --nsversion=${_gir_version}
235- ${_gir_libtool}
236- ${_gir_program}
237- ${_gir_libraries}
238- ${_gir_packages}
239- ${_gir_includes}
240- ${_gir_export_packages}
241- ${${_gir_name}_SCANNERFLAGS}
242- ${${_gir_name}_CFLAGS}
243- ${${_gir_name}_FILES}
244- --output ${CMAKE_CURRENT_BINARY_DIR}/${gir}
245- DEPENDS ${${_gir_name}_FILES}
246- ${${_gir_name}_LIBS}
247- OUTPUT ${gir}
248- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
249- VERBATIM
250- )
251- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${gir} DESTINATION share/gir-1.0)
252-
253- string(REPLACE ".gir" ".typelib" _typelib "${gir}")
254- add_custom_command(
255- COMMAND ${INTROSPECTION_COMPILER}
256- ${INTROSPECTION_COMPILER_ARGS}
257- --includedir=.
258- ${CMAKE_CURRENT_BINARY_DIR}/${gir}
259- -o ${CMAKE_CURRENT_BINARY_DIR}/${_typelib}
260- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${gir}
261- OUTPUT ${_typelib}
262- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
263- )
264- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_typelib} DESTINATION ${CMAKE_INSTALL_LIBDIR}/girepository-1.0)
265-
266- add_custom_target(gir-${gir} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${gir})
267- add_custom_target(gir-typelibs-${_typelib} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_typelib})
268- endforeach()
269-
270-endmacro(gir_add_introspections)
271-
272-macro(gir_get_cflags _output)
273- get_directory_property(_tmp_includes INCLUDE_DIRECTORIES)
274- list_prefix(_includes _tmp_includes "-I")
275- get_directory_property(_tmp_compile_definitions COMPILE_DEFINITIONS)
276- list_prefix(_compile_definitions _tmp_compile_definitions "-D")
277- set(${_output} ${_includes} ${_compile_definitions})
278-endmacro(gir_get_cflags)
279
280=== added file 'data/com.ubuntu.connectivity1.NetworkingStatus.xml'
281--- data/com.ubuntu.connectivity1.NetworkingStatus.xml 1970-01-01 00:00:00 +0000
282+++ data/com.ubuntu.connectivity1.NetworkingStatus.xml 2015-04-01 15:30:55 +0000
283@@ -0,0 +1,11 @@
284+<?xml version="1.0" encoding="UTF-8" ?>
285+
286+<node name="/com/ubuntu/connectivity1/NetworkingStatus" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
287+ <interface name="com.ubuntu.connectivity1.NetworkingStatus">
288+
289+ <property name="Limitations" type="as" access="read"/>
290+ <property name="Status" type="s" access="read"/>
291+
292+ </interface>
293+</node>
294+
295
296=== added file 'data/com.ubuntu.connectivity1.Private.xml'
297--- data/com.ubuntu.connectivity1.Private.xml 1970-01-01 00:00:00 +0000
298+++ data/com.ubuntu.connectivity1.Private.xml 2015-04-01 15:30:55 +0000
299@@ -0,0 +1,15 @@
300+<?xml version="1.0" encoding="UTF-8" ?>
301+
302+<node name="/com/ubuntu/connectivity1/Private" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
303+ <interface name="com.ubuntu.connectivity1.Private">
304+
305+ <method name="UnlockAllModems">
306+ </method>
307+
308+ <method name="UnlockModem">
309+ <arg type="s" direction="in" name="modem"/>
310+ </method>
311+
312+ </interface>
313+</node>
314+
315
316=== added file 'data/nm-access-point.xml'
317--- data/nm-access-point.xml 1970-01-01 00:00:00 +0000
318+++ data/nm-access-point.xml 2015-04-01 15:30:55 +0000
319@@ -0,0 +1,93 @@
320+<?xml version="1.0" encoding="UTF-8" ?>
321+
322+<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
323+ <interface name="org.freedesktop.NetworkManager.AccessPoint">
324+ <property name="Flags" type="u" access="read" tp:type="NM_802_11_AP_FLAGS">
325+ <tp:docstring>Flags describing the capabilities of the access point.</tp:docstring>
326+ </property>
327+ <property name="WpaFlags" type="u" access="read" tp:type="NM_802_11_AP_SEC">
328+ <tp:docstring>Flags describing the access point's capabilities according to WPA (Wifi Protected Access).</tp:docstring>
329+ </property>
330+ <property name="RsnFlags" type="u" access="read" tp:type="NM_802_11_AP_SEC">
331+ <tp:docstring>Flags describing the access point's capabilities according to the RSN (Robust Secure Network) protocol.</tp:docstring>
332+ </property>
333+ <property name="Ssid" type="ay" access="read">
334+ <tp:docstring>The Service Set Identifier identifying the access point.</tp:docstring>
335+ </property>
336+ <property name="Frequency" type="u" access="read">
337+ <tp:docstring>The radio channel frequency in use by the access point, in MHz.</tp:docstring>
338+ </property>
339+ <property name="HwAddress" type="s" access="read">
340+ <tp:docstring>The hardware address (BSSID) of the access point.</tp:docstring>
341+ </property>
342+
343+ <property name="Mode" type="u" access="read" tp:type="NM_802_11_MODE">
344+ <tp:docstring>Describes the operating mode of the access point.</tp:docstring>
345+ </property>
346+ <property name="MaxBitrate" type="u" access="read">
347+ <tp:docstring>The maximum bitrate this access point is capable of, in kilobits/second (Kb/s).</tp:docstring>
348+ </property>
349+ <property name="Strength" type="y" access="read">
350+ <tp:docstring>The current signal quality of the access point, in percent.</tp:docstring>
351+ </property>
352+
353+ <signal name="PropertiesChanged">
354+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
355+ <arg name="properties" type="a{sv}" tp:type="String_Variant_Map">
356+ <tp:docstring>
357+ A dictionary mapping property names to variant boxed values
358+ </tp:docstring>
359+ </arg>
360+ </signal>
361+ <tp:flags name="NM_802_11_AP_FLAGS" value-prefix="NM_802_11_AP_FLAGS" type="u">
362+ <tp:docstring>
363+ Flags describing the general capabilities of the access point.
364+ </tp:docstring>
365+ <tp:flag suffix="NONE" value="0x0">
366+ <tp:docstring>Null capability - says nothing about the access point.</tp:docstring>
367+ </tp:flag>
368+ <tp:flag suffix="PRIVACY" value="0x1">
369+ <tp:docstring>Access point supports privacy measures.</tp:docstring>
370+ </tp:flag>
371+ </tp:flags>
372+ <tp:flags name="NM_802_11_AP_SEC" value-prefix="NM_802_11_AP_SEC" type="u">
373+ <tp:docstring>
374+ Flags describing the security capabilities of the access point.
375+ </tp:docstring>
376+ <tp:flag suffix="NONE" value="0x0">
377+ <tp:docstring>Null flag.</tp:docstring>
378+ </tp:flag>
379+ <tp:flag suffix="PAIR_WEP40" value="0x1">
380+ <tp:docstring>Access point supports pairwise 40-bit WEP encryption.</tp:docstring>
381+ </tp:flag>
382+ <tp:flag suffix="PAIR_WEP104" value="0x2">
383+ <tp:docstring>Access point supports pairwise 104-bit WEP encryption.</tp:docstring>
384+ </tp:flag>
385+ <tp:flag suffix="PAIR_TKIP" value="0x4">
386+ <tp:docstring>Access point supports pairwise TKIP encryption.</tp:docstring>
387+ </tp:flag>
388+ <tp:flag suffix="PAIR_CCMP" value="0x8">
389+ <tp:docstring>Access point supports pairwise CCMP encryption.</tp:docstring>
390+ </tp:flag>
391+ <tp:flag suffix="GROUP_WEP40" value="0x10">
392+ <tp:docstring>Access point supports a group 40-bit WEP cipher.</tp:docstring>
393+ </tp:flag>
394+ <tp:flag suffix="GROUP_WEP104" value="0x20">
395+ <tp:docstring>Access point supports a group 104-bit WEP cipher.</tp:docstring>
396+ </tp:flag>
397+ <tp:flag suffix="GROUP_TKIP" value="0x40">
398+ <tp:docstring>Access point supports a group TKIP cipher.</tp:docstring>
399+ </tp:flag>
400+ <tp:flag suffix="GROUP_CCMP" value="0x80">
401+ <tp:docstring>Access point supports a group CCMP cipher.</tp:docstring>
402+ </tp:flag>
403+ <tp:flag suffix="KEY_MGMT_PSK" value="0x100">
404+ <tp:docstring>Access point supports PSK key management.</tp:docstring>
405+ </tp:flag>
406+ <tp:flag suffix="KEY_MGMT_802_1X" value="0x200">
407+ <tp:docstring>Access point supports 802.1x key management.</tp:docstring>
408+ </tp:flag>
409+ </tp:flags>
410+ </interface>
411+</node>
412+
413
414=== added file 'data/nm-active-connection.xml'
415--- data/nm-active-connection.xml 1970-01-01 00:00:00 +0000
416+++ data/nm-active-connection.xml 2015-04-01 15:30:55 +0000
417@@ -0,0 +1,145 @@
418+<?xml version="1.0" encoding="UTF-8" ?>
419+
420+<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
421+ <interface name="org.freedesktop.NetworkManager.Connection.Active">
422+ <tp:docstring>
423+ Objects that implement the Connection.Active interface represent an attempt
424+ to connect to a network using the details provided by a Connection object.
425+ The Connection.Active object tracks the life-cycle of the connection
426+ attempt and if successful indicates whether the connected network is the
427+ "default" or preferred network for access.
428+ </tp:docstring>
429+
430+ <property name="Connection" type="o" access="read">
431+ <tp:docstring>
432+ The path of the connection.
433+ </tp:docstring>
434+ </property>
435+ <property name="SpecificObject" type="o" access="read">
436+ <tp:docstring>
437+ A specific object associated with the active connection. This property
438+ reflects the specific object used during connection activation, and will
439+ not change over the lifetime of the ActiveConnection once set.
440+ </tp:docstring>
441+ </property>
442+ <property name="Id" type="s" access="read">
443+ <tp:docstring>
444+ The ID of the connection, provided as a convenience so that clients
445+ do not have to retrieve all connection details.
446+ </tp:docstring>
447+ </property>
448+ <property name="Uuid" type="s" access="read">
449+ <tp:docstring>
450+ The UUID of the connection, provided as a convenience so that clients
451+ do not have to retrieve all connection details.
452+ </tp:docstring>
453+ </property>
454+ <property name="Type" type="s" access="read">
455+ <tp:docstring>
456+ The type of the connection, provided as a convenience so that clients
457+ do not have to retrieve all connection details.
458+ </tp:docstring>
459+ </property>
460+ <property name="Devices" type="ao" access="read">
461+ <tp:docstring>
462+ Array of object paths representing devices which are part of this active
463+ connection.
464+ </tp:docstring>
465+ </property>
466+ <property name="State" type="u" access="read" tp:type="NM_ACTIVE_CONNECTION_STATE">
467+ <tp:docstring>
468+ The state of this active connection.
469+ </tp:docstring>
470+ </property>
471+ <!--property name="Default" type="b" access="read">
472+ <tp:docstring>
473+ Whether this active connection is the default IPv4 connection, i.e.
474+ whether it currently owns the default IPv4 route.
475+ </tp:docstring>
476+ </property-->
477+ <property name="Ip4Config" type="o" access="read">
478+ <tp:docstring>
479+ Object path of the Ip4Config object describing the configuration of the
480+ connection. Only valid when the connection is in the
481+ NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
482+ </tp:docstring>
483+ </property>
484+ <property name="Dhcp4Config" type="o" access="read">
485+ <tp:docstring>
486+ Object path of the Dhcp4Config object describing the DHCP options
487+ returned by the DHCP server (assuming the connection used DHCP). Only
488+ valid when the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED
489+ state.
490+ </tp:docstring>
491+ </property>
492+ <property name="Default6" type="b" access="read">
493+ <tp:docstring>
494+ Whether this active connection is the default IPv6 connection, i.e.
495+ whether it currently owns the default IPv6 route.
496+ </tp:docstring>
497+ </property>
498+ <property name="Ip6Config" type="o" access="read">
499+ <tp:docstring>
500+ Object path of the Ip6Config object describing the configuration of the
501+ connection. Only valid when the connection is in the
502+ NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
503+ </tp:docstring>
504+ </property>
505+ <property name="Dhcp6Config" type="o" access="read">
506+ <tp:docstring>
507+ Object path of the Dhcp6Config object describing the DHCP options
508+ returned by the DHCP server (assuming the connection used DHCP). Only
509+ valid when the connection is in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED
510+ state.
511+ </tp:docstring>
512+ </property>
513+ <property name="Vpn" type="b" access="read">
514+ <tp:docstring>
515+ Whether this active connection is also a VPN connection.
516+ </tp:docstring>
517+ </property>
518+ <property name="Master" type="o" access="read">
519+ <tp:docstring>
520+ The path to the master device if the connection is a slave.
521+ </tp:docstring>
522+ </property>
523+
524+ <signal name="PropertiesChanged">
525+ <arg name="properties" type="a{sv}" tp:type="String_Variant_Map">
526+ <tp:docstring>
527+ A dictionary mapping property names to variant boxed values
528+ </tp:docstring>
529+ </arg>
530+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
531+ </signal>
532+
533+ <tp:enum name="NM_ACTIVE_CONNECTION_STATE" type="u">
534+ <tp:enumvalue suffix="UNKNOWN" value="0">
535+ <tp:docstring>
536+ The active connection is in an unknown state.
537+ </tp:docstring>
538+ </tp:enumvalue>
539+ <tp:enumvalue suffix="ACTIVATING" value="1">
540+ <tp:docstring>
541+ The connection is activating.
542+ </tp:docstring>
543+ </tp:enumvalue>
544+ <tp:enumvalue suffix="ACTIVATED" value="2">
545+ <tp:docstring>
546+ The connection is activated.
547+ </tp:docstring>
548+ </tp:enumvalue>
549+ <tp:enumvalue suffix="DEACTIVATING" value="3">
550+ <tp:docstring>
551+ The connection is being torn down and cleaned up.
552+ </tp:docstring>
553+ </tp:enumvalue>
554+ <tp:enumvalue suffix="DEACTIVATED" value="4">
555+ <tp:docstring>
556+ The connection is no longer active.
557+ </tp:docstring>
558+ </tp:enumvalue>
559+ </tp:enum>
560+ </interface>
561+</node>
562+
563
564=== added file 'data/nm-device-wifi.xml'
565--- data/nm-device-wifi.xml 1970-01-01 00:00:00 +0000
566+++ data/nm-device-wifi.xml 2015-04-01 15:30:55 +0000
567@@ -0,0 +1,132 @@
568+<?xml version="1.0" encoding="UTF-8" ?>
569+
570+<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
571+ <interface name="org.freedesktop.NetworkManager.Device.Wireless">
572+ <method name="GetAccessPoints">
573+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_get_access_points"/>
574+ <arg name="access_points" type="ao" direction="out">
575+ <tp:docstring>
576+ List of access point object paths
577+ </tp:docstring>
578+ </arg>
579+ <tp:docstring>
580+ Get the list of access points visible to this device.
581+ </tp:docstring>
582+ </method>
583+
584+ <method name="RequestScan">
585+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_request_scan"/>
586+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
587+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
588+ <arg name="options" type="a{sv}" direction="in">
589+ <tp:docstring>
590+ Options of scan
591+ </tp:docstring>
592+ </arg>
593+ <tp:docstring>
594+ Request the device to scan
595+ </tp:docstring>
596+ </method>
597+
598+ <property name="HwAddress" type="s" access="read">
599+ <tp:docstring>
600+ The active hardware address of the device.
601+ </tp:docstring>
602+ </property>
603+
604+ <property name="PermHwAddress" type="s" access="read">
605+ <tp:docstring>
606+ The permanent hardware address of the device.
607+ </tp:docstring>
608+ </property>
609+
610+ <property name="Mode" type="u" access="read" tp:type="NM_802_11_MODE">
611+ <tp:docstring>
612+ The operating mode of the wireless device.
613+ </tp:docstring>
614+ </property>
615+
616+ <property name="Bitrate" type="u" access="read">
617+ <tp:docstring>
618+ The bit rate currently used by the wireless device, in kilobits/second (Kb/s).
619+ </tp:docstring>
620+ </property>
621+ <property name="ActiveAccessPoint" type="o" access="read">
622+ <tp:docstring>
623+ Object path of the access point currently used by the wireless device.
624+ </tp:docstring>
625+ </property>
626+ <property name="WirelessCapabilities" type="u" access="read" tp:type="NM_802_11_DEVICE_CAP">
627+ <tp:docstring>
628+ The capabilities of the wireless device.
629+ </tp:docstring>
630+ </property>
631+
632+ <signal name="PropertiesChanged">
633+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
634+ <arg name="properties" type="a{sv}" tp:type="String_Variant_Map">
635+ <tp:docstring>
636+ A dictionary containing the FIXME: check changed parameters.
637+ </tp:docstring>
638+ </arg>
639+ <tp:docstring>
640+ Emitted when the wireless device's properties changed.
641+ </tp:docstring>
642+ </signal>
643+
644+ <signal name="AccessPointAdded">
645+ <arg name="access_point" type="o">
646+ <tp:docstring>
647+ The object path of the newly found access point.
648+ </tp:docstring>
649+ </arg>
650+ <tp:docstring>
651+ Emitted when a new access point is found by the device.
652+ </tp:docstring>
653+ </signal>
654+
655+ <signal name="AccessPointRemoved">
656+ <arg name="access_point" type="o">
657+ <tp:docstring>
658+ The object path of the access point that has disappeared.
659+ </tp:docstring>
660+ </arg>
661+ <tp:docstring>
662+ Emitted when an access point disappears from view of the device.
663+ </tp:docstring>
664+ </signal>
665+
666+ <tp:flags name="NM_802_11_DEVICE_CAP" type="u">
667+ <tp:docstring>
668+ Flags describing the capabilities of a wireless device.
669+ </tp:docstring>
670+ <tp:flag suffix="NONE" value="0x0">
671+ <tp:docstring>Null capability - syntactic sugar for no capabilities supported. Do not AND this with other capabilities!</tp:docstring>
672+ </tp:flag>
673+ <tp:flag suffix="CIPHER_WEP40" value="0x1">
674+ <tp:docstring>The device supports the 40-bit WEP cipher.</tp:docstring>
675+ </tp:flag>
676+ <tp:flag suffix="CIPHER_WEP104" value="0x2">
677+ <tp:docstring>The device supports the 104-bit WEP cipher.</tp:docstring>
678+ </tp:flag>
679+ <tp:flag suffix="CIPHER_TKIP" value="0x4">
680+ <tp:docstring>The device supports the TKIP cipher.</tp:docstring>
681+ </tp:flag>
682+ <tp:flag suffix="CIPHER_CCMP" value="0x8">
683+ <tp:docstring>The device supports the CCMP cipher.</tp:docstring>
684+ </tp:flag>
685+ <tp:flag suffix="WPA" value="0x10">
686+ <tp:docstring>The device supports the WPA encryption/authentication protocol.</tp:docstring>
687+ </tp:flag>
688+ <tp:flag suffix="RSN" value="0x20">
689+ <tp:docstring>The device supports the RSN encryption/authentication protocol.</tp:docstring>
690+ </tp:flag>
691+ <tp:flag suffix="AP" value="0x40">
692+ <tp:docstring>The device supports Access Point mode.</tp:docstring>
693+ </tp:flag>
694+ <tp:flag suffix="ADHOC" value="0x80">
695+ <tp:docstring>The device supports Ad-Hoc mode.</tp:docstring>
696+ </tp:flag>
697+ </tp:flags>
698+ </interface>
699+</node>
700
701=== added file 'data/nm-device.xml'
702--- data/nm-device.xml 1970-01-01 00:00:00 +0000
703+++ data/nm-device.xml 2015-04-01 15:30:55 +0000
704@@ -0,0 +1,598 @@
705+<?xml version="1.0" encoding="UTF-8" ?>
706+
707+<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
708+ <interface name="org.freedesktop.NetworkManager.Device">
709+ <property name="Udi" type="s" access="read">
710+ <tp:docstring>
711+ Operating-system specific transient device hardware identifier. This
712+ is an opaque string representing the underlying hardware for the device,
713+ and shouldn't be used to keep track of individual devices. For some
714+ device types (Bluetooth, Modems) it is an identifier used by the
715+ hardware service (ie bluez or ModemManager) to refer to that device,
716+ and client programs use it get additional information from those
717+ services which NM does not provide. The Udi is not guaranteed to be
718+ consistent across reboots or hotplugs of the hardware. If you're looking
719+ for a way to uniquely track each device in your application, use the
720+ object path. If you're looking for a way to track a specific piece of
721+ hardware across reboot or hotplug, use a MAC address or USB serial
722+ number.
723+ </tp:docstring>
724+ </property>
725+ <property name="Interface" type="s" access="read">
726+ <tp:docstring>
727+ The name of the device's control (and often data) interface.
728+ </tp:docstring>
729+ </property>
730+ <property name="IpInterface" type="s" access="read">
731+ <tp:docstring>
732+ The name of the device's data interface when available. This property
733+ may not refer to the actual data interface until the device has
734+ successfully established a data connection, indicated by the device's
735+ State becoming ACTIVATED.
736+ </tp:docstring>
737+ </property>
738+ <property name="Driver" type="s" access="read">
739+ <tp:docstring>
740+ The driver handling the device.
741+ </tp:docstring>
742+ </property>
743+ <property name="DriverVersion" type="s" access="read">
744+ <tp:docstring>
745+ The version of the driver handling the device.
746+ </tp:docstring>
747+ </property>
748+ <property name="FirmwareVersion" type="s" access="read">
749+ <tp:docstring>
750+ The firmware version for the device.
751+ </tp:docstring>
752+ </property>
753+ <property name="Capabilities" type="u" access="read" tp:type="NM_DEVICE_CAP">
754+ <tp:docstring>
755+ Flags describing the capabilities of the device.
756+ </tp:docstring>
757+ </property>
758+ <property name="Ip4Address" type="i" access="read">
759+ <tp:docstring>
760+ The IPv4 address bound to the device. FIXME: what about devices with >1 IP address?
761+ </tp:docstring>
762+ </property>
763+ <property name="State" type="u" access="read" tp:type="NM_DEVICE_STATE">
764+ <tp:docstring>
765+ The current state of the device.
766+ </tp:docstring>
767+ </property>
768+ <property name="StateReason" type="(uu)" access="read" tp:type="NM_DEVICE_STATE_REASON_STRUCT">
769+ <annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariant"/>
770+ <tp:docstring>
771+ The current state and reason for changing to that state.
772+ </tp:docstring>
773+ </property>
774+ <property name="ActiveConnection" type="o" access="read">
775+ <tp:docstring>
776+ Object path of an ActiveConnection object that "owns" this device during
777+ activation. The ActiveConnection object tracks the life-cycle of a
778+ connection to a specific network and implements the
779+ org.freedesktop.NetworkManager.Connection.Active D-Bus interface.
780+ </tp:docstring>
781+ </property>
782+ <property name="Ip4Config" type="o" access="read">
783+ <tp:docstring>
784+ Object path of the Ip4Config object describing the configuration of the device. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED state.
785+ </tp:docstring>
786+ </property>
787+ <property name="Dhcp4Config" type="o" access="read">
788+ <tp:docstring>
789+ Object path of the Dhcp4Config object describing the DHCP options returned by the DHCP server. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED state.
790+ </tp:docstring>
791+ </property>
792+ <property name="Ip6Config" type="o" access="read">
793+ <tp:docstring>
794+ Object path of the Ip6Config object describing the configuration of the device. Only valid when the device is in the NM_DEVICE_STATE_ACTIVATED state.
795+ </tp:docstring>
796+ </property>
797+ <property name="Dhcp6Config" type="o" access="read">
798+ <tp:docstring>
799+ Object path of the Dhcp6Config object describing the DHCP options
800+ returned by the DHCP server. Only valid when the device is in the
801+ NM_DEVICE_STATE_ACTIVATED state.
802+ </tp:docstring>
803+ </property>
804+ <property name="Managed" type="b" access="read">
805+ <tp:docstring>
806+ Whether or not this device is managed by NetworkManager.
807+ </tp:docstring>
808+ </property>
809+ <property name="Autoconnect" type="b" access="readwrite">
810+ <tp:docstring>
811+ If TRUE, indicates the device is allowed to autoconnect. If FALSE,
812+ manual intervention is required before the device will automatically
813+ connect to a known network, such as activating a connection using the
814+ device, or setting this property to TRUE.
815+ </tp:docstring>
816+ </property>
817+ <property name="FirmwareMissing" type="b" access="read">
818+ <tp:docstring>
819+ If TRUE, indicates the device is likely missing firmware necessary for
820+ its operation.
821+ </tp:docstring>
822+ </property>
823+ <property name="DeviceType" type="u" access="read" tp:type="NM_DEVICE_TYPE">
824+ <tp:docstring>
825+ The general type of the network device; ie Ethernet, WiFi, etc.
826+ </tp:docstring>
827+ </property>
828+ <property name="AvailableConnections" type="ao" access="read">
829+ <tp:docstring>
830+ An array of object paths of every configured connection that is currently 'available' through this device.
831+ </tp:docstring>
832+ </property>
833+
834+ <method name="Disconnect">
835+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_disconnect"/>
836+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
837+ <tp:docstring>
838+ Disconnects a device and prevents the device from automatically activating further connections without user intervention.
839+ </tp:docstring>
840+ </method>
841+
842+ <signal name="StateChanged">
843+ <arg name="new_state" type="u" tp:type="NM_DEVICE_STATE">
844+ <tp:docstring>
845+ The new state of the device.
846+ </tp:docstring>
847+ </arg>
848+ <arg name="old_state" type="u" tp:type="NM_DEVICE_STATE">
849+ <tp:docstring>
850+ The previous state of the device.
851+ </tp:docstring>
852+ </arg>
853+ <arg name="reason" type="u" tp:type="NM_DEVICE_STATE_REASON">
854+ <tp:docstring>
855+ A reason for the state transition.
856+ </tp:docstring>
857+ </arg>
858+ </signal>
859+
860+ <tp:enum name="NM_DEVICE_STATE" type="u">
861+ <tp:enumvalue suffix="UNKNOWN" value="0">
862+ <tp:docstring>
863+ The device is in an unknown state.
864+ </tp:docstring>
865+ </tp:enumvalue>
866+ <tp:enumvalue suffix="UNMANAGED" value="10">
867+ <tp:docstring>
868+ The device is recognized but not managed by NetworkManager.
869+ </tp:docstring>
870+ </tp:enumvalue>
871+ <tp:enumvalue suffix="UNAVAILABLE" value="20">
872+ <tp:docstring>
873+ The device cannot be used (carrier off, rfkill, etc).
874+ </tp:docstring>
875+ </tp:enumvalue>
876+ <tp:enumvalue suffix="DISCONNECTED" value="30">
877+ <tp:docstring>
878+ The device is not connected.
879+ </tp:docstring>
880+ </tp:enumvalue>
881+ <tp:enumvalue suffix="PREPARE" value="40">
882+ <tp:docstring>
883+ The device is preparing to connect.
884+ </tp:docstring>
885+ </tp:enumvalue>
886+ <tp:enumvalue suffix="CONFIG" value="50">
887+ <tp:docstring>
888+ The device is being configured.
889+ </tp:docstring>
890+ </tp:enumvalue>
891+ <tp:enumvalue suffix="NEED_AUTH" value="60">
892+ <tp:docstring>
893+ The device is awaiting secrets necessary to continue connection.
894+ </tp:docstring>
895+ </tp:enumvalue>
896+ <tp:enumvalue suffix="IP_CONFIG" value="70">
897+ <tp:docstring>
898+ The IP settings of the device are being requested and configured.
899+ </tp:docstring>
900+ </tp:enumvalue>
901+ <tp:enumvalue suffix="IP_CHECK" value="80">
902+ <tp:docstring>
903+ The device's IP connectivity ability is being determined.
904+ </tp:docstring>
905+ </tp:enumvalue>
906+ <tp:enumvalue suffix="SECONDARIES" value="90">
907+ <tp:docstring>
908+ The device is waiting for secondary connections to be activated.
909+ </tp:docstring>
910+ </tp:enumvalue>
911+ <tp:enumvalue suffix="ACTIVATED" value="100">
912+ <tp:docstring>
913+ The device is active.
914+ </tp:docstring>
915+ </tp:enumvalue>
916+ <tp:enumvalue suffix="DEACTIVATING" value="110">
917+ <tp:docstring>
918+ The device's network connection is being torn down.
919+ </tp:docstring>
920+ </tp:enumvalue>
921+ <tp:enumvalue suffix="FAILED" value="120">
922+ <tp:docstring>
923+ The device is in a failure state following an attempt to activate it.
924+ </tp:docstring>
925+ </tp:enumvalue>
926+ </tp:enum>
927+
928+ <tp:enum name="NM_DEVICE_TYPE" type="u">
929+ <tp:enumvalue suffix="UNKNOWN" value="0">
930+ <tp:docstring>
931+ The device type is unknown.
932+ </tp:docstring>
933+ </tp:enumvalue>
934+ <tp:enumvalue suffix="ETHERNET" value="1">
935+ <tp:docstring>
936+ The device is wired Ethernet device.
937+ </tp:docstring>
938+ </tp:enumvalue>
939+ <tp:enumvalue suffix="WIFI" value="2">
940+ <tp:docstring>
941+ The device is an 802.11 WiFi device.
942+ </tp:docstring>
943+ </tp:enumvalue>
944+ <tp:enumvalue suffix="UNUSED1" value="3">
945+ <tp:docstring>Unused</tp:docstring>
946+ </tp:enumvalue>
947+ <tp:enumvalue suffix="UNUSED2" value="4">
948+ <tp:docstring>Unused</tp:docstring>
949+ </tp:enumvalue>
950+ <tp:enumvalue suffix="BT" value="5">
951+ <tp:docstring>
952+ The device is Bluetooth device that provides PAN or DUN capabilities.
953+ </tp:docstring>
954+ </tp:enumvalue>
955+ <tp:enumvalue suffix="OLPC_MESH" value="6">
956+ <tp:docstring>
957+ The device is an OLPC mesh networking device.
958+ </tp:docstring>
959+ </tp:enumvalue>
960+ <tp:enumvalue suffix="WIMAX" value="7">
961+ <tp:docstring>
962+ The device is an 802.16e Mobile WiMAX device.
963+ </tp:docstring>
964+ </tp:enumvalue>
965+ <tp:enumvalue suffix="MODEM" value="8">
966+ <tp:docstring>
967+ The device is a modem supporting one or more of analog telephone,
968+ CDMA/EVDO, GSM/UMTS/HSPA, or LTE standards to access a cellular or
969+ wireline data network.
970+ </tp:docstring>
971+ </tp:enumvalue>
972+ <tp:enumvalue suffix="INFINIBAND" value="9">
973+ <tp:docstring>
974+ The device is an IP-capable InfiniBand interface.
975+ </tp:docstring>
976+ </tp:enumvalue>
977+ <tp:enumvalue suffix="BOND" value="10">
978+ <tp:docstring>
979+ The device is a bond master interface.
980+ </tp:docstring>
981+ </tp:enumvalue>
982+ <tp:enumvalue suffix="VLAN" value="11">
983+ <tp:docstring>
984+ The device is a VLAN interface.
985+ </tp:docstring>
986+ </tp:enumvalue>
987+ <tp:enumvalue suffix="ADSL" value="12">
988+ <tp:docstring>
989+ The device is an ADSL device supporting PPPoE and PPPoATM protocols.
990+ </tp:docstring>
991+ </tp:enumvalue>
992+ <tp:enumvalue suffix="BRIDGE" value="13">
993+ <tp:docstring>
994+ The device is a bridge interface.
995+ </tp:docstring>
996+ </tp:enumvalue>
997+ </tp:enum>
998+
999+ <tp:flags name="NM_DEVICE_CAP" value-prefix="NM_DEVICE_CAP" type="u">
1000+ <tp:flag suffix="NONE" value="0x0">
1001+ <tp:docstring>Null capability.</tp:docstring>
1002+ </tp:flag>
1003+ <tp:flag suffix="NM_SUPPORTED" value="0x1">
1004+ <tp:docstring>The device is supported by NetworkManager.</tp:docstring>
1005+ </tp:flag>
1006+ <tp:flag suffix="CARRIER_DETECT" value="0x2">
1007+ <tp:docstring>The device supports carrier detection.</tp:docstring>
1008+ </tp:flag>
1009+ </tp:flags>
1010+
1011+ <tp:enum name="NM_DEVICE_STATE_REASON" type="u">
1012+ <tp:enumvalue suffix="UNKNOWN" value="0">
1013+ <tp:docstring>
1014+ The reason for the device state change is unknown.
1015+ </tp:docstring>
1016+ </tp:enumvalue>
1017+ <tp:enumvalue suffix="NONE" value="1">
1018+ <tp:docstring>
1019+ The state change is normal.
1020+ </tp:docstring>
1021+ </tp:enumvalue>
1022+ <tp:enumvalue suffix="NOW_MANAGED" value="2">
1023+ <tp:docstring>
1024+ The device is now managed.
1025+ </tp:docstring>
1026+ </tp:enumvalue>
1027+ <tp:enumvalue suffix="NOW_UNMANAGED" value="3">
1028+ <tp:docstring>
1029+ The device is no longer managed.
1030+ </tp:docstring>
1031+ </tp:enumvalue>
1032+ <tp:enumvalue suffix="CONFIG_FAILED" value="4">
1033+ <tp:docstring>
1034+ The device could not be readied for configuration.
1035+ </tp:docstring>
1036+ </tp:enumvalue>
1037+ <tp:enumvalue suffix="CONFIG_UNAVAILABLE" value="5">
1038+ <tp:docstring>
1039+ IP configuration could not be reserved (no available address, timeout, etc).
1040+ </tp:docstring>
1041+ </tp:enumvalue>
1042+ <tp:enumvalue suffix="CONFIG_EXPIRED" value="6">
1043+ <tp:docstring>
1044+ The IP configuration is no longer valid.
1045+ </tp:docstring>
1046+ </tp:enumvalue>
1047+ <tp:enumvalue suffix="NO_SECRETS" value="7">
1048+ <tp:docstring>
1049+ Secrets were required, but not provided.
1050+ </tp:docstring>
1051+ </tp:enumvalue>
1052+ <tp:enumvalue suffix="SUPPLICANT_DISCONNECT" value="8">
1053+ <tp:docstring>
1054+ The 802.1X supplicant disconnected from the access point or authentication server.
1055+ </tp:docstring>
1056+ </tp:enumvalue>
1057+ <tp:enumvalue suffix="SUPPLICANT_CONFIG_FAILED" value="9">
1058+ <tp:docstring>
1059+ Configuration of the 802.1X supplicant failed.
1060+ </tp:docstring>
1061+ </tp:enumvalue>
1062+ <tp:enumvalue suffix="SUPPLICANT_FAILED" value="10">
1063+ <tp:docstring>
1064+ The 802.1X supplicant quit or failed unexpectedly.
1065+ </tp:docstring>
1066+ </tp:enumvalue>
1067+ <tp:enumvalue suffix="SUPPLICANT_TIMEOUT" value="11">
1068+ <tp:docstring>
1069+ The 802.1X supplicant took too long to authenticate.
1070+ </tp:docstring>
1071+ </tp:enumvalue>
1072+ <tp:enumvalue suffix="PPP_START_FAILED" value="12">
1073+ <tp:docstring>
1074+ The PPP service failed to start within the allowed time.
1075+ </tp:docstring>
1076+ </tp:enumvalue>
1077+ <tp:enumvalue suffix="PPP_DISCONNECT" value="13">
1078+ <tp:docstring>
1079+ The PPP service disconnected unexpectedly.
1080+ </tp:docstring>
1081+ </tp:enumvalue>
1082+ <tp:enumvalue suffix="PPP_FAILED" value="14">
1083+ <tp:docstring>
1084+ The PPP service quit or failed unexpectedly.
1085+ </tp:docstring>
1086+ </tp:enumvalue>
1087+ <tp:enumvalue suffix="DHCP_START_FAILED" value="15">
1088+ <tp:docstring>
1089+ The DHCP service failed to start within the allowed time.
1090+ </tp:docstring>
1091+ </tp:enumvalue>
1092+ <tp:enumvalue suffix="DHCP_ERROR" value="16">
1093+ <tp:docstring>
1094+ The DHCP service reported an unexpected error.
1095+ </tp:docstring>
1096+ </tp:enumvalue>
1097+ <tp:enumvalue suffix="DHCP_FAILED" value="17">
1098+ <tp:docstring>
1099+ The DHCP service quit or failed unexpectedly.
1100+ </tp:docstring>
1101+ </tp:enumvalue>
1102+ <tp:enumvalue suffix="SHARED_START_FAILED" value="18">
1103+ <tp:docstring>
1104+ The shared connection service failed to start.
1105+ </tp:docstring>
1106+ </tp:enumvalue>
1107+ <tp:enumvalue suffix="SHARED_FAILED" value="19">
1108+ <tp:docstring>
1109+ The shared connection service quit or failed unexpectedly.
1110+ </tp:docstring>
1111+ </tp:enumvalue>
1112+ <tp:enumvalue suffix="AUTOIP_START_FAILED" value="20">
1113+ <tp:docstring>
1114+ The AutoIP service failed to start.
1115+ </tp:docstring>
1116+ </tp:enumvalue>
1117+ <tp:enumvalue suffix="AUTOIP_ERROR" value="21">
1118+ <tp:docstring>
1119+ The AutoIP service reported an unexpected error.
1120+ </tp:docstring>
1121+ </tp:enumvalue>
1122+ <tp:enumvalue suffix="AUTOIP_FAILED" value="22">
1123+ <tp:docstring>
1124+ The AutoIP service quit or failed unexpectedly.
1125+ </tp:docstring>
1126+ </tp:enumvalue>
1127+ <tp:enumvalue suffix="MODEM_BUSY" value="23">
1128+ <tp:docstring>
1129+ Dialing failed because the line was busy.
1130+ </tp:docstring>
1131+ </tp:enumvalue>
1132+ <tp:enumvalue suffix="MODEM_NO_DIAL_TONE" value="24">
1133+ <tp:docstring>
1134+ Dialing failed because there was no dial tone.
1135+ </tp:docstring>
1136+ </tp:enumvalue>
1137+ <tp:enumvalue suffix="MODEM_NO_CARRIER" value="25">
1138+ <tp:docstring>
1139+ Dialing failed because there was carrier.
1140+ </tp:docstring>
1141+ </tp:enumvalue>
1142+ <tp:enumvalue suffix="MODEM_DIAL_TIMEOUT" value="26">
1143+ <tp:docstring>
1144+ Dialing timed out.
1145+ </tp:docstring>
1146+ </tp:enumvalue>
1147+ <tp:enumvalue suffix="MODEM_DIAL_FAILED" value="27">
1148+ <tp:docstring>
1149+ Dialing failed.
1150+ </tp:docstring>
1151+ </tp:enumvalue>
1152+ <tp:enumvalue suffix="MODEM_INIT_FAILED" value="28">
1153+ <tp:docstring>
1154+ Modem initialization failed.
1155+ </tp:docstring>
1156+ </tp:enumvalue>
1157+ <tp:enumvalue suffix="GSM_APN_FAILED" value="29">
1158+ <tp:docstring>
1159+ Failed to select the specified GSM APN.
1160+ </tp:docstring>
1161+ </tp:enumvalue>
1162+ <tp:enumvalue suffix="GSM_REGISTRATION_NOT_SEARCHING" value="30">
1163+ <tp:docstring>
1164+ Not searching for networks.
1165+ </tp:docstring>
1166+ </tp:enumvalue>
1167+ <tp:enumvalue suffix="GSM_REGISTRATION_DENIED" value="31">
1168+ <tp:docstring>
1169+ Network registration was denied.
1170+ </tp:docstring>
1171+ </tp:enumvalue>
1172+ <tp:enumvalue suffix="GSM_REGISTRATION_TIMEOUT" value="32">
1173+ <tp:docstring>
1174+ Network registration timed out.
1175+ </tp:docstring>
1176+ </tp:enumvalue>
1177+ <tp:enumvalue suffix="GSM_REGISTRATION_FAILED" value="33">
1178+ <tp:docstring>
1179+ Failed to register with the requested GSM network.
1180+ </tp:docstring>
1181+ </tp:enumvalue>
1182+ <tp:enumvalue suffix="GSM_PIN_CHECK_FAILED" value="34">
1183+ <tp:docstring>
1184+ PIN check failed.
1185+ </tp:docstring>
1186+ </tp:enumvalue>
1187+ <tp:enumvalue suffix="FIRMWARE_MISSING" value="35">
1188+ <tp:docstring>
1189+ Necessary firmware for the device may be missing.
1190+ </tp:docstring>
1191+ </tp:enumvalue>
1192+ <tp:enumvalue suffix="REMOVED" value="36">
1193+ <tp:docstring>
1194+ The device was removed.
1195+ </tp:docstring>
1196+ </tp:enumvalue>
1197+ <tp:enumvalue suffix="SLEEPING" value="37">
1198+ <tp:docstring>
1199+ NetworkManager went to sleep.
1200+ </tp:docstring>
1201+ </tp:enumvalue>
1202+ <tp:enumvalue suffix="CONNECTION_REMOVED" value="38">
1203+ <tp:docstring>
1204+ The device's active connection was removed or disappeared.
1205+ </tp:docstring>
1206+ </tp:enumvalue>
1207+ <tp:enumvalue suffix="USER_REQUESTED" value="39">
1208+ <tp:docstring>
1209+ A user or client requested the disconnection.
1210+ </tp:docstring>
1211+ </tp:enumvalue>
1212+ <tp:enumvalue suffix="CARRIER" value="40">
1213+ <tp:docstring>
1214+ The device's carrier/link changed.
1215+ </tp:docstring>
1216+ </tp:enumvalue>
1217+ <tp:enumvalue suffix="CONNECTION_ASSUMED" value="41">
1218+ <tp:docstring>
1219+ The device's existing connection was assumed.
1220+ </tp:docstring>
1221+ </tp:enumvalue>
1222+ <tp:enumvalue suffix="SUPPLICANT_AVAILABLE" value="42">
1223+ <tp:docstring>
1224+ The 802.1x supplicant is now available.
1225+ </tp:docstring>
1226+ </tp:enumvalue>
1227+ <tp:enumvalue suffix="MODEM_NOT_FOUND" value="43">
1228+ <tp:docstring>
1229+ The modem could not be found.
1230+ </tp:docstring>
1231+ </tp:enumvalue>
1232+ <tp:enumvalue suffix="BT_FAILED" value="44">
1233+ <tp:docstring>
1234+ The Bluetooth connection timed out or failed.
1235+ </tp:docstring>
1236+ </tp:enumvalue>
1237+ <tp:enumvalue suffix="GSM_SIM_NOT_INSERTED" value="45">
1238+ <tp:docstring>
1239+ GSM Modem's SIM Card not inserted.
1240+ </tp:docstring>
1241+ </tp:enumvalue>
1242+ <tp:enumvalue suffix="GSM_SIM_PIN_REQUIRED" value="46">
1243+ <tp:docstring>
1244+ GSM Modem's SIM Pin required.
1245+ </tp:docstring>
1246+ </tp:enumvalue>
1247+ <tp:enumvalue suffix="GSM_SIM_PUK_REQUIRED" value="47">
1248+ <tp:docstring>
1249+ GSM Modem's SIM Puk required.
1250+ </tp:docstring>
1251+ </tp:enumvalue>
1252+ <tp:enumvalue suffix="GSM_SIM_WRONG" value="48">
1253+ <tp:docstring>
1254+ GSM Modem's SIM wrong
1255+ </tp:docstring>
1256+ </tp:enumvalue>
1257+ <tp:enumvalue suffix="INFINIBAND_MODE" value="49">
1258+ <tp:docstring>
1259+ InfiniBand device does not support connected mode.
1260+ </tp:docstring>
1261+ </tp:enumvalue>
1262+ <tp:enumvalue suffix="DEPENDENCY_FAILED" value="50">
1263+ <tp:docstring>
1264+ A dependency of the connection failed.
1265+ </tp:docstring>
1266+ </tp:enumvalue>
1267+ <tp:enumvalue suffix="BR2684_FAILED" value="51">
1268+ <tp:docstring>
1269+ Problem with the RFC 2684 Ethernet over ADSL bridge.
1270+ </tp:docstring>
1271+ </tp:enumvalue>
1272+ <tp:enumvalue suffix="MODEM_MANAGER_UNAVAILABLE" value="52">
1273+ <tp:docstring>
1274+ ModemManager was not running or quit unexpectedly.
1275+ </tp:docstring>
1276+ </tp:enumvalue>
1277+ <tp:enumvalue suffix="SSID_NOT_FOUND" value="53">
1278+ <tp:docstring>
1279+ The 802.11 Wi-Fi network could not be found.
1280+ </tp:docstring>
1281+ </tp:enumvalue>
1282+ <tp:enumvalue suffix="SECONDARY_CONNECTION_FAILED" value="54">
1283+ <tp:docstring>
1284+ A secondary connection of the base connection failed.
1285+ </tp:docstring>
1286+ </tp:enumvalue>
1287+ </tp:enum>
1288+
1289+ <tp:struct name="NM_DEVICE_STATE_REASON_STRUCT">
1290+ <tp:member type="u" name="state" tp:type="NM_DEVICE_STATE">
1291+ <tp:docstring>
1292+ The device state.
1293+ </tp:docstring>
1294+ </tp:member>
1295+ <tp:member type="u" name="reason" tp:type="NM_DEVICE_STATE_REASON">
1296+ <tp:docstring>
1297+ The reason for originally changing to the device state.
1298+ </tp:docstring>
1299+ </tp:member>
1300+ </tp:struct>
1301+ </interface>
1302+</node>
1303
1304=== added file 'data/nm-manager.xml'
1305--- data/nm-manager.xml 1970-01-01 00:00:00 +0000
1306+++ data/nm-manager.xml 2015-04-01 15:30:55 +0000
1307@@ -0,0 +1,412 @@
1308+<?xml version="1.0" encoding="UTF-8" ?>
1309+
1310+<node name="/org/freedesktop/NetworkManager" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
1311+ <interface name="org.freedesktop.NetworkManager">
1312+ <method name="GetDevices">
1313+ <tp:docstring>
1314+ Get the list of network devices.
1315+ </tp:docstring>
1316+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_get_devices"/>
1317+ <arg name="devices" type="ao" direction="out">
1318+ <tp:docstring>
1319+ List of object paths of network devices known to the system.
1320+ </tp:docstring>
1321+ </arg>
1322+ </method>
1323+
1324+ <method name="GetDeviceByIpIface">
1325+ <tp:docstring>
1326+ Return the object path of the network device referenced by its IP
1327+ interface name. Note that some devices (usually modems) only have an
1328+ IP interface name when they are connected.
1329+ </tp:docstring>
1330+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_get_device_by_ip_iface"/>
1331+ <arg name="iface" type="s" direction="in">
1332+ <tp:docstring>
1333+ Interface name of the device to find.
1334+ </tp:docstring>
1335+ </arg>
1336+ <arg name="device" type="o" direction="out">
1337+ <tp:docstring>
1338+ Object path of the network device.
1339+ </tp:docstring>
1340+ </arg>
1341+ </method>
1342+
1343+ <method name="ActivateConnection">
1344+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_activate_connection"/>
1345+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1346+ <tp:docstring>
1347+ Activate a connection using the supplied device.
1348+ </tp:docstring>
1349+ <arg name="connection" type="o" direction="in">
1350+ <tp:docstring>
1351+ The connection to activate the devices with.
1352+ </tp:docstring>
1353+ </arg>
1354+ <arg name="device" type="o" direction="in">
1355+ <tp:docstring>
1356+ The object path of device to be activated for physical connections. This parameter is ignored for VPN connections, because the specific_object (if provided) specifies the device to use.
1357+ </tp:docstring>
1358+ </arg>
1359+ <arg name="specific_object" type="o" direction="in">
1360+ <tp:docstring>
1361+ The path of a connection-type-specific object this activation should use.
1362+ This parameter is currently ignored for wired and mobile broadband connections,
1363+ and the value of "/" should be used (ie, no specific object). For WiFi
1364+ connections, pass the object path of a specific AP from the card's scan
1365+ list, or "/" to pick and AP automatically. For VPN connections, pass
1366+ the object path of an ActiveConnection object that should serve as the
1367+ "base" connection (to which the VPN connections lifetime will be tied),
1368+ or pass "/" and NM will automatically use the current default device.
1369+ </tp:docstring>
1370+ </arg>
1371+ <arg name="active_connection" type="o" direction="out">
1372+ <tp:docstring>
1373+ The path of the active connection object representing this active connection.
1374+ </tp:docstring>
1375+ </arg>
1376+ <tp:possible-errors>
1377+ <tp:error name="org.freedesktop.NetworkManager.Error.UnknownConnection"/>
1378+ <tp:error name="org.freedesktop.NetworkManager.Error.UnknownDevice"/>
1379+ <tp:error name="org.freedesktop.NetworkManager.Error.ConnectionActivating">
1380+ <tp:docstring>Another connection is already activating or the same connection is already active. FIXME: check if the error name is correct. FIXME: split into 2 errors?</tp:docstring>
1381+ </tp:error>
1382+ <tp:error name="org.freedesktop.NetworkManager.Error.ConnectionInvalid">
1383+ <tp:docstring>The connection is invalid for this device.</tp:docstring>
1384+ </tp:error>
1385+ </tp:possible-errors>
1386+ </method>
1387+
1388+ <method name="AddAndActivateConnection">
1389+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_add_and_activate_connection"/>
1390+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1391+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantDictMap"/>
1392+ <tp:docstring>
1393+ Adds a new connection using the given details (if any) as a template
1394+ (automatically filling in missing settings with the capabilities of the
1395+ given device and specific object), then activate the new connection.
1396+ Cannot be used for VPN connections at this time.
1397+ </tp:docstring>
1398+ <arg name="connection" type="a{sa{sv}}" direction="in">
1399+ <tp:docstring>
1400+ Connection settings and properties; if incomplete missing settings will
1401+ be automatically completed using the given device and specific object.
1402+ </tp:docstring>
1403+ </arg>
1404+ <arg name="device" type="o" direction="in">
1405+ <tp:docstring>
1406+ The object path of device to be activated using the given connection.
1407+ </tp:docstring>
1408+ </arg>
1409+ <arg name="specific_object" type="o" direction="in">
1410+ <tp:docstring>
1411+ The path of a connection-type-specific object this activation should use.
1412+ This parameter is currently ignored for wired and mobile broadband connections,
1413+ and the value of "/" should be used (ie, no specific object). For WiFi
1414+ connections, pass the object path of a specific AP from the card's scan
1415+ list, which will be used to complete the details of the newly added
1416+ connection.
1417+ </tp:docstring>
1418+ </arg>
1419+ <arg name="path" type="o" direction="out">
1420+ <tp:docstring>
1421+ Object path of the new connection that was just added.
1422+ </tp:docstring>
1423+ </arg>
1424+ <arg name="active_connection" type="o" direction="out">
1425+ <tp:docstring>
1426+ The path of the active connection object representing this active connection.
1427+ </tp:docstring>
1428+ </arg>
1429+ <tp:possible-errors>
1430+ <tp:error name="org.freedesktop.NetworkManager.Error.UnknownConnection"/>
1431+ <tp:error name="org.freedesktop.NetworkManager.Error.UnknownDevice"/>
1432+ <tp:error name="org.freedesktop.NetworkManager.Error.ConnectionInvalid">
1433+ <tp:docstring>The connection is invalid for this device.</tp:docstring>
1434+ </tp:error>
1435+ </tp:possible-errors>
1436+ </method>
1437+
1438+ <method name="DeactivateConnection">
1439+ <tp:docstring>
1440+ Deactivate an active connection.
1441+ </tp:docstring>
1442+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_deactivate_connection"/>
1443+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1444+ <arg name="active_connection" type="o" direction="in">
1445+ <tp:docstring>
1446+ The currently active connection to deactivate.
1447+ </tp:docstring>
1448+ </arg>
1449+ </method>
1450+
1451+ <method name="Sleep">
1452+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_sleep"/>
1453+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1454+ <tp:docstring>
1455+ Control the NetworkManager daemon's sleep state. When asleep, all
1456+ interfaces that it manages are deactivated. When awake, devices are
1457+ available to be activated. This command should not be called directly
1458+ by users or clients; it is intended for system suspend/resume tracking.
1459+ </tp:docstring>
1460+ <arg name="sleep" type="b" direction="in">
1461+ <tp:docstring>
1462+ Indicates whether the NetworkManager daemon should sleep or wake.
1463+ </tp:docstring>
1464+ </arg>
1465+ </method>
1466+
1467+ <method name="Enable">
1468+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_enable"/>
1469+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1470+ <tp:docstring>
1471+ Control whether overall networking is enabled or disabled. When
1472+ disabled, all interfaces that NM manages are deactivated. When enabled,
1473+ all managed interfaces are re-enabled and available to be activated.
1474+ This command should be used by clients that provide to users the ability
1475+ to enable/disable all networking.
1476+ </tp:docstring>
1477+ <arg name="enable" type="b" direction="in">
1478+ <tp:docstring>
1479+ If FALSE, indicates that all networking should be disabled. If TRUE,
1480+ indicates that NetworkManager should begin managing network devices.
1481+ </tp:docstring>
1482+ </arg>
1483+ </method>
1484+
1485+ <method name="GetPermissions">
1486+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_get_permissions"/>
1487+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1488+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
1489+ <tp:docstring>
1490+ Returns the permissions a caller has for various authenticated operations
1491+ that NetworkManager provides, like Enable/Disable networking, changing
1492+ WiFi, WWAN, and WiMAX state, etc.
1493+ </tp:docstring>
1494+ <arg name="permissions" type="a{ss}" direction="out">
1495+ <tp:docstring>
1496+ Dictionary of available permissions and results. Each permission
1497+ is represented by a name (ie "org.freedesktop.NetworkManager.Foobar")
1498+ and each result is one of the following values: "yes" (the permission
1499+ is available), "auth" (the permission is available after a successful
1500+ authentication), or "no" (the permission is denied). Clients may use
1501+ these values in the UI to indicate the ability to perform certain
1502+ operations.
1503+ </tp:docstring>
1504+ </arg>
1505+ </method>
1506+
1507+ <signal name="CheckPermissions">
1508+ <tp:docstring>
1509+ Emitted when system authorization details change, indicating that
1510+ clients may wish to recheck permissions with GetPermissions.
1511+ </tp:docstring>
1512+ </signal>
1513+
1514+ <method name="SetLogging">
1515+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_set_logging"/>
1516+ <tp:docstring>
1517+ Set logging verbosity and which operations are logged.
1518+ </tp:docstring>
1519+ <arg name="level" type="s" direction="in">
1520+ <tp:docstring>
1521+ One of [ERR, WARN, INFO, DEBUG].
1522+ </tp:docstring>
1523+ </arg>
1524+ <arg name="domains" type="s" direction="in">
1525+ <tp:docstring>
1526+ A combination of logging domains separated by commas (','), or "NONE"
1527+ to disable logging. Each domain enables logging for operations
1528+ related to that domain. Available domains are: [HW, RFKILL, ETHER,
1529+ WIFI, BT, MB, DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS,
1530+ VPN, SHARING, SUPPLICANT, AGENTS, SETTINGS, SUSPEND, CORE, DEVICE,
1531+ OLPC, WIMAX, INFINIBAND, FIREWALL, ADSL, BOND, VLAN]. In addition to
1532+ these domains, the following special domains can be used: [NONE, ALL,
1533+ DEFAULT, DHCP, IP]. If an empty string is given, the log level is
1534+ changed but the current set of log domains remains unchanged.
1535+ </tp:docstring>
1536+ </arg>
1537+ </method>
1538+
1539+ <method name="GetLogging">
1540+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_get_logging"/>
1541+ <tp:docstring>
1542+ Get current logging verbosity level and operations domains.
1543+ </tp:docstring>
1544+ <arg name="level" type="s" direction="out">
1545+ <tp:docstring>
1546+ One of [ERR, WARN, INFO, DEBUG].
1547+ </tp:docstring>
1548+ </arg>
1549+ <arg name="domains" type="s" direction="out">
1550+ <tp:docstring>
1551+ For available domains see SetLogging() call.
1552+ </tp:docstring>
1553+ </arg>
1554+ </method>
1555+
1556+ <method name="state">
1557+ <tp:docstring>
1558+ The overall networking state as determined by the NetworkManager daemon,
1559+ based on the state of network devices under it's management.
1560+ </tp:docstring>
1561+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_get_state"/>
1562+ <arg name="state" type="u" direction="out" tp:type="NM_STATE"/>
1563+ </method>
1564+
1565+ <property name="NetworkingEnabled" type="b" access="read">
1566+ <tp:docstring>
1567+ Indicates if overall networking is currently enabled or not. See the
1568+ Enable() method.
1569+ </tp:docstring>
1570+ </property>
1571+
1572+ <property name="WirelessEnabled" type="b" access="readwrite">
1573+ <tp:docstring>
1574+ Indicates if wireless is currently enabled or not.
1575+ </tp:docstring>
1576+ </property>
1577+
1578+ <property name="WirelessHardwareEnabled" type="b" access="read">
1579+ <tp:docstring>
1580+ Indicates if the wireless hardware is currently enabled, i.e. the state of the RF kill switch.
1581+ </tp:docstring>
1582+ </property>
1583+
1584+ <property name="WwanEnabled" type="b" access="readwrite">
1585+ <tp:docstring>
1586+ Indicates if mobile broadband devices are currently enabled or not.
1587+ </tp:docstring>
1588+ </property>
1589+
1590+ <property name="WwanHardwareEnabled" type="b" access="read">
1591+ <tp:docstring>
1592+ Indicates if the mobile broadband hardware is currently enabled, i.e. the state of the RF kill switch.
1593+ </tp:docstring>
1594+ </property>
1595+
1596+ <property name="WimaxEnabled" type="b" access="readwrite">
1597+ <tp:docstring>
1598+ Indicates if WiMAX devices are currently enabled or not.
1599+ </tp:docstring>
1600+ </property>
1601+
1602+ <property name="WimaxHardwareEnabled" type="b" access="read">
1603+ <tp:docstring>
1604+ Indicates if the WiMAX hardware is currently enabled, i.e. the state of the RF kill switch.
1605+ </tp:docstring>
1606+ </property>
1607+
1608+ <property name="ActiveConnections" type="ao" access="read">
1609+ <tp:docstring>
1610+ List of active connection object paths.
1611+ </tp:docstring>
1612+ </property>
1613+
1614+ <property name="Version" type="s" access="read">
1615+ <tp:docstring>
1616+ NetworkManager version.
1617+ </tp:docstring>
1618+ </property>
1619+
1620+ <property name="State" type="u" access="read" tp:type="NM_STATE">
1621+ <tp:docstring>
1622+ The overall state of the NetworkManager daemon.
1623+ </tp:docstring>
1624+ </property>
1625+
1626+ <signal name="StateChanged">
1627+ <tp:docstring>
1628+ NetworkManager's state changed.
1629+ </tp:docstring>
1630+ <arg name="state" type="u" tp:type="NM_STATE">
1631+ <tp:docstring>
1632+ The new state of NetworkManager.
1633+ </tp:docstring>
1634+ </arg>
1635+ </signal>
1636+
1637+ <signal name="PropertiesChanged">
1638+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
1639+ <tp:docstring>
1640+ NetworkManager's properties changed.
1641+ </tp:docstring>
1642+ <arg name="properties" type="a{sv}" tp:type="String_Variant_Map">
1643+ <tp:docstring>
1644+ The changed properties.
1645+ </tp:docstring>
1646+ </arg>
1647+ </signal>
1648+
1649+ <signal name="DeviceAdded">
1650+ <tp:docstring>
1651+ A device was added to the system
1652+ </tp:docstring>
1653+ <arg name="device_path" type="o">
1654+ <tp:docstring>
1655+ The object path of the newly added device.
1656+ </tp:docstring>
1657+ </arg>
1658+ </signal>
1659+
1660+ <signal name="DeviceRemoved">
1661+ <tp:docstring>
1662+ A device was removed from the system, and is no longer available.
1663+ </tp:docstring>
1664+ <arg name="device_path" type="o">
1665+ <tp:docstring>
1666+ The object path of the device that was just removed.
1667+ </tp:docstring>
1668+ </arg>
1669+ </signal>
1670+
1671+ <tp:enum name="NM_STATE" type="u">
1672+ <tp:docstring>
1673+ Describes the overall state of the daemon.
1674+ </tp:docstring>
1675+ <tp:enumvalue suffix="UNKNOWN" value="0">
1676+ <tp:docstring>
1677+ Networking state is unknown.
1678+ </tp:docstring>
1679+ </tp:enumvalue>
1680+ <tp:enumvalue suffix="ASLEEP" value="10">
1681+ <tp:docstring>
1682+ Networking is inactive and all devices are disabled.
1683+ </tp:docstring>
1684+ </tp:enumvalue>
1685+ <tp:enumvalue suffix="DISCONNECTED" value="20">
1686+ <tp:docstring>
1687+ There is no active network connection.
1688+ </tp:docstring>
1689+ </tp:enumvalue>
1690+ <tp:enumvalue suffix="DISCONNECTING" value="30">
1691+ <tp:docstring>
1692+ Network connections are being cleaned up.
1693+ </tp:docstring>
1694+ </tp:enumvalue>
1695+ <tp:enumvalue suffix="CONNECTING" value="40">
1696+ <tp:docstring>
1697+ A network device is connecting to a network and there is no other
1698+ available network connection.
1699+ </tp:docstring>
1700+ </tp:enumvalue>
1701+ <tp:enumvalue suffix="CONNECTED_LOCAL" value="50">
1702+ <tp:docstring>
1703+ A network device is connected, but there is only link-local connectivity.
1704+ </tp:docstring>
1705+ </tp:enumvalue>
1706+ <tp:enumvalue suffix="CONNECTED_SITE" value="60">
1707+ <tp:docstring>
1708+ A network device is connected, but there is only site-local connectivity.
1709+ </tp:docstring>
1710+ </tp:enumvalue>
1711+ <tp:enumvalue suffix="CONNECTED_GLOBAL" value="70">
1712+ <tp:docstring>
1713+ A network device is connected, with global network connectivity.
1714+ </tp:docstring>
1715+ </tp:enumvalue>
1716+ </tp:enum>
1717+
1718+ </interface>
1719+</node>
1720
1721=== added file 'data/nm-settings-connection.xml'
1722--- data/nm-settings-connection.xml 1970-01-01 00:00:00 +0000
1723+++ data/nm-settings-connection.xml 2015-04-01 15:30:55 +0000
1724@@ -0,0 +1,157 @@
1725+<?xml version="1.0" encoding="UTF-8" ?>
1726+
1727+<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
1728+
1729+ <interface name="org.freedesktop.NetworkManager.Settings.Connection">
1730+ <tp:docstring>
1731+ Represents a single network connection configuration.
1732+ </tp:docstring>
1733+
1734+ <method name="Update">
1735+ <tp:docstring>
1736+ Update the connection with new settings and properties (replacing
1737+ all previous settings and properties) and save the connection to
1738+ disk. Secrets may be part of the update request, and will be either
1739+ stored in persistent storage or sent to a Secret Agent for storage,
1740+ depending on the flags associated with each secret.
1741+ </tp:docstring>
1742+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_update"/>
1743+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1744+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantDictMap"/>
1745+ <arg name="properties" type="a{sa{sv}}" direction="in">
1746+ <tp:docstring>
1747+ New connection settings, properties, and (optionally) secrets.
1748+ </tp:docstring>
1749+ </arg>
1750+ </method>
1751+
1752+ <method name="UpdateUnsaved">
1753+ <tp:docstring>
1754+ Update the connection with new settings and properties (replacing
1755+ all previous settings and properties) but do not immediately save
1756+ the connection to disk. Secrets may be part of the update request
1757+ and may sent to a Secret Agent for storage, depending on the
1758+ flags associated with each secret.
1759+
1760+ Use the 'Save' method to save these changes to disk. Note
1761+ that unsaved changes will be lost if the connection is
1762+ reloaded from disk (either automatically on file change or
1763+ due to an explicit ReloadConnections call).
1764+ </tp:docstring>
1765+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_update_unsaved"/>
1766+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1767+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantDictMap"/>
1768+ <arg name="properties" type="a{sa{sv}}" direction="in">
1769+ <tp:docstring>
1770+ New connection settings, properties, and (optionally) secrets.
1771+ </tp:docstring>
1772+ </arg>
1773+ </method>
1774+
1775+ <method name="Delete">
1776+ <tp:docstring>
1777+ Delete the connection.
1778+ </tp:docstring>
1779+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_delete"/>
1780+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1781+ </method>
1782+
1783+ <method name="GetSettings">
1784+ <tp:docstring>
1785+ Get the settings maps describing this network configuration.
1786+ This will never include any secrets required for connection
1787+ to the network, as those are often protected. Secrets must
1788+ be requested separately using the GetSecrets() call.
1789+ </tp:docstring>
1790+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_get_settings"/>
1791+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1792+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantDictMap"/>
1793+ <arg name="settings" type="a{sa{sv}}" direction="out" tp:type="String_String_Variant_Map_Map">
1794+ <tp:docstring>
1795+ The nested settings maps describing this object.
1796+ </tp:docstring>
1797+ </arg>
1798+ </method>
1799+
1800+ <method name="GetSecrets">
1801+ <tp:docstring>
1802+ Get the secrets belonging to this network configuration. Only
1803+ secrets from persistent storage or a Secret Agent running in
1804+ the requestor's session will be returned. The user will never
1805+ be prompted for secrets as a result of this request.
1806+ </tp:docstring>
1807+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_get_secrets"/>
1808+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1809+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantDictMap"/>
1810+ <arg name="setting_name" type="s" direction="in">
1811+ <tp:docstring>
1812+ Name of the setting to return secrets for. If empty, all
1813+ all secrets will be returned.
1814+ </tp:docstring>
1815+ </arg>
1816+
1817+ <arg name="secrets" type="a{sa{sv}}" direction="out" tp:type="String_String_Variant_Map_Map">
1818+ <tp:docstring>
1819+ Nested settings maps containing secrets.
1820+ </tp:docstring>
1821+ </arg>
1822+ </method>
1823+
1824+ <method name="ClearSecrets">
1825+ <tp:docstring>
1826+ Clear the secrets belonging to this network connection profile.
1827+ </tp:docstring>
1828+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_clear_secrets"/>
1829+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1830+ </method>
1831+
1832+ <method name="Save">
1833+ <tp:docstring>
1834+ Saves a "dirty" connection (that had previously been
1835+ updated with UpdateUnsaved) to persistent storage.
1836+ </tp:docstring>
1837+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_save"/>
1838+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
1839+ </method>
1840+
1841+ <signal name="Updated">
1842+ <tp:docstring>
1843+ Emitted when any settings or permissions change. When handling
1844+ this signal, clients should re-read the connection using the
1845+ GetSettings method to get the changes and to ensure the client
1846+ still has permission to access the connection.
1847+ </tp:docstring>
1848+ </signal>
1849+
1850+ <signal name="Removed">
1851+ <tp:docstring>
1852+ Emitted when this connection is no longer available. This
1853+ happens when the connection is deleted or if it is no longer
1854+ accessible by any of the system's logged-in users. After
1855+ receipt of this signal, the object no longer exists. Also
1856+ see the Settings.ConnectionRemoved signal.
1857+ </tp:docstring>
1858+ </signal>
1859+
1860+ <property name="Unsaved" type="b" access="read">
1861+ <tp:docstring>
1862+ If set, indicates that the in-memory state of the
1863+ connection does not match the on-disk state. This flag
1864+ will be set when UpdateUnsaved() is called or when any
1865+ connection details change, and cleared when the connection
1866+ is saved to disk via Save() or from internal operations.
1867+ </tp:docstring>
1868+ </property>
1869+
1870+ <signal name="PropertiesChanged">
1871+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
1872+ <arg name="properties" type="a{sv}" tp:type="String_Variant_Map">
1873+ <tp:docstring>
1874+ A dictionary mapping property names to variant boxed values.
1875+ </tp:docstring>
1876+ </arg>
1877+ </signal>
1878+
1879+ </interface>
1880+
1881+</node>
1882
1883=== added file 'data/org.freedesktop.URfkill.Device.xml'
1884--- data/org.freedesktop.URfkill.Device.xml 1970-01-01 00:00:00 +0000
1885+++ data/org.freedesktop.URfkill.Device.xml 2015-04-01 15:30:55 +0000
1886@@ -0,0 +1,143 @@
1887+<!DOCTYPE node PUBLIC
1888+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
1889+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
1890+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
1891+
1892+ <interface name="org.freedesktop.URfkill.Device">
1893+ <doc:doc>
1894+ <doc:description>
1895+ <doc:para>
1896+ Objects implementing this interface are usually discovered through
1897+ the <doc:tt>org.freedesktop.URfkill</doc:tt> interface on
1898+ the <doc:tt>/org/freedesktop/URfkill</doc:tt> object on
1899+ the D-Bus system bus service with the well-known
1900+ name <doc:tt>org.freedesktop.URfkill</doc:tt> using
1901+ the
1902+ <doc:ref type="method" to="Rfkill.EnumerateDevices">EnumerateDevices</doc:ref>
1903+ method.
1904+ </doc:para>
1905+ <doc:para>
1906+ <doc:example language="shell" title="simple example">
1907+ <doc:code>
1908+$ gdbus call -y \
1909+ -d org.freedesktop.URfkill \
1910+ -o /org/freedesktop/URfkill/devices/0 \
1911+ -m org.freedesktop.DBus.Properties.GetAll \
1912+ "org.freedesktop.URfkill.Device"
1913+
1914+({'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;},)
1915+ </doc:code>
1916+ </doc:example>
1917+ </doc:para>
1918+ </doc:description>
1919+ </doc:doc>
1920+
1921+ <!-- ************************************************************ -->
1922+
1923+ <signal name="Changed">
1924+ <doc:doc>
1925+ <doc:description>
1926+ <doc:para>
1927+ Emitted when a property of the device is changed.
1928+ </doc:para>
1929+ <doc:para>
1930+ Note: This signal is deprecated since 0.4.0. Use the standard signal,
1931+ PropertiesChanged from org.freedesktop.DBus.Properties instead.
1932+ </doc:para>
1933+ </doc:description>
1934+ </doc:doc>
1935+ </signal>
1936+
1937+ <!-- ************************************************************ -->
1938+
1939+ <property name="index" type="u" access="read">
1940+ <doc:doc>
1941+ <doc:description>
1942+ <doc:para>
1943+ The index of the rfkill device
1944+ </doc:para>
1945+ </doc:description>
1946+ </doc:doc>
1947+ </property>
1948+
1949+ <property name="type" type="u" access="read">
1950+ <doc:doc>
1951+ <doc:description>
1952+ <doc:para>
1953+ The type of the rfkill device
1954+ </doc:para>
1955+ <doc:list>
1956+ <doc:item>
1957+ <doc:term>0</doc:term><doc:definition>All</doc:definition>
1958+ </doc:item>
1959+ <doc:item>
1960+ <doc:term>1</doc:term><doc:definition>WLAN</doc:definition>
1961+ </doc:item>
1962+ <doc:item>
1963+ <doc:term>2</doc:term><doc:definition>Bluetooth</doc:definition>
1964+ </doc:item>
1965+ <doc:item>
1966+ <doc:term>3</doc:term><doc:definition>UWB</doc:definition>
1967+ </doc:item>
1968+ <doc:item>
1969+ <doc:term>4</doc:term><doc:definition>WIMAX</doc:definition>
1970+ </doc:item>
1971+ <doc:item>
1972+ <doc:term>5</doc:term><doc:definition>WWAN</doc:definition>
1973+ </doc:item>
1974+ <doc:item>
1975+ <doc:term>6</doc:term><doc:definition>GPS</doc:definition>
1976+ </doc:item>
1977+ <doc:item>
1978+ <doc:term>7</doc:term><doc:definition>FM</doc:definition>
1979+ </doc:item>
1980+ <doc:item>
1981+ <doc:term>8</doc:term><doc:definition>NFC</doc:definition>
1982+ </doc:item>
1983+ </doc:list>
1984+ </doc:description>
1985+ </doc:doc>
1986+ </property>
1987+
1988+ <property name="name" type="s" access="read">
1989+ <doc:doc>
1990+ <doc:description>
1991+ <doc:para>
1992+ The name of the rfkill device
1993+ </doc:para>
1994+ </doc:description>
1995+ </doc:doc>
1996+ </property>
1997+
1998+ <property name="soft" type="b" access="read">
1999+ <doc:doc>
2000+ <doc:description>
2001+ <doc:para>
2002+ Whether the soft block of the device is on or not
2003+ </doc:para>
2004+ </doc:description>
2005+ </doc:doc>
2006+ </property>
2007+
2008+ <property name="hard" type="b" access="read">
2009+ <doc:doc>
2010+ <doc:description>
2011+ <doc:para>
2012+ Whether the hard block of the device is on or not
2013+ </doc:para>
2014+ </doc:description>
2015+ </doc:doc>
2016+ </property>
2017+
2018+ <property name="platform" type="b" access="read">
2019+ <doc:doc>
2020+ <doc:description>
2021+ <doc:para>
2022+ Whether the device is generated by a platform driver or not
2023+ </doc:para>
2024+ </doc:description>
2025+ </doc:doc>
2026+ </property>
2027+
2028+ </interface>
2029+</node>
2030
2031=== added file 'data/org.freedesktop.URfkill.Killswitch.xml'
2032--- data/org.freedesktop.URfkill.Killswitch.xml 1970-01-01 00:00:00 +0000
2033+++ data/org.freedesktop.URfkill.Killswitch.xml 2015-04-01 15:30:55 +0000
2034@@ -0,0 +1,78 @@
2035+<!DOCTYPE node PUBLIC
2036+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
2037+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
2038+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
2039+
2040+ <interface name="org.freedesktop.URfkill.Killswitch">
2041+ <doc:doc>
2042+ <doc:description>
2043+ <doc:para>
2044+ Objects implementing this interface represent different types
2045+ of killswitches and are discovered through the
2046+ <doc:tt>org.freedesktop.URfkill.Killswitch</doc:tt> interface
2047+ on the <doc:tt>/org/freedesktop/URfkill/TYPENAME</doc:tt>
2048+ object on the D-Bus system bus service with the well-known
2049+ name <doc:tt>org.freedesktop.URfkill</doc:tt>. The TYPENAME
2050+ could be <doc:tt>"WLAN"</doc:tt>, <doc:tt>"BLUETOOTH"</doc:tt>,
2051+ <doc:tt>"UWB"</doc:tt>, <doc:tt>"WIMAX"</doc:tt>,
2052+ <doc:tt>"WWAN"</doc:tt>, <doc:tt>"GPS"</doc:tt>,
2053+ <doc:tt>"FM"</doc:tt>, or <doc:tt>"NFC"</doc:tt>.
2054+ </doc:para>
2055+ <doc:para>
2056+ <doc:example language="shell" title="simple example">
2057+ <doc:code>
2058+$ gdbus call -y \
2059+ -d org.freedesktop.URfkill \
2060+ -o /org/freedesktop/URfkill/WLAN \
2061+ -m org.freedesktop.DBus.Properties.GetAll \
2062+ "org.freedesktop.URfkill.Killswitch"
2063+
2064+({'state': &lt;2&gt;},)
2065+ </doc:code>
2066+ </doc:example>
2067+ </doc:para>
2068+ </doc:description>
2069+ </doc:doc>
2070+
2071+ <signal name="StateChanged">
2072+ <doc:doc>
2073+ <doc:description>
2074+ <doc:para>
2075+ Emitted when the state of the killswitch changed.
2076+ </doc:para>
2077+ <doc:para>
2078+ Note: This signal is deprecated since 0.4.0. Use the standard signal,
2079+ PropertiesChanged from org.freedesktop.DBus.Properties instead.
2080+ </doc:para>
2081+ </doc:description>
2082+ </doc:doc>
2083+ </signal>
2084+
2085+ <!-- ************************************************************ -->
2086+
2087+ <property name="state" type="i" access="read">
2088+ <doc:doc>
2089+ <doc:description>
2090+ <doc:para>
2091+ The state of the killswitch
2092+ </doc:para>
2093+ <doc:list>
2094+ <doc:item>
2095+ <doc:term>-1</doc:term><doc:definition>killswitch is not available.</doc:definition>
2096+ </doc:item>
2097+ <doc:item>
2098+ <doc:term>0</doc:term><doc:definition>killswitch is unblocked.</doc:definition>
2099+ </doc:item>
2100+ <doc:item>
2101+ <doc:term>1</doc:term><doc:definition>killswitch is soft-blocked.</doc:definition>
2102+ </doc:item>
2103+ <doc:item>
2104+ <doc:term>2</doc:term><doc:definition>killswitch is hard-blocked.</doc:definition>
2105+ </doc:item>
2106+ </doc:list>
2107+ </doc:description>
2108+ </doc:doc>
2109+ </property>
2110+
2111+ </interface>
2112+</node>
2113
2114=== added file 'data/org.freedesktop.URfkill.xml'
2115--- data/org.freedesktop.URfkill.xml 1970-01-01 00:00:00 +0000
2116+++ data/org.freedesktop.URfkill.xml 2015-04-01 15:30:55 +0000
2117@@ -0,0 +1,388 @@
2118+<!DOCTYPE node PUBLIC
2119+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
2120+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
2121+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
2122+
2123+ <interface name="org.freedesktop.URfkill">
2124+ <doc:doc>
2125+ <doc:description>
2126+ <doc:para>
2127+ The urfkill service is available via the system message
2128+ bus. To access the service, use
2129+ the <doc:tt>org.freedesktop.URfkill</doc:tt> interface on
2130+ the <doc:tt>/org/freedesktop/URfkill</doc:tt> object on
2131+ the D-Bus system bus service with the well-known
2132+ name <doc:tt>org.freedesktop.URfkill</doc:tt>.
2133+ </doc:para>
2134+ <doc:para>
2135+ <doc:example language="shell" title="simple example">
2136+ <doc:code>
2137+$ gdbus call -y \
2138+ -d org.freedesktop.URfkill \
2139+ -o /org/freedesktop/URfkill \
2140+ -m org.freedesktop.URfkill.EnumerateDevices
2141+
2142+([objectpath '/org/freedesktop/URfkill/devices/0', '/org/freedesktop/URfkill/devices/1'],)
2143+ </doc:code>
2144+ </doc:example>
2145+ </doc:para>
2146+ </doc:description>
2147+ </doc:doc>
2148+
2149+ <!-- ************************************************************ -->
2150+
2151+ <method name="Block">
2152+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
2153+ <arg type="u" name="type" direction="in">
2154+ <doc:doc><doc:summary>
2155+ The type of devices to be blocked/unblocked
2156+ </doc:summary></doc:doc>
2157+ </arg>
2158+ <arg type="b" name="block" direction="in">
2159+ <doc:doc><doc:summary>
2160+ TRUE to block the devices, FALSE to unblock
2161+ </doc:summary></doc:doc>
2162+ </arg>
2163+ <arg type="b" name="ret" direction="out">
2164+ <doc:doc><doc:summary>
2165+ TRUE for success, otherwise FALSE
2166+ </doc:summary></doc:doc>
2167+ </arg>
2168+
2169+ <doc:doc>
2170+ <doc:description>
2171+ <doc:para>
2172+ Block or unblock the devices belonging to the type.
2173+ The types are defined as the followings:
2174+ </doc:para>
2175+ <doc:list>
2176+ <doc:item>
2177+ <doc:term>0</doc:term><doc:definition>All</doc:definition>
2178+ </doc:item>
2179+ <doc:item>
2180+ <doc:term>1</doc:term><doc:definition>WLAN</doc:definition>
2181+ </doc:item>
2182+ <doc:item>
2183+ <doc:term>2</doc:term><doc:definition>Bluetooth</doc:definition>
2184+ </doc:item>
2185+ <doc:item>
2186+ <doc:term>3</doc:term><doc:definition>UWB</doc:definition>
2187+ </doc:item>
2188+ <doc:item>
2189+ <doc:term>4</doc:term><doc:definition>WIMAX</doc:definition>
2190+ </doc:item>
2191+ <doc:item>
2192+ <doc:term>5</doc:term><doc:definition>WWAN</doc:definition>
2193+ </doc:item>
2194+ <doc:item>
2195+ <doc:term>6</doc:term><doc:definition>GPS</doc:definition>
2196+ </doc:item>
2197+ <doc:item>
2198+ <doc:term>7</doc:term><doc:definition>FM</doc:definition>
2199+ </doc:item>
2200+ </doc:list>
2201+ <doc:para>
2202+ Note: This method only changes soft block. Hard block is controlled
2203+ by BIOS or the hardware and there is no way to change the
2204+ state of hard block through kernel functions.
2205+ </doc:para>
2206+ </doc:description>
2207+ <doc:permission>
2208+ This method is restricted to the active session user.
2209+ </doc:permission>
2210+ </doc:doc>
2211+ </method>
2212+
2213+ <!-- ************************************************************ -->
2214+
2215+ <method name="BlockIdx">
2216+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
2217+ <arg type="u" name="index" direction="in">
2218+ <doc:doc><doc:summary>
2219+ The index of the device to be blocked/unblocked
2220+ </doc:summary></doc:doc>
2221+ </arg>
2222+ <arg type="b" name="block" direction="in">
2223+ <doc:doc><doc:summary>
2224+ TRUE to block the device, FALSE to unblock
2225+ </doc:summary></doc:doc>
2226+ </arg>
2227+ <arg type="b" name="ret" direction="out">
2228+ <doc:doc><doc:summary>
2229+ TRUE for success, otherwise FALSE
2230+ </doc:summary></doc:doc>
2231+ </arg>
2232+
2233+ <doc:doc>
2234+ <doc:description>
2235+ <doc:para>
2236+ Block or unblock the device by the index.
2237+ </doc:para>
2238+ <doc:para>
2239+ Note: This method only changes soft block. Hard block is controlled
2240+ by BIOS or the hardware and there is no way to change the
2241+ state of hard block through kernel functions.
2242+ </doc:para>
2243+ </doc:description>
2244+ <doc:permission>
2245+ This method is restricted to the currently active session user.
2246+ </doc:permission>
2247+ </doc:doc>
2248+ </method>
2249+
2250+ <!-- ************************************************************ -->
2251+
2252+ <method name="EnumerateDevices">
2253+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
2254+ <arg type="ao" name="array" direction="out">
2255+ <doc:doc><doc:summary>
2256+ An array of the object pathes for the devices
2257+ </doc:summary></doc:doc>
2258+ </arg>
2259+
2260+ <doc:doc>
2261+ <doc:description>
2262+ <doc:para>
2263+ Enumerate all rfkill objects on the system.
2264+ </doc:para>
2265+ </doc:description>
2266+ </doc:doc>
2267+ </method>
2268+
2269+ <!-- ************************************************************ -->
2270+
2271+ <method name="FlightMode">
2272+ <arg type="b" name="block" direction="in">
2273+ <doc:doc><doc:summary>
2274+ TRUE of flight mode should be enabled, otherwise FALSE
2275+ </doc:summary></doc:doc>
2276+ </arg>
2277+ <arg type="b" name="ret" direction="out">
2278+ <doc:doc><doc:summary>
2279+ TRUE if successful, otherwise FALSE
2280+ </doc:summary></doc:doc>
2281+ </arg>
2282+
2283+ <doc:doc>
2284+ <doc:description>
2285+ <doc:para>
2286+ Enable or disable flight mode.
2287+ </doc:para>
2288+ </doc:description>
2289+ </doc:doc>
2290+ </method>
2291+
2292+ <!-- ************************************************************ -->
2293+
2294+ <method name="IsFlightMode">
2295+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
2296+ <arg type="b" name="is_flight_mode" direction="out">
2297+ <doc:doc><doc:summary>
2298+ TRUE if flight mode is enabled, otherwise FALSE
2299+ </doc:summary></doc:doc>
2300+ </arg>
2301+
2302+ <doc:doc>
2303+ <doc:description>
2304+ <doc:para>
2305+ Get whether flight mode is enabled or not.
2306+ </doc:para>
2307+ </doc:description>
2308+ </doc:doc>
2309+ </method>
2310+
2311+ <!-- ************************************************************ -->
2312+
2313+ <method name="IsInhibited">
2314+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
2315+ <arg type="b" name="is_inhibited" direction="out">
2316+ <doc:doc><doc:summary>
2317+ TRUE if the key control is inhibited, otherwise FALSE
2318+ </doc:summary></doc:doc>
2319+ </arg>
2320+
2321+ <doc:doc>
2322+ <doc:description>
2323+ <doc:para>
2324+ Get whether the rfkill key handling function is inhibited or not.
2325+ </doc:para>
2326+ </doc:description>
2327+ </doc:doc>
2328+ </method>
2329+
2330+ <!-- ************************************************************ -->
2331+
2332+ <method name="Inhibit">
2333+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
2334+ <arg type="s" name="reason" direction="in">
2335+ <doc:doc><doc:summary>
2336+ The reason to inhibit the key control
2337+ </doc:summary></doc:doc>
2338+ </arg>
2339+ <arg type="u" name="inhibit_cookie" direction="out">
2340+ <doc:doc><doc:summary>
2341+ The cookie
2342+ </doc:summary></doc:doc>
2343+ </arg>
2344+
2345+ <doc:doc>
2346+ <doc:description>
2347+ <doc:para>
2348+ Inhibit the rfkill key handling function for the session.
2349+ </doc:para>
2350+ </doc:description>
2351+ </doc:doc>
2352+ </method>
2353+
2354+ <!-- ************************************************************ -->
2355+
2356+ <method name="Uninhibit">
2357+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
2358+ <arg type="u" name="inhibit_cookie" direction="in">
2359+ <doc:doc><doc:summary>
2360+ The cookie
2361+ </doc:summary></doc:doc>
2362+ </arg>
2363+
2364+ <doc:doc>
2365+ <doc:description>
2366+ <doc:para>
2367+ Cancel a previous call to <doc:ref type="method" to="org.freedesktop.URfkill.Inhibit">Inhibit()</doc:ref>
2368+ identified by the cookie.
2369+ </doc:para>
2370+ </doc:description>
2371+ </doc:doc>
2372+ </method>
2373+
2374+ <!-- ************************************************************ -->
2375+
2376+ <signal name="DeviceAdded">
2377+ <arg type="o" name="device" direction="out">
2378+ <doc:doc><doc:summary>
2379+ The object path for the device that was added
2380+ </doc:summary></doc:doc>
2381+ </arg>
2382+
2383+ <doc:doc>
2384+ <doc:description>
2385+ <doc:para>
2386+ Emitted when a device is added.
2387+ </doc:para>
2388+ </doc:description>
2389+ </doc:doc>
2390+ </signal>
2391+
2392+ <!-- ************************************************************ -->
2393+
2394+ <signal name="DeviceRemoved">
2395+ <arg type="o" name="device" direction="out">
2396+ <doc:doc><doc:summary>
2397+ The object path for the device that was removed
2398+ </doc:summary></doc:doc>
2399+ </arg>
2400+
2401+ <doc:doc>
2402+ <doc:description>
2403+ <doc:para>
2404+ Emitted when a device is removed.
2405+ </doc:para>
2406+ </doc:description>
2407+ </doc:doc>
2408+ </signal>
2409+
2410+ <!-- ************************************************************ -->
2411+
2412+ <signal name="DeviceChanged">
2413+ <arg type="o" name="device" direction="out">
2414+ <doc:doc><doc:summary>
2415+ The object path for the device that was changed
2416+ </doc:summary></doc:doc>
2417+ </arg>
2418+
2419+ <doc:doc>
2420+ <doc:description>
2421+ <doc:para>
2422+ Emitted when a device is changed.
2423+ </doc:para>
2424+ </doc:description>
2425+ </doc:doc>
2426+ </signal>
2427+
2428+ <!-- ************************************************************ -->
2429+
2430+ <signal name="FlightModeChanged">
2431+ <arg type="b" name="flight_mode" direction="out">
2432+ <doc:doc><doc:summary>
2433+ TRUE if flight mode has been enabled, otherwise FALSE
2434+ </doc:summary></doc:doc>
2435+ </arg>
2436+
2437+ <doc:doc>
2438+ <doc:description>
2439+ <doc:para>
2440+ Emitted when flight mode is enabled or disabled.
2441+ </doc:para>
2442+ </doc:description>
2443+ </doc:doc>
2444+ </signal>
2445+
2446+ <!-- ************************************************************ -->
2447+
2448+ <signal name="UrfkeyPressed">
2449+ <arg type="i" name="keycode" direction="out">
2450+ <doc:doc><doc:summary>
2451+ The keycode emitted from the input device
2452+ </doc:summary></doc:doc>
2453+ </arg>
2454+
2455+ <doc:doc>
2456+ <doc:description>
2457+ <doc:para>
2458+ Emitted when a rfkill key is pressed. The keycode is defined in
2459+ &lt;linux/input.h&gt;.
2460+ </doc:para>
2461+ <doc:list>
2462+ <doc:item>
2463+ <doc:term>237</doc:term><doc:definition>KEY_BLUETOOTH</doc:definition>
2464+ </doc:item>
2465+ <doc:item>
2466+ <doc:term>238</doc:term><doc:definition>KEY_WLAN</doc:definition>
2467+ </doc:item>
2468+ <doc:item>
2469+ <doc:term>239</doc:term><doc:definition>KEY_UWB</doc:definition>
2470+ </doc:item>
2471+ <doc:item>
2472+ <doc:term>246</doc:term><doc:definition>KEY_WIMAX</doc:definition>
2473+ </doc:item>
2474+ <doc:item>
2475+ <doc:term>247</doc:term><doc:definition>KEY_RFKILL</doc:definition>
2476+ </doc:item>
2477+ </doc:list>
2478+ </doc:description>
2479+ </doc:doc>
2480+ </signal>
2481+
2482+ <!-- ************************************************************ -->
2483+
2484+ <property name="DaemonVersion" type="s" access="read">
2485+ <doc:doc>
2486+ <doc:description>
2487+ <doc:para>
2488+ The version the running daemon. e.g. 0.2.0
2489+ </doc:para>
2490+ </doc:description>
2491+ </doc:doc>
2492+ </property>
2493+
2494+ <property name="KeyControl" type="b" access="read">
2495+ <doc:doc>
2496+ <doc:description>
2497+ <doc:para>
2498+ Whether the key control is enabled or not
2499+ </doc:para>
2500+ </doc:description>
2501+ </doc:doc>
2502+ </property>
2503+
2504+ </interface>
2505+</node>
2506
2507=== modified file 'debian/control'
2508--- debian/control 2014-10-29 19:46:09 +0000
2509+++ debian/control 2015-04-01 15:30:55 +0000
2510@@ -9,22 +9,21 @@
2511 g++-4.9,
2512 debhelper (>= 9.0.0),
2513 google-mock (>= 1.6.0+svn437),
2514- dbus-test-runner,
2515- libdbus-1-dev,
2516- libdbus-cpp-dev (>= 4.1.0),
2517 libglib2.0-dev,
2518- libnm-glib-dev (>= 0.9),
2519- libnm-util-dev (>= 0.9),
2520 libnotify-dev,
2521- libprocess-cpp-dev,
2522- libproperties-cpp-dev,
2523+#///! TODO: The next line should be removed once all dependancy on qmenumodel is removed
2524 libqmenumodel-dev,
2525+ libqofono-dev,
2526+ libqofono-qt5-0,
2527+#///! TODO: The next line should be replaced with: libqtdbusmock1-dev (>= 0.3),
2528 libqtdbusmock1-dev,
2529 libqtdbustest1-dev,
2530 liburl-dispatcher1-dev,
2531+ libunity-api-dev,
2532 network-manager-dev,
2533 ofono-dev,
2534 pkg-config,
2535+#///! TODO: The next line should be replaced with: python3-dbusmock (>= 0.14),
2536 python3-dbusmock,
2537 python3-setuptools,
2538 qt5-default,
2539@@ -69,4 +68,3 @@
2540 Description: Autopilot tests for the network indicator for Ubuntu
2541 The Indicator-network service is responsible for exporting the system settings
2542 menu through dbus. This package contains its autopilot tests.
2543-
2544
2545=== added directory 'sniffer'
2546=== added file 'sniffer/CMakeLists.txt'
2547--- sniffer/CMakeLists.txt 1970-01-01 00:00:00 +0000
2548+++ sniffer/CMakeLists.txt 2015-04-01 15:30:55 +0000
2549@@ -0,0 +1,36 @@
2550+add_executable(i-n-sniffer
2551+eventprinter.cpp
2552+eventprinter.h
2553+i-n-extractor.cpp
2554+nmaccesspoint.cpp
2555+nmaccesspoint.h
2556+nmactiveconnection.cpp
2557+nmactiveconnection.h
2558+nmconnsettings.cpp
2559+nmconnsettings.h
2560+nmroot.cpp
2561+nmroot.h
2562+nmsettings.cpp
2563+nmsettings.h
2564+nmwirelessdevice.cpp
2565+nmwirelessdevice.h
2566+ofonomodemmodem.cpp
2567+ofonomodemmodem.h
2568+ofonomodemnetworkregistration.cpp
2569+ofonomodemnetworkregistration.h
2570+ofonomodemsimmanager.cpp
2571+ofonomodemsimmanager.h
2572+ofonoroot.cpp
2573+ofonoroot.h
2574+urfkillroot.cpp
2575+urfkillroot.h
2576+urfkillswitch.cpp
2577+urfkillswitch.h
2578+)
2579+
2580+qt5_use_modules(i-n-sniffer Core DBus)
2581+
2582+install(
2583+ TARGETS i-n-sniffer
2584+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
2585+)
2586
2587=== added file 'sniffer/eventprinter.h'
2588--- sniffer/eventprinter.h 1970-01-01 00:00:00 +0000
2589+++ sniffer/eventprinter.h 2015-04-01 15:30:55 +0000
2590@@ -0,0 +1,70 @@
2591+/*
2592+ * Copyright (C) 2014 Canonical, Ltd.
2593+ *
2594+ * This program is free software: you can redistribute it and/or modify it
2595+ * under the terms of the GNU General Public License version 3, as published
2596+ * by the Free Software Foundation.
2597+ *
2598+ * This program is distributed in the hope that it will be useful, but
2599+ * WITHOUT ANY WARRANTY; without even the implied warranties of
2600+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
2601+ * PURPOSE. See the GNU General Public License for more details.
2602+ *
2603+ * You should have received a copy of the GNU General Public License along
2604+ * with this program. If not, see <http://www.gnu.org/licenses/>.
2605+ *
2606+ * Authors:
2607+ * Jussi Pakkanen <jussi.pakkanen@canonical.com>
2608+ */
2609+
2610+#pragma once
2611+
2612+#include <QObject>
2613+#include <QDBusVariant>
2614+
2615+class UrfkillRoot;
2616+class UrfkillSwitch;
2617+class NetworkManagerRoot;
2618+class OfonoModemModem;
2619+class OfonoModemSimManager;
2620+class OfonoModemNetworkRegistration;
2621+
2622+class EventPrinter : QObject {
2623+ Q_OBJECT
2624+
2625+public:
2626+ explicit EventPrinter(QObject *parent = nullptr);
2627+ ~EventPrinter();
2628+
2629+public Q_SLOTS:
2630+ void flightModeChanged(bool new_mode);
2631+ void btKillswitchChanged();
2632+ void wlanKillswitchChanged();
2633+ void nmStateChanged(uint new_state);
2634+ void nmPropertiesChanged(const QVariantMap &props);
2635+ void modem1PropertyChanged(const QString name, const QDBusVariant value);
2636+ void modem2PropertyChanged(const QString name, const QDBusVariant value);
2637+ void simman1PropertyChanged(const QString name, const QDBusVariant value);
2638+ void simman2PropertyChanged(const QString name, const QDBusVariant value);
2639+ void netreg1PropertyChanged(const QString name, const QDBusVariant value);
2640+ void netreg2PropertyChanged(const QString name, const QDBusVariant value);
2641+
2642+private:
2643+
2644+ void modemPropertyChanged(const int modem, const QString &name, const QDBusVariant &value);
2645+ void simmanPropertyChanged(const int simman, const QString &name, const QDBusVariant &value);
2646+ void netregPropertyChanged(const int modem, const QString &name, const QDBusVariant &value);
2647+ void activeConnectionsChanged(const QVariant &list);
2648+ void primaryConnectionTypeChanged(const QString &type);
2649+
2650+ UrfkillRoot *urfkill;
2651+ UrfkillSwitch *btkill;
2652+ UrfkillSwitch *wlankill;
2653+ NetworkManagerRoot *nmroot;
2654+ OfonoModemModem *modem1;
2655+ OfonoModemModem *modem2;
2656+ OfonoModemSimManager *simman1;
2657+ OfonoModemSimManager *simman2;
2658+ OfonoModemNetworkRegistration *netreg1;
2659+ OfonoModemNetworkRegistration *netreg2;
2660+};
2661
2662=== added file 'sniffer/i-n-extractor.cpp'
2663--- sniffer/i-n-extractor.cpp 1970-01-01 00:00:00 +0000
2664+++ sniffer/i-n-extractor.cpp 2015-04-01 15:30:55 +0000
2665@@ -0,0 +1,152 @@
2666+/*
2667+ * Copyright (C) 2014 Canonical, Ltd.
2668+ *
2669+ * This program is free software: you can redistribute it and/or modify it
2670+ * under the terms of the GNU General Public License version 3, as published
2671+ * by the Free Software Foundation.
2672+ *
2673+ * This program is distributed in the hope that it will be useful, but
2674+ * WITHOUT ANY WARRANTY; without even the implied warranties of
2675+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
2676+ * PURPOSE. See the GNU General Public License for more details.
2677+ *
2678+ * You should have received a copy of the GNU General Public License along
2679+ * with this program. If not, see <http://www.gnu.org/licenses/>.
2680+ *
2681+ * Authors:
2682+ * Jussi Pakkanen <jussi.pakkanen@canonical.com>
2683+ */
2684+
2685+
2686+#include <QCoreApplication>
2687+
2688+#include "dbusdata.h"
2689+#include "eventprinter.h"
2690+#include "nmaccesspoint.h"
2691+#include "nmactiveconnection.h"
2692+#include "nmconnsettings.h"
2693+#include "nmroot.h"
2694+#include "nmsettings.h"
2695+#include "nmwirelessdevice.h"
2696+#include "ofonomodemnetworkregistration.h"
2697+#include "ofonomodemsimmanager.h"
2698+#include "ofonoroot.h"
2699+#include "urfkillroot.h"
2700+#include "urfkillswitch.h"
2701+
2702+static std::map<const int, const char*> nm_active_connection_strings = {{0, "Unknown"}, {1, "Activating"},
2703+ {2, "Activated"}, {3, "Deactivating"}, {4, "Deactivated"}};
2704+static std::map<const int, const char*> nm_connectivity_strings = {{0, "Unknown"}, {1, "None"}, {2, "Portal"},
2705+ {3, "Limited"}, {4, "Full"}};
2706+static std::map<const int, const char*> nm_state_strings = {{0, "Unknown"}, {10, "Asleep"}, {20, "Disconnected"},
2707+ {30, "Disconnecting"}, {40, "Connecting"}, {50, "Connected local"}, {60, "Connected site"}, {70, "Connected global"}};
2708+static std::map<const int, const char*> nm_ap_mode_strings = {{0, "Unknown"}, {1, "Adhoc"}, {2, "Infra"}, {3, "Access point"}};
2709+
2710+void print_nm_wlans(NetworkManagerRoot *nmroot) {
2711+ auto paths = nmroot->activeConnections();
2712+ for(const auto &path : paths) {
2713+ NetworkManagerActiveConnection ac(NM_SERVICE, path.path(), QDBusConnection::systemBus(), nullptr);
2714+ auto devices = ac.devices();
2715+ // FIXME, should check all but most connections only have one.
2716+ NetworkManagerWirelessDevice dev(NM_SERVICE, devices[0].path(), QDBusConnection::systemBus(), nullptr);
2717+ auto reply = dev.GetAccessPoints();
2718+ reply.waitForFinished();
2719+ if(reply.isValid()) {
2720+ // FIXME and the same here.
2721+ // FIXME also that active access point might not exist
2722+ NetworkManagerAccessPoint ap(NM_SERVICE, dev.activeAccessPoint().path(), QDBusConnection::systemBus(), nullptr);
2723+ printf("Connection %s:\n", path.path().toUtf8().data());
2724+ auto raw_ssid = ap.ssid();
2725+ std::string ssid(raw_ssid.cbegin(), raw_ssid.cend());
2726+ printf(" ssid: %s\n", ssid.c_str());
2727+ printf(" mode: %d (%s)\n", ap.mode(), nm_ap_mode_strings[ap.mode()]);
2728+ printf(" visible networks:\n");
2729+ for(const auto &c : reply.value()) {
2730+ NetworkManagerAccessPoint i(NM_SERVICE, c.path(), QDBusConnection::systemBus(), nullptr);
2731+ auto i_raw_ssid = i.ssid();
2732+ std::string i_ssid(i_raw_ssid.cbegin(), i_raw_ssid.cend());
2733+ printf(" %s %d\n", i_ssid.c_str(), (int)i.strength());
2734+ }
2735+ } else {
2736+ printf("Connection %s is not wireless.\n", path.path().toUtf8().data());
2737+ }
2738+ }
2739+}
2740+
2741+void print_info(QCoreApplication &app) {
2742+ UrfkillRoot *urfkill = new UrfkillRoot(URFKILL_SERVICE, URFKILL_OBJECT,
2743+ QDBusConnection::systemBus(), &app);
2744+ UrfkillSwitch *urfkillwlan = new UrfkillSwitch(URFKILL_SERVICE, URFKILL_WLAN_OBJECT,
2745+ QDBusConnection::systemBus(), &app);
2746+ UrfkillSwitch *urfkillbt = new UrfkillSwitch(URFKILL_SERVICE, URFKILL_BLUETOOTH_OBJECT,
2747+ QDBusConnection::systemBus(), &app);
2748+ UrfkillSwitch *urfkillgps = new UrfkillSwitch(URFKILL_SERVICE, URFKILL_GPS_OBJECT,
2749+ QDBusConnection::systemBus(), &app);
2750+ NetworkManagerRoot *nmroot = new NetworkManagerRoot(NM_SERVICE, NM_OBJECT,
2751+ QDBusConnection::systemBus(), &app);
2752+ OfonoRoot *ofonoroot = new OfonoRoot(OFONO_SERVICE, OFONO_OBJECT,
2753+ QDBusConnection::systemBus(), &app);
2754+
2755+ printf("Urfkill flightmode: %d\n", urfkill->IsFlightMode().value());
2756+ printf("Urfkill WLAN killswitch: %d\n", urfkillwlan->state());
2757+ printf("Urfkill BLUETOOTH killswitch: %d\n", urfkillbt->state());
2758+ printf("Urfkill GPS killswitch: %d\n", urfkillgps->state());
2759+ printf("\n");
2760+ auto nm_connectivity = nmroot->connectivity();
2761+ printf("NetworkManager connectivity: %d (%s)\n", nm_connectivity, nm_connectivity_strings[nm_connectivity]);
2762+ auto nm_state = nmroot->state().value();
2763+ printf("NetworkManager state: %d (%s).\n", nm_state, nm_state_strings[nm_state]);
2764+ printf("NetworkManager networking enabled: %d\n", nmroot->networkingEnabled());
2765+ printf("NetworkManager wireless enabled: %d\n", nmroot->wirelessEnabled());
2766+ printf("NetworkManager wireless hardware enabled: %d\n", nmroot->wirelessHardwareEnabled());
2767+ print_nm_wlans(nmroot);
2768+ printf("\n");
2769+ auto modems = ofonoroot->GetModems().value();
2770+ printf("Ofono modem count: %d\n", modems.size());
2771+ for(const auto &m : modems) {
2772+ OfonoModemSimManager man(OFONO_SERVICE, m.first.path(), QDBusConnection::systemBus(), nullptr);
2773+ OfonoModemNetworkRegistration netreg(OFONO_SERVICE, m.first.path(), QDBusConnection::systemBus(), nullptr);
2774+ auto mprops = man.GetProperties().value();
2775+ auto regprops = netreg.GetProperties().value();
2776+
2777+ const auto &props = m.second;
2778+ printf("Modem %s:\n", m.first.path().toUtf8().data());
2779+ // For proper usage should check for existance before indexing.
2780+ printf(" Powered: %d\n", props["Powered"].toBool());
2781+ printf(" Online: %d\n", props["Online"].toBool());
2782+ printf(" Model: %s\n", props["Model"].toString().toUtf8().data());
2783+ printf(" Manufacturer: %s\n", props["Manufacturer"].toString().toUtf8().data());
2784+ printf(" Pin required: %s\n", mprops["PinRequired"].toString().toUtf8().data());
2785+ printf(" Status: %s\n", regprops["Status"].toString().toUtf8().data());
2786+ printf(" Strength: %d\n", regprops["Strength"].toInt());
2787+ printf(" Operator: %s\n", regprops["Name"].toString().toUtf8().data());
2788+ }
2789+}
2790+
2791+int run_daemon(QCoreApplication &app) {
2792+ new EventPrinter(&app);
2793+ return app.exec();
2794+}
2795+
2796+int main(int argc, char **argv) {
2797+ QCoreApplication app(argc, argv);
2798+ qRegisterMetaType<QVariantDictMap>("QVariantDictMap");
2799+ qDBusRegisterMetaType<QVariantDictMap>();
2800+ qRegisterMetaType<ModemPropertyList>("ModemPropertyList");
2801+ qDBusRegisterMetaType<ModemPropertyList>();
2802+ qDBusRegisterMetaType<QPair<QDBusObjectPath, QVariantMap>>();
2803+
2804+ if(argc == 1) {
2805+ print_info(app);
2806+ } else if(argc == 2) {
2807+ static const std::string arg("-d"); // For daemon mode. Feel free to change to something saner.
2808+ if(argv[1] == arg)
2809+ return run_daemon(app);
2810+ printf("Unknown argument.\n");
2811+ return 1;
2812+ } else {
2813+ printf("Too many arguments.\n");
2814+ return 1;
2815+ }
2816+ return 0;
2817+}
2818
2819=== modified file 'src/CMakeLists.txt'
2820--- src/CMakeLists.txt 2015-02-16 18:34:37 +0000
2821+++ src/CMakeLists.txt 2015-04-01 15:30:55 +0000
2822@@ -3,10 +3,11 @@
2823 set(COMMON_FLAGS "${COMMON_FLAGS} -Werror")
2824 endif()
2825
2826-add_subdirectory(dbus-cpp)
2827-add_subdirectory(connectivity-cpp)
2828+#add_subdirectory(dbus-cpp)
2829+#add_subdirectory(connectivity-cpp)
2830 add_subdirectory(indicator)
2831 add_subdirectory(menumodel-cpp)
2832+add_subdirectory(qdbus-stubs)
2833 add_subdirectory(notify-cpp)
2834 add_subdirectory(secret-agent)
2835 add_subdirectory(url-dispatcher-cpp)
2836
2837=== modified file 'src/connectivity-cpp/CMakeLists.txt'
2838--- src/connectivity-cpp/CMakeLists.txt 2014-08-19 21:13:53 +0000
2839+++ src/connectivity-cpp/CMakeLists.txt 2015-04-01 15:30:55 +0000
2840@@ -3,13 +3,11 @@
2841 set(CONNECTIVITY_CPP_VERSION_MINOR 0)
2842 set(CONNECTIVITY_CPP_VERSION_PATCH 1)
2843
2844-include(CTest)
2845-
2846-find_package(PkgConfig REQUIRED)
2847-
2848-include_directories(include)
2849-include_directories(dbus-cpp)
2850-
2851+include_directories(
2852+ "${CMAKE_CURRENT_SOURCE_DIR}/include"
2853+ "${CMAKE_CURRENT_SOURCE_DIR}/backend"
2854+ "${CMAKE_CURRENT_BINARY_DIR}/backend"
2855+)
2856 pkg_check_modules(
2857 PROPERTIESCPP REQUIRED
2858 properties-cpp
2859@@ -45,15 +43,7 @@
2860 )
2861 add_custom_target(QtCreatorHeaderHack SOURCES ${CONNECTIVITY_INTERFACES})
2862
2863-# list these here to have them visible in Qt Creator
2864-set(DBUS_INTERFACES
2865- dbus-cpp/services/nm.h
2866- dbus-cpp/services/ofono.h
2867- dbus-cpp/services/urfkill.h
2868-)
2869-add_custom_target(QtCreatorHeaderHack2 SOURCES ${DBUS_INTERFACES})
2870-
2871 add_subdirectory(data)
2872 #add_subdirectory(doc)
2873-add_subdirectory(examples)
2874+#add_subdirectory(examples)
2875 add_subdirectory(src)
2876
2877=== removed directory 'src/connectivity-cpp/dbus-cpp'
2878=== removed directory 'src/connectivity-cpp/dbus-cpp/services'
2879=== removed file 'src/connectivity-cpp/dbus-cpp/services/nm.h'
2880--- src/connectivity-cpp/dbus-cpp/services/nm.h 2014-10-31 13:50:05 +0000
2881+++ src/connectivity-cpp/dbus-cpp/services/nm.h 1970-01-01 00:00:00 +0000
2882@@ -1,979 +0,0 @@
2883-/*
2884- * Copyright © 2012-2013 Canonical Ltd.
2885- *
2886- * This program is free software: you can redistribute it and/or modify it
2887- * under the terms of the GNU Lesser General Public License version 3,
2888- * as published by the Free Software Foundation.
2889- *
2890- * This program is distributed in the hope that it will be useful,
2891- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2892- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2893- * GNU Lesser General Public License for more details.
2894- *
2895- * You should have received a copy of the GNU Lesser General Public License
2896- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2897- *
2898- * Authored by: Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
2899- */
2900-#ifndef PLATFORM_MANAGER_NMOFONO_NM_H
2901-#define PLATFORM_MANAGER_NMOFONO_NM_H
2902-
2903-#include <core/dbus/bus.h>
2904-#include <core/dbus/object.h>
2905-#include <core/dbus/property.h>
2906-#include <core/dbus/service.h>
2907-#include <core/dbus/types/object_path.h>
2908-#include <core/dbus/types/any.h>
2909-#include <core/dbus/types/struct.h>
2910-#include <core/dbus/types/stl/map.h>
2911-#include <core/dbus/types/stl/string.h>
2912-#include <core/dbus/types/stl/tuple.h>
2913-#include <core/dbus/types/stl/vector.h>
2914-#include <NetworkManager/NetworkManager.h>
2915-#include "util.h"
2916-
2917-namespace org
2918-{
2919-namespace freedesktop
2920-{
2921-namespace NetworkManager
2922-{
2923- struct Interface {
2924-
2925- struct AccessPoint
2926- {
2927- static const std::string& name()
2928- {
2929- static const std::string s{NM_DBUS_INTERFACE_ACCESS_POINT};
2930- return s;
2931- }
2932-
2933- struct Property {
2934- struct Frequency
2935- {
2936- static const std::string& name()
2937- {
2938- static const std::string s{"Frequency"};
2939- return s;
2940- }
2941-
2942- typedef AccessPoint Interface;
2943- typedef std::uint32_t ValueType;
2944- static const bool readable = true;
2945- static const bool writable = false;
2946- };
2947-
2948- struct Flags
2949- {
2950- static const std::string& name()
2951- {
2952- static const std::string s{"Flags"};
2953- return s;
2954- }
2955-
2956- typedef AccessPoint Interface;
2957- typedef std::uint32_t ValueType;
2958- static const bool readable = true;
2959- static const bool writable = false;
2960- };
2961-
2962- struct WpaFlags
2963- {
2964- static const std::string& name()
2965- {
2966- static const std::string s{"WpaFlags"};
2967- return s;
2968- }
2969-
2970- typedef AccessPoint Interface;
2971- typedef std::uint32_t ValueType;
2972- static const bool readable = true;
2973- static const bool writable = false;
2974- };
2975-
2976- struct RsnFlags
2977- {
2978- static const std::string& name()
2979- {
2980- static const std::string s{"RsnFlags"};
2981- return s;
2982- }
2983-
2984- typedef AccessPoint Interface;
2985- typedef std::uint32_t ValueType;
2986- static const bool readable = true;
2987- static const bool writable = false;
2988- };
2989-
2990- struct Mode
2991- {
2992- static const std::string& name()
2993- {
2994- static const std::string s{"Mode"};
2995- return s;
2996- }
2997-
2998- typedef AccessPoint Interface;
2999- typedef std::uint32_t ValueType;
3000- static const bool readable = true;
3001- static const bool writable = false;
3002- };
3003-
3004- struct Ssid
3005- {
3006- static const std::string& name()
3007- {
3008- static const std::string s{"Ssid"};
3009- return s;
3010- }
3011-
3012- typedef AccessPoint Interface;
3013- /// @todo bug tvoss.. D-Bus BYTE(y) should be unsigned
3014- typedef std::vector<std::int8_t> ValueType;
3015- static const bool readable = true;
3016- static const bool writable = false;
3017- };
3018-
3019- struct HwAddress
3020- {
3021- static const std::string& name()
3022- {
3023- static const std::string s{"HwAddress"};
3024- return s;
3025- }
3026-
3027- typedef AccessPoint Interface;
3028- typedef std::string ValueType;
3029- static const bool readable = true;
3030- static const bool writable = false;
3031- };
3032-
3033- struct Strength
3034- {
3035- static const std::string& name()
3036- {
3037- static const std::string s{"Strength"};
3038- return s;
3039- }
3040-
3041- typedef AccessPoint Interface;
3042- typedef std::int8_t ValueType;
3043- static const bool readable = true;
3044- static const bool writable = false;
3045- };
3046- };
3047-
3048- struct Signal {
3049- struct PropertiesChanged
3050- {
3051- static const std::string& name()
3052- {
3053- static const std::string s{"PropertiesChanged"};
3054- return s;
3055- }
3056-
3057- typedef AccessPoint Interface;
3058- typedef std::map<std::string, core::dbus::types::Variant> ArgumentType;
3059- };
3060- };
3061-
3062- AccessPoint(const std::shared_ptr<core::dbus::Object>& object)
3063- : object(object),
3064- frequency(object->get_property<Property::Frequency>()),
3065- hw_address(object->get_property<Property::HwAddress>()),
3066- strength(object->get_property<Property::Strength>()),
3067- flags(object->get_property<Property::Flags>()),
3068- wpa_flags(object->get_property<Property::WpaFlags>()),
3069- rsn_flags(object->get_property<Property::RsnFlags>()),
3070- mode(object->get_property<Property::Mode>()),
3071- ssid(object->get_property<Property::Ssid>()),
3072- properties_changed(object->get_signal<Signal::PropertiesChanged>())
3073-
3074- {}
3075-
3076- std::shared_ptr<core::dbus::Object> object;
3077- std::shared_ptr<core::dbus::Property<Property::Frequency>> frequency;
3078- std::shared_ptr<core::dbus::Property<Property::HwAddress>> hw_address;
3079- std::shared_ptr<core::dbus::Property<Property::Strength>> strength;
3080- std::shared_ptr<core::dbus::Property<Property::Flags>> flags;
3081- std::shared_ptr<core::dbus::Property<Property::WpaFlags>> wpa_flags;
3082- std::shared_ptr<core::dbus::Property<Property::RsnFlags>> rsn_flags;
3083- std::shared_ptr<core::dbus::Property<Property::Mode>> mode;
3084- std::shared_ptr<core::dbus::Property<Property::Ssid>> ssid;
3085- std::shared_ptr<core::dbus::Signal<Signal::PropertiesChanged, Signal::PropertiesChanged::ArgumentType>> properties_changed;
3086- }; // Interface::AccessPoint
3087-
3088-
3089- struct ActiveConnection
3090- {
3091- static const std::string& name()
3092- {
3093- static const std::string s{NM_DBUS_INTERFACE_ACTIVE_CONNECTION};
3094- return s;
3095- }
3096-
3097- struct Property {
3098- struct Connection
3099- {
3100- static const std::string& name()
3101- {
3102- static const std::string s{"Connection"};
3103- return s;
3104- }
3105-
3106- typedef ActiveConnection Interface;
3107- typedef core::dbus::types::ObjectPath ValueType;
3108- static const bool readable = true;
3109- static const bool writable = false;
3110- };
3111- struct SpecificObject
3112- {
3113- static const std::string& name()
3114- {
3115- static const std::string s{"SpecificObject"};
3116- return s;
3117- }
3118-
3119- typedef ActiveConnection Interface;
3120- typedef core::dbus::types::ObjectPath ValueType;
3121- static const bool readable = true;
3122- static const bool writable = false;
3123- };
3124- struct Uuid
3125- {
3126- static const std::string& name()
3127- {
3128- static const std::string s{"Uuid"};
3129- return s;
3130- }
3131-
3132- typedef ActiveConnection Interface;
3133- typedef std::string ValueType;
3134- static const bool readable = true;
3135- static const bool writable = false;
3136- };
3137- struct Devices
3138- {
3139- static const std::string& name()
3140- {
3141- static const std::string s{"Devices"};
3142- return s;
3143- }
3144-
3145- typedef ActiveConnection Interface;
3146- typedef std::vector<core::dbus::types::ObjectPath> ValueType;
3147- static const bool readable = true;
3148- static const bool writable = false;
3149- };
3150- struct State
3151- {
3152- static const std::string& name()
3153- {
3154- static const std::string s{"State"};
3155- return s;
3156- }
3157-
3158- typedef ActiveConnection Interface;
3159- typedef std::uint32_t ValueType;
3160- static const bool readable = true;
3161- static const bool writable = false;
3162- };
3163- struct Default
3164- {
3165- static const std::string& name()
3166- {
3167- static const std::string s{"Default"};
3168- return s;
3169- }
3170-
3171- typedef ActiveConnection Interface;
3172- typedef bool ValueType;
3173- static const bool readable = true;
3174- static const bool writable = false;
3175- };
3176- struct Default6
3177- {
3178- static const std::string& name()
3179- {
3180- static const std::string s{"Default6"};
3181- return s;
3182- }
3183-
3184- typedef ActiveConnection Interface;
3185- typedef bool ValueType;
3186- static const bool readable = true;
3187- static const bool writable = false;
3188- };
3189- struct Vpn
3190- {
3191- static const std::string& name()
3192- {
3193- static const std::string s{"Vpn"};
3194- return s;
3195- }
3196-
3197- typedef ActiveConnection Interface;
3198- typedef bool ValueType;
3199- static const bool readable = true;
3200- static const bool writable = false;
3201- };
3202- struct Master
3203- {
3204- static const std::string& name()
3205- {
3206- static const std::string s{"Master"};
3207- return s;
3208- }
3209-
3210- typedef ActiveConnection Interface;
3211- typedef bool ValueType;
3212- static const bool readable = true;
3213- static const bool writable = false;
3214- };
3215- }; // struct Property
3216-
3217- struct Signal {
3218- struct PropertiesChanged
3219- {
3220- static const std::string& name()
3221- {
3222- static const std::string s{"PropertiesChanged"};
3223- return s;
3224- }
3225-
3226- typedef ActiveConnection Interface;
3227- typedef std::map<std::string, core::dbus::types::Variant> ArgumentType;
3228- };
3229- };
3230-
3231- enum class State
3232- {
3233- unknown = NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
3234- activating = NM_ACTIVE_CONNECTION_STATE_ACTIVATING,
3235- activated = NM_ACTIVE_CONNECTION_STATE_ACTIVATED,
3236- deactivating = NM_ACTIVE_CONNECTION_STATE_DEACTIVATING,
3237- deactivated = NM_ACTIVE_CONNECTION_STATE_DEACTIVATED
3238- };
3239-
3240- ActiveConnection(const std::shared_ptr<core::dbus::Object>& object)
3241- : object(object),
3242- connection(object->get_property<Property::Connection>()),
3243- specific_object(object->get_property<Property::SpecificObject>()),
3244- uuid(object->get_property<Property::Uuid>()),
3245- devices(object->get_property<Property::Devices>()),
3246- state(object->get_property<Property::State>()),
3247- default_ipv4(object->get_property<Property::Default>()),
3248- default_ipv6(object->get_property<Property::Default6>()),
3249- vpn(object->get_property<Property::Vpn>()),
3250- master(object->get_property<Property::Master>()),
3251- properties_changed(object->get_signal<Signal::PropertiesChanged>())
3252- {
3253- token = properties_changed->connect([this](const Signal::PropertiesChanged::ArgumentType &map){
3254- for (auto entry: map) {
3255- if (entry.first == "State") {
3256-#if 0
3257- std::uint32_t new_value = entry.second.as<std::uint32_t>();
3258- state->update([&new_value](std::uint32_t &current_value){
3259- if (new_value == current_value)
3260- return false;
3261- current_value = new_value;
3262- return true;
3263- });
3264-#endif
3265- continue;
3266- }
3267- else {
3268-#ifdef INDICATOR_NETWORK_TRACE_MESSAGES
3269- std::cout << "Unexpected Connection.Active update: " << entry.first << std::endl;
3270-#endif
3271- }
3272- }
3273- });
3274- }
3275- ~ActiveConnection()
3276- {
3277- /// @todo fix dbus-cpp...
3278- //properties_changed->disconnect(token);
3279- }
3280-
3281- State get_state() { return static_cast<State>(state->get()); }
3282-
3283- std::shared_ptr<core::dbus::Object> object;
3284- std::shared_ptr<core::dbus::Property<Property::Connection>> connection;
3285- std::shared_ptr<core::dbus::Property<Property::SpecificObject>> specific_object;
3286- std::shared_ptr<core::dbus::Property<Property::Uuid>> uuid;
3287- std::shared_ptr<core::dbus::Property<Property::Devices>> devices;
3288- std::shared_ptr<core::dbus::Property<Property::State>> state;
3289- std::shared_ptr<core::dbus::Property<Property::Default>> default_ipv4;
3290- std::shared_ptr<core::dbus::Property<Property::Default6>> default_ipv6;
3291- std::shared_ptr<core::dbus::Property<Property::Vpn>> vpn;
3292- std::shared_ptr<core::dbus::Property<Property::Master>> master;
3293-
3294- private:
3295- std::shared_ptr<core::dbus::Signal<Signal::PropertiesChanged, Signal::PropertiesChanged::ArgumentType>> properties_changed;
3296- core::dbus::Signal<Signal::PropertiesChanged, Signal::PropertiesChanged::ArgumentType>::SubscriptionToken token;
3297- }; // Interface::ActiveConnection
3298-
3299- struct Connection
3300- {
3301- std::shared_ptr<core::dbus::Object> object;
3302-
3303- Connection(const std::shared_ptr<core::dbus::Object>& object)
3304- : object(object)
3305- {}
3306-
3307- static const std::string& name()
3308- {
3309- static const std::string s{NM_DBUS_IFACE_SETTINGS_CONNECTION};
3310- return s;
3311- }
3312-
3313- struct Method {
3314- struct GetSettings
3315- {
3316- static const std::string& name()
3317- {
3318- static const std::string s{"GetSettings"};
3319- return s;
3320- }
3321-
3322- typedef Connection Interface;
3323- typedef std::map<std::string, std::map<std::string, core::dbus::types::Variant>> ResultType;
3324-
3325- static std::chrono::milliseconds default_timeout()
3326- {
3327- return std::chrono::seconds{30};
3328- }
3329- };
3330- };
3331-
3332- Method::GetSettings::ResultType
3333- get_settings()
3334- {
3335-
3336- auto result = object->invoke_method_synchronously<Method::GetSettings, Method::GetSettings::ResultType>();
3337-
3338- if (result.is_error())
3339- connectivity::throw_dbus_exception(result.error());
3340-
3341- return result.value();
3342- }
3343- }; // Interface::Connection
3344-
3345- struct Device
3346- {
3347- static const std::string& name()
3348- {
3349- static const std::string s{NM_DBUS_INTERFACE_DEVICE};
3350- return s;
3351- }
3352-
3353- enum class Type
3354- {
3355- unknown = NM_DEVICE_TYPE_UNKNOWN,
3356- ethernet = NM_DEVICE_TYPE_ETHERNET,
3357- wifi = NM_DEVICE_TYPE_WIFI,
3358- unused_1 = NM_DEVICE_TYPE_UNUSED1,
3359- unused_2 = NM_DEVICE_TYPE_UNUSED2,
3360- bluetooth = NM_DEVICE_TYPE_BT,
3361- olpc_mesh = NM_DEVICE_TYPE_OLPC_MESH,
3362- wimax = NM_DEVICE_TYPE_WIMAX,
3363- modem = NM_DEVICE_TYPE_MODEM,
3364- infiniband = NM_DEVICE_TYPE_INFINIBAND,
3365- bond = NM_DEVICE_TYPE_BOND,
3366- vlan = NM_DEVICE_TYPE_VLAN,
3367- adsl = NM_DEVICE_TYPE_ADSL,
3368- bridge = NM_DEVICE_TYPE_BRIDGE
3369- };
3370-
3371- struct Wireless
3372- {
3373- static const std::string& name()
3374- {
3375- static const std::string s{NM_DBUS_INTERFACE_DEVICE_WIRELESS};
3376- return s;
3377- }
3378-
3379- struct Method {
3380- struct GetAccessPoints
3381- {
3382- static const std::string& name()
3383- {
3384- static const std::string s{"GetAccessPoints"};
3385- return s;
3386- }
3387-
3388- typedef Wireless Interface;
3389- typedef std::vector<core::dbus::types::ObjectPath> ResultType;
3390-
3391- static std::chrono::milliseconds default_timeout()
3392- {
3393- return std::chrono::seconds{30};
3394- }
3395- };
3396- };
3397-
3398- struct Signal {
3399- struct AccessPointAdded
3400- {
3401- static const std::string& name()
3402- {
3403- static const std::string s{"AccessPointAdded"};
3404- return s;
3405- }
3406-
3407- typedef Wireless Interface;
3408- typedef core::dbus::types::ObjectPath ArgumentType;
3409- };
3410-
3411- struct AccessPointRemoved
3412- {
3413- static const std::string& name()
3414- {
3415- static const std::string s{"AccessPointRemoved"};
3416- return s;
3417- }
3418-
3419- typedef Wireless Interface;
3420- typedef core::dbus::types::ObjectPath ArgumentType;
3421- };
3422- };
3423-
3424- Wireless(std::shared_ptr<core::dbus::Object> &base)
3425- : access_point_added(base->get_signal<Signal::AccessPointAdded>()),
3426- access_point_removed(base->get_signal<Signal::AccessPointRemoved>())
3427- {}
3428-
3429- std::shared_ptr<core::dbus::Signal<Signal::AccessPointAdded, Signal::AccessPointAdded::ArgumentType>> access_point_added;
3430- std::shared_ptr<core::dbus::Signal<Signal::AccessPointRemoved, Signal::AccessPointRemoved::ArgumentType>> access_point_removed;
3431-
3432- }; // Interface::Device::Wireless
3433-
3434- struct Property {
3435- struct DeviceType
3436- {
3437- static const std::string& name()
3438- {
3439- static const std::string s{"DeviceType"};
3440- return s;
3441- }
3442-
3443- typedef Device Interface;
3444- typedef std::uint32_t ValueType;
3445- static const bool readable = true;
3446- static const bool writable = false;
3447- };
3448-
3449- struct DeviceInterface {
3450- static const std::string& name()
3451- {
3452- static const std::string s{"Interface"};
3453- return s;
3454- }
3455-
3456- typedef Device Interface;
3457- typedef std::string ValueType;
3458- static const bool readable = true;
3459- static const bool writable = false;
3460- };
3461-
3462- struct Autoconnect
3463- {
3464- static const std::string& name()
3465- {
3466- static const std::string s{"Autoconnect"};
3467- return s;
3468- }
3469-
3470- typedef Device Interface;
3471- typedef bool ValueType;
3472- static const bool readable = true;
3473- static const bool writable = true;
3474- };
3475-
3476- struct State {
3477- static const std::string &name()
3478- {
3479- static const std::string s{"State"};
3480- return s;
3481- }
3482-
3483- typedef Device Interface;
3484- typedef std::uint32_t ValueType;
3485- static const bool readable = true;
3486- static const bool writable = false;
3487- };
3488-
3489- struct AvailableConnections {
3490- static const std::string &name()
3491- {
3492- static const std::string s{"AvailableConnections"};
3493- return s;
3494- }
3495-
3496- typedef Device Interface;
3497- typedef std::vector<core::dbus::types::ObjectPath> ValueType;
3498- static const bool readable = true;
3499- static const bool writable = false;
3500- };
3501-
3502- struct ActiveConnection {
3503- static const std::string &name()
3504- {
3505- static const std::string s{"ActiveConnection"};
3506- return s;
3507- }
3508-
3509- typedef Device Interface;
3510- typedef core::dbus::types::ObjectPath ValueType;
3511- static const bool readable = true;
3512- static const bool writable = false;
3513- };
3514- };
3515-
3516- std::vector<Connection>
3517- get_available_connections() {
3518- std::vector<Connection> list;
3519- for (auto c: available_connections->get()) {
3520- list.push_back(Connection(service->object_for_path(c)));
3521- }
3522- return list;
3523- }
3524-
3525- struct Method {
3526-
3527- struct Disconnect
3528- {
3529- static const std::string& name()
3530- {
3531- static const std::string s{"Disconnect"};
3532- return s;
3533- }
3534-
3535- typedef Device Interface;
3536- typedef void ResultType;
3537-
3538- static std::chrono::milliseconds default_timeout()
3539- {
3540- return std::chrono::seconds{30};
3541- }
3542- };
3543- };
3544-
3545- void disconnect()
3546- {
3547- auto result =
3548- object->invoke_method_synchronously<
3549- Device::Method::Disconnect, Device::Method::Disconnect::ResultType>();
3550-
3551- if (result.is_error())
3552- connectivity::throw_dbus_exception(result.error());
3553- }
3554-
3555- struct Signal {
3556- struct StateChanged
3557- {
3558- static const std::string& name()
3559- {
3560- static const std::string s{"StateChanged"};
3561- return s;
3562- }
3563-
3564- typedef Device Interface;
3565- typedef std::tuple<std::uint32_t, std::uint32_t, std::uint32_t> ArgumentType;
3566- };
3567- };
3568-
3569-
3570- Type type() const
3571- {
3572- return static_cast<Type>(device_type->get());
3573- }
3574-
3575- std::string interface() const
3576- {
3577- return device_interface->get();
3578- }
3579-
3580- Wireless::Method::GetAccessPoints::ResultType get_access_points() const
3581- {
3582- auto result = object->invoke_method_synchronously<Wireless::Method::GetAccessPoints,
3583- Wireless::Method::GetAccessPoints::ResultType>();
3584-
3585- if (result.is_error())
3586- connectivity::throw_dbus_exception(result.error());
3587-
3588- return result.value();
3589- }
3590-
3591- Device(const std::shared_ptr<core::dbus::Service>& service,
3592- const std::shared_ptr<core::dbus::Object>& object)
3593- : service(service),
3594- object(object),
3595- device_type(object->get_property<Property::DeviceType>()),
3596- autoconnect(object->get_property<Property::Autoconnect>()),
3597- device_interface(object->get_property<Property::DeviceInterface>()),
3598- state(object->get_property<Property::State>()),
3599- state_changed(object->get_signal<Signal::StateChanged>()),
3600- available_connections(object->get_property<Property::AvailableConnections>()),
3601- active_connection(object->get_property<Property::ActiveConnection>())
3602- {}
3603-
3604- std::shared_ptr<core::dbus::Service> service;
3605- std::shared_ptr<core::dbus::Object> object;
3606- std::shared_ptr<core::dbus::Property<Property::DeviceType>> device_type;
3607- std::shared_ptr<core::dbus::Property<Property::Autoconnect>> autoconnect;
3608- std::shared_ptr<core::dbus::Property<Property::DeviceInterface>> device_interface;
3609- std::shared_ptr<core::dbus::Property<Property::State>> state;
3610- std::shared_ptr<core::dbus::Signal<Signal::StateChanged, Signal::StateChanged::ArgumentType>> state_changed;
3611- std::shared_ptr<core::dbus::Property<Property::AvailableConnections>> available_connections;
3612- std::shared_ptr<core::dbus::Property<Property::ActiveConnection>> active_connection;
3613- }; // Interface::Device
3614-
3615- struct NetworkManager
3616- {
3617- static const std::string& name()
3618- {
3619- static const std::string s{NM_DBUS_INTERFACE};
3620- return s;
3621- }
3622-
3623- struct Method {
3624- struct ActivateConnection
3625- {
3626- static const std::string& name()
3627- {
3628- static const std::string s{"ActivateConnection"};
3629- return s;
3630- }
3631-
3632- typedef NetworkManager Interface;
3633- typedef core::dbus::types::ObjectPath ResultType;
3634-
3635- static std::chrono::milliseconds default_timeout()
3636- {
3637- return std::chrono::seconds{30};
3638- }
3639- };
3640-
3641- struct AddAndActivateConnection
3642- {
3643- static const std::string& name()
3644- {
3645- static const std::string s{"AddAndActivateConnection"};
3646- return s;
3647- }
3648-
3649- typedef NetworkManager Interface;
3650- typedef std::tuple<core::dbus::types::ObjectPath, core::dbus::types::ObjectPath> ResultType;
3651-
3652- static std::chrono::milliseconds default_timeout()
3653- {
3654- return std::chrono::seconds{30};
3655- }
3656- };
3657-
3658- struct GetDevices
3659- {
3660- static const std::string& name()
3661- {
3662- static const std::string s{"GetDevices"};
3663- return s;
3664- }
3665-
3666- typedef NetworkManager Interface;
3667- typedef std::vector<core::dbus::types::ObjectPath> ResultType;
3668-
3669- static std::chrono::milliseconds default_timeout()
3670- {
3671- return std::chrono::seconds{30};
3672- }
3673- };
3674-
3675- };
3676-
3677-
3678- struct Property
3679- {
3680- struct WirelessEnabled {
3681- static const std::string &name()
3682- {
3683- static const std::string s{"WirelessEnabled"};
3684- return s;
3685- }
3686-
3687- typedef NetworkManager Interface;
3688- typedef bool ValueType;
3689- static const bool readable = true;
3690- static const bool writable = true;
3691- };
3692-
3693- struct State {
3694- static const std::string &name()
3695- {
3696- static const std::string s{"State"};
3697- return s;
3698- }
3699-
3700- typedef NetworkManager Interface;
3701- typedef std::uint32_t ValueType;
3702- static const bool readable = true;
3703- static const bool writable = false;
3704- };
3705-
3706- struct PrimaryConnection {
3707- static const std::string &name()
3708- {
3709- static const std::string s{"PrimaryConnection"};
3710- return s;
3711- }
3712-
3713- typedef NetworkManager Interface;
3714- typedef core::dbus::types::ObjectPath ValueType;
3715- static const bool readable = true;
3716- static const bool writable = false;
3717- };
3718-
3719- };
3720-
3721- struct Signal {
3722-
3723- struct PropertiesChanged
3724- {
3725- static const std::string& name()
3726- {
3727- static const std::string s{"PropertiesChanged"};
3728- return s;
3729- }
3730-
3731- typedef NetworkManager Interface;
3732- typedef std::map<std::string, core::dbus::types::Variant> ArgumentType;
3733- };
3734-
3735- struct DeviceAdded
3736- {
3737- static const std::string& name()
3738- {
3739- static const std::string s{"DeviceAdded"};
3740- return s;
3741- }
3742-
3743- typedef NetworkManager Interface;
3744- typedef core::dbus::types::ObjectPath ArgumentType;
3745- };
3746-
3747- struct DeviceRemoved
3748- {
3749- static const std::string& name()
3750- {
3751- static const std::string s{"DeviceRemoved"};
3752- return s;
3753- }
3754-
3755- typedef NetworkManager Interface;
3756- typedef core::dbus::types::ObjectPath ArgumentType;
3757- };
3758- };
3759-
3760- Method::ActivateConnection::ResultType
3761- activate_connection(const core::dbus::types::ObjectPath &connection,
3762- const core::dbus::types::ObjectPath &device,
3763- const core::dbus::types::ObjectPath &specific_object)
3764- {
3765- auto result =
3766- object->invoke_method_synchronously<
3767- Method::ActivateConnection,
3768- Method::ActivateConnection::ResultType>
3769- (connection, device, specific_object);
3770-
3771- if (result.is_error())
3772- connectivity::throw_dbus_exception(result.error());
3773-
3774- return result.value();
3775- }
3776-
3777- Method::AddAndActivateConnection::ResultType
3778- add_and_activate_connection(std::map<std::string, std::map<std::string, core::dbus::types::Variant>> &connection,
3779- const core::dbus::types::ObjectPath &device,
3780- const core::dbus::types::ObjectPath &specific_object)
3781- {
3782- auto result =
3783- object->invoke_method_synchronously<
3784- Method::AddAndActivateConnection,
3785- Method::AddAndActivateConnection::ResultType>
3786- (connection, device, specific_object);
3787-
3788- if (result.is_error())
3789- connectivity::throw_dbus_exception(result.error());
3790-
3791-
3792- /// @todo return the settings (std::get<0>) object at some point
3793- return result.value();
3794- }
3795-
3796- std::vector<core::dbus::types::ObjectPath> get_devices()
3797- {
3798- auto result =
3799- object->invoke_method_synchronously<
3800- Method::GetDevices,
3801- Method::GetDevices::ResultType>();
3802-
3803- if (result.is_error())
3804- connectivity::throw_dbus_exception(result.error());
3805-
3806- return result.value();
3807- }
3808-
3809- NetworkManager(std::shared_ptr<core::dbus::Service> &service,
3810- std::shared_ptr<core::dbus::Object> &object)
3811- : service(service),
3812- object(object),
3813- wireless_enabled(object->get_property<Property::WirelessEnabled>()),
3814- state(object->get_property<Property::State>()),
3815- properties_changed(object->get_signal<Signal::PropertiesChanged>()),
3816- primary_connection(object->get_property<Property::PrimaryConnection>()),
3817- device_added(object->get_signal<Signal::DeviceAdded>()),
3818- device_removed(object->get_signal<Signal::DeviceRemoved>())
3819- {
3820- }
3821-
3822- std::shared_ptr<core::dbus::Service> service;
3823- std::shared_ptr<core::dbus::Object> object;
3824-
3825- std::shared_ptr<core::dbus::Property<Property::WirelessEnabled>> wireless_enabled;
3826- std::shared_ptr<core::dbus::Property<Property::State>> state;
3827- std::shared_ptr<core::dbus::Signal<Signal::PropertiesChanged, Signal::PropertiesChanged::ArgumentType>> properties_changed;
3828- std::shared_ptr<core::dbus::Property<Property::PrimaryConnection>> primary_connection;
3829- std::shared_ptr<core::dbus::Signal<Signal::DeviceAdded, Signal::DeviceAdded::ArgumentType>> device_added;
3830- std::shared_ptr<core::dbus::Signal<Signal::DeviceRemoved, Signal::DeviceRemoved::ArgumentType>> device_removed;
3831- }; // Interface::NetworkManager
3832- };
3833-
3834- struct Service
3835- {
3836- std::shared_ptr<Interface::NetworkManager> nm;
3837-
3838- Service(const core::dbus::Bus::Ptr& bus)
3839- {
3840- auto service = core::dbus::Service::use_service<Interface::NetworkManager>(bus);
3841- auto object = service->object_for_path(core::dbus::types::ObjectPath(NM_DBUS_PATH));
3842- nm = std::make_shared<Interface::NetworkManager>(service, object);
3843- }
3844-
3845- struct Mock
3846- {
3847- std::shared_ptr<Interface::NetworkManager> nm;
3848-
3849- Mock(const core::dbus::Bus::Ptr& bus)
3850- {
3851- auto service = core::dbus::Service::add_service<Interface::NetworkManager>(bus);
3852- auto object = service->add_object_for_path(core::dbus::types::ObjectPath(NM_DBUS_PATH));
3853- nm = std::make_shared<Interface::NetworkManager>(service, object);
3854- }
3855- };
3856- };
3857-}
3858-}
3859-}
3860-
3861-#endif // PLATFORM_MANAGER_NMOFONO_NM_H
3862
3863=== removed file 'src/connectivity-cpp/dbus-cpp/services/ofono.h'
3864--- src/connectivity-cpp/dbus-cpp/services/ofono.h 2014-08-19 19:55:15 +0000
3865+++ src/connectivity-cpp/dbus-cpp/services/ofono.h 1970-01-01 00:00:00 +0000
3866@@ -1,339 +0,0 @@
3867-/*
3868- * Copyright © 2012-2013 Canonical Ltd.
3869- *
3870- * This program is free software: you can redistribute it and/or modify it
3871- * under the terms of the GNU Lesser General Public License version 3,
3872- * as published by the Free Software Foundation.
3873- *
3874- * This program is distributed in the hope that it will be useful,
3875- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3876- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3877- * GNU Lesser General Public License for more details.
3878- *
3879- * You should have received a copy of the GNU Lesser General Public License
3880- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3881- *
3882- * Authored by: Thomas Voß <thomas.voss@canonical.com>
3883- */
3884-#ifndef LOCATION_SERVICE_LOCATION_CONNECTIVITY_OFONO_H
3885-#define LOCATION_SERVICE_LOCATION_CONNECTIVITY_OFONO_H
3886-
3887-#include <core/dbus/bus.h>
3888-#include <core/dbus/object.h>
3889-#include <core/dbus/property.h>
3890-#include <core/dbus/service.h>
3891-#include <core/dbus/types/object_path.h>
3892-#include <core/dbus/types/struct.h>
3893-#include <core/dbus/types/stl/map.h>
3894-#include <core/dbus/types/stl/string.h>
3895-#include <core/dbus/types/stl/tuple.h>
3896-#include <core/dbus/types/stl/vector.h>
3897-#include<com/ubuntu/connectivity/util.h>
3898-
3899-namespace org
3900-{
3901-struct Ofono
3902-{
3903-static const std::string& name()
3904-{
3905- static const std::string s{"org.ofono"};
3906- return s;
3907-}
3908-struct Manager
3909-{
3910- static const std::string& name()
3911- {
3912- static const std::string s{"org.ofono.Manager"};
3913- return s;
3914- }
3915-
3916- struct GetModems
3917- {
3918- static const std::string& name()
3919- {
3920- static const std::string s{"GetModems"};
3921- return s;
3922- }
3923-
3924- typedef Manager Interface;
3925- typedef std::vector<
3926- core::dbus::types::Struct<
3927- core::dbus::types::ObjectPath
3928- >
3929- > ResultType;
3930-
3931- static std::chrono::milliseconds default_timeout()
3932- {
3933- return std::chrono::seconds{1};
3934- }
3935- };
3936-
3937- struct ModemAdded
3938- {
3939- static const std::string& name()
3940- {
3941- static const std::string s{"ModemAdded"};
3942- return s;
3943- }
3944-
3945- typedef Manager Interface;
3946- typedef std::tuple<core::dbus::types::ObjectPath, std::map<std::string, std::string>> ArgumentType;
3947- };
3948-
3949- struct ModemRemoved
3950- {
3951- static const std::string& name()
3952- {
3953- static const std::string s{"ModemRemoved"};
3954- return s;
3955- }
3956-
3957- typedef Manager Interface;
3958- typedef core::dbus::types::ObjectPath ArgumentType;
3959- };
3960-
3961- struct Modem
3962- {
3963- struct NetworkRegistration
3964- {
3965- static const std::string& name()
3966- {
3967- static const std::string s{"org.ofono.NetworkRegistration"};
3968- return s;
3969- }
3970-
3971- struct GetProperties
3972- {
3973- static const std::string& name()
3974- {
3975- static const std::string s{"GetProperties"};
3976- return s;
3977- }
3978-
3979- typedef NetworkRegistration Interface;
3980- typedef std::map<std::string, core::dbus::types::Variant<>> ValueType;
3981-
3982- static std::chrono::milliseconds default_timeout()
3983- {
3984- return std::chrono::seconds{1};
3985- }
3986- };
3987-
3988- struct Mode
3989- {
3990- static const char* unregistered() { return "unregistered"; }
3991- static const char* registered() { return "registered"; }
3992- static const char* searching() { return "searching"; }
3993- static const char* denied() { return "denied"; }
3994- static const char* unknown() { return "unknown"; }
3995- static const char* roaming() { return "roaming"; }
3996-
3997- static const std::string& name()
3998- {
3999- static const std::string s{"Mode"};
4000- return s;
4001- }
4002-
4003- typedef NetworkRegistration Interface;
4004- typedef std::string ValueType;
4005- static const bool readable = true;
4006- static const bool writable = false;
4007- };
4008-
4009- struct LocationAreaCode
4010- {
4011- static const std::string& name()
4012- {
4013- static const std::string s{"LocationAreaCode"};
4014- return s;
4015- }
4016-
4017- typedef NetworkRegistration Interface;
4018- typedef std::uint16_t ValueType;
4019- static const bool readable = true;
4020- static const bool writable = false;
4021- };
4022-
4023- struct CellId
4024- {
4025- static const std::string& name()
4026- {
4027- static const std::string s{"CellId"};
4028- return s;
4029- }
4030-
4031- typedef NetworkRegistration Interface;
4032- typedef std::uint32_t ValueType;
4033- static const bool readable = true;
4034- static const bool writable = false;
4035- };
4036-
4037- struct MobileCountryCode
4038- {
4039- static const std::string& name()
4040- {
4041- static const std::string s{"MobileCountryCode"};
4042- return s;
4043- }
4044-
4045- typedef NetworkRegistration Interface;
4046- typedef std::string ValueType;
4047- static const bool readable = true;
4048- static const bool writable = false;
4049- };
4050-
4051- struct MobileNetworkCode
4052- {
4053- static const std::string& name()
4054- {
4055- static const std::string s{"MobileNetworkCode"};
4056- return s;
4057- }
4058-
4059- typedef NetworkRegistration Interface;
4060- typedef std::string ValueType;
4061- static const bool readable = true;
4062- static const bool writable = false;
4063- };
4064-
4065- struct Technology
4066- {
4067- static const char* gsm() { return "gsm"; }
4068- static const char* edge() { return "edge"; }
4069- static const char* umts() { return "umts"; }
4070- static const char* hspa() { return "hspa"; }
4071- static const char* lte() { return "lte"; }
4072-
4073- static const std::string& name()
4074- {
4075- static const std::string s{"Technology"};
4076- return s;
4077- }
4078-
4079- typedef NetworkRegistration Interface;
4080- typedef std::string ValueType;
4081- static const bool readable = true;
4082- static const bool writable = false;
4083- };
4084-
4085- struct Strength
4086- {
4087- static const std::string& name()
4088- {
4089- static const std::string s{"Strength"};
4090- return s;
4091- }
4092-
4093- typedef NetworkRegistration Interface;
4094- typedef std::int8_t ValueType;
4095- static const bool readable = true;
4096- static const bool writable = false;
4097- };
4098-
4099- NetworkRegistration(const std::shared_ptr<core::dbus::Object>& object)
4100- : object(object),
4101- properties{}
4102- {
4103- auto result = object->invoke_method_synchronously<GetProperties, GetProperties::ValueType>();
4104- if (result.is_error())
4105- connectivity::throw_dbus_exception(result.error());
4106-
4107- properties = result.value();
4108- }
4109-
4110- template<typename Property>
4111- typename Property::ValueType get(
4112- const typename Property::ValueType& default_value = typename Property::ValueType{}) const
4113- {
4114- try
4115- {
4116- core::dbus::types::Any value = properties.at(Property::name()).get();
4117- typename Property::ValueType result; value.reader() >> result;
4118-
4119- return result;
4120- } catch(...)
4121- {
4122- }
4123-
4124- return default_value;
4125- }
4126-
4127- std::shared_ptr<core::dbus::Object> object;
4128- GetProperties::ValueType properties;
4129- };
4130-
4131- Modem(const std::shared_ptr<core::dbus::Service>& service,
4132- const std::shared_ptr<core::dbus::Object>& object)
4133- : service(service),
4134- object(object),
4135- network_registration{object}
4136- {
4137- }
4138-
4139- std::shared_ptr<core::dbus::Service> service;
4140- std::shared_ptr<core::dbus::Object> object;
4141- NetworkRegistration network_registration;
4142- };
4143-
4144- Manager(const core::dbus::Bus::Ptr& bus)
4145- : service(core::dbus::Service::use_service<org::Ofono>(bus)),
4146- object(service->object_for_path(core::dbus::types::ObjectPath("/"))),
4147- modem_added(object->get_signal<ModemAdded>()),
4148- modem_removed(object->get_signal<ModemRemoved>())
4149- {
4150- auto result = object->invoke_method_synchronously<GetModems, GetModems::ResultType>();
4151-
4152- if (result.is_error())
4153- connectivity::throw_dbus_exception(result.error());
4154-
4155- for (const auto& element : result.value())
4156- {
4157- modems.insert(
4158- std::make_pair(
4159- element.value,
4160- Modem
4161- {
4162- service,
4163- service->object_for_path(element.value)
4164- }));
4165- }
4166-
4167- modem_added->connect([this](const ModemAdded::ArgumentType& arg)
4168- {
4169- std::lock_guard<std::mutex> lg(guard);
4170- modems.insert(
4171- std::make_pair(
4172- std::get<0>(arg),
4173- Modem{
4174- service,
4175- service->object_for_path(std::get<0>(arg))
4176- }));
4177- });
4178-
4179- modem_removed->connect([this](const ModemRemoved::ArgumentType& arg)
4180- {
4181- std::lock_guard<std::mutex> lg(guard);
4182- modems.erase(arg);
4183- });
4184- }
4185-
4186- void for_each_modem(const std::function<void(const Modem&)>& functor) const
4187- {
4188- std::lock_guard<std::mutex> lg(guard);
4189- for (const auto& modem : modems)
4190- {
4191- functor(modem.second);
4192- }
4193- }
4194-
4195- std::shared_ptr<core::dbus::Service> service;
4196- std::shared_ptr<core::dbus::Object> object;
4197- std::shared_ptr<core::dbus::Signal<ModemAdded, ModemAdded::ArgumentType>> modem_added;
4198- std::shared_ptr<core::dbus::Signal<ModemRemoved, ModemRemoved::ArgumentType>> modem_removed;
4199- mutable std::mutex guard;
4200- std::map<core::dbus::types::ObjectPath, Modem> modems;
4201-};
4202-};
4203-}
4204-
4205-#endif // LOCATION_SERVICE_LOCATION_CONNECTIVITY_OFONO_H
4206
4207=== removed file 'src/connectivity-cpp/dbus-cpp/services/urfkill.h'
4208--- src/connectivity-cpp/dbus-cpp/services/urfkill.h 2014-10-23 21:46:41 +0000
4209+++ src/connectivity-cpp/dbus-cpp/services/urfkill.h 1970-01-01 00:00:00 +0000
4210@@ -1,338 +0,0 @@
4211-/*
4212- * Copyright © 2014 Canonical Ltd.
4213- *
4214- * This program is free software: you can redistribute it and/or modify it
4215- * under the terms of the GNU Lesser General Public License version 3,
4216- * as published by the Free Software Foundation.
4217- *
4218- * This program is distributed in the hope that it will be useful,
4219- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4220- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4221- * GNU Lesser General Public License for more details.
4222- *
4223- * You should have received a copy of the GNU Lesser General Public License
4224- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4225- *
4226- * Authored by: Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
4227- */
4228-#ifndef PLATFORM_MANAGER_NMOFONO_URFKILL_H
4229-#define PLATFORM_MANAGER_NMOFONO_URFKILL_H
4230-
4231-#include <core/dbus/bus.h>
4232-#include <core/dbus/object.h>
4233-#include <core/dbus/property.h>
4234-#include <core/dbus/service.h>
4235-#include <core/dbus/types/object_path.h>
4236-#include <core/dbus/types/any.h>
4237-#include <core/dbus/types/struct.h>
4238-#include <core/dbus/types/stl/map.h>
4239-#include <core/dbus/types/stl/string.h>
4240-#include <core/dbus/types/stl/tuple.h>
4241-#include <core/dbus/types/stl/vector.h>
4242-#include "util.h"
4243-
4244-namespace org
4245-{
4246-namespace freedesktop
4247-{
4248-namespace URfkill
4249-{
4250-
4251-struct Interface
4252-{
4253- struct Killswitch
4254- {
4255- static const std::string& name()
4256- {
4257- static const std::string s{"org.freedesktop.URfkill.Killswitch"};
4258- return s;
4259- }
4260-
4261- struct Property
4262- {
4263- struct State
4264- {
4265- static const std::string& name()
4266- {
4267- static const std::string s{"state"};
4268- return s;
4269- }
4270-
4271- typedef Killswitch Interface;
4272- typedef std::int32_t ValueType;
4273- static const bool readable = true;
4274- static const bool writable = false;
4275- };
4276- };
4277-
4278- enum class Type;
4279- Killswitch(const std::shared_ptr<core::dbus::Object>& object,
4280- Type type)
4281- : object(object),
4282- type(type),
4283- _state(object->get_property<Property::State>())
4284- {
4285- _state->changed().connect(std::bind(&Killswitch::_stateChanged, this, std::placeholders::_1));
4286- _stateChanged(_state->get());
4287- }
4288-
4289- enum class State
4290- {
4291- not_available = -1,
4292- unblocked = 0,
4293- soft_blocked = 1,
4294- hard_blocked = 2
4295- };
4296-
4297- enum class Type {
4298- bluetooth,
4299- fm,
4300- gps,
4301- nfc,
4302- uwb,
4303- wimax,
4304- wlan,
4305- wwan
4306- };
4307-
4308- static const std::string path(Type type)
4309- {
4310- switch(type) {
4311- case Type::bluetooth:
4312- return "/org/freedesktop/URfkill/BLUETOOTH";
4313- case Type::fm:
4314- return "/org/freedesktop/URfkill/FM";
4315- case Type::gps:
4316- return "/org/freedesktop/URfkill/GPS";
4317- case Type::nfc:
4318- return "/org/freedesktop/URfkill/NFC";
4319- case Type::uwb:
4320- return "/org/freedesktop/URfkill/UWB";
4321- case Type::wimax:
4322- return "/org/freedesktop/URfkill/WIMAX";
4323- case Type::wlan:
4324- return "/org/freedesktop/URfkill/WLAN";
4325- case Type::wwan:
4326- return "/org/freedesktop/URfkill/WWAN";
4327- }
4328-
4329- return "";
4330- }
4331-
4332- void _stateChanged(Property::State::ValueType val)
4333- {
4334- if (val == -1)
4335- state.set(State::not_available);
4336- else if (val == 0)
4337- state.set(State::unblocked);
4338- else if (val == 1)
4339- state.set(State::soft_blocked);
4340- else if (val == 2)
4341- state.set(State::hard_blocked);
4342- else
4343- throw std::runtime_error("got unknown Killswitch state from urfkill: " + std::to_string(val));
4344- }
4345-
4346- std::shared_ptr<core::dbus::Object> object;
4347- const Type type;
4348- std::shared_ptr<core::dbus::Property<Property::State>> _state;
4349- core::Property<State> state;
4350- };
4351-
4352- struct URfkill
4353- {
4354- static const std::string& name()
4355- {
4356- static const std::string s{"org.freedesktop.URfkill"};
4357- return s;
4358- }
4359-
4360- struct Method
4361- {
4362- struct Block
4363- {
4364- static const std::string& name()
4365- {
4366- static const std::string s{"Block"};
4367- return s;
4368- }
4369-
4370- typedef URfkill Interface;
4371- typedef bool ResultType;
4372-
4373- static std::chrono::milliseconds default_timeout()
4374- {
4375- return std::chrono::seconds{30};
4376- }
4377- };
4378-
4379- struct FlightMode
4380- {
4381- static const std::string& name()
4382- {
4383- static const std::string s{"FlightMode"};
4384- return s;
4385- }
4386-
4387- typedef URfkill Interface;
4388- typedef bool ResultType;
4389-
4390- static std::chrono::milliseconds default_timeout()
4391- {
4392- return std::chrono::seconds{30};
4393- }
4394- };
4395-
4396- struct IsFlightMode
4397- {
4398- static const std::string& name()
4399- {
4400- static const std::string s{"IsFlightMode"};
4401- return s;
4402- }
4403-
4404- typedef URfkill Interface;
4405- typedef bool ResultType;
4406-
4407- static std::chrono::milliseconds default_timeout()
4408- {
4409- return std::chrono::seconds{30};
4410- }
4411- };
4412- };
4413-
4414- struct Signal
4415- {
4416- struct FlightModeChanged
4417- {
4418- static const std::string& name()
4419- {
4420- static const std::string s{"FlightModeChanged"};
4421- return s;
4422- }
4423-
4424- typedef URfkill Interface;
4425- typedef bool ArgumentType;
4426- };
4427- };
4428-
4429- URfkill(std::shared_ptr<core::dbus::Service> &service,
4430- std::shared_ptr<core::dbus::Object> &object)
4431- : service{service},
4432- object{object},
4433- flightModeChanged{object->get_signal<Signal::FlightModeChanged>()}
4434- {
4435- switches[Killswitch::Type::bluetooth] = std::make_shared<Killswitch>(service->object_for_path(Killswitch::path(Killswitch::Type::bluetooth)), Killswitch::Type::bluetooth);
4436- switches[Killswitch::Type::fm] = std::make_shared<Killswitch>(service->object_for_path(Killswitch::path(Killswitch::Type::fm)), Killswitch::Type::fm);
4437- switches[Killswitch::Type::gps] = std::make_shared<Killswitch>(service->object_for_path(Killswitch::path(Killswitch::Type::gps)), Killswitch::Type::gps);
4438- switches[Killswitch::Type::nfc] = std::make_shared<Killswitch>(service->object_for_path(Killswitch::path(Killswitch::Type::nfc)), Killswitch::Type::nfc);
4439- switches[Killswitch::Type::uwb] = std::make_shared<Killswitch>(service->object_for_path(Killswitch::path(Killswitch::Type::uwb)), Killswitch::Type::uwb);
4440- switches[Killswitch::Type::wimax] = std::make_shared<Killswitch>(service->object_for_path(Killswitch::path(Killswitch::Type::wimax)), Killswitch::Type::wimax);
4441- switches[Killswitch::Type::wlan] = std::make_shared<Killswitch>(service->object_for_path(Killswitch::path(Killswitch::Type::wlan)), Killswitch::Type::wlan);
4442- switches[Killswitch::Type::wwan] = std::make_shared<Killswitch>(service->object_for_path(Killswitch::path(Killswitch::Type::wwan)), Killswitch::Type::wwan);
4443- }
4444-
4445- bool block(Killswitch::Type type, bool block)
4446- {
4447- std::uint32_t utype;
4448- switch (type) {
4449- case Killswitch::Type::bluetooth:
4450- utype = 2;
4451- break;
4452- case Killswitch::Type::fm:
4453- utype = 7;
4454- break;
4455- case Killswitch::Type::gps:
4456- utype = 6;
4457- break;
4458- case Killswitch::Type::nfc:
4459- utype = 8; /// @todo verify me
4460- break;
4461- case Killswitch::Type::uwb:
4462- utype = 3;
4463- break;
4464- case Killswitch::Type::wimax:
4465- utype = 4;
4466- break;
4467- case Killswitch::Type::wlan:
4468- utype = 1;
4469- break;
4470- case Killswitch::Type::wwan:
4471- utype = 5;
4472- break;
4473- }
4474- // we can't handle "all" (0) with this, but that's deprecated by FlightMode anyway
4475-
4476- auto result =
4477- object->invoke_method_synchronously<
4478- Method::Block, Method::Block::ResultType>
4479- (utype, block);
4480-
4481- if (result.is_error())
4482- throw std::runtime_error(result.error().print());
4483-
4484- return result.value();
4485- }
4486-
4487- bool flightMode(bool block)
4488- {
4489- auto result =
4490- object->invoke_method_synchronously<
4491- Method::FlightMode, Method::FlightMode::ResultType>
4492- (block);
4493-
4494- if (result.is_error())
4495- throw std::runtime_error(result.error().print());
4496-
4497- return result.value();
4498- }
4499-
4500- bool isFlightMode()
4501- {
4502- auto result =
4503- object->invoke_method_synchronously<
4504- Method::IsFlightMode, Method::IsFlightMode::ResultType>
4505- ();
4506-
4507- if (result.is_error())
4508- throw std::runtime_error(result.error().print());
4509-
4510- return result.value();
4511- }
4512-
4513- std::shared_ptr<core::dbus::Service> service;
4514- std::shared_ptr<core::dbus::Object> object;
4515- std::shared_ptr<core::dbus::Signal<Signal::FlightModeChanged, Signal::FlightModeChanged::ArgumentType>> flightModeChanged;
4516-
4517- std::map<Killswitch::Type, std::shared_ptr<Killswitch>> switches;
4518- };
4519-};
4520-
4521-struct Service
4522-{
4523- std::shared_ptr<Interface::URfkill> urfkill;
4524-
4525- Service(const core::dbus::Bus::Ptr& bus)
4526- {
4527- auto service = core::dbus::Service::use_service<Interface::URfkill>(bus);
4528- auto object = service->object_for_path(core::dbus::types::ObjectPath("/org/freedesktop/URfkill"));
4529- urfkill = std::make_shared<Interface::URfkill>(service, object);
4530- }
4531-
4532- struct Mock
4533- {
4534- std::shared_ptr<Interface::URfkill> urfkill;
4535-
4536- Mock(const core::dbus::Bus::Ptr& bus)
4537- {
4538- auto service = core::dbus::Service::add_service<Interface::URfkill>(bus);
4539- auto object = service->add_object_for_path(core::dbus::types::ObjectPath("/org/freedesktop/URfkill"));
4540- urfkill = std::make_shared<Interface::URfkill>(service, object);
4541- }
4542- };
4543-};
4544-}
4545-}
4546-}
4547-
4548-#endif // PLATFORM_MANAGER_NMOFONO_URFKILL_H
4549
4550=== removed file 'src/connectivity-cpp/dbus-cpp/services/util.h'
4551--- src/connectivity-cpp/dbus-cpp/services/util.h 2014-08-19 19:55:15 +0000
4552+++ src/connectivity-cpp/dbus-cpp/services/util.h 1970-01-01 00:00:00 +0000
4553@@ -1,36 +0,0 @@
4554-/*
4555- * Copyright © 2013 Canonical Ltd.
4556- *
4557- * This program is free software: you can redistribute it and/or modify it
4558- * under the terms of the GNU Lesser General Public License version 3,
4559- * as published by the Free Software Foundation.
4560- *
4561- * This program is distributed in the hope that it will be useful,
4562- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4563- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4564- * GNU Lesser General Public License for more details.
4565- *
4566- * You should have received a copy of the GNU Lesser General Public License
4567- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4568- *
4569- * Authors:
4570- * Jussi Pakkanen <jussi.pakkanen@canonical.com>
4571- */
4572-
4573-#ifndef CONNECTIVITY_UTIL_H
4574-#define CONNECTIVITY_UTIL_H
4575-
4576-namespace core {
4577-namespace dbus {
4578-class Error;
4579-}
4580-}
4581-
4582-namespace connectivity {
4583-
4584-void throw_dbus_exception(const core::dbus::Error &e);
4585-
4586-}
4587-
4588-
4589-#endif
4590
4591=== removed directory 'src/connectivity-cpp/include/connectivity'
4592=== removed directory 'src/connectivity-cpp/include/connectivity/networking'
4593=== removed directory 'src/connectivity-cpp/include/connectivity/networking/service'
4594=== removed file 'src/connectivity-cpp/include/connectivity/networking/service.h'
4595--- src/connectivity-cpp/include/connectivity/networking/service.h 2014-08-19 19:55:15 +0000
4596+++ src/connectivity-cpp/include/connectivity/networking/service.h 1970-01-01 00:00:00 +0000
4597@@ -1,83 +0,0 @@
4598-/*
4599- * Copyright © 2013 Canonical Ltd.
4600- *
4601- * This program is free software: you can redistribute it and/or modify it
4602- * under the terms of the GNU Lesser General Public License version 3,
4603- * as published by the Free Software Foundation.
4604- *
4605- * This program is distributed in the hope that it will be useful,
4606- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4607- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4608- * GNU Lesser General Public License for more details.
4609- *
4610- * You should have received a copy of the GNU Lesser General Public License
4611- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4612- *
4613- * Authors:
4614- * Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
4615- */
4616-
4617-#ifndef CONNECTIVITY_NETWORKING_SERVICE
4618-#define CONNECTIVITY_NETWORKING_SERVICE
4619-
4620-#include <connectivity/networking/link.h>
4621-
4622-#include <memory>
4623-
4624-namespace connectivity {
4625-namespace networking {
4626-
4627-#ifndef CONNECTIVITY_CPP_EXPORT
4628-#define CONNECTIVITY_CPP_EXPORT __attribute ((visibility ("default")))
4629-#endif
4630-
4631-/// @private
4632-class CONNECTIVITY_CPP_EXPORT
4633-Service
4634-{
4635-public:
4636-
4637- typedef std::shared_ptr<Service> Ptr;
4638-
4639- enum class Type {
4640- vpn,
4641- tethering,
4642- tor
4643- };
4644- virtual Type type() const = 0;
4645-
4646- enum class Status {
4647- stopped,
4648- starting,
4649- running
4650- };
4651-
4652- virtual ~Service() = default;
4653-
4654- virtual const core::Property<Status>& status() const = 0;
4655-
4656- // which other Service this service requires to be active
4657- // before it can be activated
4658- virtual std::shared_ptr<Service> requires() = 0;
4659-
4660- // possible link this service provides.
4661- // check with:
4662- // if (service->link()) {
4663- // // we have a link coming from the service
4664- // do_something_with(link);
4665- // }
4666- virtual Link::Ptr link() = 0;
4667-
4668- virtual void start() = 0;
4669- virtual void stop() = 0;
4670-
4671- typedef unsigned int Id;
4672- virtual Id id() const = 0;
4673-
4674- virtual core::Property<std::string>& name() const = 0;
4675-};
4676-
4677-}
4678-}
4679-
4680-#endif
4681
4682=== removed directory 'src/connectivity-cpp/include/connectivity/networking/service/tethering'
4683=== removed file 'src/connectivity-cpp/include/connectivity/networking/service/tethering/service.h'
4684--- src/connectivity-cpp/include/connectivity/networking/service/tethering/service.h 2014-08-19 19:55:15 +0000
4685+++ src/connectivity-cpp/include/connectivity/networking/service/tethering/service.h 1970-01-01 00:00:00 +0000
4686@@ -1,59 +0,0 @@
4687-/*
4688- * Copyright © 2013 Canonical Ltd.
4689- *
4690- * This program is free software: you can redistribute it and/or modify it
4691- * under the terms of the GNU Lesser General Public License version 3,
4692- * as published by the Free Software Foundation.
4693- *
4694- * This program is distributed in the hope that it will be useful,
4695- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4696- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4697- * GNU Lesser General Public License for more details.
4698- *
4699- * You should have received a copy of the GNU Lesser General Public License
4700- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4701- *
4702- * Authors:
4703- * Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
4704- */
4705-
4706-#ifndef CONNECTIVITY_NETWORKING_SERVICE_TETHERING_SERVICE
4707-#define CONNECTIVITY_NETWORKING_SERVICE_TETHERING_SERVICE
4708-
4709-#include <com/ubuntu/connectivity/networking/service.h>
4710-
4711-namespace connectivity {
4712-namespace networking {
4713-namespace service {
4714-
4715-namespace tethering {
4716-
4717-/// @private
4718-class
4719-Service : public connectivity::networking::Service
4720-{
4721-public:
4722- typedef std::shared_ptr<Service> Ptr;
4723- virtual ~Service() = default;
4724-
4725- /*
4726- * Which link is shared to the client devices.
4727- */
4728- const core::Property<std::shared_ptr<Link>> &shared() = 0;
4729-
4730- /*
4731- * Which link is used to serve the clients.
4732- */
4733- const core::Property<std::shared_ptr<Link>> &sharedOver() = 0;
4734-
4735-
4736-protected:
4737- Service() = default;
4738-};
4739-
4740-}
4741-}
4742-}
4743-}
4744-
4745-#endif
4746
4747=== removed directory 'src/connectivity-cpp/include/connectivity/networking/service/tor'
4748=== removed file 'src/connectivity-cpp/include/connectivity/networking/service/tor/service.h'
4749--- src/connectivity-cpp/include/connectivity/networking/service/tor/service.h 2014-08-19 19:55:15 +0000
4750+++ src/connectivity-cpp/include/connectivity/networking/service/tor/service.h 1970-01-01 00:00:00 +0000
4751@@ -1,46 +0,0 @@
4752-/*
4753- * Copyright © 2013 Canonical Ltd.
4754- *
4755- * This program is free software: you can redistribute it and/or modify it
4756- * under the terms of the GNU Lesser General Public License version 3,
4757- * as published by the Free Software Foundation.
4758- *
4759- * This program is distributed in the hope that it will be useful,
4760- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4761- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4762- * GNU Lesser General Public License for more details.
4763- *
4764- * You should have received a copy of the GNU Lesser General Public License
4765- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4766- *
4767- * Authors:
4768- * Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
4769- */
4770-
4771-#ifndef CONNECTIVITY_NETWORKING_SERVICE_TOR_SERVICE
4772-#define CONNECTIVITY_NETWORKING_SERVICE_TOR_SERVICE
4773-
4774-#include <connectivity/networking/service.h>
4775-
4776-namespace connectivity {
4777-namespace networking {
4778-namespace service {
4779-namespace tor {
4780-
4781-/// @private
4782-class
4783-Service : public connectivity::networking::Service
4784-{
4785-public:
4786- typedef std::shared_ptr<Service> Ptr;
4787- virtual ~Service() = default;
4788-
4789- virtual const core::Property<std::shared_ptr<Link>> &establishedOver() const = 0;
4790-};
4791-
4792-}
4793-}
4794-}
4795-}
4796-
4797-#endif
4798
4799=== removed directory 'src/connectivity-cpp/include/connectivity/networking/service/vpn'
4800=== removed file 'src/connectivity-cpp/include/connectivity/networking/service/vpn/service.h'
4801--- src/connectivity-cpp/include/connectivity/networking/service/vpn/service.h 2014-08-19 19:55:15 +0000
4802+++ src/connectivity-cpp/include/connectivity/networking/service/vpn/service.h 1970-01-01 00:00:00 +0000
4803@@ -1,49 +0,0 @@
4804-/*
4805- * Copyright © 2013 Canonical Ltd.
4806- *
4807- * This program is free software: you can redistribute it and/or modify it
4808- * under the terms of the GNU Lesser General Public License version 3,
4809- * as published by the Free Software Foundation.
4810- *
4811- * This program is distributed in the hope that it will be useful,
4812- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4813- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4814- * GNU Lesser General Public License for more details.
4815- *
4816- * You should have received a copy of the GNU Lesser General Public License
4817- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4818- *
4819- * Authors:
4820- * Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
4821- */
4822-
4823-#ifndef CONNECTIVITY_NETWORKING_SERVICE_VPN_SERVICE
4824-#define CONNECTIVITY_NETWORKING_SERVICE_VPN_SERVICE
4825-
4826-#include <connectivity/networking/service.h>
4827-
4828-namespace connectivity {
4829-namespace networking {
4830-namespace service {
4831-namespace vpn {
4832-
4833-/// @private
4834-class
4835-Service : public connectivity::networking::Service
4836-{
4837-public:
4838- typedef std::shared_ptr<Service> Ptr;
4839- virtual ~Service() = default;
4840-
4841- virtual const core::Property<std::shared_ptr<Link>> &establishedOver() const = 0;
4842-
4843-protected:
4844- Service() = default;
4845-};
4846-
4847-}
4848-}
4849-}
4850-}
4851-
4852-#endif
4853
4854=== removed directory 'src/connectivity-cpp/include/connectivity/networking/wifi'
4855=== modified file 'src/connectivity-cpp/src/CMakeLists.txt'
4856--- src/connectivity-cpp/src/CMakeLists.txt 2014-08-19 19:55:15 +0000
4857+++ src/connectivity-cpp/src/CMakeLists.txt 2015-04-01 15:30:55 +0000
4858@@ -16,15 +16,34 @@
4859 # Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
4860
4861 add_library(connectivity-cpp STATIC
4862+ platform/nmofono/kill-switch.cpp
4863+ platform/nmofono/manager.cpp
4864+ platform/nmofono/manager.h
4865+ platform/nmofono/service.cpp
4866+ platform/nmofono/service.h
4867+ platform/nmofono/wifi/access-point-impl.h
4868+ platform/nmofono/wifi/access-point-impl.cpp
4869+ platform/nmofono/wifi/grouped-access-point.h
4870+ platform/nmofono/wifi/grouped-access-point.cpp
4871+ platform/nmofono/wifi/link.h
4872+ platform/nmofono/wifi/link.cpp
4873+
4874+ #platform/nmofono/ofono_nm_connectivity_manager.cpp
4875+ platform/nmofono/set_name_for_thread.cpp
4876+ platform/nmofono/set_name_for_thread.h
4877+
4878+ ../include/connectivity/networking/wifi/access-point.cpp
4879 manager.cpp
4880 )
4881+
4882 set_target_properties(connectivity-cpp PROPERTIES
4883 VERSION ${CONNECTIVITY_CPP_VERSION_MAJOR}.${CONNECTIVITY_CPP_VERSION_MINOR}.${CONNECTIVITY_CPP_VERSION_PATCH}
4884 SOVERSION ${CONNECTIVITY_CPP_VERSION_MAJOR}
4885 OUTPUT_NAME "connectivity-cpp"
4886 )
4887-target_link_libraries(connectivity-cpp platform_nmofono)
4888-
4889-add_subdirectory(platform/nmofono)
4890-
4891-
4892+
4893+target_link_libraries(connectivity-cpp
4894+ connectivity-backend
4895+ ${DBUSCPP_LIBRARIES}
4896+ ${GLIB_LIBRARIES}
4897+)
4898
4899=== added directory 'src/connectivity-cpp/src/platform'
4900=== removed directory 'src/connectivity-cpp/src/platform'
4901=== added directory 'src/connectivity-cpp/src/platform/nmofono'
4902=== removed file 'src/connectivity-cpp/src/platform/nmofono/CMakeLists.txt'
4903--- src/connectivity-cpp/src/platform/nmofono/CMakeLists.txt 2014-08-22 14:56:59 +0000
4904+++ src/connectivity-cpp/src/platform/nmofono/CMakeLists.txt 1970-01-01 00:00:00 +0000
4905@@ -1,42 +0,0 @@
4906-# Copyright © 2013 Canonical Ltd.
4907-#
4908-# This program is free software: you can redistribute it and/or modify it
4909-# under the terms of the GNU Lesser General Public License version 3,
4910-# as published by the Free Software Foundation.
4911-#
4912-# This program is distributed in the hope that it will be useful,
4913-# but WITHOUT ANY WARRANTY; without even the implied warranty of
4914-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4915-# GNU Lesser General Public License for more details.
4916-#
4917-# You should have received a copy of the GNU Lesser General Public License
4918-# along with this program. If not, see <http://www.gnu.org/licenses/>.
4919-#
4920-# Authors:
4921-# Antti Kaijanmäki <antti.kaijanmaki@canonical.com>
4922-
4923-set(NMOFONO_PLATFORM_SOURCES
4924- kill-switch.cpp
4925- manager.cpp
4926- manager.h
4927- service.cpp
4928- service.h
4929- wifi/access-point.h
4930- wifi/access-point.cpp
4931- wifi/grouped-access-point.h
4932- wifi/grouped-access-point.cpp
4933- wifi/link.h
4934- wifi/link.cpp
4935- ../util.cpp
4936-
4937- #ofono_nm_connectivity_manager.cpp
4938- set_name_for_thread.cpp
4939- set_name_for_thread.h
4940-)
4941-
4942-add_library(platform_nmofono STATIC ${NMOFONO_PLATFORM_SOURCES})
4943-target_link_libraries(
4944- platform_nmofono
4945- ${DBUSCPP_LIBRARIES}
4946- ${GLIB_LIBRARIES}
4947-)
4948
4949=== removed file 'src/connectivity-cpp/src/platform/nmofono/bounded_integer.h'
4950--- src/connectivity-cpp/src/platform/nmofono/bounded_integer.h 2014-08-19 19:55:15 +0000
4951+++ src/connectivity-cpp/src/platform/nmofono/bounded_integer.h 1970-01-01 00:00:00 +0000
4952@@ -1,178 +0,0 @@
4953-/*
4954- * Copyright © 2012-2013 Canonical Ltd.
4955- *
4956- * This program is free software: you can redistribute it and/or modify it
4957- * under the terms of the GNU Lesser General Public License version 3,
4958- * as published by the Free Software Foundation.
4959- *
4960- * This program is distributed in the hope that it will be useful,
4961- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4962- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4963- * GNU Lesser General Public License for more details.
4964- *
4965- * You should have received a copy of the GNU Lesser General Public License
4966- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4967- *
4968- * Authored by: Thomas Voß <thomas.voss@canonical.com>
4969- */
4970-#ifndef LOCATION_SERVICE_LOCATION_CONNECTIVITY_BOUNDED_INTEGER_H_
4971-#define LOCATION_SERVICE_LOCATION_CONNECTIVITY_BOUNDED_INTEGER_H_
4972-
4973-#include <iostream>
4974-#include <stdexcept>
4975-
4976-namespace location
4977-{
4978-namespace connectivity
4979-{
4980-/**
4981- * @brief A helper class to handle bounded integer values, with an optional domain
4982- * for tagging domain-specific types.
4983- */
4984-template<int min, int max, int domain = 0>
4985-class BoundedInteger
4986-{
4987-public:
4988- static_assert(min < max, "min >= max");
4989-
4990- /**
4991- * @brief Access the minimum value of the integer.
4992- */
4993- inline static int minimum()
4994- {
4995- return min;
4996- }
4997-
4998- /**
4999- * @brief Access the maximum value of the integer.
5000- */
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches