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"
31 #include "connman_manager.hpp"
33 #include <json-glib/json-glib.h>
40 class response_callback;
45 * @brief Common technology-based settings functionality.
47 * This class implements functionality common to all technology-based
48 * settings, such as bluetooth, wifi, date/time, etc.
57 * @param[in] tech The connman technology, e.g. "bluetooth".
59 technology(std::string tech);
61 /// Handle requests common to all connman technologies.
62 void handle_request(std::string request,
63 response_callback response);
67 /// Get technology "Powered" state.
68 void get_powered(JsonReader * reader,
69 response_callback response);
71 /// Set technology "Powered" state.
72 void set_powered(JsonReader * reader,
73 response_callback response);
76 * Scan for services that implement the technology, e.g. WiFi
79 void scan(JsonReader * reader,
80 response_callback response);
83 * Connect to service whose object path is found in the JSON
86 void connect(JsonReader * reader,
87 response_callback response);
90 * Disconnect from service whose object path is found in the
93 void disconnect(JsonReader * reader,
94 response_callback response);
96 /// Send list of services to caller.
97 void send_services(response_callback response,
101 * Get property for this technology.
103 * @param[in] name Name of the connman technology property
105 * @param[in] type The type of property being retrieved.
106 * @param[in] response The response callback through errors will
107 * be sent to the caller.
109 * @returns A @c GVariant containing the retrieved property.
111 GVariant * get_property(char const * name,
112 GVariantType const * type,
113 response_callback response);
117 /// The proxy used to access the connman Technology D-Bus API.
120 /// The proxy used to access the connman Manager D-Bus API.
121 connman_manager manager_;
123 /// Technology name, e.g. "bluetooth" or "wifi".
124 std::string const technology_;
132 #endif /* IVI_SETTINGS_CONNMAN_TECHNOLOGY_HPP */
138 // indent-tabs-mode: nil