winrt-Windows.ApplicationModel.Store.LicenseManagement 2.0.0b1__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 (16) hide show
  1. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/PKG-INFO +22 -0
  2. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/README.md +7 -0
  3. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/all-requirements.txt +5 -0
  4. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/py.Windows.ApplicationModel.Store.LicenseManagement.cpp +551 -0
  5. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/pyproject.toml +43 -0
  6. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/pywinrt-version.txt +1 -0
  7. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/requirements.txt +3 -0
  8. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/setup.cfg +4 -0
  9. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/setup.py +17 -0
  10. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/winrt/_winrt_windows_applicationmodel_store_licensemanagement.pyi +54 -0
  11. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/winrt/windows/applicationmodel/store/licensemanagement/__init__.py +21 -0
  12. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/winrt_Windows.ApplicationModel.Store.LicenseManagement.egg-info/PKG-INFO +22 -0
  13. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/winrt_Windows.ApplicationModel.Store.LicenseManagement.egg-info/SOURCES.txt +14 -0
  14. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/winrt_Windows.ApplicationModel.Store.LicenseManagement.egg-info/dependency_links.txt +1 -0
  15. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/winrt_Windows.ApplicationModel.Store.LicenseManagement.egg-info/requires.txt +6 -0
  16. winrt-Windows.ApplicationModel.Store.LicenseManagement-2.0.0b1/winrt_Windows.ApplicationModel.Store.LicenseManagement.egg-info/top_level.txt +1 -0
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.ApplicationModel.Store.LicenseManagement
3
+ Version: 2.0.0b1
4
+ Summary: Python projection of Windows Runtime (WinRT) APIs
5
+ License: MIT
6
+ Project-URL: Repository, https://github.com/pywrint/pywrinrt
7
+ Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: Implementation :: CPython
11
+ Classifier: Intended Audience :: Developers
12
+ Requires-Python: <3.13,>=3.9
13
+ Description-Content-Type: text/markdown
14
+ Provides-Extra: all
15
+
16
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
17
+
18
+ # winrt-Windows.ApplicationModel.Store.LicenseManagement
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Store.LicenseManagement` namespace.
21
+
22
+ This package provides the `winrt.windows.applicationmodel.store.licensemanagement` module.
@@ -0,0 +1,7 @@
1
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
2
+
3
+ # winrt-Windows.ApplicationModel.Store.LicenseManagement
4
+
5
+ Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Store.LicenseManagement` namespace.
6
+
7
+ This package provides the `winrt.windows.applicationmodel.store.licensemanagement` module.
@@ -0,0 +1,5 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ winrt-Windows.Foundation[all]==2.0.0-beta.1
4
+ winrt-Windows.Foundation.Collections[all]==2.0.0-beta.1
5
+ winrt-Windows.Storage.Streams[all]==2.0.0-beta.1
@@ -0,0 +1,551 @@
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ #include "py.Windows.ApplicationModel.Store.LicenseManagement.h"
4
+
5
+
6
+ namespace py::cpp::Windows::ApplicationModel::Store::LicenseManagement
7
+ {
8
+ // ----- LicenseManager class --------------------
9
+
10
+ static PyObject* _new_LicenseManager(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
11
+ {
12
+ static_assert(py::py_type<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseManager>::type_name);
13
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseManager>::type_name);
14
+ return nullptr;
15
+ }
16
+
17
+ static PyObject* LicenseManager_AddLicenseAsync(PyObject* /*unused*/, PyObject* args) noexcept
18
+ {
19
+ auto arg_count = PyTuple_Size(args);
20
+
21
+ if (arg_count == 1)
22
+ {
23
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseManager", L"AddLicenseAsync", 1))
24
+ {
25
+ py::set_arg_count_version_error(1);
26
+ return nullptr;
27
+ }
28
+
29
+ try
30
+ {
31
+ auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 0);
32
+
33
+ return py::convert(winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseManager::AddLicenseAsync(param0));
34
+ }
35
+ catch (...)
36
+ {
37
+ py::to_PyErr();
38
+ return nullptr;
39
+ }
40
+ }
41
+ else
42
+ {
43
+ py::set_invalid_arg_count_error(arg_count);
44
+ return nullptr;
45
+ }
46
+ }
47
+
48
+ static PyObject* LicenseManager_GetSatisfactionInfosAsync(PyObject* /*unused*/, PyObject* args) noexcept
49
+ {
50
+ auto arg_count = PyTuple_Size(args);
51
+
52
+ if (arg_count == 2)
53
+ {
54
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseManager", L"GetSatisfactionInfosAsync", 2))
55
+ {
56
+ py::set_arg_count_version_error(2);
57
+ return nullptr;
58
+ }
59
+
60
+ try
61
+ {
62
+ auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);
63
+ auto param1 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 1);
64
+
65
+ return py::convert(winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseManager::GetSatisfactionInfosAsync(param0, param1));
66
+ }
67
+ catch (...)
68
+ {
69
+ py::to_PyErr();
70
+ return nullptr;
71
+ }
72
+ }
73
+ else
74
+ {
75
+ py::set_invalid_arg_count_error(arg_count);
76
+ return nullptr;
77
+ }
78
+ }
79
+
80
+ static PyObject* LicenseManager_RefreshLicensesAsync(PyObject* /*unused*/, PyObject* args) noexcept
81
+ {
82
+ auto arg_count = PyTuple_Size(args);
83
+
84
+ if (arg_count == 1)
85
+ {
86
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseManager", L"RefreshLicensesAsync", 1))
87
+ {
88
+ py::set_arg_count_version_error(1);
89
+ return nullptr;
90
+ }
91
+
92
+ try
93
+ {
94
+ auto param0 = py::convert_to<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseRefreshOption>(args, 0);
95
+
96
+ return py::convert(winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseManager::RefreshLicensesAsync(param0));
97
+ }
98
+ catch (...)
99
+ {
100
+ py::to_PyErr();
101
+ return nullptr;
102
+ }
103
+ }
104
+ else
105
+ {
106
+ py::set_invalid_arg_count_error(arg_count);
107
+ return nullptr;
108
+ }
109
+ }
110
+
111
+ static PyMethodDef _methods_LicenseManager[] = {
112
+ { }
113
+ };
114
+
115
+ static PyGetSetDef _getset_LicenseManager[] = {
116
+ { }
117
+ };
118
+
119
+ static PyType_Slot _type_slots_LicenseManager[] =
120
+ {
121
+ { Py_tp_new, reinterpret_cast<void*>(_new_LicenseManager) },
122
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_LicenseManager) },
123
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_LicenseManager) },
124
+ { },
125
+ };
126
+
127
+ static PyType_Spec type_spec_LicenseManager =
128
+ {
129
+ "winrt._winrt_windows_applicationmodel_store_licensemanagement.LicenseManager",
130
+ 0,
131
+ 0,
132
+ Py_TPFLAGS_DEFAULT,
133
+ _type_slots_LicenseManager
134
+ };
135
+
136
+ static PyGetSetDef getset_LicenseManager_Static[] = {
137
+ { }
138
+ };
139
+
140
+ static PyMethodDef methods_LicenseManager_Static[] = {
141
+ { "add_license_async", reinterpret_cast<PyCFunction>(LicenseManager_AddLicenseAsync), METH_VARARGS, nullptr },
142
+ { "get_satisfaction_infos_async", reinterpret_cast<PyCFunction>(LicenseManager_GetSatisfactionInfosAsync), METH_VARARGS, nullptr },
143
+ { "refresh_licenses_async", reinterpret_cast<PyCFunction>(LicenseManager_RefreshLicensesAsync), METH_VARARGS, nullptr },
144
+ { }
145
+ };
146
+
147
+ static PyType_Slot type_slots_LicenseManager_Static[] =
148
+ {
149
+ { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
150
+ { Py_tp_getset, reinterpret_cast<void*>(getset_LicenseManager_Static) },
151
+ { Py_tp_methods, reinterpret_cast<void*>(methods_LicenseManager_Static) },
152
+ { }
153
+ };
154
+
155
+ static PyType_Spec type_spec_LicenseManager_Static =
156
+ {
157
+ "winrt._winrt_windows_applicationmodel_store_licensemanagement.LicenseManager_Static",
158
+ static_cast<int>(PyType_Type.tp_basicsize),
159
+ static_cast<int>(PyType_Type.tp_itemsize),
160
+ Py_TPFLAGS_DEFAULT,
161
+ type_slots_LicenseManager_Static
162
+ };
163
+
164
+ // ----- LicenseSatisfactionInfo class --------------------
165
+
166
+ static PyObject* _new_LicenseSatisfactionInfo(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
167
+ {
168
+ static_assert(py::py_type<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo>::type_name);
169
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo>::type_name);
170
+ return nullptr;
171
+ }
172
+
173
+ static void _dealloc_LicenseSatisfactionInfo(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo* self) noexcept
174
+ {
175
+ auto tp = Py_TYPE(self);
176
+ std::destroy_at(&self->obj);
177
+ tp->tp_free(self);
178
+ Py_DECREF(tp);
179
+ }
180
+
181
+ static PyObject* LicenseSatisfactionInfo_get_IsSatisfied(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo* self, void* /*unused*/) noexcept
182
+ {
183
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseSatisfactionInfo", L"IsSatisfied"))
184
+ {
185
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
186
+ return nullptr;
187
+ }
188
+
189
+ try
190
+ {
191
+ return py::convert(self->obj.IsSatisfied());
192
+ }
193
+ catch (...)
194
+ {
195
+ py::to_PyErr();
196
+ return nullptr;
197
+ }
198
+ }
199
+
200
+ static PyObject* LicenseSatisfactionInfo_get_SatisfiedByDevice(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo* self, void* /*unused*/) noexcept
201
+ {
202
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseSatisfactionInfo", L"SatisfiedByDevice"))
203
+ {
204
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
205
+ return nullptr;
206
+ }
207
+
208
+ try
209
+ {
210
+ return py::convert(self->obj.SatisfiedByDevice());
211
+ }
212
+ catch (...)
213
+ {
214
+ py::to_PyErr();
215
+ return nullptr;
216
+ }
217
+ }
218
+
219
+ static PyObject* LicenseSatisfactionInfo_get_SatisfiedByInstallMedia(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo* self, void* /*unused*/) noexcept
220
+ {
221
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseSatisfactionInfo", L"SatisfiedByInstallMedia"))
222
+ {
223
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
224
+ return nullptr;
225
+ }
226
+
227
+ try
228
+ {
229
+ return py::convert(self->obj.SatisfiedByInstallMedia());
230
+ }
231
+ catch (...)
232
+ {
233
+ py::to_PyErr();
234
+ return nullptr;
235
+ }
236
+ }
237
+
238
+ static PyObject* LicenseSatisfactionInfo_get_SatisfiedByOpenLicense(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo* self, void* /*unused*/) noexcept
239
+ {
240
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseSatisfactionInfo", L"SatisfiedByOpenLicense"))
241
+ {
242
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
243
+ return nullptr;
244
+ }
245
+
246
+ try
247
+ {
248
+ return py::convert(self->obj.SatisfiedByOpenLicense());
249
+ }
250
+ catch (...)
251
+ {
252
+ py::to_PyErr();
253
+ return nullptr;
254
+ }
255
+ }
256
+
257
+ static PyObject* LicenseSatisfactionInfo_get_SatisfiedByPass(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo* self, void* /*unused*/) noexcept
258
+ {
259
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseSatisfactionInfo", L"SatisfiedByPass"))
260
+ {
261
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
262
+ return nullptr;
263
+ }
264
+
265
+ try
266
+ {
267
+ return py::convert(self->obj.SatisfiedByPass());
268
+ }
269
+ catch (...)
270
+ {
271
+ py::to_PyErr();
272
+ return nullptr;
273
+ }
274
+ }
275
+
276
+ static PyObject* LicenseSatisfactionInfo_get_SatisfiedBySignedInUser(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo* self, void* /*unused*/) noexcept
277
+ {
278
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseSatisfactionInfo", L"SatisfiedBySignedInUser"))
279
+ {
280
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
281
+ return nullptr;
282
+ }
283
+
284
+ try
285
+ {
286
+ return py::convert(self->obj.SatisfiedBySignedInUser());
287
+ }
288
+ catch (...)
289
+ {
290
+ py::to_PyErr();
291
+ return nullptr;
292
+ }
293
+ }
294
+
295
+ static PyObject* LicenseSatisfactionInfo_get_SatisfiedByTrial(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo* self, void* /*unused*/) noexcept
296
+ {
297
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseSatisfactionInfo", L"SatisfiedByTrial"))
298
+ {
299
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
300
+ return nullptr;
301
+ }
302
+
303
+ try
304
+ {
305
+ return py::convert(self->obj.SatisfiedByTrial());
306
+ }
307
+ catch (...)
308
+ {
309
+ py::to_PyErr();
310
+ return nullptr;
311
+ }
312
+ }
313
+
314
+ static PyObject* _assign_array_LicenseSatisfactionInfo(PyObject* /*unused*/, PyObject* arg) noexcept
315
+ {
316
+ auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo>>();
317
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
318
+ {
319
+ return nullptr;
320
+ }
321
+ Py_RETURN_NONE;
322
+ }
323
+
324
+ static PyObject* _from_LicenseSatisfactionInfo(PyObject* /*unused*/, PyObject* arg) noexcept
325
+ {
326
+ try
327
+ {
328
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
329
+ return py::convert(return_value.as<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo>());
330
+ }
331
+ catch (...)
332
+ {
333
+ py::to_PyErr();
334
+ return nullptr;
335
+ }
336
+ }
337
+
338
+ static PyMethodDef _methods_LicenseSatisfactionInfo[] = {
339
+ { "_assign_array_", _assign_array_LicenseSatisfactionInfo, METH_O | METH_STATIC, nullptr },
340
+ { "_from", reinterpret_cast<PyCFunction>(_from_LicenseSatisfactionInfo), METH_O | METH_STATIC, nullptr },
341
+ { }
342
+ };
343
+
344
+ static PyGetSetDef _getset_LicenseSatisfactionInfo[] = {
345
+ { "is_satisfied", reinterpret_cast<getter>(LicenseSatisfactionInfo_get_IsSatisfied), nullptr, nullptr, nullptr },
346
+ { "satisfied_by_device", reinterpret_cast<getter>(LicenseSatisfactionInfo_get_SatisfiedByDevice), nullptr, nullptr, nullptr },
347
+ { "satisfied_by_install_media", reinterpret_cast<getter>(LicenseSatisfactionInfo_get_SatisfiedByInstallMedia), nullptr, nullptr, nullptr },
348
+ { "satisfied_by_open_license", reinterpret_cast<getter>(LicenseSatisfactionInfo_get_SatisfiedByOpenLicense), nullptr, nullptr, nullptr },
349
+ { "satisfied_by_pass", reinterpret_cast<getter>(LicenseSatisfactionInfo_get_SatisfiedByPass), nullptr, nullptr, nullptr },
350
+ { "satisfied_by_signed_in_user", reinterpret_cast<getter>(LicenseSatisfactionInfo_get_SatisfiedBySignedInUser), nullptr, nullptr, nullptr },
351
+ { "satisfied_by_trial", reinterpret_cast<getter>(LicenseSatisfactionInfo_get_SatisfiedByTrial), nullptr, nullptr, nullptr },
352
+ { }
353
+ };
354
+
355
+ static PyType_Slot _type_slots_LicenseSatisfactionInfo[] =
356
+ {
357
+ { Py_tp_new, reinterpret_cast<void*>(_new_LicenseSatisfactionInfo) },
358
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LicenseSatisfactionInfo) },
359
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_LicenseSatisfactionInfo) },
360
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_LicenseSatisfactionInfo) },
361
+ { },
362
+ };
363
+
364
+ static PyType_Spec type_spec_LicenseSatisfactionInfo =
365
+ {
366
+ "winrt._winrt_windows_applicationmodel_store_licensemanagement.LicenseSatisfactionInfo",
367
+ sizeof(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionInfo),
368
+ 0,
369
+ Py_TPFLAGS_DEFAULT,
370
+ _type_slots_LicenseSatisfactionInfo
371
+ };
372
+
373
+ // ----- LicenseSatisfactionResult class --------------------
374
+
375
+ static PyObject* _new_LicenseSatisfactionResult(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
376
+ {
377
+ static_assert(py::py_type<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionResult>::type_name);
378
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionResult>::type_name);
379
+ return nullptr;
380
+ }
381
+
382
+ static void _dealloc_LicenseSatisfactionResult(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionResult* self) noexcept
383
+ {
384
+ auto tp = Py_TYPE(self);
385
+ std::destroy_at(&self->obj);
386
+ tp->tp_free(self);
387
+ Py_DECREF(tp);
388
+ }
389
+
390
+ static PyObject* LicenseSatisfactionResult_get_ExtendedError(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionResult* self, void* /*unused*/) noexcept
391
+ {
392
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseSatisfactionResult", L"ExtendedError"))
393
+ {
394
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
395
+ return nullptr;
396
+ }
397
+
398
+ try
399
+ {
400
+ return py::convert(self->obj.ExtendedError());
401
+ }
402
+ catch (...)
403
+ {
404
+ py::to_PyErr();
405
+ return nullptr;
406
+ }
407
+ }
408
+
409
+ static PyObject* LicenseSatisfactionResult_get_LicenseSatisfactionInfos(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionResult* self, void* /*unused*/) noexcept
410
+ {
411
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Store.LicenseManagement.LicenseSatisfactionResult", L"LicenseSatisfactionInfos"))
412
+ {
413
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
414
+ return nullptr;
415
+ }
416
+
417
+ try
418
+ {
419
+ return py::convert(self->obj.LicenseSatisfactionInfos());
420
+ }
421
+ catch (...)
422
+ {
423
+ py::to_PyErr();
424
+ return nullptr;
425
+ }
426
+ }
427
+
428
+ static PyObject* _assign_array_LicenseSatisfactionResult(PyObject* /*unused*/, PyObject* arg) noexcept
429
+ {
430
+ auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionResult>>();
431
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
432
+ {
433
+ return nullptr;
434
+ }
435
+ Py_RETURN_NONE;
436
+ }
437
+
438
+ static PyObject* _from_LicenseSatisfactionResult(PyObject* /*unused*/, PyObject* arg) noexcept
439
+ {
440
+ try
441
+ {
442
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
443
+ return py::convert(return_value.as<winrt::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionResult>());
444
+ }
445
+ catch (...)
446
+ {
447
+ py::to_PyErr();
448
+ return nullptr;
449
+ }
450
+ }
451
+
452
+ static PyMethodDef _methods_LicenseSatisfactionResult[] = {
453
+ { "_assign_array_", _assign_array_LicenseSatisfactionResult, METH_O | METH_STATIC, nullptr },
454
+ { "_from", reinterpret_cast<PyCFunction>(_from_LicenseSatisfactionResult), METH_O | METH_STATIC, nullptr },
455
+ { }
456
+ };
457
+
458
+ static PyGetSetDef _getset_LicenseSatisfactionResult[] = {
459
+ { "extended_error", reinterpret_cast<getter>(LicenseSatisfactionResult_get_ExtendedError), nullptr, nullptr, nullptr },
460
+ { "license_satisfaction_infos", reinterpret_cast<getter>(LicenseSatisfactionResult_get_LicenseSatisfactionInfos), nullptr, nullptr, nullptr },
461
+ { }
462
+ };
463
+
464
+ static PyType_Slot _type_slots_LicenseSatisfactionResult[] =
465
+ {
466
+ { Py_tp_new, reinterpret_cast<void*>(_new_LicenseSatisfactionResult) },
467
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LicenseSatisfactionResult) },
468
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_LicenseSatisfactionResult) },
469
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_LicenseSatisfactionResult) },
470
+ { },
471
+ };
472
+
473
+ static PyType_Spec type_spec_LicenseSatisfactionResult =
474
+ {
475
+ "winrt._winrt_windows_applicationmodel_store_licensemanagement.LicenseSatisfactionResult",
476
+ sizeof(py::wrapper::Windows::ApplicationModel::Store::LicenseManagement::LicenseSatisfactionResult),
477
+ 0,
478
+ Py_TPFLAGS_DEFAULT,
479
+ _type_slots_LicenseSatisfactionResult
480
+ };
481
+
482
+ // ----- Windows.ApplicationModel.Store.LicenseManagement Initialization --------------------
483
+ PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::Store::LicenseManagement");
484
+
485
+
486
+ static PyModuleDef module_def
487
+ = {PyModuleDef_HEAD_INIT,
488
+ "_winrt_windows_applicationmodel_store_licensemanagement",
489
+ module_doc,
490
+ 0,
491
+ nullptr,
492
+ nullptr,
493
+ nullptr,
494
+ nullptr,
495
+ nullptr};
496
+
497
+ } // py::cpp::Windows::ApplicationModel::Store::LicenseManagement
498
+
499
+ PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_store_licensemanagement(void) noexcept
500
+ {
501
+ using namespace py::cpp::Windows::ApplicationModel::Store::LicenseManagement;
502
+
503
+ if (py::import_winrt_runtime() == -1)
504
+ {
505
+ return nullptr;
506
+ }
507
+
508
+ py::pyobj_handle module{PyModule_Create(&module_def)};
509
+
510
+ if (!module)
511
+ {
512
+ return nullptr;
513
+ }
514
+
515
+ auto object_type = py::get_object_type();
516
+ if (!object_type)
517
+ {
518
+ return nullptr;
519
+ }
520
+
521
+ py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
522
+
523
+ if (!object_bases)
524
+ {
525
+ return nullptr;
526
+ }
527
+
528
+ py::pyobj_handle type_LicenseManager_Static{PyType_FromSpec(&type_spec_LicenseManager_Static)};
529
+ if (!type_LicenseManager_Static)
530
+ {
531
+ return nullptr;
532
+ }
533
+
534
+ if (py::register_python_type(module.get(), &type_spec_LicenseManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LicenseManager_Static.get())) == -1)
535
+ {
536
+ return nullptr;
537
+ }
538
+
539
+ if (py::register_python_type(module.get(), &type_spec_LicenseSatisfactionInfo, object_bases.get(), nullptr) == -1)
540
+ {
541
+ return nullptr;
542
+ }
543
+
544
+ if (py::register_python_type(module.get(), &type_spec_LicenseSatisfactionResult, object_bases.get(), nullptr) == -1)
545
+ {
546
+ return nullptr;
547
+ }
548
+
549
+
550
+ return module.detach();
551
+ }
@@ -0,0 +1,43 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ [build-system]
4
+ requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
5
+ build-backend = "setuptools.build_meta"
6
+
7
+ [project]
8
+ name = "winrt-Windows.ApplicationModel.Store.LicenseManagement"
9
+ description = "Python projection of Windows Runtime (WinRT) APIs"
10
+ readme = "README.md"
11
+ license = { text = "MIT" }
12
+ classifiers = [
13
+ "Operating System :: Microsoft :: Windows",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: Implementation :: CPython",
16
+ "Intended Audience :: Developers",
17
+ ]
18
+ dynamic = ["version", "dependencies", "optional-dependencies"]
19
+ requires-python = ">=3.9,<3.13"
20
+
21
+ [project.urls]
22
+ # Homepage = "https://github.com/pywrint/pywrinrt"
23
+ # Documentation = "https://readthedocs.org"
24
+ Repository = "https://github.com/pywrint/pywrinrt"
25
+ Changelog = "https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md"
26
+
27
+ [tool.setuptools.dynamic]
28
+ version = { file = "pywinrt-version.txt" }
29
+ dependencies = { file = "requirements.txt" }
30
+ optional-dependencies.all = { file = "all-requirements.txt" }
31
+
32
+ [tool.cibuildwheel]
33
+ # use local winrt-sdk build dependency
34
+ environment = { PYTHONPATH="../winrt-sdk/src" }
35
+ # don't install winrt-sdk from PyPI
36
+ build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
37
+ # don't build for PyPy
38
+ skip = "pp*"
39
+ # suppress warnings about ARM64 testing
40
+ test-skip = "*-win_arm64"
41
+
42
+ [tool.cibuildwheel.windows]
43
+ archs = ["x86", "AMD64", "ARM64"]
@@ -0,0 +1,3 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ winrt-runtime==2.0.0-beta.1
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,17 @@
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_applicationmodel_store_licensemanagement",
10
+ sources=["py.Windows.ApplicationModel.Store.LicenseManagement.cpp"],
11
+ include_dirs=get_include_dirs(),
12
+ extra_compile_args=["/std:c++20", "/permissive-"],
13
+ libraries=["windowsapp"],
14
+ )
15
+ ],
16
+ package_data={"winrt": ["*.pyi"]},
17
+ )
@@ -0,0 +1,54 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ import datetime
4
+ import sys
5
+ import types
6
+ import typing
7
+ import uuid as _uuid
8
+ from builtins import property as _property
9
+
10
+ import winrt._winrt
11
+ import winrt.system
12
+ import winrt.windows.foundation
13
+ import winrt.windows.foundation.collections
14
+ import winrt.windows.storage.streams
15
+
16
+ from winrt.windows.applicationmodel.store.licensemanagement import LicenseRefreshOption
17
+
18
+ Self = typing.TypeVar('Self')
19
+
20
+ class LicenseManager_Static(type):
21
+ def add_license_async(cls, license: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> winrt.windows.foundation.IAsyncAction: ...
22
+ def get_satisfaction_infos_async(cls, content_ids: typing.Iterable[str], key_ids: typing.Iterable[str], /) -> winrt.windows.foundation.IAsyncOperation[LicenseSatisfactionResult]: ...
23
+ def refresh_licenses_async(cls, refresh_option: LicenseRefreshOption, /) -> winrt.windows.foundation.IAsyncAction: ...
24
+
25
+ class LicenseManager(winrt.system.Object, metaclass=LicenseManager_Static):
26
+ @staticmethod
27
+ def _from(obj: winrt.system.Object, /) -> LicenseManager: ...
28
+
29
+ class LicenseSatisfactionInfo(winrt.system.Object):
30
+ @staticmethod
31
+ def _from(obj: winrt.system.Object, /) -> LicenseSatisfactionInfo: ...
32
+ @_property
33
+ def is_satisfied(self) -> bool: ...
34
+ @_property
35
+ def satisfied_by_device(self) -> bool: ...
36
+ @_property
37
+ def satisfied_by_install_media(self) -> bool: ...
38
+ @_property
39
+ def satisfied_by_open_license(self) -> bool: ...
40
+ @_property
41
+ def satisfied_by_pass(self) -> bool: ...
42
+ @_property
43
+ def satisfied_by_signed_in_user(self) -> bool: ...
44
+ @_property
45
+ def satisfied_by_trial(self) -> bool: ...
46
+
47
+ class LicenseSatisfactionResult(winrt.system.Object):
48
+ @staticmethod
49
+ def _from(obj: winrt.system.Object, /) -> LicenseSatisfactionResult: ...
50
+ @_property
51
+ def extended_error(self) -> winrt.windows.foundation.HResult: ...
52
+ @_property
53
+ def license_satisfaction_infos(self) -> typing.Optional[winrt.windows.foundation.collections.IMapView[str, LicenseSatisfactionInfo]]: ...
54
+
@@ -0,0 +1,21 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ import enum
4
+
5
+ import winrt.system
6
+ from winrt import _winrt_windows_applicationmodel_store_licensemanagement
7
+
8
+ __all__ = [
9
+ "LicenseRefreshOption",
10
+ "LicenseManager",
11
+ "LicenseSatisfactionInfo",
12
+ "LicenseSatisfactionResult",
13
+ ]
14
+
15
+ class LicenseRefreshOption(enum.IntEnum):
16
+ RUNNING_LICENSES = 0
17
+ ALL_LICENSES = 1
18
+
19
+ LicenseManager = _winrt_windows_applicationmodel_store_licensemanagement.LicenseManager
20
+ LicenseSatisfactionInfo = _winrt_windows_applicationmodel_store_licensemanagement.LicenseSatisfactionInfo
21
+ LicenseSatisfactionResult = _winrt_windows_applicationmodel_store_licensemanagement.LicenseSatisfactionResult
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.ApplicationModel.Store.LicenseManagement
3
+ Version: 2.0.0b1
4
+ Summary: Python projection of Windows Runtime (WinRT) APIs
5
+ License: MIT
6
+ Project-URL: Repository, https://github.com/pywrint/pywrinrt
7
+ Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: Implementation :: CPython
11
+ Classifier: Intended Audience :: Developers
12
+ Requires-Python: <3.13,>=3.9
13
+ Description-Content-Type: text/markdown
14
+ Provides-Extra: all
15
+
16
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
17
+
18
+ # winrt-Windows.ApplicationModel.Store.LicenseManagement
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Store.LicenseManagement` namespace.
21
+
22
+ This package provides the `winrt.windows.applicationmodel.store.licensemanagement` module.
@@ -0,0 +1,14 @@
1
+ README.md
2
+ all-requirements.txt
3
+ py.Windows.ApplicationModel.Store.LicenseManagement.cpp
4
+ pyproject.toml
5
+ pywinrt-version.txt
6
+ requirements.txt
7
+ setup.py
8
+ winrt/_winrt_windows_applicationmodel_store_licensemanagement.pyi
9
+ winrt/windows/applicationmodel/store/licensemanagement/__init__.py
10
+ winrt_Windows.ApplicationModel.Store.LicenseManagement.egg-info/PKG-INFO
11
+ winrt_Windows.ApplicationModel.Store.LicenseManagement.egg-info/SOURCES.txt
12
+ winrt_Windows.ApplicationModel.Store.LicenseManagement.egg-info/dependency_links.txt
13
+ winrt_Windows.ApplicationModel.Store.LicenseManagement.egg-info/requires.txt
14
+ winrt_Windows.ApplicationModel.Store.LicenseManagement.egg-info/top_level.txt
@@ -0,0 +1,6 @@
1
+ winrt-runtime==2.0.0-beta.1
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.0.0-beta.1
5
+ winrt-Windows.Foundation.Collections[all]==2.0.0-beta.1
6
+ winrt-Windows.Storage.Streams[all]==2.0.0-beta.1