|
1 |
|
2 // MmfDevSoundCustomInterfaceSupport.h |
|
3 |
|
4 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
5 // All rights reserved. |
|
6 // This component and the accompanying materials are made available |
|
7 // under the terms of "Eclipse Public License v1.0" |
|
8 // which accompanies this distribution, and is available |
|
9 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 // |
|
11 // Initial Contributors: |
|
12 // Nokia Corporation - initial contribution. |
|
13 // |
|
14 // Contributors: |
|
15 // |
|
16 // Description: |
|
17 // |
|
18 |
|
19 /** |
|
20 @publishedPartner |
|
21 @released |
|
22 @file |
|
23 */ |
|
24 |
|
25 #ifndef MMFDEVSOUNDCUSTOMINTERFACESUPPORTCLASSES_H |
|
26 #define MMFDEVSOUNDCUSTOMINTERFACESUPPORTCLASSES_H |
|
27 |
|
28 const TUid KMmfUidDevSoundAudioResourceCustomInterface = {0x101FD9F3}; |
|
29 const TUid KMmfUidDevSoundEmptyBuffersCustomInterface = {0x1027379c}; |
|
30 const TUid KMmfUidDevSoundCancelInitializeCustomInterface = {0x102834D3}; |
|
31 const TUid KMmfUidDevSoundAudioClientThreadInfoCustomInterface = {0x102834A7}; |
|
32 |
|
33 |
|
34 /** |
|
35 Custom Interface class providing support for emptying the play buffers. |
|
36 */ |
|
37 class MMMFDevSoundEmptyBuffers |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 Empties the play buffers below DevSound without causing the codec to be deleted. |
|
43 |
|
44 @return An error code indicating if the function call was successful. KErrNone on success, KErrNotSupported |
|
45 if called in record mode, otherwise another of the system-wide error codes. |
|
46 */ |
|
47 virtual TInt EmptyBuffers() = 0; |
|
48 }; |
|
49 |
|
50 /** |
|
51 Custom Interface class providing support for canceling initialization. |
|
52 */ |
|
53 class MMMFDevSoundCancelInitialize |
|
54 { |
|
55 public: |
|
56 |
|
57 /** Cancels the initialization process of a CMMFDevSound object |
|
58 |
|
59 @return An error code indicating if the function call was successful. |
|
60 KErrNone on success, |
|
61 KerrNotReady if this is called before InitializeL() call or after |
|
62 the object has been initialized, |
|
63 */ |
|
64 virtual TInt CancelInitialize() = 0; |
|
65 }; |
|
66 |
|
67 /** |
|
68 Custom Interface class providing support for setting the client thread info for devsound. |
|
69 */ |
|
70 class MAudioClientThreadInfo |
|
71 { |
|
72 public: |
|
73 /** |
|
74 Set client thread info for devsound if plugin implementation requires this info |
|
75 |
|
76 @param aTid the required thread Id |
|
77 @return An error code indicating if the function call was successful. |
|
78 |
|
79 @capability MultimediaDD |
|
80 A process requires MultimediaDD capability to make this call. |
|
81 */ |
|
82 virtual TInt SetClientThreadInfo(TThreadId aTid) = 0; |
|
83 }; |
|
84 |
|
85 /*****************************************************************************/ |
|
86 /** |
|
87 UID associated with the Custom interface MMMFDevSoundGetTimePlayed |
|
88 */ |
|
89 const TUid KMmfUidDevSoundTimePlayedCustomInterface = {0x10285CE4}; |
|
90 |
|
91 /** |
|
92 This class provides an interface to querying current play time from DevSound. |
|
93 */ |
|
94 class MMMFDevSoundTimePlayed |
|
95 { |
|
96 public: |
|
97 /** Retrieves the current play time from the audio renderer. |
|
98 @param aTime |
|
99 A reference to TTimeIntervalMicroSeconds object which will be filled with the current play time by this function. |
|
100 @return An error code indicating if the function call was successful. |
|
101 KErrNone on success, |
|
102 KErrNotSupported if the underlying HwDevice does not support this custominterface |
|
103 */ |
|
104 virtual TInt GetTimePlayed(TTimeIntervalMicroSeconds& aTime) = 0; |
|
105 }; |
|
106 |
|
107 /*****************************************************************************/ |
|
108 /** |
|
109 UID associated with the Custom interface MMMFDevSoundQueryIgnoresUnderflow |
|
110 */ |
|
111 const TUid KMmfUidDevSoundQueryIgnoresUnderflowCustomInterface = {0x10285E7B}; |
|
112 |
|
113 /** |
|
114 This class provides an interface for querying DevSound whether it ignores the underflow errors from the sound driver. |
|
115 */ |
|
116 class MMMFDevSoundQueryIgnoresUnderflow |
|
117 { |
|
118 public: |
|
119 /** Queries the devsound whether it ignores the underflow errors from the sound driver |
|
120 @return ETrue if the devsound ignores all the underflow errors from the sound driver except for the last buffer. That means DevSound |
|
121 propagates the underflow error from sound driver to its clients only when client sets the last buffer flag on the CMMFBuffer type buffer. |
|
122 EFalse if devsound propagates the underflow errors from the sound driver in all the cases |
|
123 */ |
|
124 virtual TBool QueryIgnoresUnderflow() = 0; |
|
125 }; |
|
126 |
|
127 |
|
128 const TUid KMmfUidDevSoundTruePauseCustomInterface = {0x1028643E}; |
|
129 |
|
130 /** |
|
131 This class provides an interface to be able to Resume from DevSound. |
|
132 @publishedPartner |
|
133 @released |
|
134 */ |
|
135 class MMMFDevSoundTruePause |
|
136 { |
|
137 public: |
|
138 /** Queries the devsound whether it supports True Pause or not |
|
139 This call is only valid when DevSound is initialized |
|
140 @return ETrue if the current DevSound configuration does support this feature |
|
141 EFalse otherwise |
|
142 */ |
|
143 virtual TBool IsResumeSupported() = 0; |
|
144 |
|
145 /** Resume the playback, recording or tone playing that was paused |
|
146 @return An error code indicating if the function call was successful. |
|
147 KErrNone on success, |
|
148 KErrNotReady when is DevSound is not in pause |
|
149 KErrNotSupported if the DevSound configuration does support this feature |
|
150 */ |
|
151 virtual TInt Resume() = 0; |
|
152 }; |
|
153 |
|
154 |
|
155 #endif // MMFDEVSOUNDCUSTOMINTERFACESUPPORTCLASSES_H |