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) 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 |
||
61
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
62 |
/** |
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
63 |
* From CBTNotifierBase |
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
64 |
* 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
|
65 |
* 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
|
66 |
* 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
|
67 |
* 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
|
68 |
* context so that waiting dialogs can be freely used if need be. |
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
69 |
* @return None. |
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
70 |
*/ |
269724087bed
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
71 |
void ProcessStartParamsL(); |
56 | 72 |
|
73 |
/** |
|
74 |
* From CBTNotifierBase Updates a currently active notifier. |
|
75 |
* @param aBuffer The updated data. |
|
76 |
* @return A pointer to return value. |
|
77 |
*/ |
|
78 |
TPtrC8 UpdateL(const TDesC8& aBuffer); |
|
79 |
||
80 |
/** |
|
81 |
* From MBTNotifActiveObserver |
|
82 |
* Gets called when P&S key notifies change. |
|
83 |
*/ |
|
84 |
void RequestCompletedL(CBTNotifActive* aActive, TInt aId, TInt aStatus); |
|
85 |
||
86 |
/** |
|
87 |
* From MBTNotifActiveObserver |
|
88 |
*/ |
|
89 |
void HandleError(CBTNotifActive* aActive, TInt aId, TInt aError); |
|
90 |
||
91 |
/** |
|
92 |
* From MBTNotifActiveObserver |
|
93 |
*/ |
|
94 |
void DoCancelRequest(CBTNotifActive* aActive, TInt aId); |
|
95 |
||
96 |
private: |
|
97 |
||
98 |
/** |
|
99 |
* Parse the data out of the message that is sent by the client of the notifier. |
|
100 |
* @param aBuffer A package buffer containing received parameters. |
|
101 |
* @return None. |
|
102 |
*/ |
|
103 |
void ProcessParamBufferL(const TDesC8& aBuffer); |
|
104 |
||
105 |
/** |
|
106 |
* C++ default constructor. |
|
107 |
*/ |
|
108 |
CBTGenericQueryNotifier(); |
|
109 |
||
110 |
/** |
|
111 |
* Symbian 2nd phase constructor. |
|
112 |
*/ |
|
113 |
void ConstructL(); |
|
114 |
||
115 |
/** |
|
116 |
* Show query and complete message. |
|
117 |
*/ |
|
118 |
void ShowQueryAndCompleteL(); |
|
119 |
||
120 |
private: |
|
121 |
||
122 |
RBuf iQueryMessage; |
|
123 |
HBufC* iQueryHeader; |
|
124 |
HBufC* iName; |
|
125 |
||
126 |
TInt iMessageResourceId; |
|
127 |
TSecondaryDisplayBTnotifDialogs iSecondaryDisplayCommand; |
|
128 |
TBool iIsMessageQuery; |
|
129 |
TBool iIsNameQuery; |
|
130 |
RProperty iPhonePowerKey; |
|
131 |
CBTNotifActive* iPhonePowerKeyWatcher; |
|
132 |
}; |
|
133 |
||
134 |
#endif |
|
135 |
||
136 |
// End of File |