diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-07-16 19:43:22 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-07-16 19:43:22 +0200 |
commit | 8ef0eaf14bb8f29eaf0585cc94c313fb73b28dc8 (patch) | |
tree | 22115feabfe70ea6b488bc45b2a60c1d055f9a75 | |
parent | 0a0f473ced55dfdcfcfdc52a6a48d8db4b5d0500 (diff) | |
download | connman-8ef0eaf14bb8f29eaf0585cc94c313fb73b28dc8.tar.gz connman-8ef0eaf14bb8f29eaf0585cc94c313fb73b28dc8.tar.bz2 connman-8ef0eaf14bb8f29eaf0585cc94c313fb73b28dc8.zip |
Add skeleton for EnableTechnology/DisableTechnology methods
-rw-r--r-- | doc/manager-api.txt | 12 | ||||
-rw-r--r-- | src/manager.c | 44 |
2 files changed, 48 insertions, 8 deletions
diff --git a/doc/manager-api.txt b/doc/manager-api.txt index 08c59b8e..a68cb481 100644 --- a/doc/manager-api.txt +++ b/doc/manager-api.txt @@ -53,6 +53,18 @@ Methods dict GetProperties() Possible Errors: [service].Error.InvalidArguments + void EnableTechnology(string type) + + Enable specified type of technologies. + + Possible Errors: [service].Error.InvalidArguments + + void DisableTechnology(string type) + + Disable specified type of technologies. + + Possible Errors: [service].Error.InvalidArguments + object ConnectService(dict network) Connect to a network specified by the given diff --git a/src/manager.c b/src/manager.c index 69235b3c..4daca1c2 100644 --- a/src/manager.c +++ b/src/manager.c @@ -310,6 +310,32 @@ static DBusMessage *request_scan(DBusConnection *conn, return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); } +static DBusMessage *enable_technology(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + const char *str; + + DBG("conn %p", conn); + + dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &str, + DBUS_TYPE_INVALID); + + return __connman_error_not_supported(msg); +} + +static DBusMessage *disable_technology(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + const char *str; + + DBG("conn %p", conn); + + dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &str, + DBUS_TYPE_INVALID); + + return __connman_error_not_supported(msg); +} + static DBusMessage *connect_service(DBusConnection *conn, DBusMessage *msg, void *data) { @@ -383,15 +409,17 @@ static DBusMessage *unregister_agent(DBusConnection *conn, } static GDBusMethodTable manager_methods[] = { - { "GetProperties", "", "a{sv}", get_properties }, - { "SetProperty", "sv", "", set_property }, - { "AddProfile", "s", "o", add_profile }, - { "RemoveProfile", "o", "", remove_profile }, - { "RequestScan", "s", "", request_scan }, - { "ConnectService", "a{sv}", "o", connect_service, + { "GetProperties", "", "a{sv}", get_properties }, + { "SetProperty", "sv", "", set_property }, + { "AddProfile", "s", "o", add_profile }, + { "RemoveProfile", "o", "", remove_profile }, + { "RequestScan", "s", "", request_scan }, + { "EnableTechnology", "s", "", enable_technology }, + { "DisableTechnology", "s", "", disable_technology }, + { "ConnectService", "a{sv}", "o", connect_service, G_DBUS_METHOD_FLAG_ASYNC }, - { "RegisterAgent", "o", "", register_agent }, - { "UnregisterAgent", "o", "", unregister_agent }, + { "RegisterAgent", "o", "", register_agent }, + { "UnregisterAgent", "o", "", unregister_agent }, { }, }; |