photosgallery/imgvwr/inc/glxivwrappui.h
changeset 1 9ba538e329bd
child 4 57d388cc48c1
equal deleted inserted replaced
0:4e91876724a2 1:9ba538e329bd
       
     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:    AppUi class 
       
    15  *
       
    16  */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef C_GLXIVIEWERAPPUI_H
       
    22 #define C_GLXIVIEWERAPPUI_H
       
    23 
       
    24 #include <aknViewAppUi.h>
       
    25 #include <mpxcollectionobserver.h>
       
    26 #include <mglxnavigationalstateobserver.h>
       
    27 #include <mpxcollectionpath.h>
       
    28 #include "glxiadupdate.h"
       
    29 
       
    30 class MMPXViewUtility;
       
    31 class MMPXCollectionUtility;
       
    32 class CGlxUiUtility;
       
    33 class CGlxNavigationalState;
       
    34 class CAknGlobalNote;
       
    35 
       
    36 class CGlxBackServiceWrapper;
       
    37 
       
    38 /**
       
    39  *  CGlxIVwrAppUi
       
    40  *
       
    41  *  @lib ViewerApplication
       
    42  */
       
    43 
       
    44 class CGlxIVwrAppUi : public CAknViewAppUi, public MGlxNavigationalStateObserver
       
    45     {
       
    46 public:
       
    47     CGlxIVwrAppUi();
       
    48     void ConstructL();
       
    49     ~CGlxIVwrAppUi();
       
    50 
       
    51 public: // from CAknAppUi
       
    52     /**
       
    53      * From CAknAppUi
       
    54      * Handle user menu selections
       
    55      * @param aCommand Id of the command
       
    56      */
       
    57     void HandleCommandL(TInt aCommand);
       
    58 
       
    59     // From MGlxNavigationalStateObserver
       
    60     void HandleNavigationalStateChangedL();
       
    61     //OOM Method
       
    62     void HandleApplicationSpecificEventL(TInt aEventType, const TWsEvent& aWsEvent);
       
    63 
       
    64 private:    // From CEikAppUi
       
    65 
       
    66     TBool ProcessCommandParametersL(TApaCommand aCommand,
       
    67             TFileName& aDocumentName, const TDesC8& aTail);
       
    68 
       
    69 private: // From CCoeAppUi
       
    70 
       
    71     void HandleForegroundEventL( TBool aForeground );
       
    72 
       
    73 private:
       
    74     enum TEntryType
       
    75         {
       
    76         EEntryTypeStartUp = 0,
       
    77         EEntryTypeFocusGained
       
    78         };
       
    79 
       
    80 
       
    81     /**
       
    82      * Handle an activation message.
       
    83      * @param aCommand command data sent from the activating application.
       
    84      * @param aDocumentName image file name data sent from the activating application.
       
    85      * @param aData Message data from activating application.
       
    86      */
       
    87     void HandleActivationMessageL(const TApaCommand& aCommand, const TFileName& aDocumentName, const TDesC8& aData);
       
    88 
       
    89     /**
       
    90      * Set activation parameter for startup view, converting to 16-bit
       
    91      * descriptor used by MPX.
       
    92      * @param aParam Activation parameter.
       
    93      */
       
    94     void SetActivationParamL(const TDesC8& aParam);
       
    95 
       
    96     /**
       
    97      * Get view scoring ids based on current navigational state
       
    98      * (using Get in the name since the function does not return anything)
       
    99      * @param aIns list that will be populated with scoring ids
       
   100      */
       
   101     void GetViewScoringIdsL( RArray<TUid>& aIds ) const;
       
   102 
       
   103     /**
       
   104      * Get view scoring id for collection plugin
       
   105      * @param naviState Path to represent navigational state
       
   106      * @return scoding id
       
   107      */
       
   108     TUid GetViewScoringIdForCollectionPlugin( const CMPXCollectionPath& aNaviState ) const;
       
   109 
       
   110     /**
       
   111      * Get view scoring id for depth in ui hierarchy
       
   112      * @param naviState Path to represent navigational state
       
   113      * @return scoding id
       
   114      */
       
   115     TUid ViewScoringIdForNaviStateDepth( const CMPXCollectionPath& aNaviState ) const;
       
   116 
       
   117 
       
   118     /**
       
   119      * close photos app.
       
   120      */
       
   121     void CloseImgVwr();
       
   122 
       
   123 private:
       
   124     MMPXViewUtility* iViewUtility;
       
   125 
       
   126 	/// Singleton that stores gallery's navigational state
       
   127     CGlxNavigationalState* iNavigationalState;
       
   128 
       
   129     /** Optional view plugin UID to activate when the collection is opened */
       
   130     TUid iStartupViewUid;
       
   131 
       
   132     /** Optional activation parameter for the next view */
       
   133     HBufC* iActivationParam;
       
   134 
       
   135 
       
   136     TBool iStartUpSequence;
       
   137 
       
   138     ///Ui utility
       
   139     CGlxUiUtility* iUiUtility;
       
   140 
       
   141     CGlxBackServiceWrapper* iBSWrapper;
       
   142     };
       
   143 
       
   144 
       
   145 #endif // C_GLXIVIEWERAPPUI_H
       
   146