📄 videofiledetailsdialog.h
字号:
/*
* ==============================================================================
* Name : VideoFileDetailsDialog.h
* Part of : Video
* Created : 10/14/2003 by Forum Nokia
* Description : Declares media file details dialog
* Version :
* Copyright : Nokia Corporation, 2003
* ==============================================================================
*/
#ifndef _VIDEO_FILEDETAILSDIALOG_H
#define _VIDEO_FILEDETAILSDIALOG_H
#include <aknpopup.h>
#include <VideoPlayer.h>
#include <MdaAudioSamplePlayer.h>
#include "VideoFileDetails.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
/**
* 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);
/**
* 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()
*/
void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
/**
* See MMdaAudioPlayerCallback::MapcPlayComplete
*/
void MapcPlayComplete(TInt aError);
public: // Functions from MVideoPlayerUtilityObserver
/**
* See MVideoPlayerUtilityObserver::MvpuoOpenComplete
*/
void MvpuoOpenComplete(TInt aError);
/**
* See MVideoPlayerUtilityObserver::MvpuoPrepareComplete
*/
void MvpuoPrepareComplete(TInt aError);
/**
* See MVideoPlayerUtilityObserver::MvpuoFrameReady
*/
void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
/**
* See MVideoPlayerUtilityObserver::MvpuoPlayComplete
*/
void MvpuoPlayComplete(TInt aError);
/**
* See MVideoPlayerUtilityObserver::MvpuoEvent
*/
void MvpuoEvent(const TMMFEvent& aEvent);
private:
/**
* C++ default constructor.
*/
CVideoFileDetailsDialog();
/**
* By default Symbian 2nd phase constructor is private.
*/
void ConstructL();
private: // New functions
/**
* Sets title for CAknPopupList.
* @param aPopupList CAknPopupList which title is modified
* @return void
*/
void SetTitleL(CAknPopupList* aPopupList);
/**
* Fills listbox with file details information.
* @param aFileDetails File details
* @return void
*/
void FillListBoxL(CVideoFileDetails* aFileDetails);
/**
* 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);
/**
* Constructs clip title item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeTitleItemL(CDesCArray* aItemArray, CVideoFileDetails* aFileDetails);
/**
* Constructs clip url item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeUrlItemL(CDesCArray* aItemArray, CVideoFileDetails* aFileDetails);
/**
* Constructs media format item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeFormatItemL(CDesCArray* aItemArray, CVideoFileDetails* aFileDetails);
/**
* Constructs video resolution item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeResolutionItemL(CDesCArray* aItemArray,CVideoFileDetails* aFileDetails);
/**
* Constructs media duration item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeDurationItemL(CDesCArray* aItemArray,CVideoFileDetails* aFileDetails);
/**
* Constructs bitrate item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeBitrateItemL(CDesCArray* aItemArray,CVideoFileDetails* aFileDetails);
/**
* Constructs file size item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeSizeItemL(CDesCArray* aItemArray,CVideoFileDetails* aFileDetails);
/**
* Constructs date item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeDateItemL(CDesCArray* aItemArray,CVideoFileDetails* aFileDetails);
/**
* Constructs time item.
* @param aItemArray Array where constructed item is put.
* @param aFileDetails File details.
* @return void
*/
void MakeTimeItemL(CDesCArray* aItemArray,CVideoFileDetails* aFileDetails);
/**
* 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 abording 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: Returns client window handle
Comments :
Return values: Returns client window handle
-----------------------------------------------------------------------------
*/
inline RWindow& CPDummyController::GetClientWindow()
{
return Window();
}
/*
-----------------------------------------------------------------------------
inline RWsSession& CPDummyController::GetClientWsSession()
Description: Returns client WsSession
Comments :
Return values: Returns client WsSession
-----------------------------------------------------------------------------
*/
inline RWsSession& CPDummyController::GetClientWsSession()
{
return ControlEnv()->WsSession();
}
/*
-----------------------------------------------------------------------------
inline CWsScreenDevice& CPDummyController::GetScreenDevice()
Description: Returns client ScreenDevice
Comments :
Return values: Returns client ScreenDevice
-----------------------------------------------------------------------------
*/
inline CWsScreenDevice& CPDummyController::GetScreenDevice()
{
return *(ControlEnv()->ScreenDevice());
}
#endif // _VIDEO_FILEDETAILSDIALOG_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -