OSDN Git Service

core: Remove ConfirmModeChange method
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 13 Dec 2012 20:00:40 +0000 (22:00 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 13 Dec 2012 20:13:47 +0000 (22:13 +0200)
This method was only used by RequestSession which is now removed.

doc/agent-api.txt
src/agent.c
src/agent.h

index bd8d8ff..caed7f8 100644 (file)
@@ -119,15 +119,6 @@ Methods            void Release()
                        Possible errors: org.bluez.Error.Rejected
                                         org.bluez.Error.Canceled
 
-               void ConfirmModeChange(string mode)
-
-                       This method gets called if a mode change is requested
-                       that needs to be confirmed by the user. An example
-                       would be leaving flight mode.
-
-                       Possible errors: org.bluez.Error.Rejected
-                                        org.bluez.Error.Canceled
-
                void Cancel()
 
                        This method gets called to indicate that the agent
index 7ecf19a..ec183c0 100644 (file)
@@ -459,61 +459,6 @@ failed:
        return err;
 }
 
-static int confirm_mode_change_request_new(struct agent_request *req,
-                                               const char *mode)
-{
-       struct agent *agent = req->agent;
-
-       req->msg = dbus_message_new_method_call(agent->name, agent->path,
-                               "org.bluez.Agent", "ConfirmModeChange");
-       if (req->msg == NULL) {
-               error("Couldn't allocate D-Bus message");
-               return -ENOMEM;
-       }
-
-       dbus_message_append_args(req->msg,
-                               DBUS_TYPE_STRING, &mode,
-                               DBUS_TYPE_INVALID);
-
-       if (dbus_connection_send_with_reply(btd_get_dbus_connection(), req->msg,
-                                       &req->call, REQUEST_TIMEOUT) == FALSE) {
-               error("D-Bus send failed");
-               return -EIO;
-       }
-
-       dbus_pending_call_set_notify(req->call, simple_agent_reply, req, NULL);
-       return 0;
-}
-
-int agent_confirm_mode_change(struct agent *agent, const char *new_mode,
-                               agent_cb cb, void *user_data,
-                               GDestroyNotify destroy)
-{
-       struct agent_request *req;
-       int err;
-
-       if (agent->request)
-               return -EBUSY;
-
-       DBG("Calling Agent.ConfirmModeChange: name=%s, path=%s, mode=%s",
-                       agent->name, agent->path, new_mode);
-
-       req = agent_request_new(agent, AGENT_REQUEST_CONFIRM_MODE,
-                               cb, user_data, destroy);
-
-       err = confirm_mode_change_request_new(req, new_mode);
-       if (err < 0)
-               goto failed;
-
-       agent->request = req;
-
-       return 0;
-
-failed:
-       agent_request_free(req, FALSE);
-       return err;
-}
-
 static void passkey_reply(DBusPendingCall *call, void *user_data)
 {
        struct agent_request *req = user_data;
index 2b011b7..3957317 100644 (file)
@@ -49,10 +49,6 @@ int agent_request_pincode(struct agent *agent, struct btd_device *device,
                                agent_pincode_cb cb, gboolean secure,
                                void *user_data, GDestroyNotify destroy);
 
-int agent_confirm_mode_change(struct agent *agent, const char *new_mode,
-                               agent_cb cb, void *user_data,
-                               GDestroyNotify destroy);
-
 int agent_request_passkey(struct agent *agent, struct btd_device *device,
                                agent_passkey_cb cb, void *user_data,
                                GDestroyNotify destroy);