winrt-Windows.Security.DataProtection 2.0.1__tar.gz → 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/PKG-INFO +7 -7
- winrt_windows_security_dataprotection-2.2.0/all-requirements.txt +6 -0
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/py.Windows.Security.DataProtection.cpp +205 -124
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/pyproject.toml +3 -2
- winrt_windows_security_dataprotection-2.2.0/pywinrt-version.txt +1 -0
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/requirements.txt +2 -2
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/winrt/_winrt_windows_security_dataprotection.pyi +14 -14
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/winrt/windows/security/dataprotection/__init__.py +1 -1
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/winrt_Windows.Security.DataProtection.egg-info/PKG-INFO +7 -7
- winrt_windows_security_dataprotection-2.2.0/winrt_Windows.Security.DataProtection.egg-info/requires.txt +7 -0
- winrt_windows_security_dataprotection-2.0.1/all-requirements.txt +0 -6
- winrt_windows_security_dataprotection-2.0.1/pywinrt-version.txt +0 -1
- winrt_windows_security_dataprotection-2.0.1/winrt_Windows.Security.DataProtection.egg-info/requires.txt +0 -7
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/README.md +0 -0
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/setup.cfg +0 -0
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/setup.py +0 -0
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/winrt/windows/security/dataprotection/py.typed +0 -0
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/winrt_Windows.Security.DataProtection.egg-info/SOURCES.txt +0 -0
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/winrt_Windows.Security.DataProtection.egg-info/dependency_links.txt +0 -0
- {winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/winrt_Windows.Security.DataProtection.egg-info/top_level.txt +0 -0
{winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.Security.DataProtection
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
@@ -10,14 +10,14 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
|
-
Requires-Python: <3.
|
|
13
|
+
Requires-Python: <3.14,>=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: winrt-runtime==2.0
|
|
15
|
+
Requires-Dist: winrt-runtime==2.2.0
|
|
16
16
|
Provides-Extra: all
|
|
17
|
-
Requires-Dist: winrt-Windows.Foundation[all]==2.0
|
|
18
|
-
Requires-Dist: winrt-Windows.Storage[all]==2.0
|
|
19
|
-
Requires-Dist: winrt-Windows.Storage.Streams[all]==2.0
|
|
20
|
-
Requires-Dist: winrt-Windows.System[all]==2.0
|
|
17
|
+
Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
|
|
18
|
+
Requires-Dist: winrt-Windows.Storage[all]==2.2.0; extra == "all"
|
|
19
|
+
Requires-Dist: winrt-Windows.Storage.Streams[all]==2.2.0; extra == "all"
|
|
20
|
+
Requires-Dist: winrt-Windows.System[all]==2.2.0; extra == "all"
|
|
21
21
|
|
|
22
22
|
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
23
23
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0
|
|
1
|
+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
|
|
2
2
|
|
|
3
3
|
#include "py.Windows.Security.DataProtection.h"
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
namespace py::cpp::Windows::Security::DataProtection
|
|
7
6
|
{
|
|
8
7
|
// ----- UserDataAvailabilityStateChangedEventArgs class --------------------
|
|
@@ -28,14 +27,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
28
27
|
|
|
29
28
|
if (arg_count == 0)
|
|
30
29
|
{
|
|
31
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataAvailabilityStateChangedEventArgs", L"GetDeferral", 0))
|
|
32
|
-
{
|
|
33
|
-
py::set_arg_count_version_error(0);
|
|
34
|
-
return nullptr;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
30
|
try
|
|
38
31
|
{
|
|
32
|
+
static std::optional<bool> is_overload_present{};
|
|
33
|
+
|
|
34
|
+
if (!is_overload_present.has_value())
|
|
35
|
+
{
|
|
36
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataAvailabilityStateChangedEventArgs", L"GetDeferral", 0);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (!is_overload_present.value())
|
|
40
|
+
{
|
|
41
|
+
py::set_arg_count_version_error(0);
|
|
42
|
+
return nullptr;
|
|
43
|
+
}
|
|
44
|
+
|
|
39
45
|
return py::convert(self->obj.GetDeferral());
|
|
40
46
|
}
|
|
41
47
|
catch (...)
|
|
@@ -86,23 +92,20 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
86
92
|
{ }
|
|
87
93
|
};
|
|
88
94
|
|
|
89
|
-
static PyType_Slot _type_slots_UserDataAvailabilityStateChangedEventArgs[] =
|
|
90
|
-
{
|
|
95
|
+
static PyType_Slot _type_slots_UserDataAvailabilityStateChangedEventArgs[] = {
|
|
91
96
|
{ Py_tp_new, reinterpret_cast<void*>(_new_UserDataAvailabilityStateChangedEventArgs) },
|
|
92
97
|
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserDataAvailabilityStateChangedEventArgs) },
|
|
93
98
|
{ Py_tp_methods, reinterpret_cast<void*>(_methods_UserDataAvailabilityStateChangedEventArgs) },
|
|
94
99
|
{ Py_tp_getset, reinterpret_cast<void*>(_getset_UserDataAvailabilityStateChangedEventArgs) },
|
|
95
|
-
{ }
|
|
100
|
+
{ }
|
|
96
101
|
};
|
|
97
102
|
|
|
98
|
-
static PyType_Spec type_spec_UserDataAvailabilityStateChangedEventArgs =
|
|
99
|
-
{
|
|
103
|
+
static PyType_Spec type_spec_UserDataAvailabilityStateChangedEventArgs = {
|
|
100
104
|
"winrt._winrt_windows_security_dataprotection.UserDataAvailabilityStateChangedEventArgs",
|
|
101
105
|
sizeof(py::wrapper::Windows::Security::DataProtection::UserDataAvailabilityStateChangedEventArgs),
|
|
102
106
|
0,
|
|
103
107
|
Py_TPFLAGS_DEFAULT,
|
|
104
|
-
_type_slots_UserDataAvailabilityStateChangedEventArgs
|
|
105
|
-
};
|
|
108
|
+
_type_slots_UserDataAvailabilityStateChangedEventArgs};
|
|
106
109
|
|
|
107
110
|
// ----- UserDataBufferUnprotectResult class --------------------
|
|
108
111
|
|
|
@@ -123,14 +126,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
123
126
|
|
|
124
127
|
static PyObject* UserDataBufferUnprotectResult_get_Status(py::wrapper::Windows::Security::DataProtection::UserDataBufferUnprotectResult* self, void* /*unused*/) noexcept
|
|
125
128
|
{
|
|
126
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.DataProtection.UserDataBufferUnprotectResult", L"Status"))
|
|
127
|
-
{
|
|
128
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
129
|
-
return nullptr;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
129
|
try
|
|
133
130
|
{
|
|
131
|
+
static std::optional<bool> is_property_present{};
|
|
132
|
+
|
|
133
|
+
if (!is_property_present.has_value())
|
|
134
|
+
{
|
|
135
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.DataProtection.UserDataBufferUnprotectResult", L"Status");
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (!is_property_present.value())
|
|
139
|
+
{
|
|
140
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
141
|
+
return nullptr;
|
|
142
|
+
}
|
|
143
|
+
|
|
134
144
|
return py::convert(self->obj.Status());
|
|
135
145
|
}
|
|
136
146
|
catch (...)
|
|
@@ -142,14 +152,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
142
152
|
|
|
143
153
|
static PyObject* UserDataBufferUnprotectResult_get_UnprotectedBuffer(py::wrapper::Windows::Security::DataProtection::UserDataBufferUnprotectResult* self, void* /*unused*/) noexcept
|
|
144
154
|
{
|
|
145
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.DataProtection.UserDataBufferUnprotectResult", L"UnprotectedBuffer"))
|
|
146
|
-
{
|
|
147
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
148
|
-
return nullptr;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
155
|
try
|
|
152
156
|
{
|
|
157
|
+
static std::optional<bool> is_property_present{};
|
|
158
|
+
|
|
159
|
+
if (!is_property_present.has_value())
|
|
160
|
+
{
|
|
161
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.DataProtection.UserDataBufferUnprotectResult", L"UnprotectedBuffer");
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (!is_property_present.value())
|
|
165
|
+
{
|
|
166
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
167
|
+
return nullptr;
|
|
168
|
+
}
|
|
169
|
+
|
|
153
170
|
return py::convert(self->obj.UnprotectedBuffer());
|
|
154
171
|
}
|
|
155
172
|
catch (...)
|
|
@@ -195,23 +212,20 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
195
212
|
{ }
|
|
196
213
|
};
|
|
197
214
|
|
|
198
|
-
static PyType_Slot _type_slots_UserDataBufferUnprotectResult[] =
|
|
199
|
-
{
|
|
215
|
+
static PyType_Slot _type_slots_UserDataBufferUnprotectResult[] = {
|
|
200
216
|
{ Py_tp_new, reinterpret_cast<void*>(_new_UserDataBufferUnprotectResult) },
|
|
201
217
|
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserDataBufferUnprotectResult) },
|
|
202
218
|
{ Py_tp_methods, reinterpret_cast<void*>(_methods_UserDataBufferUnprotectResult) },
|
|
203
219
|
{ Py_tp_getset, reinterpret_cast<void*>(_getset_UserDataBufferUnprotectResult) },
|
|
204
|
-
{ }
|
|
220
|
+
{ }
|
|
205
221
|
};
|
|
206
222
|
|
|
207
|
-
static PyType_Spec type_spec_UserDataBufferUnprotectResult =
|
|
208
|
-
{
|
|
223
|
+
static PyType_Spec type_spec_UserDataBufferUnprotectResult = {
|
|
209
224
|
"winrt._winrt_windows_security_dataprotection.UserDataBufferUnprotectResult",
|
|
210
225
|
sizeof(py::wrapper::Windows::Security::DataProtection::UserDataBufferUnprotectResult),
|
|
211
226
|
0,
|
|
212
227
|
Py_TPFLAGS_DEFAULT,
|
|
213
|
-
_type_slots_UserDataBufferUnprotectResult
|
|
214
|
-
};
|
|
228
|
+
_type_slots_UserDataBufferUnprotectResult};
|
|
215
229
|
|
|
216
230
|
// ----- UserDataProtectionManager class --------------------
|
|
217
231
|
|
|
@@ -236,14 +250,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
236
250
|
|
|
237
251
|
if (arg_count == 1)
|
|
238
252
|
{
|
|
239
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"GetStorageItemProtectionInfoAsync", 1))
|
|
240
|
-
{
|
|
241
|
-
py::set_arg_count_version_error(1);
|
|
242
|
-
return nullptr;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
253
|
try
|
|
246
254
|
{
|
|
255
|
+
static std::optional<bool> is_overload_present{};
|
|
256
|
+
|
|
257
|
+
if (!is_overload_present.has_value())
|
|
258
|
+
{
|
|
259
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"GetStorageItemProtectionInfoAsync", 1);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (!is_overload_present.value())
|
|
263
|
+
{
|
|
264
|
+
py::set_arg_count_version_error(1);
|
|
265
|
+
return nullptr;
|
|
266
|
+
}
|
|
267
|
+
|
|
247
268
|
auto param0 = py::convert_to<winrt::Windows::Storage::IStorageItem>(args, 0);
|
|
248
269
|
|
|
249
270
|
return py::convert(self->obj.GetStorageItemProtectionInfoAsync(param0));
|
|
@@ -267,14 +288,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
267
288
|
|
|
268
289
|
if (arg_count == 1)
|
|
269
290
|
{
|
|
270
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"IsContinuedDataAvailabilityExpected", 1))
|
|
271
|
-
{
|
|
272
|
-
py::set_arg_count_version_error(1);
|
|
273
|
-
return nullptr;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
291
|
try
|
|
277
292
|
{
|
|
293
|
+
static std::optional<bool> is_overload_present{};
|
|
294
|
+
|
|
295
|
+
if (!is_overload_present.has_value())
|
|
296
|
+
{
|
|
297
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"IsContinuedDataAvailabilityExpected", 1);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (!is_overload_present.value())
|
|
301
|
+
{
|
|
302
|
+
py::set_arg_count_version_error(1);
|
|
303
|
+
return nullptr;
|
|
304
|
+
}
|
|
305
|
+
|
|
278
306
|
auto param0 = py::convert_to<winrt::Windows::Security::DataProtection::UserDataAvailability>(args, 0);
|
|
279
307
|
|
|
280
308
|
return py::convert(self->obj.IsContinuedDataAvailabilityExpected(param0));
|
|
@@ -298,14 +326,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
298
326
|
|
|
299
327
|
if (arg_count == 2)
|
|
300
328
|
{
|
|
301
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"ProtectBufferAsync", 2))
|
|
302
|
-
{
|
|
303
|
-
py::set_arg_count_version_error(2);
|
|
304
|
-
return nullptr;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
329
|
try
|
|
308
330
|
{
|
|
331
|
+
static std::optional<bool> is_overload_present{};
|
|
332
|
+
|
|
333
|
+
if (!is_overload_present.has_value())
|
|
334
|
+
{
|
|
335
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"ProtectBufferAsync", 2);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
if (!is_overload_present.value())
|
|
339
|
+
{
|
|
340
|
+
py::set_arg_count_version_error(2);
|
|
341
|
+
return nullptr;
|
|
342
|
+
}
|
|
343
|
+
|
|
309
344
|
auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 0);
|
|
310
345
|
auto param1 = py::convert_to<winrt::Windows::Security::DataProtection::UserDataAvailability>(args, 1);
|
|
311
346
|
|
|
@@ -330,14 +365,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
330
365
|
|
|
331
366
|
if (arg_count == 2)
|
|
332
367
|
{
|
|
333
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"ProtectStorageItemAsync", 2))
|
|
334
|
-
{
|
|
335
|
-
py::set_arg_count_version_error(2);
|
|
336
|
-
return nullptr;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
368
|
try
|
|
340
369
|
{
|
|
370
|
+
static std::optional<bool> is_overload_present{};
|
|
371
|
+
|
|
372
|
+
if (!is_overload_present.has_value())
|
|
373
|
+
{
|
|
374
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"ProtectStorageItemAsync", 2);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (!is_overload_present.value())
|
|
378
|
+
{
|
|
379
|
+
py::set_arg_count_version_error(2);
|
|
380
|
+
return nullptr;
|
|
381
|
+
}
|
|
382
|
+
|
|
341
383
|
auto param0 = py::convert_to<winrt::Windows::Storage::IStorageItem>(args, 0);
|
|
342
384
|
auto param1 = py::convert_to<winrt::Windows::Security::DataProtection::UserDataAvailability>(args, 1);
|
|
343
385
|
|
|
@@ -362,14 +404,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
362
404
|
|
|
363
405
|
if (arg_count == 0)
|
|
364
406
|
{
|
|
365
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"TryGetDefault", 0))
|
|
366
|
-
{
|
|
367
|
-
py::set_arg_count_version_error(0);
|
|
368
|
-
return nullptr;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
407
|
try
|
|
372
408
|
{
|
|
409
|
+
static std::optional<bool> is_overload_present{};
|
|
410
|
+
|
|
411
|
+
if (!is_overload_present.has_value())
|
|
412
|
+
{
|
|
413
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"TryGetDefault", 0);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
if (!is_overload_present.value())
|
|
417
|
+
{
|
|
418
|
+
py::set_arg_count_version_error(0);
|
|
419
|
+
return nullptr;
|
|
420
|
+
}
|
|
421
|
+
|
|
373
422
|
return py::convert(winrt::Windows::Security::DataProtection::UserDataProtectionManager::TryGetDefault());
|
|
374
423
|
}
|
|
375
424
|
catch (...)
|
|
@@ -391,14 +440,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
391
440
|
|
|
392
441
|
if (arg_count == 1)
|
|
393
442
|
{
|
|
394
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"TryGetForUser", 1))
|
|
395
|
-
{
|
|
396
|
-
py::set_arg_count_version_error(1);
|
|
397
|
-
return nullptr;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
443
|
try
|
|
401
444
|
{
|
|
445
|
+
static std::optional<bool> is_overload_present{};
|
|
446
|
+
|
|
447
|
+
if (!is_overload_present.has_value())
|
|
448
|
+
{
|
|
449
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"TryGetForUser", 1);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
if (!is_overload_present.value())
|
|
453
|
+
{
|
|
454
|
+
py::set_arg_count_version_error(1);
|
|
455
|
+
return nullptr;
|
|
456
|
+
}
|
|
457
|
+
|
|
402
458
|
auto param0 = py::convert_to<winrt::Windows::System::User>(args, 0);
|
|
403
459
|
|
|
404
460
|
return py::convert(winrt::Windows::Security::DataProtection::UserDataProtectionManager::TryGetForUser(param0));
|
|
@@ -422,14 +478,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
422
478
|
|
|
423
479
|
if (arg_count == 1)
|
|
424
480
|
{
|
|
425
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"UnprotectBufferAsync", 1))
|
|
426
|
-
{
|
|
427
|
-
py::set_arg_count_version_error(1);
|
|
428
|
-
return nullptr;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
481
|
try
|
|
432
482
|
{
|
|
483
|
+
static std::optional<bool> is_overload_present{};
|
|
484
|
+
|
|
485
|
+
if (!is_overload_present.has_value())
|
|
486
|
+
{
|
|
487
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"UnprotectBufferAsync", 1);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if (!is_overload_present.value())
|
|
491
|
+
{
|
|
492
|
+
py::set_arg_count_version_error(1);
|
|
493
|
+
return nullptr;
|
|
494
|
+
}
|
|
495
|
+
|
|
433
496
|
auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 0);
|
|
434
497
|
|
|
435
498
|
return py::convert(self->obj.UnprotectBufferAsync(param0));
|
|
@@ -449,14 +512,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
449
512
|
|
|
450
513
|
static PyObject* UserDataProtectionManager_add_DataAvailabilityStateChanged(py::wrapper::Windows::Security::DataProtection::UserDataProtectionManager* self, PyObject* arg) noexcept
|
|
451
514
|
{
|
|
452
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"DataAvailabilityStateChanged"))
|
|
453
|
-
{
|
|
454
|
-
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
455
|
-
return nullptr;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
515
|
try
|
|
459
516
|
{
|
|
517
|
+
static std::optional<bool> is_event_present{};
|
|
518
|
+
|
|
519
|
+
if (!is_event_present.has_value())
|
|
520
|
+
{
|
|
521
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"DataAvailabilityStateChanged");
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
if (!is_event_present.value())
|
|
525
|
+
{
|
|
526
|
+
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
527
|
+
return nullptr;
|
|
528
|
+
}
|
|
529
|
+
|
|
460
530
|
auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Security::DataProtection::UserDataProtectionManager, winrt::Windows::Security::DataProtection::UserDataAvailabilityStateChangedEventArgs>>(arg);
|
|
461
531
|
|
|
462
532
|
return py::convert(self->obj.DataAvailabilityStateChanged(param0));
|
|
@@ -470,14 +540,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
470
540
|
|
|
471
541
|
static PyObject* UserDataProtectionManager_remove_DataAvailabilityStateChanged(py::wrapper::Windows::Security::DataProtection::UserDataProtectionManager* self, PyObject* arg) noexcept
|
|
472
542
|
{
|
|
473
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"DataAvailabilityStateChanged"))
|
|
474
|
-
{
|
|
475
|
-
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
476
|
-
return nullptr;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
543
|
try
|
|
480
544
|
{
|
|
545
|
+
static std::optional<bool> is_event_present{};
|
|
546
|
+
|
|
547
|
+
if (!is_event_present.has_value())
|
|
548
|
+
{
|
|
549
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"DataAvailabilityStateChanged");
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if (!is_event_present.value())
|
|
553
|
+
{
|
|
554
|
+
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
555
|
+
return nullptr;
|
|
556
|
+
}
|
|
557
|
+
|
|
481
558
|
auto param0 = py::convert_to<winrt::event_token>(arg);
|
|
482
559
|
|
|
483
560
|
self->obj.DataAvailabilityStateChanged(param0);
|
|
@@ -531,23 +608,20 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
531
608
|
{ }
|
|
532
609
|
};
|
|
533
610
|
|
|
534
|
-
static PyType_Slot _type_slots_UserDataProtectionManager[] =
|
|
535
|
-
{
|
|
611
|
+
static PyType_Slot _type_slots_UserDataProtectionManager[] = {
|
|
536
612
|
{ Py_tp_new, reinterpret_cast<void*>(_new_UserDataProtectionManager) },
|
|
537
613
|
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserDataProtectionManager) },
|
|
538
614
|
{ Py_tp_methods, reinterpret_cast<void*>(_methods_UserDataProtectionManager) },
|
|
539
615
|
{ Py_tp_getset, reinterpret_cast<void*>(_getset_UserDataProtectionManager) },
|
|
540
|
-
{ }
|
|
616
|
+
{ }
|
|
541
617
|
};
|
|
542
618
|
|
|
543
|
-
static PyType_Spec type_spec_UserDataProtectionManager =
|
|
544
|
-
{
|
|
619
|
+
static PyType_Spec type_spec_UserDataProtectionManager = {
|
|
545
620
|
"winrt._winrt_windows_security_dataprotection.UserDataProtectionManager",
|
|
546
621
|
sizeof(py::wrapper::Windows::Security::DataProtection::UserDataProtectionManager),
|
|
547
622
|
0,
|
|
548
623
|
Py_TPFLAGS_DEFAULT,
|
|
549
|
-
_type_slots_UserDataProtectionManager
|
|
550
|
-
};
|
|
624
|
+
_type_slots_UserDataProtectionManager};
|
|
551
625
|
|
|
552
626
|
static PyGetSetDef getset_UserDataProtectionManager_Static[] = {
|
|
553
627
|
{ }
|
|
@@ -595,14 +669,21 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
595
669
|
|
|
596
670
|
static PyObject* UserDataStorageItemProtectionInfo_get_Availability(py::wrapper::Windows::Security::DataProtection::UserDataStorageItemProtectionInfo* self, void* /*unused*/) noexcept
|
|
597
671
|
{
|
|
598
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.DataProtection.UserDataStorageItemProtectionInfo", L"Availability"))
|
|
599
|
-
{
|
|
600
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
601
|
-
return nullptr;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
672
|
try
|
|
605
673
|
{
|
|
674
|
+
static std::optional<bool> is_property_present{};
|
|
675
|
+
|
|
676
|
+
if (!is_property_present.has_value())
|
|
677
|
+
{
|
|
678
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.DataProtection.UserDataStorageItemProtectionInfo", L"Availability");
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
if (!is_property_present.value())
|
|
682
|
+
{
|
|
683
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
684
|
+
return nullptr;
|
|
685
|
+
}
|
|
686
|
+
|
|
606
687
|
return py::convert(self->obj.Availability());
|
|
607
688
|
}
|
|
608
689
|
catch (...)
|
|
@@ -647,39 +728,35 @@ namespace py::cpp::Windows::Security::DataProtection
|
|
|
647
728
|
{ }
|
|
648
729
|
};
|
|
649
730
|
|
|
650
|
-
static PyType_Slot _type_slots_UserDataStorageItemProtectionInfo[] =
|
|
651
|
-
{
|
|
731
|
+
static PyType_Slot _type_slots_UserDataStorageItemProtectionInfo[] = {
|
|
652
732
|
{ Py_tp_new, reinterpret_cast<void*>(_new_UserDataStorageItemProtectionInfo) },
|
|
653
733
|
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserDataStorageItemProtectionInfo) },
|
|
654
734
|
{ Py_tp_methods, reinterpret_cast<void*>(_methods_UserDataStorageItemProtectionInfo) },
|
|
655
735
|
{ Py_tp_getset, reinterpret_cast<void*>(_getset_UserDataStorageItemProtectionInfo) },
|
|
656
|
-
{ }
|
|
736
|
+
{ }
|
|
657
737
|
};
|
|
658
738
|
|
|
659
|
-
static PyType_Spec type_spec_UserDataStorageItemProtectionInfo =
|
|
660
|
-
{
|
|
739
|
+
static PyType_Spec type_spec_UserDataStorageItemProtectionInfo = {
|
|
661
740
|
"winrt._winrt_windows_security_dataprotection.UserDataStorageItemProtectionInfo",
|
|
662
741
|
sizeof(py::wrapper::Windows::Security::DataProtection::UserDataStorageItemProtectionInfo),
|
|
663
742
|
0,
|
|
664
743
|
Py_TPFLAGS_DEFAULT,
|
|
665
|
-
_type_slots_UserDataStorageItemProtectionInfo
|
|
666
|
-
};
|
|
744
|
+
_type_slots_UserDataStorageItemProtectionInfo};
|
|
667
745
|
|
|
668
746
|
// ----- Windows.Security.DataProtection Initialization --------------------
|
|
669
|
-
PyDoc_STRVAR(module_doc, "Windows::Security::DataProtection");
|
|
670
747
|
|
|
748
|
+
PyDoc_STRVAR(module_doc, "Windows.Security.DataProtection");
|
|
671
749
|
|
|
672
|
-
static PyModuleDef module_def
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
750
|
+
static PyModuleDef module_def = {
|
|
751
|
+
PyModuleDef_HEAD_INIT,
|
|
752
|
+
"_winrt_windows_security_dataprotection",
|
|
753
|
+
module_doc,
|
|
754
|
+
0,
|
|
755
|
+
nullptr,
|
|
756
|
+
nullptr,
|
|
757
|
+
nullptr,
|
|
758
|
+
nullptr,
|
|
759
|
+
nullptr};
|
|
683
760
|
} // py::cpp::Windows::Security::DataProtection
|
|
684
761
|
|
|
685
762
|
PyMODINIT_FUNC PyInit__winrt_windows_security_dataprotection(void) noexcept
|
|
@@ -711,12 +788,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_security_dataprotection(void) noexcept
|
|
|
711
788
|
return nullptr;
|
|
712
789
|
}
|
|
713
790
|
|
|
714
|
-
|
|
791
|
+
py::pytype_handle UserDataAvailabilityStateChangedEventArgs_type{py::register_python_type(module.get(), &type_spec_UserDataAvailabilityStateChangedEventArgs, object_bases.get(), nullptr)};
|
|
792
|
+
if (!UserDataAvailabilityStateChangedEventArgs_type)
|
|
715
793
|
{
|
|
716
794
|
return nullptr;
|
|
717
795
|
}
|
|
718
796
|
|
|
719
|
-
|
|
797
|
+
py::pytype_handle UserDataBufferUnprotectResult_type{py::register_python_type(module.get(), &type_spec_UserDataBufferUnprotectResult, object_bases.get(), nullptr)};
|
|
798
|
+
if (!UserDataBufferUnprotectResult_type)
|
|
720
799
|
{
|
|
721
800
|
return nullptr;
|
|
722
801
|
}
|
|
@@ -727,12 +806,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_security_dataprotection(void) noexcept
|
|
|
727
806
|
return nullptr;
|
|
728
807
|
}
|
|
729
808
|
|
|
730
|
-
|
|
809
|
+
py::pytype_handle UserDataProtectionManager_type{py::register_python_type(module.get(), &type_spec_UserDataProtectionManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_UserDataProtectionManager_Static.get()))};
|
|
810
|
+
if (!UserDataProtectionManager_type)
|
|
731
811
|
{
|
|
732
812
|
return nullptr;
|
|
733
813
|
}
|
|
734
814
|
|
|
735
|
-
|
|
815
|
+
py::pytype_handle UserDataStorageItemProtectionInfo_type{py::register_python_type(module.get(), &type_spec_UserDataStorageItemProtectionInfo, object_bases.get(), nullptr)};
|
|
816
|
+
if (!UserDataStorageItemProtectionInfo_type)
|
|
736
817
|
{
|
|
737
818
|
return nullptr;
|
|
738
819
|
}
|
|
@@ -16,7 +16,7 @@ classifiers = [
|
|
|
16
16
|
"Intended Audience :: Developers",
|
|
17
17
|
]
|
|
18
18
|
dynamic = ["version", "dependencies", "optional-dependencies"]
|
|
19
|
-
requires-python = ">=3.9,<3.
|
|
19
|
+
requires-python = ">=3.9,<3.14"
|
|
20
20
|
|
|
21
21
|
[project.urls]
|
|
22
22
|
# Homepage = "https://github.com/pywinrt/pywinrt"
|
|
@@ -36,7 +36,8 @@ optional-dependencies.all = { file = "all-requirements.txt" }
|
|
|
36
36
|
# use local winrt-sdk build dependency
|
|
37
37
|
environment = { PYTHONPATH="../winrt-sdk/src" }
|
|
38
38
|
# don't install winrt-sdk from PyPI
|
|
39
|
-
build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
39
|
+
build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
40
|
+
before-build = "uv pip install setuptools"
|
|
40
41
|
# don't build for PyPy
|
|
41
42
|
skip = "pp*"
|
|
42
43
|
# suppress warnings about ARM64 testing
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.2.0
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
|
|
2
2
|
|
|
3
|
-
winrt-runtime==2.0
|
|
3
|
+
winrt-runtime==2.2.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
|
|
2
2
|
|
|
3
3
|
import datetime
|
|
4
4
|
import sys
|
|
@@ -9,10 +9,10 @@ from builtins import property as _property
|
|
|
9
9
|
|
|
10
10
|
import winrt._winrt
|
|
11
11
|
import winrt.system
|
|
12
|
-
import winrt.windows.foundation
|
|
13
|
-
import winrt.windows.storage
|
|
14
|
-
import winrt.windows.storage.streams
|
|
15
|
-
import winrt.windows.system
|
|
12
|
+
import winrt.windows.foundation as windows_foundation
|
|
13
|
+
import winrt.windows.storage as windows_storage
|
|
14
|
+
import winrt.windows.storage.streams as windows_storage_streams
|
|
15
|
+
import winrt.windows.system as windows_system
|
|
16
16
|
|
|
17
17
|
from winrt.windows.security.dataprotection import UserDataAvailability, UserDataBufferUnprotectStatus, UserDataStorageItemProtectionStatus
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ Self = typing.TypeVar('Self')
|
|
|
22
22
|
class UserDataAvailabilityStateChangedEventArgs(winrt.system.Object):
|
|
23
23
|
@staticmethod
|
|
24
24
|
def _from(obj: winrt.system.Object, /) -> UserDataAvailabilityStateChangedEventArgs: ...
|
|
25
|
-
def get_deferral(self) -> typing.Optional[
|
|
25
|
+
def get_deferral(self) -> typing.Optional[windows_foundation.Deferral]: ...
|
|
26
26
|
|
|
27
27
|
@typing.final
|
|
28
28
|
class UserDataBufferUnprotectResult(winrt.system.Object):
|
|
@@ -31,24 +31,24 @@ class UserDataBufferUnprotectResult(winrt.system.Object):
|
|
|
31
31
|
@_property
|
|
32
32
|
def status(self) -> UserDataBufferUnprotectStatus: ...
|
|
33
33
|
@_property
|
|
34
|
-
def unprotected_buffer(self) -> typing.Optional[
|
|
34
|
+
def unprotected_buffer(self) -> typing.Optional[windows_storage_streams.IBuffer]: ...
|
|
35
35
|
|
|
36
36
|
@typing.final
|
|
37
37
|
class UserDataProtectionManager_Static(type):
|
|
38
38
|
def try_get_default(cls) -> typing.Optional[UserDataProtectionManager]: ...
|
|
39
|
-
def try_get_for_user(cls, user: typing.Optional[
|
|
39
|
+
def try_get_for_user(cls, user: typing.Optional[windows_system.User], /) -> typing.Optional[UserDataProtectionManager]: ...
|
|
40
40
|
|
|
41
41
|
@typing.final
|
|
42
42
|
class UserDataProtectionManager(winrt.system.Object, metaclass=UserDataProtectionManager_Static):
|
|
43
43
|
@staticmethod
|
|
44
44
|
def _from(obj: winrt.system.Object, /) -> UserDataProtectionManager: ...
|
|
45
|
-
def get_storage_item_protection_info_async(self, storage_item: typing.Optional[
|
|
45
|
+
def get_storage_item_protection_info_async(self, storage_item: typing.Optional[windows_storage.IStorageItem], /) -> windows_foundation.IAsyncOperation[UserDataStorageItemProtectionInfo]: ...
|
|
46
46
|
def is_continued_data_availability_expected(self, availability: UserDataAvailability, /) -> bool: ...
|
|
47
|
-
def protect_buffer_async(self, unprotected_buffer: typing.Optional[
|
|
48
|
-
def protect_storage_item_async(self, storage_item: typing.Optional[
|
|
49
|
-
def unprotect_buffer_async(self, protected_buffer: typing.Optional[
|
|
50
|
-
def add_data_availability_state_changed(self, handler:
|
|
51
|
-
def remove_data_availability_state_changed(self, token:
|
|
47
|
+
def protect_buffer_async(self, unprotected_buffer: typing.Optional[windows_storage_streams.IBuffer], availability: UserDataAvailability, /) -> windows_foundation.IAsyncOperation[windows_storage_streams.IBuffer]: ...
|
|
48
|
+
def protect_storage_item_async(self, storage_item: typing.Optional[windows_storage.IStorageItem], availability: UserDataAvailability, /) -> windows_foundation.IAsyncOperation[UserDataStorageItemProtectionStatus]: ...
|
|
49
|
+
def unprotect_buffer_async(self, protected_buffer: typing.Optional[windows_storage_streams.IBuffer], /) -> windows_foundation.IAsyncOperation[UserDataBufferUnprotectResult]: ...
|
|
50
|
+
def add_data_availability_state_changed(self, handler: windows_foundation.TypedEventHandler[UserDataProtectionManager, UserDataAvailabilityStateChangedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
|
|
51
|
+
def remove_data_availability_state_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
|
|
52
52
|
|
|
53
53
|
@typing.final
|
|
54
54
|
class UserDataStorageItemProtectionInfo(winrt.system.Object):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.Security.DataProtection
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
@@ -10,14 +10,14 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
|
-
Requires-Python: <3.
|
|
13
|
+
Requires-Python: <3.14,>=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: winrt-runtime==2.0
|
|
15
|
+
Requires-Dist: winrt-runtime==2.2.0
|
|
16
16
|
Provides-Extra: all
|
|
17
|
-
Requires-Dist: winrt-Windows.Foundation[all]==2.0
|
|
18
|
-
Requires-Dist: winrt-Windows.Storage[all]==2.0
|
|
19
|
-
Requires-Dist: winrt-Windows.Storage.Streams[all]==2.0
|
|
20
|
-
Requires-Dist: winrt-Windows.System[all]==2.0
|
|
17
|
+
Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
|
|
18
|
+
Requires-Dist: winrt-Windows.Storage[all]==2.2.0; extra == "all"
|
|
19
|
+
Requires-Dist: winrt-Windows.Storage.Streams[all]==2.2.0; extra == "all"
|
|
20
|
+
Requires-Dist: winrt-Windows.System[all]==2.2.0; extra == "all"
|
|
21
21
|
|
|
22
22
|
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
23
23
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.0.1
|
|
File without changes
|
|
File without changes
|
{winrt_windows_security_dataprotection-2.0.1 → winrt_windows_security_dataprotection-2.2.0}/setup.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|