1 | /*
|
---|
2 | * Core Audio audio policy definitions
|
---|
3 | *
|
---|
4 | * Copyright 2009 Maarten Lankhorst
|
---|
5 | *
|
---|
6 | * This library is free software; you can redistribute it and/or
|
---|
7 | * modify it under the terms of the GNU Lesser General Public
|
---|
8 | * License as published by the Free Software Foundation; either
|
---|
9 | * version 2.1 of the License, or (at your option) any later version.
|
---|
10 | *
|
---|
11 | * This library is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
14 | * Lesser General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU Lesser General Public
|
---|
17 | * License along with this library; if not, write to the Free Software
|
---|
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
19 | *
|
---|
20 | */
|
---|
21 |
|
---|
22 | /*
|
---|
23 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
24 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
25 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
26 | * a choice of LGPL license versions is made available with the language indicating
|
---|
27 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
28 | * of the LGPL is applied is otherwise unspecified.
|
---|
29 | */
|
---|
30 |
|
---|
31 | import "oaidl.idl";
|
---|
32 | import "ocidl.idl";
|
---|
33 | import "propidl.idl";
|
---|
34 | import "audiosessiontypes.h";
|
---|
35 | import "audioclient.idl";
|
---|
36 |
|
---|
37 | interface IAudioSessionEvents;
|
---|
38 | interface IAudioSessionControl;
|
---|
39 | interface IAudioSessionControl2;
|
---|
40 | interface IAudioSessionManager;
|
---|
41 | interface IAudioVolumeDuckNotification;
|
---|
42 | interface IAudioSessionNotification;
|
---|
43 | interface IAudioSessionEnumerator;
|
---|
44 | interface IAudioSessionManager2;
|
---|
45 |
|
---|
46 | typedef enum AudioSessionDisconnectReason /*[local]*/
|
---|
47 | {
|
---|
48 | DisconnectReasonDeviceRemoval = 0,
|
---|
49 | DisconnectReasonServerShutdown,
|
---|
50 | DisconnectReasonFormatChanged,
|
---|
51 | DisconnectReasonSessionLogoff,
|
---|
52 | DisconnectReasonSessionDisconnected,
|
---|
53 | DisconnectReasonExclusiveModeOverride,
|
---|
54 | } AudioSessionDisconnectReason;
|
---|
55 |
|
---|
56 | [
|
---|
57 | local,
|
---|
58 | uuid(24918acc-64b3-37c1-8ca9-74a66e9957a8),
|
---|
59 | pointer_default(unique),
|
---|
60 | object
|
---|
61 | ]
|
---|
62 | interface IAudioSessionEvents : IUnknown
|
---|
63 | {
|
---|
64 | HRESULT OnDisplayNameChanged(
|
---|
65 | [string,in] LPCWSTR NewDisplayName,
|
---|
66 | [in] LPCGUID EventContext
|
---|
67 | );
|
---|
68 | HRESULT OnIconPathChanged(
|
---|
69 | [string,in] LPCWSTR NewIconPath,
|
---|
70 | [in] LPCGUID EventContext
|
---|
71 | );
|
---|
72 | HRESULT OnSimpleVolumeChanged(
|
---|
73 | [in] float NewVolume,
|
---|
74 | [in] BOOL NewMute,
|
---|
75 | [in] LPCGUID EventContext
|
---|
76 | );
|
---|
77 | HRESULT OnChannelVolumeChanged(
|
---|
78 | [in] DWORD ChannelCount,
|
---|
79 | [size_is(ChannelCount),in] float *NewChannelVolumeArray,
|
---|
80 | [in] DWORD ChangedChannel,
|
---|
81 | [in] LPCGUID EventContext
|
---|
82 | );
|
---|
83 | HRESULT OnGroupingParamChanged(
|
---|
84 | [in] LPCGUID NewGroupingParam,
|
---|
85 | [in] LPCGUID EventContext
|
---|
86 | );
|
---|
87 | HRESULT OnStateChanged(
|
---|
88 | [in] AudioSessionState NewState
|
---|
89 | );
|
---|
90 | HRESULT OnSessionDisconnected(
|
---|
91 | [in] AudioSessionDisconnectReason DisconnectReason
|
---|
92 | );
|
---|
93 | }
|
---|
94 |
|
---|
95 | [
|
---|
96 | local,
|
---|
97 | uuid(f4b1a599-7266-4319-a8ca-e70acb11e8cd),
|
---|
98 | pointer_default(unique),
|
---|
99 | object
|
---|
100 | ]
|
---|
101 | interface IAudioSessionControl : IUnknown
|
---|
102 | {
|
---|
103 | HRESULT GetState(
|
---|
104 | [out] AudioSessionState *pRetVal
|
---|
105 | );
|
---|
106 | HRESULT GetDisplayName(
|
---|
107 | [string,out] LPWSTR *pRetVal
|
---|
108 | );
|
---|
109 | HRESULT SetDisplayName(
|
---|
110 | [string,in] LPCWSTR DisplayName,
|
---|
111 | [unique,in] LPCGUID EventContext
|
---|
112 | );
|
---|
113 | HRESULT GetIconPath(
|
---|
114 | [string,out] LPWSTR *pRetVal
|
---|
115 | );
|
---|
116 | HRESULT SetIconPath(
|
---|
117 | [string,in] LPCWSTR Value,
|
---|
118 | [unique,in] LPCGUID EventContext
|
---|
119 | );
|
---|
120 | HRESULT GetGroupingParam(
|
---|
121 | [out] GUID *pRetVal
|
---|
122 | );
|
---|
123 | HRESULT SetGroupingParam(
|
---|
124 | [in] LPCGUID Override,
|
---|
125 | [unique,in] LPCGUID EventContext
|
---|
126 | );
|
---|
127 | HRESULT RegisterAudioSessionNotification(
|
---|
128 | [in] IAudioSessionEvents *NewNotifications
|
---|
129 | );
|
---|
130 | HRESULT UnregisterAudioSessionNotification(
|
---|
131 | [in] IAudioSessionEvents *NewNotifications
|
---|
132 | );
|
---|
133 | }
|
---|
134 |
|
---|
135 | [
|
---|
136 | local,
|
---|
137 | uuid(bfb7ff88-7239-4fc9-8fa2-07c950be9c6d),
|
---|
138 | pointer_default(unique),
|
---|
139 | object
|
---|
140 | ]
|
---|
141 | interface IAudioSessionControl2 : IAudioSessionControl
|
---|
142 | {
|
---|
143 | HRESULT GetSessionIdentifier(
|
---|
144 | [string,out] LPWSTR *pRetVal
|
---|
145 | );
|
---|
146 | HRESULT GetSessionInstanceIdentifier(
|
---|
147 | [string,out] LPWSTR *pRetVal
|
---|
148 | );
|
---|
149 | HRESULT GetProcessId(
|
---|
150 | [out] DWORD *pRetVal
|
---|
151 | );
|
---|
152 | HRESULT IsSystemSoundsSession(void);
|
---|
153 | HRESULT SetDuckingPreferences(
|
---|
154 | [in] BOOL optOut
|
---|
155 | );
|
---|
156 | };
|
---|
157 |
|
---|
158 | [
|
---|
159 | local,
|
---|
160 | uuid(bfa971f1-4d5e-40bb-935e-967039bfbee4),
|
---|
161 | pointer_default(unique),
|
---|
162 | object
|
---|
163 | ]
|
---|
164 | interface IAudioSessionManager : IUnknown
|
---|
165 | {
|
---|
166 | HRESULT GetAudioSessionControl(
|
---|
167 | [in] LPCGUID AudioSessionGuid,
|
---|
168 | [in] DWORD StreamFlags,
|
---|
169 | [out] IAudioSessionControl **SessionControl
|
---|
170 | );
|
---|
171 | HRESULT GetSimpleAudioVolume(
|
---|
172 | [in] LPCGUID AudioSessionGuid,
|
---|
173 | [in] DWORD StreamFlags,
|
---|
174 | [out] ISimpleAudioVolume **AudioVolume
|
---|
175 | );
|
---|
176 | };
|
---|
177 |
|
---|
178 | [
|
---|
179 | local,
|
---|
180 | uuid(c3b284d4-6d39-4359-b3cf-b56ddb3bb39c),
|
---|
181 | pointer_default(unique),
|
---|
182 | object
|
---|
183 | ]
|
---|
184 | interface IAudioVolumeDuckNotification : IUnknown
|
---|
185 | {
|
---|
186 | HRESULT OnVolumeDuckNotification(
|
---|
187 | [in] LPCWSTR sessionID,
|
---|
188 | [in] UINT32 countCommunicationSessions
|
---|
189 | );
|
---|
190 | HRESULT OnVolumeUnduckNotification(
|
---|
191 | [in] LPCWSTR sessionID
|
---|
192 | );
|
---|
193 | };
|
---|
194 |
|
---|
195 | [
|
---|
196 | local,
|
---|
197 | uuid(641dd20b-4d41-49cc-aba3-174b9477bb08),
|
---|
198 | pointer_default(unique),
|
---|
199 | object
|
---|
200 | ]
|
---|
201 | interface IAudioSessionNotification : IUnknown
|
---|
202 | {
|
---|
203 | HRESULT OnSessionCreated(
|
---|
204 | [in] IAudioSessionControl *NewSession
|
---|
205 | );
|
---|
206 | };
|
---|
207 |
|
---|
208 | [
|
---|
209 | local,
|
---|
210 | uuid(e2f5bb11-0570-40ca-acdd-3aa01277dee8),
|
---|
211 | pointer_default(unique),
|
---|
212 | object
|
---|
213 | ]
|
---|
214 | interface IAudioSessionEnumerator : IUnknown
|
---|
215 | {
|
---|
216 | HRESULT GetCount(
|
---|
217 | [out] INT *SessionCount
|
---|
218 | );
|
---|
219 | HRESULT GetSession(
|
---|
220 | [in] INT SessionCount,
|
---|
221 | [out] IAudioSessionControl **Session
|
---|
222 | );
|
---|
223 | };
|
---|
224 |
|
---|
225 | [
|
---|
226 | local,
|
---|
227 | uuid(77aa99a0-1bd6-484f-8bc7-2c654c9a9b6f),
|
---|
228 | pointer_default(unique),
|
---|
229 | object
|
---|
230 | ]
|
---|
231 | interface IAudioSessionManager2 : IAudioSessionManager
|
---|
232 | {
|
---|
233 | HRESULT GetSessionEnumerator(
|
---|
234 | [retval,out] IAudioSessionEnumerator **SessionEnum
|
---|
235 | );
|
---|
236 | HRESULT RegisterSessionNotification(
|
---|
237 | [in] IAudioSessionNotification *SessionNotification
|
---|
238 | );
|
---|
239 | HRESULT UnregisterSessionNotification(
|
---|
240 | [in] IAudioSessionNotification *SessionNotification
|
---|
241 | );
|
---|
242 | HRESULT RegisterDuckNotification(
|
---|
243 | [string,in] LPCWSTR sessionID,
|
---|
244 | [in] IAudioVolumeDuckNotification *duckNotification
|
---|
245 | );
|
---|
246 | HRESULT UnregisterDuckNotification(
|
---|
247 | [in] IAudioVolumeDuckNotification *duckNotification
|
---|
248 | );
|
---|
249 | };
|
---|