mmmw_plat/enhanced_media_client_api/tsrc/EnhanMediaTestClass/inc/EnhanMediaTestClass.h
changeset 16 43d09473c595
parent 14 80975da52420
child 46 0ac9a5310753
equal deleted inserted replaced
14:80975da52420 16:43d09473c595
    35 //#include <Mda\Common\Audio.h>
    35 //#include <Mda\Common\Audio.h>
    36 #include <StreamControl.h>
    36 #include <StreamControl.h>
    37 #include <SourceControl.h>
    37 #include <SourceControl.h>
    38 #include <ControlObserver.h>
    38 #include <ControlObserver.h>
    39 #include <Events.h>
    39 #include <Events.h>
    40 #include <ProgDLSource.h>
       
    41 #include <DataBufferSource.h>
    40 #include <DataBufferSource.h>
    42 #include <FileSource.h>
    41 #include <FileSource.h>
    43 #include <DataBuffer.h>
    42 #include <DataBuffer.h>
    44 #include <MMControlFactory.h>
    43 #include <MMControlFactory.h>
    45 #include <SinkControl.h>
    44 #include <SinkControl.h>
    69 //#include <CacheDataSource.h>
    68 //#include <CacheDataSource.h>
    70 //#include <DataSourceConfigIntfcImpl.h>
    69 //#include <DataSourceConfigIntfcImpl.h>
    71 
    70 
    72 #include "CEMCConstants.h"
    71 #include "CEMCConstants.h"
    73 
    72 
    74 #include <DownloadMgrClientApiExt.h>
       
    75 using multimedia::MStreamControl;
    73 using multimedia::MStreamControl;
    76 using multimedia::MControlObserver;
    74 using multimedia::MControlObserver;
    77 using multimedia::MProgDLSource;
       
    78 using multimedia::MDataBufferSource;
    75 using multimedia::MDataBufferSource;
    79 using multimedia::MDescriptorSource;
    76 using multimedia::MDescriptorSource;
    80 using multimedia::MDataBuffer;
    77 using multimedia::MDataBuffer;
    81 using multimedia::MControl;
    78 using multimedia::MControl;
    82 using multimedia::CMultimediaFactory;
    79 using multimedia::CMultimediaFactory;
   117 *  @lib ?library
   114 *  @lib ?library
   118 *  @since Series60_3_2
   115 *  @since Series60_3_2
   119 */
   116 */
   120 NONSHARABLE_CLASS(CEnhanMediaTestClass) : public CScriptBase,
   117 NONSHARABLE_CLASS(CEnhanMediaTestClass) : public CScriptBase,
   121 										  public MTimeoutObserver
   118 										  public MTimeoutObserver
   122 										  ,public MControlObserver,
   119 										  ,public MControlObserver
   123 										  public MHttpDownloadMgrObserver
       
   124 											//public MDevSoundObserver,
   120 											//public MDevSoundObserver,
   125 											//public MMdaAudioOutputStreamCallback
   121 											//public MMdaAudioOutputStreamCallback
   126 										//	public MRadioFmTunerObserver,
   122 										//	public MRadioFmTunerObserver,
   127 										//	public MRadioPlayerObserver,
   123 										//	public MRadioPlayerObserver,
   128 										//	public MRadioRdsObserver
   124 										//	public MRadioRdsObserver
   138         * Destructor.
   134         * Destructor.
   139         */
   135         */
   140         virtual ~CEnhanMediaTestClass();
   136         virtual ~CEnhanMediaTestClass();
   141 
   137 
   142         void Event( MControl* aObject,TUint aEvent, TAny* aData );
   138         void Event( MControl* aObject,TUint aEvent, TAny* aData );
   143         /**
       
   144         * From MhttpDownloadMgrObserver.
       
   145         * Callback from the DownloadManager notifying Client Events.
       
   146         * @since S60 v3.2
       
   147         * @param aDownload Download for which the Event is meant
       
   148         * @param aEvent Actual Event
       
   149         */
       
   150         void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent );
       
   151 
   139 
   152 		enum TAEnhsExpectedEvent
   140 		enum TAEnhsExpectedEvent
   153 		{
   141 		{
   154 			EEDBSOpen,
   142 			EEDBSOpen,
   155 			EEStreamPause,
   143 			EEStreamPause,
   415 	    TInt DRMReset();
   403 	    TInt DRMReset();
   416 	    TInt DRMCommit(CStifItemParser& aItem);
   404 	    TInt DRMCommit(CStifItemParser& aItem);
   417 
   405 
   418 	    TInt CreateSeekableData(CStifItemParser& aItem);
   406 	    TInt CreateSeekableData(CStifItemParser& aItem);
   419 
   407 
   420 	    TInt GeneralGen_StartProgDLL(CStifItemParser& aItem);
       
   421 	    TInt PDLSOpenL(CStifItemParser& aItem);
       
   422 	    TInt PDLSGetCurFileSizeL(CStifItemParser& aItem);
       
   423 	    TInt PDLSGetExpFileSizeL(CStifItemParser& aItem);
       
   424 	    TInt PDLSGetDLStatusL(CStifItemParser& aItem);
       
   425 	    TInt PDLSIsDLCompleteL(CStifItemParser& aItem);
       
   426 	    TInt PDLSGetPerDownloadedL(CStifItemParser& aItem);
       
   427 	    TInt PDLSGetPerBufferedL(CStifItemParser& aItem);
       
   428 	    TInt PDLSGetDLRateL(CStifItemParser& aItem);
       
   429 	    TInt PDLSGetBitRateL(CStifItemParser& aItem);
       
   430 	    TInt PDLSResumeDownloadL(CStifItemParser& aItem);
       
   431 	    TInt PDLSMoveFileL(CStifItemParser& aItem);
       
   432 	    TInt PDLSGetSize(CStifItemParser& aItem);
       
   433 	    TInt PDLSCancelDownloadL(CStifItemParser& aItem);
       
   434 
       
   435 	    TInt AudioEffectIsEnabled (CStifItemParser& aItem);
   408 	    TInt AudioEffectIsEnabled (CStifItemParser& aItem);
   436 
   409 
   437 	    TInt HandleAudioEffectEnableL(CStifItemParser& aItem);
   410 	    TInt HandleAudioEffectEnableL(CStifItemParser& aItem);
   438 	    TInt HandleAudioEffectDisableL(CStifItemParser& aItem);
   411 	    TInt HandleAudioEffectDisableL(CStifItemParser& aItem);
   439 	    TInt AudioEffectIsEnforced (CStifItemParser& aItem);
   412 	    TInt AudioEffectIsEnforced (CStifItemParser& aItem);
   555 
   528 
   556         MFileSource* iMFileSource;
   529         MFileSource* iMFileSource;
   557         MSourceControl* iSourceControl;
   530         MSourceControl* iSourceControl;
   558         RPointerArray<MDataBuffer>  iBuffers;
   531         RPointerArray<MDataBuffer>  iBuffers;
   559         RArray<TInt> iAvailable;
   532         RArray<TInt> iAvailable;
   560         MProgDLSource* iMProgDLSource;
       
   561         MEqualizerControl* iMEqualizerControl;
   533         MEqualizerControl* iMEqualizerControl;
   562         MBassBoostControl* iMBassBoostControl;
   534         MBassBoostControl* iMBassBoostControl;
   563         MVolumeControl* iMVolumeControl;
   535         MVolumeControl* iMVolumeControl;
   564         MBalanceControl* iMBalanceControl;
   536         MBalanceControl* iMBalanceControl;
   565         MEffectControl* iEffectControl;
   537         MEffectControl* iEffectControl;
   595         TInt         iBytesReadFromFile;
   567         TInt         iBytesReadFromFile;
   596         TInt         iFileSizeInBytes;
   568         TInt         iFileSizeInBytes;
   597 
   569 
   598         TInt iAllowedDevice;
   570         TInt iAllowedDevice;
   599 
   571 
   600         // Url used to Open the PDL
       
   601         HBufC8*  iUrlName;
       
   602         // Download Manager instance to which we connect
       
   603         RHttpDownloadMgrApiExt  iDownloadMgr;
       
   604         // Whether the DMgr is connected or not
       
   605         TBool iDMgrConnected;
       
   606         // Download for which we connect
       
   607         RHttpDownload* iDownload;
       
   608         // Current Download ID
       
   609         TInt32 iDownloadId;
       
   610         // Temp FileName
       
   611         HBufC* iAccessPtName;
       
   612 
       
   613 
       
   614         CActiveSchedulerWait* iActive;
   572         CActiveSchedulerWait* iActive;
   615     	// ?one_line_short_description_of_data
   573     	// ?one_line_short_description_of_data
   616         //?data_declaration;
   574         //?data_declaration;
   617 
   575 
   618         // Reserved pointer for future extension
   576         // Reserved pointer for future extension