winrt-Windows.Networking 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.
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/PKG-INFO +3 -1
- winrt_windows_networking-2.1.0/all-requirements.txt +3 -0
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/py.Windows.Networking.cpp +116 -124
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/pyproject.toml +2 -2
- winrt_windows_networking-2.1.0/pywinrt-version.txt +1 -0
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/requirements.txt +2 -2
- winrt_windows_networking-2.1.0/setup.py +31 -0
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/winrt/_winrt_windows_networking.pyi +5 -5
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/winrt/windows/networking/__init__.py +2 -2
- winrt_windows_networking-2.1.0/winrt/windows/networking/py.typed +0 -0
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/winrt_Windows.Networking.egg-info/PKG-INFO +3 -1
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/winrt_Windows.Networking.egg-info/SOURCES.txt +1 -0
- winrt_windows_networking-2.1.0/winrt_Windows.Networking.egg-info/requires.txt +4 -0
- winrt-Windows.Networking-2.0.0b2/all-requirements.txt +0 -3
- winrt-Windows.Networking-2.0.0b2/pywinrt-version.txt +0 -1
- winrt-Windows.Networking-2.0.0b2/setup.py +0 -16
- winrt-Windows.Networking-2.0.0b2/winrt_Windows.Networking.egg-info/requires.txt +0 -4
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/README.md +0 -0
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/setup.cfg +0 -0
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/winrt_Windows.Networking.egg-info/dependency_links.txt +0 -0
- {winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/winrt_Windows.Networking.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.Networking
|
|
3
|
-
Version: 2.0
|
|
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,9 @@ 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.Networking.Connectivity[all]==2.1.0; extra == "all"
|
|
16
18
|
|
|
17
19
|
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
18
20
|
|
{winrt-Windows.Networking-2.0.0b2 → winrt_windows_networking-2.1.0}/py.Windows.Networking.cpp
RENAMED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.
|
|
1
|
+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
|
|
2
2
|
|
|
3
3
|
#include "py.Windows.Networking.h"
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
namespace py::cpp::Windows::Networking
|
|
7
6
|
{
|
|
8
7
|
// ----- EndpointPair class --------------------
|
|
@@ -51,14 +50,14 @@ namespace py::cpp::Windows::Networking
|
|
|
51
50
|
|
|
52
51
|
static PyObject* EndpointPair_get_RemoteServiceName(py::wrapper::Windows::Networking::EndpointPair* self, void* /*unused*/) noexcept
|
|
53
52
|
{
|
|
54
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"RemoteServiceName"))
|
|
55
|
-
{
|
|
56
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
57
|
-
return nullptr;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
53
|
try
|
|
61
54
|
{
|
|
55
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"RemoteServiceName"))
|
|
56
|
+
{
|
|
57
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
58
|
+
return nullptr;
|
|
59
|
+
}
|
|
60
|
+
|
|
62
61
|
return py::convert(self->obj.RemoteServiceName());
|
|
63
62
|
}
|
|
64
63
|
catch (...)
|
|
@@ -70,12 +69,6 @@ namespace py::cpp::Windows::Networking
|
|
|
70
69
|
|
|
71
70
|
static int EndpointPair_put_RemoteServiceName(py::wrapper::Windows::Networking::EndpointPair* self, PyObject* arg, void* /*unused*/) noexcept
|
|
72
71
|
{
|
|
73
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"RemoteServiceName"))
|
|
74
|
-
{
|
|
75
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
76
|
-
return -1;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
72
|
if (arg == nullptr)
|
|
80
73
|
{
|
|
81
74
|
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
@@ -84,6 +77,12 @@ namespace py::cpp::Windows::Networking
|
|
|
84
77
|
|
|
85
78
|
try
|
|
86
79
|
{
|
|
80
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"RemoteServiceName"))
|
|
81
|
+
{
|
|
82
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
83
|
+
return -1;
|
|
84
|
+
}
|
|
85
|
+
|
|
87
86
|
auto param0 = py::convert_to<winrt::hstring>(arg);
|
|
88
87
|
|
|
89
88
|
self->obj.RemoteServiceName(param0);
|
|
@@ -98,14 +97,14 @@ namespace py::cpp::Windows::Networking
|
|
|
98
97
|
|
|
99
98
|
static PyObject* EndpointPair_get_RemoteHostName(py::wrapper::Windows::Networking::EndpointPair* self, void* /*unused*/) noexcept
|
|
100
99
|
{
|
|
101
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"RemoteHostName"))
|
|
102
|
-
{
|
|
103
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
104
|
-
return nullptr;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
100
|
try
|
|
108
101
|
{
|
|
102
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"RemoteHostName"))
|
|
103
|
+
{
|
|
104
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
105
|
+
return nullptr;
|
|
106
|
+
}
|
|
107
|
+
|
|
109
108
|
return py::convert(self->obj.RemoteHostName());
|
|
110
109
|
}
|
|
111
110
|
catch (...)
|
|
@@ -117,12 +116,6 @@ namespace py::cpp::Windows::Networking
|
|
|
117
116
|
|
|
118
117
|
static int EndpointPair_put_RemoteHostName(py::wrapper::Windows::Networking::EndpointPair* self, PyObject* arg, void* /*unused*/) noexcept
|
|
119
118
|
{
|
|
120
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"RemoteHostName"))
|
|
121
|
-
{
|
|
122
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
123
|
-
return -1;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
119
|
if (arg == nullptr)
|
|
127
120
|
{
|
|
128
121
|
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
@@ -131,6 +124,12 @@ namespace py::cpp::Windows::Networking
|
|
|
131
124
|
|
|
132
125
|
try
|
|
133
126
|
{
|
|
127
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"RemoteHostName"))
|
|
128
|
+
{
|
|
129
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
130
|
+
return -1;
|
|
131
|
+
}
|
|
132
|
+
|
|
134
133
|
auto param0 = py::convert_to<winrt::Windows::Networking::HostName>(arg);
|
|
135
134
|
|
|
136
135
|
self->obj.RemoteHostName(param0);
|
|
@@ -145,14 +144,14 @@ namespace py::cpp::Windows::Networking
|
|
|
145
144
|
|
|
146
145
|
static PyObject* EndpointPair_get_LocalServiceName(py::wrapper::Windows::Networking::EndpointPair* self, void* /*unused*/) noexcept
|
|
147
146
|
{
|
|
148
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"LocalServiceName"))
|
|
149
|
-
{
|
|
150
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
151
|
-
return nullptr;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
147
|
try
|
|
155
148
|
{
|
|
149
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"LocalServiceName"))
|
|
150
|
+
{
|
|
151
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
152
|
+
return nullptr;
|
|
153
|
+
}
|
|
154
|
+
|
|
156
155
|
return py::convert(self->obj.LocalServiceName());
|
|
157
156
|
}
|
|
158
157
|
catch (...)
|
|
@@ -164,12 +163,6 @@ namespace py::cpp::Windows::Networking
|
|
|
164
163
|
|
|
165
164
|
static int EndpointPair_put_LocalServiceName(py::wrapper::Windows::Networking::EndpointPair* self, PyObject* arg, void* /*unused*/) noexcept
|
|
166
165
|
{
|
|
167
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"LocalServiceName"))
|
|
168
|
-
{
|
|
169
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
170
|
-
return -1;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
166
|
if (arg == nullptr)
|
|
174
167
|
{
|
|
175
168
|
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
@@ -178,6 +171,12 @@ namespace py::cpp::Windows::Networking
|
|
|
178
171
|
|
|
179
172
|
try
|
|
180
173
|
{
|
|
174
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"LocalServiceName"))
|
|
175
|
+
{
|
|
176
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
177
|
+
return -1;
|
|
178
|
+
}
|
|
179
|
+
|
|
181
180
|
auto param0 = py::convert_to<winrt::hstring>(arg);
|
|
182
181
|
|
|
183
182
|
self->obj.LocalServiceName(param0);
|
|
@@ -192,14 +191,14 @@ namespace py::cpp::Windows::Networking
|
|
|
192
191
|
|
|
193
192
|
static PyObject* EndpointPair_get_LocalHostName(py::wrapper::Windows::Networking::EndpointPair* self, void* /*unused*/) noexcept
|
|
194
193
|
{
|
|
195
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"LocalHostName"))
|
|
196
|
-
{
|
|
197
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
198
|
-
return nullptr;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
194
|
try
|
|
202
195
|
{
|
|
196
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"LocalHostName"))
|
|
197
|
+
{
|
|
198
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
199
|
+
return nullptr;
|
|
200
|
+
}
|
|
201
|
+
|
|
203
202
|
return py::convert(self->obj.LocalHostName());
|
|
204
203
|
}
|
|
205
204
|
catch (...)
|
|
@@ -211,12 +210,6 @@ namespace py::cpp::Windows::Networking
|
|
|
211
210
|
|
|
212
211
|
static int EndpointPair_put_LocalHostName(py::wrapper::Windows::Networking::EndpointPair* self, PyObject* arg, void* /*unused*/) noexcept
|
|
213
212
|
{
|
|
214
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"LocalHostName"))
|
|
215
|
-
{
|
|
216
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
217
|
-
return -1;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
213
|
if (arg == nullptr)
|
|
221
214
|
{
|
|
222
215
|
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
@@ -225,6 +218,12 @@ namespace py::cpp::Windows::Networking
|
|
|
225
218
|
|
|
226
219
|
try
|
|
227
220
|
{
|
|
221
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.EndpointPair", L"LocalHostName"))
|
|
222
|
+
{
|
|
223
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
224
|
+
return -1;
|
|
225
|
+
}
|
|
226
|
+
|
|
228
227
|
auto param0 = py::convert_to<winrt::Windows::Networking::HostName>(arg);
|
|
229
228
|
|
|
230
229
|
self->obj.LocalHostName(param0);
|
|
@@ -275,23 +274,20 @@ namespace py::cpp::Windows::Networking
|
|
|
275
274
|
{ }
|
|
276
275
|
};
|
|
277
276
|
|
|
278
|
-
static PyType_Slot _type_slots_EndpointPair[] =
|
|
279
|
-
{
|
|
277
|
+
static PyType_Slot _type_slots_EndpointPair[] = {
|
|
280
278
|
{ Py_tp_new, reinterpret_cast<void*>(_new_EndpointPair) },
|
|
281
279
|
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_EndpointPair) },
|
|
282
280
|
{ Py_tp_methods, reinterpret_cast<void*>(_methods_EndpointPair) },
|
|
283
281
|
{ Py_tp_getset, reinterpret_cast<void*>(_getset_EndpointPair) },
|
|
284
|
-
{ }
|
|
282
|
+
{ }
|
|
285
283
|
};
|
|
286
284
|
|
|
287
|
-
static PyType_Spec type_spec_EndpointPair =
|
|
288
|
-
{
|
|
285
|
+
static PyType_Spec type_spec_EndpointPair = {
|
|
289
286
|
"winrt._winrt_windows_networking.EndpointPair",
|
|
290
287
|
sizeof(py::wrapper::Windows::Networking::EndpointPair),
|
|
291
288
|
0,
|
|
292
289
|
Py_TPFLAGS_DEFAULT,
|
|
293
|
-
_type_slots_EndpointPair
|
|
294
|
-
};
|
|
290
|
+
_type_slots_EndpointPair};
|
|
295
291
|
|
|
296
292
|
// ----- HostName class --------------------
|
|
297
293
|
|
|
@@ -340,14 +336,14 @@ namespace py::cpp::Windows::Networking
|
|
|
340
336
|
|
|
341
337
|
if (arg_count == 2)
|
|
342
338
|
{
|
|
343
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Networking.HostName", L"Compare", 2))
|
|
344
|
-
{
|
|
345
|
-
py::set_arg_count_version_error(2);
|
|
346
|
-
return nullptr;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
339
|
try
|
|
350
340
|
{
|
|
341
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Networking.HostName", L"Compare", 2))
|
|
342
|
+
{
|
|
343
|
+
py::set_arg_count_version_error(2);
|
|
344
|
+
return nullptr;
|
|
345
|
+
}
|
|
346
|
+
|
|
351
347
|
auto param0 = py::convert_to<winrt::hstring>(args, 0);
|
|
352
348
|
auto param1 = py::convert_to<winrt::hstring>(args, 1);
|
|
353
349
|
|
|
@@ -372,14 +368,14 @@ namespace py::cpp::Windows::Networking
|
|
|
372
368
|
|
|
373
369
|
if (arg_count == 1)
|
|
374
370
|
{
|
|
375
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Networking.HostName", L"IsEqual", 1))
|
|
376
|
-
{
|
|
377
|
-
py::set_arg_count_version_error(1);
|
|
378
|
-
return nullptr;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
371
|
try
|
|
382
372
|
{
|
|
373
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Networking.HostName", L"IsEqual", 1))
|
|
374
|
+
{
|
|
375
|
+
py::set_arg_count_version_error(1);
|
|
376
|
+
return nullptr;
|
|
377
|
+
}
|
|
378
|
+
|
|
383
379
|
auto param0 = py::convert_to<winrt::Windows::Networking::HostName>(args, 0);
|
|
384
380
|
|
|
385
381
|
return py::convert(self->obj.IsEqual(param0));
|
|
@@ -403,14 +399,14 @@ namespace py::cpp::Windows::Networking
|
|
|
403
399
|
|
|
404
400
|
if (arg_count == 0)
|
|
405
401
|
{
|
|
406
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Networking.HostName", L"ToString", 0))
|
|
407
|
-
{
|
|
408
|
-
py::set_arg_count_version_error(0);
|
|
409
|
-
return nullptr;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
402
|
try
|
|
413
403
|
{
|
|
404
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Networking.HostName", L"ToString", 0))
|
|
405
|
+
{
|
|
406
|
+
py::set_arg_count_version_error(0);
|
|
407
|
+
return nullptr;
|
|
408
|
+
}
|
|
409
|
+
|
|
414
410
|
return py::convert(self->obj.ToString());
|
|
415
411
|
}
|
|
416
412
|
catch (...)
|
|
@@ -428,14 +424,14 @@ namespace py::cpp::Windows::Networking
|
|
|
428
424
|
|
|
429
425
|
static PyObject* HostName_get_CanonicalName(py::wrapper::Windows::Networking::HostName* self, void* /*unused*/) noexcept
|
|
430
426
|
{
|
|
431
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.HostName", L"CanonicalName"))
|
|
432
|
-
{
|
|
433
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
434
|
-
return nullptr;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
427
|
try
|
|
438
428
|
{
|
|
429
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.HostName", L"CanonicalName"))
|
|
430
|
+
{
|
|
431
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
432
|
+
return nullptr;
|
|
433
|
+
}
|
|
434
|
+
|
|
439
435
|
return py::convert(self->obj.CanonicalName());
|
|
440
436
|
}
|
|
441
437
|
catch (...)
|
|
@@ -447,14 +443,14 @@ namespace py::cpp::Windows::Networking
|
|
|
447
443
|
|
|
448
444
|
static PyObject* HostName_get_DisplayName(py::wrapper::Windows::Networking::HostName* self, void* /*unused*/) noexcept
|
|
449
445
|
{
|
|
450
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.HostName", L"DisplayName"))
|
|
451
|
-
{
|
|
452
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
453
|
-
return nullptr;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
446
|
try
|
|
457
447
|
{
|
|
448
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.HostName", L"DisplayName"))
|
|
449
|
+
{
|
|
450
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
451
|
+
return nullptr;
|
|
452
|
+
}
|
|
453
|
+
|
|
458
454
|
return py::convert(self->obj.DisplayName());
|
|
459
455
|
}
|
|
460
456
|
catch (...)
|
|
@@ -466,14 +462,14 @@ namespace py::cpp::Windows::Networking
|
|
|
466
462
|
|
|
467
463
|
static PyObject* HostName_get_IPInformation(py::wrapper::Windows::Networking::HostName* self, void* /*unused*/) noexcept
|
|
468
464
|
{
|
|
469
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.HostName", L"IPInformation"))
|
|
470
|
-
{
|
|
471
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
472
|
-
return nullptr;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
465
|
try
|
|
476
466
|
{
|
|
467
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.HostName", L"IPInformation"))
|
|
468
|
+
{
|
|
469
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
470
|
+
return nullptr;
|
|
471
|
+
}
|
|
472
|
+
|
|
477
473
|
return py::convert(self->obj.IPInformation());
|
|
478
474
|
}
|
|
479
475
|
catch (...)
|
|
@@ -485,14 +481,14 @@ namespace py::cpp::Windows::Networking
|
|
|
485
481
|
|
|
486
482
|
static PyObject* HostName_get_RawName(py::wrapper::Windows::Networking::HostName* self, void* /*unused*/) noexcept
|
|
487
483
|
{
|
|
488
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.HostName", L"RawName"))
|
|
489
|
-
{
|
|
490
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
491
|
-
return nullptr;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
484
|
try
|
|
495
485
|
{
|
|
486
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.HostName", L"RawName"))
|
|
487
|
+
{
|
|
488
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
489
|
+
return nullptr;
|
|
490
|
+
}
|
|
491
|
+
|
|
496
492
|
return py::convert(self->obj.RawName());
|
|
497
493
|
}
|
|
498
494
|
catch (...)
|
|
@@ -504,14 +500,14 @@ namespace py::cpp::Windows::Networking
|
|
|
504
500
|
|
|
505
501
|
static PyObject* HostName_get_Type(py::wrapper::Windows::Networking::HostName* self, void* /*unused*/) noexcept
|
|
506
502
|
{
|
|
507
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.HostName", L"Type"))
|
|
508
|
-
{
|
|
509
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
510
|
-
return nullptr;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
503
|
try
|
|
514
504
|
{
|
|
505
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Networking.HostName", L"Type"))
|
|
506
|
+
{
|
|
507
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
508
|
+
return nullptr;
|
|
509
|
+
}
|
|
510
|
+
|
|
515
511
|
return py::convert(self->obj.Type());
|
|
516
512
|
}
|
|
517
513
|
catch (...)
|
|
@@ -575,24 +571,21 @@ namespace py::cpp::Windows::Networking
|
|
|
575
571
|
{ }
|
|
576
572
|
};
|
|
577
573
|
|
|
578
|
-
static PyType_Slot _type_slots_HostName[] =
|
|
579
|
-
{
|
|
574
|
+
static PyType_Slot _type_slots_HostName[] = {
|
|
580
575
|
{ Py_tp_new, reinterpret_cast<void*>(_new_HostName) },
|
|
581
576
|
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_HostName) },
|
|
582
577
|
{ Py_tp_methods, reinterpret_cast<void*>(_methods_HostName) },
|
|
583
578
|
{ Py_tp_getset, reinterpret_cast<void*>(_getset_HostName) },
|
|
584
579
|
{ Py_tp_str, reinterpret_cast<void*>(_str_HostName) },
|
|
585
|
-
{ }
|
|
580
|
+
{ }
|
|
586
581
|
};
|
|
587
582
|
|
|
588
|
-
static PyType_Spec type_spec_HostName =
|
|
589
|
-
{
|
|
583
|
+
static PyType_Spec type_spec_HostName = {
|
|
590
584
|
"winrt._winrt_windows_networking.HostName",
|
|
591
585
|
sizeof(py::wrapper::Windows::Networking::HostName),
|
|
592
586
|
0,
|
|
593
587
|
Py_TPFLAGS_DEFAULT,
|
|
594
|
-
_type_slots_HostName
|
|
595
|
-
};
|
|
588
|
+
_type_slots_HostName};
|
|
596
589
|
|
|
597
590
|
static PyGetSetDef getset_HostName_Static[] = {
|
|
598
591
|
{ }
|
|
@@ -621,20 +614,19 @@ namespace py::cpp::Windows::Networking
|
|
|
621
614
|
};
|
|
622
615
|
|
|
623
616
|
// ----- Windows.Networking Initialization --------------------
|
|
624
|
-
PyDoc_STRVAR(module_doc, "Windows::Networking");
|
|
625
|
-
|
|
626
617
|
|
|
627
|
-
|
|
628
|
-
= {PyModuleDef_HEAD_INIT,
|
|
629
|
-
"_winrt_windows_networking",
|
|
630
|
-
module_doc,
|
|
631
|
-
0,
|
|
632
|
-
nullptr,
|
|
633
|
-
nullptr,
|
|
634
|
-
nullptr,
|
|
635
|
-
nullptr,
|
|
636
|
-
nullptr};
|
|
618
|
+
PyDoc_STRVAR(module_doc, "Windows.Networking");
|
|
637
619
|
|
|
620
|
+
static PyModuleDef module_def = {
|
|
621
|
+
PyModuleDef_HEAD_INIT,
|
|
622
|
+
"_winrt_windows_networking",
|
|
623
|
+
module_doc,
|
|
624
|
+
0,
|
|
625
|
+
nullptr,
|
|
626
|
+
nullptr,
|
|
627
|
+
nullptr,
|
|
628
|
+
nullptr,
|
|
629
|
+
nullptr};
|
|
638
630
|
} // py::cpp::Windows::Networking
|
|
639
631
|
|
|
640
632
|
PyMODINIT_FUNC PyInit__winrt_windows_networking(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", "
|
|
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
|
-
|
|
33
|
+
"*" = ["*.pyi", "py.typed"]
|
|
34
34
|
|
|
35
35
|
[tool.cibuildwheel]
|
|
36
36
|
# use local winrt-sdk build dependency
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.1.0
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
|
|
2
2
|
|
|
3
|
-
winrt-runtime==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_networking",
|
|
26
|
+
sources=["py.Windows.Networking.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.
|
|
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,7 +9,7 @@ from builtins import property as _property
|
|
|
9
9
|
|
|
10
10
|
import winrt._winrt
|
|
11
11
|
import winrt.system
|
|
12
|
-
import winrt.windows.networking.connectivity
|
|
12
|
+
import winrt.windows.networking.connectivity as windows_networking_connectivity
|
|
13
13
|
|
|
14
14
|
from winrt.windows.networking import DomainNameType, HostNameSortOptions, HostNameType
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ Self = typing.TypeVar('Self')
|
|
|
19
19
|
class EndpointPair(winrt.system.Object):
|
|
20
20
|
@staticmethod
|
|
21
21
|
def _from(obj: winrt.system.Object, /) -> EndpointPair: ...
|
|
22
|
-
def __new__(cls: typing.Type[EndpointPair], local_host_name: typing.Optional[HostName], local_service_name: str, remote_host_name: typing.Optional[HostName], remote_service_name: str) -> EndpointPair
|
|
22
|
+
def __new__(cls: typing.Type[EndpointPair], local_host_name: typing.Optional[HostName], local_service_name: str, remote_host_name: typing.Optional[HostName], remote_service_name: str) -> EndpointPair: ...
|
|
23
23
|
@_property
|
|
24
24
|
def remote_service_name(self) -> str: ...
|
|
25
25
|
@remote_service_name.setter
|
|
@@ -46,7 +46,7 @@ class HostName(winrt.system.Object, metaclass=HostName_Static):
|
|
|
46
46
|
def __str__(self) -> str: ...
|
|
47
47
|
@staticmethod
|
|
48
48
|
def _from(obj: winrt.system.Object, /) -> HostName: ...
|
|
49
|
-
def __new__(cls: typing.Type[HostName], host_name: str) -> HostName
|
|
49
|
+
def __new__(cls: typing.Type[HostName], host_name: str) -> HostName: ...
|
|
50
50
|
def is_equal(self, host_name: typing.Optional[HostName], /) -> bool: ...
|
|
51
51
|
def to_string(self) -> str: ...
|
|
52
52
|
@_property
|
|
@@ -54,7 +54,7 @@ class HostName(winrt.system.Object, metaclass=HostName_Static):
|
|
|
54
54
|
@_property
|
|
55
55
|
def display_name(self) -> str: ...
|
|
56
56
|
@_property
|
|
57
|
-
def i_p_information(self) -> typing.Optional[
|
|
57
|
+
def i_p_information(self) -> typing.Optional[windows_networking_connectivity.IPInformation]: ...
|
|
58
58
|
@_property
|
|
59
59
|
def raw_name(self) -> str: ...
|
|
60
60
|
@_property
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.
|
|
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
|
|
|
@@ -18,7 +18,7 @@ class DomainNameType(enum.IntEnum):
|
|
|
18
18
|
FULLY_QUALIFIED = 1
|
|
19
19
|
|
|
20
20
|
class HostNameSortOptions(enum.IntFlag):
|
|
21
|
-
NONE =
|
|
21
|
+
NONE = 0x0
|
|
22
22
|
OPTIMIZE_FOR_LONG_CONNECTIONS = 0x2
|
|
23
23
|
|
|
24
24
|
class HostNameType(enum.IntEnum):
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.Networking
|
|
3
|
-
Version: 2.0
|
|
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,9 @@ 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.Networking.Connectivity[all]==2.1.0; extra == "all"
|
|
16
18
|
|
|
17
19
|
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
18
20
|
|
|
@@ -7,6 +7,7 @@ requirements.txt
|
|
|
7
7
|
setup.py
|
|
8
8
|
winrt/_winrt_windows_networking.pyi
|
|
9
9
|
winrt/windows/networking/__init__.py
|
|
10
|
+
winrt/windows/networking/py.typed
|
|
10
11
|
winrt_Windows.Networking.egg-info/PKG-INFO
|
|
11
12
|
winrt_Windows.Networking.egg-info/SOURCES.txt
|
|
12
13
|
winrt_Windows.Networking.egg-info/dependency_links.txt
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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_networking",
|
|
10
|
-
sources=["py.Windows.Networking.cpp"],
|
|
11
|
-
include_dirs=get_include_dirs(),
|
|
12
|
-
extra_compile_args=["/std:c++20", "/permissive-"],
|
|
13
|
-
libraries=["windowsapp"],
|
|
14
|
-
)
|
|
15
|
-
],
|
|
16
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|