summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-03-14 21:33:50 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-03-14 21:33:50 +0000
commit0dee137d5600d77852c2f67c36831a2d4c00d920 (patch)
tree531605d3e0932aa463bef11a72c4401f8b904171
parent7e1704ca98da47479511618067a4c9fd77d52eff (diff)
Remove Agent.Confirm since there's no final consensus about it yet
-rw-r--r--hcid/agent.c61
-rw-r--r--hcid/agent.h3
2 files changed, 1 insertions, 63 deletions
diff --git a/hcid/agent.c b/hcid/agent.c
index d09f235e..b31bad03 100644
--- a/hcid/agent.c
+++ b/hcid/agent.c
@@ -274,7 +274,7 @@ static void simple_agent_reply(DBusPendingCall *call, void *user_data)
dbus_error_init(&err);
if (!dbus_message_get_args(message, &err, DBUS_TYPE_INVALID)) {
- error("Wrong confirm reply signature: %s", err.message);
+ error("Wrong reply signature: %s", err.message);
cb(agent, &err, req->user_data);
dbus_error_free(&err);
goto done;
@@ -443,37 +443,6 @@ failed:
return -1;
}
-static DBusPendingCall *confirm_request_new(struct agent *agent,
- const char *device_path,
- const char *value)
-{
- DBusMessage *message;
- DBusPendingCall *call;
-
- message = dbus_message_new_method_call(agent->name, agent->path,
- "org.bluez.Agent", "Confirm");
- if (message == NULL) {
- error("Couldn't allocate D-Bus message");
- return NULL;
- }
-
- dbus_message_append_args(message,
- DBUS_TYPE_OBJECT_PATH, &device_path,
- DBUS_TYPE_STRING, &value,
- DBUS_TYPE_INVALID);
-
- if (dbus_connection_send_with_reply(connection, message,
- &call, REQUEST_TIMEOUT) == FALSE) {
- error("D-Bus send failed");
- dbus_message_unref(message);
- return NULL;
- }
-
- dbus_message_unref(message);
-
- return call;
-}
-
static DBusPendingCall *confirm_mode_change_request_new(struct agent *agent,
const char *mode)
{
@@ -503,34 +472,6 @@ static DBusPendingCall *confirm_mode_change_request_new(struct agent *agent,
return call;
}
-int agent_confirm(struct agent *agent, struct device *device, const char *pin,
- agent_cb cb, void *user_data)
-{
- struct agent_request *req;
-
- if (agent->request)
- return -EBUSY;
-
- debug("Calling Agent.Confirm: name=%s, path=%s",
- agent->name, agent->path);
-
- req = agent_request_new(agent, cb, user_data);
-
- req->call = confirm_request_new(agent, device->path, pin);
- if (!req->call)
- goto failed;
-
- dbus_pending_call_set_notify(req->call, simple_agent_reply, req, NULL);
-
- agent->request = req;
-
- return 0;
-
-failed:
- agent_request_free(req);
- return -1;
-}
-
int agent_confirm_mode_change(struct agent *agent, const char *new_mode,
agent_cb cb, void *user_data)
{
diff --git a/hcid/agent.h b/hcid/agent.h
index 55e45a0f..e17e513e 100644
--- a/hcid/agent.h
+++ b/hcid/agent.h
@@ -44,9 +44,6 @@ int agent_authorize(struct agent *agent, struct device *device,
int agent_request_passkey(struct agent *agent, struct device *device,
agent_passkey_cb cb, void *user_data);
-int agent_confirm(struct agent *agent, struct device *device, const char *pin,
- agent_cb cb, void *user_data);
-
int agent_confirm_mode_change(struct agent *agent, const char *new_mode,
agent_cb cb, void *user_data);