videoplayerapp/mpxvideoplayer/inc/mpxvideoplayerappui.h
branchRCL_3
changeset 57 befca0ec475f
equal deleted inserted replaced
56:839377eedc2b 57:befca0ec475f
       
     1 /*
       
     2 * Copyright (c) 2008 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:  App UI
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version: 15 %
       
    19 
       
    20 
       
    21 #ifndef CMPXVIDEOPLAYERAPPUI_H
       
    22 #define CMPXVIDEOPLAYERAPPUI_H
       
    23 
       
    24 #include <aknViewAppUi.h>
       
    25 
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CAiwGenericParamList;
       
    29 class CMpxVideoPlayerMediaKeyHandler;
       
    30 class CMpxVideoPlayerRemConListener;
       
    31 class CMpxVideoPlayerAppUiEngine;
       
    32 
       
    33 /**
       
    34 *  Application UI class.
       
    35 *
       
    36 *  @lib mpxvideoplayer.exe
       
    37 *  @since MpxVideoPlayer 0.1
       
    38 */
       
    39 class CMpxVideoPlayerAppUi : public CAknViewAppUi
       
    40 {
       
    41     public:        // Constructors and destructor
       
    42 
       
    43         /**
       
    44         * Default constructor
       
    45         */
       
    46         CMpxVideoPlayerAppUi();
       
    47 
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         ~CMpxVideoPlayerAppUi();
       
    52 
       
    53     public:       // New functions
       
    54 
       
    55         /**
       
    56         * Exit
       
    57         */
       
    58         void HandleExit();
       
    59 
       
    60         /**
       
    61         * From CEikAppUi, processes shell commands.
       
    62         * @param aCommand
       
    63         * @param aDocumentName
       
    64         * @param aTail
       
    65         *  @return  ETrue if document name exists        
       
    66         */
       
    67         TBool ProcessCommandParametersL( TApaCommand aCommand,
       
    68                                          TFileName& aDocumentName,
       
    69                                          const TDesC8& aTail );
       
    70 
       
    71         /**
       
    72          * From CEikAppUi
       
    73          * handle window server events.
       
    74          *
       
    75          * @param aEvent The window server event to be handled.
       
    76          * @param aDestination The control associated with the event.
       
    77          */
       
    78         void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
       
    79 
       
    80         /**
       
    81         * Command handling
       
    82         * @param aCmd Command ID
       
    83         */
       
    84         void HandleCommandL( TInt aCommand );
       
    85 
       
    86         /**
       
    87          * This function is used for querying whether the application
       
    88          * is launched in embedded mode or not.
       
    89          * @since 3.1
       
    90          * @return ETrue:  The application is launched in embedded mode.
       
    91          *         EFalse: The application is launched in standalone mode.
       
    92          */
       
    93         TBool IsEmbedded() const;
       
    94 
       
    95         /**
       
    96          * Opens the specified file in response.
       
    97          * @since 3.1
       
    98          * @param aFile      File handle to open
       
    99          * @param aParams    Generic parameter list from document handler
       
   100          */
       
   101         void OpenFileL( RFile& aFile, const CAiwGenericParamList* aParams );
       
   102         
       
   103         /**
       
   104          * Returns the active view.
       
   105          * Ownership is not transferred.
       
   106          *
       
   107          * @return Active akn view or NULL if no views.
       
   108          */
       
   109         CAknView* View();
       
   110         
       
   111     private:
       
   112         /**
       
   113         * By default Symbian 2nd phase constructor is private.
       
   114         */
       
   115         void ConstructL();
       
   116         
       
   117         /**
       
   118          * Checks if the stored wg id is the same as the current wg id of embedded player.
       
   119 		 * If it is clears it.
       
   120          * @since 3.1         
       
   121          */
       
   122         void DoWgIdUpkeep();
       
   123 
       
   124         /**
       
   125          * From CEikAppUi
       
   126          * Receives closing notification from video storage
       
   127          *
       
   128          * @param aClientHandleOfTargetWindowGroup Target window group (this app).
       
   129          * @param aMessageUid The TUid type of the message
       
   130          * @param aMessageParameters A reference to constant descriptor of optional parameters
       
   131          */
       
   132         MCoeMessageObserver::TMessageResponse HandleMessageL(
       
   133                                                     TUint32 aClientHandleOfTargetWindowGroup,
       
   134                                                     TUid aMessageUid,
       
   135                                                     const TDesC8 &aMessageParameters);
       
   136 
       
   137         /**
       
   138          * From CEikAppUi
       
   139          * opens the specified file in response to a corresponding message.
       
   140          *
       
   141          * @param aFileName File to be opened.
       
   142          */
       
   143         void OpenFileL( const TDesC& aFileName );
       
   144 
       
   145         /**
       
   146          * From CCoeAppUi
       
   147          * called when event occurs of type EEventFocusLost or EEventFocusGained.
       
   148          *
       
   149          * @param aForeground ETrue if the application is in the foreground,
       
   150          *                    otherwise EFalse.
       
   151          */
       
   152         void HandleForegroundEventL( TBool aForeground );
       
   153 
       
   154     private:       // data
       
   155 
       
   156         // own
       
   157         CMpxVideoPlayerAppUiEngine* iAppUiEngine;
       
   158 
       
   159 };
       
   160 
       
   161 #endif             // CMPXVIDEOPLAYERAPPUI_H