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