|
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 Metadata dialog |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "glxmetadatacommandhandler.h" |
|
22 |
|
23 #include <mglxmedialist.h> |
|
24 #include <glxtracer.h> |
|
25 #include <glxcommandhandleraiwshowmap.h> |
|
26 #include <glxcommandhandlers.hrh> |
|
27 #include <glxmetadatadialog.rsg> |
|
28 |
|
29 |
|
30 //----------------------------------------------------------------------------- |
|
31 // C++ default constructor. |
|
32 //----------------------------------------------------------------------------- |
|
33 CGlxMetadataCommandHandler::CGlxMetadataCommandHandler( |
|
34 MGlxMediaListProvider* aMediaListProvider): |
|
35 CGlxMediaListCommandHandler( aMediaListProvider ) |
|
36 { |
|
37 TRACER("CGlxMetadataCommandHandler::CGlxMetadataCommandHandler"); |
|
38 |
|
39 iMediaListProvider = aMediaListProvider; |
|
40 } |
|
41 |
|
42 //----------------------------------------------------------------------------- |
|
43 // Two-phased constructor. |
|
44 //----------------------------------------------------------------------------- |
|
45 CGlxMetadataCommandHandler* CGlxMetadataCommandHandler::NewL( |
|
46 MGlxMediaListProvider* aMediaListProvider) |
|
47 { |
|
48 TRACER("CGlxMetadataCommandHandler::NewL"); |
|
49 |
|
50 CGlxMetadataCommandHandler* self = new( ELeave ) |
|
51 CGlxMetadataCommandHandler(aMediaListProvider); |
|
52 CleanupStack::PushL( self ); |
|
53 self->ConstructL(); |
|
54 CleanupStack::Pop(self); |
|
55 return self; |
|
56 } |
|
57 |
|
58 // --------------------------------------------------------------------------- |
|
59 // ConstructL() |
|
60 // --------------------------------------------------------------------------- |
|
61 void CGlxMetadataCommandHandler::ConstructL() |
|
62 { |
|
63 TRACER("CGlxMetadataCommandHandler::ConstructL"); |
|
64 |
|
65 iShowOnMapCmdHandler = CGlxCommandHandlerAiwShowMap::NewL(iMediaListProvider, R_METADATA_MENU); |
|
66 } |
|
67 |
|
68 //----------------------------------------------------------------------------- |
|
69 // Destructor |
|
70 //----------------------------------------------------------------------------- |
|
71 CGlxMetadataCommandHandler::~CGlxMetadataCommandHandler() |
|
72 { |
|
73 TRACER("CGlxMetadataCommandHandler::~CGlxMetadataCommandHandler"); |
|
74 |
|
75 delete iShowOnMapCmdHandler; |
|
76 } |
|
77 |
|
78 //----------------------------------------------------------------------------- |
|
79 // DoExecuteL |
|
80 //----------------------------------------------------------------------------- |
|
81 TBool CGlxMetadataCommandHandler::DoExecuteL(TInt aCommandId, MGlxMediaList&/* aList*/) |
|
82 { |
|
83 TRACER("CGlxMetadataCommandHandler::DoExecuteL"); |
|
84 |
|
85 TBool ret = iShowOnMapCmdHandler->ExecuteL( aCommandId ); |
|
86 return ret; |
|
87 } |
|
88 |
|
89 //----------------------------------------------------------------------------- |
|
90 // OfferKeyEventL |
|
91 //----------------------------------------------------------------------------- |
|
92 TKeyResponse CGlxMetadataCommandHandler::OfferKeyEventL(const TKeyEvent& /*aKeyEvent*/, |
|
93 TEventCode /*aType*/) |
|
94 { |
|
95 return EKeyWasNotConsumed; |
|
96 } |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // DynInitMenuPaneL |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 void CGlxMetadataCommandHandler::PreDynInitMenuPaneL( TInt aResourceId ) |
|
103 { |
|
104 TRACER("CGlxMetadataCommandHandler::PreDynInitMenuPaneL"); |
|
105 iShowOnMapCmdHandler->PreDynInitMenuPaneL(aResourceId); |
|
106 } |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // DynInitMenuPaneL |
|
110 // ----------------------------------------------------------------------------- |
|
111 // |
|
112 void CGlxMetadataCommandHandler::DynInitMenuPaneL( TInt aMenuId, CEikMenuPane* aMenuPane ) |
|
113 { |
|
114 TRACER("CGlxMetadataCommandHandler::DynInitMenuPaneL"); |
|
115 |
|
116 iShowOnMapCmdHandler->DynInitMenuPaneL(aMenuId,aMenuPane); |
|
117 } |