author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 14 Sep 2010 21:37:10 +0300 | |
branch | RCL_3 |
changeset 61 | 269724087bed |
parent 56 | 9386f31cc85b |
child 72 | 4b59561a31c0 |
permissions | -rw-r--r-- |
56 | 1 |
/* |
2 |
* Copyright (c) 2009 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: Declares pair base notifier. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef BTNPAIRNOTIFIER_H_ |
|
19 |
#define BTNPAIRNOTIFIER_H_ |
|
20 |
||
21 |
#include "btnotifier.h" // base class |
|
22 |
||
23 |
// CLASS DECLARATION |
|
24 |
/** |
|
25 |
* This class is used as base class for all pairing purpose notifiers |
|
26 |
*/ |
|
27 |
NONSHARABLE_CLASS(CBTNPairNotifierBase) : public CBTNotifierBase |
|
28 |
{ |
|
29 |
public: // Constructors and destructor |
|
30 |
||
31 |
/** |
|
32 |
* Two-phased constructor. |
|
33 |
*/ |
|
34 |
static CBTNPairNotifierBase* NewL(); // Constructor (public) |
|
35 |
||
36 |
/** |
|
37 |
* Destructor. |
|
38 |
*/ |
|
39 |
virtual ~CBTNPairNotifierBase(); // Destructor |
|
40 |
||
41 |
protected: // From base class |
|
42 |
||
43 |
/** |
|
44 |
* From CBTNotifierBase |
|
45 |
*/ |
|
46 |
virtual TNotifierInfo RegisterL(); |
|
47 |
||
48 |
/** |
|
61
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
49 |
* From CBTNotifierBase |
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
50 |
* Used in asynchronous notifier launch to start the actual processing |
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
51 |
* of parameters received in StartL. StartL just stores a copy of the |
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
52 |
* parameter buffer, schedules a callback to call this method and returns |
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
53 |
* ASAP, so the actual work begins here, safely outside of the StartL |
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
54 |
* context so that waiting dialogs can be freely used if need be. |
56 | 55 |
* @return None. |
56 |
*/ |
|
61
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
57 |
virtual void ProcessStartParamsL(); |
56 | 58 |
|
59 |
virtual void UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); |
|
60 |
||
61 |
/** |
|
62 |
* From CBTNotifierBase Updates a currently active notifier. |
|
63 |
* @param aBuffer The updated data. |
|
64 |
* @return A pointer to return value. |
|
65 |
*/ |
|
66 |
virtual TPtrC8 UpdateL(const TDesC8& aBuffer); |
|
67 |
||
68 |
protected: // New functions |
|
69 |
||
70 |
void ProcessParamsGetDeviceL( const TBTDevAddr& aAddr, const TBTDeviceName& aName ); |
|
71 |
||
72 |
/** |
|
73 |
* Check not to allow pairing attempt from banned devices, |
|
74 |
*/ |
|
75 |
TBool CheckBlockedDeviceL(); |
|
76 |
||
77 |
/** |
|
78 |
* Query user to accept/reject when the pairing request is initiated |
|
79 |
* from remote device. |
|
80 |
* @param None. |
|
81 |
* @return ETrue if User accepted. |
|
82 |
*/ |
|
83 |
TBool AuthoriseIncomingPairingL(); |
|
84 |
||
85 |
/** |
|
86 |
* Generate prompt based on subclass's own needs. |
|
87 |
* @param aRBuf the descriptor to which the prompt will be loaded. |
|
88 |
*/ |
|
89 |
virtual void GenerateQueryPromptL( RBuf& aRBuf ); |
|
90 |
||
91 |
private: |
|
92 |
/** |
|
93 |
* From CBTNotifierBase Called when a notifier is first loaded |
|
94 |
* to allow any initial construction that is required. |
|
95 |
* @param None. |
|
96 |
* @return A structure containing priority and channel info. |
|
97 |
*/ |
|
98 |
//TNotifierInfo RegisterL(); |
|
99 |
||
100 |
protected: |
|
101 |
/** |
|
102 |
* C++ default constructor. |
|
103 |
*/ |
|
104 |
CBTNPairNotifierBase(); |
|
105 |
||
106 |
protected: // Data |
|
107 |
TBool iLocallyInitiated; |
|
108 |
}; |
|
109 |
||
110 |
#endif /* BTNPAIRNOTIFIER_H */ |
|
111 |