winrt-Windows.Security.DataProtection 2.0.0b2__tar.gz → 2.1.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.
Files changed (21) hide show
  1. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/PKG-INFO +6 -1
  2. winrt_windows_security_dataprotection-2.1.0/all-requirements.txt +6 -0
  3. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/py.Windows.Security.DataProtection.cpp +106 -120
  4. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/pyproject.toml +2 -2
  5. winrt_windows_security_dataprotection-2.1.0/pywinrt-version.txt +1 -0
  6. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/requirements.txt +2 -2
  7. winrt_windows_security_dataprotection-2.1.0/setup.py +31 -0
  8. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/winrt/_winrt_windows_security_dataprotection.pyi +14 -14
  9. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/winrt/windows/security/dataprotection/__init__.py +1 -1
  10. winrt_windows_security_dataprotection-2.1.0/winrt/windows/security/dataprotection/py.typed +0 -0
  11. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/winrt_Windows.Security.DataProtection.egg-info/PKG-INFO +6 -1
  12. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/winrt_Windows.Security.DataProtection.egg-info/SOURCES.txt +1 -0
  13. winrt_windows_security_dataprotection-2.1.0/winrt_Windows.Security.DataProtection.egg-info/requires.txt +7 -0
  14. winrt-Windows.Security.DataProtection-2.0.0b2/all-requirements.txt +0 -6
  15. winrt-Windows.Security.DataProtection-2.0.0b2/pywinrt-version.txt +0 -1
  16. winrt-Windows.Security.DataProtection-2.0.0b2/setup.py +0 -16
  17. winrt-Windows.Security.DataProtection-2.0.0b2/winrt_Windows.Security.DataProtection.egg-info/requires.txt +0 -7
  18. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/README.md +0 -0
  19. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/setup.cfg +0 -0
  20. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/winrt_Windows.Security.DataProtection.egg-info/dependency_links.txt +0 -0
  21. {winrt-Windows.Security.DataProtection-2.0.0b2 → winrt_windows_security_dataprotection-2.1.0}/winrt_Windows.Security.DataProtection.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Security.DataProtection
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,7 +12,12 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
15
16
  Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Storage[all]==2.1.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Storage.Streams[all]==2.1.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.System[all]==2.1.0; extra == "all"
16
21
 
17
22
  <!-- warning: Please don't edit this file. It was automatically generated. -->
18
23
 
@@ -0,0 +1,6 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
+
3
+ winrt-Windows.Foundation[all]==2.1.0
4
+ winrt-Windows.Storage[all]==2.1.0
5
+ winrt-Windows.Storage.Streams[all]==2.1.0
6
+ winrt-Windows.System[all]==2.1.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.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,14 @@ 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
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataAvailabilityStateChangedEventArgs", L"GetDeferral", 0))
33
+ {
34
+ py::set_arg_count_version_error(0);
35
+ return nullptr;
36
+ }
37
+
39
38
  return py::convert(self->obj.GetDeferral());
40
39
  }
41
40
  catch (...)
@@ -86,23 +85,20 @@ namespace py::cpp::Windows::Security::DataProtection
86
85
  { }
87
86
  };
88
87
 
89
- static PyType_Slot _type_slots_UserDataAvailabilityStateChangedEventArgs[] =
90
- {
88
+ static PyType_Slot _type_slots_UserDataAvailabilityStateChangedEventArgs[] = {
91
89
  { Py_tp_new, reinterpret_cast<void*>(_new_UserDataAvailabilityStateChangedEventArgs) },
92
90
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserDataAvailabilityStateChangedEventArgs) },
93
91
  { Py_tp_methods, reinterpret_cast<void*>(_methods_UserDataAvailabilityStateChangedEventArgs) },
94
92
  { Py_tp_getset, reinterpret_cast<void*>(_getset_UserDataAvailabilityStateChangedEventArgs) },
95
- { },
93
+ { }
96
94
  };
97
95
 
98
- static PyType_Spec type_spec_UserDataAvailabilityStateChangedEventArgs =
99
- {
96
+ static PyType_Spec type_spec_UserDataAvailabilityStateChangedEventArgs = {
100
97
  "winrt._winrt_windows_security_dataprotection.UserDataAvailabilityStateChangedEventArgs",
101
98
  sizeof(py::wrapper::Windows::Security::DataProtection::UserDataAvailabilityStateChangedEventArgs),
102
99
  0,
103
100
  Py_TPFLAGS_DEFAULT,
104
- _type_slots_UserDataAvailabilityStateChangedEventArgs
105
- };
101
+ _type_slots_UserDataAvailabilityStateChangedEventArgs};
106
102
 
107
103
  // ----- UserDataBufferUnprotectResult class --------------------
108
104
 
@@ -123,14 +119,14 @@ namespace py::cpp::Windows::Security::DataProtection
123
119
 
124
120
  static PyObject* UserDataBufferUnprotectResult_get_Status(py::wrapper::Windows::Security::DataProtection::UserDataBufferUnprotectResult* self, void* /*unused*/) noexcept
125
121
  {
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
122
  try
133
123
  {
124
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.DataProtection.UserDataBufferUnprotectResult", L"Status"))
125
+ {
126
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
127
+ return nullptr;
128
+ }
129
+
134
130
  return py::convert(self->obj.Status());
135
131
  }
136
132
  catch (...)
@@ -142,14 +138,14 @@ namespace py::cpp::Windows::Security::DataProtection
142
138
 
143
139
  static PyObject* UserDataBufferUnprotectResult_get_UnprotectedBuffer(py::wrapper::Windows::Security::DataProtection::UserDataBufferUnprotectResult* self, void* /*unused*/) noexcept
144
140
  {
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
141
  try
152
142
  {
143
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.DataProtection.UserDataBufferUnprotectResult", L"UnprotectedBuffer"))
144
+ {
145
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
146
+ return nullptr;
147
+ }
148
+
153
149
  return py::convert(self->obj.UnprotectedBuffer());
154
150
  }
155
151
  catch (...)
@@ -195,23 +191,20 @@ namespace py::cpp::Windows::Security::DataProtection
195
191
  { }
196
192
  };
197
193
 
198
- static PyType_Slot _type_slots_UserDataBufferUnprotectResult[] =
199
- {
194
+ static PyType_Slot _type_slots_UserDataBufferUnprotectResult[] = {
200
195
  { Py_tp_new, reinterpret_cast<void*>(_new_UserDataBufferUnprotectResult) },
201
196
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserDataBufferUnprotectResult) },
202
197
  { Py_tp_methods, reinterpret_cast<void*>(_methods_UserDataBufferUnprotectResult) },
203
198
  { Py_tp_getset, reinterpret_cast<void*>(_getset_UserDataBufferUnprotectResult) },
204
- { },
199
+ { }
205
200
  };
206
201
 
207
- static PyType_Spec type_spec_UserDataBufferUnprotectResult =
208
- {
202
+ static PyType_Spec type_spec_UserDataBufferUnprotectResult = {
209
203
  "winrt._winrt_windows_security_dataprotection.UserDataBufferUnprotectResult",
210
204
  sizeof(py::wrapper::Windows::Security::DataProtection::UserDataBufferUnprotectResult),
211
205
  0,
212
206
  Py_TPFLAGS_DEFAULT,
213
- _type_slots_UserDataBufferUnprotectResult
214
- };
207
+ _type_slots_UserDataBufferUnprotectResult};
215
208
 
216
209
  // ----- UserDataProtectionManager class --------------------
217
210
 
@@ -236,14 +229,14 @@ namespace py::cpp::Windows::Security::DataProtection
236
229
 
237
230
  if (arg_count == 1)
238
231
  {
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
232
  try
246
233
  {
234
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"GetStorageItemProtectionInfoAsync", 1))
235
+ {
236
+ py::set_arg_count_version_error(1);
237
+ return nullptr;
238
+ }
239
+
247
240
  auto param0 = py::convert_to<winrt::Windows::Storage::IStorageItem>(args, 0);
248
241
 
249
242
  return py::convert(self->obj.GetStorageItemProtectionInfoAsync(param0));
@@ -267,14 +260,14 @@ namespace py::cpp::Windows::Security::DataProtection
267
260
 
268
261
  if (arg_count == 1)
269
262
  {
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
263
  try
277
264
  {
265
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"IsContinuedDataAvailabilityExpected", 1))
266
+ {
267
+ py::set_arg_count_version_error(1);
268
+ return nullptr;
269
+ }
270
+
278
271
  auto param0 = py::convert_to<winrt::Windows::Security::DataProtection::UserDataAvailability>(args, 0);
279
272
 
280
273
  return py::convert(self->obj.IsContinuedDataAvailabilityExpected(param0));
@@ -298,14 +291,14 @@ namespace py::cpp::Windows::Security::DataProtection
298
291
 
299
292
  if (arg_count == 2)
300
293
  {
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
294
  try
308
295
  {
296
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"ProtectBufferAsync", 2))
297
+ {
298
+ py::set_arg_count_version_error(2);
299
+ return nullptr;
300
+ }
301
+
309
302
  auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 0);
310
303
  auto param1 = py::convert_to<winrt::Windows::Security::DataProtection::UserDataAvailability>(args, 1);
311
304
 
@@ -330,14 +323,14 @@ namespace py::cpp::Windows::Security::DataProtection
330
323
 
331
324
  if (arg_count == 2)
332
325
  {
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
326
  try
340
327
  {
328
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"ProtectStorageItemAsync", 2))
329
+ {
330
+ py::set_arg_count_version_error(2);
331
+ return nullptr;
332
+ }
333
+
341
334
  auto param0 = py::convert_to<winrt::Windows::Storage::IStorageItem>(args, 0);
342
335
  auto param1 = py::convert_to<winrt::Windows::Security::DataProtection::UserDataAvailability>(args, 1);
343
336
 
@@ -362,14 +355,14 @@ namespace py::cpp::Windows::Security::DataProtection
362
355
 
363
356
  if (arg_count == 0)
364
357
  {
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
358
  try
372
359
  {
360
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"TryGetDefault", 0))
361
+ {
362
+ py::set_arg_count_version_error(0);
363
+ return nullptr;
364
+ }
365
+
373
366
  return py::convert(winrt::Windows::Security::DataProtection::UserDataProtectionManager::TryGetDefault());
374
367
  }
375
368
  catch (...)
@@ -391,14 +384,14 @@ namespace py::cpp::Windows::Security::DataProtection
391
384
 
392
385
  if (arg_count == 1)
393
386
  {
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
387
  try
401
388
  {
389
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"TryGetForUser", 1))
390
+ {
391
+ py::set_arg_count_version_error(1);
392
+ return nullptr;
393
+ }
394
+
402
395
  auto param0 = py::convert_to<winrt::Windows::System::User>(args, 0);
403
396
 
404
397
  return py::convert(winrt::Windows::Security::DataProtection::UserDataProtectionManager::TryGetForUser(param0));
@@ -422,14 +415,14 @@ namespace py::cpp::Windows::Security::DataProtection
422
415
 
423
416
  if (arg_count == 1)
424
417
  {
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
418
  try
432
419
  {
420
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"UnprotectBufferAsync", 1))
421
+ {
422
+ py::set_arg_count_version_error(1);
423
+ return nullptr;
424
+ }
425
+
433
426
  auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 0);
434
427
 
435
428
  return py::convert(self->obj.UnprotectBufferAsync(param0));
@@ -449,14 +442,14 @@ namespace py::cpp::Windows::Security::DataProtection
449
442
 
450
443
  static PyObject* UserDataProtectionManager_add_DataAvailabilityStateChanged(py::wrapper::Windows::Security::DataProtection::UserDataProtectionManager* self, PyObject* arg) noexcept
451
444
  {
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
445
  try
459
446
  {
447
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"DataAvailabilityStateChanged"))
448
+ {
449
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
450
+ return nullptr;
451
+ }
452
+
460
453
  auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Security::DataProtection::UserDataProtectionManager, winrt::Windows::Security::DataProtection::UserDataAvailabilityStateChangedEventArgs>>(arg);
461
454
 
462
455
  return py::convert(self->obj.DataAvailabilityStateChanged(param0));
@@ -470,14 +463,14 @@ namespace py::cpp::Windows::Security::DataProtection
470
463
 
471
464
  static PyObject* UserDataProtectionManager_remove_DataAvailabilityStateChanged(py::wrapper::Windows::Security::DataProtection::UserDataProtectionManager* self, PyObject* arg) noexcept
472
465
  {
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
466
  try
480
467
  {
468
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.DataProtection.UserDataProtectionManager", L"DataAvailabilityStateChanged"))
469
+ {
470
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
471
+ return nullptr;
472
+ }
473
+
481
474
  auto param0 = py::convert_to<winrt::event_token>(arg);
482
475
 
483
476
  self->obj.DataAvailabilityStateChanged(param0);
@@ -531,23 +524,20 @@ namespace py::cpp::Windows::Security::DataProtection
531
524
  { }
532
525
  };
533
526
 
534
- static PyType_Slot _type_slots_UserDataProtectionManager[] =
535
- {
527
+ static PyType_Slot _type_slots_UserDataProtectionManager[] = {
536
528
  { Py_tp_new, reinterpret_cast<void*>(_new_UserDataProtectionManager) },
537
529
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserDataProtectionManager) },
538
530
  { Py_tp_methods, reinterpret_cast<void*>(_methods_UserDataProtectionManager) },
539
531
  { Py_tp_getset, reinterpret_cast<void*>(_getset_UserDataProtectionManager) },
540
- { },
532
+ { }
541
533
  };
542
534
 
543
- static PyType_Spec type_spec_UserDataProtectionManager =
544
- {
535
+ static PyType_Spec type_spec_UserDataProtectionManager = {
545
536
  "winrt._winrt_windows_security_dataprotection.UserDataProtectionManager",
546
537
  sizeof(py::wrapper::Windows::Security::DataProtection::UserDataProtectionManager),
547
538
  0,
548
539
  Py_TPFLAGS_DEFAULT,
549
- _type_slots_UserDataProtectionManager
550
- };
540
+ _type_slots_UserDataProtectionManager};
551
541
 
552
542
  static PyGetSetDef getset_UserDataProtectionManager_Static[] = {
553
543
  { }
@@ -595,14 +585,14 @@ namespace py::cpp::Windows::Security::DataProtection
595
585
 
596
586
  static PyObject* UserDataStorageItemProtectionInfo_get_Availability(py::wrapper::Windows::Security::DataProtection::UserDataStorageItemProtectionInfo* self, void* /*unused*/) noexcept
597
587
  {
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
588
  try
605
589
  {
590
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.DataProtection.UserDataStorageItemProtectionInfo", L"Availability"))
591
+ {
592
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
593
+ return nullptr;
594
+ }
595
+
606
596
  return py::convert(self->obj.Availability());
607
597
  }
608
598
  catch (...)
@@ -647,39 +637,35 @@ namespace py::cpp::Windows::Security::DataProtection
647
637
  { }
648
638
  };
649
639
 
650
- static PyType_Slot _type_slots_UserDataStorageItemProtectionInfo[] =
651
- {
640
+ static PyType_Slot _type_slots_UserDataStorageItemProtectionInfo[] = {
652
641
  { Py_tp_new, reinterpret_cast<void*>(_new_UserDataStorageItemProtectionInfo) },
653
642
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserDataStorageItemProtectionInfo) },
654
643
  { Py_tp_methods, reinterpret_cast<void*>(_methods_UserDataStorageItemProtectionInfo) },
655
644
  { Py_tp_getset, reinterpret_cast<void*>(_getset_UserDataStorageItemProtectionInfo) },
656
- { },
645
+ { }
657
646
  };
658
647
 
659
- static PyType_Spec type_spec_UserDataStorageItemProtectionInfo =
660
- {
648
+ static PyType_Spec type_spec_UserDataStorageItemProtectionInfo = {
661
649
  "winrt._winrt_windows_security_dataprotection.UserDataStorageItemProtectionInfo",
662
650
  sizeof(py::wrapper::Windows::Security::DataProtection::UserDataStorageItemProtectionInfo),
663
651
  0,
664
652
  Py_TPFLAGS_DEFAULT,
665
- _type_slots_UserDataStorageItemProtectionInfo
666
- };
653
+ _type_slots_UserDataStorageItemProtectionInfo};
667
654
 
668
655
  // ----- Windows.Security.DataProtection Initialization --------------------
669
- PyDoc_STRVAR(module_doc, "Windows::Security::DataProtection");
670
-
671
656
 
672
- static PyModuleDef module_def
673
- = {PyModuleDef_HEAD_INIT,
674
- "_winrt_windows_security_dataprotection",
675
- module_doc,
676
- 0,
677
- nullptr,
678
- nullptr,
679
- nullptr,
680
- nullptr,
681
- nullptr};
657
+ PyDoc_STRVAR(module_doc, "Windows.Security.DataProtection");
682
658
 
659
+ static PyModuleDef module_def = {
660
+ PyModuleDef_HEAD_INIT,
661
+ "_winrt_windows_security_dataprotection",
662
+ module_doc,
663
+ 0,
664
+ nullptr,
665
+ nullptr,
666
+ nullptr,
667
+ nullptr,
668
+ nullptr};
683
669
  } // py::cpp::Windows::Security::DataProtection
684
670
 
685
671
  PyMODINIT_FUNC PyInit__winrt_windows_security_dataprotection(void) noexcept
@@ -1,7 +1,7 @@
1
1
  # WARNING: Please don't edit this file. It was automatically generated.
2
2
 
3
3
  [build-system]
4
- requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
4
+ requires = ["setuptools", "winrt-sdk"]
5
5
  build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
@@ -30,7 +30,7 @@ dependencies = { file = "requirements.txt" }
30
30
  optional-dependencies.all = { file = "all-requirements.txt" }
31
31
 
32
32
  [tool.setuptools.package-data]
33
- winrt = ["*.pyi"]
33
+ "*" = ["*.pyi", "py.typed"]
34
34
 
35
35
  [tool.cibuildwheel]
36
36
  # use local winrt-sdk build dependency
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
- winrt-runtime==2.0.0-beta.2
3
+ winrt-runtime==2.1.0
@@ -0,0 +1,31 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ from setuptools import Extension, setup
4
+ from setuptools.command.build_ext import build_ext
5
+ from winrt_sdk import get_include_dirs
6
+
7
+
8
+ class build_ext_ex(build_ext):
9
+ def build_extension(self, ext):
10
+ if self.compiler.compiler_type == "msvc":
11
+ ext.extra_compile_args = ["/std:c++20", "/permissive-"]
12
+ elif self.compiler.compiler_type == "mingw32":
13
+ ext.extra_compile_args = ["-std=c++20", "-D_WIN32_WINNT=_WIN32_WINNT_WIN10"]
14
+ ext.extra_link_args = ["-loleaut32"]
15
+ else:
16
+ raise ValueError(f"Unsupported compiler: {self.compiler.compiler_type}")
17
+
18
+ build_ext.build_extension(self, ext)
19
+
20
+
21
+ setup(
22
+ cmdclass = {'build_ext': build_ext_ex},
23
+ ext_modules=[
24
+ Extension(
25
+ "winrt._winrt_windows_security_dataprotection",
26
+ sources=["py.Windows.Security.DataProtection.cpp"],
27
+ include_dirs=get_include_dirs(),
28
+ libraries=["windowsapp"],
29
+ )
30
+ ],
31
+ )
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.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[winrt.windows.foundation.Deferral]: ...
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[winrt.windows.storage.streams.IBuffer]: ...
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[winrt.windows.system.User], /) -> typing.Optional[UserDataProtectionManager]: ...
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[winrt.windows.storage.IStorageItem], /) -> winrt.windows.foundation.IAsyncOperation[UserDataStorageItemProtectionInfo]: ...
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[winrt.windows.storage.streams.IBuffer], availability: UserDataAvailability, /) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.storage.streams.IBuffer]: ...
48
- def protect_storage_item_async(self, storage_item: typing.Optional[winrt.windows.storage.IStorageItem], availability: UserDataAvailability, /) -> winrt.windows.foundation.IAsyncOperation[UserDataStorageItemProtectionStatus]: ...
49
- def unprotect_buffer_async(self, protected_buffer: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> winrt.windows.foundation.IAsyncOperation[UserDataBufferUnprotectResult]: ...
50
- def add_data_availability_state_changed(self, handler: winrt.windows.foundation.TypedEventHandler[UserDataProtectionManager, UserDataAvailabilityStateChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
51
- def remove_data_availability_state_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
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,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  import enum
4
4
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Security.DataProtection
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,7 +12,12 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
15
16
  Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Storage[all]==2.1.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Storage.Streams[all]==2.1.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.System[all]==2.1.0; extra == "all"
16
21
 
17
22
  <!-- warning: Please don't edit this file. It was automatically generated. -->
18
23
 
@@ -7,6 +7,7 @@ requirements.txt
7
7
  setup.py
8
8
  winrt/_winrt_windows_security_dataprotection.pyi
9
9
  winrt/windows/security/dataprotection/__init__.py
10
+ winrt/windows/security/dataprotection/py.typed
10
11
  winrt_Windows.Security.DataProtection.egg-info/PKG-INFO
11
12
  winrt_Windows.Security.DataProtection.egg-info/SOURCES.txt
12
13
  winrt_Windows.Security.DataProtection.egg-info/dependency_links.txt
@@ -0,0 +1,7 @@
1
+ winrt-runtime==2.1.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.1.0
5
+ winrt-Windows.Storage[all]==2.1.0
6
+ winrt-Windows.Storage.Streams[all]==2.1.0
7
+ winrt-Windows.System[all]==2.1.0
@@ -1,6 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
2
-
3
- winrt-Windows.Foundation[all]==2.0.0-beta.2
4
- winrt-Windows.Storage[all]==2.0.0-beta.2
5
- winrt-Windows.Storage.Streams[all]==2.0.0-beta.2
6
- winrt-Windows.System[all]==2.0.0-beta.2
@@ -1,16 +0,0 @@
1
- # WARNING: Please don't edit this file. It was automatically generated.
2
-
3
- from setuptools import Extension, setup
4
- from winrt_sdk import get_include_dirs
5
-
6
- setup(
7
- ext_modules=[
8
- Extension(
9
- "winrt._winrt_windows_security_dataprotection",
10
- sources=["py.Windows.Security.DataProtection.cpp"],
11
- include_dirs=get_include_dirs(),
12
- extra_compile_args=["/std:c++20", "/permissive-"],
13
- libraries=["windowsapp"],
14
- )
15
- ],
16
- )
@@ -1,7 +0,0 @@
1
- winrt-runtime==2.0.0-beta.2
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.0-beta.2
5
- winrt-Windows.Storage[all]==2.0.0-beta.2
6
- winrt-Windows.Storage.Streams[all]==2.0.0-beta.2
7
- winrt-Windows.System[all]==2.0.0-beta.2