author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:43:49 +0300 | |
branch | RCL_3 |
changeset 72 | 4b59561a31c0 |
parent 61 | 269724087bed |
permissions | -rw-r--r-- |
56 | 1 |
/* |
2 |
* Copyright (c) 2002, 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: Declares Generic Query Notifier Class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef BTNGENERICQUERYNOTIFIER_H |
|
19 |
#define BTNGENERICQUERYNOTIFIER_H |
|
20 |
||
21 |
// INCLUDES |
|
22 |
||
23 |
#include "btnotifier.h" // Base class |
|
24 |
#include "btnotifactive.h" |
|
25 |
||
26 |
// FORWARD DECLARATIONS |
|
27 |
||
28 |
// CLASS DECLARATION |
|
29 |
NONSHARABLE_CLASS(CBTGenericQueryNotifier): public CBTNotifierBase, |
|
30 |
public MBTNotifActiveObserver |
|
31 |
{ |
|
32 |
public: |
|
33 |
// Constructors and destructor |
|
34 |
||
35 |
/** |
|
36 |
* Two-phased constructor. |
|
37 |
*/ |
|
38 |
static CBTGenericQueryNotifier* NewL(); |
|
39 |
||
40 |
/** |
|
41 |
* Destructor. |
|
42 |
*/ |
|
43 |
virtual ~CBTGenericQueryNotifier(); |
|
44 |
||
45 |
private: |
|
46 |
// Functions from base classes |
|
47 |
||
48 |
/** |
|
49 |
* From CBTNotifierBase Called when a notifier is first loaded |
|
50 |
* to allow any initial construction that is required. |
|
51 |
* @param None. |
|
52 |
* @return A structure containing priority and channel info. |
|
53 |
*/ |
|
54 |
TNotifierInfo RegisterL(); |
|
55 |
||
56 |
/** From CBTNotifierBase Synchronic notifier launch. |
|
57 |
* @param aBuffer Received parameter data. |
|
58 |
* @return A pointer to return value. |
|
59 |
*/ |
|
60 |
TPtrC8 StartL(const TDesC8& aBuffer); |
|
61 |
||
72
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
62 |
/** |
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
63 |
* From CBTNotifierBase Used in asynchronous notifier launch to |
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
64 |
* store received parameters into members variables and |
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
65 |
* make needed initializations. |
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
66 |
* @param aBuffer A buffer containing received parameters |
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
67 |
* @param aReturnVal The return value to be passed back. |
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
68 |
* @param aMessage Should be completed when the notifier is deactivated. |
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
69 |
* @return None. |
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
70 |
*/ |
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
71 |
void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, |
4b59561a31c0
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
61
diff
changeset
|
72 |
const RMessagePtr2& aMessage); |
56 | 73 |
|
74 |
/** |
|
75 |
* From CBTNotifierBase Updates a currently active notifier. |
|
76 |
* @param aBuffer The updated data. |
|
77 |
* @return A pointer to return value. |
|
78 |
*/ |
|
79 |
TPtrC8 UpdateL(const TDesC8& aBuffer); |
|
80 |
||
81 |
/** |
|
82 |
* From MBTNotifActiveObserver |
|
83 |
* Gets called when P&S key notifies change. |
|
84 |
*/ |
|
85 |
void RequestCompletedL(CBTNotifActive* aActive, TInt aId, TInt aStatus); |
|
86 |
||
87 |
/** |
|
88 |
* From MBTNotifActiveObserver |
|
89 |
*/ |
|
90 |
void HandleError(CBTNotifActive* aActive, TInt aId, TInt aError); |
|
91 |
||
92 |
/** |
|
93 |
* From MBTNotifActiveObserver |
|
94 |
*/ |
|
95 |
void DoCancelRequest(CBTNotifActive* aActive, TInt aId); |
|
96 |
||
97 |
private: |
|
98 |
||
99 |
/** |
|
100 |
* Parse the data out of the message that is sent by the client of the notifier. |
|
101 |
* @param aBuffer A package buffer containing received parameters. |
|
102 |
* @return None. |
|
103 |
*/ |
|
104 |
void ProcessParamBufferL(const TDesC8& aBuffer); |
|
105 |
||
106 |
/** |
|
107 |
* C++ default constructor. |
|
108 |
*/ |
|
109 |
CBTGenericQueryNotifier(); |
|
110 |
||
111 |
/** |
|
112 |
* Symbian 2nd phase constructor. |
|
113 |
*/ |
|
114 |
void ConstructL(); |
|
115 |
||
116 |
/** |
|
117 |
* Show query and complete message. |
|
118 |
*/ |
|
119 |
void ShowQueryAndCompleteL(); |
|
120 |
||
121 |
private: |
|
122 |
||
123 |
RBuf iQueryMessage; |
|
124 |
HBufC* iQueryHeader; |
|
125 |
HBufC* iName; |
|
126 |
||
127 |
TInt iMessageResourceId; |
|
128 |
TSecondaryDisplayBTnotifDialogs iSecondaryDisplayCommand; |
|
129 |
TBool iIsMessageQuery; |
|
130 |
TBool iIsNameQuery; |
|
131 |
RProperty iPhonePowerKey; |
|
132 |
CBTNotifActive* iPhonePowerKeyWatcher; |
|
133 |
}; |
|
134 |
||
135 |
#endif |
|
136 |
||
137 |
// End of File |