60
|
1 |
/*
|
|
2 |
* Copyright (c) 2008-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: Implementation of Command Binding Class's
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#include "glxdetailsboundcommand.hrh"
|
|
21 |
#include "glxdetailsboundcommand.h" // Handles user commands
|
|
22 |
#include "glxuiutility.h"
|
|
23 |
/** Error Id EMPY-7MKDHP **/
|
|
24 |
#include "mglxmetadatadialogobserver.h" //for call back to dailog
|
|
25 |
|
|
26 |
#include <e32base.h> // Base class for all classes to be instantiated on the heap
|
|
27 |
#include <ExifModify.h> //For CExifModify
|
|
28 |
#include <glxmetadatadialog.rsg>
|
|
29 |
#include <glxuiutilities.rsg>
|
|
30 |
#include <glxuiutilities.rsg>
|
|
31 |
#include <glxcommandhandleraddtocontainer.h> // For CGlxCommandHandlerAddToContainer
|
|
32 |
#include <glxcommandhandlers.hrh> // for command handler id
|
|
33 |
#include <glxdrmutility.h> //For launching DRM details pane
|
|
34 |
#include <glxmedialist.h> // Interface for reading lists of media items
|
|
35 |
#include <glxcommandfactory.h> //for command factory
|
|
36 |
#include <mpxcommandgeneraldefs.h> // Content ID identifying general category of content provided
|
|
37 |
#include <glxtextentrypopup.h> //for testing
|
|
38 |
#include <glxgeneraluiutilities.h> // General utilties class definition
|
|
39 |
#include <StringLoader.h> // Class provides methods to load and format resource strings
|
|
40 |
#include <glxlog.h> // Logging
|
|
41 |
#include <glxtracer.h>
|
|
42 |
#include <glxviewbase.rsg>
|
|
43 |
#include <glxscreenfurniture.h>
|
|
44 |
#include <glxresourceutilities.h> // for CGlxResourceUtilities
|
|
45 |
#include <glxmediageneraldefs.h> // for KMaxMediaPopupTextLength
|
|
46 |
|
|
47 |
|
|
48 |
// ----------------------------------------------------------------------------
|
|
49 |
// CGlxTitleBoundCommand::NewL
|
|
50 |
// ----------------------------------------------------------------------------
|
|
51 |
//
|
|
52 |
EXPORT_C CGlxTitleBoundCommand* CGlxTitleBoundCommand::NewL()
|
|
53 |
{
|
|
54 |
TRACER("CGlxTitleBoundCommand::NewL");
|
|
55 |
CGlxTitleBoundCommand* self = CGlxTitleBoundCommand::NewLC();
|
|
56 |
CleanupStack::Pop( self );
|
|
57 |
return self;
|
|
58 |
}
|
|
59 |
|
|
60 |
// ----------------------------------------------------------------------------
|
|
61 |
// CGlxTitleBoundCommand::NewLC
|
|
62 |
// ----------------------------------------------------------------------------
|
|
63 |
//
|
|
64 |
CGlxTitleBoundCommand* CGlxTitleBoundCommand::NewLC()
|
|
65 |
{
|
|
66 |
TRACER("CGlxTitleBoundCommand::NewLC");
|
|
67 |
CGlxTitleBoundCommand* self = new ( ELeave ) CGlxTitleBoundCommand;
|
|
68 |
CleanupStack::PushL( self );
|
|
69 |
return self;
|
|
70 |
}
|
|
71 |
|
|
72 |
CGlxTitleBoundCommand::~CGlxTitleBoundCommand()
|
|
73 |
{
|
|
74 |
|
|
75 |
}
|
|
76 |
// ----------------------------------------------------------------------------
|
|
77 |
// CGlxTitleBoundCommand::OfferCommandL
|
|
78 |
// ----------------------------------------------------------------------------
|
|
79 |
//
|
|
80 |
TBool CGlxTitleBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist )
|
|
81 |
{
|
|
82 |
TRACER("CGlxTitleBoundCommand::OfferCommandL");
|
|
83 |
TBool consumed = EFalse;
|
|
84 |
iMedialist = &aMedialist;
|
|
85 |
const CGlxMedia* media = iMedialist->Item(0).Properties();
|
|
86 |
if( media )
|
|
87 |
{
|
|
88 |
if ( aCommandId == KGlxEditBoundMenuCommandId && media->IsSupported( KMPXMediaGeneralTitle))
|
|
89 |
{
|
|
90 |
///@todo - remove popup when editable template is avaliable
|
|
91 |
//Popup for testing
|
|
92 |
HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTextLength );
|
|
93 |
(textBuf->Des()).Copy((media->ValueText(KMPXMediaGeneralTitle)));
|
|
94 |
TPtr textPtr = textBuf->Des();
|
|
95 |
/// bug fix - EMPY-7MCKD6
|
|
96 |
TBuf<KMaxMediaPopupTextLength> titleText(*textBuf);
|
|
97 |
/// bug fix - EMPY-7MCKD6
|
|
98 |
///@todo - remove literal for popup title when resource string is avaliable
|
|
99 |
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_TITLE_NSERIES);
|
|
100 |
CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *buf, textPtr );
|
|
101 |
CleanupStack::PopAndDestroy(buf);
|
|
102 |
if ( popup->ExecuteLD() == EEikBidOk )
|
|
103 |
{
|
|
104 |
// Text entry was successful
|
|
105 |
/// bug fix - EMPY-7MCKD6
|
|
106 |
//Compare if there is any change in the entry
|
|
107 |
if(0 != (titleText.Compare(*textBuf)))
|
|
108 |
/// bug fix - EMPY-7MCKD6
|
|
109 |
ModifyTitleL( *textBuf );
|
|
110 |
}
|
|
111 |
CleanupStack::PopAndDestroy( textBuf );
|
|
112 |
consumed = ETrue;
|
|
113 |
}
|
|
114 |
}
|
|
115 |
return consumed;
|
|
116 |
}
|
|
117 |
|
|
118 |
// ----------------------------------------------------------------------------
|
|
119 |
// CGlxTitleBoundCommand::InitMenuL
|
|
120 |
// ----------------------------------------------------------------------------
|
|
121 |
//
|
|
122 |
void CGlxTitleBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const
|
|
123 |
{
|
|
124 |
TRACER("CGlxTitleBoundCommand::InitMenuL");
|
|
125 |
aMenu.SetItemTextL( KGlxEditBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_EDIT );
|
|
126 |
aMenu.SetItemDimmed( KGlxEditBoundMenuCommandId, EFalse );
|
|
127 |
}
|
|
128 |
|
|
129 |
// ----------------------------------------------------------------------------
|
|
130 |
// CGlxTitleBoundCommand::HideLocationMenuItem
|
|
131 |
// ----------------------------------------------------------------------------
|
|
132 |
//
|
|
133 |
void CGlxTitleBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const
|
|
134 |
{
|
|
135 |
TRACER("CGlxTitleBoundCommand::HideLocationMenuItem");
|
|
136 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue );
|
|
137 |
}
|
|
138 |
|
|
139 |
// -----------------------------------------------------------------------------
|
|
140 |
// CGlxDescriptionBoundCommand::ModifyTitleL
|
|
141 |
// -----------------------------------------------------------------------------
|
|
142 |
//
|
|
143 |
void CGlxTitleBoundCommand::ModifyTitleL(const TDesC& aData )
|
|
144 |
{
|
|
145 |
TRACER("CGlxTitleBoundCommand::ModifyTitleL");
|
|
146 |
|
|
147 |
if( iMedialist->Count() > 0 )
|
|
148 |
{
|
|
149 |
iMedialist->SetFocusL(NGlxListDefs::EAbsolute,0);//set focus to first item
|
|
150 |
CMPXCollectionPath* path = iMedialist->PathLC();
|
|
151 |
CMPXCommand* command = TGlxCommandFactory::RenameCommandLC(aData,*path);
|
|
152 |
|
|
153 |
command->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId, static_cast<TAny*>(this));
|
|
154 |
|
|
155 |
iMedialist->CommandL(*command);
|
|
156 |
|
|
157 |
CleanupStack::PopAndDestroy(command);
|
|
158 |
CleanupStack::PopAndDestroy(path);
|
|
159 |
}
|
|
160 |
}
|
|
161 |
|
|
162 |
// ----------------------------------------------------------------------------
|
|
163 |
// CGlxTitleBoundCommand::Close
|
|
164 |
// ----------------------------------------------------------------------------
|
|
165 |
//
|
|
166 |
void CGlxTitleBoundCommand::Close()
|
|
167 |
{
|
|
168 |
delete this;
|
|
169 |
}
|
|
170 |
|
|
171 |
// ----------------------------------------------------------------------------
|
|
172 |
// CGlxTitleBoundCommand::ChangeMskL
|
|
173 |
// ----------------------------------------------------------------------------
|
|
174 |
//
|
|
175 |
void CGlxTitleBoundCommand::ChangeMskL()
|
|
176 |
{
|
|
177 |
TRACER("CGlxTitleBoundCommand::ChangeMskL");
|
|
178 |
|
|
179 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
|
|
180 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
|
|
181 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_EDIT);
|
|
182 |
if ( uiUtility )
|
|
183 |
{
|
|
184 |
uiUtility->Close();
|
|
185 |
}
|
|
186 |
}
|
|
187 |
|
|
188 |
// ----------------------------------------------------------------------------
|
|
189 |
// CGlxTitleBoundCommand::SetDetailsDailogObserver
|
|
190 |
// ----------------------------------------------------------------------------
|
|
191 |
//
|
|
192 |
void CGlxTitleBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ )
|
|
193 |
{
|
|
194 |
|
|
195 |
}
|
|
196 |
|
|
197 |
// ----------------------------------------------------------------------------
|
|
198 |
// CGlxTagsBoundCommand::NewL
|
|
199 |
// ----------------------------------------------------------------------------
|
|
200 |
//
|
|
201 |
EXPORT_C CGlxTagsBoundCommand* CGlxTagsBoundCommand::NewL()
|
|
202 |
{
|
|
203 |
TRACER("CGlxTagsBoundCommand::NewL");
|
|
204 |
CGlxTagsBoundCommand* self = CGlxTagsBoundCommand::NewLC();
|
|
205 |
self->ConstructL();
|
|
206 |
CleanupStack::Pop( self );
|
|
207 |
return self;
|
|
208 |
}
|
|
209 |
|
|
210 |
// ----------------------------------------------------------------------------
|
|
211 |
// CGlxTagsBoundCommand::NewLC
|
|
212 |
// ----------------------------------------------------------------------------
|
|
213 |
//
|
|
214 |
CGlxTagsBoundCommand* CGlxTagsBoundCommand::NewLC()
|
|
215 |
{
|
|
216 |
TRACER("CGlxTagsBoundCommand::NewLC");
|
|
217 |
CGlxTagsBoundCommand* self = new ( ELeave ) CGlxTagsBoundCommand;
|
|
218 |
CleanupStack::PushL( self );
|
|
219 |
return self;
|
|
220 |
}
|
|
221 |
|
|
222 |
|
|
223 |
// ----------------------------------------------------------------------------
|
|
224 |
// CGlxTagsBoundCommand::ConstructL
|
|
225 |
// ----------------------------------------------------------------------------
|
|
226 |
//
|
|
227 |
void CGlxTagsBoundCommand::ConstructL()
|
|
228 |
{
|
|
229 |
TRACER("CGlxTagsBoundCommand::ConstructL");
|
|
230 |
TFileName uiutilitiesrscfile;
|
|
231 |
uiutilitiesrscfile.Append(
|
|
232 |
CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL());
|
|
233 |
//create command handler
|
|
234 |
iAddToTag = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddTag,
|
|
235 |
EFalse, uiutilitiesrscfile);
|
|
236 |
}
|
|
237 |
|
|
238 |
// ----------------------------------------------------------------------------
|
|
239 |
// CGlxTagsBoundCommand::~CGlxTagsBoundCommand
|
|
240 |
// ----------------------------------------------------------------------------
|
|
241 |
//
|
|
242 |
CGlxTagsBoundCommand::~CGlxTagsBoundCommand()
|
|
243 |
{
|
|
244 |
if(iAddToTag)
|
|
245 |
{
|
|
246 |
delete iAddToTag;
|
|
247 |
}
|
|
248 |
}
|
|
249 |
|
|
250 |
// ----------------------------------------------------------------------------
|
|
251 |
// CGlxTagsBoundCommand::OfferCommandL
|
|
252 |
// ----------------------------------------------------------------------------
|
|
253 |
//
|
|
254 |
TBool CGlxTagsBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist)
|
|
255 |
{
|
|
256 |
TRACER("CGlxTagsBoundCommand::OfferCommandL");
|
|
257 |
SetMediaList(&aMedialist);
|
|
258 |
TBool consumed = EFalse;
|
|
259 |
if ( aCommandId == KGlxEditBoundMenuCommandId )
|
|
260 |
{
|
|
261 |
iAddToTag->ExecuteL(EGlxCmdAddTag);
|
|
262 |
consumed = ETrue;
|
|
263 |
}
|
|
264 |
return consumed;
|
|
265 |
}
|
|
266 |
|
|
267 |
// ----------------------------------------------------------------------------
|
|
268 |
// CGlxTagsBoundCommand::InitMenuL
|
|
269 |
// ----------------------------------------------------------------------------
|
|
270 |
//
|
|
271 |
void CGlxTagsBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const
|
|
272 |
{
|
|
273 |
TRACER("CGlxTagsBoundCommand::InitMenuL");
|
|
274 |
aMenu.SetItemTextL( KGlxEditBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_EDIT );
|
|
275 |
aMenu.SetItemDimmed( KGlxEditBoundMenuCommandId, EFalse );
|
|
276 |
}
|
|
277 |
|
|
278 |
// ----------------------------------------------------------------------------
|
|
279 |
// CGlxTagsBoundCommand::HideLocationMenuItem
|
|
280 |
// ----------------------------------------------------------------------------
|
|
281 |
//
|
|
282 |
void CGlxTagsBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const
|
|
283 |
{
|
|
284 |
TRACER("CGlxTagsBoundCommand::HideLocationMenuItem");
|
|
285 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue );
|
|
286 |
}
|
|
287 |
|
|
288 |
// ----------------------------------------------------------------------------
|
|
289 |
// CGlxTagsBoundCommand::Close
|
|
290 |
// ----------------------------------------------------------------------------
|
|
291 |
//
|
|
292 |
void CGlxTagsBoundCommand::Close()
|
|
293 |
{
|
|
294 |
delete this;
|
|
295 |
}
|
|
296 |
|
|
297 |
// ----------------------------------------------------------------------------
|
|
298 |
// CGlxTagsBoundCommand::ChangeMskL
|
|
299 |
// ----------------------------------------------------------------------------
|
|
300 |
//
|
|
301 |
void CGlxTagsBoundCommand::ChangeMskL()
|
|
302 |
{
|
|
303 |
TRACER("CGlxTagsBoundCommand::ChangeMskL");
|
|
304 |
|
|
305 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
|
|
306 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
|
|
307 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_ADD);
|
|
308 |
if ( uiUtility )
|
|
309 |
{
|
|
310 |
uiUtility->Close();
|
|
311 |
}
|
|
312 |
}
|
|
313 |
|
|
314 |
// ----------------------------------------------------------------------------
|
|
315 |
// CGlxTagsBoundCommand::SetDetailsDailogObserver
|
|
316 |
// ----------------------------------------------------------------------------
|
|
317 |
//
|
|
318 |
void CGlxTagsBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ )
|
|
319 |
{
|
|
320 |
|
|
321 |
}
|
|
322 |
|
|
323 |
|
|
324 |
// ----------------------------------------------------------------------------
|
|
325 |
// CGlxTagsBoundCommand::SetMediaList
|
|
326 |
// ----------------------------------------------------------------------------
|
|
327 |
//
|
|
328 |
void CGlxTagsBoundCommand::SetMediaList(MGlxMediaList* aMedialist)
|
|
329 |
{
|
|
330 |
TRACER("CGlxTagsBoundCommand::SetMediaList");
|
|
331 |
iMedialist = aMedialist;
|
|
332 |
}
|
|
333 |
|
|
334 |
// ----------------------------------------------------------------------------
|
|
335 |
// CGlxTagsBoundCommand::MediaList
|
|
336 |
// ----------------------------------------------------------------------------
|
|
337 |
//
|
|
338 |
MGlxMediaList& CGlxTagsBoundCommand::MediaList()
|
|
339 |
{
|
|
340 |
TRACER("CGlxTagsBoundCommand::MediaList");
|
|
341 |
return *iMedialist;
|
|
342 |
}
|
|
343 |
|
|
344 |
// ----------------------------------------------------------------------------
|
|
345 |
// CGlxDescriptionBoundCommand::NewL
|
|
346 |
// ----------------------------------------------------------------------------
|
|
347 |
//
|
|
348 |
EXPORT_C CGlxDescriptionBoundCommand* CGlxDescriptionBoundCommand::NewL()
|
|
349 |
{
|
|
350 |
TRACER("CGlxDescriptionBoundCommand::NewL");
|
|
351 |
CGlxDescriptionBoundCommand* self = CGlxDescriptionBoundCommand::NewLC();
|
|
352 |
CleanupStack::Pop( self );
|
|
353 |
return self;
|
|
354 |
}
|
|
355 |
|
|
356 |
// ----------------------------------------------------------------------------
|
|
357 |
// CGlxDescriptionBoundCommand::NewLC
|
|
358 |
// ----------------------------------------------------------------------------
|
|
359 |
//
|
|
360 |
CGlxDescriptionBoundCommand* CGlxDescriptionBoundCommand::NewLC()
|
|
361 |
{
|
|
362 |
TRACER("CGlxDescriptionBoundCommand::NewLC");
|
|
363 |
CGlxDescriptionBoundCommand* self = new ( ELeave ) CGlxDescriptionBoundCommand;
|
|
364 |
CleanupStack::PushL( self );
|
|
365 |
return self;
|
|
366 |
}
|
|
367 |
|
|
368 |
CGlxDescriptionBoundCommand::~CGlxDescriptionBoundCommand()
|
|
369 |
{
|
|
370 |
|
|
371 |
}
|
|
372 |
|
|
373 |
// ----------------------------------------------------------------------------
|
|
374 |
// CGlxDescriptionBoundCommand::OfferCommandL
|
|
375 |
// ----------------------------------------------------------------------------
|
|
376 |
//
|
|
377 |
TBool CGlxDescriptionBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist )
|
|
378 |
{
|
|
379 |
TRACER("CGlxDescriptionBoundCommand::OfferCommandL");
|
|
380 |
TBool consumed = EFalse;
|
|
381 |
iMedialist = &aMedialist;
|
|
382 |
const CGlxMedia* media = iMedialist->Item(0).Properties();
|
|
383 |
if ( aCommandId == KGlxEditBoundMenuCommandId )
|
|
384 |
{
|
|
385 |
///@todo - remove popup when editable template is avaliable
|
|
386 |
//Popup for testing
|
|
387 |
HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTextLength );
|
|
388 |
(textBuf->Des()).Copy((media->ValueText(KMPXMediaGeneralComment)));
|
|
389 |
TPtr textPtr = textBuf->Des();
|
|
390 |
/// bug fix - EMPY-7MCKD6
|
|
391 |
TBuf<KMaxMediaPopupTextLength> descText(*textBuf);
|
|
392 |
/// bug fix - EMPY-7MCKD6
|
|
393 |
///@todo - remove literal for popup title when resource string is avaliable
|
|
394 |
|
|
395 |
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_DESCRIPTION_NSERIES);
|
|
396 |
CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *buf, textPtr );
|
|
397 |
CleanupStack::PopAndDestroy(buf);
|
|
398 |
|
|
399 |
|
|
400 |
if ( popup->ExecuteLD() == EEikBidOk )
|
|
401 |
{
|
|
402 |
// Text entry was successful
|
|
403 |
/// bug fix - EMPY-7MCKD6
|
|
404 |
//Compare if there is any change in the entry
|
|
405 |
if(0 != (descText.Compare(*textBuf)))
|
|
406 |
/// bug fix - EMPY-7MCKD6
|
|
407 |
ModifyDescriptionL( *textBuf );
|
|
408 |
}
|
|
409 |
CleanupStack::PopAndDestroy( textBuf );
|
|
410 |
consumed = ETrue;
|
|
411 |
}
|
|
412 |
return consumed;
|
|
413 |
}
|
|
414 |
|
|
415 |
// ----------------------------------------------------------------------------
|
|
416 |
// CGlxDescriptionBoundCommand::InitMenuL
|
|
417 |
// ----------------------------------------------------------------------------
|
|
418 |
//
|
|
419 |
void CGlxDescriptionBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const
|
|
420 |
{
|
|
421 |
TRACER("CGlxDescriptionBoundCommand::InitMenuL");
|
|
422 |
aMenu.SetItemTextL( KGlxEditBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_EDIT );
|
|
423 |
aMenu.SetItemDimmed( KGlxEditBoundMenuCommandId, EFalse );
|
|
424 |
}
|
|
425 |
|
|
426 |
// ----------------------------------------------------------------------------
|
|
427 |
// CGlxDescriptionBoundCommand::HideLocationMenuItem
|
|
428 |
// ----------------------------------------------------------------------------
|
|
429 |
//
|
|
430 |
void CGlxDescriptionBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const
|
|
431 |
{
|
|
432 |
TRACER("CGlxDescriptionBoundCommand::HideLocationMenuItem");
|
|
433 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue );
|
|
434 |
}
|
|
435 |
|
|
436 |
// ----------------------------------------------------------------------------
|
|
437 |
// CGlxDescriptionBoundCommand::Close
|
|
438 |
// ----------------------------------------------------------------------------
|
|
439 |
//
|
|
440 |
void CGlxDescriptionBoundCommand::Close()
|
|
441 |
{
|
|
442 |
delete this;
|
|
443 |
}
|
|
444 |
|
|
445 |
// ----------------------------------------------------------------------------
|
|
446 |
// CGlxDescriptionBoundCommand::ChangeMskL
|
|
447 |
// ----------------------------------------------------------------------------
|
|
448 |
//
|
|
449 |
void CGlxDescriptionBoundCommand::ChangeMskL()
|
|
450 |
{
|
|
451 |
TRACER("CGlxDescriptionBoundCommand::ChangeMskL");
|
|
452 |
|
|
453 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
|
|
454 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
|
|
455 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_EDIT);
|
|
456 |
if ( uiUtility )
|
|
457 |
{
|
|
458 |
uiUtility->Close();
|
|
459 |
}
|
|
460 |
}
|
|
461 |
|
|
462 |
// ----------------------------------------------------------------------------
|
|
463 |
// CGlxDescriptionBoundCommand::SetDetailsDailogObserver
|
|
464 |
// ----------------------------------------------------------------------------
|
|
465 |
//
|
|
466 |
void CGlxDescriptionBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ )
|
|
467 |
{
|
|
468 |
|
|
469 |
}
|
|
470 |
|
|
471 |
|
|
472 |
// -----------------------------------------------------------------------------
|
|
473 |
// CGlxDescriptionBoundCommand::ModifyDescriptionL
|
|
474 |
// -----------------------------------------------------------------------------
|
|
475 |
//
|
|
476 |
void CGlxDescriptionBoundCommand::ModifyDescriptionL(const TDesC& aData )
|
|
477 |
{
|
|
478 |
TRACER("CGlxDescriptionBoundCommand::ModifyDescriptionL");
|
|
479 |
if( iMedialist->Count() > 0 )
|
|
480 |
{
|
|
481 |
iMedialist->SetFocusL(NGlxListDefs::EAbsolute,0);//set focus to first item
|
|
482 |
CMPXCollectionPath* path = iMedialist->PathLC();
|
|
483 |
CMPXCommand* command = TGlxCommandFactory::SetDescriptionCommandLC(aData,*path);
|
|
484 |
command->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId, static_cast<TAny*>(this));
|
|
485 |
|
|
486 |
iMedialist->CommandL(*command);
|
|
487 |
CleanupStack::PopAndDestroy(command);
|
|
488 |
CleanupStack::PopAndDestroy(path);
|
|
489 |
}
|
|
490 |
}
|
|
491 |
|
|
492 |
// ----------------------------------------------------------------------------
|
|
493 |
// CGlxLocationBoundCommand::NewL
|
|
494 |
// ----------------------------------------------------------------------------
|
|
495 |
//
|
|
496 |
EXPORT_C CGlxLocationBoundCommand* CGlxLocationBoundCommand::NewL()
|
|
497 |
{
|
|
498 |
TRACER("CGlxLocationBoundCommand::NewL");
|
|
499 |
CGlxLocationBoundCommand* self = CGlxLocationBoundCommand::NewLC();
|
|
500 |
CleanupStack::Pop( self );
|
|
501 |
return self;
|
|
502 |
}
|
|
503 |
|
|
504 |
// ----------------------------------------------------------------------------
|
|
505 |
// CGlxLocationBoundCommand::NewLC
|
|
506 |
// ----------------------------------------------------------------------------
|
|
507 |
//
|
|
508 |
CGlxLocationBoundCommand* CGlxLocationBoundCommand::NewLC()
|
|
509 |
{
|
|
510 |
TRACER("CGlxLocationBoundCommand::NewLC");
|
|
511 |
CGlxLocationBoundCommand* self = new ( ELeave ) CGlxLocationBoundCommand;
|
|
512 |
CleanupStack::PushL( self );
|
|
513 |
return self;
|
|
514 |
}
|
|
515 |
|
|
516 |
CGlxLocationBoundCommand::~CGlxLocationBoundCommand()
|
|
517 |
{
|
|
518 |
iDialogObserver = NULL ;
|
|
519 |
}
|
|
520 |
|
|
521 |
// ----------------------------------------------------------------------------
|
|
522 |
// CGlxLocationBoundCommand::OfferCommandL
|
|
523 |
// ----------------------------------------------------------------------------
|
|
524 |
//
|
|
525 |
TBool CGlxLocationBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist )
|
|
526 |
{
|
|
527 |
TRACER("CGlxLocationBoundCommand::OfferCommandL");
|
|
528 |
iMedialist = &aMedialist;
|
|
529 |
TBool consumed = EFalse;
|
|
530 |
if ( aCommandId == KGlxEditBoundMenuCommandId )
|
|
531 |
{
|
|
532 |
iOnNaviKeySelect = ETrue;
|
|
533 |
//get the media item
|
|
534 |
const TGlxMedia& media = iMedialist->Item( 0 );
|
|
535 |
// Test to see if the coordinate is present
|
|
536 |
TCoordinate coordinate;
|
|
537 |
TBool isSupported = media.GetCoordinate(coordinate);
|
|
538 |
if(!isSupported)
|
|
539 |
{
|
|
540 |
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_NOTE_INFO_NO_LOCATION);
|
|
541 |
GlxGeneralUiUtilities::ShowInfoNoteL(*buf,ETrue);
|
|
542 |
CleanupStack::PopAndDestroy(buf);
|
|
543 |
consumed = ETrue;
|
|
544 |
}
|
|
545 |
else
|
|
546 |
{
|
|
547 |
/** Show menu pane options **/
|
|
548 |
if(iDialogObserver)
|
|
549 |
{
|
|
550 |
TRAP_IGNORE(iDialogObserver->OnLocationEditL());
|
|
551 |
}
|
|
552 |
}
|
|
553 |
}
|
|
554 |
else
|
|
555 |
{
|
|
556 |
iOnNaviKeySelect = EFalse;
|
|
557 |
}
|
|
558 |
if ( aCommandId == KGlxDeleteBoundMenuCommandId )
|
|
559 |
{
|
|
560 |
RemoveLocationL();
|
|
561 |
consumed = ETrue;
|
|
562 |
}
|
|
563 |
return consumed;
|
|
564 |
}
|
|
565 |
|
|
566 |
// ----------------------------------------------------------------------------
|
|
567 |
// CGlxLocationBoundCommand::InitMenuL
|
|
568 |
// ----------------------------------------------------------------------------
|
|
569 |
//
|
|
570 |
void CGlxLocationBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const
|
|
571 |
{
|
|
572 |
TRACER("CGlxLocationBoundCommand::InitMenuL");
|
|
573 |
aMenu.SetItemTextL( EGlxCmdAiwShowMap, R_GLX_METADATA_SHOW_ON_MAP_OPTIONS_VIEW );
|
|
574 |
aMenu.SetItemDimmed( EGlxCmdAiwShowMap, EFalse );
|
|
575 |
aMenu.SetItemTextL( KGlxDeleteBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_DELETE );
|
|
576 |
aMenu.SetItemDimmed( KGlxDeleteBoundMenuCommandId, EFalse );
|
|
577 |
if( iOnNaviKeySelect )
|
|
578 |
{
|
|
579 |
aMenu.SetItemDimmed( EAknCmdHelp, ETrue );
|
|
580 |
}
|
|
581 |
}
|
|
582 |
|
|
583 |
// ----------------------------------------------------------------------------
|
|
584 |
// CGlxLocationBoundCommand::HideLocationMenuItem
|
|
585 |
// ----------------------------------------------------------------------------
|
|
586 |
//
|
|
587 |
void CGlxLocationBoundCommand::HideLocationMenuItem(CEikMenuPane& /*aMenu*/) const
|
|
588 |
{
|
|
589 |
TRACER("CGlxLocationBoundCommand::HideLocationMenuItem");
|
|
590 |
}
|
|
591 |
|
|
592 |
// ----------------------------------------------------------------------------
|
|
593 |
// CGlxLocationBoundCommand::Close
|
|
594 |
// ----------------------------------------------------------------------------
|
|
595 |
//
|
|
596 |
void CGlxLocationBoundCommand::Close()
|
|
597 |
{
|
|
598 |
delete this;
|
|
599 |
}
|
|
600 |
|
|
601 |
// ----------------------------------------------------------------------------
|
|
602 |
// CGlxLocationBoundCommand::ChangeMskL
|
|
603 |
// ----------------------------------------------------------------------------
|
|
604 |
//
|
|
605 |
void CGlxLocationBoundCommand::ChangeMskL()
|
|
606 |
{
|
|
607 |
TRACER("CGlxLocationBoundCommand::ChangeMskL");
|
|
608 |
|
|
609 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
|
|
610 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
|
|
611 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_BLANK);
|
|
612 |
if ( uiUtility )
|
|
613 |
{
|
|
614 |
uiUtility->Close();
|
|
615 |
}
|
|
616 |
}
|
|
617 |
|
|
618 |
// -----------------------------------------------------------------------------
|
|
619 |
// CGlxLocationBoundCommand::RemoveLocationL
|
|
620 |
// -----------------------------------------------------------------------------
|
|
621 |
//
|
|
622 |
void CGlxLocationBoundCommand::RemoveLocationL()
|
|
623 |
{
|
|
624 |
TRACER("CGlxLocationBoundCommand::RemoveLocationL");
|
|
625 |
|
|
626 |
// get the media item
|
|
627 |
const TGlxMedia& media = iMedialist->Item( 0 );
|
|
628 |
|
|
629 |
// Test to see if the coordinate is present
|
|
630 |
TCoordinate coordinate;
|
|
631 |
TBool isSupported = media.GetCoordinate(coordinate);
|
|
632 |
|
|
633 |
if( !isSupported )
|
|
634 |
{
|
|
635 |
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_NOTE_INFO_NO_LOCATION);
|
|
636 |
GlxGeneralUiUtilities::ShowInfoNoteL(*buf,ETrue);
|
|
637 |
CleanupStack::PopAndDestroy(buf);
|
|
638 |
}
|
|
639 |
else
|
|
640 |
{
|
|
641 |
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_NOTE_DELETE_LOCATION);
|
|
642 |
TBool response = GlxGeneralUiUtilities::ConfirmQueryL(R_GLX_QUERY_YES_NO,*buf);
|
|
643 |
CleanupStack::PopAndDestroy(buf);
|
|
644 |
|
|
645 |
if( response )
|
|
646 |
{
|
|
647 |
//user selected yes, so delete location
|
|
648 |
//send command for delete location after successfull removal of command remove this pane
|
|
649 |
if( iMedialist->Count() > 0 )
|
|
650 |
{
|
|
651 |
iMedialist->SetFocusL(NGlxListDefs::EAbsolute,0);//set focus to first item
|
|
652 |
|
|
653 |
// Deleting location information from image file
|
|
654 |
|
|
655 |
RFs rFs;
|
|
656 |
User::LeaveIfError( rFs.Connect() );
|
|
657 |
CleanupClosePushL( rFs );
|
|
658 |
RFile rFile;
|
|
659 |
|
|
660 |
User::LeaveIfError( rFile.Open(rFs,iMedialist->Item(0).Uri(),EFileWrite ));
|
|
661 |
CleanupClosePushL( rFile );
|
|
662 |
|
|
663 |
TInt imageFileSize = 0; // Image File Size
|
|
664 |
User::LeaveIfError( rFile.Size( imageFileSize ) );
|
|
665 |
HBufC8* imageData = HBufC8::NewL( imageFileSize ); //Actual Image Data
|
|
666 |
CleanupStack::PushL( imageData );
|
|
667 |
|
|
668 |
TPtr8 myImagePtr = imageData->Des();
|
|
669 |
TInt readError = rFile.Read( myImagePtr );
|
|
670 |
if ( readError != KErrNone )
|
|
671 |
{
|
|
672 |
User::Leave( KErrGeneral );
|
|
673 |
}
|
|
674 |
|
|
675 |
//CExifModify Interface class for modifying existing Exif v2.2 (or prior)
|
|
676 |
//file format or creating Exif v2.2 file format using valid Jpeg image
|
|
677 |
CExifModify* exifWriter = CExifModify::NewL( imageData->Des(), CExifModify::EModify, CExifModify::ENoJpegParsing );
|
|
678 |
CleanupStack::PushL( exifWriter );
|
|
679 |
//Removes the specified IFD structure and all its tags from the Exif data
|
|
680 |
exifWriter->DeleteIfd ( EIfdGps );
|
|
681 |
|
|
682 |
HBufC8* modifiedExif = exifWriter->WriteDataL( imageData->Des() ); //Modified Image Data
|
|
683 |
CleanupStack::PushL( modifiedExif );
|
|
684 |
|
|
685 |
const TUint32 fileSize = modifiedExif->Des().Length(); //Size of Modified File
|
|
686 |
TInt oldSize;
|
|
687 |
rFile.Size( oldSize );
|
|
688 |
// set position to begin of file & write the Modified data (Without Location Information)
|
|
689 |
TInt pos = 0;
|
|
690 |
User::LeaveIfError( rFile.Seek( ESeekStart, pos ) );
|
|
691 |
User::LeaveIfError( rFile.Write( modifiedExif->Des(), fileSize ) );
|
|
692 |
|
|
693 |
TTime lastModified;
|
|
694 |
lastModified.UniversalTime();
|
|
695 |
|
|
696 |
User::LeaveIfError( rFile.SetModified( lastModified ) ); //Change the Modified Time
|
|
697 |
|
|
698 |
CleanupStack::PopAndDestroy( modifiedExif);
|
|
699 |
CleanupStack::PopAndDestroy( exifWriter);
|
|
700 |
CleanupStack::PopAndDestroy( imageData );
|
|
701 |
CleanupStack::PopAndDestroy( &rFile );
|
|
702 |
CleanupStack::PopAndDestroy( &rFs );
|
|
703 |
|
|
704 |
// Deleting location information from MDS database
|
|
705 |
|
|
706 |
CMPXCollectionPath* path = iMedialist->PathLC();
|
|
707 |
CMPXCommand* command = TGlxCommandFactory::DeleteLocationCommandLC(*path);
|
|
708 |
|
|
709 |
command->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId, static_cast<TAny*>(this));
|
|
710 |
|
|
711 |
iMedialist->CommandL(*command);
|
|
712 |
|
|
713 |
CleanupStack::PopAndDestroy(command);
|
|
714 |
CleanupStack::PopAndDestroy(path);
|
|
715 |
}
|
|
716 |
}
|
|
717 |
}
|
|
718 |
}
|
|
719 |
|
|
720 |
// -----------------------------------------------------------------------------
|
|
721 |
// CGlxLocationBoundCommand::SetDetailsDailogObserver
|
|
722 |
// -----------------------------------------------------------------------------
|
|
723 |
//
|
|
724 |
void CGlxLocationBoundCommand::SetDetailsDailogObserver(MGlxMetadataDialogObserver& aObserver)
|
|
725 |
{
|
|
726 |
/** Error Id EMPY-7MKDHP **/
|
|
727 |
iDialogObserver = &aObserver ;
|
|
728 |
}
|
|
729 |
|
|
730 |
// ----------------------------------------------------------------------------
|
|
731 |
// CGlxAlbumsBoundCommand::NewL
|
|
732 |
// ----------------------------------------------------------------------------
|
|
733 |
//
|
|
734 |
EXPORT_C CGlxAlbumsBoundCommand* CGlxAlbumsBoundCommand::NewL()
|
|
735 |
{
|
|
736 |
TRACER("CGlxAlbumsBoundCommand::NewL");
|
|
737 |
CGlxAlbumsBoundCommand* self = CGlxAlbumsBoundCommand::NewLC();
|
|
738 |
self->ConstructL();
|
|
739 |
CleanupStack::Pop( self );
|
|
740 |
return self;
|
|
741 |
}
|
|
742 |
|
|
743 |
// ----------------------------------------------------------------------------
|
|
744 |
// CGlxAlbumsBoundCommand::NewLC
|
|
745 |
// ----------------------------------------------------------------------------
|
|
746 |
//
|
|
747 |
CGlxAlbumsBoundCommand* CGlxAlbumsBoundCommand::NewLC()
|
|
748 |
{
|
|
749 |
TRACER("CGlxAlbumsBoundCommand::NewLC");
|
|
750 |
CGlxAlbumsBoundCommand* self = new ( ELeave ) CGlxAlbumsBoundCommand;
|
|
751 |
CleanupStack::PushL( self );
|
|
752 |
return self;
|
|
753 |
}
|
|
754 |
|
|
755 |
|
|
756 |
// ----------------------------------------------------------------------------
|
|
757 |
// CGlxAlbumsBoundCommand::ConstructL
|
|
758 |
// ----------------------------------------------------------------------------
|
|
759 |
//
|
|
760 |
void CGlxAlbumsBoundCommand::ConstructL()
|
|
761 |
{
|
|
762 |
TRACER("CGlxAlbumsBoundCommand::ConstructL");
|
|
763 |
TFileName uiutilitiesrscfile;
|
|
764 |
uiutilitiesrscfile.Append(
|
|
765 |
CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL());
|
|
766 |
//create command handler
|
|
767 |
iAddToAlbum = CGlxCommandHandlerAddToContainer::NewL(this,
|
|
768 |
EGlxCmdAddToAlbum, EFalse, uiutilitiesrscfile);
|
|
769 |
}
|
|
770 |
|
|
771 |
// ----------------------------------------------------------------------------
|
|
772 |
// CGlxAlbumsBoundCommand::~CGlxAlbumsBoundCommand
|
|
773 |
// ----------------------------------------------------------------------------
|
|
774 |
//
|
|
775 |
CGlxAlbumsBoundCommand::~CGlxAlbumsBoundCommand()
|
|
776 |
{
|
|
777 |
if(iAddToAlbum)
|
|
778 |
{
|
|
779 |
delete iAddToAlbum;
|
|
780 |
}
|
|
781 |
}
|
|
782 |
|
|
783 |
// ----------------------------------------------------------------------------
|
|
784 |
// CGlxAlbumsBoundCommand::OfferCommandL
|
|
785 |
// ----------------------------------------------------------------------------
|
|
786 |
//
|
|
787 |
TBool CGlxAlbumsBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist)
|
|
788 |
{
|
|
789 |
TRACER("CGlxAlbumsBoundCommand::OfferCommandL");
|
|
790 |
SetMediaList(&aMedialist);
|
|
791 |
TBool consumed = EFalse;
|
|
792 |
if ( aCommandId == KGlxEditBoundMenuCommandId )
|
|
793 |
{
|
|
794 |
iAddToAlbum->ExecuteL(EGlxCmdAddToAlbum);
|
|
795 |
consumed = ETrue;
|
|
796 |
}
|
|
797 |
return consumed;
|
|
798 |
}
|
|
799 |
|
|
800 |
// ----------------------------------------------------------------------------
|
|
801 |
// CGlxAlbumsBoundCommand::InitMenuL
|
|
802 |
// ----------------------------------------------------------------------------
|
|
803 |
//
|
|
804 |
void CGlxAlbumsBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const
|
|
805 |
{
|
|
806 |
TRACER("CGlxAlbumsBoundCommand::InitMenuL");
|
|
807 |
aMenu.SetItemTextL( KGlxEditBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_EDIT );
|
|
808 |
aMenu.SetItemDimmed( KGlxEditBoundMenuCommandId, EFalse );
|
|
809 |
}
|
|
810 |
|
|
811 |
// ----------------------------------------------------------------------------
|
|
812 |
// CGlxAlbumsBoundCommand::HideLocationMenuItem
|
|
813 |
// ----------------------------------------------------------------------------
|
|
814 |
//
|
|
815 |
void CGlxAlbumsBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const
|
|
816 |
{
|
|
817 |
TRACER("CGlxAlbumsBoundCommand::HideLocationMenuItem");
|
|
818 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue );
|
|
819 |
}
|
|
820 |
|
|
821 |
// ----------------------------------------------------------------------------
|
|
822 |
// CGlxAlbumsBoundCommand::Close
|
|
823 |
// ----------------------------------------------------------------------------
|
|
824 |
//
|
|
825 |
void CGlxAlbumsBoundCommand::Close()
|
|
826 |
{
|
|
827 |
delete this;
|
|
828 |
}
|
|
829 |
|
|
830 |
// ----------------------------------------------------------------------------
|
|
831 |
// CGlxAlbumsBoundCommand::ChangeMskL
|
|
832 |
// ----------------------------------------------------------------------------
|
|
833 |
//
|
|
834 |
void CGlxAlbumsBoundCommand::ChangeMskL()
|
|
835 |
{
|
|
836 |
TRACER("CGlxAlbumsBoundCommand::ChangeMskL");
|
|
837 |
|
|
838 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
|
|
839 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
|
|
840 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_ADD);
|
|
841 |
if ( uiUtility )
|
|
842 |
{
|
|
843 |
uiUtility->Close();
|
|
844 |
}
|
|
845 |
}
|
|
846 |
|
|
847 |
// ----------------------------------------------------------------------------
|
|
848 |
// CGlxAlbumsBoundCommand::SetDetailsDailogObserver
|
|
849 |
// ----------------------------------------------------------------------------
|
|
850 |
//
|
|
851 |
void CGlxAlbumsBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ )
|
|
852 |
{
|
|
853 |
|
|
854 |
}
|
|
855 |
|
|
856 |
|
|
857 |
// ----------------------------------------------------------------------------
|
|
858 |
// CGlxAlbumsBoundCommand::SetMediaList
|
|
859 |
// ----------------------------------------------------------------------------
|
|
860 |
//
|
|
861 |
void CGlxAlbumsBoundCommand::SetMediaList(MGlxMediaList* aMedialist)
|
|
862 |
{
|
|
863 |
TRACER("CGlxAlbumsBoundCommand::SetMediaList");
|
|
864 |
iMedialist = aMedialist;
|
|
865 |
}
|
|
866 |
|
|
867 |
// ----------------------------------------------------------------------------
|
|
868 |
// CGlxAlbumsBoundCommand::MediaList
|
|
869 |
// ----------------------------------------------------------------------------
|
|
870 |
//
|
|
871 |
MGlxMediaList& CGlxAlbumsBoundCommand::MediaList()
|
|
872 |
{
|
|
873 |
TRACER("CGlxAlbumsBoundCommand::MediaList");
|
|
874 |
return *iMedialist;
|
|
875 |
}
|
|
876 |
|
|
877 |
// ----------------------------------------------------------------------------
|
|
878 |
// CGlxResolutionBoundCommand::NewL
|
|
879 |
// ----------------------------------------------------------------------------
|
|
880 |
//
|
|
881 |
EXPORT_C CGlxResolutionBoundCommand* CGlxResolutionBoundCommand::NewL()
|
|
882 |
{
|
|
883 |
TRACER("CGlxResolutionBoundCommand::NewL");
|
|
884 |
CGlxResolutionBoundCommand* self = CGlxResolutionBoundCommand::NewLC();
|
|
885 |
CleanupStack::Pop( self );
|
|
886 |
return self;
|
|
887 |
}
|
|
888 |
|
|
889 |
// ----------------------------------------------------------------------------
|
|
890 |
// CGlxResolutionBoundCommand::NewLC
|
|
891 |
// ----------------------------------------------------------------------------
|
|
892 |
//
|
|
893 |
CGlxResolutionBoundCommand* CGlxResolutionBoundCommand::NewLC()
|
|
894 |
{
|
|
895 |
TRACER("CGlxResolutionBoundCommand::NewLC");
|
|
896 |
CGlxResolutionBoundCommand* self = new ( ELeave ) CGlxResolutionBoundCommand;
|
|
897 |
CleanupStack::PushL( self );
|
|
898 |
return self;
|
|
899 |
}
|
|
900 |
|
|
901 |
CGlxResolutionBoundCommand::~CGlxResolutionBoundCommand()
|
|
902 |
{
|
|
903 |
|
|
904 |
}
|
|
905 |
|
|
906 |
// ----------------------------------------------------------------------------
|
|
907 |
// CGlxResolutionBoundCommand::OfferCommandL
|
|
908 |
// ----------------------------------------------------------------------------
|
|
909 |
//
|
|
910 |
TBool CGlxResolutionBoundCommand::OfferCommandL( TInt /*aCommandId*/ , MGlxMediaList& /*aMedialist*/ )
|
|
911 |
{
|
|
912 |
TRACER("CGlxResolutionBoundCommand::OfferCommandL");
|
|
913 |
return ETrue;
|
|
914 |
}
|
|
915 |
|
|
916 |
// ----------------------------------------------------------------------------
|
|
917 |
// CGlxResolutionBoundCommand::InitMenuL
|
|
918 |
// ----------------------------------------------------------------------------
|
|
919 |
//
|
|
920 |
void CGlxResolutionBoundCommand::InitMenuL( CEikMenuPane& /*aMenu*/ ) const
|
|
921 |
{
|
|
922 |
// no implementation
|
|
923 |
}
|
|
924 |
|
|
925 |
// ----------------------------------------------------------------------------
|
|
926 |
// CGlxResolutionBoundCommand::HideLocationMenuItem
|
|
927 |
// ----------------------------------------------------------------------------
|
|
928 |
//
|
|
929 |
void CGlxResolutionBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const
|
|
930 |
{
|
|
931 |
TRACER("CGlxResolutionBoundCommand::HideLocationMenuItem");
|
|
932 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue );
|
|
933 |
}
|
|
934 |
|
|
935 |
// ----------------------------------------------------------------------------
|
|
936 |
// CGlxResolutionBoundCommand::Close
|
|
937 |
// ----------------------------------------------------------------------------
|
|
938 |
//
|
|
939 |
void CGlxResolutionBoundCommand::Close()
|
|
940 |
{
|
|
941 |
delete this;
|
|
942 |
}
|
|
943 |
|
|
944 |
// ----------------------------------------------------------------------------
|
|
945 |
// CGlxResolutionBoundCommand::ChangeMskL
|
|
946 |
// ----------------------------------------------------------------------------
|
|
947 |
//
|
|
948 |
void CGlxResolutionBoundCommand::ChangeMskL()
|
|
949 |
{
|
|
950 |
TRACER("CGlxResolutionBoundCommand::ChangeMskL");
|
|
951 |
|
|
952 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
|
|
953 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
|
|
954 |
EAknSoftkeyEmpty,R_GLX_METADATA_MSK_BLANK);
|
|
955 |
if ( uiUtility )
|
|
956 |
{
|
|
957 |
uiUtility->Close();
|
|
958 |
}
|
|
959 |
}
|
|
960 |
|
|
961 |
// ----------------------------------------------------------------------------
|
|
962 |
// CGlxResolutionBoundCommand::SetDetailsDailogObserver
|
|
963 |
// ----------------------------------------------------------------------------
|
|
964 |
//
|
|
965 |
void CGlxResolutionBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ )
|
|
966 |
{
|
|
967 |
|
|
968 |
}
|
|
969 |
|
|
970 |
// ----------------------------------------------------------------------------
|
|
971 |
// CGlxUsageRightsBoundCommand::NewL(
|
|
972 |
// ----------------------------------------------------------------------------
|
|
973 |
//
|
|
974 |
EXPORT_C CGlxUsageRightsBoundCommand* CGlxUsageRightsBoundCommand::NewL()
|
|
975 |
{
|
|
976 |
TRACER("CGlxUsageRightsBoundCommand::NewL");
|
|
977 |
CGlxUsageRightsBoundCommand* self = CGlxUsageRightsBoundCommand::NewLC();
|
|
978 |
CleanupStack::Pop( self );
|
|
979 |
return self;
|
|
980 |
}
|
|
981 |
|
|
982 |
// ----------------------------------------------------------------------------
|
|
983 |
// CGlxUsageRightsBoundCommand::NewLC
|
|
984 |
// ----------------------------------------------------------------------------
|
|
985 |
//
|
|
986 |
CGlxUsageRightsBoundCommand* CGlxUsageRightsBoundCommand::NewLC()
|
|
987 |
{
|
|
988 |
TRACER("CGlxUsageRightsBoundCommand::NewLC");
|
|
989 |
CGlxUsageRightsBoundCommand* self = new ( ELeave ) CGlxUsageRightsBoundCommand;
|
|
990 |
CleanupStack::PushL( self );
|
|
991 |
return self;
|
|
992 |
}
|
|
993 |
|
|
994 |
CGlxUsageRightsBoundCommand::~CGlxUsageRightsBoundCommand()
|
|
995 |
{
|
|
996 |
|
|
997 |
}
|
|
998 |
|
|
999 |
// ----------------------------------------------------------------------------
|
|
1000 |
// CGlxUsageRightsBoundCommand::OfferCommandL
|
|
1001 |
// ----------------------------------------------------------------------------
|
|
1002 |
//
|
|
1003 |
TBool CGlxUsageRightsBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist)
|
|
1004 |
{
|
|
1005 |
TRACER("CGlxUsageRightsBoundCommand::OfferCommandL");
|
|
1006 |
SetMediaList(&aMedialist);
|
|
1007 |
TBool consumed = EFalse;
|
|
1008 |
if ( aCommandId == KGlxViewBoundMenuCommandId || aCommandId == KGlxEditBoundMenuCommandId )
|
|
1009 |
{
|
|
1010 |
LaunchDRMViewL();
|
|
1011 |
consumed = ETrue;
|
|
1012 |
}
|
|
1013 |
return consumed;
|
|
1014 |
}
|
|
1015 |
|
|
1016 |
// ----------------------------------------------------------------------------
|
|
1017 |
// CGlxUsageRightsBoundCommand::InitMenuL
|
|
1018 |
// ----------------------------------------------------------------------------
|
|
1019 |
//
|
|
1020 |
void CGlxUsageRightsBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const
|
|
1021 |
{
|
|
1022 |
TRACER("CGlxUsageRightsBoundCommand::InitMenuL");
|
|
1023 |
aMenu.SetItemDimmed( KGlxViewBoundMenuCommandId, EFalse );
|
|
1024 |
}
|
|
1025 |
|
|
1026 |
// ----------------------------------------------------------------------------
|
|
1027 |
// CGlxUsageRightsBoundCommand::HideLocationMenuItem
|
|
1028 |
// ----------------------------------------------------------------------------
|
|
1029 |
//
|
|
1030 |
void CGlxUsageRightsBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const
|
|
1031 |
{
|
|
1032 |
TRACER("CGlxUsageRightsBoundCommand::HideLocationMenuItem");
|
|
1033 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue );
|
|
1034 |
}
|
|
1035 |
|
|
1036 |
// ----------------------------------------------------------------------------
|
|
1037 |
// CGlxUsageRightsBoundCommand::Close
|
|
1038 |
// ----------------------------------------------------------------------------
|
|
1039 |
//
|
|
1040 |
void CGlxUsageRightsBoundCommand::Close()
|
|
1041 |
{
|
|
1042 |
delete this;
|
|
1043 |
}
|
|
1044 |
|
|
1045 |
// ----------------------------------------------------------------------------
|
|
1046 |
// CGlxUsageRightsBoundCommand::ChangeMskL
|
|
1047 |
// ----------------------------------------------------------------------------
|
|
1048 |
//
|
|
1049 |
void CGlxUsageRightsBoundCommand::ChangeMskL()
|
|
1050 |
{
|
|
1051 |
TRACER("CGlxUsageRightsBoundCommand::ChangeMskL");
|
|
1052 |
|
|
1053 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
|
|
1054 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
|
|
1055 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_BLANK);
|
|
1056 |
if ( uiUtility )
|
|
1057 |
{
|
|
1058 |
uiUtility->Close();
|
|
1059 |
}
|
|
1060 |
}
|
|
1061 |
|
|
1062 |
// ----------------------------------------------------------------------------
|
|
1063 |
// CGlxUsageRightsBoundCommand::SetDetailsDailogObserver
|
|
1064 |
// ----------------------------------------------------------------------------
|
|
1065 |
//
|
|
1066 |
void CGlxUsageRightsBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ )
|
|
1067 |
{
|
|
1068 |
|
|
1069 |
}
|
|
1070 |
|
|
1071 |
// ----------------------------------------------------------------------------
|
|
1072 |
// CGlxUsageRightsBoundCommand::SetMediaList
|
|
1073 |
// ----------------------------------------------------------------------------
|
|
1074 |
//
|
|
1075 |
void CGlxUsageRightsBoundCommand::SetMediaList(MGlxMediaList* aMedialist)
|
|
1076 |
{
|
|
1077 |
TRACER("CGlxUsageRightsBoundCommand::SetMediaList");
|
|
1078 |
iMedialist = aMedialist;
|
|
1079 |
}
|
|
1080 |
|
|
1081 |
// ----------------------------------------------------------------------------
|
|
1082 |
// CGlxUsageRightsBoundCommand::MediaList
|
|
1083 |
// ----------------------------------------------------------------------------
|
|
1084 |
//
|
|
1085 |
MGlxMediaList& CGlxUsageRightsBoundCommand::MediaList()
|
|
1086 |
{
|
|
1087 |
return *iMedialist;
|
|
1088 |
}
|
|
1089 |
|
|
1090 |
// -----------------------------------------------------------------------------
|
|
1091 |
// LaunchDRMViewL
|
|
1092 |
// -----------------------------------------------------------------------------
|
|
1093 |
//
|
|
1094 |
void CGlxUsageRightsBoundCommand::LaunchDRMViewL()
|
|
1095 |
{
|
|
1096 |
TRACER("CGlxUsageRightsBoundCommand::LaunchDRMViewL");
|
|
1097 |
CGlxDRMUtility* drmUtility = CGlxDRMUtility::InstanceL();
|
|
1098 |
CleanupClosePushL(*drmUtility);
|
|
1099 |
TInt count = MediaList().Count();
|
|
1100 |
if( count > 0)
|
|
1101 |
{
|
|
1102 |
const CGlxMedia* media = MediaList().Item(0).Properties();
|
|
1103 |
const TDesC& uri = media->ValueText(KMPXMediaGeneralUri);
|
|
1104 |
drmUtility->ShowDRMDetailsPaneL(uri);
|
|
1105 |
}
|
|
1106 |
CleanupStack::PopAndDestroy(drmUtility);
|
|
1107 |
}
|
|
1108 |
|
|
1109 |
// ----------------------------------------------------------------------------
|
|
1110 |
// CGlxDurationBoundCommand::NewL
|
|
1111 |
// ----------------------------------------------------------------------------
|
|
1112 |
//
|
|
1113 |
EXPORT_C CGlxDurationBoundCommand* CGlxDurationBoundCommand::NewL()
|
|
1114 |
{
|
|
1115 |
TRACER("CGlxDurationBoundCommand::NewL");
|
|
1116 |
CGlxDurationBoundCommand* self = CGlxDurationBoundCommand::NewLC();
|
|
1117 |
CleanupStack::Pop( self );
|
|
1118 |
return self;
|
|
1119 |
}
|
|
1120 |
|
|
1121 |
// ----------------------------------------------------------------------------
|
|
1122 |
// CGlxDurationBoundCommand::NewLC
|
|
1123 |
// ----------------------------------------------------------------------------
|
|
1124 |
//
|
|
1125 |
CGlxDurationBoundCommand* CGlxDurationBoundCommand::NewLC()
|
|
1126 |
{
|
|
1127 |
TRACER("CGlxDurationBoundCommand::NewLC");
|
|
1128 |
CGlxDurationBoundCommand* self = new ( ELeave ) CGlxDurationBoundCommand;
|
|
1129 |
CleanupStack::PushL( self );
|
|
1130 |
return self;
|
|
1131 |
}
|
|
1132 |
|
|
1133 |
CGlxDurationBoundCommand::~CGlxDurationBoundCommand()
|
|
1134 |
{
|
|
1135 |
|
|
1136 |
}
|
|
1137 |
// ----------------------------------------------------------------------------
|
|
1138 |
// CGlxDurationBoundCommand::OfferCommandL
|
|
1139 |
// ----------------------------------------------------------------------------
|
|
1140 |
//
|
|
1141 |
TBool CGlxDurationBoundCommand::OfferCommandL( TInt /*aCommandId*/ , MGlxMediaList& /*aMedialist*/ )
|
|
1142 |
{
|
|
1143 |
TRACER("CGlxDurationBoundCommand::OfferCommandL");
|
|
1144 |
return ETrue;
|
|
1145 |
}
|
|
1146 |
|
|
1147 |
// ----------------------------------------------------------------------------
|
|
1148 |
// CGlxDurationBoundCommand::InitMenuL
|
|
1149 |
// ----------------------------------------------------------------------------
|
|
1150 |
//
|
|
1151 |
void CGlxDurationBoundCommand::InitMenuL( CEikMenuPane& /*aMenu*/ ) const
|
|
1152 |
{
|
|
1153 |
// no implementation
|
|
1154 |
}
|
|
1155 |
|
|
1156 |
// ----------------------------------------------------------------------------
|
|
1157 |
// CGlxDurationBoundCommand::HideLocationMenuItem
|
|
1158 |
// ----------------------------------------------------------------------------
|
|
1159 |
//
|
|
1160 |
void CGlxDurationBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const
|
|
1161 |
{
|
|
1162 |
TRACER("CGlxDurationBoundCommand::HideLocationMenuItem");
|
|
1163 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue );
|
|
1164 |
}
|
|
1165 |
|
|
1166 |
// ----------------------------------------------------------------------------
|
|
1167 |
// CGlxDurationBoundCommand::Close
|
|
1168 |
// ----------------------------------------------------------------------------
|
|
1169 |
//
|
|
1170 |
void CGlxDurationBoundCommand::Close()
|
|
1171 |
{
|
|
1172 |
delete this;
|
|
1173 |
}
|
|
1174 |
|
|
1175 |
// ----------------------------------------------------------------------------
|
|
1176 |
// CGlxDurationBoundCommand::ChangeMskL
|
|
1177 |
// ----------------------------------------------------------------------------
|
|
1178 |
//
|
|
1179 |
void CGlxDurationBoundCommand::ChangeMskL()
|
|
1180 |
{
|
|
1181 |
TRACER("CGlxDurationBoundCommand::ChangeMskL");
|
|
1182 |
|
|
1183 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
|
|
1184 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
|
|
1185 |
EAknSoftkeyEmpty,R_GLX_METADATA_MSK_BLANK);
|
|
1186 |
|
|
1187 |
if ( uiUtility )
|
|
1188 |
{
|
|
1189 |
uiUtility->Close();
|
|
1190 |
}
|
|
1191 |
}
|
|
1192 |
|
|
1193 |
// ----------------------------------------------------------------------------
|
|
1194 |
// CGlxDurationBoundCommand::SetDetailsDailogObserver
|
|
1195 |
// ----------------------------------------------------------------------------
|
|
1196 |
//
|
|
1197 |
void CGlxDurationBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ )
|
|
1198 |
{
|
|
1199 |
|
|
1200 |
}
|
|
1201 |
|
|
1202 |
|
|
1203 |
// ----------------------------------------------------------------------------
|
|
1204 |
// CGlxDateAndTimeBoundCommand::NewL
|
|
1205 |
// ----------------------------------------------------------------------------
|
|
1206 |
//
|
|
1207 |
EXPORT_C CGlxDateAndTimeBoundCommand* CGlxDateAndTimeBoundCommand::NewL()
|
|
1208 |
{
|
|
1209 |
TRACER("CGlxDateAndTimeBoundCommand::NewL");
|
|
1210 |
CGlxDateAndTimeBoundCommand* self = CGlxDateAndTimeBoundCommand::NewLC();
|
|
1211 |
CleanupStack::Pop( self );
|
|
1212 |
return self;
|
|
1213 |
}
|
|
1214 |
|
|
1215 |
// ----------------------------------------------------------------------------
|
|
1216 |
// CGlxDateAndTimeBoundCommand::NewLC
|
|
1217 |
// ----------------------------------------------------------------------------
|
|
1218 |
//
|
|
1219 |
CGlxDateAndTimeBoundCommand* CGlxDateAndTimeBoundCommand::NewLC()
|
|
1220 |
{
|
|
1221 |
TRACER("CGlxDateAndTimeBoundCommand::NewLC");
|
|
1222 |
CGlxDateAndTimeBoundCommand* self = new ( ELeave ) CGlxDateAndTimeBoundCommand;
|
|
1223 |
CleanupStack::PushL( self );
|
|
1224 |
return self;
|
|
1225 |
}
|
|
1226 |
|
|
1227 |
CGlxDateAndTimeBoundCommand::~CGlxDateAndTimeBoundCommand()
|
|
1228 |
{
|
|
1229 |
|
|
1230 |
}
|
|
1231 |
// ----------------------------------------------------------------------------
|
|
1232 |
// CGlxDateAndTimeBoundCommand::OfferCommandL
|
|
1233 |
// ----------------------------------------------------------------------------
|
|
1234 |
//
|
|
1235 |
TBool CGlxDateAndTimeBoundCommand::OfferCommandL( TInt /*aCommandId*/ , MGlxMediaList& /*aMedialist*/ )
|
|
1236 |
{
|
|
1237 |
TRACER("CGlxDateAndTimeBoundCommand::OfferCommandL");
|
|
1238 |
return ETrue;
|
|
1239 |
}
|
|
1240 |
|
|
1241 |
// ----------------------------------------------------------------------------
|
|
1242 |
// CGlxDateAndTimeBoundCommand::InitMenuL
|
|
1243 |
// ----------------------------------------------------------------------------
|
|
1244 |
//
|
|
1245 |
void CGlxDateAndTimeBoundCommand::InitMenuL( CEikMenuPane& /*aMenu*/ ) const
|
|
1246 |
{
|
|
1247 |
// no implementation
|
|
1248 |
}
|
|
1249 |
|
|
1250 |
// ----------------------------------------------------------------------------
|
|
1251 |
// CGlxDateAndTimeBoundCommand::HideLocationMenuItem
|
|
1252 |
// ----------------------------------------------------------------------------
|
|
1253 |
//
|
|
1254 |
void CGlxDateAndTimeBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const
|
|
1255 |
{
|
|
1256 |
TRACER("CGlxDateAndTimeBoundCommand::HideLocationMenuItem");
|
|
1257 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue );
|
|
1258 |
}
|
|
1259 |
|
|
1260 |
// ----------------------------------------------------------------------------
|
|
1261 |
// CGlxDateAndTimeBoundCommand::Close
|
|
1262 |
// ----------------------------------------------------------------------------
|
|
1263 |
//
|
|
1264 |
void CGlxDateAndTimeBoundCommand::Close()
|
|
1265 |
{
|
|
1266 |
delete this;
|
|
1267 |
}
|
|
1268 |
|
|
1269 |
// ----------------------------------------------------------------------------
|
|
1270 |
// CGlxDateAndTimeBoundCommand::ChangeMskL
|
|
1271 |
// ----------------------------------------------------------------------------
|
|
1272 |
//
|
|
1273 |
void CGlxDateAndTimeBoundCommand::ChangeMskL()
|
|
1274 |
{
|
|
1275 |
TRACER("CGlxDateAndTimeBoundCommand::ChangeMskL");
|
|
1276 |
|
|
1277 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
|
|
1278 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
|
|
1279 |
EAknSoftkeyEmpty,R_GLX_METADATA_MSK_BLANK);
|
|
1280 |
if ( uiUtility )
|
|
1281 |
{
|
|
1282 |
uiUtility->Close();
|
|
1283 |
}
|
|
1284 |
}
|
|
1285 |
|
|
1286 |
// ----------------------------------------------------------------------------
|
|
1287 |
// CGlxDateAndTimeBoundCommand::SetDetailsDailogObserver
|
|
1288 |
// ----------------------------------------------------------------------------
|
|
1289 |
//
|
|
1290 |
void CGlxDateAndTimeBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ )
|
|
1291 |
{
|
|
1292 |
|
|
1293 |
}
|
|
1294 |
|
|
1295 |
// ----------------------------------------------------------------------------
|
|
1296 |
// CGlxFileSizeBoundCommand::NewL
|
|
1297 |
// ----------------------------------------------------------------------------
|
|
1298 |
//
|
|
1299 |
EXPORT_C CGlxFileSizeBoundCommand* CGlxFileSizeBoundCommand::NewL()
|
|
1300 |
{
|
|
1301 |
TRACER("CGlxFileSizeBoundCommand::NewL");
|
|
1302 |
CGlxFileSizeBoundCommand* self = CGlxFileSizeBoundCommand::NewLC();
|
|
1303 |
CleanupStack::Pop( self );
|
|
1304 |
return self;
|
|
1305 |
}
|
|
1306 |
|
|
1307 |
// ----------------------------------------------------------------------------
|
|
1308 |
// CGlxFileSizeBoundCommand::NewLC
|
|
1309 |
// ----------------------------------------------------------------------------
|
|
1310 |
//
|
|
1311 |
CGlxFileSizeBoundCommand* CGlxFileSizeBoundCommand::NewLC()
|
|
1312 |
{
|
|
1313 |
TRACER("CGlxFileSizeBoundCommand::NewLC");
|
|
1314 |
CGlxFileSizeBoundCommand* self = new ( ELeave ) CGlxFileSizeBoundCommand;
|
|
1315 |
CleanupStack::PushL( self );
|
|
1316 |
return self;
|
|
1317 |
}
|
|
1318 |
|
|
1319 |
CGlxFileSizeBoundCommand::~CGlxFileSizeBoundCommand()
|
|
1320 |
{
|
|
1321 |
|
|
1322 |
}
|
|
1323 |
|
|
1324 |
// ----------------------------------------------------------------------------
|
|
1325 |
// CGlxFileSizeBoundCommand::OfferCommandL
|
|
1326 |
// ----------------------------------------------------------------------------
|
|
1327 |
//
|
|
1328 |
TBool CGlxFileSizeBoundCommand::OfferCommandL( TInt /*aCommandId*/ , MGlxMediaList& /*aMedialist*/ )
|
|
1329 |
{
|
|
1330 |
TRACER("CGlxFileSizeBoundCommand::OfferCommandL");
|
|
1331 |
return ETrue;
|
|
1332 |
}
|
|
1333 |
|
|
1334 |
// ----------------------------------------------------------------------------
|
|
1335 |
// CGlxFileSizeBoundCommand::InitMenuL
|
|
1336 |
// ----------------------------------------------------------------------------
|
|
1337 |
//
|
|
1338 |
void CGlxFileSizeBoundCommand::InitMenuL( CEikMenuPane& /*aMenu*/ ) const
|
|
1339 |
{
|
|
1340 |
// no implementation
|
|
1341 |
}
|
|
1342 |
|
|
1343 |
// ----------------------------------------------------------------------------
|
|
1344 |
// CGlxFileSizeBoundCommand::HideLocationMenuItem
|
|
1345 |
// ----------------------------------------------------------------------------
|
|
1346 |
//
|
|
1347 |
void CGlxFileSizeBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const
|
|
1348 |
{
|
|
1349 |
TRACER("CGlxFileSizeBoundCommand::HideLocationMenuItem");
|
|
1350 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue );
|
|
1351 |
}
|
|
1352 |
|
|
1353 |
// ----------------------------------------------------------------------------
|
|
1354 |
// CGlxFileSizeBoundCommand::Close
|
|
1355 |
// ----------------------------------------------------------------------------
|
|
1356 |
//
|
|
1357 |
void CGlxFileSizeBoundCommand::Close()
|
|
1358 |
{
|
|
1359 |
delete this;
|
|
1360 |
}
|
|
1361 |
|
|
1362 |
// ----------------------------------------------------------------------------
|
|
1363 |
// CGlxFileSizeBoundCommand::ChangeMskL
|
|
1364 |
// ----------------------------------------------------------------------------
|
|
1365 |
//
|
|
1366 |
void CGlxFileSizeBoundCommand::ChangeMskL()
|
|
1367 |
{
|
|
1368 |
TRACER("CGlxFileSizeBoundCommand::ChangeMskL");
|
|
1369 |
|
|
1370 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
|
|
1371 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
|
|
1372 |
EAknSoftkeyEmpty,R_GLX_METADATA_MSK_BLANK);
|
|
1373 |
if ( uiUtility )
|
|
1374 |
{
|
|
1375 |
uiUtility->Close();
|
|
1376 |
}
|
|
1377 |
}
|
|
1378 |
|
|
1379 |
// ----------------------------------------------------------------------------
|
|
1380 |
// CGlxFileSizeBoundCommand::SetDetailsDailogObserver
|
|
1381 |
// ----------------------------------------------------------------------------
|
|
1382 |
//
|
|
1383 |
void CGlxFileSizeBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ )
|
|
1384 |
{
|
|
1385 |
|
|
1386 |
}
|
|
1387 |
|