| 1 |
/* |
| 2 |
* Copyright (C) 2024 Mohamad Al-Jaf |
| 3 |
* |
| 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. |
| 8 |
* |
| 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. |
| 13 |
* |
| 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 |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifdef __WIDL__ |
| 20 |
#pragma winrt ns_prefix |
| 21 |
#endif |
| 22 |
|
| 23 |
import "inspectable.idl"; |
| 24 |
import "asyncinfo.idl"; |
| 25 |
import "eventtoken.idl"; |
| 26 |
import "windowscontracts.idl"; |
| 27 |
import "windows.foundation.idl"; |
| 28 |
import "windows.system.idl"; |
| 29 |
|
| 30 |
namespace Windows.Security.Authentication.OnlineId { |
| 31 |
typedef enum OnlineIdSystemTicketStatus OnlineIdSystemTicketStatus; |
| 32 |
|
| 33 |
interface IOnlineIdServiceTicketRequest; |
| 34 |
interface IOnlineIdServiceTicketRequestFactory; |
| 35 |
interface IOnlineIdSystemAuthenticatorForUser; |
| 36 |
interface IOnlineIdSystemAuthenticatorStatics; |
| 37 |
interface IOnlineIdSystemIdentity; |
| 38 |
interface IOnlineIdSystemTicketResult; |
| 39 |
|
| 40 |
runtimeclass OnlineIdServiceTicket; |
| 41 |
runtimeclass OnlineIdServiceTicketRequest; |
| 42 |
runtimeclass OnlineIdSystemAuthenticator; |
| 43 |
runtimeclass OnlineIdSystemAuthenticatorForUser; |
| 44 |
runtimeclass OnlineIdSystemIdentity; |
| 45 |
runtimeclass OnlineIdSystemTicketResult; |
| 46 |
|
| 47 |
declare { |
| 48 |
interface Windows.Foundation.Collections.IIterable<Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest *>; |
| 49 |
interface Windows.Foundation.Collections.IIterator<Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest *>; |
| 50 |
interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult *>; |
| 51 |
interface Windows.Foundation.IAsyncOperation<Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult *>; |
| 52 |
} |
| 53 |
|
| 54 |
[ |
| 55 |
contract(Windows.Foundation.UniversalApiContract, 4.0) |
| 56 |
] |
| 57 |
enum OnlineIdSystemTicketStatus |
| 58 |
{ |
| 59 |
Success = 0, |
| 60 |
Error = 1, |
| 61 |
ServiceConnectionError = 2, |
| 62 |
}; |
| 63 |
|
| 64 |
[ |
| 65 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 66 |
exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdServiceTicket), |
| 67 |
uuid(c95c547f-d781-4a94-acb8-c59874238c26) |
| 68 |
] |
| 69 |
interface IOnlineIdServiceTicket : IInspectable |
| 70 |
{ |
| 71 |
[propget] HRESULT Value([out, retval] HSTRING *value); |
| 72 |
[propget] HRESULT Request([out, retval] Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest **value); |
| 73 |
[propget] HRESULT ErrorCode([out, retval] INT32 *value); |
| 74 |
} |
| 75 |
|
| 76 |
[ |
| 77 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 78 |
exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest), |
| 79 |
uuid(297445d3-fb63-4135-8909-4e354c061466) |
| 80 |
] |
| 81 |
interface IOnlineIdServiceTicketRequest : IInspectable |
| 82 |
{ |
| 83 |
[propget] HRESULT Service([out, retval] HSTRING *value); |
| 84 |
[propget] HRESULT Policy([out, retval] HSTRING *value); |
| 85 |
} |
| 86 |
|
| 87 |
[ |
| 88 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 89 |
exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest), |
| 90 |
uuid(bebb0a08-9e73-4077-9614-08614c0bc245) |
| 91 |
] |
| 92 |
interface IOnlineIdServiceTicketRequestFactory : IInspectable |
| 93 |
{ |
| 94 |
HRESULT CreateOnlineIdServiceTicketRequest( |
| 95 |
[in] HSTRING service, [in] HSTRING policy, |
| 96 |
[out, retval] Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest **request |
| 97 |
); |
| 98 |
HRESULT CreateOnlineIdServiceTicketRequestAdvanced( |
| 99 |
[in] HSTRING service, |
| 100 |
[out, retval] Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest **request |
| 101 |
); |
| 102 |
} |
| 103 |
|
| 104 |
[ |
| 105 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 106 |
exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticatorForUser), |
| 107 |
uuid(5798befb-1de4-4186-a2e6-b563f86aaf44) |
| 108 |
] |
| 109 |
interface IOnlineIdSystemAuthenticatorForUser : IInspectable |
| 110 |
{ |
| 111 |
[overload("GetTicketAsync")] HRESULT GetTicketAsync( |
| 112 |
[in] Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest *request, |
| 113 |
[out, retval] Windows.Foundation.IAsyncOperation<Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult *> **operation |
| 114 |
); |
| 115 |
[propput] HRESULT ApplicationId([in] GUID value); |
| 116 |
[propget] HRESULT ApplicationId([out, retval] GUID *value); |
| 117 |
[propget] HRESULT User([out, retval] Windows.System.User **user); |
| 118 |
} |
| 119 |
|
| 120 |
[ |
| 121 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 122 |
exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticator), |
| 123 |
uuid(85047792-f634-41e3-96a4-5164e902c740) |
| 124 |
] |
| 125 |
interface IOnlineIdSystemAuthenticatorStatics : IInspectable |
| 126 |
{ |
| 127 |
[propget] HRESULT Default([out, retval] Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticatorForUser **value); |
| 128 |
HRESULT GetForUser([in] Windows.System.User *user, [out, retval] Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticatorForUser **value); |
| 129 |
} |
| 130 |
|
| 131 |
[ |
| 132 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 133 |
exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdSystemIdentity), |
| 134 |
uuid(743cd20d-b6ca-434d-8124-53ea12685307) |
| 135 |
] |
| 136 |
interface IOnlineIdSystemIdentity : IInspectable |
| 137 |
{ |
| 138 |
[propget] HRESULT Ticket([out, retval] Windows.Security.Authentication.OnlineId.OnlineIdServiceTicket **value); |
| 139 |
[propget] HRESULT Id([out, retval] HSTRING *value); |
| 140 |
} |
| 141 |
|
| 142 |
[ |
| 143 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 144 |
exclusiveto(Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult), |
| 145 |
uuid(db0a5ff8-b098-4acd-9d13-9e640652b5b6) |
| 146 |
] |
| 147 |
interface IOnlineIdSystemTicketResult : IInspectable |
| 148 |
{ |
| 149 |
[propget] HRESULT Identity([out, retval] Windows.Security.Authentication.OnlineId.OnlineIdSystemIdentity **value); |
| 150 |
[propget] HRESULT Status([out, retval] Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketStatus *value); |
| 151 |
[propget] HRESULT ExtendedError([out, retval] HRESULT *value); |
| 152 |
} |
| 153 |
|
| 154 |
[ |
| 155 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 156 |
marshaling_behavior(agile) |
| 157 |
] |
| 158 |
runtimeclass OnlineIdServiceTicket |
| 159 |
{ |
| 160 |
[default] interface Windows.Security.Authentication.OnlineId.IOnlineIdServiceTicket; |
| 161 |
} |
| 162 |
|
| 163 |
[ |
| 164 |
activatable(Windows.Security.Authentication.OnlineId.IOnlineIdServiceTicketRequestFactory, Windows.Foundation.UniversalApiContract, 1.0), |
| 165 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 166 |
marshaling_behavior(agile), |
| 167 |
threading(both) |
| 168 |
] |
| 169 |
runtimeclass OnlineIdServiceTicketRequest |
| 170 |
{ |
| 171 |
[default] interface Windows.Security.Authentication.OnlineId.IOnlineIdServiceTicketRequest; |
| 172 |
} |
| 173 |
|
| 174 |
[ |
| 175 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 176 |
marshaling_behavior(agile), |
| 177 |
static(Windows.Security.Authentication.OnlineId.IOnlineIdSystemAuthenticatorStatics, Windows.Foundation.UniversalApiContract, 4.0), |
| 178 |
threading(both) |
| 179 |
] |
| 180 |
runtimeclass OnlineIdSystemAuthenticator |
| 181 |
{ |
| 182 |
} |
| 183 |
|
| 184 |
[ |
| 185 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 186 |
marshaling_behavior(agile), |
| 187 |
threading(both) |
| 188 |
] |
| 189 |
runtimeclass OnlineIdSystemAuthenticatorForUser |
| 190 |
{ |
| 191 |
[default] interface Windows.Security.Authentication.OnlineId.IOnlineIdSystemAuthenticatorForUser; |
| 192 |
} |
| 193 |
|
| 194 |
[ |
| 195 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 196 |
marshaling_behavior(agile), |
| 197 |
threading(both) |
| 198 |
] |
| 199 |
runtimeclass OnlineIdSystemIdentity |
| 200 |
{ |
| 201 |
[default] interface Windows.Security.Authentication.OnlineId.IOnlineIdSystemIdentity; |
| 202 |
} |
| 203 |
|
| 204 |
[ |
| 205 |
contract(Windows.Foundation.UniversalApiContract, 4.0), |
| 206 |
marshaling_behavior(agile), |
| 207 |
threading(both) |
| 208 |
] |
| 209 |
runtimeclass OnlineIdSystemTicketResult |
| 210 |
{ |
| 211 |
[default] interface Windows.Security.Authentication.OnlineId.IOnlineIdSystemTicketResult; |
| 212 |
} |
| 213 |
} |