1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: RadioMgr.idl
//
//----------------------------------------------------------------------------
cpp_quote("//+-------------------------------------------------------------------------")
cpp_quote("//")
cpp_quote("// Microsoft Windows")
cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
cpp_quote("//")
cpp_quote("//--------------------------------------------------------------------------")
cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN8)")
import "oaidl.idl";
import "wtypes.idl";
interface IMediaRadioManager;
interface IRadioInstanceCollection;
interface IRadioInstance;
interface IMediaRadioManagerNotifySink;
typedef enum _DEVICE_RADIO_STATE
{
DRS_RADIO_ON = 0,
DRS_SW_RADIO_OFF = 1,
DRS_HW_RADIO_OFF = 2,
DRS_SW_HW_RADIO_OFF = 3,
DRS_HW_RADIO_ON_UNCONTROLLABLE = 4,
DRS_RADIO_INVALID = 5,
DRS_HW_RADIO_OFF_UNCONTROLLABLE = 6,
DRS_RADIO_MAX = DRS_HW_RADIO_OFF_UNCONTROLLABLE
} DEVICE_RADIO_STATE;
typedef enum _SYSTEM_RADIO_STATE
{
SRS_RADIO_ENABLED = 0,
SRS_RADIO_DISABLED = 1,
} SYSTEM_RADIO_STATE;
//+--------------------------------------------------------------------------------
// IMediaRadioManager -- Represents high level radio operations on each radio type.
// The object implementing this interface will implement a Connection point (IConnectionPoint)
// for IMediaRadioManagerNotifySink.
// Each IMediaRadioManager object controls several or no IRadioInstance objects.
[
local,
object,
uuid(6CFDCAB5-FC47-42A5-9241-074B58830E73),
pointer_default(unique)
]
interface IMediaRadioManager : IUnknown
{
HRESULT GetRadioInstances(
[out] IRadioInstanceCollection **ppCollection
);
HRESULT OnSystemRadioStateChange(
[in] SYSTEM_RADIO_STATE sysRadioState,
[in] UINT32 uTimeoutSec
);
};
//+---------------------------------------------------------------------------
// IRadioInstanceCollection -- a flat list of radio instances
//
[
local,
object,
uuid(E5791FAE-5665-4E0C-95BE-5FDE31644185),
pointer_default(unique)
]
interface IRadioInstanceCollection : IUnknown
{
HRESULT GetCount(
[out] UINT32 *pcInstance
);
HRESULT GetAt(
[in] UINT32 uIndex,
[out] IRadioInstance **ppRadioInstance
);
};
//+---------------------------------------------------------------------------
// IRadioInstance -- Interface to control specific radio instance
//
[
local,
object,
uuid(70AA1C9E-F2B4-4C61-86D3-6B9FB75FD1A2),
pointer_default(unique)
]
interface IRadioInstance : IUnknown
{
HRESULT GetRadioManagerSignature(
[out] GUID *pguidSignature
);
HRESULT GetInstanceSignature(
[out, string] BSTR *pbstrId
);
HRESULT GetFriendlyName(
[in] LCID lcid,
[out, string] BSTR *pbstrName
);
HRESULT GetRadioState(
[out] DEVICE_RADIO_STATE *pRadioState
);
HRESULT SetRadioState(
[in] DEVICE_RADIO_STATE radioState,
[in] UINT32 uTimeoutSec
);
BOOL IsMultiComm();
BOOL IsAssociatingDevice();
}
//+---------------------------------------------------------------------------
// IMediaRadioManagerNotifySink -- notify instance add/remove and radio state change event
//
[
local,
object,
uuid(89D81F5F-C147-49ED-A11C-77B20C31E7C9),
pointer_default(unique)
]
interface IMediaRadioManagerNotifySink : IUnknown
{
HRESULT OnInstanceAdd(
[in] IRadioInstance *pRadioInstance
);
HRESULT OnInstanceRemove(
[in, string] BSTR bstrRadioInstanceId
);
HRESULT OnInstanceRadioChange(
[in, string] BSTR bstrRadioInstanceId,
[in] DEVICE_RADIO_STATE radioState
);
};
cpp_quote("#endif // (NTDDI >= NTDDI_WIN8)")
|