photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowonmaphardkey.cpp
branchRCL_3
changeset 26 5b3385a43d68
equal deleted inserted replaced
25:8e5f6eea9c9f 26:5b3385a43d68
       
     1 /*
       
     2 * Copyright (c) 2006 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:    Applications interface class to map and navigation use cases
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include "glxcommandhandleraiwshowonmaphardkey.h"
       
    23 
       
    24 #include <data_caging_path_literals.hrh>
       
    25 #include <epos_poslandmarkserialization.h>
       
    26 #include <EPos_CPosLandmark.h>
       
    27 #include <StringLoader.h>
       
    28 #include <glxuiutilities.rsg>
       
    29 #include <glxgeneraluiutilities.h>
       
    30 #include <glxcommandhandlers.hrh>           
       
    31 #include <mnaiwservices.h>
       
    32 #include <mnmapview.h>
       
    33 #include <glxtracer.h>
       
    34 #include <mglxmedialist.h>                  // for accessing the media items
       
    35 
       
    36 
       
    37 
       
    38 // ============================ MEMBER FUNCTIONS ===============================
       
    39 
       
    40 // -----------------------------------------------------------------------------
       
    41 // CGlxCommandHandlerAiwShowMapHardKey()
       
    42 // -----------------------------------------------------------------------------
       
    43 CGlxCommandHandlerAiwShowMapHardKey::CGlxCommandHandlerAiwShowMapHardKey(MGlxMediaListProvider* 
       
    44         aMediaListProvider, TBool aHasToolbarItem)
       
    45         :CGlxMediaListCommandHandler(aMediaListProvider,aHasToolbarItem)
       
    46 	{	
       
    47 	TRACER("CGlxCommandHandlerAiwShowMapHardKey::CGlxCommandHandlerAiwShowMapHardKey()");
       
    48 	// No Implementation
       
    49 	}
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // CGlxCommandHandlerAiwShowMapHardKey::ConstructL
       
    53 // -----------------------------------------------------------------------------
       
    54 void CGlxCommandHandlerAiwShowMapHardKey::ConstructL()
       
    55 	{
       
    56 	TRACER("CGlxCommandHandlerAiwShowMapHardKey::ConstructL()");
       
    57 	iAiwServiceHandler = CAiwServiceHandler::NewL();
       
    58     iAiwServiceHandler->AttachL( R_GLX_AIW_SHOWMAP_INTEREST_HARDKEY );
       
    59     
       
    60 	iInList = CAiwGenericParamList::NewL();
       
    61     iOutList = CAiwGenericParamList::NewL();  
       
    62     
       
    63     // Add the upload command
       
    64     TCommandInfo info(KGlxCmdMnShowMap);
       
    65     AddCommandL(info);  
       
    66 	}
       
    67 
       
    68 // -----------------------------------------------------------------------------
       
    69 // CGlxCommandHandlerAiwShowMapHardKey::NewL
       
    70 // -----------------------------------------------------------------------------
       
    71 EXPORT_C CGlxCommandHandlerAiwShowMapHardKey* CGlxCommandHandlerAiwShowMapHardKey::
       
    72     NewL(MGlxMediaListProvider* aMediaListProvider, TBool aHasToolbarItem)
       
    73 	{	
       
    74 	TRACER("CGlxCommandHandlerAiwShowMapHardKey::NewL()");
       
    75 	CGlxCommandHandlerAiwShowMapHardKey* self = new (ELeave) CGlxCommandHandlerAiwShowMapHardKey(
       
    76                     aMediaListProvider,aHasToolbarItem);
       
    77 	CleanupStack::PushL( self );
       
    78 	self->ConstructL();
       
    79 	CleanupStack::Pop(self);
       
    80 	return self;
       
    81 	}
       
    82 	
       
    83 // -----------------------------------------------------------------------------
       
    84 // ~CGlxCommandHandlerAiwShowMapHardKey
       
    85 // C++ Destructor
       
    86 // -----------------------------------------------------------------------------
       
    87  CGlxCommandHandlerAiwShowMapHardKey::~CGlxCommandHandlerAiwShowMapHardKey()
       
    88 	{	
       
    89 	TRACER("CGlxCommandHandlerAiwShowMapHardKey::~CGlxCommandHandlerAiwShowMapHardKey");
       
    90 	if (iAiwServiceHandler)
       
    91         {
       
    92         delete iAiwServiceHandler;    
       
    93         iAiwServiceHandler = NULL;
       
    94         }
       
    95     if (iInList)
       
    96         {
       
    97         delete iInList;
       
    98         iInList = NULL;
       
    99         }
       
   100     if (iOutList)
       
   101         {
       
   102         delete iOutList;   
       
   103         iOutList = NULL;  
       
   104         }
       
   105 	}
       
   106 
       
   107 // ----------------------------------------------------------------------------
       
   108 // DoExecuteL
       
   109 // ----------------------------------------------------------------------------
       
   110 TBool CGlxCommandHandlerAiwShowMapHardKey::DoExecuteL (TInt /*aCommandId*/, MGlxMediaList& aList)
       
   111     {
       
   112     TRACER("CGlxCommandHandlerAiwShowMapHardKey::DoExecuteL");
       
   113     
       
   114     // Show on Map Hard key is not there in 9.2.
       
   115     // if need arises this can be readded from synergy: v7 of this file and older.   
       
   116     return EFalse;
       
   117     }
       
   118 
       
   119 // ----------------------------------------------------------------------------
       
   120 // DoActivateL
       
   121 // ----------------------------------------------------------------------------
       
   122 void CGlxCommandHandlerAiwShowMapHardKey::DoActivateL(TInt aViewId)
       
   123     {
       
   124     TRACER("CGlxCommandHandlerAiwShowMapHardKey::DoActivateL");
       
   125     iViewId = aViewId;   
       
   126     
       
   127     }
       
   128 
       
   129 // ----------------------------------------------------------------------------
       
   130 // Deactivate
       
   131 // ----------------------------------------------------------------------------
       
   132 void CGlxCommandHandlerAiwShowMapHardKey::Deactivate()
       
   133     {
       
   134     TRACER("CGlxCommandHandlerAiwShowMapHardKey::Deactivate");
       
   135     
       
   136     }   
       
   137  
       
   138 // End of file
       
   139