author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:44:03 +0100 | |
branch | GCC_SURGE |
changeset 63 | ef2686f7597e |
parent 3 | 47c263f7e521 |
parent 38 | 218231f2b3b3 |
permissions | -rw-r--r-- |
35 | 1 |
/* |
2 |
* Copyright (c) 2005, 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 USB UI notifiers base class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
#ifndef USBUINOTIFIER_H |
|
18 |
#define USBUINOTIFIER_H |
|
19 |
// INCLUDES |
|
20 |
#include <usbuinotif.h> |
|
21 |
#include <eikenv.h> |
|
22 |
#include <data_caging_path_literals.hrh> |
|
23 |
#include "usbuinotifdebug.h" |
|
24 |
// CONSTANTS |
|
25 |
// Literal resource filename |
|
26 |
_LIT(KResourceFileName, "usbuinotif.rsc"); |
|
27 |
||
28 |
// FORWARD DECLARATIONS |
|
29 |
||
30 |
||
31 |
// CLASS DECLARATION |
|
32 |
||
33 |
/** |
|
34 |
* This class is the base class for all notifiers. |
|
35 |
* |
|
36 |
* @lib |
|
37 |
*/ |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
38 |
NONSHARABLE_CLASS(CUSBUINotifierBase) : public CBase, public MEikSrvNotifierBase2 |
35 | 39 |
{ |
40 |
public: |
|
41 |
// Constructors and destructor |
|
42 |
||
43 |
/** |
|
44 |
* Destructor. |
|
45 |
*/ |
|
46 |
virtual ~CUSBUINotifierBase(); |
|
47 |
||
48 |
protected: |
|
49 |
// Constructors and destructor |
|
50 |
||
51 |
/** |
|
52 |
* C++ default constructor. |
|
53 |
*/ |
|
54 |
CUSBUINotifierBase(); |
|
55 |
||
56 |
/** |
|
57 |
* Symbian 2nd phase constructor. |
|
58 |
*/ |
|
59 |
virtual void ConstructL(); |
|
60 |
||
61 |
protected: |
|
62 |
// New functions |
|
63 |
||
64 |
/** |
|
65 |
* Used in asynchronous notifier launch to store received parameters |
|
66 |
* into members variables and make needed initializations. |
|
67 |
* @param aBuffer A buffer containing received parameters |
|
68 |
* @param aReplySlot a Reply slot. |
|
69 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
70 |
* @return None. |
|
71 |
*/ |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
72 |
virtual void StartDialogL(const TDesC8& aBuffer, TInt aReplySlot, |
35 | 73 |
const RMessagePtr2& aMessage)=0; |
74 |
||
75 |
/** |
|
76 |
* Check if message needs to be completed and complete it |
|
77 |
* @param aReason The completetion code |
|
78 |
*/ |
|
79 |
void CompleteMessage(TInt aReason); |
|
80 |
||
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
81 |
/** |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
82 |
* Initialize HbTextResolrer, if not initialized before |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
83 |
* (checks it from TLS) |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
84 |
*/ |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
85 |
void InitializeTextResolver(); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
86 |
|
35 | 87 |
protected: |
88 |
// Functions from base classes |
|
89 |
||
90 |
/** |
|
91 |
* From MEikSrvNotifierBase2 Called when a notifier is first loaded |
|
92 |
* to allow any initial construction that is required. |
|
93 |
* @param None. |
|
94 |
* @return A structure containing priority and channel info. |
|
95 |
*/ |
|
96 |
virtual TNotifierInfo RegisterL()=0; |
|
97 |
||
98 |
/** |
|
99 |
* From MEikSrvNotifierBase2 The notifier has been deactivated |
|
100 |
* so resources can be freed and outstanding messages completed. |
|
101 |
* @param None. |
|
102 |
* @return None. |
|
103 |
*/ |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
104 |
virtual void Cancel(); |
35 | 105 |
|
106 |
private: |
|
107 |
// Functions from base classes |
|
108 |
||
109 |
/** |
|
110 |
* From MEikSrvNotifierBase2 Called when all resources allocated |
|
111 |
* by notifiers should be freed. |
|
112 |
* @param None. |
|
113 |
* @return None. |
|
114 |
*/ |
|
115 |
virtual void Release(); |
|
116 |
||
117 |
/** |
|
118 |
* From MEikSrvNotifierBase2 Return the priority a notifier takes |
|
119 |
* and the channels it acts on. |
|
120 |
* @param None. |
|
121 |
* @return A structure containing priority and channel info. |
|
122 |
*/ |
|
123 |
virtual TNotifierInfo Info() const; |
|
124 |
||
125 |
/** |
|
126 |
* From MEikSrvNotifierBase2 Synchronic notifier launch. |
|
127 |
* @param aBuffer Received parameter data. |
|
128 |
* @return A pointer to return value. |
|
129 |
*/ |
|
130 |
virtual TPtrC8 StartL(const TDesC8& aBuffer); |
|
131 |
||
132 |
/** |
|
133 |
* From MEikSrvNotifierBase2 Asynchronic notifier launch. |
|
134 |
* @param aBuffer A buffer containing received parameters |
|
135 |
* @param aReturnVal The return value to be passed back. |
|
136 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
137 |
* @return A pointer to return value. |
|
138 |
*/ |
|
139 |
virtual void StartL(const TDesC8& aBuffer, TInt aReplySlot, |
|
140 |
const RMessagePtr2& aMessage); |
|
141 |
||
142 |
/** |
|
143 |
* From MEikSrvNotifierBase2 Updates a currently active notifier. |
|
144 |
* @param aBuffer The updated data. |
|
145 |
* @return A pointer to return value. |
|
146 |
*/ |
|
147 |
virtual TPtrC8 UpdateL(const TDesC8& aBuffer); |
|
148 |
||
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
149 |
|
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
150 |
|
35 | 151 |
protected: |
152 |
// Data |
|
153 |
||
154 |
RMessagePtr2 iMessage; // Received message |
|
155 |
TInt iReplySlot; // Reply slot |
|
156 |
TBool iNeedToCompleteMessage; // Flag for releasing messages |
|
157 |
||
158 |
TInt iResourceFileFlag; // Flag for eikon env. |
|
159 |
TNotifierInfo iInfo; // Notifier parameters structure |
|
160 |
CEikonEnv* iEikEnv; // Local eikonenv, not own |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
161 |
TBool iTranslator ; |
35 | 162 |
}; |
163 |
||
164 |
#endif // USBUINOTIFIER_H |
|
165 |
// End of File |