winrt-Windows.Media.Protection 2.0.1__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 (20) hide show
  1. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/PKG-INFO +5 -5
  2. winrt_windows_media_protection-2.1.0/all-requirements.txt +5 -0
  3. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/py.Windows.Media.Protection.cpp +237 -272
  4. winrt_windows_media_protection-2.1.0/pywinrt-version.txt +1 -0
  5. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/requirements.txt +2 -2
  6. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/winrt/_winrt_windows_media_protection.pyi +23 -24
  7. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/winrt/windows/media/protection/__init__.py +1 -1
  8. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/winrt_Windows.Media.Protection.egg-info/PKG-INFO +5 -5
  9. winrt_windows_media_protection-2.1.0/winrt_Windows.Media.Protection.egg-info/requires.txt +6 -0
  10. winrt_windows_media_protection-2.0.1/all-requirements.txt +0 -5
  11. winrt_windows_media_protection-2.0.1/pywinrt-version.txt +0 -1
  12. winrt_windows_media_protection-2.0.1/winrt_Windows.Media.Protection.egg-info/requires.txt +0 -6
  13. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/README.md +0 -0
  14. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/pyproject.toml +0 -0
  15. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/setup.cfg +0 -0
  16. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/setup.py +0 -0
  17. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/winrt/windows/media/protection/py.typed +0 -0
  18. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/winrt_Windows.Media.Protection.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/winrt_Windows.Media.Protection.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_media_protection-2.0.1 → winrt_windows_media_protection-2.1.0}/winrt_Windows.Media.Protection.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Media.Protection
3
- Version: 2.0.1
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,11 +12,11 @@ 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.0.1
15
+ Requires-Dist: winrt-runtime==2.1.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.0.1; extra == "all"
19
- Requires-Dist: winrt-Windows.Media.Playback[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.1.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Media.Playback[all]==2.1.0; extra == "all"
20
20
 
21
21
  <!-- warning: Please don't edit this file. It was automatically generated. -->
22
22
 
@@ -0,0 +1,5 @@
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.Foundation.Collections[all]==2.1.0
5
+ winrt-Windows.Media.Playback[all]==2.1.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  #include "py.Windows.Media.Protection.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::Media::Protection
7
6
  {
8
7
  // ----- ComponentLoadFailedEventArgs class --------------------
@@ -24,14 +23,14 @@ namespace py::cpp::Windows::Media::Protection
24
23
 
25
24
  static PyObject* ComponentLoadFailedEventArgs_get_Completion(py::wrapper::Windows::Media::Protection::ComponentLoadFailedEventArgs* self, void* /*unused*/) noexcept
26
25
  {
27
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.ComponentLoadFailedEventArgs", L"Completion"))
28
- {
29
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
30
- return nullptr;
31
- }
32
-
33
26
  try
34
27
  {
28
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.ComponentLoadFailedEventArgs", L"Completion"))
29
+ {
30
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
31
+ return nullptr;
32
+ }
33
+
35
34
  return py::convert(self->obj.Completion());
36
35
  }
37
36
  catch (...)
@@ -43,14 +42,14 @@ namespace py::cpp::Windows::Media::Protection
43
42
 
44
43
  static PyObject* ComponentLoadFailedEventArgs_get_Information(py::wrapper::Windows::Media::Protection::ComponentLoadFailedEventArgs* self, void* /*unused*/) noexcept
45
44
  {
46
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.ComponentLoadFailedEventArgs", L"Information"))
47
- {
48
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
49
- return nullptr;
50
- }
51
-
52
45
  try
53
46
  {
47
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.ComponentLoadFailedEventArgs", L"Information"))
48
+ {
49
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
50
+ return nullptr;
51
+ }
52
+
54
53
  return py::convert(self->obj.Information());
55
54
  }
56
55
  catch (...)
@@ -96,23 +95,20 @@ namespace py::cpp::Windows::Media::Protection
96
95
  { }
97
96
  };
98
97
 
99
- static PyType_Slot _type_slots_ComponentLoadFailedEventArgs[] =
100
- {
98
+ static PyType_Slot _type_slots_ComponentLoadFailedEventArgs[] = {
101
99
  { Py_tp_new, reinterpret_cast<void*>(_new_ComponentLoadFailedEventArgs) },
102
100
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ComponentLoadFailedEventArgs) },
103
101
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ComponentLoadFailedEventArgs) },
104
102
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ComponentLoadFailedEventArgs) },
105
- { },
103
+ { }
106
104
  };
107
105
 
108
- static PyType_Spec type_spec_ComponentLoadFailedEventArgs =
109
- {
106
+ static PyType_Spec type_spec_ComponentLoadFailedEventArgs = {
110
107
  "winrt._winrt_windows_media_protection.ComponentLoadFailedEventArgs",
111
108
  sizeof(py::wrapper::Windows::Media::Protection::ComponentLoadFailedEventArgs),
112
109
  0,
113
110
  Py_TPFLAGS_DEFAULT,
114
- _type_slots_ComponentLoadFailedEventArgs
115
- };
111
+ _type_slots_ComponentLoadFailedEventArgs};
116
112
 
117
113
  // ----- ComponentRenewal class --------------------
118
114
 
@@ -129,14 +125,14 @@ namespace py::cpp::Windows::Media::Protection
129
125
 
130
126
  if (arg_count == 1)
131
127
  {
132
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.ComponentRenewal", L"RenewSystemComponentsAsync", 1))
133
- {
134
- py::set_arg_count_version_error(1);
135
- return nullptr;
136
- }
137
-
138
128
  try
139
129
  {
130
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.ComponentRenewal", L"RenewSystemComponentsAsync", 1))
131
+ {
132
+ py::set_arg_count_version_error(1);
133
+ return nullptr;
134
+ }
135
+
140
136
  auto param0 = py::convert_to<winrt::Windows::Media::Protection::RevocationAndRenewalInformation>(args, 0);
141
137
 
142
138
  return py::convert(winrt::Windows::Media::Protection::ComponentRenewal::RenewSystemComponentsAsync(param0));
@@ -162,22 +158,19 @@ namespace py::cpp::Windows::Media::Protection
162
158
  { }
163
159
  };
164
160
 
165
- static PyType_Slot _type_slots_ComponentRenewal[] =
166
- {
161
+ static PyType_Slot _type_slots_ComponentRenewal[] = {
167
162
  { Py_tp_new, reinterpret_cast<void*>(_new_ComponentRenewal) },
168
163
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ComponentRenewal) },
169
164
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ComponentRenewal) },
170
- { },
165
+ { }
171
166
  };
172
167
 
173
- static PyType_Spec type_spec_ComponentRenewal =
174
- {
168
+ static PyType_Spec type_spec_ComponentRenewal = {
175
169
  "winrt._winrt_windows_media_protection.ComponentRenewal",
176
170
  0,
177
171
  0,
178
172
  Py_TPFLAGS_DEFAULT,
179
- _type_slots_ComponentRenewal
180
- };
173
+ _type_slots_ComponentRenewal};
181
174
 
182
175
  static PyGetSetDef getset_ComponentRenewal_Static[] = {
183
176
  { }
@@ -250,14 +243,14 @@ namespace py::cpp::Windows::Media::Protection
250
243
 
251
244
  if (arg_count == 0)
252
245
  {
253
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.HdcpSession", L"Close", 0))
254
- {
255
- py::set_arg_count_version_error(0);
256
- return nullptr;
257
- }
258
-
259
246
  try
260
247
  {
248
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.HdcpSession", L"Close", 0))
249
+ {
250
+ py::set_arg_count_version_error(0);
251
+ return nullptr;
252
+ }
253
+
261
254
  self->obj.Close();
262
255
  Py_RETURN_NONE;
263
256
  }
@@ -280,14 +273,14 @@ namespace py::cpp::Windows::Media::Protection
280
273
 
281
274
  if (arg_count == 0)
282
275
  {
283
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.HdcpSession", L"GetEffectiveProtection", 0))
284
- {
285
- py::set_arg_count_version_error(0);
286
- return nullptr;
287
- }
288
-
289
276
  try
290
277
  {
278
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.HdcpSession", L"GetEffectiveProtection", 0))
279
+ {
280
+ py::set_arg_count_version_error(0);
281
+ return nullptr;
282
+ }
283
+
291
284
  return py::convert(self->obj.GetEffectiveProtection());
292
285
  }
293
286
  catch (...)
@@ -309,14 +302,14 @@ namespace py::cpp::Windows::Media::Protection
309
302
 
310
303
  if (arg_count == 1)
311
304
  {
312
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.HdcpSession", L"IsEffectiveProtectionAtLeast", 1))
313
- {
314
- py::set_arg_count_version_error(1);
315
- return nullptr;
316
- }
317
-
318
305
  try
319
306
  {
307
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.HdcpSession", L"IsEffectiveProtectionAtLeast", 1))
308
+ {
309
+ py::set_arg_count_version_error(1);
310
+ return nullptr;
311
+ }
312
+
320
313
  auto param0 = py::convert_to<winrt::Windows::Media::Protection::HdcpProtection>(args, 0);
321
314
 
322
315
  return py::convert(self->obj.IsEffectiveProtectionAtLeast(param0));
@@ -340,14 +333,14 @@ namespace py::cpp::Windows::Media::Protection
340
333
 
341
334
  if (arg_count == 1)
342
335
  {
343
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.HdcpSession", L"SetDesiredMinProtectionAsync", 1))
344
- {
345
- py::set_arg_count_version_error(1);
346
- return nullptr;
347
- }
348
-
349
336
  try
350
337
  {
338
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.HdcpSession", L"SetDesiredMinProtectionAsync", 1))
339
+ {
340
+ py::set_arg_count_version_error(1);
341
+ return nullptr;
342
+ }
343
+
351
344
  auto param0 = py::convert_to<winrt::Windows::Media::Protection::HdcpProtection>(args, 0);
352
345
 
353
346
  return py::convert(self->obj.SetDesiredMinProtectionAsync(param0));
@@ -367,14 +360,14 @@ namespace py::cpp::Windows::Media::Protection
367
360
 
368
361
  static PyObject* HdcpSession_add_ProtectionChanged(py::wrapper::Windows::Media::Protection::HdcpSession* self, PyObject* arg) noexcept
369
362
  {
370
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.HdcpSession", L"ProtectionChanged"))
371
- {
372
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
373
- return nullptr;
374
- }
375
-
376
363
  try
377
364
  {
365
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.HdcpSession", L"ProtectionChanged"))
366
+ {
367
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
368
+ return nullptr;
369
+ }
370
+
378
371
  auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Media::Protection::HdcpSession, winrt::Windows::Foundation::IInspectable>>(arg);
379
372
 
380
373
  return py::convert(self->obj.ProtectionChanged(param0));
@@ -388,14 +381,14 @@ namespace py::cpp::Windows::Media::Protection
388
381
 
389
382
  static PyObject* HdcpSession_remove_ProtectionChanged(py::wrapper::Windows::Media::Protection::HdcpSession* self, PyObject* arg) noexcept
390
383
  {
391
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.HdcpSession", L"ProtectionChanged"))
392
- {
393
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
394
- return nullptr;
395
- }
396
-
397
384
  try
398
385
  {
386
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.HdcpSession", L"ProtectionChanged"))
387
+ {
388
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
389
+ return nullptr;
390
+ }
391
+
399
392
  auto param0 = py::convert_to<winrt::event_token>(arg);
400
393
 
401
394
  self->obj.ProtectionChanged(param0);
@@ -461,7 +454,7 @@ namespace py::cpp::Windows::Media::Protection
461
454
  { "_assign_array_", _assign_array_HdcpSession, METH_O | METH_STATIC, nullptr },
462
455
  { "_from", reinterpret_cast<PyCFunction>(_from_HdcpSession), METH_O | METH_STATIC, nullptr },
463
456
  { "__enter__", reinterpret_cast<PyCFunction>(_enter_HdcpSession), METH_NOARGS, nullptr },
464
- { "__exit__", reinterpret_cast<PyCFunction>(_exit_HdcpSession), METH_VARARGS, nullptr },
457
+ { "__exit__", reinterpret_cast<PyCFunction>(_exit_HdcpSession), METH_VARARGS, nullptr },
465
458
  { }
466
459
  };
467
460
 
@@ -469,23 +462,20 @@ namespace py::cpp::Windows::Media::Protection
469
462
  { }
470
463
  };
471
464
 
472
- static PyType_Slot _type_slots_HdcpSession[] =
473
- {
465
+ static PyType_Slot _type_slots_HdcpSession[] = {
474
466
  { Py_tp_new, reinterpret_cast<void*>(_new_HdcpSession) },
475
467
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_HdcpSession) },
476
468
  { Py_tp_methods, reinterpret_cast<void*>(_methods_HdcpSession) },
477
469
  { Py_tp_getset, reinterpret_cast<void*>(_getset_HdcpSession) },
478
- { },
470
+ { }
479
471
  };
480
472
 
481
- static PyType_Spec type_spec_HdcpSession =
482
- {
473
+ static PyType_Spec type_spec_HdcpSession = {
483
474
  "winrt._winrt_windows_media_protection.HdcpSession",
484
475
  sizeof(py::wrapper::Windows::Media::Protection::HdcpSession),
485
476
  0,
486
477
  Py_TPFLAGS_DEFAULT,
487
- _type_slots_HdcpSession
488
- };
478
+ _type_slots_HdcpSession};
489
479
 
490
480
  // ----- MediaProtectionManager class --------------------
491
481
 
@@ -528,14 +518,14 @@ namespace py::cpp::Windows::Media::Protection
528
518
 
529
519
  static PyObject* MediaProtectionManager_get_Properties(py::wrapper::Windows::Media::Protection::MediaProtectionManager* self, void* /*unused*/) noexcept
530
520
  {
531
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.MediaProtectionManager", L"Properties"))
532
- {
533
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
534
- return nullptr;
535
- }
536
-
537
521
  try
538
522
  {
523
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.MediaProtectionManager", L"Properties"))
524
+ {
525
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
526
+ return nullptr;
527
+ }
528
+
539
529
  return py::convert(self->obj.Properties());
540
530
  }
541
531
  catch (...)
@@ -547,14 +537,14 @@ namespace py::cpp::Windows::Media::Protection
547
537
 
548
538
  static PyObject* MediaProtectionManager_add_ComponentLoadFailed(py::wrapper::Windows::Media::Protection::MediaProtectionManager* self, PyObject* arg) noexcept
549
539
  {
550
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"ComponentLoadFailed"))
551
- {
552
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
553
- return nullptr;
554
- }
555
-
556
540
  try
557
541
  {
542
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"ComponentLoadFailed"))
543
+ {
544
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
545
+ return nullptr;
546
+ }
547
+
558
548
  auto param0 = py::convert_to<winrt::Windows::Media::Protection::ComponentLoadFailedEventHandler>(arg);
559
549
 
560
550
  return py::convert(self->obj.ComponentLoadFailed(param0));
@@ -568,14 +558,14 @@ namespace py::cpp::Windows::Media::Protection
568
558
 
569
559
  static PyObject* MediaProtectionManager_remove_ComponentLoadFailed(py::wrapper::Windows::Media::Protection::MediaProtectionManager* self, PyObject* arg) noexcept
570
560
  {
571
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"ComponentLoadFailed"))
572
- {
573
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
574
- return nullptr;
575
- }
576
-
577
561
  try
578
562
  {
563
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"ComponentLoadFailed"))
564
+ {
565
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
566
+ return nullptr;
567
+ }
568
+
579
569
  auto param0 = py::convert_to<winrt::event_token>(arg);
580
570
 
581
571
  self->obj.ComponentLoadFailed(param0);
@@ -590,14 +580,14 @@ namespace py::cpp::Windows::Media::Protection
590
580
 
591
581
  static PyObject* MediaProtectionManager_add_RebootNeeded(py::wrapper::Windows::Media::Protection::MediaProtectionManager* self, PyObject* arg) noexcept
592
582
  {
593
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"RebootNeeded"))
594
- {
595
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
596
- return nullptr;
597
- }
598
-
599
583
  try
600
584
  {
585
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"RebootNeeded"))
586
+ {
587
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
588
+ return nullptr;
589
+ }
590
+
601
591
  auto param0 = py::convert_to<winrt::Windows::Media::Protection::RebootNeededEventHandler>(arg);
602
592
 
603
593
  return py::convert(self->obj.RebootNeeded(param0));
@@ -611,14 +601,14 @@ namespace py::cpp::Windows::Media::Protection
611
601
 
612
602
  static PyObject* MediaProtectionManager_remove_RebootNeeded(py::wrapper::Windows::Media::Protection::MediaProtectionManager* self, PyObject* arg) noexcept
613
603
  {
614
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"RebootNeeded"))
615
- {
616
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
617
- return nullptr;
618
- }
619
-
620
604
  try
621
605
  {
606
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"RebootNeeded"))
607
+ {
608
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
609
+ return nullptr;
610
+ }
611
+
622
612
  auto param0 = py::convert_to<winrt::event_token>(arg);
623
613
 
624
614
  self->obj.RebootNeeded(param0);
@@ -633,14 +623,14 @@ namespace py::cpp::Windows::Media::Protection
633
623
 
634
624
  static PyObject* MediaProtectionManager_add_ServiceRequested(py::wrapper::Windows::Media::Protection::MediaProtectionManager* self, PyObject* arg) noexcept
635
625
  {
636
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"ServiceRequested"))
637
- {
638
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
639
- return nullptr;
640
- }
641
-
642
626
  try
643
627
  {
628
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"ServiceRequested"))
629
+ {
630
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
631
+ return nullptr;
632
+ }
633
+
644
634
  auto param0 = py::convert_to<winrt::Windows::Media::Protection::ServiceRequestedEventHandler>(arg);
645
635
 
646
636
  return py::convert(self->obj.ServiceRequested(param0));
@@ -654,14 +644,14 @@ namespace py::cpp::Windows::Media::Protection
654
644
 
655
645
  static PyObject* MediaProtectionManager_remove_ServiceRequested(py::wrapper::Windows::Media::Protection::MediaProtectionManager* self, PyObject* arg) noexcept
656
646
  {
657
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"ServiceRequested"))
658
- {
659
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
660
- return nullptr;
661
- }
662
-
663
647
  try
664
648
  {
649
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Media.Protection.MediaProtectionManager", L"ServiceRequested"))
650
+ {
651
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
652
+ return nullptr;
653
+ }
654
+
665
655
  auto param0 = py::convert_to<winrt::event_token>(arg);
666
656
 
667
657
  self->obj.ServiceRequested(param0);
@@ -715,23 +705,20 @@ namespace py::cpp::Windows::Media::Protection
715
705
  { }
716
706
  };
717
707
 
718
- static PyType_Slot _type_slots_MediaProtectionManager[] =
719
- {
708
+ static PyType_Slot _type_slots_MediaProtectionManager[] = {
720
709
  { Py_tp_new, reinterpret_cast<void*>(_new_MediaProtectionManager) },
721
710
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MediaProtectionManager) },
722
711
  { Py_tp_methods, reinterpret_cast<void*>(_methods_MediaProtectionManager) },
723
712
  { Py_tp_getset, reinterpret_cast<void*>(_getset_MediaProtectionManager) },
724
- { },
713
+ { }
725
714
  };
726
715
 
727
- static PyType_Spec type_spec_MediaProtectionManager =
728
- {
716
+ static PyType_Spec type_spec_MediaProtectionManager = {
729
717
  "winrt._winrt_windows_media_protection.MediaProtectionManager",
730
718
  sizeof(py::wrapper::Windows::Media::Protection::MediaProtectionManager),
731
719
  0,
732
720
  Py_TPFLAGS_DEFAULT,
733
- _type_slots_MediaProtectionManager
734
- };
721
+ _type_slots_MediaProtectionManager};
735
722
 
736
723
  // ----- MediaProtectionPMPServer class --------------------
737
724
 
@@ -776,14 +763,14 @@ namespace py::cpp::Windows::Media::Protection
776
763
 
777
764
  static PyObject* MediaProtectionPMPServer_get_Properties(py::wrapper::Windows::Media::Protection::MediaProtectionPMPServer* self, void* /*unused*/) noexcept
778
765
  {
779
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.MediaProtectionPMPServer", L"Properties"))
780
- {
781
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
782
- return nullptr;
783
- }
784
-
785
766
  try
786
767
  {
768
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.MediaProtectionPMPServer", L"Properties"))
769
+ {
770
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
771
+ return nullptr;
772
+ }
773
+
787
774
  return py::convert(self->obj.Properties());
788
775
  }
789
776
  catch (...)
@@ -828,23 +815,20 @@ namespace py::cpp::Windows::Media::Protection
828
815
  { }
829
816
  };
830
817
 
831
- static PyType_Slot _type_slots_MediaProtectionPMPServer[] =
832
- {
818
+ static PyType_Slot _type_slots_MediaProtectionPMPServer[] = {
833
819
  { Py_tp_new, reinterpret_cast<void*>(_new_MediaProtectionPMPServer) },
834
820
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MediaProtectionPMPServer) },
835
821
  { Py_tp_methods, reinterpret_cast<void*>(_methods_MediaProtectionPMPServer) },
836
822
  { Py_tp_getset, reinterpret_cast<void*>(_getset_MediaProtectionPMPServer) },
837
- { },
823
+ { }
838
824
  };
839
825
 
840
- static PyType_Spec type_spec_MediaProtectionPMPServer =
841
- {
826
+ static PyType_Spec type_spec_MediaProtectionPMPServer = {
842
827
  "winrt._winrt_windows_media_protection.MediaProtectionPMPServer",
843
828
  sizeof(py::wrapper::Windows::Media::Protection::MediaProtectionPMPServer),
844
829
  0,
845
830
  Py_TPFLAGS_DEFAULT,
846
- _type_slots_MediaProtectionPMPServer
847
- };
831
+ _type_slots_MediaProtectionPMPServer};
848
832
 
849
833
  // ----- MediaProtectionServiceCompletion class --------------------
850
834
 
@@ -869,14 +853,14 @@ namespace py::cpp::Windows::Media::Protection
869
853
 
870
854
  if (arg_count == 1)
871
855
  {
872
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.MediaProtectionServiceCompletion", L"Complete", 1))
873
- {
874
- py::set_arg_count_version_error(1);
875
- return nullptr;
876
- }
877
-
878
856
  try
879
857
  {
858
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.MediaProtectionServiceCompletion", L"Complete", 1))
859
+ {
860
+ py::set_arg_count_version_error(1);
861
+ return nullptr;
862
+ }
863
+
880
864
  auto param0 = py::convert_to<bool>(args, 0);
881
865
 
882
866
  self->obj.Complete(param0);
@@ -930,23 +914,20 @@ namespace py::cpp::Windows::Media::Protection
930
914
  { }
931
915
  };
932
916
 
933
- static PyType_Slot _type_slots_MediaProtectionServiceCompletion[] =
934
- {
917
+ static PyType_Slot _type_slots_MediaProtectionServiceCompletion[] = {
935
918
  { Py_tp_new, reinterpret_cast<void*>(_new_MediaProtectionServiceCompletion) },
936
919
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MediaProtectionServiceCompletion) },
937
920
  { Py_tp_methods, reinterpret_cast<void*>(_methods_MediaProtectionServiceCompletion) },
938
921
  { Py_tp_getset, reinterpret_cast<void*>(_getset_MediaProtectionServiceCompletion) },
939
- { },
922
+ { }
940
923
  };
941
924
 
942
- static PyType_Spec type_spec_MediaProtectionServiceCompletion =
943
- {
925
+ static PyType_Spec type_spec_MediaProtectionServiceCompletion = {
944
926
  "winrt._winrt_windows_media_protection.MediaProtectionServiceCompletion",
945
927
  sizeof(py::wrapper::Windows::Media::Protection::MediaProtectionServiceCompletion),
946
928
  0,
947
929
  Py_TPFLAGS_DEFAULT,
948
- _type_slots_MediaProtectionServiceCompletion
949
- };
930
+ _type_slots_MediaProtectionServiceCompletion};
950
931
 
951
932
  // ----- ProtectionCapabilities class --------------------
952
933
 
@@ -993,14 +974,14 @@ namespace py::cpp::Windows::Media::Protection
993
974
 
994
975
  if (arg_count == 2)
995
976
  {
996
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.ProtectionCapabilities", L"IsTypeSupported", 2))
997
- {
998
- py::set_arg_count_version_error(2);
999
- return nullptr;
1000
- }
1001
-
1002
977
  try
1003
978
  {
979
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Protection.ProtectionCapabilities", L"IsTypeSupported", 2))
980
+ {
981
+ py::set_arg_count_version_error(2);
982
+ return nullptr;
983
+ }
984
+
1004
985
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
1005
986
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
1006
987
 
@@ -1054,23 +1035,20 @@ namespace py::cpp::Windows::Media::Protection
1054
1035
  { }
1055
1036
  };
1056
1037
 
1057
- static PyType_Slot _type_slots_ProtectionCapabilities[] =
1058
- {
1038
+ static PyType_Slot _type_slots_ProtectionCapabilities[] = {
1059
1039
  { Py_tp_new, reinterpret_cast<void*>(_new_ProtectionCapabilities) },
1060
1040
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ProtectionCapabilities) },
1061
1041
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ProtectionCapabilities) },
1062
1042
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ProtectionCapabilities) },
1063
- { },
1043
+ { }
1064
1044
  };
1065
1045
 
1066
- static PyType_Spec type_spec_ProtectionCapabilities =
1067
- {
1046
+ static PyType_Spec type_spec_ProtectionCapabilities = {
1068
1047
  "winrt._winrt_windows_media_protection.ProtectionCapabilities",
1069
1048
  sizeof(py::wrapper::Windows::Media::Protection::ProtectionCapabilities),
1070
1049
  0,
1071
1050
  Py_TPFLAGS_DEFAULT,
1072
- _type_slots_ProtectionCapabilities
1073
- };
1051
+ _type_slots_ProtectionCapabilities};
1074
1052
 
1075
1053
  // ----- RevocationAndRenewalInformation class --------------------
1076
1054
 
@@ -1091,14 +1069,14 @@ namespace py::cpp::Windows::Media::Protection
1091
1069
 
1092
1070
  static PyObject* RevocationAndRenewalInformation_get_Items(py::wrapper::Windows::Media::Protection::RevocationAndRenewalInformation* self, void* /*unused*/) noexcept
1093
1071
  {
1094
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalInformation", L"Items"))
1095
- {
1096
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1097
- return nullptr;
1098
- }
1099
-
1100
1072
  try
1101
1073
  {
1074
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalInformation", L"Items"))
1075
+ {
1076
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1077
+ return nullptr;
1078
+ }
1079
+
1102
1080
  return py::convert(self->obj.Items());
1103
1081
  }
1104
1082
  catch (...)
@@ -1143,23 +1121,20 @@ namespace py::cpp::Windows::Media::Protection
1143
1121
  { }
1144
1122
  };
1145
1123
 
1146
- static PyType_Slot _type_slots_RevocationAndRenewalInformation[] =
1147
- {
1124
+ static PyType_Slot _type_slots_RevocationAndRenewalInformation[] = {
1148
1125
  { Py_tp_new, reinterpret_cast<void*>(_new_RevocationAndRenewalInformation) },
1149
1126
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_RevocationAndRenewalInformation) },
1150
1127
  { Py_tp_methods, reinterpret_cast<void*>(_methods_RevocationAndRenewalInformation) },
1151
1128
  { Py_tp_getset, reinterpret_cast<void*>(_getset_RevocationAndRenewalInformation) },
1152
- { },
1129
+ { }
1153
1130
  };
1154
1131
 
1155
- static PyType_Spec type_spec_RevocationAndRenewalInformation =
1156
- {
1132
+ static PyType_Spec type_spec_RevocationAndRenewalInformation = {
1157
1133
  "winrt._winrt_windows_media_protection.RevocationAndRenewalInformation",
1158
1134
  sizeof(py::wrapper::Windows::Media::Protection::RevocationAndRenewalInformation),
1159
1135
  0,
1160
1136
  Py_TPFLAGS_DEFAULT,
1161
- _type_slots_RevocationAndRenewalInformation
1162
- };
1137
+ _type_slots_RevocationAndRenewalInformation};
1163
1138
 
1164
1139
  // ----- RevocationAndRenewalItem class --------------------
1165
1140
 
@@ -1180,14 +1155,14 @@ namespace py::cpp::Windows::Media::Protection
1180
1155
 
1181
1156
  static PyObject* RevocationAndRenewalItem_get_HeaderHash(py::wrapper::Windows::Media::Protection::RevocationAndRenewalItem* self, void* /*unused*/) noexcept
1182
1157
  {
1183
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalItem", L"HeaderHash"))
1184
- {
1185
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1186
- return nullptr;
1187
- }
1188
-
1189
1158
  try
1190
1159
  {
1160
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalItem", L"HeaderHash"))
1161
+ {
1162
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1163
+ return nullptr;
1164
+ }
1165
+
1191
1166
  return py::convert(self->obj.HeaderHash());
1192
1167
  }
1193
1168
  catch (...)
@@ -1199,14 +1174,14 @@ namespace py::cpp::Windows::Media::Protection
1199
1174
 
1200
1175
  static PyObject* RevocationAndRenewalItem_get_Name(py::wrapper::Windows::Media::Protection::RevocationAndRenewalItem* self, void* /*unused*/) noexcept
1201
1176
  {
1202
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalItem", L"Name"))
1203
- {
1204
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1205
- return nullptr;
1206
- }
1207
-
1208
1177
  try
1209
1178
  {
1179
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalItem", L"Name"))
1180
+ {
1181
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1182
+ return nullptr;
1183
+ }
1184
+
1210
1185
  return py::convert(self->obj.Name());
1211
1186
  }
1212
1187
  catch (...)
@@ -1218,14 +1193,14 @@ namespace py::cpp::Windows::Media::Protection
1218
1193
 
1219
1194
  static PyObject* RevocationAndRenewalItem_get_PublicKeyHash(py::wrapper::Windows::Media::Protection::RevocationAndRenewalItem* self, void* /*unused*/) noexcept
1220
1195
  {
1221
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalItem", L"PublicKeyHash"))
1222
- {
1223
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1224
- return nullptr;
1225
- }
1226
-
1227
1196
  try
1228
1197
  {
1198
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalItem", L"PublicKeyHash"))
1199
+ {
1200
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1201
+ return nullptr;
1202
+ }
1203
+
1229
1204
  return py::convert(self->obj.PublicKeyHash());
1230
1205
  }
1231
1206
  catch (...)
@@ -1237,14 +1212,14 @@ namespace py::cpp::Windows::Media::Protection
1237
1212
 
1238
1213
  static PyObject* RevocationAndRenewalItem_get_Reasons(py::wrapper::Windows::Media::Protection::RevocationAndRenewalItem* self, void* /*unused*/) noexcept
1239
1214
  {
1240
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalItem", L"Reasons"))
1241
- {
1242
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1243
- return nullptr;
1244
- }
1245
-
1246
1215
  try
1247
1216
  {
1217
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalItem", L"Reasons"))
1218
+ {
1219
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1220
+ return nullptr;
1221
+ }
1222
+
1248
1223
  return py::convert(self->obj.Reasons());
1249
1224
  }
1250
1225
  catch (...)
@@ -1256,14 +1231,14 @@ namespace py::cpp::Windows::Media::Protection
1256
1231
 
1257
1232
  static PyObject* RevocationAndRenewalItem_get_RenewalId(py::wrapper::Windows::Media::Protection::RevocationAndRenewalItem* self, void* /*unused*/) noexcept
1258
1233
  {
1259
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalItem", L"RenewalId"))
1260
- {
1261
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1262
- return nullptr;
1263
- }
1264
-
1265
1234
  try
1266
1235
  {
1236
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.RevocationAndRenewalItem", L"RenewalId"))
1237
+ {
1238
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1239
+ return nullptr;
1240
+ }
1241
+
1267
1242
  return py::convert(self->obj.RenewalId());
1268
1243
  }
1269
1244
  catch (...)
@@ -1312,23 +1287,20 @@ namespace py::cpp::Windows::Media::Protection
1312
1287
  { }
1313
1288
  };
1314
1289
 
1315
- static PyType_Slot _type_slots_RevocationAndRenewalItem[] =
1316
- {
1290
+ static PyType_Slot _type_slots_RevocationAndRenewalItem[] = {
1317
1291
  { Py_tp_new, reinterpret_cast<void*>(_new_RevocationAndRenewalItem) },
1318
1292
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_RevocationAndRenewalItem) },
1319
1293
  { Py_tp_methods, reinterpret_cast<void*>(_methods_RevocationAndRenewalItem) },
1320
1294
  { Py_tp_getset, reinterpret_cast<void*>(_getset_RevocationAndRenewalItem) },
1321
- { },
1295
+ { }
1322
1296
  };
1323
1297
 
1324
- static PyType_Spec type_spec_RevocationAndRenewalItem =
1325
- {
1298
+ static PyType_Spec type_spec_RevocationAndRenewalItem = {
1326
1299
  "winrt._winrt_windows_media_protection.RevocationAndRenewalItem",
1327
1300
  sizeof(py::wrapper::Windows::Media::Protection::RevocationAndRenewalItem),
1328
1301
  0,
1329
1302
  Py_TPFLAGS_DEFAULT,
1330
- _type_slots_RevocationAndRenewalItem
1331
- };
1303
+ _type_slots_RevocationAndRenewalItem};
1332
1304
 
1333
1305
  // ----- ServiceRequestedEventArgs class --------------------
1334
1306
 
@@ -1349,14 +1321,14 @@ namespace py::cpp::Windows::Media::Protection
1349
1321
 
1350
1322
  static PyObject* ServiceRequestedEventArgs_get_Completion(py::wrapper::Windows::Media::Protection::ServiceRequestedEventArgs* self, void* /*unused*/) noexcept
1351
1323
  {
1352
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.ServiceRequestedEventArgs", L"Completion"))
1353
- {
1354
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1355
- return nullptr;
1356
- }
1357
-
1358
1324
  try
1359
1325
  {
1326
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.ServiceRequestedEventArgs", L"Completion"))
1327
+ {
1328
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1329
+ return nullptr;
1330
+ }
1331
+
1360
1332
  return py::convert(self->obj.Completion());
1361
1333
  }
1362
1334
  catch (...)
@@ -1368,14 +1340,14 @@ namespace py::cpp::Windows::Media::Protection
1368
1340
 
1369
1341
  static PyObject* ServiceRequestedEventArgs_get_Request(py::wrapper::Windows::Media::Protection::ServiceRequestedEventArgs* self, void* /*unused*/) noexcept
1370
1342
  {
1371
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.ServiceRequestedEventArgs", L"Request"))
1372
- {
1373
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1374
- return nullptr;
1375
- }
1376
-
1377
1343
  try
1378
1344
  {
1345
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.ServiceRequestedEventArgs", L"Request"))
1346
+ {
1347
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1348
+ return nullptr;
1349
+ }
1350
+
1379
1351
  return py::convert(self->obj.Request());
1380
1352
  }
1381
1353
  catch (...)
@@ -1387,14 +1359,14 @@ namespace py::cpp::Windows::Media::Protection
1387
1359
 
1388
1360
  static PyObject* ServiceRequestedEventArgs_get_MediaPlaybackItem(py::wrapper::Windows::Media::Protection::ServiceRequestedEventArgs* self, void* /*unused*/) noexcept
1389
1361
  {
1390
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.ServiceRequestedEventArgs", L"MediaPlaybackItem"))
1391
- {
1392
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1393
- return nullptr;
1394
- }
1395
-
1396
1362
  try
1397
1363
  {
1364
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.ServiceRequestedEventArgs", L"MediaPlaybackItem"))
1365
+ {
1366
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1367
+ return nullptr;
1368
+ }
1369
+
1398
1370
  return py::convert(self->obj.MediaPlaybackItem());
1399
1371
  }
1400
1372
  catch (...)
@@ -1441,23 +1413,20 @@ namespace py::cpp::Windows::Media::Protection
1441
1413
  { }
1442
1414
  };
1443
1415
 
1444
- static PyType_Slot _type_slots_ServiceRequestedEventArgs[] =
1445
- {
1416
+ static PyType_Slot _type_slots_ServiceRequestedEventArgs[] = {
1446
1417
  { Py_tp_new, reinterpret_cast<void*>(_new_ServiceRequestedEventArgs) },
1447
1418
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ServiceRequestedEventArgs) },
1448
1419
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ServiceRequestedEventArgs) },
1449
1420
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ServiceRequestedEventArgs) },
1450
- { },
1421
+ { }
1451
1422
  };
1452
1423
 
1453
- static PyType_Spec type_spec_ServiceRequestedEventArgs =
1454
- {
1424
+ static PyType_Spec type_spec_ServiceRequestedEventArgs = {
1455
1425
  "winrt._winrt_windows_media_protection.ServiceRequestedEventArgs",
1456
1426
  sizeof(py::wrapper::Windows::Media::Protection::ServiceRequestedEventArgs),
1457
1427
  0,
1458
1428
  Py_TPFLAGS_DEFAULT,
1459
- _type_slots_ServiceRequestedEventArgs
1460
- };
1429
+ _type_slots_ServiceRequestedEventArgs};
1461
1430
 
1462
1431
  // ----- IMediaProtectionServiceRequest interface --------------------
1463
1432
 
@@ -1478,14 +1447,14 @@ namespace py::cpp::Windows::Media::Protection
1478
1447
 
1479
1448
  static PyObject* IMediaProtectionServiceRequest_get_ProtectionSystem(py::wrapper::Windows::Media::Protection::IMediaProtectionServiceRequest* self, void* /*unused*/) noexcept
1480
1449
  {
1481
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.IMediaProtectionServiceRequest", L"ProtectionSystem"))
1482
- {
1483
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1484
- return nullptr;
1485
- }
1486
-
1487
1450
  try
1488
1451
  {
1452
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.IMediaProtectionServiceRequest", L"ProtectionSystem"))
1453
+ {
1454
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1455
+ return nullptr;
1456
+ }
1457
+
1489
1458
  return py::convert(self->obj.ProtectionSystem());
1490
1459
  }
1491
1460
  catch (...)
@@ -1497,14 +1466,14 @@ namespace py::cpp::Windows::Media::Protection
1497
1466
 
1498
1467
  static PyObject* IMediaProtectionServiceRequest_get_Type(py::wrapper::Windows::Media::Protection::IMediaProtectionServiceRequest* self, void* /*unused*/) noexcept
1499
1468
  {
1500
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.IMediaProtectionServiceRequest", L"Type"))
1501
- {
1502
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1503
- return nullptr;
1504
- }
1505
-
1506
1469
  try
1507
1470
  {
1471
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Protection.IMediaProtectionServiceRequest", L"Type"))
1472
+ {
1473
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1474
+ return nullptr;
1475
+ }
1476
+
1508
1477
  return py::convert(self->obj.Type());
1509
1478
  }
1510
1479
  catch (...)
@@ -1550,39 +1519,35 @@ namespace py::cpp::Windows::Media::Protection
1550
1519
  { }
1551
1520
  };
1552
1521
 
1553
- static PyType_Slot _type_slots_IMediaProtectionServiceRequest[] =
1554
- {
1522
+ static PyType_Slot _type_slots_IMediaProtectionServiceRequest[] = {
1555
1523
  { Py_tp_new, reinterpret_cast<void*>(_new_IMediaProtectionServiceRequest) },
1556
1524
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IMediaProtectionServiceRequest) },
1557
1525
  { Py_tp_methods, reinterpret_cast<void*>(_methods_IMediaProtectionServiceRequest) },
1558
1526
  { Py_tp_getset, reinterpret_cast<void*>(_getset_IMediaProtectionServiceRequest) },
1559
- { },
1527
+ { }
1560
1528
  };
1561
1529
 
1562
- static PyType_Spec type_spec_IMediaProtectionServiceRequest =
1563
- {
1530
+ static PyType_Spec type_spec_IMediaProtectionServiceRequest = {
1564
1531
  "winrt._winrt_windows_media_protection.IMediaProtectionServiceRequest",
1565
1532
  sizeof(py::wrapper::Windows::Media::Protection::IMediaProtectionServiceRequest),
1566
1533
  0,
1567
1534
  Py_TPFLAGS_DEFAULT,
1568
- _type_slots_IMediaProtectionServiceRequest
1569
- };
1535
+ _type_slots_IMediaProtectionServiceRequest};
1570
1536
 
1571
1537
  // ----- Windows.Media.Protection Initialization --------------------
1572
- PyDoc_STRVAR(module_doc, "Windows::Media::Protection");
1573
1538
 
1539
+ PyDoc_STRVAR(module_doc, "Windows.Media.Protection");
1574
1540
 
1575
- static PyModuleDef module_def
1576
- = {PyModuleDef_HEAD_INIT,
1577
- "_winrt_windows_media_protection",
1578
- module_doc,
1579
- 0,
1580
- nullptr,
1581
- nullptr,
1582
- nullptr,
1583
- nullptr,
1584
- nullptr};
1585
-
1541
+ static PyModuleDef module_def = {
1542
+ PyModuleDef_HEAD_INIT,
1543
+ "_winrt_windows_media_protection",
1544
+ module_doc,
1545
+ 0,
1546
+ nullptr,
1547
+ nullptr,
1548
+ nullptr,
1549
+ nullptr,
1550
+ nullptr};
1586
1551
  } // py::cpp::Windows::Media::Protection
1587
1552
 
1588
1553
  PyMODINIT_FUNC PyInit__winrt_windows_media_protection(void) noexcept
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
- winrt-runtime==2.0.1
3
+ winrt-runtime==2.1.0
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
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,9 +9,9 @@ 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.foundation.collections
14
- import winrt.windows.media.playback
12
+ import winrt.windows.foundation as windows_foundation
13
+ import winrt.windows.foundation.collections as windows_foundation_collections
14
+ import winrt.windows.media.playback as windows_media_playback
15
15
 
16
16
  from winrt.windows.media.protection import GraphicsTrustStatus, HdcpProtection, HdcpSetProtectionResult, ProtectionCapabilityResult, RenewalStatus, RevocationAndRenewalReasons
17
17
  from winrt.windows.media.protection import ComponentLoadFailedEventHandler, RebootNeededEventHandler, ServiceRequestedEventHandler
@@ -29,12 +29,11 @@ class ComponentLoadFailedEventArgs(winrt.system.Object):
29
29
 
30
30
  @typing.final
31
31
  class ComponentRenewal_Static(type):
32
- def renew_system_components_async(cls, information: typing.Optional[RevocationAndRenewalInformation], /) -> winrt.windows.foundation.IAsyncOperationWithProgress[RenewalStatus, winrt.system.UInt32]: ...
32
+ def renew_system_components_async(cls, information: typing.Optional[RevocationAndRenewalInformation], /) -> windows_foundation.IAsyncOperationWithProgress[RenewalStatus, winrt.system.UInt32]: ...
33
33
 
34
34
  @typing.final
35
35
  class ComponentRenewal(winrt.system.Object, metaclass=ComponentRenewal_Static):
36
- @staticmethod
37
- def _from(obj: winrt.system.Object, /) -> ComponentRenewal: ...
36
+ pass
38
37
 
39
38
  @typing.final
40
39
  class HdcpSession(winrt.system.Object):
@@ -42,35 +41,35 @@ class HdcpSession(winrt.system.Object):
42
41
  def __exit__(self, *args) -> None: ...
43
42
  @staticmethod
44
43
  def _from(obj: winrt.system.Object, /) -> HdcpSession: ...
45
- def __new__(cls: typing.Type[HdcpSession]) -> HdcpSession:...
44
+ def __new__(cls: typing.Type[HdcpSession]) -> HdcpSession: ...
46
45
  def close(self) -> None: ...
47
46
  def get_effective_protection(self) -> typing.Optional[typing.Optional[HdcpProtection]]: ...
48
47
  def is_effective_protection_at_least(self, protection: HdcpProtection, /) -> bool: ...
49
- def set_desired_min_protection_async(self, protection: HdcpProtection, /) -> winrt.windows.foundation.IAsyncOperation[HdcpSetProtectionResult]: ...
50
- def add_protection_changed(self, handler: winrt.windows.foundation.TypedEventHandler[HdcpSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
51
- def remove_protection_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
48
+ def set_desired_min_protection_async(self, protection: HdcpProtection, /) -> windows_foundation.IAsyncOperation[HdcpSetProtectionResult]: ...
49
+ def add_protection_changed(self, handler: windows_foundation.TypedEventHandler[HdcpSession, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
50
+ def remove_protection_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
52
51
 
53
52
  @typing.final
54
53
  class MediaProtectionManager(winrt.system.Object):
55
54
  @staticmethod
56
55
  def _from(obj: winrt.system.Object, /) -> MediaProtectionManager: ...
57
- def __new__(cls: typing.Type[MediaProtectionManager]) -> MediaProtectionManager:...
58
- def add_component_load_failed(self, handler: typing.Optional[ComponentLoadFailedEventHandler], /) -> winrt.windows.foundation.EventRegistrationToken: ...
59
- def remove_component_load_failed(self, cookie: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
60
- def add_reboot_needed(self, handler: typing.Optional[RebootNeededEventHandler], /) -> winrt.windows.foundation.EventRegistrationToken: ...
61
- def remove_reboot_needed(self, cookie: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
62
- def add_service_requested(self, handler: typing.Optional[ServiceRequestedEventHandler], /) -> winrt.windows.foundation.EventRegistrationToken: ...
63
- def remove_service_requested(self, cookie: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
56
+ def __new__(cls: typing.Type[MediaProtectionManager]) -> MediaProtectionManager: ...
57
+ def add_component_load_failed(self, handler: typing.Optional[ComponentLoadFailedEventHandler], /) -> windows_foundation.EventRegistrationToken: ...
58
+ def remove_component_load_failed(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
59
+ def add_reboot_needed(self, handler: typing.Optional[RebootNeededEventHandler], /) -> windows_foundation.EventRegistrationToken: ...
60
+ def remove_reboot_needed(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
61
+ def add_service_requested(self, handler: typing.Optional[ServiceRequestedEventHandler], /) -> windows_foundation.EventRegistrationToken: ...
62
+ def remove_service_requested(self, cookie: windows_foundation.EventRegistrationToken, /) -> None: ...
64
63
  @_property
65
- def properties(self) -> typing.Optional[winrt.windows.foundation.collections.IPropertySet]: ...
64
+ def properties(self) -> typing.Optional[windows_foundation_collections.IPropertySet]: ...
66
65
 
67
66
  @typing.final
68
67
  class MediaProtectionPMPServer(winrt.system.Object):
69
68
  @staticmethod
70
69
  def _from(obj: winrt.system.Object, /) -> MediaProtectionPMPServer: ...
71
- def __new__(cls: typing.Type[MediaProtectionPMPServer], p_properties: typing.Optional[winrt.windows.foundation.collections.IPropertySet]) -> MediaProtectionPMPServer:...
70
+ def __new__(cls: typing.Type[MediaProtectionPMPServer], p_properties: typing.Optional[windows_foundation_collections.IPropertySet]) -> MediaProtectionPMPServer: ...
72
71
  @_property
73
- def properties(self) -> typing.Optional[winrt.windows.foundation.collections.IPropertySet]: ...
72
+ def properties(self) -> typing.Optional[windows_foundation_collections.IPropertySet]: ...
74
73
 
75
74
  @typing.final
76
75
  class MediaProtectionServiceCompletion(winrt.system.Object):
@@ -82,7 +81,7 @@ class MediaProtectionServiceCompletion(winrt.system.Object):
82
81
  class ProtectionCapabilities(winrt.system.Object):
83
82
  @staticmethod
84
83
  def _from(obj: winrt.system.Object, /) -> ProtectionCapabilities: ...
85
- def __new__(cls: typing.Type[ProtectionCapabilities]) -> ProtectionCapabilities:...
84
+ def __new__(cls: typing.Type[ProtectionCapabilities]) -> ProtectionCapabilities: ...
86
85
  def is_type_supported(self, type: str, key_system: str, /) -> ProtectionCapabilityResult: ...
87
86
 
88
87
  @typing.final
@@ -90,7 +89,7 @@ class RevocationAndRenewalInformation(winrt.system.Object):
90
89
  @staticmethod
91
90
  def _from(obj: winrt.system.Object, /) -> RevocationAndRenewalInformation: ...
92
91
  @_property
93
- def items(self) -> typing.Optional[winrt.windows.foundation.collections.IVector[RevocationAndRenewalItem]]: ...
92
+ def items(self) -> typing.Optional[windows_foundation_collections.IVector[RevocationAndRenewalItem]]: ...
94
93
 
95
94
  @typing.final
96
95
  class RevocationAndRenewalItem(winrt.system.Object):
@@ -116,7 +115,7 @@ class ServiceRequestedEventArgs(winrt.system.Object):
116
115
  @_property
117
116
  def request(self) -> typing.Optional[IMediaProtectionServiceRequest]: ...
118
117
  @_property
119
- def media_playback_item(self) -> typing.Optional[winrt.windows.media.playback.MediaPlaybackItem]: ...
118
+ def media_playback_item(self) -> typing.Optional[windows_media_playback.MediaPlaybackItem]: ...
120
119
 
121
120
  @typing.final
122
121
  class IMediaProtectionServiceRequest(winrt.system.Object):
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
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
  import typing
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Media.Protection
3
- Version: 2.0.1
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,11 +12,11 @@ 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.0.1
15
+ Requires-Dist: winrt-runtime==2.1.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.0.1; extra == "all"
19
- Requires-Dist: winrt-Windows.Media.Playback[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.1.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Media.Playback[all]==2.1.0; extra == "all"
20
20
 
21
21
  <!-- warning: Please don't edit this file. It was automatically generated. -->
22
22
 
@@ -0,0 +1,6 @@
1
+ winrt-runtime==2.1.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.1.0
5
+ winrt-Windows.Foundation.Collections[all]==2.1.0
6
+ winrt-Windows.Media.Playback[all]==2.1.0
@@ -1,5 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
-
3
- winrt-Windows.Foundation[all]==2.0.1
4
- winrt-Windows.Foundation.Collections[all]==2.0.1
5
- winrt-Windows.Media.Playback[all]==2.0.1
@@ -1,6 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.1
5
- winrt-Windows.Foundation.Collections[all]==2.0.1
6
- winrt-Windows.Media.Playback[all]==2.0.1