Sunshine master
Self-hosted game stream host for Moonlight.
PolicyConfig.h
Go to the documentation of this file.
1
9#pragma once
10
11// platform includes
12#include <mmdeviceapi.h>
13
14#ifdef __MINGW32__
15 #undef DEFINE_GUID
16 #ifdef __cplusplus
17 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) EXTERN_C const GUID DECLSPEC_SELECTANY name = {l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}
18 #else
19 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) const GUID DECLSPEC_SELECTANY name = {l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}
20 #endif
21
22DEFINE_GUID(IID_IPolicyConfig, 0xf8679f50, 0x850a, 0x41cf, 0x9c, 0x72, 0x43, 0x0f, 0x29, 0x02, 0x90, 0xc8);
23DEFINE_GUID(CLSID_CPolicyConfigClient, 0x870af99c, 0x171d, 0x4f9e, 0xaf, 0x0d, 0xe6, 0x3d, 0xf4, 0x0c, 0x2b, 0xc9);
24
25#endif
26
30#ifdef DOXYGEN
31class IPolicyConfig;
32#else
33interface DECLSPEC_UUID("f8679f50-850a-41cf-9c72-430f290290c8") IPolicyConfig;
34#endif
38#ifdef DOXYGEN
39class CPolicyConfigClient;
40#else
41class DECLSPEC_UUID("870af99c-171d-4f9e-af0d-e63df40c2bc9") CPolicyConfigClient;
42#endif
43// ----------------------------------------------------------------------------
44// class CPolicyConfigClient
45// {870af99c-171d-4f9e-af0d-e63df40c2bc9}
46//
47// interface IPolicyConfig
48// {f8679f50-850a-41cf-9c72-430f290290c8}
49//
50// Query interface:
51// CComPtr<IPolicyConfig> PolicyConfig;
52// PolicyConfig.CoCreateInstance(__uuidof(CPolicyConfigClient));
53//
54// @compatible: Windows 7 and Later
55// ----------------------------------------------------------------------------
56interface IPolicyConfig: public IUnknown {
57public:
63 virtual HRESULT GetMixFormat(
64 PCWSTR,
65 WAVEFORMATEX **
66 );
67
73 virtual HRESULT STDMETHODCALLTYPE GetDeviceFormat(
74 PCWSTR,
75 INT,
76 WAVEFORMATEX **
77 );
78
84 virtual HRESULT STDMETHODCALLTYPE ResetDeviceFormat(
85 PCWSTR
86 );
87
93 virtual HRESULT STDMETHODCALLTYPE
95 PCWSTR,
96 WAVEFORMATEX *,
97 WAVEFORMATEX *
98 );
99
105 virtual HRESULT STDMETHODCALLTYPE GetProcessingPeriod(
106 PCWSTR,
107 INT,
108 PINT64,
109 PINT64
110 );
111
117 virtual HRESULT STDMETHODCALLTYPE SetProcessingPeriod(
118 PCWSTR,
119 PINT64
120 );
121
127 virtual HRESULT STDMETHODCALLTYPE GetShareMode(
128 PCWSTR,
129 struct DeviceShareMode *
130 );
131
137 virtual HRESULT STDMETHODCALLTYPE SetShareMode(
138 PCWSTR,
139 struct DeviceShareMode *
140 );
141
147 virtual HRESULT STDMETHODCALLTYPE GetPropertyValue(
148 PCWSTR,
149 const PROPERTYKEY &,
150 PROPVARIANT *
151 );
152
158 virtual HRESULT STDMETHODCALLTYPE SetPropertyValue(
159 PCWSTR,
160 const PROPERTYKEY &,
161 PROPVARIANT *
162 );
163
171 virtual HRESULT STDMETHODCALLTYPE SetDefaultEndpoint(
172 PCWSTR wszDeviceId,
173 ERole eRole
174 );
175
181 virtual HRESULT STDMETHODCALLTYPE SetEndpointVisibility(
182 PCWSTR,
183 INT
184 );
185};
virtual HRESULT STDMETHODCALLTYPE SetPropertyValue(PCWSTR, const PROPERTYKEY &, PROPVARIANT *)
Set a property value for an endpoint.
virtual HRESULT STDMETHODCALLTYPE SetProcessingPeriod(PCWSTR, PINT64)
Set the processing period for an endpoint.
virtual HRESULT STDMETHODCALLTYPE GetProcessingPeriod(PCWSTR, INT, PINT64, PINT64)
Get the processing period for an endpoint.
virtual HRESULT STDMETHODCALLTYPE SetDefaultEndpoint(PCWSTR wszDeviceId, ERole eRole)
Set the default endpoint for a role.
interface WAVEFORMATEX **virtual HRESULT STDMETHODCALLTYPE GetDeviceFormat(PCWSTR, INT, WAVEFORMATEX **)
Get the device format for an endpoint.
virtual HRESULT STDMETHODCALLTYPE GetPropertyValue(PCWSTR, const PROPERTYKEY &, PROPVARIANT *)
Get a property value for an endpoint.
virtual HRESULT STDMETHODCALLTYPE GetShareMode(PCWSTR, struct DeviceShareMode *)
Get the share mode for an endpoint.
virtual HRESULT STDMETHODCALLTYPE SetEndpointVisibility(PCWSTR, INT)
Set endpoint visibility.
virtual HRESULT STDMETHODCALLTYPE SetDeviceFormat(PCWSTR, WAVEFORMATEX *, WAVEFORMATEX *)
Set the device format for an endpoint.
virtual HRESULT STDMETHODCALLTYPE ResetDeviceFormat(PCWSTR)
Reset the device format for an endpoint.
virtual HRESULT STDMETHODCALLTYPE SetShareMode(PCWSTR, struct DeviceShareMode *)
Set the share mode for an endpoint.