0
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#ifndef DEVSOUNDADAPTATIONINFO_H
|
|
17 |
#define DEVSOUNDADAPTATIONINFO_H
|
|
18 |
|
|
19 |
/**
|
|
20 |
@publishedPartner
|
|
21 |
@released
|
|
22 |
@file
|
|
23 |
*/
|
|
24 |
|
|
25 |
// INCLUDES
|
|
26 |
|
|
27 |
#include <e32std.h>
|
|
28 |
#include <e32base.h>
|
|
29 |
#include <a3f/a3ffourcclookup.h>
|
|
30 |
|
|
31 |
class MA3FDevSoundAdaptationInfoObserver;
|
|
32 |
|
|
33 |
const TUid KTruePauseCustomInterfaceTypeUid = {0x1028643F};
|
|
34 |
|
|
35 |
/**
|
|
36 |
Custom interface class for query a3f adaptation about if resume is supported
|
|
37 |
*/
|
|
38 |
class MTruePauseCustomInterface
|
|
39 |
{
|
|
40 |
public:
|
|
41 |
/**
|
|
42 |
Returns ETrue when True Pause is supported.
|
|
43 |
*/
|
|
44 |
virtual TBool IsResumeSupported(TUid aCodecType, TUid aFormat) = 0;
|
|
45 |
};
|
|
46 |
|
|
47 |
|
|
48 |
// CLASS DECLARATION
|
|
49 |
|
|
50 |
/**
|
|
51 |
An interface to a A3FDevsoundAdaptationInfo.
|
|
52 |
A3FDevSoundAdaptationInfo is a replacable component that should correspond to the underlying
|
|
53 |
A3F adaptation, and provides information to the DevSound Adaptor information it cannot otherwise
|
|
54 |
obtain. If the underlying A3F adaptation changes, then potentially so should the implementation of
|
|
55 |
A3FDevSoundAdaptationInfo. Additionally the MaxGain and MaxVolume values should be set to reflect
|
|
56 |
those required for the specific product.
|
|
57 |
@lib devsoundadaptationinfo.lib
|
|
58 |
*/
|
|
59 |
class CA3FDevSoundAdaptationInfo : public CBase
|
|
60 |
{
|
|
61 |
public:
|
|
62 |
/**
|
|
63 |
Constructs and returns a pointer to a new CA3FDevSoundAdaptationInfo object.
|
|
64 |
Leaves on failure.
|
|
65 |
@return CA3FDevSoundAdaptationInfo* - on success, pointer to new class instance.
|
|
66 |
This call returns ownership, as in the standard NewL() pattern
|
|
67 |
*/
|
|
68 |
IMPORT_C static CA3FDevSoundAdaptationInfo* NewL(MA3FDevSoundAdaptationInfoObserver& aAdaptationInfoObserver, CFourCCConvertor& aFourCcConvertor);
|
|
69 |
|
|
70 |
/**
|
|
71 |
Destructor.
|
|
72 |
*/
|
|
73 |
~CA3FDevSoundAdaptationInfo();
|
|
74 |
|
|
75 |
/**
|
|
76 |
Requests Maximun Valid Gain/Volume. This is an asynchronous call. If error return is KErrNone,
|
|
77 |
the result will be returned in subsequent RequestMaxGainComplete() call.
|
|
78 |
@param aCodecType KUidAudioEncoder for MaxGain, KUidAudioDecoder for MaxVolume
|
|
79 |
@return KErrNone if successfull, else corresponding error code
|
|
80 |
*/
|
|
81 |
virtual TInt RequestMaxGain(TUid aCodecType)=0;
|
|
82 |
|
|
83 |
|
|
84 |
/**
|
|
85 |
Requests a list of supported FourCC codes. This is an asynchronous call. If error return is KErrNone,
|
|
86 |
the completion will be indicated by RequestSupportedFormatsComplete().
|
|
87 |
@param aCodecType KUidAudioEncoder for supported encoder formats, KUidAudioDecoder for supported decoder formats
|
|
88 |
@param aSupportedFormats The results are appended to this array.
|
|
89 |
@return KErrNone if successfull, else corresponding error code
|
|
90 |
*/
|
|
91 |
virtual TInt RequestSupportedFormats(TUid aCodecType, RArray<TUid>& aSupportedFormats)=0;
|
|
92 |
|
|
93 |
/**
|
|
94 |
Queries A3F adaptation about if True Pause is supported
|
|
95 |
the completion will be indicated by RequestSupportedFormatsComplete().
|
|
96 |
@param aCodecType KUidAudioEncoder for encoder format, KUidAudioDecoder for decoder format
|
|
97 |
@param aFormat The format to be queried
|
|
98 |
@return ETrue if True Pause is supported, EFalse otherwise
|
|
99 |
*/
|
|
100 |
inline TBool IsResumeSupported(TUid aCodecType, TUid aFormat);
|
|
101 |
|
|
102 |
|
|
103 |
protected:
|
|
104 |
/**
|
|
105 |
Constructor
|
|
106 |
*/
|
|
107 |
CA3FDevSoundAdaptationInfo();
|
|
108 |
};
|
|
109 |
|
|
110 |
inline TBool CA3FDevSoundAdaptationInfo::IsResumeSupported(TUid aCodecType, TUid aFormat)
|
|
111 |
{
|
|
112 |
TBool supported = EFalse;
|
|
113 |
|
|
114 |
// Extension pattern
|
|
115 |
TAny* interface = NULL;
|
|
116 |
TInt err = Extension_(KTruePauseCustomInterfaceTypeUid.iUid, interface, NULL);
|
|
117 |
if(err == KErrNone)
|
|
118 |
{
|
|
119 |
MTruePauseCustomInterface* truePause = static_cast<MTruePauseCustomInterface*>(interface);
|
|
120 |
supported = truePause->IsResumeSupported(aCodecType, aFormat);
|
|
121 |
}
|
|
122 |
return supported;
|
|
123 |
}
|
|
124 |
|
|
125 |
#endif // DEVSOUNDADAPTATIONINFO_H
|
|
126 |
|
|
127 |
//end of file
|
|
128 |
|