sl@0
|
1 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// Part of the MVS Agents for TechView
|
sl@0
|
15 |
//
|
sl@0
|
16 |
|
sl@0
|
17 |
#ifndef AGENTSUTILITY_H
|
sl@0
|
18 |
#define AGENTSUTILITY_H
|
sl@0
|
19 |
|
sl@0
|
20 |
#include <badesca.h>
|
sl@0
|
21 |
#include <mmf/common/mmfcontroller.h>
|
sl@0
|
22 |
#include <flogger.h>
|
sl@0
|
23 |
|
sl@0
|
24 |
|
sl@0
|
25 |
/**
|
sl@0
|
26 |
States of the Client
|
sl@0
|
27 |
*/
|
sl@0
|
28 |
enum TMVSState
|
sl@0
|
29 |
{
|
sl@0
|
30 |
ENotReady = 0,
|
sl@0
|
31 |
EAudioOpening,
|
sl@0
|
32 |
EAudioOpened,
|
sl@0
|
33 |
EAudioPlaying,
|
sl@0
|
34 |
EAudioRecording,
|
sl@0
|
35 |
EAudioStopped,
|
sl@0
|
36 |
EVideoOpening,
|
sl@0
|
37 |
EVideoOpened,
|
sl@0
|
38 |
EVideoPlaying,
|
sl@0
|
39 |
EVideoRecording,
|
sl@0
|
40 |
EVideoStopped,
|
sl@0
|
41 |
EVideoPaused,
|
sl@0
|
42 |
EAudioPaused
|
sl@0
|
43 |
};
|
sl@0
|
44 |
|
sl@0
|
45 |
/**
|
sl@0
|
46 |
Modes of the Client
|
sl@0
|
47 |
*/
|
sl@0
|
48 |
enum TMVSMode
|
sl@0
|
49 |
{
|
sl@0
|
50 |
EAudioRecord,
|
sl@0
|
51 |
EAudioPlay,
|
sl@0
|
52 |
EVideoRecord,
|
sl@0
|
53 |
EVideoPlay,
|
sl@0
|
54 |
EIdle
|
sl@0
|
55 |
};
|
sl@0
|
56 |
|
sl@0
|
57 |
|
sl@0
|
58 |
/**
|
sl@0
|
59 |
@publishedPartner
|
sl@0
|
60 |
@prototype
|
sl@0
|
61 |
@test
|
sl@0
|
62 |
|
sl@0
|
63 |
An interface to Client callback function
|
sl@0
|
64 |
This serves as the method of communication between the Client and the UI
|
sl@0
|
65 |
|
sl@0
|
66 |
*/
|
sl@0
|
67 |
class MMVSClientObserver
|
sl@0
|
68 |
{
|
sl@0
|
69 |
public:
|
sl@0
|
70 |
|
sl@0
|
71 |
/**
|
sl@0
|
72 |
|
sl@0
|
73 |
Called when a multimedia controller plugin changes state e.g. when audio starts to play,
|
sl@0
|
74 |
the state changes from EAudioOpened to EAudioPlaying
|
sl@0
|
75 |
|
sl@0
|
76 |
@param aState
|
sl@0
|
77 |
Current State of the Client
|
sl@0
|
78 |
@param aError
|
sl@0
|
79 |
Error code. The status of the current operation
|
sl@0
|
80 |
*/
|
sl@0
|
81 |
virtual void UpdateStateChange(TMVSState aState, TInt aError) = 0;
|
sl@0
|
82 |
|
sl@0
|
83 |
/**
|
sl@0
|
84 |
Called when the audio resource becomes available but only if the resource was previously unavailable (e.g. if
|
sl@0
|
85 |
the audio resource is available when the client registers, then this callback is not received).
|
sl@0
|
86 |
|
sl@0
|
87 |
@param aNotificationData
|
sl@0
|
88 |
The data that corresponds to the notification event
|
sl@0
|
89 |
*/
|
sl@0
|
90 |
virtual void MvsResourceNotification(const TDesC8& aNotificationData) = 0;
|
sl@0
|
91 |
|
sl@0
|
92 |
};
|
sl@0
|
93 |
|
sl@0
|
94 |
|
sl@0
|
95 |
/**
|
sl@0
|
96 |
@publishedPartner
|
sl@0
|
97 |
@prototype
|
sl@0
|
98 |
@test
|
sl@0
|
99 |
|
sl@0
|
100 |
Utility class that does fetching the existing controller plugins,the extensions
|
sl@0
|
101 |
supported by them and finding the type of the media file for the UI.
|
sl@0
|
102 |
*/
|
sl@0
|
103 |
class CMVSControllerPluginInfo: public CBase
|
sl@0
|
104 |
{
|
sl@0
|
105 |
public:
|
sl@0
|
106 |
IMPORT_C static CMVSControllerPluginInfo* NewL();
|
sl@0
|
107 |
IMPORT_C ~CMVSControllerPluginInfo();
|
sl@0
|
108 |
|
sl@0
|
109 |
IMPORT_C TInt GetPluginListL(CDesCArrayFlat* aDisplayNames, RArray<TUid>& aUidArray);
|
sl@0
|
110 |
IMPORT_C TInt GetAudioPluginListL(CDesCArrayFlat* aDisplayNames, RArray<TUid>& aUidArray,RArray<TUid>& aUidPlayArray, TDesC* aExt);
|
sl@0
|
111 |
IMPORT_C TInt GetVideoPluginListL(CDesCArrayFlat* aDisplayNames, RArray<TUid>& aUidArray, TDesC* aExt);
|
sl@0
|
112 |
IMPORT_C TInt GetExtensionListL(TBool aControllerUid, CDesCArrayFlat* aExtArray);
|
sl@0
|
113 |
IMPORT_C TUid GetMediaTypeL(TDesC& aFileName);
|
sl@0
|
114 |
IMPORT_C CMMFControllerImplementationInformation& GetControllerInfo(TUid aControllerUid);
|
sl@0
|
115 |
private:
|
sl@0
|
116 |
void CollectAudioControllersL(TDesC* aExt);
|
sl@0
|
117 |
void CollectAudioPlayControllersL(TDesC* aExt);
|
sl@0
|
118 |
void CollectVideoControllersL(TDesC* aExt);
|
sl@0
|
119 |
void ConstructL(); //populate iControllers
|
sl@0
|
120 |
CMVSControllerPluginInfo();
|
sl@0
|
121 |
void GetHeaderL(TDesC& aFileName, TDes8& aHeaderData);
|
sl@0
|
122 |
private:
|
sl@0
|
123 |
//list of controller info objects
|
sl@0
|
124 |
RMMFControllerImplInfoArray iControllers;
|
sl@0
|
125 |
RMMFControllerImplInfoArray iSupportedControllers;
|
sl@0
|
126 |
RArray<TUid> iUidArray;
|
sl@0
|
127 |
RMMFControllerImplInfoArray iAudioControllers;
|
sl@0
|
128 |
RMMFControllerImplInfoArray iVideoControllers;
|
sl@0
|
129 |
RMMFControllerImplInfoArray iAudioPlayControllers;
|
sl@0
|
130 |
RArray<TUid> iAudioUidArray;
|
sl@0
|
131 |
RArray<TUid> iAudioPlayUidArray;
|
sl@0
|
132 |
RArray<TUid> iVideoUidArray;
|
sl@0
|
133 |
RFileLogger iFileLogger;
|
sl@0
|
134 |
};
|
sl@0
|
135 |
|
sl@0
|
136 |
|
sl@0
|
137 |
#endif AGENTSUTILITY_H
|