equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "btdelegateinquiry.h" |
|
20 #include <btsettingmodel.h> |
|
21 #include <btdevicemodel.h> |
|
22 #include <bluetoothuitrace.h> |
|
23 |
|
24 |
|
25 BtDelegateInquiry::BtDelegateInquiry( |
|
26 BtSettingModel* settingModel, |
|
27 BtDeviceModel* deviceModel, QObject* parent ) |
|
28 :BtAbstractDelegate( settingModel, deviceModel, parent ) |
|
29 { |
|
30 } |
|
31 |
|
32 BtDelegateInquiry::~BtDelegateInquiry() |
|
33 { |
|
34 |
|
35 } |
|
36 |
|
37 void BtDelegateInquiry::exec( const QVariant& params ) |
|
38 { |
|
39 Q_UNUSED(params); |
|
40 |
|
41 bool err = getDeviceModel()->searchDevice(); |
|
42 if (!err) { |
|
43 // TODO - Verify the error code to be used. |
|
44 // Complete command with error |
|
45 emit commandCompleted(KErrNotSupported); |
|
46 return; |
|
47 } |
|
48 |
|
49 emit commandCompleted(KErrNone); |
|
50 } |
|
51 |
|
52 void BtDelegateInquiry::cancel() |
|
53 { |
|
54 getDeviceModel()->cancelSearchDevice(); |
|
55 } |