|
1 /* |
|
2 * Copyright (c) 2007 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: The current extension does not provide a view. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_CLOGSVIEWEXTENSION_H |
|
19 #define C_CLOGSVIEWEXTENSION_H |
|
20 |
|
21 |
|
22 // INCLUDES |
|
23 #include "MLogsViewExtension.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CSendUi; |
|
27 class CSendingServiceInfo; |
|
28 class CSPSettings; |
|
29 class CSPEntry; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * View extension . |
|
35 */ |
|
36 NONSHARABLE_CLASS(CLogsViewExtension) : public CBase, |
|
37 public MLogsViewExtension |
|
38 { |
|
39 friend class ut_clogsuicontrolextension; |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * |
|
46 * @since S60 v3.2 |
|
47 */ |
|
48 static CLogsViewExtension* NewL(); |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 * |
|
53 * @since S60 v3.2 |
|
54 */ |
|
55 static CLogsViewExtension* NewLC(); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 ~CLogsViewExtension(); |
|
61 |
|
62 |
|
63 protected: |
|
64 |
|
65 // From MLogsUiExtensionBase |
|
66 |
|
67 /** |
|
68 * Releases this object and any resources it owns. |
|
69 * |
|
70 * @since S60 v3.2 |
|
71 */ |
|
72 void DoRelease(); |
|
73 |
|
74 |
|
75 // From MLogsViewExtension |
|
76 |
|
77 /** |
|
78 * From MLogsViewExtension |
|
79 * Filters the menu pane of the Logs view connect to this |
|
80 * extension. |
|
81 * |
|
82 * @since S60 v3.2 |
|
83 * @param aResourceId menu resource id. |
|
84 * @param aMenuPane menu pane which will be filtered. |
|
85 * @param aEvent getter of current event |
|
86 */ |
|
87 void DynInitMenuPaneL( TInt aResourceId, |
|
88 CEikMenuPane* aMenuPane, |
|
89 const MLogsEventGetter* aEvent); |
|
90 |
|
91 /** |
|
92 * From MLogsViewExtension |
|
93 * Handles Logs extension commands. |
|
94 * |
|
95 * @since S60 v3.2 |
|
96 * @param aCommandId command id. |
|
97 * @return ETrue if command was handled. |
|
98 */ |
|
99 TBool HandleCommandL(TInt aCommandId); |
|
100 |
|
101 /** |
|
102 * Reference to SendUi from the Logs Application UI object. |
|
103 * |
|
104 * @since S60 v3.2 |
|
105 * @param aSendUi reference to SendUi object |
|
106 */ |
|
107 void SetSendUi( CSendUi& aSendUi ); |
|
108 |
|
109 /** |
|
110 * Set SendUi menu command text |
|
111 * |
|
112 * @since S60 v3.2 |
|
113 * @param aSendUiText menu command text |
|
114 */ |
|
115 void SetSendUiText( const TDesC& aSendUiText ); |
|
116 |
|
117 private: |
|
118 |
|
119 /** |
|
120 * Constructor. |
|
121 */ |
|
122 CLogsViewExtension(); |
|
123 |
|
124 /** |
|
125 * Symbian second-phase constructor |
|
126 */ |
|
127 void ConstructL(); |
|
128 |
|
129 /** |
|
130 * Verify if IM sending service provider exists. |
|
131 * @param aServiceProviderUid service provider uid to find in available services. |
|
132 * @param aServiceProviderExists ETrue if service is available. |
|
133 */ |
|
134 void VerifyServiceProviderL( const TUid& aServiceProviderUid , |
|
135 TBool& aServiceProviderExists ); |
|
136 |
|
137 /** |
|
138 * Get WLM Send ui plugin UID from service table. |
|
139 * @param aServiceId service id to look for in service table. |
|
140 * @param aServiceProviderUid service provider uid from service table. |
|
141 * @return ETrue if plugin uid was found in service table's entry. |
|
142 */ |
|
143 TBool GetServicePluginUidL( TInt aServiceId, TUid& aServiceProviderUid ); |
|
144 |
|
145 /** |
|
146 * Set contact link. |
|
147 * @param aContactLink contact link from logs. |
|
148 */ |
|
149 void SetContactlink( const TDesC8& aContactLink ); |
|
150 |
|
151 /** |
|
152 * Set service id. |
|
153 * @param aServiceId service id from logs. |
|
154 */ |
|
155 void SetServiceId( const TUint32& aServiceId ); |
|
156 |
|
157 /** |
|
158 * Set provider uid. |
|
159 * @param aUid uid of service provider from service table and is available in services list. |
|
160 */ |
|
161 void SetProviderUid( const TUid& aUid ); |
|
162 |
|
163 /** |
|
164 * Send message. |
|
165 * @return ETrue if command was handled. |
|
166 */ |
|
167 TBool SendMessageL(); |
|
168 |
|
169 private: |
|
170 |
|
171 /** |
|
172 * Services to exclude. |
|
173 * Own |
|
174 */ |
|
175 CArrayFixFlat<TUid>* iServiceProvidersToDim; |
|
176 |
|
177 /** |
|
178 * Available services list. |
|
179 * Own |
|
180 */ |
|
181 RPointerArray<CSendingServiceInfo>* iServiceList; |
|
182 |
|
183 /** |
|
184 * SP settings. |
|
185 * Own |
|
186 */ |
|
187 CSPSettings* iSettings; |
|
188 |
|
189 /** |
|
190 * SP setting's entry. |
|
191 * Own |
|
192 */ |
|
193 CSPEntry* iEntry; |
|
194 |
|
195 /** |
|
196 * Reference to the SendUi from Logs Application UI object. |
|
197 * Not own |
|
198 */ |
|
199 CSendUi* iSendUi; |
|
200 |
|
201 /** |
|
202 * SendUi command text |
|
203 */ |
|
204 TPtrC iSendUiText; |
|
205 |
|
206 /** |
|
207 * Service id in service table |
|
208 */ |
|
209 TUint32 iServiceId; |
|
210 |
|
211 /** |
|
212 * ContactLink |
|
213 */ |
|
214 TPtrC8 iContactLink; |
|
215 |
|
216 /** |
|
217 * Service UID of WLM Plugin |
|
218 */ |
|
219 TUid iServiceProviderUid; |
|
220 |
|
221 }; |
|
222 |
|
223 #endif // C_CLOGSVIEWEXTENSION_H |