31
|
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 |
#ifndef BTDELEGATEPAIR_H
|
|
19 |
#define BTDELEGATEPAIR_H
|
|
20 |
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <btengconnman.h>
|
|
23 |
#include <hbdialog.h>
|
|
24 |
#include <hbdocumentloader.h>
|
|
25 |
#include "btabstractdelegate.h"
|
|
26 |
|
|
27 |
class BtuiModel;
|
|
28 |
|
|
29 |
/*!
|
|
30 |
\class BtDelegatePair
|
|
31 |
\brief the base class for handling Bluetooth Pair functionality.
|
|
32 |
*/
|
|
33 |
class BtDelegatePair : public BtAbstractDelegate,
|
|
34 |
public MBTEngConnObserver
|
|
35 |
{
|
|
36 |
Q_OBJECT
|
|
37 |
|
|
38 |
public:
|
|
39 |
explicit BtDelegatePair(
|
|
40 |
BtSettingModel* settingModel,
|
|
41 |
BtDeviceModel* deviceModel, QObject *parent = 0 );
|
|
42 |
|
|
43 |
virtual ~BtDelegatePair();
|
57
|
44 |
|
|
45 |
int supportedEditorTypes() const;
|
31
|
46 |
|
|
47 |
virtual void exec( const QVariant ¶ms );
|
|
48 |
|
|
49 |
virtual void cancel();
|
|
50 |
|
|
51 |
public slots:
|
42
|
52 |
void powerDelegateCompleted(int error);
|
31
|
53 |
protected:
|
|
54 |
//From MBTEngConnObserver
|
|
55 |
virtual void ConnectComplete( TBTDevAddr& aAddr, TInt aErr,
|
|
56 |
RBTDevAddrArray* aConflicts );
|
|
57 |
virtual void DisconnectComplete( TBTDevAddr& aAddr, TInt aErr );
|
|
58 |
virtual void PairingComplete( TBTDevAddr& aAddr, TInt aErr );
|
|
59 |
|
|
60 |
private:
|
|
61 |
void launchWaitDialog();
|
|
62 |
void emitCommandComplete(int error);
|
42
|
63 |
void exec_pair();
|
31
|
64 |
|
|
65 |
private:
|
|
66 |
|
|
67 |
CBTEngConnMan *mBtengConnMan;
|
|
68 |
HbDialog *mWaitDialog;
|
|
69 |
QString mdeviceName;
|
|
70 |
|
|
71 |
HbDocumentLoader *mLoader;
|
42
|
72 |
BtAbstractDelegate* mAbstractDelegate;
|
|
73 |
QModelIndex deviceIndex;
|
31
|
74 |
|
|
75 |
Q_DISABLE_COPY(BtDelegatePair)
|
|
76 |
|
|
77 |
};
|
|
78 |
|
|
79 |
#endif /* BTDELEGATEPAIR_H */
|