- /*
- * ============================================================================
- * Name : VideoAppUi.h
- * Part of : Video
- * Created : 10/14/2003 by Forum Nokia
- * Description:
- * Declares UI class for application.
- * Version :
- * Copyright: Forum Corporation, 2003
- * ============================================================================
- */
- #ifndef VIDEOAPPUI_H
- #define VIDEOAPPUI_H
- #include <eikapp.h>
- #include <eikdoc.h>
- #include <e32std.h>
- #include <coeccntx.h>
- #include <aknappui.h>
- #include "VideoEngine.h"
- #include "MPlayerUIControllerListener.h"
- class CVideoContainer;
- class CVideoEngine;
- class CAknNavigationControlContainer;
- class CAknNavigationDecorator;
- class CEikButtonGroupContainer;
- /**
- * CVideoAppUi class.
- * UI class required by Symbian OS architecture
- */
- class CVideoAppUi : public CAknAppUi, public MPlayerUIControllerListener
- {
- public: // // Constructors and destructor
- /**
- * Symbian default constructor.
- */
- void ConstructL();
- /**
- * Destructor.
- */
- ~CVideoAppUi();
- public: // New functions
- CVideoEngine* GetVideoEngine();
- void PlayVideoFileL(TDesC &aFileName );
- public: // Functions from MPlayerUIControllerListener
- /**
- * Controller has been initialized completely.
- * @param aError error code returned
- */
- void InitControllerCompletedL(TInt aError );
- /**
- * Playing a video has been complete
- * @param aError error code returned
- */
- void PlayCompletedL( TInt aError );
- /**
- * See MPUIControllerListener::PlaybackPositionChangedL()
- */
- void PlaybackPositionChangedL(TInt64 aPlaybackPosInSeconds, TInt64 aTotalLengthInSeconds);
- private:
- /**
- * From MEikMenuObserver
- */
- void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
- /**
- * Create the Time navi pane
- */
- CAknNavigationDecorator* CreateTimeNaviL();
- private:
- /**
- * From CEikAppUi, takes care of command handling.
- * @param aCommand command to be handled
- */
- void HandleCommandL(TInt aCommand);
- /**
- * From CEikAppUi, handles key events.
- * @param aKeyEvent Event to handled.
- * @param aType Type of the key event.
- * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed).
- */
- virtual TKeyResponse HandleKeyEventL(
- const TKeyEvent& aKeyEvent,TEventCode aType);
- protected:
- /**
- * Resume a playing video file
- */
- void DoResumeL();
- /**
- * Get the file information
- */
- void DoGetFileInfoL();
- /**
- * Play a video using a document handler
- */
- void DoDocPlayL();
- /**
- * Pause a playing video clip
- */
- void DoPauseL();
- /**
- * Initialize a video engine
- */
- void DoInitControllerL();
- /**
- * Stop a playing vide clip
- */
- void DoStopL();
- /**
- * Play a video clip
- */
- void DoPlayL();
- /**
- * Set a text to the time navi pane
- * @param aLabel text to set
- */
- void SetNaviLabelL(const TDesC & aLabel);
- private: //Data
- CVideoContainer* iAppContainer;
- CVideoEngine* iEngine;
- CAknNavigationControlContainer* iNaviPane;
- CAknNavigationDecorator* iTimeNavi;
- HBufC* iMinSecFormatString;
- HBufC* iHourMinSecFormatString;
- CEikButtonGroupContainer* iCba;
- };
- #endif