sl@0
|
1 |
// Copyright (c) 2006-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 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef AUDIOSTREAMADAPTATION_H
|
sl@0
|
17 |
#define AUDIOSTREAMADAPTATION_H
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <e32base.h>
|
sl@0
|
20 |
#include <ecom/ecom.h>
|
sl@0
|
21 |
#include <badesca.h>
|
sl@0
|
22 |
#include <a3f/a3fbase.h>
|
sl@0
|
23 |
|
sl@0
|
24 |
/**
|
sl@0
|
25 |
@publishedAll
|
sl@0
|
26 |
@released
|
sl@0
|
27 |
|
sl@0
|
28 |
Implementation of the Audio Component Version
|
sl@0
|
29 |
|
sl@0
|
30 |
*/
|
sl@0
|
31 |
|
sl@0
|
32 |
class TAudioComponentInfo
|
sl@0
|
33 |
{
|
sl@0
|
34 |
TInt iVersion;
|
sl@0
|
35 |
};
|
sl@0
|
36 |
|
sl@0
|
37 |
/**
|
sl@0
|
38 |
@publishedAll
|
sl@0
|
39 |
@released
|
sl@0
|
40 |
|
sl@0
|
41 |
Implementation of the Stream Adaptation
|
sl@0
|
42 |
|
sl@0
|
43 |
*/
|
sl@0
|
44 |
|
sl@0
|
45 |
class MAudioStreamAdaptationObserver;
|
sl@0
|
46 |
class CFourCCConvertor;
|
sl@0
|
47 |
class MLogicalChain;
|
sl@0
|
48 |
class MAudioContext;
|
sl@0
|
49 |
|
sl@0
|
50 |
const TUid KAudioComponentManagerUid = {0x10283462};
|
sl@0
|
51 |
|
sl@0
|
52 |
// Messages flags
|
sl@0
|
53 |
const TInt KServerStopping = 0x01;
|
sl@0
|
54 |
const TInt KPreemptionRequest = 0x02;
|
sl@0
|
55 |
|
sl@0
|
56 |
/**
|
sl@0
|
57 |
@publishedAll
|
sl@0
|
58 |
@released
|
sl@0
|
59 |
|
sl@0
|
60 |
This is the interface to AudioStreamAdaptation.
|
sl@0
|
61 |
This is represent the stream loaded when the MMRC server
|
sl@0
|
62 |
selects the adaptation.
|
sl@0
|
63 |
|
sl@0
|
64 |
This functionality includes audio playback and recording using different formats
|
sl@0
|
65 |
CAudioStreamAdaptation provides the access point for clients to Adaptation Layer.
|
sl@0
|
66 |
It is responsible for initializing connections to various subsystems
|
sl@0
|
67 |
in audio adaptation. These include setting up and managing connection
|
sl@0
|
68 |
to the low level audio adaptation API implementations. The connections are then made
|
sl@0
|
69 |
available .
|
sl@0
|
70 |
*/
|
sl@0
|
71 |
class CAudioStreamAdaptation : public CBase
|
sl@0
|
72 |
{
|
sl@0
|
73 |
|
sl@0
|
74 |
public:
|
sl@0
|
75 |
|
sl@0
|
76 |
/**
|
sl@0
|
77 |
Constructs, and returns a pointer to, a new CAudioComponentManager object.
|
sl@0
|
78 |
|
sl@0
|
79 |
@return A pointer to the CAudioComponentManager instance.
|
sl@0
|
80 |
*/
|
sl@0
|
81 |
static CAudioStreamAdaptation* NewL(TUid aType);
|
sl@0
|
82 |
|
sl@0
|
83 |
/**
|
sl@0
|
84 |
Destructor.
|
sl@0
|
85 |
|
sl@0
|
86 |
Deletes all objects and releases all resource owned by this instance.
|
sl@0
|
87 |
*/
|
sl@0
|
88 |
virtual ~CAudioStreamAdaptation();
|
sl@0
|
89 |
|
sl@0
|
90 |
|
sl@0
|
91 |
/**
|
sl@0
|
92 |
Returns if a message was passed through the adaptation.
|
sl@0
|
93 |
|
sl@0
|
94 |
@param MLogicalChain
|
sl@0
|
95 |
Logical Current Chain
|
sl@0
|
96 |
@param MLogicalChain
|
sl@0
|
97 |
Desired Chain after message
|
sl@0
|
98 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
sl@0
|
99 |
another of the system-wide error codes.
|
sl@0
|
100 |
*/
|
sl@0
|
101 |
|
sl@0
|
102 |
virtual TInt Message(MLogicalChain& aCurrentChain, MLogicalChain& aDesiredChain, MAudioContext& aContext, TInt aFlags) = 0;
|
sl@0
|
103 |
|
sl@0
|
104 |
/**
|
sl@0
|
105 |
Returns if a Audio Stream Observer was Registered.
|
sl@0
|
106 |
|
sl@0
|
107 |
@param MAudioStreamAdaptationObserver
|
sl@0
|
108 |
Observer object witch will be registered
|
sl@0
|
109 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
sl@0
|
110 |
another of the system-wide error codes.
|
sl@0
|
111 |
*/
|
sl@0
|
112 |
|
sl@0
|
113 |
virtual TInt RegisterAudioStreamObserver(MAudioStreamAdaptationObserver& aObserver) = 0 ;
|
sl@0
|
114 |
|
sl@0
|
115 |
/**
|
sl@0
|
116 |
Returns if a Audio Stream Observer was UnRegistered.
|
sl@0
|
117 |
|
sl@0
|
118 |
@param MAudioStreamAdaptationObserver
|
sl@0
|
119 |
Observer object witch will be unregistered
|
sl@0
|
120 |
*/
|
sl@0
|
121 |
|
sl@0
|
122 |
virtual void UnregisterAudioStreamObserver(MAudioStreamAdaptationObserver& aObserver) = 0;
|
sl@0
|
123 |
|
sl@0
|
124 |
virtual void UnregisterAllAudioStreamObserver() = 0;
|
sl@0
|
125 |
|
sl@0
|
126 |
virtual void SetFourCC(const CFourCCConvertor& aFourCCConvertor) = 0;
|
sl@0
|
127 |
|
sl@0
|
128 |
|
sl@0
|
129 |
private:
|
sl@0
|
130 |
|
sl@0
|
131 |
/** iDtor_ID_Key Instance identifier key. When instance of an
|
sl@0
|
132 |
* implementation is created by ECOM framework, the
|
sl@0
|
133 |
* framework will assign UID for it. The UID is used in
|
sl@0
|
134 |
* destructor to notify framework that this instance is
|
sl@0
|
135 |
* being destroyed and resources can be released.
|
sl@0
|
136 |
*/
|
sl@0
|
137 |
TUid iDtor_ID_Key;
|
sl@0
|
138 |
};
|
sl@0
|
139 |
|
sl@0
|
140 |
#include "audiostreamadaptation.inl"
|
sl@0
|
141 |
|
sl@0
|
142 |
#endif // C_AUDIOCOMPONENTMANAGER_H
|