dbus_connection.cpp \
connman.cpp \
connman_manager.cpp \
+ connman_technology.cpp \
service.cpp \
technology.cpp \
- bluetooth.cpp \
clock.cpp \
- ethernet.cpp \
- wifi.cpp \
registration.cpp \
$(BUILT_SOURCES)
connman_la_CXXFLAGS = \
dbus_connection.hpp \
connman.hpp \
connman_manager.hpp \
+ connman_technology.hpp \
service.hpp \
technology.hpp \
- bluetooth.hpp \
- clock.hpp \
- ethernet.hpp \
- wifi.hpp
+ clock.hpp
dbus_codegen_verbose = $(dbus_codegen_verbose_$(V))
dbus_codegen_verbose_ = $(dbus_codegen_verbose_$(AM_DEFAULT_VERBOSITY))
+++ /dev/null
-/**
- * @file bluetooth.cpp
- *
- * @brief Connman-based bluetooth settings.
- *
- * @author Ossama Othman @<ossama.othman@@intel.com@>
- *
- * @copyright @par
- * Copyright 2013 Intel Corporation All Rights Reserved.
- * @par
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License.
- * @par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- * @par
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-#include "bluetooth.hpp"
-#include <settingsd/response_callback.hpp>
-
-// ----------------------------------------------------------------------
-
-namespace
-{
- std::string const technology_name("bluetooth");
-}
-
-// ----------------------------------------------------------------------
-
-ivi::settings::bluetooth::bluetooth(GDBusConnection * connection,
- connman_manager & manager,
- event_callback const & e)
- : technology_(technology_name, connection, manager, e)
-{
-}
-
-ivi::settings::bluetooth::~bluetooth()
-{
-}
-
-std::string const &
-ivi::settings::bluetooth::id() const
-{
- return technology_name;
-}
-
-void
-ivi::settings::bluetooth::handle_request(std::string request,
- response_callback response)
-{
- technology_.handle_request(request, response);
-}
-
-
-// Local Variables:
-// mode:c++
-// c-basic-offset:2
-// indent-tabs-mode: nil
-// End:
+++ /dev/null
-/**
- * @file bluetooth.hpp
- *
- * @brief Bluetooth settings plugin.
- *
- * Connman-based bluetooth settings plugin.
- *
- * @author Ossama Othman @<ossama.othman@@intel.com@>
- *
- * @copyright @par
- * Copyright 2012, 2013 Intel Corporation All Rights Reserved.
- * @par
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License.
- * @par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- * @par
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
- *
- * @note This header is internal. Settings provider plugin implementors
- * should write their own library/symbol export macros as
- * needed.
- */
-
-
-#ifndef IVI_SETTINGS_CONNMAN_BLUETOOTH_HPP
-#define IVI_SETTINGS_CONNMAN_BLUETOOTH_HPP
-
-#include <settingsd/plugin.hpp>
-
-#include "technology.hpp"
-
-
-namespace ivi
-{
- namespace settings
- {
- /**
- * @class bluetooth
- *
- * @brief Connman-based bluetooth settings.
- *
- * This class implements all connman-based bluetooth settings.
- */
- class bluetooth : public plugin
- {
- public:
-
- /// Constructor.
- bluetooth(GDBusConnection * connection,
- connman_manager & manager,
- event_callback const & e);
-
- /// Destructor.
- virtual ~bluetooth();
-
- /**
- * @name Settings Plugin API
- *
- * Interface defined by the @c ivi::settings::plugin abstract
- * base class.
- *
- * @see settingsd/plugin.hpp
- */
- //@{
- virtual std::string const & id() const;
- virtual void handle_request(std::string request,
- response_callback response);
- //@}
-
- private:
-
- /// Underlying connman proxy.
- technology technology_;
-
- };
-
- }
-}
-
-
-#endif /* IVI_SETTINGS_CONNMAN_BLUETOOTH_HPP */
-
-
-// Local Variables:
-// mode:c++
-// c-basic-offset:2
-// indent-tabs-mode: nil
-// End:
-
/**
* @file connman_manager.hpp
*
- * @brief Connman connman_manager-based settings plugin header.
+ * @brief Connman Manager-based settings plugin header.
*
* @author Ossama Othman @<ossama.othman@@intel.com@>
*
--- /dev/null
+/**
+ * @file connman_technology.cpp
+ *
+ * @brief Connman Technology operations.
+ *
+ * @author Ossama Othman @<ossama.othman@@intel.com@>
+ *
+ * @copyright @par
+ * Copyright 2013 Intel Corporation All Rights Reserved.
+ * @par
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License.
+ * @par
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ * @par
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ */
+
+#include "connman_technology.hpp"
+#include "technology.hpp"
+
+#include <settingsd/response_callback.hpp>
+#include <settingsd/glib_traits.hpp>
+#include <settingsd/unique_ptr.hpp>
+
+
+#include <cstring>
+
+// ----------------------------------------------------------------------
+
+namespace
+{
+ std::string const technology_name("connman::technology");
+}
+
+// ----------------------------------------------------------------------
+
+ivi::settings::connman_technology::connman_technology(
+ GDBusConnection * connection,
+ connman_manager & manager,
+ event_callback const & e)
+ : connman_("net.connman.Technology", // Interface
+ "/", // Object path
+ connection,
+ e)
+ , manager_(manager)
+ , event_callback_(e)
+{
+}
+
+ivi::settings::connman_technology::~connman_technology()
+{
+}
+
+std::string const &
+ivi::settings::connman_technology::id() const
+{
+ return technology_name;
+}
+
+void
+ivi::settings::connman_technology::handle_request(
+ std::string request,
+ response_callback response)
+{
+ unique_ptr<JsonParser> const parser(json_parser_new());
+ json_parser_load_from_data(parser.get(), request.c_str(), -1, nullptr);
+
+ unique_ptr<JsonReader> const safe_reader(
+ json_reader_new(json_parser_get_root(parser.get())));
+ JsonReader * const reader = safe_reader.get();
+
+ char const * name = nullptr;
+ if (json_reader_read_member(reader, "name"))
+ name = json_reader_get_string_value(reader);
+ else
+ response.send_error(
+ "Malformed " + id() + " request: missing 'name' element");
+
+ json_reader_end_member(reader);
+
+ if (name != nullptr) {
+ if (json_reader_read_member(reader, "value")) {
+ // The technology object path is the first array element.
+ json_reader_read_element(reader, 0);
+ char const * const path = json_reader_get_string_value(reader);
+ json_reader_end_element(reader);
+
+ if (path != nullptr) {
+ technology t(path,
+ connman_.connection(),
+ manager_,
+ event_callback_);
+ t.handle_request(name, reader, response);
+ }
+ }
+ json_reader_end_member(reader);
+ } else {
+ response.send_error(
+ "Operation name for " + id() + " request is not a string.");
+ }
+}
+
+
+// Local Variables:
+// mode:c++
+// c-basic-offset:2
+// indent-tabs-mode: nil
+// End:
/**
- * @file ethernet.hpp
+ * @file connman_technology.hpp
*
- * @brief Ethernet settings plugin.
- *
- * Connman-based ethernet settings plugin.
+ * @brief Connman Technology-based settings plugin header.
*
* @author Ossama Othman @<ossama.othman@@intel.com@>
*
* @copyright @par
- * Copyright 2012, 2013 Intel Corporation All Rights Reserved.
+ * Copyright 2013 Intel Corporation All Rights Reserved.
* @par
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
- *
- * @note This header is internal. Settings provider plugin implementors
- * should write their own library/symbol export macros as
- * needed.
*/
+#ifndef IVI_SETTINGS_CONNMAN_CONNMAN_TECHNOLOGY_HPP
+#define IVI_SETTINGS_CONNMAN_CONNMAN_TECHNOLOGY_HPP
-#ifndef IVI_SETTINGS_CONNMAN_ETHERNET_HPP
-#define IVI_SETTINGS_CONNMAN_ETHERNET_HPP
+#include "connman.hpp"
#include <settingsd/plugin.hpp>
+#include <settingsd/event_callback.hpp>
-#include "technology.hpp"
+#include <gio/gio.h>
+
+#include <string>
namespace ivi
{
namespace settings
{
+ class connman_manager;
+
/**
- * @class ethernet
+ * @class connman_technology
*
- * @brief Connman-based ethernet settings.
+ * @brief D-Bus Connman Technology object bridge.
*
- * This class implements all connman-based ethernet settings.
+ * This class exposes the Connman Technology D-Bus API through the
+ * settings daemon WebSocket API.
*/
- class ethernet : public plugin
+ class connman_technology : public plugin
{
public:
/// Constructor.
- ethernet(GDBusConnection * connection,
- connman_manager & manager,
- event_callback const & e);
+ connman_technology(GDBusConnection * connection,
+ connman_manager & manager,
+ event_callback const & e);
/// Destructor.
- virtual ~ethernet();
+ ~connman_technology();
/**
* @name Settings Plugin API
private:
- /// Underlying connman proxy.
- technology technology_;
+ /// The proxy used to access the connman Technology D-Bus API.
+ connman connman_;
+
+ /// The proxy used to access the connman Manager D-Bus API.
+ connman_manager & manager_;
+
+ /// Callback through which events will be sent to clients.
+ event_callback event_callback_;
};
}
-#endif /* IVI_SETTINGS_CONNMAN_ETHERNET_HPP */
+#endif /* IVI_SETTINGS_CONNMAN_CONNMAN_TECHNOLOGY_HPP */
// Local Variables:
// c-basic-offset:2
// indent-tabs-mode: nil
// End:
-
+++ /dev/null
-/**
- * @file ethernet.cpp
- *
- * @brief Connman-based ethernet settings.
- *
- * @author Ossama Othman @<ossama.othman@@intel.com@>
- *
- * @copyright @par
- * Copyright 2013 Intel Corporation All Rights Reserved.
- * @par
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License.
- * @par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- * @par
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-#include "ethernet.hpp"
-#include <settingsd/response_callback.hpp>
-
-// ----------------------------------------------------------------------
-
-namespace
-{
- std::string const technology_name("ethernet");
-}
-
-// ----------------------------------------------------------------------
-
-ivi::settings::ethernet::ethernet(GDBusConnection * connection,
- connman_manager & manager,
- event_callback const & e)
- : technology_(technology_name, connection, manager, e)
-{
-}
-
-ivi::settings::ethernet::~ethernet()
-{
-}
-
-std::string const &
-ivi::settings::ethernet::id() const
-{
- return technology_name;
-}
-
-void
-ivi::settings::ethernet::handle_request(std::string request,
- response_callback response)
-{
- technology_.handle_request(request, response);
-}
-
-
-// Local Variables:
-// mode:c++
-// c-basic-offset:2
-// indent-tabs-mode: nil
-// End:
#include "connman_api.hpp"
#include "dbus_connection.hpp"
#include "connman_manager.hpp"
+#include "connman_technology.hpp"
#include "clock.hpp"
#include <settingsd/registrar.hpp>
static ivi::settings::dbus_connection con;
GDBusConnection * const connection = con.connection();
- std::unique_ptr<ivi::settings::plugin> manager(
- new ivi::settings::connman_manager(connection, e));
+ ivi::settings::connman_manager * const mgr =
+ new ivi::settings::connman_manager(connection, e);
+ std::unique_ptr<ivi::settings::plugin> manager(mgr);
+
+ std::unique_ptr<ivi::settings::plugin> technology(
+ new ivi::settings::connman_technology(connection, *mgr, e));
std::unique_ptr<ivi::settings::plugin> clk(
new ivi::settings::clock(connection, e));
return
r.register_setting(std::move(manager))
+ && r.register_setting(std::move(technology))
&& r.register_setting(std::move(clk));
}
#include <settingsd/unique_ptr.hpp>
#include <cstring>
-#include <chrono>
-ivi::settings::technology::technology(std::string tech,
+ivi::settings::technology::technology(char const * path,
GDBusConnection * connection,
connman_manager & manager,
event_callback const & e)
: connman_("net.connman.Technology", // Interface
- ("/net/connman/technology/"
- + tech).c_str(), // Object path
+ path, // Object path
connection,
e)
, manager_(manager)
- , technology_(tech)
, event_callback_(e)
{
}
void
-ivi::settings::technology::handle_request(std::string request,
- response_callback response)
+ivi::settings::technology::handle_request(char const * name,
+ JsonReader * reader,
+ response_callback & response)
{
- unique_ptr<JsonParser> const parser(json_parser_new());
- json_parser_load_from_data(parser.get(), request.c_str(), -1, nullptr);
-
- unique_ptr<JsonReader> const safe_reader(
- json_reader_new(json_parser_get_root(parser.get())));
- JsonReader * const reader = safe_reader.get();
-
- char const * name = nullptr;
- if (json_reader_read_member(reader, "name"))
- name = json_reader_get_string_value(reader);
- else
- response.send_error(
- "Malformed " + technology_ + " request: missing 'name' element");
-
- json_reader_end_member(reader);
-
if (name != nullptr) {
if (strcmp(name, "is_enabled") == 0)
get_powered(reader, response);
set_powered(reader, response);
else if (strcmp(name, "scan") == 0)
scan(reader, response);
- else if (strcmp(name, "connect") == 0)
- connect(reader, response);
- else if (strcmp(name, "disconnect") == 0)
- disconnect(reader, response);
else {
response.send_error(
- "Unrecognized " + technology_ + " request name: "
+ std::string("Unrecognized connman technology request name: ")
+ name);
}
- } else {
- response.send_error(
- "Operation name for " + technology_ + " request is not a string.");
}
}
void
ivi::settings::technology::get_powered(JsonReader * reader,
- response_callback response)
+ response_callback & response)
{
bool null = false;
- if (json_reader_read_member(reader, "value")) {
+ // The value is the second array element.
+ if (json_reader_read_element(reader, 1)) {
null = json_reader_get_null_value(reader);
}
- json_reader_end_member(reader);
+ json_reader_end_element(reader);
if (!null) {
response.send_error(
- technology_ + " is_enabled parameter is not null.");
+ "connman::technology is_enabled parameter is not null.");
return;
}
void
ivi::settings::technology::set_powered(JsonReader * reader,
- response_callback response)
+ response_callback & response)
{
bool enable = false;
- if (json_reader_read_member(reader, "value")) {
+ // The value is the second array element.
+ if (json_reader_read_element(reader, 1)) {
enable = json_reader_get_boolean_value(reader);
}
-
- json_reader_end_member(reader);
+ json_reader_end_element(reader);
constexpr char const name[] = "Powered";
[](JsonBuilder * /* builder */) {});
} else if (error != nullptr) {
response.send_error(
- "Unable to set " + technology_ + " powered state: "
+ std::string("Unable to set connman::technology powered state: ")
+ error->message);
} else {
response.send_error(
- "Malformed " + technology_ + " enable request value.");
+ "Malformed connman::technology enable request value.");
}
}
void
ivi::settings::technology::scan(JsonReader * reader,
- response_callback response)
+ response_callback & response)
{
bool null = false;
- if (json_reader_read_member(reader, "value")) {
+ // The value is the second array element.
+ if (json_reader_read_element(reader, 1)) {
null = json_reader_get_null_value(reader);
}
- json_reader_end_member(reader);
+ json_reader_end_element(reader);
if (!null) {
- response.send_error(technology_ + " scan parameter is not null.");
+ response.send_error(
+ "connman::technology scan parameter is not null.");
return;
}
manager_.get_services(response);
} else if (error != nullptr) {
response.send_error(
- "Unable to scan " + technology_ + ": "
+ std::string("Unable to scan connman::technology: ")
+ error->message);
} else {
response.send_error(
- "Malformed " + technology_ + " scan request value.");
- }
-}
-
-void
-ivi::settings::technology::connect(JsonReader * reader,
- response_callback response)
-{
- char const * service_path = nullptr;
- if (json_reader_read_member(reader, "value")) {
- service_path = json_reader_get_string_value(reader);
- }
- json_reader_end_member(reader);
-
- /// @todo Refactor malformed JSON request handling code.
- if (service_path != nullptr) {
- service s(service_path,
- connman_.connection(),
- event_callback_);
- s.connect(response);
- } else {
- response.send_error(
- "Malformed " + technology_ + " connect request value.");
- }
-}
-
-void
-ivi::settings::technology::disconnect(JsonReader * reader,
- response_callback response)
-{
- char const * service_path = nullptr;
- if (json_reader_read_member(reader, "value")) {
- service_path = json_reader_get_string_value(reader);
- }
- json_reader_end_member(reader);
-
- if (service_path != nullptr) {
- service s(service_path,
- connman_.connection(),
- event_callback_);
- s.disconnect(response);
- } else {
- response.send_error(
- "Malformed " + technology_ + " disconnect request value.");
+ "Malformed connman::technology scan request value.");
}
}
GVariant *
ivi::settings::technology::get_property(char const * name,
GVariantType const * type,
- response_callback response)
+ response_callback & response)
{
GError * error = nullptr;
+ std::string tech(connman_.object_path());
+ auto const n = tech.rfind('/');
+ if (n == std::string::npos) {
+ response.send_error(
+ "Unable to determine Connman technology. Malformed object path.");
+
+ return nullptr;
+ }
+
+ tech = tech.substr(n);
+
unique_ptr<GVariant> const properties(
- manager_.get_properties(technology_, error));
+ manager_.get_properties(tech.c_str(), error));
unique_ptr<GError> safe_error(error);
if (property == nullptr) {
response.send_error(
- "Internal " + technology_
+ "Internal " + tech
+ "error: \"" + name + "\" property lookup failed.");
}
} else if (error != nullptr) {
response.send_error(
- "Unable to get " + technology_ + "properties: "
+ "Unable to get " + tech + "properties: "
+ error->message);
} else {
// This scenario will occur if the technology doesn't exist on
// the platform. For example, attempting to retrieve the wifi
// "Powered" property on a platform without supported hardware
// will result in this error.
- response.send_error(technology_ + " properties are not available.");
+ response.send_error(
+ "Connman technology properties are not available.");
}
return property.release();
/**
* Constructor.
*
- * @param[in] tech The connman technology,
- * e.g. "bluetooth".
+ * @param[in] path The connman technology object path.
* @param[in] connection Underlying D-Bus connection.
* @param[in] manager Connman manager proxy.
* @param[in] e Callback through which events will be
* sent to clients.
*/
- technology(std::string tech,
+ technology(char const * path,
GDBusConnection * connection,
connman_manager & manager,
event_callback const & e);
- /// Handle requests common to all connman technologies.
- void handle_request(std::string request,
- response_callback response);
+
+ /**
+ * Handle connman technology-specific request.
+ *
+ * @param[in] name The Connman Technology method name.
+ * @param[in] reader @c JsonReader object containing desired
+ * values. The value will be in the second
+ * array element.
+ * @param[in] response Callback through which results will be
+ * sent.
+ */
+ void handle_request(char const * name,
+ JsonReader * reader,
+ response_callback & response);
private:
/// Get technology "Powered" state.
void get_powered(JsonReader * reader,
- response_callback response);
+ response_callback & response);
/// Set technology "Powered" state.
void set_powered(JsonReader * reader,
- response_callback response);
+ response_callback &response);
/**
* Scan for services that implement the technology, e.g. WiFi
* access points.
*/
void scan(JsonReader * reader,
- response_callback response);
-
- /**
- * Connect to service whose object path is found in the JSON
- * request.
- */
- void connect(JsonReader * reader,
- response_callback response);
-
- /**
- * Disconnect from service whose object path is found in the
- * JSON request.
- */
- void disconnect(JsonReader * reader,
- response_callback response);
+ response_callback & response);
/**
* Get property for this technology.
*/
GVariant * get_property(char const * name,
GVariantType const * type,
- response_callback response);
+ response_callback & response);
private:
/// The proxy used to access the connman Manager D-Bus API.
connman_manager & manager_;
- /// Technology name, e.g. "bluetooth" or "wifi".
- std::string const technology_;
-
/// Callback through which events will be sent to clients.
event_callback event_callback_;
+++ /dev/null
-/**
- * @file wifi.cpp
- *
- * @brief Connman-based wifi settings.
- *
- * @author Ossama Othman @<ossama.othman@@intel.com@>
- *
- * @copyright @par
- * Copyright 2013 Intel Corporation All Rights Reserved.
- * @par
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License.
- * @par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- * @par
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-#include "wifi.hpp"
-#include <settingsd/response_callback.hpp>
-
-// ----------------------------------------------------------------------
-
-namespace
-{
- std::string const technology_name("wifi");
-}
-
-// ----------------------------------------------------------------------
-
-ivi::settings::wifi::wifi(GDBusConnection * connection,
- connman_manager & manager,
- event_callback const & e)
- : technology_(technology_name, connection, manager, e)
-{
-}
-
-ivi::settings::wifi::~wifi()
-{
-}
-
-std::string const &
-ivi::settings::wifi::id() const
-{
- return technology_name;
-}
-
-void
-ivi::settings::wifi::handle_request(std::string request,
- response_callback response)
-{
- technology_.handle_request(request, response);
-}
-
-
-// Local Variables:
-// mode:c++
-// c-basic-offset:2
-// indent-tabs-mode: nil
-// End:
+++ /dev/null
-/**
- * @file wifi.hpp
- *
- * @brief Wifi settings plugin.
- *
- * Connman-based wifi settings plugin.
- *
- * @author Ossama Othman @<ossama.othman@@intel.com@>
- *
- * @copyright @par
- * Copyright 2012, 2013 Intel Corporation All Rights Reserved.
- * @par
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License.
- * @par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- * @par
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
- *
- * @note This header is internal. Settings provider plugin implementors
- * should write their own library/symbol export macros as
- * needed.
- */
-
-
-#ifndef IVI_SETTINGS_CONNMAN_WIFI_HPP
-#define IVI_SETTINGS_CONNMAN_WIFI_HPP
-
-#include <settingsd/plugin.hpp>
-
-#include "technology.hpp"
-
-
-namespace ivi
-{
- namespace settings
- {
- class response_callback;
-
- /**
- * @class wifi
- *
- * @brief Connman-based wifi settings.
- *
- * This class implements all connman-based wifi settings.
- */
- class wifi : public plugin
- {
- public:
-
- /// Constructor.
- wifi(GDBusConnection * connection,
- connman_manager & manager,
- event_callback const & e);
-
- /// Destructor.
- virtual ~wifi();
-
- /**
- * @name Settings Plugin API
- *
- * Interface defined by the @c ivi::settings::plugin abstract
- * base class.
- *
- * @see settingsd/plugin.hpp
- */
- //@{
- virtual std::string const & id() const;
- virtual void handle_request(std::string request,
- response_callback response);
- //@}
-
- private:
-
- /// Underlying connman proxy.
- technology technology_;
-
- };
-
- }
-}
-
-
-#endif /* IVI_SETTINGS_CONNMAN_WIFI_HPP */
-
-
-// Local Variables:
-// mode:c++
-// c-basic-offset:2
-// indent-tabs-mode: nil
-// End:
-