3 * meego handset bluetooth
4 * Copyright © 2010, Intel Corporation.
6 * This program is licensed under the terms and conditions of the
7 * Apache License, version 2.0. The full text of the Apache License is at
8 * http://www.apache.org/licenses/LICENSE-2.0
12 #include "agentadaptor.h"
14 AgentAdaptor::AgentAdaptor(BluetoothBaseAgent *parent) :
15 QDBusAbstractAdaptor(parent), agent(parent)
20 AgentAdaptor::~AgentAdaptor()
25 void AgentAdaptor::Authorize(const QDBusObjectPath &deviceObject, const QString &uuid)
32 OrgBluezDeviceInterface device("org.bluez", deviceObject.path(), QDBusConnection::systemBus());
34 agent->authorize(device, uuid);
37 void AgentAdaptor::Cancel()
47 void AgentAdaptor::ConfirmModeChange(const QString &mode)
54 agent->confirmModeChange(mode);
57 void AgentAdaptor::DisplayPasskey(const QDBusObjectPath &deviceObject, uint passkey)
64 OrgBluezDeviceInterface device("org.bluez", deviceObject.path(), QDBusConnection::systemBus());
66 agent->displayPasskey(device, passkey);
69 void AgentAdaptor::Release()
79 void AgentAdaptor::RequestConfirmation(const QDBusObjectPath &deviceObject, uint passkey)
86 OrgBluezDeviceInterface device("org.bluez", deviceObject.path(), QDBusConnection::systemBus());
88 agent->requestConfirmation(device, passkey);
91 uint AgentAdaptor::RequestPasskey(const QDBusObjectPath &deviceObject)
98 OrgBluezDeviceInterface device("org.bluez", deviceObject.path(), QDBusConnection::systemBus());
100 return agent->requestPasskey(device);
103 QString AgentAdaptor::RequestPinCode(const QDBusObjectPath &deviceObject)
110 OrgBluezDeviceInterface device("org.bluez", deviceObject.path(), QDBusConnection::systemBus());
112 return agent->requestPidCode(device);