sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Part of the MVS Agents for TechView sl@0: // sl@0: sl@0: #ifndef AGENTSUTILITY_H sl@0: #define AGENTSUTILITY_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: sl@0: /** sl@0: States of the Client sl@0: */ sl@0: enum TMVSState sl@0: { sl@0: ENotReady = 0, sl@0: EAudioOpening, sl@0: EAudioOpened, sl@0: EAudioPlaying, sl@0: EAudioRecording, sl@0: EAudioStopped, sl@0: EVideoOpening, sl@0: EVideoOpened, sl@0: EVideoPlaying, sl@0: EVideoRecording, sl@0: EVideoStopped, sl@0: EVideoPaused, sl@0: EAudioPaused sl@0: }; sl@0: sl@0: /** sl@0: Modes of the Client sl@0: */ sl@0: enum TMVSMode sl@0: { sl@0: EAudioRecord, sl@0: EAudioPlay, sl@0: EVideoRecord, sl@0: EVideoPlay, sl@0: EIdle sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @prototype sl@0: @test sl@0: sl@0: An interface to Client callback function sl@0: This serves as the method of communication between the Client and the UI sl@0: sl@0: */ sl@0: class MMVSClientObserver sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: sl@0: Called when a multimedia controller plugin changes state e.g. when audio starts to play, sl@0: the state changes from EAudioOpened to EAudioPlaying sl@0: sl@0: @param aState sl@0: Current State of the Client sl@0: @param aError sl@0: Error code. The status of the current operation sl@0: */ sl@0: virtual void UpdateStateChange(TMVSState aState, TInt aError) = 0; sl@0: sl@0: /** sl@0: Called when the audio resource becomes available but only if the resource was previously unavailable (e.g. if sl@0: the audio resource is available when the client registers, then this callback is not received). sl@0: sl@0: @param aNotificationData sl@0: The data that corresponds to the notification event sl@0: */ sl@0: virtual void MvsResourceNotification(const TDesC8& aNotificationData) = 0; sl@0: sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @prototype sl@0: @test sl@0: sl@0: Utility class that does fetching the existing controller plugins,the extensions sl@0: supported by them and finding the type of the media file for the UI. sl@0: */ sl@0: class CMVSControllerPluginInfo: public CBase sl@0: { sl@0: public: sl@0: IMPORT_C static CMVSControllerPluginInfo* NewL(); sl@0: IMPORT_C ~CMVSControllerPluginInfo(); sl@0: sl@0: IMPORT_C TInt GetPluginListL(CDesCArrayFlat* aDisplayNames, RArray& aUidArray); sl@0: IMPORT_C TInt GetAudioPluginListL(CDesCArrayFlat* aDisplayNames, RArray& aUidArray,RArray& aUidPlayArray, TDesC* aExt); sl@0: IMPORT_C TInt GetVideoPluginListL(CDesCArrayFlat* aDisplayNames, RArray& aUidArray, TDesC* aExt); sl@0: IMPORT_C TInt GetExtensionListL(TBool aControllerUid, CDesCArrayFlat* aExtArray); sl@0: IMPORT_C TUid GetMediaTypeL(TDesC& aFileName); sl@0: IMPORT_C CMMFControllerImplementationInformation& GetControllerInfo(TUid aControllerUid); sl@0: private: sl@0: void CollectAudioControllersL(TDesC* aExt); sl@0: void CollectAudioPlayControllersL(TDesC* aExt); sl@0: void CollectVideoControllersL(TDesC* aExt); sl@0: void ConstructL(); //populate iControllers sl@0: CMVSControllerPluginInfo(); sl@0: void GetHeaderL(TDesC& aFileName, TDes8& aHeaderData); sl@0: private: sl@0: //list of controller info objects sl@0: RMMFControllerImplInfoArray iControllers; sl@0: RMMFControllerImplInfoArray iSupportedControllers; sl@0: RArray iUidArray; sl@0: RMMFControllerImplInfoArray iAudioControllers; sl@0: RMMFControllerImplInfoArray iVideoControllers; sl@0: RMMFControllerImplInfoArray iAudioPlayControllers; sl@0: RArray iAudioUidArray; sl@0: RArray iAudioPlayUidArray; sl@0: RArray iVideoUidArray; sl@0: RFileLogger iFileLogger; sl@0: }; sl@0: sl@0: sl@0: #endif AGENTSUTILITY_H