os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteagents/inc/agentsutility.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteagents/inc/agentsutility.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,137 @@
1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Part of the MVS Agents for TechView
1.18 +//
1.19 +
1.20 +#ifndef AGENTSUTILITY_H
1.21 +#define AGENTSUTILITY_H
1.22 +
1.23 +#include <badesca.h>
1.24 +#include <mmf/common/mmfcontroller.h>
1.25 +#include <flogger.h>
1.26 +
1.27 +
1.28 +/**
1.29 +States of the Client
1.30 +*/
1.31 +enum TMVSState
1.32 +{
1.33 + ENotReady = 0,
1.34 + EAudioOpening,
1.35 + EAudioOpened,
1.36 + EAudioPlaying,
1.37 + EAudioRecording,
1.38 + EAudioStopped,
1.39 + EVideoOpening,
1.40 + EVideoOpened,
1.41 + EVideoPlaying,
1.42 + EVideoRecording,
1.43 + EVideoStopped,
1.44 + EVideoPaused,
1.45 + EAudioPaused
1.46 +};
1.47 +
1.48 +/**
1.49 +Modes of the Client
1.50 +*/
1.51 +enum TMVSMode
1.52 +{
1.53 + EAudioRecord,
1.54 + EAudioPlay,
1.55 + EVideoRecord,
1.56 + EVideoPlay,
1.57 + EIdle
1.58 +};
1.59 +
1.60 +
1.61 +/**
1.62 +@publishedPartner
1.63 +@prototype
1.64 +@test
1.65 +
1.66 +An interface to Client callback function
1.67 +This serves as the method of communication between the Client and the UI
1.68 +
1.69 +*/
1.70 +class MMVSClientObserver
1.71 +{
1.72 +public:
1.73 +
1.74 + /**
1.75 +
1.76 + Called when a multimedia controller plugin changes state e.g. when audio starts to play,
1.77 + the state changes from EAudioOpened to EAudioPlaying
1.78 +
1.79 + @param aState
1.80 + Current State of the Client
1.81 + @param aError
1.82 + Error code. The status of the current operation
1.83 + */
1.84 + virtual void UpdateStateChange(TMVSState aState, TInt aError) = 0;
1.85 +
1.86 + /**
1.87 + Called when the audio resource becomes available but only if the resource was previously unavailable (e.g. if
1.88 + the audio resource is available when the client registers, then this callback is not received).
1.89 +
1.90 + @param aNotificationData
1.91 + The data that corresponds to the notification event
1.92 + */
1.93 + virtual void MvsResourceNotification(const TDesC8& aNotificationData) = 0;
1.94 +
1.95 +};
1.96 +
1.97 +
1.98 +/**
1.99 +@publishedPartner
1.100 +@prototype
1.101 +@test
1.102 +
1.103 +Utility class that does fetching the existing controller plugins,the extensions
1.104 +supported by them and finding the type of the media file for the UI.
1.105 +*/
1.106 +class CMVSControllerPluginInfo: public CBase
1.107 +{
1.108 +public:
1.109 + IMPORT_C static CMVSControllerPluginInfo* NewL();
1.110 + IMPORT_C ~CMVSControllerPluginInfo();
1.111 +
1.112 + IMPORT_C TInt GetPluginListL(CDesCArrayFlat* aDisplayNames, RArray<TUid>& aUidArray);
1.113 + IMPORT_C TInt GetAudioPluginListL(CDesCArrayFlat* aDisplayNames, RArray<TUid>& aUidArray,RArray<TUid>& aUidPlayArray, TDesC* aExt);
1.114 + IMPORT_C TInt GetVideoPluginListL(CDesCArrayFlat* aDisplayNames, RArray<TUid>& aUidArray, TDesC* aExt);
1.115 + IMPORT_C TInt GetExtensionListL(TBool aControllerUid, CDesCArrayFlat* aExtArray);
1.116 + IMPORT_C TUid GetMediaTypeL(TDesC& aFileName);
1.117 + IMPORT_C CMMFControllerImplementationInformation& GetControllerInfo(TUid aControllerUid);
1.118 +private:
1.119 + void CollectAudioControllersL(TDesC* aExt);
1.120 + void CollectAudioPlayControllersL(TDesC* aExt);
1.121 + void CollectVideoControllersL(TDesC* aExt);
1.122 + void ConstructL(); //populate iControllers
1.123 + CMVSControllerPluginInfo();
1.124 + void GetHeaderL(TDesC& aFileName, TDes8& aHeaderData);
1.125 +private:
1.126 + //list of controller info objects
1.127 + RMMFControllerImplInfoArray iControllers;
1.128 + RMMFControllerImplInfoArray iSupportedControllers;
1.129 + RArray<TUid> iUidArray;
1.130 + RMMFControllerImplInfoArray iAudioControllers;
1.131 + RMMFControllerImplInfoArray iVideoControllers;
1.132 + RMMFControllerImplInfoArray iAudioPlayControllers;
1.133 + RArray<TUid> iAudioUidArray;
1.134 + RArray<TUid> iAudioPlayUidArray;
1.135 + RArray<TUid> iVideoUidArray;
1.136 + RFileLogger iFileLogger;
1.137 +};
1.138 +
1.139 +
1.140 +#endif AGENTSUTILITY_H