2 * Copyright (C) 2023 Mohamad Al-Jaf
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #pragma winrt ns_prefix
23 import
"inspectable.idl";
24 import
"asyncinfo.idl";
25 import
"eventtoken.idl";
26 import
"windowscontracts.idl";
27 import
"windows.foundation.idl";
29 namespace Windows.Devices.Radios
{
30 typedef enum RadioAccessStatus RadioAccessStatus
;
31 typedef enum RadioKind RadioKind
;
32 typedef enum RadioState RadioState
;
35 interface IRadioStatics
;
40 interface Windows.Foundation.Collections.IIterable
<Windows.Devices.Radios.Radio
*>;
41 interface Windows.Foundation.Collections.IIterator
<Windows.Devices.Radios.Radio
*>;
42 interface Windows.Foundation.Collections.IVectorView
<Windows.Devices.Radios.Radio
*>;
43 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Devices.Radios.Radio
*>;
44 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Devices.Radios.RadioAccessStatus
>;
45 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Foundation.Collections.IVectorView
<Windows.Devices.Radios.Radio
*> *>;
46 interface Windows.Foundation.IAsyncOperation
<Windows.Devices.Radios.Radio
*>;
47 interface Windows.Foundation.IAsyncOperation
<Windows.Devices.Radios.RadioAccessStatus
>;
48 interface Windows.Foundation.IAsyncOperation
<Windows.Foundation.Collections.IVectorView
<Windows.Devices.Radios.Radio
*> *>;
49 interface Windows.Foundation.TypedEventHandler
<Windows.Devices.Radios.Radio
*, IInspectable
*>;
53 contract
(Windows.Foundation.UniversalApiContract
, 1.0)
55 enum RadioAccessStatus
64 contract
(Windows.Foundation.UniversalApiContract
, 1.0)
76 contract
(Windows.Foundation.UniversalApiContract
, 1.0)
87 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
88 exclusiveto
(Windows.Devices.Radios.Radio
),
89 uuid(252118df
-b33e
-416a
-875f
-1cf38ae2d83e
)
91 interface IRadio
: IInspectable
93 HRESULT SetStateAsync
([in] Windows.Devices.Radios.RadioState value
,
94 [out, retval] Windows.Foundation.IAsyncOperation
<Windows.Devices.Radios.RadioAccessStatus
> **retval);
95 [eventadd
] HRESULT StateChanged
([in] Windows.Foundation.TypedEventHandler
<Windows.Devices.Radios.Radio
*, IInspectable
*> *handler
,
96 [out, retval] EventRegistrationToken
*cookie
);
97 [eventremove
] HRESULT StateChanged
([in] EventRegistrationToken cookie
);
98 [propget] HRESULT State
([out, retval] Windows.Devices.Radios.RadioState
**value
);
99 [propget] HRESULT Name
([out, retval] HSTRING
*value
);
100 [propget] HRESULT Kind
([out, retval] Windows.Devices.Radios.RadioKind
*value
);
104 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
105 exclusiveto
(Windows.Devices.Radios.Radio
),
106 uuid(5fb6a12e
-67cb
-46ae
-aae9
-65919f86eff4
)
108 interface IRadioStatics
: IInspectable
110 HRESULT GetRadiosAsync
([out, retval] Windows.Foundation.IAsyncOperation
<Windows.Foundation.Collections.IVectorView
<Windows.Devices.Radios.Radio
*> *> **value
);
111 HRESULT GetDeviceSelector
([out, retval] HSTRING
*selector
);
112 [overload
("FromIdAsync")] HRESULT FromIdAsync
([in] HSTRING
id, [out, retval] Windows.Foundation.IAsyncOperation
<Windows.Devices.Radios.Radio
*> **value
);
113 HRESULT RequestAccessAsync
([out, retval] Windows.Foundation.IAsyncOperation
<Windows.Devices.Radios.RadioAccessStatus
> **value
);
117 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
118 marshaling_behavior
(agile
),
119 static
(Windows.Devices.Radios.IRadioStatics
, Windows.Foundation.UniversalApiContract
, 1.0)
123 [default] interface Windows.Devices.Radios.IRadio
;