42
|
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 BTDELEGATEREMOTEDEVNAME_H
|
|
19 |
#define BTDELEGATEREMOTEDEVNAME_H
|
|
20 |
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <btmanclient.h>
|
|
23 |
//#include <btengconnman.h>
|
|
24 |
//#include <btengdevman.h>
|
|
25 |
#include <btservices/btsimpleactive.h>
|
|
26 |
#include "btabstractdelegate.h"
|
|
27 |
|
|
28 |
class BtuiModel;
|
|
29 |
|
|
30 |
enum RequestIdentifiers {
|
|
31 |
Unknown = 0, // using a different number space than TBTVisibilityMode
|
|
32 |
AddDevice,
|
|
33 |
ModifyFriendlyName
|
|
34 |
};
|
|
35 |
|
|
36 |
/*!
|
|
37 |
\class BtDelegateRemoteDevName
|
|
38 |
\brief the base class for handling Bluetooth Local Name.
|
|
39 |
*/
|
|
40 |
class BtDelegateRemoteDevName : public BtAbstractDelegate, public MBtSimpleActiveObserver
|
|
41 |
{
|
|
42 |
Q_OBJECT
|
|
43 |
|
|
44 |
public:
|
|
45 |
explicit BtDelegateRemoteDevName( BtSettingModel* settingModel,
|
|
46 |
BtDeviceModel* deviceModel, QObject *parent = 0 );
|
|
47 |
|
|
48 |
virtual ~BtDelegateRemoteDevName();
|
|
49 |
|
57
|
50 |
int supportedEditorTypes() const;
|
|
51 |
|
42
|
52 |
virtual void exec( const QVariant ¶ms );
|
|
53 |
|
|
54 |
// from MBtSimpleActiveObserver
|
|
55 |
virtual void RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus );
|
|
56 |
|
|
57 |
virtual void CancelRequest( TInt aRequestId );
|
|
58 |
|
|
59 |
virtual void HandleError( CBtSimpleActive* aActive, TInt aError );
|
|
60 |
|
|
61 |
|
|
62 |
private:
|
|
63 |
bool validateName(QString &name );
|
|
64 |
|
|
65 |
RBTRegistry mBtRegistry;
|
|
66 |
|
|
67 |
RBTRegServ mBtRegServ;
|
|
68 |
|
|
69 |
CBtSimpleActive* mRegistryActive;
|
|
70 |
|
|
71 |
QString mNewName;
|
|
72 |
|
|
73 |
RBuf16 mSymName;
|
|
74 |
|
|
75 |
TBTDevAddr mSymaddr;
|
|
76 |
|
47
|
77 |
bool mRegistryOpened;
|
|
78 |
|
42
|
79 |
|
|
80 |
private:
|
|
81 |
|
|
82 |
Q_DISABLE_COPY(BtDelegateRemoteDevName)
|
|
83 |
|
|
84 |
};
|
|
85 |
|
|
86 |
#endif // BTDELEGATEREMOTEDEVNAME_H
|