📄 vrexfiledetailsdialog.h
字号:
/*
* ============================================================================
* Name : CVideoFileDetailsDialog from VRexFileDetailsDialog.h
* Part of : Video Example
* Created : 30/08/2006 by Forum Nokia
* Implementation notes:
* Version : 2.0
* Copyright: Nokia Corporation, 2006
* ============================================================================
*/
#ifndef __VIDEOFILEDETAILSDIALOG_H__
#define __VIDEOFILEDETAILSDIALOG_H__
#include <aknpopup.h>
#include <VideoPlayer.h>
#include <MdaAudioSamplePlayer.h>
#include "VRexFileDetails.h"
class CAknDoublePopupMenuStyleListBox;
/**
* CVideoFileDetailsDialog
* A dialog used to list the detailed information regarding a video file.
*/
class CVideoFileDetailsDialog : public CBase,
public MMdaAudioPlayerCallback,
public MVideoPlayerUtilityObserver
{
public: // Constructors and destructor
/**
* Two-phased constructor.
*/
static CVideoFileDetailsDialog* NewL();
/**
* Destructor.
*/
virtual ~CVideoFileDetailsDialog();
public: // New functions
/**
* This method shows file details to user in dialog.
* @param aFileName, media file which details are shown to user.
* @leaves Leaves with KErrNotSupported if file is not valid media file.
* @return void
*/
void ExecuteLD(const TDesC& aFileName);
/**
* This method shows file details to user in dialog.
* @param aFileDetails, file details which are shown to user.
* @return void
*/
void ExecuteLD(CVideoFileDetails* aFileDetails);
public: // Functions from MMdaAudioPlayerCallback
/**
* See MMdaAudioPlayerCallback::MapcInitComplete(TInt aError,
* const TTimeIntervalMicroSeconds& aDuration)
*/
void MapcInitComplete(TInt aError,
const TTimeIntervalMicroSeconds& aDuration);
/**
* See MMdaAudioPlayerCallback::MapcPlayComplete(TInt aError)
*/
void MapcPlayComplete(TInt aError);
public: // Functions from MVideoPlayerUtilityObserver
/**
* See MVideoPlayerUtilityObserver::MvpuoOpenComplete(TInt aError)
*/
void MvpuoOpenComplete(TInt aError);
/**
* See MVideoPlayerUtilityObserver::MvpuoPrepareComplete(TInt aError)
*/
void MvpuoPrepareComplete(TInt aError);
/**
* See MVideoPlayerUtilityObserver::MvpuoFrameReady(CFbsBitmap& aFrame,
* TInt aError)
*/
void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
/**
* See MVideoPlayerUtilityObserver::MvpuoPlayComplete(TInt aError)
*/
void MvpuoPlayComplete(TInt aError);
/**
* See MVideoPlayerUtilityObserver::MvpuoEvent(const TMMFEvent& aEvent)
*/
void MvpuoEvent(const TMMFEvent& aEvent);
private:
/**
* C++ default constructor.
*/
CVideoFileDetailsDialog();
/**
* By default Symbian 2nd phase constructor is private.
*/
void ConstructL();
private: // New functions
/**
* This method sets title for CAknPopupList.
* @param aPopupList CAknPopupList which title is modified
* @return void
*/
void SetTitleL(CAknPopupList* aPopupList);
/**
* This method fills listbox with file details information.
* @param aFileDetails File details
* @return void
*/
void FillListBoxL(CVideoFileDetails* aFileDetails);
/**
* This method adds header and value to list.
* @param aHeading Heading
* @param aValue Value
* @param aItemArray Array where value and header are added.
* @return void
*/
void AddItemToListBoxL(const TDesC& aHeading,
const TDesC& aValue, CDesCArray* aItemArray);
/**
*This method constructs clip title item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeTitleItemL(CDesCArray* aItemArray,
CVideoFileDetails* aFileDetails);
/**
* This method constructs clip url item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeUrlItemL(CDesCArray* aItemArray,
CVideoFileDetails* aFileDetails);
/**
* This method constructs media format item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeFormatItemL(CDesCArray* aItemArray,
CVideoFileDetails* aFileDetails);
/**
* This method constructs video resolution item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeResolutionItemL(CDesCArray* aItemArray,
CVideoFileDetails* aFileDetails);
/**
* This method constructs media duration item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeDurationItemL(CDesCArray* aItemArray,
CVideoFileDetails* aFileDetails);
/**
* This method constructs bitrate item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeBitrateItemL(CDesCArray* aItemArray,
CVideoFileDetails* aFileDetails);
/**
* This method constructs file size item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeSizeItemL(CDesCArray* aItemArray,
CVideoFileDetails* aFileDetails);
/**
* This method constructs date item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeDateItemL(CDesCArray* aItemArray,
CVideoFileDetails* aFileDetails);
/**
* This method constructs time item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeTimeItemL(CDesCArray* aItemArray,
CVideoFileDetails* aFileDetails);
/**
* This method constructs copyright item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeCopyrightItemL(CDesCArray* aItemArray,
CVideoFileDetails* aFileDetails);
private: // Data
CAknDoublePopupMenuStyleListBox* iListBox;
CActiveSchedulerWait iWait;
TInt iResult;
};
/**
* CPDummyController
* Used together with CVideoFileDetailsDialog to retrieve the information for
* the video file. Basically, it does nothing but absorb all the key presses.
*/
class CPDummyController : public CCoeControl
{
public: // Constructors and destructor
/**
* Two-phased constructor.
*/
static CPDummyController* NewLC();
/**
* Destructor.
*/
virtual ~CPDummyController();
public: // New functions
/**
* Controls window handle.
* @return controllers RWindow
*/
inline RWindow& GetClientWindow();
/**
* Controls WsSession.
* @return controllers RWsSession
*/
inline RWsSession& GetClientWsSession();
/**
* Controls ScreenDevice
* @return controllers CWsScreenDevice
*/
inline CWsScreenDevice& GetScreenDevice();
private: // Functions from CCoeControl
/**
* See CCoeControl::OfferKeyEventL()
*/
virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
TEventCode aType);
private:
/**
* C++ default constructor.
*/
CPDummyController();
/**
* By default Symbian 2nd phase constructor is private.
*/
void ConstructL();
};
/*
-----------------------------------------------------------------------------
inline RWindow& CPDummyController::GetClientWindow()
Description: This method returns client window handle.
Comments :
Return values: Client window handle
-----------------------------------------------------------------------------
*/
inline RWindow& CPDummyController::GetClientWindow()
{
return Window();
}
/*
-----------------------------------------------------------------------------
inline RWsSession& CPDummyController::GetClientWsSession()
Description: This method returns client WsSession.
Comments :
Return values: Client WsSession
-----------------------------------------------------------------------------
*/
inline RWsSession& CPDummyController::GetClientWsSession()
{
return ControlEnv()->WsSession();
}
/*
-----------------------------------------------------------------------------
inline CWsScreenDevice& CPDummyController::GetScreenDevice()
Description: This method returns client ScreenDevice.
Comments :
Return values: Client ScreenDevice
-----------------------------------------------------------------------------
*/
inline CWsScreenDevice& CPDummyController::GetScreenDevice()
{
return *(ControlEnv()->ScreenDevice());
}
#endif // __VIDEOFILEDETAILSDIALOG_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -