diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2012-10-09 14:12:01 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-10-09 18:37:44 +0200 |
commit | 51b0e53c52fad16e606721024637d21bda415169 (patch) | |
tree | fab2ca80129fe0134868a30e65b4f21106642527 /src | |
parent | 95c71594587c7cabb234858e95fda5e7951ded51 (diff) |
adapter: Remove not used btd_adapter_switch_{online,offline} functions
Were used only in Maemo plugin which is now removed.
Diffstat (limited to 'src')
-rw-r--r-- | src/adapter.c | 43 | ||||
-rw-r--r-- | src/adapter.h | 2 |
2 files changed, 0 insertions, 45 deletions
diff --git a/src/adapter.c b/src/adapter.c index abb9691b..b6c1213c 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -3582,49 +3582,6 @@ int btd_adapter_restore_powered(struct btd_adapter *adapter) return mgmt_set_powered(adapter->dev_id, TRUE); } -static gboolean switch_off_timeout(gpointer user_data) -{ - struct btd_adapter *adapter = user_data; - - mgmt_set_powered(adapter->dev_id, FALSE); - adapter->off_timer = 0; - - return FALSE; -} - -int btd_adapter_switch_online(struct btd_adapter *adapter) -{ - if (adapter->up) - return -EALREADY; - - if (adapter->off_timer) - off_timer_remove(adapter); - - return mgmt_set_powered(adapter->dev_id, TRUE); -} - -int btd_adapter_switch_offline(struct btd_adapter *adapter) -{ - if (!adapter->up) - return -EALREADY; - - if (adapter->off_timer) - return 0; - - adapter->global_mode = MODE_OFF; - - if (adapter->connections == NULL) - return mgmt_set_powered(adapter->dev_id, FALSE); - - g_slist_foreach(adapter->connections, - (GFunc) device_request_disconnect, NULL); - - adapter->off_timer = g_timeout_add_seconds(OFF_TIMER, - switch_off_timeout, adapter); - - return 0; -} - static gboolean disable_auto(gpointer user_data) { struct btd_adapter *adapter = user_data; diff --git a/src/adapter.h b/src/adapter.h index a0890756..b5bff10e 100644 --- a/src/adapter.h +++ b/src/adapter.h @@ -178,8 +178,6 @@ void btd_adapter_any_release_path(void); gboolean adapter_powering_down(struct btd_adapter *adapter); int btd_adapter_restore_powered(struct btd_adapter *adapter); -int btd_adapter_switch_online(struct btd_adapter *adapter); -int btd_adapter_switch_offline(struct btd_adapter *adapter); void btd_adapter_enable_auto_connect(struct btd_adapter *adapter); typedef ssize_t (*btd_adapter_pin_cb_t) (struct btd_adapter *adapter, |