4 * @brief Connman technology request handling.
6 * @author Ossama Othman @<ossama.othman@@intel.com@>
9 * Copyright 2013 Intel Corporation All Rights Reserved.
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation;
14 * version 2.1 of the License.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301 USA
27 #ifndef IVI_SETTINGS_CONNMAN_TECHNOLOGY_HPP
28 #define IVI_SETTINGS_CONNMAN_TECHNOLOGY_HPP
30 #include "connman.hpp"
34 #include <json-glib/json-glib.h>
41 class response_callback;
42 class connman_manager;
47 * @brief Common technology-based settings functionality.
49 * This class implements functionality common to all technology-based
50 * settings, such as bluetooth, wifi, date/time, etc.
59 * @param[in] path The connman technology object path.
60 * @param[in] connection Underlying D-Bus connection.
61 * @param[in] manager Connman manager proxy.
63 technology(char const * path,
64 GDBusConnection * connection,
65 connman_manager & manager);
68 * Handle connman technology-specific request.
70 * @param[in] name The Connman Technology method name.
71 * @param[in] reader @c JsonReader object containing desired
72 * values. The value will be in the second
74 * @param[in] response Callback through which results will be
77 void handle_request(char const * name,
79 response_callback & response);
83 /// Get technology "Powered" state.
84 void get_powered(JsonReader * reader,
85 response_callback & response);
87 /// Set technology "Powered" state.
88 void set_powered(JsonReader * reader,
89 response_callback &response);
92 /// Set technology to tethering mode
93 void set_tethering(JsonReader * reader,
94 response_callback &response);
97 * Scan for services that implement the technology, e.g. WiFi
100 void scan(JsonReader * reader,
101 response_callback & response);
104 * Get property for this technology.
106 * @param[in] name Name of the connman technology property
108 * @param[in] type The type of property being retrieved.
109 * @param[in] response The response callback through errors will
110 * be sent to the caller.
112 * @returns A @c GVariant containing the retrieved property.
114 GVariant * get_property(char const * name,
115 GVariantType const * type,
116 response_callback & response);
118 bool set_property(char const * name,
120 response_callback response,
125 /// The proxy used to access the connman Technology D-Bus API.
128 /// The proxy used to access the connman Manager D-Bus API.
129 connman_manager & manager_;
137 #endif /* IVI_SETTINGS_CONNMAN_TECHNOLOGY_HPP */
143 // indent-tabs-mode: nil