Sunshine latest
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
27interface DECLSPEC_UUID("f8679f50-850a-41cf-9c72-430f290290c8") IPolicyConfig;
28class DECLSPEC_UUID("870af99c-171d-4f9e-af0d-e63df40c2bc9") CPolicyConfigClient;
29// ----------------------------------------------------------------------------
30// class CPolicyConfigClient
31// {870af99c-171d-4f9e-af0d-e63df40c2bc9}
32//
33// interface IPolicyConfig
34// {f8679f50-850a-41cf-9c72-430f290290c8}
35//
36// Query interface:
37// CComPtr<IPolicyConfig> PolicyConfig;
38// PolicyConfig.CoCreateInstance(__uuidof(CPolicyConfigClient));
39//
40// @compatible: Windows 7 and Later
41// ----------------------------------------------------------------------------
42interface IPolicyConfig: public IUnknown {
43public:
44 virtual HRESULT GetMixFormat(
45 PCWSTR,
46 WAVEFORMATEX **
47 );
48
49 virtual HRESULT STDMETHODCALLTYPE GetDeviceFormat(
50 PCWSTR,
51 INT,
52 WAVEFORMATEX **
53 );
54
55 virtual HRESULT STDMETHODCALLTYPE ResetDeviceFormat(
56 PCWSTR
57 );
58
59 virtual HRESULT STDMETHODCALLTYPE
60 SetDeviceFormat(
61 PCWSTR,
62 WAVEFORMATEX *,
63 WAVEFORMATEX *
64 );
65
66 virtual HRESULT STDMETHODCALLTYPE GetProcessingPeriod(
67 PCWSTR,
68 INT,
69 PINT64,
70 PINT64
71 );
72
73 virtual HRESULT STDMETHODCALLTYPE SetProcessingPeriod(
74 PCWSTR,
75 PINT64
76 );
77
78 virtual HRESULT STDMETHODCALLTYPE GetShareMode(
79 PCWSTR,
80 struct DeviceShareMode *
81 );
82
83 virtual HRESULT STDMETHODCALLTYPE SetShareMode(
84 PCWSTR,
85 struct DeviceShareMode *
86 );
87
88 virtual HRESULT STDMETHODCALLTYPE GetPropertyValue(
89 PCWSTR,
90 const PROPERTYKEY &,
91 PROPVARIANT *
92 );
93
94 virtual HRESULT STDMETHODCALLTYPE SetPropertyValue(
95 PCWSTR,
96 const PROPERTYKEY &,
97 PROPVARIANT *
98 );
99
100 virtual HRESULT STDMETHODCALLTYPE SetDefaultEndpoint(
101 PCWSTR wszDeviceId,
102 ERole eRole
103 );
104
105 virtual HRESULT STDMETHODCALLTYPE SetEndpointVisibility(
106 PCWSTR,
107 INT
108 );
109};