videoplayback/inc/mpxvideopdlplaybackview.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 19 Aug 2010 09:57:17 +0300
branchRCL_3
changeset 21 315810614048
parent 20 2d690156cf8f
permissions -rw-r--r--
Revision: 201031 Kit: 201033

/*
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  MPX Video PDL playback view
*
*/


// Version : %version: 10 %


// This file defines the API for VideoPlaybackView.dll

#ifndef __VIDEOPDLPLAYBACKVIEW_H__
#define __VIDEOPDLPLAYBACKVIEW_H__

//  Include Files
#include <mpxplaybackcommanddefs.h>

#include "mpxvideobaseplaybackview.h"

//  Constants

//  Forward Declarations

//
//  Class Definitions
//
class CMPXVideoPdlPlaybackView : public CMPXVideoBasePlaybackView
{
    public:
        IMPORT_C static CMPXVideoPdlPlaybackView* NewL();
        IMPORT_C static CMPXVideoPdlPlaybackView* NewLC();

        ~CMPXVideoPdlPlaybackView();

        void RetrievePdlInformationL();

    protected:

        /*
         * From CAknView
         * @return Views Uid
         */
        virtual TUid Id() const;

        TUid ViewImplementationId() const;

        void CloseEmbeddedPlaybackViewL();

        void HandlePluginErrorL( TInt aError );

        /*
         *  Handle Download State Change
         *  @param  aState  new state of the download
         */
        void HandlePdlStateChangeL( TInt aState );

        /*
         *  Handle transition to the stopped state
         */
        void HandleStoppedStateL();

        void HandleBufferingStateL();

        void HandleInitializingStateL( TMPXPlaybackState aLastState );

        void SendWindowCommandL( TMPXVideoPlaybackCommand aCmd );

        void HandlePdlReloadComplete();

        void ResetPdlUserInputs();

    private:

        CMPXVideoPdlPlaybackView();

        void ConstructL();

        void SendPdlCustomCommandL( TMPXPlaybackPdCommand aCustomCmd );

        TBool BringUpBrowserL();

        void ClosePlaybackViewWithErrorL();

        //
        //  Functions to unblock user inputs after a timeout
        //
        static TInt HandleBlockInputsTimeOut( TAny* aPtr );
        void DoHandleBlockInputsTimeOut();

    private: // data

        TMPXPlaybackPdDownloadState         iPdlState;
        TInt                                iDownloadSize;
        TBool                               iUserInputsBlocked;

        CPeriodic*                          iBlockInputsTimer;
};

#endif  // __VIDEOPDLPLAYBACKVIEW_H__

// EOF