wined3d: Get rid of wined3d_surface_set_format().
[wine] / include / audiopolicy.idl
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 cpp_quote("#ifndef __audiopolicy_h__")
23 cpp_quote("#define __audiopolicy_h__")
24
25 import "oaidl.idl";
26 import "ocidl.idl";
27 import "propidl.idl";
28 import "audiosessiontypes.h";
29 import "audioclient.idl";
30
31 interface IAudioSessionEvents;
32 interface IAudioSessionControl;
33 interface IAudioSessionControl2;
34 interface IAudioSessionManager;
35 interface IAudioVolumeDuckNotification;
36 interface IAudioSessionNotification;
37 interface IAudioSessionEnumerator;
38 interface IAudioSessionManager2;
39
40 typedef enum AudioSessionDisconnectReason /*[local]*/
41 {
42     DisconnectReasonDeviceRemoval = 0,
43     DisconnectReasonServerShutdown,
44     DisconnectReasonFormatChanged,
45     DisconnectReasonSessionLogoff,
46     DisconnectReasonSessionDisconnected,
47     DisconnectReasonExclusiveModeOverride,
48 } AudioSessionDisconnectReason;
49
50 [
51     local,
52     uuid(24918acc-64b3-37c1-8ca9-74a66e9957a8),
53     pointer_default(unique),
54     object
55 ]
56 interface IAudioSessionEvents : IUnknown
57 {
58     HRESULT OnDisplayNameChanged(
59         [string,in] LPCWSTR NewDisplayName,
60         [in] LPCGUID EventContext
61     );
62     HRESULT OnIconPathChanged(
63         [string,in] LPCWSTR NewIconPath,
64         [in] LPCGUID EventContext
65     );
66     HRESULT OnSimpleVolumeChanged(
67         [in] float NewVolume,
68         [in] BOOL NewMute,
69         [in] LPCGUID EventContext
70     );
71     HRESULT OnChannelVolumeChanged(
72         [in] DWORD ChannelCount,
73         [size_is(ChannelCount),in] float *NewChannelVolumeArray,
74         [in] DWORD ChangedChannel,
75         [in] LPCGUID EventContext
76     );
77     HRESULT OnGroupingParamChanged(
78         [in] LPCGUID NewGroupingParam,
79         [in] LPCGUID EventContext
80     );
81     HRESULT OnStateChanged(
82         [in] AudioSessionState NewState
83     );
84     HRESULT OnSessionDisconnected(
85         [in] AudioSessionDisconnectReason DisconnectReason
86     );
87 }
88
89 [
90     local,
91     uuid(f4b1a599-7266-4319-a8ca-e70acb11e8cd),
92     pointer_default(unique),
93     object
94 ]
95 interface IAudioSessionControl : IUnknown
96 {
97     HRESULT GetState(
98         [out] AudioSessionState *pRetVal
99     );
100     HRESULT GetDisplayName(
101         [string,out] LPWSTR *pRetVal
102     );
103     HRESULT SetDisplayName(
104         [string,in] LPCWSTR DisplayName,
105         [unique,in] LPCGUID EventContext
106     );
107     HRESULT GetIconPath(
108         [string,out] LPWSTR *pRetVal
109     );
110     HRESULT SetIconPath(
111         [string,in] LPCWSTR Value,
112         [unique,in] LPCGUID EventContext
113     );
114     HRESULT GetGroupingParam(
115         [out] GUID *pRetVal
116     );
117     HRESULT SetGroupingParam(
118         [in] LPCGUID Override,
119         [unique,in] LPCGUID EventContext
120     );
121     HRESULT RegisterAudioSessionNotification(
122         [in] IAudioSessionEvents *NewNotifications
123     );
124     HRESULT UnregisterAudioSessionNotification(
125         [in] IAudioSessionEvents *NewNotifications
126     );
127 }
128
129 [
130     local,
131     uuid(bfb7ff88-7239-4fc9-8fa2-07c950be9c6d),
132     pointer_default(unique),
133     object
134 ]
135 interface IAudioSessionControl2 : IAudioSessionControl
136 {
137     HRESULT GetSessionIdentifier(
138         [string,out] LPWSTR *pRetVal
139     );
140     HRESULT GetSessionInstanceIdentifier(
141         [string,out] LPWSTR *pRetVal
142     );
143     HRESULT GetProcessId(
144         [out] DWORD *pRetVal
145     );
146     HRESULT IsSystemSoundsSession(void);
147     HRESULT SetDuckingPreferences(
148         [in] BOOL optOut
149     );
150 };
151
152 [
153     local,
154     uuid(bfa971f1-4d5e-40bb-935e-967039bfbee4),
155     pointer_default(unique),
156     object
157 ]
158 interface IAudioSessionManager : IUnknown
159 {
160     HRESULT GetAudioSessionControl(
161         [in] LPCGUID AudioSessionGuid,
162         [in] DWORD StreamFlags,
163         [out] IAudioSessionControl **SessionControl
164     );
165     HRESULT GetSimpleAudioVolume(
166         [in] LPCGUID AudioSessionGuid,
167         [in] DWORD StreamFlags,
168         [out] ISimpleAudioVolume **AudioVolume
169     );
170 };
171
172 [
173     local,
174     uuid(c3b284d4-6d39-4359-b3cf-b56ddb3bb39c),
175     pointer_default(unique),
176     object
177 ]
178 interface IAudioVolumeDuckNotification : IUnknown
179 {
180     HRESULT OnVolumeDuckNotification(
181         [in] LPCWSTR sessionID,
182         [in] UINT32 countCommunicationSessions
183     );
184     HRESULT OnVolumeUnduckNotification(
185         [in] LPCWSTR sessionID
186     );
187 };
188
189 [
190     local,
191     uuid(641dd20b-4d41-49cc-aba3-174b9477bb08),
192     pointer_default(unique),
193     object
194 ]
195 interface IAudioSessionNotification : IUnknown
196 {
197     HRESULT OnSessionCreated(
198         [in] IAudioSessionControl *NewSession
199     );
200 };
201
202 [
203     local,
204     uuid(e2f5bb11-0570-40ca-acdd-3aa01277dee8),
205     pointer_default(unique),
206     object
207 ]
208 interface IAudioSessionEnumerator : IUnknown
209 {
210     HRESULT GetCount(
211         [out] INT *SessionCount
212     );
213     HRESULT GetSession(
214         [in] INT SessionCount,
215         [out] IAudioSessionControl **Session
216     );
217 };
218
219 [
220     local,
221     uuid(77aa99a0-1bd6-484f-8bc7-2c654c9a9b6f),
222     pointer_default(unique),
223     object
224 ]
225 interface IAudioSessionManager2 : IAudioSessionManager
226 {
227     HRESULT GetSessionEnumerator(
228         [retval,out] IAudioSessionEnumerator **SessionEnum
229     );
230     HRESULT RegisterSessionNotification(
231         [in] IAudioSessionNotification *SessionNotification
232     );
233     HRESULT UnregisterSessionNotification(
234         [in] IAudioSessionNotification *SessionNotification
235     );
236     HRESULT RegisterDuckNotification(
237         [string,in] LPCWSTR sessionID,
238         [in] IAudioVolumeDuckNotification *duckNotification
239     );
240     HRESULT UnregisterDuckNotification(
241         [in] IAudioVolumeDuckNotification *duckNotification
242     );
243 };
244
245 cpp_quote("#endif /*__audiopolicy_h__*/")