2 /* Python wrapper functions auto-generated by pidl */
3 #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
7 #include "librpc/rpc/pyrpc.h"
8 #include "librpc/rpc/pyrpc_util.h"
9 #include "bin/default/librpc/gen_ndr/ndr_srvsvc.h"
10 #include "bin/default/librpc/gen_ndr/ndr_srvsvc_c.h"
13 * These functions are here to ensure they can be optimized out by
14 * the compiler based on the constant input values
17 static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
33 static inline long long ndr_sizeof2intmax(size_t var_size)
49 static inline PyObject *ndr_PyLong_FromLongLong(long long v)
51 if (v > LONG_MAX || v < LONG_MIN) {
52 return PyLong_FromLongLong(v);
54 return PyInt_FromLong(v);
58 static inline PyObject *ndr_PyLong_FromUnsignedLongLong(unsigned long long v)
61 return PyLong_FromUnsignedLongLong(v);
63 return PyInt_FromLong(v);
67 #include "librpc/gen_ndr/misc.h"
68 #include "librpc/gen_ndr/security.h"
69 #include "librpc/gen_ndr/svcctl.h"
70 static PyTypeObject srvsvc_NetCharDevInfo0_Type;
71 static PyTypeObject srvsvc_NetCharDevCtr0_Type;
72 static PyTypeObject srvsvc_NetCharDevInfo1_Type;
73 static PyTypeObject srvsvc_NetCharDevCtr1_Type;
74 PyObject *py_import_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevInfo *in);
75 union srvsvc_NetCharDevInfo *py_export_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
76 PyObject *py_import_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevCtr *in);
77 union srvsvc_NetCharDevCtr *py_export_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
78 static PyTypeObject srvsvc_NetCharDevInfoCtr_Type;
79 static PyTypeObject srvsvc_NetCharDevQInfo0_Type;
80 static PyTypeObject srvsvc_NetCharDevQCtr0_Type;
81 static PyTypeObject srvsvc_NetCharDevQInfo1_Type;
82 static PyTypeObject srvsvc_NetCharDevQCtr1_Type;
83 PyObject *py_import_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQInfo *in);
84 union srvsvc_NetCharDevQInfo *py_export_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
85 PyObject *py_import_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQCtr *in);
86 union srvsvc_NetCharDevQCtr *py_export_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
87 static PyTypeObject srvsvc_NetCharDevQInfoCtr_Type;
88 static PyTypeObject srvsvc_NetConnInfo0_Type;
89 static PyTypeObject srvsvc_NetConnCtr0_Type;
90 static PyTypeObject srvsvc_NetConnInfo1_Type;
91 static PyTypeObject srvsvc_NetConnCtr1_Type;
92 PyObject *py_import_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetConnCtr *in);
93 union srvsvc_NetConnCtr *py_export_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
94 static PyTypeObject srvsvc_NetConnInfoCtr_Type;
95 static PyTypeObject srvsvc_NetFileInfo2_Type;
96 static PyTypeObject srvsvc_NetFileCtr2_Type;
97 static PyTypeObject srvsvc_NetFileInfo3_Type;
98 static PyTypeObject srvsvc_NetFileCtr3_Type;
99 PyObject *py_import_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileInfo *in);
100 union srvsvc_NetFileInfo *py_export_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
101 PyObject *py_import_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileCtr *in);
102 union srvsvc_NetFileCtr *py_export_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
103 static PyTypeObject srvsvc_NetFileInfoCtr_Type;
104 static PyTypeObject srvsvc_NetSessInfo0_Type;
105 static PyTypeObject srvsvc_NetSessCtr0_Type;
106 static PyTypeObject srvsvc_NetSessInfo1_Type;
107 static PyTypeObject srvsvc_NetSessCtr1_Type;
108 static PyTypeObject srvsvc_NetSessInfo2_Type;
109 static PyTypeObject srvsvc_NetSessCtr2_Type;
110 static PyTypeObject srvsvc_NetSessInfo10_Type;
111 static PyTypeObject srvsvc_NetSessCtr10_Type;
112 static PyTypeObject srvsvc_NetSessInfo502_Type;
113 static PyTypeObject srvsvc_NetSessCtr502_Type;
114 PyObject *py_import_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSessCtr *in);
115 union srvsvc_NetSessCtr *py_export_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
116 static PyTypeObject srvsvc_NetSessInfoCtr_Type;
117 static PyTypeObject srvsvc_NetShareInfo0_Type;
118 static PyTypeObject srvsvc_NetShareCtr0_Type;
119 static PyTypeObject srvsvc_NetShareInfo1_Type;
120 static PyTypeObject srvsvc_NetShareCtr1_Type;
121 static PyTypeObject srvsvc_NetShareInfo2_Type;
122 static PyTypeObject srvsvc_NetShareCtr2_Type;
123 static PyTypeObject srvsvc_NetShareInfo501_Type;
124 static PyTypeObject srvsvc_NetShareCtr501_Type;
125 static PyTypeObject srvsvc_NetShareInfo502_Type;
126 static PyTypeObject srvsvc_NetShareCtr502_Type;
127 static PyTypeObject srvsvc_NetShareInfo1004_Type;
128 static PyTypeObject srvsvc_NetShareCtr1004_Type;
129 static PyTypeObject srvsvc_NetShareInfo1005_Type;
130 static PyTypeObject srvsvc_NetShareCtr1005_Type;
131 static PyTypeObject srvsvc_NetShareInfo1006_Type;
132 static PyTypeObject srvsvc_NetShareCtr1006_Type;
133 static PyTypeObject srvsvc_NetShareInfo1007_Type;
134 static PyTypeObject srvsvc_NetShareCtr1007_Type;
135 static PyTypeObject srvsvc_NetShareCtr1501_Type;
136 PyObject *py_import_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareInfo *in);
137 union srvsvc_NetShareInfo *py_export_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
138 PyObject *py_import_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareCtr *in);
139 union srvsvc_NetShareCtr *py_export_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
140 static PyTypeObject srvsvc_NetShareInfoCtr_Type;
141 static PyTypeObject srvsvc_NetSrvInfo100_Type;
142 static PyTypeObject srvsvc_NetSrvInfo101_Type;
143 static PyTypeObject srvsvc_NetSrvInfo102_Type;
144 static PyTypeObject srvsvc_NetSrvInfo402_Type;
145 static PyTypeObject srvsvc_NetSrvInfo403_Type;
146 static PyTypeObject srvsvc_NetSrvInfo502_Type;
147 static PyTypeObject srvsvc_NetSrvInfo503_Type;
148 static PyTypeObject srvsvc_NetSrvInfo599_Type;
149 static PyTypeObject srvsvc_NetSrvInfo1005_Type;
150 static PyTypeObject srvsvc_NetSrvInfo1010_Type;
151 static PyTypeObject srvsvc_NetSrvInfo1016_Type;
152 static PyTypeObject srvsvc_NetSrvInfo1017_Type;
153 static PyTypeObject srvsvc_NetSrvInfo1018_Type;
154 static PyTypeObject srvsvc_NetSrvInfo1107_Type;
155 static PyTypeObject srvsvc_NetSrvInfo1501_Type;
156 static PyTypeObject srvsvc_NetSrvInfo1502_Type;
157 static PyTypeObject srvsvc_NetSrvInfo1503_Type;
158 static PyTypeObject srvsvc_NetSrvInfo1506_Type;
159 static PyTypeObject srvsvc_NetSrvInfo1509_Type;
160 static PyTypeObject srvsvc_NetSrvInfo1510_Type;
161 static PyTypeObject srvsvc_NetSrvInfo1511_Type;
162 static PyTypeObject srvsvc_NetSrvInfo1512_Type;
163 static PyTypeObject srvsvc_NetSrvInfo1513_Type;
164 static PyTypeObject srvsvc_NetSrvInfo1514_Type;
165 static PyTypeObject srvsvc_NetSrvInfo1515_Type;
166 static PyTypeObject srvsvc_NetSrvInfo1516_Type;
167 static PyTypeObject srvsvc_NetSrvInfo1518_Type;
168 static PyTypeObject srvsvc_NetSrvInfo1520_Type;
169 static PyTypeObject srvsvc_NetSrvInfo1521_Type;
170 static PyTypeObject srvsvc_NetSrvInfo1522_Type;
171 static PyTypeObject srvsvc_NetSrvInfo1523_Type;
172 static PyTypeObject srvsvc_NetSrvInfo1524_Type;
173 static PyTypeObject srvsvc_NetSrvInfo1525_Type;
174 static PyTypeObject srvsvc_NetSrvInfo1528_Type;
175 static PyTypeObject srvsvc_NetSrvInfo1529_Type;
176 static PyTypeObject srvsvc_NetSrvInfo1530_Type;
177 static PyTypeObject srvsvc_NetSrvInfo1533_Type;
178 static PyTypeObject srvsvc_NetSrvInfo1534_Type;
179 static PyTypeObject srvsvc_NetSrvInfo1535_Type;
180 static PyTypeObject srvsvc_NetSrvInfo1536_Type;
181 static PyTypeObject srvsvc_NetSrvInfo1537_Type;
182 static PyTypeObject srvsvc_NetSrvInfo1538_Type;
183 static PyTypeObject srvsvc_NetSrvInfo1539_Type;
184 static PyTypeObject srvsvc_NetSrvInfo1540_Type;
185 static PyTypeObject srvsvc_NetSrvInfo1541_Type;
186 static PyTypeObject srvsvc_NetSrvInfo1542_Type;
187 static PyTypeObject srvsvc_NetSrvInfo1543_Type;
188 static PyTypeObject srvsvc_NetSrvInfo1544_Type;
189 static PyTypeObject srvsvc_NetSrvInfo1545_Type;
190 static PyTypeObject srvsvc_NetSrvInfo1546_Type;
191 static PyTypeObject srvsvc_NetSrvInfo1547_Type;
192 static PyTypeObject srvsvc_NetSrvInfo1548_Type;
193 static PyTypeObject srvsvc_NetSrvInfo1549_Type;
194 static PyTypeObject srvsvc_NetSrvInfo1550_Type;
195 static PyTypeObject srvsvc_NetSrvInfo1552_Type;
196 static PyTypeObject srvsvc_NetSrvInfo1553_Type;
197 static PyTypeObject srvsvc_NetSrvInfo1554_Type;
198 static PyTypeObject srvsvc_NetSrvInfo1555_Type;
199 static PyTypeObject srvsvc_NetSrvInfo1556_Type;
200 PyObject *py_import_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSrvInfo *in);
201 union srvsvc_NetSrvInfo *py_export_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
202 static PyTypeObject srvsvc_NetDiskInfo0_Type;
203 static PyTypeObject srvsvc_NetDiskInfo_Type;
204 static PyTypeObject srvsvc_Statistics_Type;
205 static PyTypeObject srvsvc_NetTransportInfo0_Type;
206 static PyTypeObject srvsvc_NetTransportCtr0_Type;
207 static PyTypeObject srvsvc_NetTransportInfo1_Type;
208 static PyTypeObject srvsvc_NetTransportCtr1_Type;
209 static PyTypeObject srvsvc_NetTransportInfo2_Type;
210 static PyTypeObject srvsvc_NetTransportCtr2_Type;
211 static PyTypeObject srvsvc_NetTransportInfo3_Type;
212 static PyTypeObject srvsvc_NetTransportCtr3_Type;
213 PyObject *py_import_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportCtr *in);
214 union srvsvc_NetTransportCtr *py_export_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in);
215 static PyTypeObject srvsvc_NetTransportInfoCtr_Type;
216 static PyTypeObject srvsvc_NetRemoteTODInfo_Type;
217 PyObject *py_import_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportInfo *in);
218 union srvsvc_NetTransportInfo *py_export_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in);
219 static PyTypeObject srvsvc_InterfaceType;
221 void initsrvsvc(void);static PyTypeObject *BaseObject_Type;
222 static PyTypeObject *sec_desc_buf_Type;
223 static PyTypeObject *policy_handle_Type;
224 static PyTypeObject *ClientConnection_Type;
225 static PyTypeObject *ndr_syntax_id_Type;
227 static PyObject *py_srvsvc_NetCharDevInfo0_get_device(PyObject *obj, void *closure)
229 struct srvsvc_NetCharDevInfo0 *object = (struct srvsvc_NetCharDevInfo0 *)pytalloc_get_ptr(obj);
231 if (object->device == NULL) {
233 Py_INCREF(py_device);
235 if (object->device == NULL) {
237 Py_INCREF(py_device);
239 py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
245 static int py_srvsvc_NetCharDevInfo0_set_device(PyObject *py_obj, PyObject *value, void *closure)
247 struct srvsvc_NetCharDevInfo0 *object = (struct srvsvc_NetCharDevInfo0 *)pytalloc_get_ptr(py_obj);
249 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->device");
252 if (value == Py_None) {
253 object->device = NULL;
255 object->device = NULL;
257 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->device");
261 const char *test_str;
262 const char *talloc_str;
263 PyObject *unicode = NULL;
264 if (PyUnicode_Check(value)) {
265 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
266 if (unicode == NULL) {
270 test_str = PyString_AS_STRING(unicode);
271 } else if (PyString_Check(value)) {
272 test_str = PyString_AS_STRING(value);
274 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
277 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
278 if (unicode != NULL) {
281 if (talloc_str == NULL) {
285 object->device = talloc_str;
291 static PyGetSetDef py_srvsvc_NetCharDevInfo0_getsetters[] = {
293 .name = discard_const_p(char, "device"),
294 .get = py_srvsvc_NetCharDevInfo0_get_device,
295 .set = py_srvsvc_NetCharDevInfo0_set_device,
296 .doc = discard_const_p(char, "PIDL-generated element device")
301 static PyObject *py_srvsvc_NetCharDevInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
303 return pytalloc_new(struct srvsvc_NetCharDevInfo0, type);
307 static PyTypeObject srvsvc_NetCharDevInfo0_Type = {
308 PyObject_HEAD_INIT(NULL) 0,
309 .tp_name = "srvsvc.NetCharDevInfo0",
310 .tp_getset = py_srvsvc_NetCharDevInfo0_getsetters,
312 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
313 .tp_new = py_srvsvc_NetCharDevInfo0_new,
317 static PyObject *py_srvsvc_NetCharDevCtr0_get_count(PyObject *obj, void *closure)
319 struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(obj);
321 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
325 static int py_srvsvc_NetCharDevCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
327 struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(py_obj);
329 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
333 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
334 if (PyLong_Check(value)) {
335 unsigned long long test_var;
336 test_var = PyLong_AsUnsignedLongLong(value);
337 if (PyErr_Occurred() != NULL) {
340 if (test_var > uint_max) {
341 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
342 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
345 object->count = test_var;
346 } else if (PyInt_Check(value)) {
348 test_var = PyInt_AsLong(value);
349 if (test_var < 0 || test_var > uint_max) {
350 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
351 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
354 object->count = test_var;
356 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
357 PyInt_Type.tp_name, PyLong_Type.tp_name);
364 static PyObject *py_srvsvc_NetCharDevCtr0_get_array(PyObject *obj, void *closure)
366 struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(obj);
368 if (object->array == NULL) {
372 py_array = PyList_New(object->count);
373 if (py_array == NULL) {
378 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
379 PyObject *py_array_1;
380 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevInfo0_Type, object->array, &object->array[array_cntr_1]);
381 PyList_SetItem(py_array, array_cntr_1, py_array_1);
388 static int py_srvsvc_NetCharDevCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
390 struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(py_obj);
391 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
393 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
396 if (value == Py_None) {
397 object->array = NULL;
399 object->array = NULL;
401 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
404 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
407 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
408 if (!object->array) { return -1;; }
409 talloc_set_name_const(object->array, "ARRAY: object->array");
410 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
411 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
412 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
415 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
416 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
420 object->array[array_cntr_1] = *(struct srvsvc_NetCharDevInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
427 static PyGetSetDef py_srvsvc_NetCharDevCtr0_getsetters[] = {
429 .name = discard_const_p(char, "count"),
430 .get = py_srvsvc_NetCharDevCtr0_get_count,
431 .set = py_srvsvc_NetCharDevCtr0_set_count,
432 .doc = discard_const_p(char, "PIDL-generated element count")
435 .name = discard_const_p(char, "array"),
436 .get = py_srvsvc_NetCharDevCtr0_get_array,
437 .set = py_srvsvc_NetCharDevCtr0_set_array,
438 .doc = discard_const_p(char, "PIDL-generated element array")
443 static PyObject *py_srvsvc_NetCharDevCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
445 return pytalloc_new(struct srvsvc_NetCharDevCtr0, type);
449 static PyTypeObject srvsvc_NetCharDevCtr0_Type = {
450 PyObject_HEAD_INIT(NULL) 0,
451 .tp_name = "srvsvc.NetCharDevCtr0",
452 .tp_getset = py_srvsvc_NetCharDevCtr0_getsetters,
454 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
455 .tp_new = py_srvsvc_NetCharDevCtr0_new,
459 static PyObject *py_srvsvc_NetCharDevInfo1_get_device(PyObject *obj, void *closure)
461 struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(obj);
463 if (object->device == NULL) {
465 Py_INCREF(py_device);
467 if (object->device == NULL) {
469 Py_INCREF(py_device);
471 py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
477 static int py_srvsvc_NetCharDevInfo1_set_device(PyObject *py_obj, PyObject *value, void *closure)
479 struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(py_obj);
481 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->device");
484 if (value == Py_None) {
485 object->device = NULL;
487 object->device = NULL;
489 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->device");
493 const char *test_str;
494 const char *talloc_str;
495 PyObject *unicode = NULL;
496 if (PyUnicode_Check(value)) {
497 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
498 if (unicode == NULL) {
502 test_str = PyString_AS_STRING(unicode);
503 } else if (PyString_Check(value)) {
504 test_str = PyString_AS_STRING(value);
506 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
509 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
510 if (unicode != NULL) {
513 if (talloc_str == NULL) {
517 object->device = talloc_str;
523 static PyObject *py_srvsvc_NetCharDevInfo1_get_status(PyObject *obj, void *closure)
525 struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(obj);
527 py_status = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->status);
531 static int py_srvsvc_NetCharDevInfo1_set_status(PyObject *py_obj, PyObject *value, void *closure)
533 struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(py_obj);
535 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
539 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
540 if (PyLong_Check(value)) {
541 unsigned long long test_var;
542 test_var = PyLong_AsUnsignedLongLong(value);
543 if (PyErr_Occurred() != NULL) {
546 if (test_var > uint_max) {
547 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
548 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
551 object->status = test_var;
552 } else if (PyInt_Check(value)) {
554 test_var = PyInt_AsLong(value);
555 if (test_var < 0 || test_var > uint_max) {
556 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
557 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
560 object->status = test_var;
562 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
563 PyInt_Type.tp_name, PyLong_Type.tp_name);
570 static PyObject *py_srvsvc_NetCharDevInfo1_get_user(PyObject *obj, void *closure)
572 struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(obj);
574 if (object->user == NULL) {
578 if (object->user == NULL) {
582 py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
588 static int py_srvsvc_NetCharDevInfo1_set_user(PyObject *py_obj, PyObject *value, void *closure)
590 struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(py_obj);
592 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
595 if (value == Py_None) {
600 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->user");
604 const char *test_str;
605 const char *talloc_str;
606 PyObject *unicode = NULL;
607 if (PyUnicode_Check(value)) {
608 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
609 if (unicode == NULL) {
613 test_str = PyString_AS_STRING(unicode);
614 } else if (PyString_Check(value)) {
615 test_str = PyString_AS_STRING(value);
617 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
620 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
621 if (unicode != NULL) {
624 if (talloc_str == NULL) {
628 object->user = talloc_str;
634 static PyObject *py_srvsvc_NetCharDevInfo1_get_time(PyObject *obj, void *closure)
636 struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(obj);
638 py_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->time);
642 static int py_srvsvc_NetCharDevInfo1_set_time(PyObject *py_obj, PyObject *value, void *closure)
644 struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(py_obj);
646 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
650 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
651 if (PyLong_Check(value)) {
652 unsigned long long test_var;
653 test_var = PyLong_AsUnsignedLongLong(value);
654 if (PyErr_Occurred() != NULL) {
657 if (test_var > uint_max) {
658 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
659 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
662 object->time = test_var;
663 } else if (PyInt_Check(value)) {
665 test_var = PyInt_AsLong(value);
666 if (test_var < 0 || test_var > uint_max) {
667 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
668 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
671 object->time = test_var;
673 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
674 PyInt_Type.tp_name, PyLong_Type.tp_name);
681 static PyGetSetDef py_srvsvc_NetCharDevInfo1_getsetters[] = {
683 .name = discard_const_p(char, "device"),
684 .get = py_srvsvc_NetCharDevInfo1_get_device,
685 .set = py_srvsvc_NetCharDevInfo1_set_device,
686 .doc = discard_const_p(char, "PIDL-generated element device")
689 .name = discard_const_p(char, "status"),
690 .get = py_srvsvc_NetCharDevInfo1_get_status,
691 .set = py_srvsvc_NetCharDevInfo1_set_status,
692 .doc = discard_const_p(char, "PIDL-generated element status")
695 .name = discard_const_p(char, "user"),
696 .get = py_srvsvc_NetCharDevInfo1_get_user,
697 .set = py_srvsvc_NetCharDevInfo1_set_user,
698 .doc = discard_const_p(char, "PIDL-generated element user")
701 .name = discard_const_p(char, "time"),
702 .get = py_srvsvc_NetCharDevInfo1_get_time,
703 .set = py_srvsvc_NetCharDevInfo1_set_time,
704 .doc = discard_const_p(char, "PIDL-generated element time")
709 static PyObject *py_srvsvc_NetCharDevInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
711 return pytalloc_new(struct srvsvc_NetCharDevInfo1, type);
715 static PyTypeObject srvsvc_NetCharDevInfo1_Type = {
716 PyObject_HEAD_INIT(NULL) 0,
717 .tp_name = "srvsvc.NetCharDevInfo1",
718 .tp_getset = py_srvsvc_NetCharDevInfo1_getsetters,
720 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
721 .tp_new = py_srvsvc_NetCharDevInfo1_new,
725 static PyObject *py_srvsvc_NetCharDevCtr1_get_count(PyObject *obj, void *closure)
727 struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(obj);
729 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
733 static int py_srvsvc_NetCharDevCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
735 struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(py_obj);
737 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
741 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
742 if (PyLong_Check(value)) {
743 unsigned long long test_var;
744 test_var = PyLong_AsUnsignedLongLong(value);
745 if (PyErr_Occurred() != NULL) {
748 if (test_var > uint_max) {
749 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
750 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
753 object->count = test_var;
754 } else if (PyInt_Check(value)) {
756 test_var = PyInt_AsLong(value);
757 if (test_var < 0 || test_var > uint_max) {
758 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
759 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
762 object->count = test_var;
764 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
765 PyInt_Type.tp_name, PyLong_Type.tp_name);
772 static PyObject *py_srvsvc_NetCharDevCtr1_get_array(PyObject *obj, void *closure)
774 struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(obj);
776 if (object->array == NULL) {
780 py_array = PyList_New(object->count);
781 if (py_array == NULL) {
786 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
787 PyObject *py_array_1;
788 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevInfo1_Type, object->array, &object->array[array_cntr_1]);
789 PyList_SetItem(py_array, array_cntr_1, py_array_1);
796 static int py_srvsvc_NetCharDevCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
798 struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(py_obj);
799 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
801 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
804 if (value == Py_None) {
805 object->array = NULL;
807 object->array = NULL;
809 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
812 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
815 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
816 if (!object->array) { return -1;; }
817 talloc_set_name_const(object->array, "ARRAY: object->array");
818 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
819 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
820 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
823 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
824 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
828 object->array[array_cntr_1] = *(struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
835 static PyGetSetDef py_srvsvc_NetCharDevCtr1_getsetters[] = {
837 .name = discard_const_p(char, "count"),
838 .get = py_srvsvc_NetCharDevCtr1_get_count,
839 .set = py_srvsvc_NetCharDevCtr1_set_count,
840 .doc = discard_const_p(char, "PIDL-generated element count")
843 .name = discard_const_p(char, "array"),
844 .get = py_srvsvc_NetCharDevCtr1_get_array,
845 .set = py_srvsvc_NetCharDevCtr1_set_array,
846 .doc = discard_const_p(char, "PIDL-generated element array")
851 static PyObject *py_srvsvc_NetCharDevCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
853 return pytalloc_new(struct srvsvc_NetCharDevCtr1, type);
857 static PyTypeObject srvsvc_NetCharDevCtr1_Type = {
858 PyObject_HEAD_INIT(NULL) 0,
859 .tp_name = "srvsvc.NetCharDevCtr1",
860 .tp_getset = py_srvsvc_NetCharDevCtr1_getsetters,
862 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
863 .tp_new = py_srvsvc_NetCharDevCtr1_new,
866 PyObject *py_import_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevInfo *in)
872 if (in->info0 == NULL) {
876 ret = pytalloc_reference_ex(&srvsvc_NetCharDevInfo0_Type, in->info0, in->info0);
881 if (in->info1 == NULL) {
885 ret = pytalloc_reference_ex(&srvsvc_NetCharDevInfo1_Type, in->info1, in->info1);
895 PyErr_SetString(PyExc_TypeError, "unknown union level");
899 union srvsvc_NetCharDevInfo *py_export_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
901 union srvsvc_NetCharDevInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevInfo);
905 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info0");
906 talloc_free(ret); return NULL;
913 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info0");
914 talloc_free(ret); return NULL;
916 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo0_Type, in, talloc_free(ret); return NULL;);
917 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
919 talloc_free(ret); return NULL;
921 ret->info0 = (struct srvsvc_NetCharDevInfo0 *)pytalloc_get_ptr(in);
927 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
928 talloc_free(ret); return NULL;
935 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1");
936 talloc_free(ret); return NULL;
938 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo1_Type, in, talloc_free(ret); return NULL;);
939 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
941 talloc_free(ret); return NULL;
943 ret->info1 = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(in);
955 PyObject *py_import_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevCtr *in)
961 if (in->ctr0 == NULL) {
965 ret = pytalloc_reference_ex(&srvsvc_NetCharDevCtr0_Type, in->ctr0, in->ctr0);
970 if (in->ctr1 == NULL) {
974 ret = pytalloc_reference_ex(&srvsvc_NetCharDevCtr1_Type, in->ctr1, in->ctr1);
984 PyErr_SetString(PyExc_TypeError, "unknown union level");
988 union srvsvc_NetCharDevCtr *py_export_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
990 union srvsvc_NetCharDevCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevCtr);
994 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
995 talloc_free(ret); return NULL;
1002 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr0");
1003 talloc_free(ret); return NULL;
1005 PY_CHECK_TYPE(&srvsvc_NetCharDevCtr0_Type, in, talloc_free(ret); return NULL;);
1006 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1008 talloc_free(ret); return NULL;
1010 ret->ctr0 = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(in);
1016 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
1017 talloc_free(ret); return NULL;
1019 if (in == Py_None) {
1024 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1");
1025 talloc_free(ret); return NULL;
1027 PY_CHECK_TYPE(&srvsvc_NetCharDevCtr1_Type, in, talloc_free(ret); return NULL;);
1028 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1030 talloc_free(ret); return NULL;
1032 ret->ctr1 = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(in);
1045 static PyObject *py_srvsvc_NetCharDevInfoCtr_get_level(PyObject *obj, void *closure)
1047 struct srvsvc_NetCharDevInfoCtr *object = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(obj);
1049 py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
1053 static int py_srvsvc_NetCharDevInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
1055 struct srvsvc_NetCharDevInfoCtr *object = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(py_obj);
1056 if (value == NULL) {
1057 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
1061 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
1062 if (PyLong_Check(value)) {
1063 unsigned long long test_var;
1064 test_var = PyLong_AsUnsignedLongLong(value);
1065 if (PyErr_Occurred() != NULL) {
1068 if (test_var > uint_max) {
1069 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
1070 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1073 object->level = test_var;
1074 } else if (PyInt_Check(value)) {
1076 test_var = PyInt_AsLong(value);
1077 if (test_var < 0 || test_var > uint_max) {
1078 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
1079 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1082 object->level = test_var;
1084 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1085 PyInt_Type.tp_name, PyLong_Type.tp_name);
1092 static PyObject *py_srvsvc_NetCharDevInfoCtr_get_ctr(PyObject *obj, void *closure)
1094 struct srvsvc_NetCharDevInfoCtr *object = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(obj);
1096 py_ctr = py_import_srvsvc_NetCharDevCtr(pytalloc_get_mem_ctx(obj), object->level, &object->ctr);
1097 if (py_ctr == NULL) {
1103 static int py_srvsvc_NetCharDevInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
1105 struct srvsvc_NetCharDevInfoCtr *object = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(py_obj);
1106 if (value == NULL) {
1107 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
1111 union srvsvc_NetCharDevCtr *ctr_switch_0;
1112 ctr_switch_0 = py_export_srvsvc_NetCharDevCtr(pytalloc_get_mem_ctx(py_obj), object->level, value);
1113 if (ctr_switch_0 == NULL) {
1116 object->ctr = *ctr_switch_0;
1121 static PyGetSetDef py_srvsvc_NetCharDevInfoCtr_getsetters[] = {
1123 .name = discard_const_p(char, "level"),
1124 .get = py_srvsvc_NetCharDevInfoCtr_get_level,
1125 .set = py_srvsvc_NetCharDevInfoCtr_set_level,
1126 .doc = discard_const_p(char, "PIDL-generated element level")
1129 .name = discard_const_p(char, "ctr"),
1130 .get = py_srvsvc_NetCharDevInfoCtr_get_ctr,
1131 .set = py_srvsvc_NetCharDevInfoCtr_set_ctr,
1132 .doc = discard_const_p(char, "PIDL-generated element ctr")
1137 static PyObject *py_srvsvc_NetCharDevInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1139 return pytalloc_new(struct srvsvc_NetCharDevInfoCtr, type);
1143 static PyTypeObject srvsvc_NetCharDevInfoCtr_Type = {
1144 PyObject_HEAD_INIT(NULL) 0,
1145 .tp_name = "srvsvc.NetCharDevInfoCtr",
1146 .tp_getset = py_srvsvc_NetCharDevInfoCtr_getsetters,
1148 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1149 .tp_new = py_srvsvc_NetCharDevInfoCtr_new,
1153 static PyObject *py_srvsvc_NetCharDevQInfo0_get_device(PyObject *obj, void *closure)
1155 struct srvsvc_NetCharDevQInfo0 *object = (struct srvsvc_NetCharDevQInfo0 *)pytalloc_get_ptr(obj);
1156 PyObject *py_device;
1157 if (object->device == NULL) {
1158 py_device = Py_None;
1159 Py_INCREF(py_device);
1161 if (object->device == NULL) {
1162 py_device = Py_None;
1163 Py_INCREF(py_device);
1165 py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
1171 static int py_srvsvc_NetCharDevQInfo0_set_device(PyObject *py_obj, PyObject *value, void *closure)
1173 struct srvsvc_NetCharDevQInfo0 *object = (struct srvsvc_NetCharDevQInfo0 *)pytalloc_get_ptr(py_obj);
1174 if (value == NULL) {
1175 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->device");
1178 if (value == Py_None) {
1179 object->device = NULL;
1181 object->device = NULL;
1182 if (value == NULL) {
1183 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->device");
1187 const char *test_str;
1188 const char *talloc_str;
1189 PyObject *unicode = NULL;
1190 if (PyUnicode_Check(value)) {
1191 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
1192 if (unicode == NULL) {
1196 test_str = PyString_AS_STRING(unicode);
1197 } else if (PyString_Check(value)) {
1198 test_str = PyString_AS_STRING(value);
1200 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
1203 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
1204 if (unicode != NULL) {
1207 if (talloc_str == NULL) {
1211 object->device = talloc_str;
1217 static PyGetSetDef py_srvsvc_NetCharDevQInfo0_getsetters[] = {
1219 .name = discard_const_p(char, "device"),
1220 .get = py_srvsvc_NetCharDevQInfo0_get_device,
1221 .set = py_srvsvc_NetCharDevQInfo0_set_device,
1222 .doc = discard_const_p(char, "PIDL-generated element device")
1227 static PyObject *py_srvsvc_NetCharDevQInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1229 return pytalloc_new(struct srvsvc_NetCharDevQInfo0, type);
1233 static PyTypeObject srvsvc_NetCharDevQInfo0_Type = {
1234 PyObject_HEAD_INIT(NULL) 0,
1235 .tp_name = "srvsvc.NetCharDevQInfo0",
1236 .tp_getset = py_srvsvc_NetCharDevQInfo0_getsetters,
1238 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1239 .tp_new = py_srvsvc_NetCharDevQInfo0_new,
1243 static PyObject *py_srvsvc_NetCharDevQCtr0_get_count(PyObject *obj, void *closure)
1245 struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(obj);
1247 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
1251 static int py_srvsvc_NetCharDevQCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
1253 struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(py_obj);
1254 if (value == NULL) {
1255 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
1259 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
1260 if (PyLong_Check(value)) {
1261 unsigned long long test_var;
1262 test_var = PyLong_AsUnsignedLongLong(value);
1263 if (PyErr_Occurred() != NULL) {
1266 if (test_var > uint_max) {
1267 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
1268 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1271 object->count = test_var;
1272 } else if (PyInt_Check(value)) {
1274 test_var = PyInt_AsLong(value);
1275 if (test_var < 0 || test_var > uint_max) {
1276 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
1277 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1280 object->count = test_var;
1282 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1283 PyInt_Type.tp_name, PyLong_Type.tp_name);
1290 static PyObject *py_srvsvc_NetCharDevQCtr0_get_array(PyObject *obj, void *closure)
1292 struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(obj);
1294 if (object->array == NULL) {
1296 Py_INCREF(py_array);
1298 py_array = PyList_New(object->count);
1299 if (py_array == NULL) {
1304 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
1305 PyObject *py_array_1;
1306 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo0_Type, object->array, &object->array[array_cntr_1]);
1307 PyList_SetItem(py_array, array_cntr_1, py_array_1);
1314 static int py_srvsvc_NetCharDevQCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
1316 struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(py_obj);
1317 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
1318 if (value == NULL) {
1319 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
1322 if (value == Py_None) {
1323 object->array = NULL;
1325 object->array = NULL;
1326 if (value == NULL) {
1327 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
1330 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
1333 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
1334 if (!object->array) { return -1;; }
1335 talloc_set_name_const(object->array, "ARRAY: object->array");
1336 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
1337 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
1338 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
1341 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
1342 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
1346 object->array[array_cntr_1] = *(struct srvsvc_NetCharDevQInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
1353 static PyGetSetDef py_srvsvc_NetCharDevQCtr0_getsetters[] = {
1355 .name = discard_const_p(char, "count"),
1356 .get = py_srvsvc_NetCharDevQCtr0_get_count,
1357 .set = py_srvsvc_NetCharDevQCtr0_set_count,
1358 .doc = discard_const_p(char, "PIDL-generated element count")
1361 .name = discard_const_p(char, "array"),
1362 .get = py_srvsvc_NetCharDevQCtr0_get_array,
1363 .set = py_srvsvc_NetCharDevQCtr0_set_array,
1364 .doc = discard_const_p(char, "PIDL-generated element array")
1369 static PyObject *py_srvsvc_NetCharDevQCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1371 return pytalloc_new(struct srvsvc_NetCharDevQCtr0, type);
1375 static PyTypeObject srvsvc_NetCharDevQCtr0_Type = {
1376 PyObject_HEAD_INIT(NULL) 0,
1377 .tp_name = "srvsvc.NetCharDevQCtr0",
1378 .tp_getset = py_srvsvc_NetCharDevQCtr0_getsetters,
1380 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1381 .tp_new = py_srvsvc_NetCharDevQCtr0_new,
1385 static PyObject *py_srvsvc_NetCharDevQInfo1_get_device(PyObject *obj, void *closure)
1387 struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
1388 PyObject *py_device;
1389 if (object->device == NULL) {
1390 py_device = Py_None;
1391 Py_INCREF(py_device);
1393 if (object->device == NULL) {
1394 py_device = Py_None;
1395 Py_INCREF(py_device);
1397 py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
1403 static int py_srvsvc_NetCharDevQInfo1_set_device(PyObject *py_obj, PyObject *value, void *closure)
1405 struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
1406 if (value == NULL) {
1407 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->device");
1410 if (value == Py_None) {
1411 object->device = NULL;
1413 object->device = NULL;
1414 if (value == NULL) {
1415 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->device");
1419 const char *test_str;
1420 const char *talloc_str;
1421 PyObject *unicode = NULL;
1422 if (PyUnicode_Check(value)) {
1423 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
1424 if (unicode == NULL) {
1428 test_str = PyString_AS_STRING(unicode);
1429 } else if (PyString_Check(value)) {
1430 test_str = PyString_AS_STRING(value);
1432 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
1435 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
1436 if (unicode != NULL) {
1439 if (talloc_str == NULL) {
1443 object->device = talloc_str;
1449 static PyObject *py_srvsvc_NetCharDevQInfo1_get_priority(PyObject *obj, void *closure)
1451 struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
1452 PyObject *py_priority;
1453 py_priority = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->priority);
1457 static int py_srvsvc_NetCharDevQInfo1_set_priority(PyObject *py_obj, PyObject *value, void *closure)
1459 struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
1460 if (value == NULL) {
1461 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->priority");
1465 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priority));
1466 if (PyLong_Check(value)) {
1467 unsigned long long test_var;
1468 test_var = PyLong_AsUnsignedLongLong(value);
1469 if (PyErr_Occurred() != NULL) {
1472 if (test_var > uint_max) {
1473 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
1474 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1477 object->priority = test_var;
1478 } else if (PyInt_Check(value)) {
1480 test_var = PyInt_AsLong(value);
1481 if (test_var < 0 || test_var > uint_max) {
1482 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
1483 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1486 object->priority = test_var;
1488 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1489 PyInt_Type.tp_name, PyLong_Type.tp_name);
1496 static PyObject *py_srvsvc_NetCharDevQInfo1_get_devices(PyObject *obj, void *closure)
1498 struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
1499 PyObject *py_devices;
1500 if (object->devices == NULL) {
1501 py_devices = Py_None;
1502 Py_INCREF(py_devices);
1504 if (object->devices == NULL) {
1505 py_devices = Py_None;
1506 Py_INCREF(py_devices);
1508 py_devices = PyUnicode_Decode(object->devices, strlen(object->devices), "utf-8", "ignore");
1514 static int py_srvsvc_NetCharDevQInfo1_set_devices(PyObject *py_obj, PyObject *value, void *closure)
1516 struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
1517 if (value == NULL) {
1518 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->devices");
1521 if (value == Py_None) {
1522 object->devices = NULL;
1524 object->devices = NULL;
1525 if (value == NULL) {
1526 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->devices");
1530 const char *test_str;
1531 const char *talloc_str;
1532 PyObject *unicode = NULL;
1533 if (PyUnicode_Check(value)) {
1534 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
1535 if (unicode == NULL) {
1539 test_str = PyString_AS_STRING(unicode);
1540 } else if (PyString_Check(value)) {
1541 test_str = PyString_AS_STRING(value);
1543 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
1546 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
1547 if (unicode != NULL) {
1550 if (talloc_str == NULL) {
1554 object->devices = talloc_str;
1560 static PyObject *py_srvsvc_NetCharDevQInfo1_get_users(PyObject *obj, void *closure)
1562 struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
1564 py_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->users);
1568 static int py_srvsvc_NetCharDevQInfo1_set_users(PyObject *py_obj, PyObject *value, void *closure)
1570 struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
1571 if (value == NULL) {
1572 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->users");
1576 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
1577 if (PyLong_Check(value)) {
1578 unsigned long long test_var;
1579 test_var = PyLong_AsUnsignedLongLong(value);
1580 if (PyErr_Occurred() != NULL) {
1583 if (test_var > uint_max) {
1584 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
1585 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1588 object->users = test_var;
1589 } else if (PyInt_Check(value)) {
1591 test_var = PyInt_AsLong(value);
1592 if (test_var < 0 || test_var > uint_max) {
1593 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
1594 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1597 object->users = test_var;
1599 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1600 PyInt_Type.tp_name, PyLong_Type.tp_name);
1607 static PyObject *py_srvsvc_NetCharDevQInfo1_get_num_ahead(PyObject *obj, void *closure)
1609 struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
1610 PyObject *py_num_ahead;
1611 py_num_ahead = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_ahead);
1612 return py_num_ahead;
1615 static int py_srvsvc_NetCharDevQInfo1_set_num_ahead(PyObject *py_obj, PyObject *value, void *closure)
1617 struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
1618 if (value == NULL) {
1619 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_ahead");
1623 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_ahead));
1624 if (PyLong_Check(value)) {
1625 unsigned long long test_var;
1626 test_var = PyLong_AsUnsignedLongLong(value);
1627 if (PyErr_Occurred() != NULL) {
1630 if (test_var > uint_max) {
1631 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
1632 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1635 object->num_ahead = test_var;
1636 } else if (PyInt_Check(value)) {
1638 test_var = PyInt_AsLong(value);
1639 if (test_var < 0 || test_var > uint_max) {
1640 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
1641 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1644 object->num_ahead = test_var;
1646 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1647 PyInt_Type.tp_name, PyLong_Type.tp_name);
1654 static PyGetSetDef py_srvsvc_NetCharDevQInfo1_getsetters[] = {
1656 .name = discard_const_p(char, "device"),
1657 .get = py_srvsvc_NetCharDevQInfo1_get_device,
1658 .set = py_srvsvc_NetCharDevQInfo1_set_device,
1659 .doc = discard_const_p(char, "PIDL-generated element device")
1662 .name = discard_const_p(char, "priority"),
1663 .get = py_srvsvc_NetCharDevQInfo1_get_priority,
1664 .set = py_srvsvc_NetCharDevQInfo1_set_priority,
1665 .doc = discard_const_p(char, "PIDL-generated element priority")
1668 .name = discard_const_p(char, "devices"),
1669 .get = py_srvsvc_NetCharDevQInfo1_get_devices,
1670 .set = py_srvsvc_NetCharDevQInfo1_set_devices,
1671 .doc = discard_const_p(char, "PIDL-generated element devices")
1674 .name = discard_const_p(char, "users"),
1675 .get = py_srvsvc_NetCharDevQInfo1_get_users,
1676 .set = py_srvsvc_NetCharDevQInfo1_set_users,
1677 .doc = discard_const_p(char, "PIDL-generated element users")
1680 .name = discard_const_p(char, "num_ahead"),
1681 .get = py_srvsvc_NetCharDevQInfo1_get_num_ahead,
1682 .set = py_srvsvc_NetCharDevQInfo1_set_num_ahead,
1683 .doc = discard_const_p(char, "PIDL-generated element num_ahead")
1688 static PyObject *py_srvsvc_NetCharDevQInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1690 return pytalloc_new(struct srvsvc_NetCharDevQInfo1, type);
1694 static PyTypeObject srvsvc_NetCharDevQInfo1_Type = {
1695 PyObject_HEAD_INIT(NULL) 0,
1696 .tp_name = "srvsvc.NetCharDevQInfo1",
1697 .tp_getset = py_srvsvc_NetCharDevQInfo1_getsetters,
1699 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1700 .tp_new = py_srvsvc_NetCharDevQInfo1_new,
1704 static PyObject *py_srvsvc_NetCharDevQCtr1_get_count(PyObject *obj, void *closure)
1706 struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(obj);
1708 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
1712 static int py_srvsvc_NetCharDevQCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
1714 struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(py_obj);
1715 if (value == NULL) {
1716 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
1720 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
1721 if (PyLong_Check(value)) {
1722 unsigned long long test_var;
1723 test_var = PyLong_AsUnsignedLongLong(value);
1724 if (PyErr_Occurred() != NULL) {
1727 if (test_var > uint_max) {
1728 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
1729 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1732 object->count = test_var;
1733 } else if (PyInt_Check(value)) {
1735 test_var = PyInt_AsLong(value);
1736 if (test_var < 0 || test_var > uint_max) {
1737 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
1738 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
1741 object->count = test_var;
1743 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1744 PyInt_Type.tp_name, PyLong_Type.tp_name);
1751 static PyObject *py_srvsvc_NetCharDevQCtr1_get_array(PyObject *obj, void *closure)
1753 struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(obj);
1755 if (object->array == NULL) {
1757 Py_INCREF(py_array);
1759 py_array = PyList_New(object->count);
1760 if (py_array == NULL) {
1765 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
1766 PyObject *py_array_1;
1767 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo1_Type, object->array, &object->array[array_cntr_1]);
1768 PyList_SetItem(py_array, array_cntr_1, py_array_1);
1775 static int py_srvsvc_NetCharDevQCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
1777 struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(py_obj);
1778 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
1779 if (value == NULL) {
1780 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
1783 if (value == Py_None) {
1784 object->array = NULL;
1786 object->array = NULL;
1787 if (value == NULL) {
1788 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
1791 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
1794 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
1795 if (!object->array) { return -1;; }
1796 talloc_set_name_const(object->array, "ARRAY: object->array");
1797 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
1798 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
1799 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
1802 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
1803 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
1807 object->array[array_cntr_1] = *(struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
1814 static PyGetSetDef py_srvsvc_NetCharDevQCtr1_getsetters[] = {
1816 .name = discard_const_p(char, "count"),
1817 .get = py_srvsvc_NetCharDevQCtr1_get_count,
1818 .set = py_srvsvc_NetCharDevQCtr1_set_count,
1819 .doc = discard_const_p(char, "PIDL-generated element count")
1822 .name = discard_const_p(char, "array"),
1823 .get = py_srvsvc_NetCharDevQCtr1_get_array,
1824 .set = py_srvsvc_NetCharDevQCtr1_set_array,
1825 .doc = discard_const_p(char, "PIDL-generated element array")
1830 static PyObject *py_srvsvc_NetCharDevQCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1832 return pytalloc_new(struct srvsvc_NetCharDevQCtr1, type);
1836 static PyTypeObject srvsvc_NetCharDevQCtr1_Type = {
1837 PyObject_HEAD_INIT(NULL) 0,
1838 .tp_name = "srvsvc.NetCharDevQCtr1",
1839 .tp_getset = py_srvsvc_NetCharDevQCtr1_getsetters,
1841 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1842 .tp_new = py_srvsvc_NetCharDevQCtr1_new,
1845 PyObject *py_import_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQInfo *in)
1851 if (in->info0 == NULL) {
1855 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo0_Type, in->info0, in->info0);
1860 if (in->info1 == NULL) {
1864 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo1_Type, in->info1, in->info1);
1874 PyErr_SetString(PyExc_TypeError, "unknown union level");
1878 union srvsvc_NetCharDevQInfo *py_export_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
1880 union srvsvc_NetCharDevQInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevQInfo);
1884 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info0");
1885 talloc_free(ret); return NULL;
1887 if (in == Py_None) {
1892 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info0");
1893 talloc_free(ret); return NULL;
1895 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo0_Type, in, talloc_free(ret); return NULL;);
1896 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1898 talloc_free(ret); return NULL;
1900 ret->info0 = (struct srvsvc_NetCharDevQInfo0 *)pytalloc_get_ptr(in);
1906 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
1907 talloc_free(ret); return NULL;
1909 if (in == Py_None) {
1914 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1");
1915 talloc_free(ret); return NULL;
1917 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo1_Type, in, talloc_free(ret); return NULL;);
1918 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1920 talloc_free(ret); return NULL;
1922 ret->info1 = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(in);
1934 PyObject *py_import_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQCtr *in)
1940 if (in->ctr0 == NULL) {
1944 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQCtr0_Type, in->ctr0, in->ctr0);
1949 if (in->ctr1 == NULL) {
1953 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQCtr1_Type, in->ctr1, in->ctr1);
1963 PyErr_SetString(PyExc_TypeError, "unknown union level");
1967 union srvsvc_NetCharDevQCtr *py_export_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
1969 union srvsvc_NetCharDevQCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevQCtr);
1973 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
1974 talloc_free(ret); return NULL;
1976 if (in == Py_None) {
1981 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr0");
1982 talloc_free(ret); return NULL;
1984 PY_CHECK_TYPE(&srvsvc_NetCharDevQCtr0_Type, in, talloc_free(ret); return NULL;);
1985 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1987 talloc_free(ret); return NULL;
1989 ret->ctr0 = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(in);
1995 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
1996 talloc_free(ret); return NULL;
1998 if (in == Py_None) {
2003 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1");
2004 talloc_free(ret); return NULL;
2006 PY_CHECK_TYPE(&srvsvc_NetCharDevQCtr1_Type, in, talloc_free(ret); return NULL;);
2007 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
2009 talloc_free(ret); return NULL;
2011 ret->ctr1 = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(in);
2024 static PyObject *py_srvsvc_NetCharDevQInfoCtr_get_level(PyObject *obj, void *closure)
2026 struct srvsvc_NetCharDevQInfoCtr *object = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(obj);
2028 py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
2032 static int py_srvsvc_NetCharDevQInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
2034 struct srvsvc_NetCharDevQInfoCtr *object = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(py_obj);
2035 if (value == NULL) {
2036 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
2040 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
2041 if (PyLong_Check(value)) {
2042 unsigned long long test_var;
2043 test_var = PyLong_AsUnsignedLongLong(value);
2044 if (PyErr_Occurred() != NULL) {
2047 if (test_var > uint_max) {
2048 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
2049 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2052 object->level = test_var;
2053 } else if (PyInt_Check(value)) {
2055 test_var = PyInt_AsLong(value);
2056 if (test_var < 0 || test_var > uint_max) {
2057 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
2058 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2061 object->level = test_var;
2063 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2064 PyInt_Type.tp_name, PyLong_Type.tp_name);
2071 static PyObject *py_srvsvc_NetCharDevQInfoCtr_get_ctr(PyObject *obj, void *closure)
2073 struct srvsvc_NetCharDevQInfoCtr *object = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(obj);
2075 py_ctr = py_import_srvsvc_NetCharDevQCtr(pytalloc_get_mem_ctx(obj), object->level, &object->ctr);
2076 if (py_ctr == NULL) {
2082 static int py_srvsvc_NetCharDevQInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
2084 struct srvsvc_NetCharDevQInfoCtr *object = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(py_obj);
2085 if (value == NULL) {
2086 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
2090 union srvsvc_NetCharDevQCtr *ctr_switch_0;
2091 ctr_switch_0 = py_export_srvsvc_NetCharDevQCtr(pytalloc_get_mem_ctx(py_obj), object->level, value);
2092 if (ctr_switch_0 == NULL) {
2095 object->ctr = *ctr_switch_0;
2100 static PyGetSetDef py_srvsvc_NetCharDevQInfoCtr_getsetters[] = {
2102 .name = discard_const_p(char, "level"),
2103 .get = py_srvsvc_NetCharDevQInfoCtr_get_level,
2104 .set = py_srvsvc_NetCharDevQInfoCtr_set_level,
2105 .doc = discard_const_p(char, "PIDL-generated element level")
2108 .name = discard_const_p(char, "ctr"),
2109 .get = py_srvsvc_NetCharDevQInfoCtr_get_ctr,
2110 .set = py_srvsvc_NetCharDevQInfoCtr_set_ctr,
2111 .doc = discard_const_p(char, "PIDL-generated element ctr")
2116 static PyObject *py_srvsvc_NetCharDevQInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2118 return pytalloc_new(struct srvsvc_NetCharDevQInfoCtr, type);
2122 static PyTypeObject srvsvc_NetCharDevQInfoCtr_Type = {
2123 PyObject_HEAD_INIT(NULL) 0,
2124 .tp_name = "srvsvc.NetCharDevQInfoCtr",
2125 .tp_getset = py_srvsvc_NetCharDevQInfoCtr_getsetters,
2127 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2128 .tp_new = py_srvsvc_NetCharDevQInfoCtr_new,
2132 static PyObject *py_srvsvc_NetConnInfo0_get_conn_id(PyObject *obj, void *closure)
2134 struct srvsvc_NetConnInfo0 *object = (struct srvsvc_NetConnInfo0 *)pytalloc_get_ptr(obj);
2135 PyObject *py_conn_id;
2136 py_conn_id = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->conn_id);
2140 static int py_srvsvc_NetConnInfo0_set_conn_id(PyObject *py_obj, PyObject *value, void *closure)
2142 struct srvsvc_NetConnInfo0 *object = (struct srvsvc_NetConnInfo0 *)pytalloc_get_ptr(py_obj);
2143 if (value == NULL) {
2144 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->conn_id");
2148 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_id));
2149 if (PyLong_Check(value)) {
2150 unsigned long long test_var;
2151 test_var = PyLong_AsUnsignedLongLong(value);
2152 if (PyErr_Occurred() != NULL) {
2155 if (test_var > uint_max) {
2156 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
2157 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2160 object->conn_id = test_var;
2161 } else if (PyInt_Check(value)) {
2163 test_var = PyInt_AsLong(value);
2164 if (test_var < 0 || test_var > uint_max) {
2165 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
2166 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2169 object->conn_id = test_var;
2171 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2172 PyInt_Type.tp_name, PyLong_Type.tp_name);
2179 static PyGetSetDef py_srvsvc_NetConnInfo0_getsetters[] = {
2181 .name = discard_const_p(char, "conn_id"),
2182 .get = py_srvsvc_NetConnInfo0_get_conn_id,
2183 .set = py_srvsvc_NetConnInfo0_set_conn_id,
2184 .doc = discard_const_p(char, "PIDL-generated element conn_id")
2189 static PyObject *py_srvsvc_NetConnInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2191 return pytalloc_new(struct srvsvc_NetConnInfo0, type);
2195 static PyTypeObject srvsvc_NetConnInfo0_Type = {
2196 PyObject_HEAD_INIT(NULL) 0,
2197 .tp_name = "srvsvc.NetConnInfo0",
2198 .tp_getset = py_srvsvc_NetConnInfo0_getsetters,
2200 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2201 .tp_new = py_srvsvc_NetConnInfo0_new,
2205 static PyObject *py_srvsvc_NetConnCtr0_get_count(PyObject *obj, void *closure)
2207 struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(obj);
2209 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
2213 static int py_srvsvc_NetConnCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
2215 struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(py_obj);
2216 if (value == NULL) {
2217 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
2221 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
2222 if (PyLong_Check(value)) {
2223 unsigned long long test_var;
2224 test_var = PyLong_AsUnsignedLongLong(value);
2225 if (PyErr_Occurred() != NULL) {
2228 if (test_var > uint_max) {
2229 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
2230 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2233 object->count = test_var;
2234 } else if (PyInt_Check(value)) {
2236 test_var = PyInt_AsLong(value);
2237 if (test_var < 0 || test_var > uint_max) {
2238 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
2239 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2242 object->count = test_var;
2244 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2245 PyInt_Type.tp_name, PyLong_Type.tp_name);
2252 static PyObject *py_srvsvc_NetConnCtr0_get_array(PyObject *obj, void *closure)
2254 struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(obj);
2256 if (object->array == NULL) {
2258 Py_INCREF(py_array);
2260 py_array = PyList_New(object->count);
2261 if (py_array == NULL) {
2266 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
2267 PyObject *py_array_1;
2268 py_array_1 = pytalloc_reference_ex(&srvsvc_NetConnInfo0_Type, object->array, &object->array[array_cntr_1]);
2269 PyList_SetItem(py_array, array_cntr_1, py_array_1);
2276 static int py_srvsvc_NetConnCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
2278 struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(py_obj);
2279 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
2280 if (value == NULL) {
2281 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
2284 if (value == Py_None) {
2285 object->array = NULL;
2287 object->array = NULL;
2288 if (value == NULL) {
2289 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
2292 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2295 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
2296 if (!object->array) { return -1;; }
2297 talloc_set_name_const(object->array, "ARRAY: object->array");
2298 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
2299 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
2300 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
2303 PY_CHECK_TYPE(&srvsvc_NetConnInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
2304 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
2308 object->array[array_cntr_1] = *(struct srvsvc_NetConnInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
2315 static PyGetSetDef py_srvsvc_NetConnCtr0_getsetters[] = {
2317 .name = discard_const_p(char, "count"),
2318 .get = py_srvsvc_NetConnCtr0_get_count,
2319 .set = py_srvsvc_NetConnCtr0_set_count,
2320 .doc = discard_const_p(char, "PIDL-generated element count")
2323 .name = discard_const_p(char, "array"),
2324 .get = py_srvsvc_NetConnCtr0_get_array,
2325 .set = py_srvsvc_NetConnCtr0_set_array,
2326 .doc = discard_const_p(char, "PIDL-generated element array")
2331 static PyObject *py_srvsvc_NetConnCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2333 return pytalloc_new(struct srvsvc_NetConnCtr0, type);
2337 static PyTypeObject srvsvc_NetConnCtr0_Type = {
2338 PyObject_HEAD_INIT(NULL) 0,
2339 .tp_name = "srvsvc.NetConnCtr0",
2340 .tp_getset = py_srvsvc_NetConnCtr0_getsetters,
2342 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2343 .tp_new = py_srvsvc_NetConnCtr0_new,
2347 static PyObject *py_srvsvc_NetConnInfo1_get_conn_id(PyObject *obj, void *closure)
2349 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
2350 PyObject *py_conn_id;
2351 py_conn_id = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->conn_id);
2355 static int py_srvsvc_NetConnInfo1_set_conn_id(PyObject *py_obj, PyObject *value, void *closure)
2357 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
2358 if (value == NULL) {
2359 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->conn_id");
2363 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_id));
2364 if (PyLong_Check(value)) {
2365 unsigned long long test_var;
2366 test_var = PyLong_AsUnsignedLongLong(value);
2367 if (PyErr_Occurred() != NULL) {
2370 if (test_var > uint_max) {
2371 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
2372 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2375 object->conn_id = test_var;
2376 } else if (PyInt_Check(value)) {
2378 test_var = PyInt_AsLong(value);
2379 if (test_var < 0 || test_var > uint_max) {
2380 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
2381 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2384 object->conn_id = test_var;
2386 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2387 PyInt_Type.tp_name, PyLong_Type.tp_name);
2394 static PyObject *py_srvsvc_NetConnInfo1_get_conn_type(PyObject *obj, void *closure)
2396 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
2397 PyObject *py_conn_type;
2398 py_conn_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->conn_type);
2399 return py_conn_type;
2402 static int py_srvsvc_NetConnInfo1_set_conn_type(PyObject *py_obj, PyObject *value, void *closure)
2404 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
2405 if (value == NULL) {
2406 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->conn_type");
2410 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_type));
2411 if (PyLong_Check(value)) {
2412 unsigned long long test_var;
2413 test_var = PyLong_AsUnsignedLongLong(value);
2414 if (PyErr_Occurred() != NULL) {
2417 if (test_var > uint_max) {
2418 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
2419 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2422 object->conn_type = test_var;
2423 } else if (PyInt_Check(value)) {
2425 test_var = PyInt_AsLong(value);
2426 if (test_var < 0 || test_var > uint_max) {
2427 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
2428 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2431 object->conn_type = test_var;
2433 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2434 PyInt_Type.tp_name, PyLong_Type.tp_name);
2441 static PyObject *py_srvsvc_NetConnInfo1_get_num_open(PyObject *obj, void *closure)
2443 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
2444 PyObject *py_num_open;
2445 py_num_open = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
2449 static int py_srvsvc_NetConnInfo1_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
2451 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
2452 if (value == NULL) {
2453 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_open");
2457 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
2458 if (PyLong_Check(value)) {
2459 unsigned long long test_var;
2460 test_var = PyLong_AsUnsignedLongLong(value);
2461 if (PyErr_Occurred() != NULL) {
2464 if (test_var > uint_max) {
2465 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
2466 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2469 object->num_open = test_var;
2470 } else if (PyInt_Check(value)) {
2472 test_var = PyInt_AsLong(value);
2473 if (test_var < 0 || test_var > uint_max) {
2474 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
2475 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2478 object->num_open = test_var;
2480 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2481 PyInt_Type.tp_name, PyLong_Type.tp_name);
2488 static PyObject *py_srvsvc_NetConnInfo1_get_num_users(PyObject *obj, void *closure)
2490 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
2491 PyObject *py_num_users;
2492 py_num_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_users);
2493 return py_num_users;
2496 static int py_srvsvc_NetConnInfo1_set_num_users(PyObject *py_obj, PyObject *value, void *closure)
2498 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
2499 if (value == NULL) {
2500 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_users");
2504 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_users));
2505 if (PyLong_Check(value)) {
2506 unsigned long long test_var;
2507 test_var = PyLong_AsUnsignedLongLong(value);
2508 if (PyErr_Occurred() != NULL) {
2511 if (test_var > uint_max) {
2512 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
2513 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2516 object->num_users = test_var;
2517 } else if (PyInt_Check(value)) {
2519 test_var = PyInt_AsLong(value);
2520 if (test_var < 0 || test_var > uint_max) {
2521 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
2522 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2525 object->num_users = test_var;
2527 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2528 PyInt_Type.tp_name, PyLong_Type.tp_name);
2535 static PyObject *py_srvsvc_NetConnInfo1_get_conn_time(PyObject *obj, void *closure)
2537 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
2538 PyObject *py_conn_time;
2539 py_conn_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->conn_time);
2540 return py_conn_time;
2543 static int py_srvsvc_NetConnInfo1_set_conn_time(PyObject *py_obj, PyObject *value, void *closure)
2545 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
2546 if (value == NULL) {
2547 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->conn_time");
2551 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_time));
2552 if (PyLong_Check(value)) {
2553 unsigned long long test_var;
2554 test_var = PyLong_AsUnsignedLongLong(value);
2555 if (PyErr_Occurred() != NULL) {
2558 if (test_var > uint_max) {
2559 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
2560 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2563 object->conn_time = test_var;
2564 } else if (PyInt_Check(value)) {
2566 test_var = PyInt_AsLong(value);
2567 if (test_var < 0 || test_var > uint_max) {
2568 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
2569 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2572 object->conn_time = test_var;
2574 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2575 PyInt_Type.tp_name, PyLong_Type.tp_name);
2582 static PyObject *py_srvsvc_NetConnInfo1_get_user(PyObject *obj, void *closure)
2584 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
2586 if (object->user == NULL) {
2590 if (object->user == NULL) {
2594 py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
2600 static int py_srvsvc_NetConnInfo1_set_user(PyObject *py_obj, PyObject *value, void *closure)
2602 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
2603 if (value == NULL) {
2604 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
2607 if (value == Py_None) {
2608 object->user = NULL;
2610 object->user = NULL;
2611 if (value == NULL) {
2612 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->user");
2616 const char *test_str;
2617 const char *talloc_str;
2618 PyObject *unicode = NULL;
2619 if (PyUnicode_Check(value)) {
2620 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
2621 if (unicode == NULL) {
2625 test_str = PyString_AS_STRING(unicode);
2626 } else if (PyString_Check(value)) {
2627 test_str = PyString_AS_STRING(value);
2629 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
2632 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
2633 if (unicode != NULL) {
2636 if (talloc_str == NULL) {
2640 object->user = talloc_str;
2646 static PyObject *py_srvsvc_NetConnInfo1_get_share(PyObject *obj, void *closure)
2648 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
2650 if (object->share == NULL) {
2652 Py_INCREF(py_share);
2654 if (object->share == NULL) {
2656 Py_INCREF(py_share);
2658 py_share = PyUnicode_Decode(object->share, strlen(object->share), "utf-8", "ignore");
2664 static int py_srvsvc_NetConnInfo1_set_share(PyObject *py_obj, PyObject *value, void *closure)
2666 struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
2667 if (value == NULL) {
2668 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->share");
2671 if (value == Py_None) {
2672 object->share = NULL;
2674 object->share = NULL;
2675 if (value == NULL) {
2676 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->share");
2680 const char *test_str;
2681 const char *talloc_str;
2682 PyObject *unicode = NULL;
2683 if (PyUnicode_Check(value)) {
2684 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
2685 if (unicode == NULL) {
2689 test_str = PyString_AS_STRING(unicode);
2690 } else if (PyString_Check(value)) {
2691 test_str = PyString_AS_STRING(value);
2693 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
2696 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
2697 if (unicode != NULL) {
2700 if (talloc_str == NULL) {
2704 object->share = talloc_str;
2710 static PyGetSetDef py_srvsvc_NetConnInfo1_getsetters[] = {
2712 .name = discard_const_p(char, "conn_id"),
2713 .get = py_srvsvc_NetConnInfo1_get_conn_id,
2714 .set = py_srvsvc_NetConnInfo1_set_conn_id,
2715 .doc = discard_const_p(char, "PIDL-generated element conn_id")
2718 .name = discard_const_p(char, "conn_type"),
2719 .get = py_srvsvc_NetConnInfo1_get_conn_type,
2720 .set = py_srvsvc_NetConnInfo1_set_conn_type,
2721 .doc = discard_const_p(char, "PIDL-generated element conn_type")
2724 .name = discard_const_p(char, "num_open"),
2725 .get = py_srvsvc_NetConnInfo1_get_num_open,
2726 .set = py_srvsvc_NetConnInfo1_set_num_open,
2727 .doc = discard_const_p(char, "PIDL-generated element num_open")
2730 .name = discard_const_p(char, "num_users"),
2731 .get = py_srvsvc_NetConnInfo1_get_num_users,
2732 .set = py_srvsvc_NetConnInfo1_set_num_users,
2733 .doc = discard_const_p(char, "PIDL-generated element num_users")
2736 .name = discard_const_p(char, "conn_time"),
2737 .get = py_srvsvc_NetConnInfo1_get_conn_time,
2738 .set = py_srvsvc_NetConnInfo1_set_conn_time,
2739 .doc = discard_const_p(char, "PIDL-generated element conn_time")
2742 .name = discard_const_p(char, "user"),
2743 .get = py_srvsvc_NetConnInfo1_get_user,
2744 .set = py_srvsvc_NetConnInfo1_set_user,
2745 .doc = discard_const_p(char, "PIDL-generated element user")
2748 .name = discard_const_p(char, "share"),
2749 .get = py_srvsvc_NetConnInfo1_get_share,
2750 .set = py_srvsvc_NetConnInfo1_set_share,
2751 .doc = discard_const_p(char, "PIDL-generated element share")
2756 static PyObject *py_srvsvc_NetConnInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2758 return pytalloc_new(struct srvsvc_NetConnInfo1, type);
2762 static PyTypeObject srvsvc_NetConnInfo1_Type = {
2763 PyObject_HEAD_INIT(NULL) 0,
2764 .tp_name = "srvsvc.NetConnInfo1",
2765 .tp_getset = py_srvsvc_NetConnInfo1_getsetters,
2767 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2768 .tp_new = py_srvsvc_NetConnInfo1_new,
2772 static PyObject *py_srvsvc_NetConnCtr1_get_count(PyObject *obj, void *closure)
2774 struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(obj);
2776 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
2780 static int py_srvsvc_NetConnCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
2782 struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(py_obj);
2783 if (value == NULL) {
2784 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
2788 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
2789 if (PyLong_Check(value)) {
2790 unsigned long long test_var;
2791 test_var = PyLong_AsUnsignedLongLong(value);
2792 if (PyErr_Occurred() != NULL) {
2795 if (test_var > uint_max) {
2796 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
2797 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2800 object->count = test_var;
2801 } else if (PyInt_Check(value)) {
2803 test_var = PyInt_AsLong(value);
2804 if (test_var < 0 || test_var > uint_max) {
2805 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
2806 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
2809 object->count = test_var;
2811 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2812 PyInt_Type.tp_name, PyLong_Type.tp_name);
2819 static PyObject *py_srvsvc_NetConnCtr1_get_array(PyObject *obj, void *closure)
2821 struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(obj);
2823 if (object->array == NULL) {
2825 Py_INCREF(py_array);
2827 py_array = PyList_New(object->count);
2828 if (py_array == NULL) {
2833 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
2834 PyObject *py_array_1;
2835 py_array_1 = pytalloc_reference_ex(&srvsvc_NetConnInfo1_Type, object->array, &object->array[array_cntr_1]);
2836 PyList_SetItem(py_array, array_cntr_1, py_array_1);
2843 static int py_srvsvc_NetConnCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
2845 struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(py_obj);
2846 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
2847 if (value == NULL) {
2848 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
2851 if (value == Py_None) {
2852 object->array = NULL;
2854 object->array = NULL;
2855 if (value == NULL) {
2856 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
2859 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2862 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
2863 if (!object->array) { return -1;; }
2864 talloc_set_name_const(object->array, "ARRAY: object->array");
2865 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
2866 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
2867 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
2870 PY_CHECK_TYPE(&srvsvc_NetConnInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
2871 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
2875 object->array[array_cntr_1] = *(struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
2882 static PyGetSetDef py_srvsvc_NetConnCtr1_getsetters[] = {
2884 .name = discard_const_p(char, "count"),
2885 .get = py_srvsvc_NetConnCtr1_get_count,
2886 .set = py_srvsvc_NetConnCtr1_set_count,
2887 .doc = discard_const_p(char, "PIDL-generated element count")
2890 .name = discard_const_p(char, "array"),
2891 .get = py_srvsvc_NetConnCtr1_get_array,
2892 .set = py_srvsvc_NetConnCtr1_set_array,
2893 .doc = discard_const_p(char, "PIDL-generated element array")
2898 static PyObject *py_srvsvc_NetConnCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2900 return pytalloc_new(struct srvsvc_NetConnCtr1, type);
2904 static PyTypeObject srvsvc_NetConnCtr1_Type = {
2905 PyObject_HEAD_INIT(NULL) 0,
2906 .tp_name = "srvsvc.NetConnCtr1",
2907 .tp_getset = py_srvsvc_NetConnCtr1_getsetters,
2909 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2910 .tp_new = py_srvsvc_NetConnCtr1_new,
2913 PyObject *py_import_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetConnCtr *in)
2919 if (in->ctr0 == NULL) {
2923 ret = pytalloc_reference_ex(&srvsvc_NetConnCtr0_Type, in->ctr0, in->ctr0);
2928 if (in->ctr1 == NULL) {
2932 ret = pytalloc_reference_ex(&srvsvc_NetConnCtr1_Type, in->ctr1, in->ctr1);
2942 PyErr_SetString(PyExc_TypeError, "unknown union level");
2946 union srvsvc_NetConnCtr *py_export_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
2948 union srvsvc_NetConnCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetConnCtr);
2952 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
2953 talloc_free(ret); return NULL;
2955 if (in == Py_None) {
2960 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr0");
2961 talloc_free(ret); return NULL;
2963 PY_CHECK_TYPE(&srvsvc_NetConnCtr0_Type, in, talloc_free(ret); return NULL;);
2964 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
2966 talloc_free(ret); return NULL;
2968 ret->ctr0 = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(in);
2974 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
2975 talloc_free(ret); return NULL;
2977 if (in == Py_None) {
2982 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1");
2983 talloc_free(ret); return NULL;
2985 PY_CHECK_TYPE(&srvsvc_NetConnCtr1_Type, in, talloc_free(ret); return NULL;);
2986 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
2988 talloc_free(ret); return NULL;
2990 ret->ctr1 = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(in);
3003 static PyObject *py_srvsvc_NetConnInfoCtr_get_level(PyObject *obj, void *closure)
3005 struct srvsvc_NetConnInfoCtr *object = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(obj);
3007 py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
3011 static int py_srvsvc_NetConnInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
3013 struct srvsvc_NetConnInfoCtr *object = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(py_obj);
3014 if (value == NULL) {
3015 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
3019 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
3020 if (PyLong_Check(value)) {
3021 unsigned long long test_var;
3022 test_var = PyLong_AsUnsignedLongLong(value);
3023 if (PyErr_Occurred() != NULL) {
3026 if (test_var > uint_max) {
3027 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
3028 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3031 object->level = test_var;
3032 } else if (PyInt_Check(value)) {
3034 test_var = PyInt_AsLong(value);
3035 if (test_var < 0 || test_var > uint_max) {
3036 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
3037 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3040 object->level = test_var;
3042 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
3043 PyInt_Type.tp_name, PyLong_Type.tp_name);
3050 static PyObject *py_srvsvc_NetConnInfoCtr_get_ctr(PyObject *obj, void *closure)
3052 struct srvsvc_NetConnInfoCtr *object = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(obj);
3054 py_ctr = py_import_srvsvc_NetConnCtr(pytalloc_get_mem_ctx(obj), object->level, &object->ctr);
3055 if (py_ctr == NULL) {
3061 static int py_srvsvc_NetConnInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
3063 struct srvsvc_NetConnInfoCtr *object = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(py_obj);
3064 if (value == NULL) {
3065 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
3069 union srvsvc_NetConnCtr *ctr_switch_0;
3070 ctr_switch_0 = py_export_srvsvc_NetConnCtr(pytalloc_get_mem_ctx(py_obj), object->level, value);
3071 if (ctr_switch_0 == NULL) {
3074 object->ctr = *ctr_switch_0;
3079 static PyGetSetDef py_srvsvc_NetConnInfoCtr_getsetters[] = {
3081 .name = discard_const_p(char, "level"),
3082 .get = py_srvsvc_NetConnInfoCtr_get_level,
3083 .set = py_srvsvc_NetConnInfoCtr_set_level,
3084 .doc = discard_const_p(char, "PIDL-generated element level")
3087 .name = discard_const_p(char, "ctr"),
3088 .get = py_srvsvc_NetConnInfoCtr_get_ctr,
3089 .set = py_srvsvc_NetConnInfoCtr_set_ctr,
3090 .doc = discard_const_p(char, "PIDL-generated element ctr")
3095 static PyObject *py_srvsvc_NetConnInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3097 return pytalloc_new(struct srvsvc_NetConnInfoCtr, type);
3101 static PyTypeObject srvsvc_NetConnInfoCtr_Type = {
3102 PyObject_HEAD_INIT(NULL) 0,
3103 .tp_name = "srvsvc.NetConnInfoCtr",
3104 .tp_getset = py_srvsvc_NetConnInfoCtr_getsetters,
3106 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3107 .tp_new = py_srvsvc_NetConnInfoCtr_new,
3111 static PyObject *py_srvsvc_NetFileInfo2_get_fid(PyObject *obj, void *closure)
3113 struct srvsvc_NetFileInfo2 *object = (struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(obj);
3115 py_fid = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->fid);
3119 static int py_srvsvc_NetFileInfo2_set_fid(PyObject *py_obj, PyObject *value, void *closure)
3121 struct srvsvc_NetFileInfo2 *object = (struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(py_obj);
3122 if (value == NULL) {
3123 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fid");
3127 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fid));
3128 if (PyLong_Check(value)) {
3129 unsigned long long test_var;
3130 test_var = PyLong_AsUnsignedLongLong(value);
3131 if (PyErr_Occurred() != NULL) {
3134 if (test_var > uint_max) {
3135 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
3136 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3139 object->fid = test_var;
3140 } else if (PyInt_Check(value)) {
3142 test_var = PyInt_AsLong(value);
3143 if (test_var < 0 || test_var > uint_max) {
3144 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
3145 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3148 object->fid = test_var;
3150 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
3151 PyInt_Type.tp_name, PyLong_Type.tp_name);
3158 static PyGetSetDef py_srvsvc_NetFileInfo2_getsetters[] = {
3160 .name = discard_const_p(char, "fid"),
3161 .get = py_srvsvc_NetFileInfo2_get_fid,
3162 .set = py_srvsvc_NetFileInfo2_set_fid,
3163 .doc = discard_const_p(char, "PIDL-generated element fid")
3168 static PyObject *py_srvsvc_NetFileInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3170 return pytalloc_new(struct srvsvc_NetFileInfo2, type);
3174 static PyTypeObject srvsvc_NetFileInfo2_Type = {
3175 PyObject_HEAD_INIT(NULL) 0,
3176 .tp_name = "srvsvc.NetFileInfo2",
3177 .tp_getset = py_srvsvc_NetFileInfo2_getsetters,
3179 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3180 .tp_new = py_srvsvc_NetFileInfo2_new,
3184 static PyObject *py_srvsvc_NetFileCtr2_get_count(PyObject *obj, void *closure)
3186 struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(obj);
3188 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
3192 static int py_srvsvc_NetFileCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
3194 struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(py_obj);
3195 if (value == NULL) {
3196 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
3200 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
3201 if (PyLong_Check(value)) {
3202 unsigned long long test_var;
3203 test_var = PyLong_AsUnsignedLongLong(value);
3204 if (PyErr_Occurred() != NULL) {
3207 if (test_var > uint_max) {
3208 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
3209 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3212 object->count = test_var;
3213 } else if (PyInt_Check(value)) {
3215 test_var = PyInt_AsLong(value);
3216 if (test_var < 0 || test_var > uint_max) {
3217 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
3218 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3221 object->count = test_var;
3223 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
3224 PyInt_Type.tp_name, PyLong_Type.tp_name);
3231 static PyObject *py_srvsvc_NetFileCtr2_get_array(PyObject *obj, void *closure)
3233 struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(obj);
3235 if (object->array == NULL) {
3237 Py_INCREF(py_array);
3239 py_array = PyList_New(object->count);
3240 if (py_array == NULL) {
3245 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
3246 PyObject *py_array_1;
3247 py_array_1 = pytalloc_reference_ex(&srvsvc_NetFileInfo2_Type, object->array, &object->array[array_cntr_1]);
3248 PyList_SetItem(py_array, array_cntr_1, py_array_1);
3255 static int py_srvsvc_NetFileCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
3257 struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(py_obj);
3258 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
3259 if (value == NULL) {
3260 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
3263 if (value == Py_None) {
3264 object->array = NULL;
3266 object->array = NULL;
3267 if (value == NULL) {
3268 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
3271 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
3274 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
3275 if (!object->array) { return -1;; }
3276 talloc_set_name_const(object->array, "ARRAY: object->array");
3277 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
3278 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
3279 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
3282 PY_CHECK_TYPE(&srvsvc_NetFileInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
3283 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
3287 object->array[array_cntr_1] = *(struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
3294 static PyGetSetDef py_srvsvc_NetFileCtr2_getsetters[] = {
3296 .name = discard_const_p(char, "count"),
3297 .get = py_srvsvc_NetFileCtr2_get_count,
3298 .set = py_srvsvc_NetFileCtr2_set_count,
3299 .doc = discard_const_p(char, "PIDL-generated element count")
3302 .name = discard_const_p(char, "array"),
3303 .get = py_srvsvc_NetFileCtr2_get_array,
3304 .set = py_srvsvc_NetFileCtr2_set_array,
3305 .doc = discard_const_p(char, "PIDL-generated element array")
3310 static PyObject *py_srvsvc_NetFileCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3312 return pytalloc_new(struct srvsvc_NetFileCtr2, type);
3316 static PyTypeObject srvsvc_NetFileCtr2_Type = {
3317 PyObject_HEAD_INIT(NULL) 0,
3318 .tp_name = "srvsvc.NetFileCtr2",
3319 .tp_getset = py_srvsvc_NetFileCtr2_getsetters,
3321 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3322 .tp_new = py_srvsvc_NetFileCtr2_new,
3326 static PyObject *py_srvsvc_NetFileInfo3_get_fid(PyObject *obj, void *closure)
3328 struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
3330 py_fid = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->fid);
3334 static int py_srvsvc_NetFileInfo3_set_fid(PyObject *py_obj, PyObject *value, void *closure)
3336 struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
3337 if (value == NULL) {
3338 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fid");
3342 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fid));
3343 if (PyLong_Check(value)) {
3344 unsigned long long test_var;
3345 test_var = PyLong_AsUnsignedLongLong(value);
3346 if (PyErr_Occurred() != NULL) {
3349 if (test_var > uint_max) {
3350 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
3351 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3354 object->fid = test_var;
3355 } else if (PyInt_Check(value)) {
3357 test_var = PyInt_AsLong(value);
3358 if (test_var < 0 || test_var > uint_max) {
3359 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
3360 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3363 object->fid = test_var;
3365 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
3366 PyInt_Type.tp_name, PyLong_Type.tp_name);
3373 static PyObject *py_srvsvc_NetFileInfo3_get_permissions(PyObject *obj, void *closure)
3375 struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
3376 PyObject *py_permissions;
3377 py_permissions = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->permissions);
3378 return py_permissions;
3381 static int py_srvsvc_NetFileInfo3_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
3383 struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
3384 if (value == NULL) {
3385 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->permissions");
3389 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
3390 if (PyLong_Check(value)) {
3391 unsigned long long test_var;
3392 test_var = PyLong_AsUnsignedLongLong(value);
3393 if (PyErr_Occurred() != NULL) {
3396 if (test_var > uint_max) {
3397 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
3398 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3401 object->permissions = test_var;
3402 } else if (PyInt_Check(value)) {
3404 test_var = PyInt_AsLong(value);
3405 if (test_var < 0 || test_var > uint_max) {
3406 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
3407 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3410 object->permissions = test_var;
3412 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
3413 PyInt_Type.tp_name, PyLong_Type.tp_name);
3420 static PyObject *py_srvsvc_NetFileInfo3_get_num_locks(PyObject *obj, void *closure)
3422 struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
3423 PyObject *py_num_locks;
3424 py_num_locks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_locks);
3425 return py_num_locks;
3428 static int py_srvsvc_NetFileInfo3_set_num_locks(PyObject *py_obj, PyObject *value, void *closure)
3430 struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
3431 if (value == NULL) {
3432 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_locks");
3436 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_locks));
3437 if (PyLong_Check(value)) {
3438 unsigned long long test_var;
3439 test_var = PyLong_AsUnsignedLongLong(value);
3440 if (PyErr_Occurred() != NULL) {
3443 if (test_var > uint_max) {
3444 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
3445 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3448 object->num_locks = test_var;
3449 } else if (PyInt_Check(value)) {
3451 test_var = PyInt_AsLong(value);
3452 if (test_var < 0 || test_var > uint_max) {
3453 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
3454 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3457 object->num_locks = test_var;
3459 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
3460 PyInt_Type.tp_name, PyLong_Type.tp_name);
3467 static PyObject *py_srvsvc_NetFileInfo3_get_path(PyObject *obj, void *closure)
3469 struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
3471 if (object->path == NULL) {
3475 if (object->path == NULL) {
3479 py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
3485 static int py_srvsvc_NetFileInfo3_set_path(PyObject *py_obj, PyObject *value, void *closure)
3487 struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
3488 if (value == NULL) {
3489 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->path");
3492 if (value == Py_None) {
3493 object->path = NULL;
3495 object->path = NULL;
3496 if (value == NULL) {
3497 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->path");
3501 const char *test_str;
3502 const char *talloc_str;
3503 PyObject *unicode = NULL;
3504 if (PyUnicode_Check(value)) {
3505 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
3506 if (unicode == NULL) {
3510 test_str = PyString_AS_STRING(unicode);
3511 } else if (PyString_Check(value)) {
3512 test_str = PyString_AS_STRING(value);
3514 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3517 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
3518 if (unicode != NULL) {
3521 if (talloc_str == NULL) {
3525 object->path = talloc_str;
3531 static PyObject *py_srvsvc_NetFileInfo3_get_user(PyObject *obj, void *closure)
3533 struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
3535 if (object->user == NULL) {
3539 if (object->user == NULL) {
3543 py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
3549 static int py_srvsvc_NetFileInfo3_set_user(PyObject *py_obj, PyObject *value, void *closure)
3551 struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
3552 if (value == NULL) {
3553 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
3556 if (value == Py_None) {
3557 object->user = NULL;
3559 object->user = NULL;
3560 if (value == NULL) {
3561 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->user");
3565 const char *test_str;
3566 const char *talloc_str;
3567 PyObject *unicode = NULL;
3568 if (PyUnicode_Check(value)) {
3569 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
3570 if (unicode == NULL) {
3574 test_str = PyString_AS_STRING(unicode);
3575 } else if (PyString_Check(value)) {
3576 test_str = PyString_AS_STRING(value);
3578 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3581 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
3582 if (unicode != NULL) {
3585 if (talloc_str == NULL) {
3589 object->user = talloc_str;
3595 static PyGetSetDef py_srvsvc_NetFileInfo3_getsetters[] = {
3597 .name = discard_const_p(char, "fid"),
3598 .get = py_srvsvc_NetFileInfo3_get_fid,
3599 .set = py_srvsvc_NetFileInfo3_set_fid,
3600 .doc = discard_const_p(char, "PIDL-generated element fid")
3603 .name = discard_const_p(char, "permissions"),
3604 .get = py_srvsvc_NetFileInfo3_get_permissions,
3605 .set = py_srvsvc_NetFileInfo3_set_permissions,
3606 .doc = discard_const_p(char, "PIDL-generated element permissions")
3609 .name = discard_const_p(char, "num_locks"),
3610 .get = py_srvsvc_NetFileInfo3_get_num_locks,
3611 .set = py_srvsvc_NetFileInfo3_set_num_locks,
3612 .doc = discard_const_p(char, "PIDL-generated element num_locks")
3615 .name = discard_const_p(char, "path"),
3616 .get = py_srvsvc_NetFileInfo3_get_path,
3617 .set = py_srvsvc_NetFileInfo3_set_path,
3618 .doc = discard_const_p(char, "PIDL-generated element path")
3621 .name = discard_const_p(char, "user"),
3622 .get = py_srvsvc_NetFileInfo3_get_user,
3623 .set = py_srvsvc_NetFileInfo3_set_user,
3624 .doc = discard_const_p(char, "PIDL-generated element user")
3629 static PyObject *py_srvsvc_NetFileInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3631 return pytalloc_new(struct srvsvc_NetFileInfo3, type);
3635 static PyTypeObject srvsvc_NetFileInfo3_Type = {
3636 PyObject_HEAD_INIT(NULL) 0,
3637 .tp_name = "srvsvc.NetFileInfo3",
3638 .tp_getset = py_srvsvc_NetFileInfo3_getsetters,
3640 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3641 .tp_new = py_srvsvc_NetFileInfo3_new,
3645 static PyObject *py_srvsvc_NetFileCtr3_get_count(PyObject *obj, void *closure)
3647 struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(obj);
3649 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
3653 static int py_srvsvc_NetFileCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
3655 struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(py_obj);
3656 if (value == NULL) {
3657 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
3661 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
3662 if (PyLong_Check(value)) {
3663 unsigned long long test_var;
3664 test_var = PyLong_AsUnsignedLongLong(value);
3665 if (PyErr_Occurred() != NULL) {
3668 if (test_var > uint_max) {
3669 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
3670 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3673 object->count = test_var;
3674 } else if (PyInt_Check(value)) {
3676 test_var = PyInt_AsLong(value);
3677 if (test_var < 0 || test_var > uint_max) {
3678 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
3679 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3682 object->count = test_var;
3684 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
3685 PyInt_Type.tp_name, PyLong_Type.tp_name);
3692 static PyObject *py_srvsvc_NetFileCtr3_get_array(PyObject *obj, void *closure)
3694 struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(obj);
3696 if (object->array == NULL) {
3698 Py_INCREF(py_array);
3700 py_array = PyList_New(object->count);
3701 if (py_array == NULL) {
3706 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
3707 PyObject *py_array_1;
3708 py_array_1 = pytalloc_reference_ex(&srvsvc_NetFileInfo3_Type, object->array, &object->array[array_cntr_1]);
3709 PyList_SetItem(py_array, array_cntr_1, py_array_1);
3716 static int py_srvsvc_NetFileCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
3718 struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(py_obj);
3719 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
3720 if (value == NULL) {
3721 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
3724 if (value == Py_None) {
3725 object->array = NULL;
3727 object->array = NULL;
3728 if (value == NULL) {
3729 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
3732 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
3735 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
3736 if (!object->array) { return -1;; }
3737 talloc_set_name_const(object->array, "ARRAY: object->array");
3738 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
3739 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
3740 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
3743 PY_CHECK_TYPE(&srvsvc_NetFileInfo3_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
3744 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
3748 object->array[array_cntr_1] = *(struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
3755 static PyGetSetDef py_srvsvc_NetFileCtr3_getsetters[] = {
3757 .name = discard_const_p(char, "count"),
3758 .get = py_srvsvc_NetFileCtr3_get_count,
3759 .set = py_srvsvc_NetFileCtr3_set_count,
3760 .doc = discard_const_p(char, "PIDL-generated element count")
3763 .name = discard_const_p(char, "array"),
3764 .get = py_srvsvc_NetFileCtr3_get_array,
3765 .set = py_srvsvc_NetFileCtr3_set_array,
3766 .doc = discard_const_p(char, "PIDL-generated element array")
3771 static PyObject *py_srvsvc_NetFileCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3773 return pytalloc_new(struct srvsvc_NetFileCtr3, type);
3777 static PyTypeObject srvsvc_NetFileCtr3_Type = {
3778 PyObject_HEAD_INIT(NULL) 0,
3779 .tp_name = "srvsvc.NetFileCtr3",
3780 .tp_getset = py_srvsvc_NetFileCtr3_getsetters,
3782 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3783 .tp_new = py_srvsvc_NetFileCtr3_new,
3786 PyObject *py_import_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileInfo *in)
3792 if (in->info2 == NULL) {
3796 ret = pytalloc_reference_ex(&srvsvc_NetFileInfo2_Type, in->info2, in->info2);
3801 if (in->info3 == NULL) {
3805 ret = pytalloc_reference_ex(&srvsvc_NetFileInfo3_Type, in->info3, in->info3);
3815 PyErr_SetString(PyExc_TypeError, "unknown union level");
3819 union srvsvc_NetFileInfo *py_export_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
3821 union srvsvc_NetFileInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetFileInfo);
3825 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info2");
3826 talloc_free(ret); return NULL;
3828 if (in == Py_None) {
3833 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info2");
3834 talloc_free(ret); return NULL;
3836 PY_CHECK_TYPE(&srvsvc_NetFileInfo2_Type, in, talloc_free(ret); return NULL;);
3837 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
3839 talloc_free(ret); return NULL;
3841 ret->info2 = (struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(in);
3847 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info3");
3848 talloc_free(ret); return NULL;
3850 if (in == Py_None) {
3855 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info3");
3856 talloc_free(ret); return NULL;
3858 PY_CHECK_TYPE(&srvsvc_NetFileInfo3_Type, in, talloc_free(ret); return NULL;);
3859 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
3861 talloc_free(ret); return NULL;
3863 ret->info3 = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(in);
3875 PyObject *py_import_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileCtr *in)
3881 if (in->ctr2 == NULL) {
3885 ret = pytalloc_reference_ex(&srvsvc_NetFileCtr2_Type, in->ctr2, in->ctr2);
3890 if (in->ctr3 == NULL) {
3894 ret = pytalloc_reference_ex(&srvsvc_NetFileCtr3_Type, in->ctr3, in->ctr3);
3904 PyErr_SetString(PyExc_TypeError, "unknown union level");
3908 union srvsvc_NetFileCtr *py_export_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
3910 union srvsvc_NetFileCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetFileCtr);
3914 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
3915 talloc_free(ret); return NULL;
3917 if (in == Py_None) {
3922 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr2");
3923 talloc_free(ret); return NULL;
3925 PY_CHECK_TYPE(&srvsvc_NetFileCtr2_Type, in, talloc_free(ret); return NULL;);
3926 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
3928 talloc_free(ret); return NULL;
3930 ret->ctr2 = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(in);
3936 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr3");
3937 talloc_free(ret); return NULL;
3939 if (in == Py_None) {
3944 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr3");
3945 talloc_free(ret); return NULL;
3947 PY_CHECK_TYPE(&srvsvc_NetFileCtr3_Type, in, talloc_free(ret); return NULL;);
3948 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
3950 talloc_free(ret); return NULL;
3952 ret->ctr3 = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(in);
3965 static PyObject *py_srvsvc_NetFileInfoCtr_get_level(PyObject *obj, void *closure)
3967 struct srvsvc_NetFileInfoCtr *object = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(obj);
3969 py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
3973 static int py_srvsvc_NetFileInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
3975 struct srvsvc_NetFileInfoCtr *object = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(py_obj);
3976 if (value == NULL) {
3977 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
3981 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
3982 if (PyLong_Check(value)) {
3983 unsigned long long test_var;
3984 test_var = PyLong_AsUnsignedLongLong(value);
3985 if (PyErr_Occurred() != NULL) {
3988 if (test_var > uint_max) {
3989 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
3990 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
3993 object->level = test_var;
3994 } else if (PyInt_Check(value)) {
3996 test_var = PyInt_AsLong(value);
3997 if (test_var < 0 || test_var > uint_max) {
3998 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
3999 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4002 object->level = test_var;
4004 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
4005 PyInt_Type.tp_name, PyLong_Type.tp_name);
4012 static PyObject *py_srvsvc_NetFileInfoCtr_get_ctr(PyObject *obj, void *closure)
4014 struct srvsvc_NetFileInfoCtr *object = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(obj);
4016 py_ctr = py_import_srvsvc_NetFileCtr(pytalloc_get_mem_ctx(obj), object->level, &object->ctr);
4017 if (py_ctr == NULL) {
4023 static int py_srvsvc_NetFileInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
4025 struct srvsvc_NetFileInfoCtr *object = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(py_obj);
4026 if (value == NULL) {
4027 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
4031 union srvsvc_NetFileCtr *ctr_switch_0;
4032 ctr_switch_0 = py_export_srvsvc_NetFileCtr(pytalloc_get_mem_ctx(py_obj), object->level, value);
4033 if (ctr_switch_0 == NULL) {
4036 object->ctr = *ctr_switch_0;
4041 static PyGetSetDef py_srvsvc_NetFileInfoCtr_getsetters[] = {
4043 .name = discard_const_p(char, "level"),
4044 .get = py_srvsvc_NetFileInfoCtr_get_level,
4045 .set = py_srvsvc_NetFileInfoCtr_set_level,
4046 .doc = discard_const_p(char, "PIDL-generated element level")
4049 .name = discard_const_p(char, "ctr"),
4050 .get = py_srvsvc_NetFileInfoCtr_get_ctr,
4051 .set = py_srvsvc_NetFileInfoCtr_set_ctr,
4052 .doc = discard_const_p(char, "PIDL-generated element ctr")
4057 static PyObject *py_srvsvc_NetFileInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4059 return pytalloc_new(struct srvsvc_NetFileInfoCtr, type);
4063 static PyTypeObject srvsvc_NetFileInfoCtr_Type = {
4064 PyObject_HEAD_INIT(NULL) 0,
4065 .tp_name = "srvsvc.NetFileInfoCtr",
4066 .tp_getset = py_srvsvc_NetFileInfoCtr_getsetters,
4068 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4069 .tp_new = py_srvsvc_NetFileInfoCtr_new,
4073 static PyObject *py_srvsvc_NetSessInfo0_get_client(PyObject *obj, void *closure)
4075 struct srvsvc_NetSessInfo0 *object = (struct srvsvc_NetSessInfo0 *)pytalloc_get_ptr(obj);
4076 PyObject *py_client;
4077 if (object->client == NULL) {
4078 py_client = Py_None;
4079 Py_INCREF(py_client);
4081 if (object->client == NULL) {
4082 py_client = Py_None;
4083 Py_INCREF(py_client);
4085 py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
4091 static int py_srvsvc_NetSessInfo0_set_client(PyObject *py_obj, PyObject *value, void *closure)
4093 struct srvsvc_NetSessInfo0 *object = (struct srvsvc_NetSessInfo0 *)pytalloc_get_ptr(py_obj);
4094 if (value == NULL) {
4095 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client");
4098 if (value == Py_None) {
4099 object->client = NULL;
4101 object->client = NULL;
4102 if (value == NULL) {
4103 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->client");
4107 const char *test_str;
4108 const char *talloc_str;
4109 PyObject *unicode = NULL;
4110 if (PyUnicode_Check(value)) {
4111 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
4112 if (unicode == NULL) {
4116 test_str = PyString_AS_STRING(unicode);
4117 } else if (PyString_Check(value)) {
4118 test_str = PyString_AS_STRING(value);
4120 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4123 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
4124 if (unicode != NULL) {
4127 if (talloc_str == NULL) {
4131 object->client = talloc_str;
4137 static PyGetSetDef py_srvsvc_NetSessInfo0_getsetters[] = {
4139 .name = discard_const_p(char, "client"),
4140 .get = py_srvsvc_NetSessInfo0_get_client,
4141 .set = py_srvsvc_NetSessInfo0_set_client,
4142 .doc = discard_const_p(char, "PIDL-generated element client")
4147 static PyObject *py_srvsvc_NetSessInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4149 return pytalloc_new(struct srvsvc_NetSessInfo0, type);
4153 static PyTypeObject srvsvc_NetSessInfo0_Type = {
4154 PyObject_HEAD_INIT(NULL) 0,
4155 .tp_name = "srvsvc.NetSessInfo0",
4156 .tp_getset = py_srvsvc_NetSessInfo0_getsetters,
4158 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4159 .tp_new = py_srvsvc_NetSessInfo0_new,
4163 static PyObject *py_srvsvc_NetSessCtr0_get_count(PyObject *obj, void *closure)
4165 struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(obj);
4167 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
4171 static int py_srvsvc_NetSessCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
4173 struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(py_obj);
4174 if (value == NULL) {
4175 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
4179 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
4180 if (PyLong_Check(value)) {
4181 unsigned long long test_var;
4182 test_var = PyLong_AsUnsignedLongLong(value);
4183 if (PyErr_Occurred() != NULL) {
4186 if (test_var > uint_max) {
4187 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
4188 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4191 object->count = test_var;
4192 } else if (PyInt_Check(value)) {
4194 test_var = PyInt_AsLong(value);
4195 if (test_var < 0 || test_var > uint_max) {
4196 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
4197 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4200 object->count = test_var;
4202 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
4203 PyInt_Type.tp_name, PyLong_Type.tp_name);
4210 static PyObject *py_srvsvc_NetSessCtr0_get_array(PyObject *obj, void *closure)
4212 struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(obj);
4214 if (object->array == NULL) {
4216 Py_INCREF(py_array);
4218 py_array = PyList_New(object->count);
4219 if (py_array == NULL) {
4224 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
4225 PyObject *py_array_1;
4226 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo0_Type, object->array, &object->array[array_cntr_1]);
4227 PyList_SetItem(py_array, array_cntr_1, py_array_1);
4234 static int py_srvsvc_NetSessCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
4236 struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(py_obj);
4237 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
4238 if (value == NULL) {
4239 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
4242 if (value == Py_None) {
4243 object->array = NULL;
4245 object->array = NULL;
4246 if (value == NULL) {
4247 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
4250 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
4253 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
4254 if (!object->array) { return -1;; }
4255 talloc_set_name_const(object->array, "ARRAY: object->array");
4256 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
4257 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
4258 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
4261 PY_CHECK_TYPE(&srvsvc_NetSessInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
4262 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
4266 object->array[array_cntr_1] = *(struct srvsvc_NetSessInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
4273 static PyGetSetDef py_srvsvc_NetSessCtr0_getsetters[] = {
4275 .name = discard_const_p(char, "count"),
4276 .get = py_srvsvc_NetSessCtr0_get_count,
4277 .set = py_srvsvc_NetSessCtr0_set_count,
4278 .doc = discard_const_p(char, "PIDL-generated element count")
4281 .name = discard_const_p(char, "array"),
4282 .get = py_srvsvc_NetSessCtr0_get_array,
4283 .set = py_srvsvc_NetSessCtr0_set_array,
4284 .doc = discard_const_p(char, "PIDL-generated element array")
4289 static PyObject *py_srvsvc_NetSessCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4291 return pytalloc_new(struct srvsvc_NetSessCtr0, type);
4295 static PyTypeObject srvsvc_NetSessCtr0_Type = {
4296 PyObject_HEAD_INIT(NULL) 0,
4297 .tp_name = "srvsvc.NetSessCtr0",
4298 .tp_getset = py_srvsvc_NetSessCtr0_getsetters,
4300 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4301 .tp_new = py_srvsvc_NetSessCtr0_new,
4305 static PyObject *py_srvsvc_NetSessInfo1_get_client(PyObject *obj, void *closure)
4307 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
4308 PyObject *py_client;
4309 if (object->client == NULL) {
4310 py_client = Py_None;
4311 Py_INCREF(py_client);
4313 if (object->client == NULL) {
4314 py_client = Py_None;
4315 Py_INCREF(py_client);
4317 py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
4323 static int py_srvsvc_NetSessInfo1_set_client(PyObject *py_obj, PyObject *value, void *closure)
4325 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
4326 if (value == NULL) {
4327 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client");
4330 if (value == Py_None) {
4331 object->client = NULL;
4333 object->client = NULL;
4334 if (value == NULL) {
4335 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->client");
4339 const char *test_str;
4340 const char *talloc_str;
4341 PyObject *unicode = NULL;
4342 if (PyUnicode_Check(value)) {
4343 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
4344 if (unicode == NULL) {
4348 test_str = PyString_AS_STRING(unicode);
4349 } else if (PyString_Check(value)) {
4350 test_str = PyString_AS_STRING(value);
4352 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4355 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
4356 if (unicode != NULL) {
4359 if (talloc_str == NULL) {
4363 object->client = talloc_str;
4369 static PyObject *py_srvsvc_NetSessInfo1_get_user(PyObject *obj, void *closure)
4371 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
4373 if (object->user == NULL) {
4377 if (object->user == NULL) {
4381 py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
4387 static int py_srvsvc_NetSessInfo1_set_user(PyObject *py_obj, PyObject *value, void *closure)
4389 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
4390 if (value == NULL) {
4391 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
4394 if (value == Py_None) {
4395 object->user = NULL;
4397 object->user = NULL;
4398 if (value == NULL) {
4399 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->user");
4403 const char *test_str;
4404 const char *talloc_str;
4405 PyObject *unicode = NULL;
4406 if (PyUnicode_Check(value)) {
4407 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
4408 if (unicode == NULL) {
4412 test_str = PyString_AS_STRING(unicode);
4413 } else if (PyString_Check(value)) {
4414 test_str = PyString_AS_STRING(value);
4416 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4419 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
4420 if (unicode != NULL) {
4423 if (talloc_str == NULL) {
4427 object->user = talloc_str;
4433 static PyObject *py_srvsvc_NetSessInfo1_get_num_open(PyObject *obj, void *closure)
4435 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
4436 PyObject *py_num_open;
4437 py_num_open = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
4441 static int py_srvsvc_NetSessInfo1_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
4443 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
4444 if (value == NULL) {
4445 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_open");
4449 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
4450 if (PyLong_Check(value)) {
4451 unsigned long long test_var;
4452 test_var = PyLong_AsUnsignedLongLong(value);
4453 if (PyErr_Occurred() != NULL) {
4456 if (test_var > uint_max) {
4457 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
4458 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4461 object->num_open = test_var;
4462 } else if (PyInt_Check(value)) {
4464 test_var = PyInt_AsLong(value);
4465 if (test_var < 0 || test_var > uint_max) {
4466 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
4467 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4470 object->num_open = test_var;
4472 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
4473 PyInt_Type.tp_name, PyLong_Type.tp_name);
4480 static PyObject *py_srvsvc_NetSessInfo1_get_time(PyObject *obj, void *closure)
4482 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
4484 py_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->time);
4488 static int py_srvsvc_NetSessInfo1_set_time(PyObject *py_obj, PyObject *value, void *closure)
4490 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
4491 if (value == NULL) {
4492 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
4496 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
4497 if (PyLong_Check(value)) {
4498 unsigned long long test_var;
4499 test_var = PyLong_AsUnsignedLongLong(value);
4500 if (PyErr_Occurred() != NULL) {
4503 if (test_var > uint_max) {
4504 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
4505 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4508 object->time = test_var;
4509 } else if (PyInt_Check(value)) {
4511 test_var = PyInt_AsLong(value);
4512 if (test_var < 0 || test_var > uint_max) {
4513 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
4514 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4517 object->time = test_var;
4519 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
4520 PyInt_Type.tp_name, PyLong_Type.tp_name);
4527 static PyObject *py_srvsvc_NetSessInfo1_get_idle_time(PyObject *obj, void *closure)
4529 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
4530 PyObject *py_idle_time;
4531 py_idle_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
4532 return py_idle_time;
4535 static int py_srvsvc_NetSessInfo1_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
4537 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
4538 if (value == NULL) {
4539 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->idle_time");
4543 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
4544 if (PyLong_Check(value)) {
4545 unsigned long long test_var;
4546 test_var = PyLong_AsUnsignedLongLong(value);
4547 if (PyErr_Occurred() != NULL) {
4550 if (test_var > uint_max) {
4551 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
4552 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4555 object->idle_time = test_var;
4556 } else if (PyInt_Check(value)) {
4558 test_var = PyInt_AsLong(value);
4559 if (test_var < 0 || test_var > uint_max) {
4560 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
4561 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4564 object->idle_time = test_var;
4566 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
4567 PyInt_Type.tp_name, PyLong_Type.tp_name);
4574 static PyObject *py_srvsvc_NetSessInfo1_get_user_flags(PyObject *obj, void *closure)
4576 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
4577 PyObject *py_user_flags;
4578 py_user_flags = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
4579 return py_user_flags;
4582 static int py_srvsvc_NetSessInfo1_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
4584 struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
4585 if (value == NULL) {
4586 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_flags");
4590 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
4591 if (PyLong_Check(value)) {
4592 unsigned long long test_var;
4593 test_var = PyLong_AsUnsignedLongLong(value);
4594 if (PyErr_Occurred() != NULL) {
4597 if (test_var > uint_max) {
4598 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
4599 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4602 object->user_flags = test_var;
4603 } else if (PyInt_Check(value)) {
4605 test_var = PyInt_AsLong(value);
4606 if (test_var < 0 || test_var > uint_max) {
4607 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
4608 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4611 object->user_flags = test_var;
4613 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
4614 PyInt_Type.tp_name, PyLong_Type.tp_name);
4621 static PyGetSetDef py_srvsvc_NetSessInfo1_getsetters[] = {
4623 .name = discard_const_p(char, "client"),
4624 .get = py_srvsvc_NetSessInfo1_get_client,
4625 .set = py_srvsvc_NetSessInfo1_set_client,
4626 .doc = discard_const_p(char, "PIDL-generated element client")
4629 .name = discard_const_p(char, "user"),
4630 .get = py_srvsvc_NetSessInfo1_get_user,
4631 .set = py_srvsvc_NetSessInfo1_set_user,
4632 .doc = discard_const_p(char, "PIDL-generated element user")
4635 .name = discard_const_p(char, "num_open"),
4636 .get = py_srvsvc_NetSessInfo1_get_num_open,
4637 .set = py_srvsvc_NetSessInfo1_set_num_open,
4638 .doc = discard_const_p(char, "PIDL-generated element num_open")
4641 .name = discard_const_p(char, "time"),
4642 .get = py_srvsvc_NetSessInfo1_get_time,
4643 .set = py_srvsvc_NetSessInfo1_set_time,
4644 .doc = discard_const_p(char, "PIDL-generated element time")
4647 .name = discard_const_p(char, "idle_time"),
4648 .get = py_srvsvc_NetSessInfo1_get_idle_time,
4649 .set = py_srvsvc_NetSessInfo1_set_idle_time,
4650 .doc = discard_const_p(char, "PIDL-generated element idle_time")
4653 .name = discard_const_p(char, "user_flags"),
4654 .get = py_srvsvc_NetSessInfo1_get_user_flags,
4655 .set = py_srvsvc_NetSessInfo1_set_user_flags,
4656 .doc = discard_const_p(char, "PIDL-generated element user_flags")
4661 static PyObject *py_srvsvc_NetSessInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4663 return pytalloc_new(struct srvsvc_NetSessInfo1, type);
4667 static PyTypeObject srvsvc_NetSessInfo1_Type = {
4668 PyObject_HEAD_INIT(NULL) 0,
4669 .tp_name = "srvsvc.NetSessInfo1",
4670 .tp_getset = py_srvsvc_NetSessInfo1_getsetters,
4672 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4673 .tp_new = py_srvsvc_NetSessInfo1_new,
4677 static PyObject *py_srvsvc_NetSessCtr1_get_count(PyObject *obj, void *closure)
4679 struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(obj);
4681 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
4685 static int py_srvsvc_NetSessCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
4687 struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(py_obj);
4688 if (value == NULL) {
4689 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
4693 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
4694 if (PyLong_Check(value)) {
4695 unsigned long long test_var;
4696 test_var = PyLong_AsUnsignedLongLong(value);
4697 if (PyErr_Occurred() != NULL) {
4700 if (test_var > uint_max) {
4701 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
4702 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4705 object->count = test_var;
4706 } else if (PyInt_Check(value)) {
4708 test_var = PyInt_AsLong(value);
4709 if (test_var < 0 || test_var > uint_max) {
4710 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
4711 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4714 object->count = test_var;
4716 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
4717 PyInt_Type.tp_name, PyLong_Type.tp_name);
4724 static PyObject *py_srvsvc_NetSessCtr1_get_array(PyObject *obj, void *closure)
4726 struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(obj);
4728 if (object->array == NULL) {
4730 Py_INCREF(py_array);
4732 py_array = PyList_New(object->count);
4733 if (py_array == NULL) {
4738 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
4739 PyObject *py_array_1;
4740 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo1_Type, object->array, &object->array[array_cntr_1]);
4741 PyList_SetItem(py_array, array_cntr_1, py_array_1);
4748 static int py_srvsvc_NetSessCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
4750 struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(py_obj);
4751 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
4752 if (value == NULL) {
4753 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
4756 if (value == Py_None) {
4757 object->array = NULL;
4759 object->array = NULL;
4760 if (value == NULL) {
4761 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
4764 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
4767 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
4768 if (!object->array) { return -1;; }
4769 talloc_set_name_const(object->array, "ARRAY: object->array");
4770 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
4771 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
4772 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
4775 PY_CHECK_TYPE(&srvsvc_NetSessInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
4776 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
4780 object->array[array_cntr_1] = *(struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
4787 static PyGetSetDef py_srvsvc_NetSessCtr1_getsetters[] = {
4789 .name = discard_const_p(char, "count"),
4790 .get = py_srvsvc_NetSessCtr1_get_count,
4791 .set = py_srvsvc_NetSessCtr1_set_count,
4792 .doc = discard_const_p(char, "PIDL-generated element count")
4795 .name = discard_const_p(char, "array"),
4796 .get = py_srvsvc_NetSessCtr1_get_array,
4797 .set = py_srvsvc_NetSessCtr1_set_array,
4798 .doc = discard_const_p(char, "PIDL-generated element array")
4803 static PyObject *py_srvsvc_NetSessCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4805 return pytalloc_new(struct srvsvc_NetSessCtr1, type);
4809 static PyTypeObject srvsvc_NetSessCtr1_Type = {
4810 PyObject_HEAD_INIT(NULL) 0,
4811 .tp_name = "srvsvc.NetSessCtr1",
4812 .tp_getset = py_srvsvc_NetSessCtr1_getsetters,
4814 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4815 .tp_new = py_srvsvc_NetSessCtr1_new,
4819 static PyObject *py_srvsvc_NetSessInfo2_get_client(PyObject *obj, void *closure)
4821 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
4822 PyObject *py_client;
4823 if (object->client == NULL) {
4824 py_client = Py_None;
4825 Py_INCREF(py_client);
4827 if (object->client == NULL) {
4828 py_client = Py_None;
4829 Py_INCREF(py_client);
4831 py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
4837 static int py_srvsvc_NetSessInfo2_set_client(PyObject *py_obj, PyObject *value, void *closure)
4839 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
4840 if (value == NULL) {
4841 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client");
4844 if (value == Py_None) {
4845 object->client = NULL;
4847 object->client = NULL;
4848 if (value == NULL) {
4849 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->client");
4853 const char *test_str;
4854 const char *talloc_str;
4855 PyObject *unicode = NULL;
4856 if (PyUnicode_Check(value)) {
4857 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
4858 if (unicode == NULL) {
4862 test_str = PyString_AS_STRING(unicode);
4863 } else if (PyString_Check(value)) {
4864 test_str = PyString_AS_STRING(value);
4866 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4869 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
4870 if (unicode != NULL) {
4873 if (talloc_str == NULL) {
4877 object->client = talloc_str;
4883 static PyObject *py_srvsvc_NetSessInfo2_get_user(PyObject *obj, void *closure)
4885 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
4887 if (object->user == NULL) {
4891 if (object->user == NULL) {
4895 py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
4901 static int py_srvsvc_NetSessInfo2_set_user(PyObject *py_obj, PyObject *value, void *closure)
4903 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
4904 if (value == NULL) {
4905 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
4908 if (value == Py_None) {
4909 object->user = NULL;
4911 object->user = NULL;
4912 if (value == NULL) {
4913 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->user");
4917 const char *test_str;
4918 const char *talloc_str;
4919 PyObject *unicode = NULL;
4920 if (PyUnicode_Check(value)) {
4921 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
4922 if (unicode == NULL) {
4926 test_str = PyString_AS_STRING(unicode);
4927 } else if (PyString_Check(value)) {
4928 test_str = PyString_AS_STRING(value);
4930 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4933 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
4934 if (unicode != NULL) {
4937 if (talloc_str == NULL) {
4941 object->user = talloc_str;
4947 static PyObject *py_srvsvc_NetSessInfo2_get_num_open(PyObject *obj, void *closure)
4949 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
4950 PyObject *py_num_open;
4951 py_num_open = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
4955 static int py_srvsvc_NetSessInfo2_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
4957 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
4958 if (value == NULL) {
4959 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_open");
4963 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
4964 if (PyLong_Check(value)) {
4965 unsigned long long test_var;
4966 test_var = PyLong_AsUnsignedLongLong(value);
4967 if (PyErr_Occurred() != NULL) {
4970 if (test_var > uint_max) {
4971 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
4972 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4975 object->num_open = test_var;
4976 } else if (PyInt_Check(value)) {
4978 test_var = PyInt_AsLong(value);
4979 if (test_var < 0 || test_var > uint_max) {
4980 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
4981 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
4984 object->num_open = test_var;
4986 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
4987 PyInt_Type.tp_name, PyLong_Type.tp_name);
4994 static PyObject *py_srvsvc_NetSessInfo2_get_time(PyObject *obj, void *closure)
4996 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
4998 py_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->time);
5002 static int py_srvsvc_NetSessInfo2_set_time(PyObject *py_obj, PyObject *value, void *closure)
5004 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
5005 if (value == NULL) {
5006 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
5010 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
5011 if (PyLong_Check(value)) {
5012 unsigned long long test_var;
5013 test_var = PyLong_AsUnsignedLongLong(value);
5014 if (PyErr_Occurred() != NULL) {
5017 if (test_var > uint_max) {
5018 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
5019 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5022 object->time = test_var;
5023 } else if (PyInt_Check(value)) {
5025 test_var = PyInt_AsLong(value);
5026 if (test_var < 0 || test_var > uint_max) {
5027 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
5028 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5031 object->time = test_var;
5033 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
5034 PyInt_Type.tp_name, PyLong_Type.tp_name);
5041 static PyObject *py_srvsvc_NetSessInfo2_get_idle_time(PyObject *obj, void *closure)
5043 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
5044 PyObject *py_idle_time;
5045 py_idle_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
5046 return py_idle_time;
5049 static int py_srvsvc_NetSessInfo2_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
5051 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
5052 if (value == NULL) {
5053 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->idle_time");
5057 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
5058 if (PyLong_Check(value)) {
5059 unsigned long long test_var;
5060 test_var = PyLong_AsUnsignedLongLong(value);
5061 if (PyErr_Occurred() != NULL) {
5064 if (test_var > uint_max) {
5065 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
5066 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5069 object->idle_time = test_var;
5070 } else if (PyInt_Check(value)) {
5072 test_var = PyInt_AsLong(value);
5073 if (test_var < 0 || test_var > uint_max) {
5074 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
5075 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5078 object->idle_time = test_var;
5080 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
5081 PyInt_Type.tp_name, PyLong_Type.tp_name);
5088 static PyObject *py_srvsvc_NetSessInfo2_get_user_flags(PyObject *obj, void *closure)
5090 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
5091 PyObject *py_user_flags;
5092 py_user_flags = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
5093 return py_user_flags;
5096 static int py_srvsvc_NetSessInfo2_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
5098 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
5099 if (value == NULL) {
5100 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_flags");
5104 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
5105 if (PyLong_Check(value)) {
5106 unsigned long long test_var;
5107 test_var = PyLong_AsUnsignedLongLong(value);
5108 if (PyErr_Occurred() != NULL) {
5111 if (test_var > uint_max) {
5112 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
5113 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5116 object->user_flags = test_var;
5117 } else if (PyInt_Check(value)) {
5119 test_var = PyInt_AsLong(value);
5120 if (test_var < 0 || test_var > uint_max) {
5121 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
5122 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5125 object->user_flags = test_var;
5127 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
5128 PyInt_Type.tp_name, PyLong_Type.tp_name);
5135 static PyObject *py_srvsvc_NetSessInfo2_get_client_type(PyObject *obj, void *closure)
5137 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
5138 PyObject *py_client_type;
5139 if (object->client_type == NULL) {
5140 py_client_type = Py_None;
5141 Py_INCREF(py_client_type);
5143 if (object->client_type == NULL) {
5144 py_client_type = Py_None;
5145 Py_INCREF(py_client_type);
5147 py_client_type = PyUnicode_Decode(object->client_type, strlen(object->client_type), "utf-8", "ignore");
5150 return py_client_type;
5153 static int py_srvsvc_NetSessInfo2_set_client_type(PyObject *py_obj, PyObject *value, void *closure)
5155 struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
5156 if (value == NULL) {
5157 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_type");
5160 if (value == Py_None) {
5161 object->client_type = NULL;
5163 object->client_type = NULL;
5164 if (value == NULL) {
5165 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->client_type");
5169 const char *test_str;
5170 const char *talloc_str;
5171 PyObject *unicode = NULL;
5172 if (PyUnicode_Check(value)) {
5173 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
5174 if (unicode == NULL) {
5178 test_str = PyString_AS_STRING(unicode);
5179 } else if (PyString_Check(value)) {
5180 test_str = PyString_AS_STRING(value);
5182 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5185 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
5186 if (unicode != NULL) {
5189 if (talloc_str == NULL) {
5193 object->client_type = talloc_str;
5199 static PyGetSetDef py_srvsvc_NetSessInfo2_getsetters[] = {
5201 .name = discard_const_p(char, "client"),
5202 .get = py_srvsvc_NetSessInfo2_get_client,
5203 .set = py_srvsvc_NetSessInfo2_set_client,
5204 .doc = discard_const_p(char, "PIDL-generated element client")
5207 .name = discard_const_p(char, "user"),
5208 .get = py_srvsvc_NetSessInfo2_get_user,
5209 .set = py_srvsvc_NetSessInfo2_set_user,
5210 .doc = discard_const_p(char, "PIDL-generated element user")
5213 .name = discard_const_p(char, "num_open"),
5214 .get = py_srvsvc_NetSessInfo2_get_num_open,
5215 .set = py_srvsvc_NetSessInfo2_set_num_open,
5216 .doc = discard_const_p(char, "PIDL-generated element num_open")
5219 .name = discard_const_p(char, "time"),
5220 .get = py_srvsvc_NetSessInfo2_get_time,
5221 .set = py_srvsvc_NetSessInfo2_set_time,
5222 .doc = discard_const_p(char, "PIDL-generated element time")
5225 .name = discard_const_p(char, "idle_time"),
5226 .get = py_srvsvc_NetSessInfo2_get_idle_time,
5227 .set = py_srvsvc_NetSessInfo2_set_idle_time,
5228 .doc = discard_const_p(char, "PIDL-generated element idle_time")
5231 .name = discard_const_p(char, "user_flags"),
5232 .get = py_srvsvc_NetSessInfo2_get_user_flags,
5233 .set = py_srvsvc_NetSessInfo2_set_user_flags,
5234 .doc = discard_const_p(char, "PIDL-generated element user_flags")
5237 .name = discard_const_p(char, "client_type"),
5238 .get = py_srvsvc_NetSessInfo2_get_client_type,
5239 .set = py_srvsvc_NetSessInfo2_set_client_type,
5240 .doc = discard_const_p(char, "PIDL-generated element client_type")
5245 static PyObject *py_srvsvc_NetSessInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5247 return pytalloc_new(struct srvsvc_NetSessInfo2, type);
5251 static PyTypeObject srvsvc_NetSessInfo2_Type = {
5252 PyObject_HEAD_INIT(NULL) 0,
5253 .tp_name = "srvsvc.NetSessInfo2",
5254 .tp_getset = py_srvsvc_NetSessInfo2_getsetters,
5256 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5257 .tp_new = py_srvsvc_NetSessInfo2_new,
5261 static PyObject *py_srvsvc_NetSessCtr2_get_count(PyObject *obj, void *closure)
5263 struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(obj);
5265 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
5269 static int py_srvsvc_NetSessCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
5271 struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(py_obj);
5272 if (value == NULL) {
5273 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
5277 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
5278 if (PyLong_Check(value)) {
5279 unsigned long long test_var;
5280 test_var = PyLong_AsUnsignedLongLong(value);
5281 if (PyErr_Occurred() != NULL) {
5284 if (test_var > uint_max) {
5285 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
5286 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5289 object->count = test_var;
5290 } else if (PyInt_Check(value)) {
5292 test_var = PyInt_AsLong(value);
5293 if (test_var < 0 || test_var > uint_max) {
5294 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
5295 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5298 object->count = test_var;
5300 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
5301 PyInt_Type.tp_name, PyLong_Type.tp_name);
5308 static PyObject *py_srvsvc_NetSessCtr2_get_array(PyObject *obj, void *closure)
5310 struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(obj);
5312 if (object->array == NULL) {
5314 Py_INCREF(py_array);
5316 py_array = PyList_New(object->count);
5317 if (py_array == NULL) {
5322 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
5323 PyObject *py_array_1;
5324 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo2_Type, object->array, &object->array[array_cntr_1]);
5325 PyList_SetItem(py_array, array_cntr_1, py_array_1);
5332 static int py_srvsvc_NetSessCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
5334 struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(py_obj);
5335 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
5336 if (value == NULL) {
5337 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
5340 if (value == Py_None) {
5341 object->array = NULL;
5343 object->array = NULL;
5344 if (value == NULL) {
5345 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
5348 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
5351 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
5352 if (!object->array) { return -1;; }
5353 talloc_set_name_const(object->array, "ARRAY: object->array");
5354 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
5355 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
5356 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
5359 PY_CHECK_TYPE(&srvsvc_NetSessInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
5360 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
5364 object->array[array_cntr_1] = *(struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
5371 static PyGetSetDef py_srvsvc_NetSessCtr2_getsetters[] = {
5373 .name = discard_const_p(char, "count"),
5374 .get = py_srvsvc_NetSessCtr2_get_count,
5375 .set = py_srvsvc_NetSessCtr2_set_count,
5376 .doc = discard_const_p(char, "PIDL-generated element count")
5379 .name = discard_const_p(char, "array"),
5380 .get = py_srvsvc_NetSessCtr2_get_array,
5381 .set = py_srvsvc_NetSessCtr2_set_array,
5382 .doc = discard_const_p(char, "PIDL-generated element array")
5387 static PyObject *py_srvsvc_NetSessCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5389 return pytalloc_new(struct srvsvc_NetSessCtr2, type);
5393 static PyTypeObject srvsvc_NetSessCtr2_Type = {
5394 PyObject_HEAD_INIT(NULL) 0,
5395 .tp_name = "srvsvc.NetSessCtr2",
5396 .tp_getset = py_srvsvc_NetSessCtr2_getsetters,
5398 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5399 .tp_new = py_srvsvc_NetSessCtr2_new,
5403 static PyObject *py_srvsvc_NetSessInfo10_get_client(PyObject *obj, void *closure)
5405 struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(obj);
5406 PyObject *py_client;
5407 if (object->client == NULL) {
5408 py_client = Py_None;
5409 Py_INCREF(py_client);
5411 if (object->client == NULL) {
5412 py_client = Py_None;
5413 Py_INCREF(py_client);
5415 py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
5421 static int py_srvsvc_NetSessInfo10_set_client(PyObject *py_obj, PyObject *value, void *closure)
5423 struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(py_obj);
5424 if (value == NULL) {
5425 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client");
5428 if (value == Py_None) {
5429 object->client = NULL;
5431 object->client = NULL;
5432 if (value == NULL) {
5433 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->client");
5437 const char *test_str;
5438 const char *talloc_str;
5439 PyObject *unicode = NULL;
5440 if (PyUnicode_Check(value)) {
5441 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
5442 if (unicode == NULL) {
5446 test_str = PyString_AS_STRING(unicode);
5447 } else if (PyString_Check(value)) {
5448 test_str = PyString_AS_STRING(value);
5450 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5453 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
5454 if (unicode != NULL) {
5457 if (talloc_str == NULL) {
5461 object->client = talloc_str;
5467 static PyObject *py_srvsvc_NetSessInfo10_get_user(PyObject *obj, void *closure)
5469 struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(obj);
5471 if (object->user == NULL) {
5475 if (object->user == NULL) {
5479 py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
5485 static int py_srvsvc_NetSessInfo10_set_user(PyObject *py_obj, PyObject *value, void *closure)
5487 struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(py_obj);
5488 if (value == NULL) {
5489 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
5492 if (value == Py_None) {
5493 object->user = NULL;
5495 object->user = NULL;
5496 if (value == NULL) {
5497 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->user");
5501 const char *test_str;
5502 const char *talloc_str;
5503 PyObject *unicode = NULL;
5504 if (PyUnicode_Check(value)) {
5505 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
5506 if (unicode == NULL) {
5510 test_str = PyString_AS_STRING(unicode);
5511 } else if (PyString_Check(value)) {
5512 test_str = PyString_AS_STRING(value);
5514 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5517 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
5518 if (unicode != NULL) {
5521 if (talloc_str == NULL) {
5525 object->user = talloc_str;
5531 static PyObject *py_srvsvc_NetSessInfo10_get_time(PyObject *obj, void *closure)
5533 struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(obj);
5535 py_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->time);
5539 static int py_srvsvc_NetSessInfo10_set_time(PyObject *py_obj, PyObject *value, void *closure)
5541 struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(py_obj);
5542 if (value == NULL) {
5543 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
5547 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
5548 if (PyLong_Check(value)) {
5549 unsigned long long test_var;
5550 test_var = PyLong_AsUnsignedLongLong(value);
5551 if (PyErr_Occurred() != NULL) {
5554 if (test_var > uint_max) {
5555 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
5556 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5559 object->time = test_var;
5560 } else if (PyInt_Check(value)) {
5562 test_var = PyInt_AsLong(value);
5563 if (test_var < 0 || test_var > uint_max) {
5564 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
5565 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5568 object->time = test_var;
5570 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
5571 PyInt_Type.tp_name, PyLong_Type.tp_name);
5578 static PyObject *py_srvsvc_NetSessInfo10_get_idle_time(PyObject *obj, void *closure)
5580 struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(obj);
5581 PyObject *py_idle_time;
5582 py_idle_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
5583 return py_idle_time;
5586 static int py_srvsvc_NetSessInfo10_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
5588 struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(py_obj);
5589 if (value == NULL) {
5590 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->idle_time");
5594 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
5595 if (PyLong_Check(value)) {
5596 unsigned long long test_var;
5597 test_var = PyLong_AsUnsignedLongLong(value);
5598 if (PyErr_Occurred() != NULL) {
5601 if (test_var > uint_max) {
5602 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
5603 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5606 object->idle_time = test_var;
5607 } else if (PyInt_Check(value)) {
5609 test_var = PyInt_AsLong(value);
5610 if (test_var < 0 || test_var > uint_max) {
5611 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
5612 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5615 object->idle_time = test_var;
5617 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
5618 PyInt_Type.tp_name, PyLong_Type.tp_name);
5625 static PyGetSetDef py_srvsvc_NetSessInfo10_getsetters[] = {
5627 .name = discard_const_p(char, "client"),
5628 .get = py_srvsvc_NetSessInfo10_get_client,
5629 .set = py_srvsvc_NetSessInfo10_set_client,
5630 .doc = discard_const_p(char, "PIDL-generated element client")
5633 .name = discard_const_p(char, "user"),
5634 .get = py_srvsvc_NetSessInfo10_get_user,
5635 .set = py_srvsvc_NetSessInfo10_set_user,
5636 .doc = discard_const_p(char, "PIDL-generated element user")
5639 .name = discard_const_p(char, "time"),
5640 .get = py_srvsvc_NetSessInfo10_get_time,
5641 .set = py_srvsvc_NetSessInfo10_set_time,
5642 .doc = discard_const_p(char, "PIDL-generated element time")
5645 .name = discard_const_p(char, "idle_time"),
5646 .get = py_srvsvc_NetSessInfo10_get_idle_time,
5647 .set = py_srvsvc_NetSessInfo10_set_idle_time,
5648 .doc = discard_const_p(char, "PIDL-generated element idle_time")
5653 static PyObject *py_srvsvc_NetSessInfo10_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5655 return pytalloc_new(struct srvsvc_NetSessInfo10, type);
5659 static PyTypeObject srvsvc_NetSessInfo10_Type = {
5660 PyObject_HEAD_INIT(NULL) 0,
5661 .tp_name = "srvsvc.NetSessInfo10",
5662 .tp_getset = py_srvsvc_NetSessInfo10_getsetters,
5664 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5665 .tp_new = py_srvsvc_NetSessInfo10_new,
5669 static PyObject *py_srvsvc_NetSessCtr10_get_count(PyObject *obj, void *closure)
5671 struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(obj);
5673 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
5677 static int py_srvsvc_NetSessCtr10_set_count(PyObject *py_obj, PyObject *value, void *closure)
5679 struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(py_obj);
5680 if (value == NULL) {
5681 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
5685 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
5686 if (PyLong_Check(value)) {
5687 unsigned long long test_var;
5688 test_var = PyLong_AsUnsignedLongLong(value);
5689 if (PyErr_Occurred() != NULL) {
5692 if (test_var > uint_max) {
5693 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
5694 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5697 object->count = test_var;
5698 } else if (PyInt_Check(value)) {
5700 test_var = PyInt_AsLong(value);
5701 if (test_var < 0 || test_var > uint_max) {
5702 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
5703 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5706 object->count = test_var;
5708 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
5709 PyInt_Type.tp_name, PyLong_Type.tp_name);
5716 static PyObject *py_srvsvc_NetSessCtr10_get_array(PyObject *obj, void *closure)
5718 struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(obj);
5720 if (object->array == NULL) {
5722 Py_INCREF(py_array);
5724 py_array = PyList_New(object->count);
5725 if (py_array == NULL) {
5730 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
5731 PyObject *py_array_1;
5732 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo10_Type, object->array, &object->array[array_cntr_1]);
5733 PyList_SetItem(py_array, array_cntr_1, py_array_1);
5740 static int py_srvsvc_NetSessCtr10_set_array(PyObject *py_obj, PyObject *value, void *closure)
5742 struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(py_obj);
5743 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
5744 if (value == NULL) {
5745 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
5748 if (value == Py_None) {
5749 object->array = NULL;
5751 object->array = NULL;
5752 if (value == NULL) {
5753 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
5756 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
5759 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
5760 if (!object->array) { return -1;; }
5761 talloc_set_name_const(object->array, "ARRAY: object->array");
5762 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
5763 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
5764 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
5767 PY_CHECK_TYPE(&srvsvc_NetSessInfo10_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
5768 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
5772 object->array[array_cntr_1] = *(struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
5779 static PyGetSetDef py_srvsvc_NetSessCtr10_getsetters[] = {
5781 .name = discard_const_p(char, "count"),
5782 .get = py_srvsvc_NetSessCtr10_get_count,
5783 .set = py_srvsvc_NetSessCtr10_set_count,
5784 .doc = discard_const_p(char, "PIDL-generated element count")
5787 .name = discard_const_p(char, "array"),
5788 .get = py_srvsvc_NetSessCtr10_get_array,
5789 .set = py_srvsvc_NetSessCtr10_set_array,
5790 .doc = discard_const_p(char, "PIDL-generated element array")
5795 static PyObject *py_srvsvc_NetSessCtr10_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5797 return pytalloc_new(struct srvsvc_NetSessCtr10, type);
5801 static PyTypeObject srvsvc_NetSessCtr10_Type = {
5802 PyObject_HEAD_INIT(NULL) 0,
5803 .tp_name = "srvsvc.NetSessCtr10",
5804 .tp_getset = py_srvsvc_NetSessCtr10_getsetters,
5806 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5807 .tp_new = py_srvsvc_NetSessCtr10_new,
5811 static PyObject *py_srvsvc_NetSessInfo502_get_client(PyObject *obj, void *closure)
5813 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
5814 PyObject *py_client;
5815 if (object->client == NULL) {
5816 py_client = Py_None;
5817 Py_INCREF(py_client);
5819 if (object->client == NULL) {
5820 py_client = Py_None;
5821 Py_INCREF(py_client);
5823 py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
5829 static int py_srvsvc_NetSessInfo502_set_client(PyObject *py_obj, PyObject *value, void *closure)
5831 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
5832 if (value == NULL) {
5833 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client");
5836 if (value == Py_None) {
5837 object->client = NULL;
5839 object->client = NULL;
5840 if (value == NULL) {
5841 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->client");
5845 const char *test_str;
5846 const char *talloc_str;
5847 PyObject *unicode = NULL;
5848 if (PyUnicode_Check(value)) {
5849 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
5850 if (unicode == NULL) {
5854 test_str = PyString_AS_STRING(unicode);
5855 } else if (PyString_Check(value)) {
5856 test_str = PyString_AS_STRING(value);
5858 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5861 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
5862 if (unicode != NULL) {
5865 if (talloc_str == NULL) {
5869 object->client = talloc_str;
5875 static PyObject *py_srvsvc_NetSessInfo502_get_user(PyObject *obj, void *closure)
5877 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
5879 if (object->user == NULL) {
5883 if (object->user == NULL) {
5887 py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
5893 static int py_srvsvc_NetSessInfo502_set_user(PyObject *py_obj, PyObject *value, void *closure)
5895 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
5896 if (value == NULL) {
5897 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
5900 if (value == Py_None) {
5901 object->user = NULL;
5903 object->user = NULL;
5904 if (value == NULL) {
5905 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->user");
5909 const char *test_str;
5910 const char *talloc_str;
5911 PyObject *unicode = NULL;
5912 if (PyUnicode_Check(value)) {
5913 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
5914 if (unicode == NULL) {
5918 test_str = PyString_AS_STRING(unicode);
5919 } else if (PyString_Check(value)) {
5920 test_str = PyString_AS_STRING(value);
5922 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5925 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
5926 if (unicode != NULL) {
5929 if (talloc_str == NULL) {
5933 object->user = talloc_str;
5939 static PyObject *py_srvsvc_NetSessInfo502_get_num_open(PyObject *obj, void *closure)
5941 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
5942 PyObject *py_num_open;
5943 py_num_open = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
5947 static int py_srvsvc_NetSessInfo502_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
5949 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
5950 if (value == NULL) {
5951 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_open");
5955 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
5956 if (PyLong_Check(value)) {
5957 unsigned long long test_var;
5958 test_var = PyLong_AsUnsignedLongLong(value);
5959 if (PyErr_Occurred() != NULL) {
5962 if (test_var > uint_max) {
5963 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
5964 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5967 object->num_open = test_var;
5968 } else if (PyInt_Check(value)) {
5970 test_var = PyInt_AsLong(value);
5971 if (test_var < 0 || test_var > uint_max) {
5972 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
5973 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
5976 object->num_open = test_var;
5978 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
5979 PyInt_Type.tp_name, PyLong_Type.tp_name);
5986 static PyObject *py_srvsvc_NetSessInfo502_get_time(PyObject *obj, void *closure)
5988 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
5990 py_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->time);
5994 static int py_srvsvc_NetSessInfo502_set_time(PyObject *py_obj, PyObject *value, void *closure)
5996 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
5997 if (value == NULL) {
5998 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
6002 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
6003 if (PyLong_Check(value)) {
6004 unsigned long long test_var;
6005 test_var = PyLong_AsUnsignedLongLong(value);
6006 if (PyErr_Occurred() != NULL) {
6009 if (test_var > uint_max) {
6010 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
6011 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6014 object->time = test_var;
6015 } else if (PyInt_Check(value)) {
6017 test_var = PyInt_AsLong(value);
6018 if (test_var < 0 || test_var > uint_max) {
6019 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
6020 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6023 object->time = test_var;
6025 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
6026 PyInt_Type.tp_name, PyLong_Type.tp_name);
6033 static PyObject *py_srvsvc_NetSessInfo502_get_idle_time(PyObject *obj, void *closure)
6035 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
6036 PyObject *py_idle_time;
6037 py_idle_time = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
6038 return py_idle_time;
6041 static int py_srvsvc_NetSessInfo502_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
6043 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
6044 if (value == NULL) {
6045 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->idle_time");
6049 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
6050 if (PyLong_Check(value)) {
6051 unsigned long long test_var;
6052 test_var = PyLong_AsUnsignedLongLong(value);
6053 if (PyErr_Occurred() != NULL) {
6056 if (test_var > uint_max) {
6057 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
6058 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6061 object->idle_time = test_var;
6062 } else if (PyInt_Check(value)) {
6064 test_var = PyInt_AsLong(value);
6065 if (test_var < 0 || test_var > uint_max) {
6066 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
6067 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6070 object->idle_time = test_var;
6072 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
6073 PyInt_Type.tp_name, PyLong_Type.tp_name);
6080 static PyObject *py_srvsvc_NetSessInfo502_get_user_flags(PyObject *obj, void *closure)
6082 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
6083 PyObject *py_user_flags;
6084 py_user_flags = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
6085 return py_user_flags;
6088 static int py_srvsvc_NetSessInfo502_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
6090 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
6091 if (value == NULL) {
6092 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_flags");
6096 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
6097 if (PyLong_Check(value)) {
6098 unsigned long long test_var;
6099 test_var = PyLong_AsUnsignedLongLong(value);
6100 if (PyErr_Occurred() != NULL) {
6103 if (test_var > uint_max) {
6104 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
6105 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6108 object->user_flags = test_var;
6109 } else if (PyInt_Check(value)) {
6111 test_var = PyInt_AsLong(value);
6112 if (test_var < 0 || test_var > uint_max) {
6113 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
6114 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6117 object->user_flags = test_var;
6119 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
6120 PyInt_Type.tp_name, PyLong_Type.tp_name);
6127 static PyObject *py_srvsvc_NetSessInfo502_get_client_type(PyObject *obj, void *closure)
6129 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
6130 PyObject *py_client_type;
6131 if (object->client_type == NULL) {
6132 py_client_type = Py_None;
6133 Py_INCREF(py_client_type);
6135 if (object->client_type == NULL) {
6136 py_client_type = Py_None;
6137 Py_INCREF(py_client_type);
6139 py_client_type = PyUnicode_Decode(object->client_type, strlen(object->client_type), "utf-8", "ignore");
6142 return py_client_type;
6145 static int py_srvsvc_NetSessInfo502_set_client_type(PyObject *py_obj, PyObject *value, void *closure)
6147 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
6148 if (value == NULL) {
6149 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_type");
6152 if (value == Py_None) {
6153 object->client_type = NULL;
6155 object->client_type = NULL;
6156 if (value == NULL) {
6157 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->client_type");
6161 const char *test_str;
6162 const char *talloc_str;
6163 PyObject *unicode = NULL;
6164 if (PyUnicode_Check(value)) {
6165 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6166 if (unicode == NULL) {
6170 test_str = PyString_AS_STRING(unicode);
6171 } else if (PyString_Check(value)) {
6172 test_str = PyString_AS_STRING(value);
6174 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6177 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6178 if (unicode != NULL) {
6181 if (talloc_str == NULL) {
6185 object->client_type = talloc_str;
6191 static PyObject *py_srvsvc_NetSessInfo502_get_transport(PyObject *obj, void *closure)
6193 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
6194 PyObject *py_transport;
6195 if (object->transport == NULL) {
6196 py_transport = Py_None;
6197 Py_INCREF(py_transport);
6199 if (object->transport == NULL) {
6200 py_transport = Py_None;
6201 Py_INCREF(py_transport);
6203 py_transport = PyUnicode_Decode(object->transport, strlen(object->transport), "utf-8", "ignore");
6206 return py_transport;
6209 static int py_srvsvc_NetSessInfo502_set_transport(PyObject *py_obj, PyObject *value, void *closure)
6211 struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
6212 if (value == NULL) {
6213 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transport");
6216 if (value == Py_None) {
6217 object->transport = NULL;
6219 object->transport = NULL;
6220 if (value == NULL) {
6221 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->transport");
6225 const char *test_str;
6226 const char *talloc_str;
6227 PyObject *unicode = NULL;
6228 if (PyUnicode_Check(value)) {
6229 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6230 if (unicode == NULL) {
6234 test_str = PyString_AS_STRING(unicode);
6235 } else if (PyString_Check(value)) {
6236 test_str = PyString_AS_STRING(value);
6238 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6241 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6242 if (unicode != NULL) {
6245 if (talloc_str == NULL) {
6249 object->transport = talloc_str;
6255 static PyGetSetDef py_srvsvc_NetSessInfo502_getsetters[] = {
6257 .name = discard_const_p(char, "client"),
6258 .get = py_srvsvc_NetSessInfo502_get_client,
6259 .set = py_srvsvc_NetSessInfo502_set_client,
6260 .doc = discard_const_p(char, "PIDL-generated element client")
6263 .name = discard_const_p(char, "user"),
6264 .get = py_srvsvc_NetSessInfo502_get_user,
6265 .set = py_srvsvc_NetSessInfo502_set_user,
6266 .doc = discard_const_p(char, "PIDL-generated element user")
6269 .name = discard_const_p(char, "num_open"),
6270 .get = py_srvsvc_NetSessInfo502_get_num_open,
6271 .set = py_srvsvc_NetSessInfo502_set_num_open,
6272 .doc = discard_const_p(char, "PIDL-generated element num_open")
6275 .name = discard_const_p(char, "time"),
6276 .get = py_srvsvc_NetSessInfo502_get_time,
6277 .set = py_srvsvc_NetSessInfo502_set_time,
6278 .doc = discard_const_p(char, "PIDL-generated element time")
6281 .name = discard_const_p(char, "idle_time"),
6282 .get = py_srvsvc_NetSessInfo502_get_idle_time,
6283 .set = py_srvsvc_NetSessInfo502_set_idle_time,
6284 .doc = discard_const_p(char, "PIDL-generated element idle_time")
6287 .name = discard_const_p(char, "user_flags"),
6288 .get = py_srvsvc_NetSessInfo502_get_user_flags,
6289 .set = py_srvsvc_NetSessInfo502_set_user_flags,
6290 .doc = discard_const_p(char, "PIDL-generated element user_flags")
6293 .name = discard_const_p(char, "client_type"),
6294 .get = py_srvsvc_NetSessInfo502_get_client_type,
6295 .set = py_srvsvc_NetSessInfo502_set_client_type,
6296 .doc = discard_const_p(char, "PIDL-generated element client_type")
6299 .name = discard_const_p(char, "transport"),
6300 .get = py_srvsvc_NetSessInfo502_get_transport,
6301 .set = py_srvsvc_NetSessInfo502_set_transport,
6302 .doc = discard_const_p(char, "PIDL-generated element transport")
6307 static PyObject *py_srvsvc_NetSessInfo502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6309 return pytalloc_new(struct srvsvc_NetSessInfo502, type);
6313 static PyTypeObject srvsvc_NetSessInfo502_Type = {
6314 PyObject_HEAD_INIT(NULL) 0,
6315 .tp_name = "srvsvc.NetSessInfo502",
6316 .tp_getset = py_srvsvc_NetSessInfo502_getsetters,
6318 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6319 .tp_new = py_srvsvc_NetSessInfo502_new,
6323 static PyObject *py_srvsvc_NetSessCtr502_get_count(PyObject *obj, void *closure)
6325 struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(obj);
6327 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
6331 static int py_srvsvc_NetSessCtr502_set_count(PyObject *py_obj, PyObject *value, void *closure)
6333 struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(py_obj);
6334 if (value == NULL) {
6335 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
6339 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
6340 if (PyLong_Check(value)) {
6341 unsigned long long test_var;
6342 test_var = PyLong_AsUnsignedLongLong(value);
6343 if (PyErr_Occurred() != NULL) {
6346 if (test_var > uint_max) {
6347 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
6348 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6351 object->count = test_var;
6352 } else if (PyInt_Check(value)) {
6354 test_var = PyInt_AsLong(value);
6355 if (test_var < 0 || test_var > uint_max) {
6356 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
6357 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6360 object->count = test_var;
6362 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
6363 PyInt_Type.tp_name, PyLong_Type.tp_name);
6370 static PyObject *py_srvsvc_NetSessCtr502_get_array(PyObject *obj, void *closure)
6372 struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(obj);
6374 if (object->array == NULL) {
6376 Py_INCREF(py_array);
6378 py_array = PyList_New(object->count);
6379 if (py_array == NULL) {
6384 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
6385 PyObject *py_array_1;
6386 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo502_Type, object->array, &object->array[array_cntr_1]);
6387 PyList_SetItem(py_array, array_cntr_1, py_array_1);
6394 static int py_srvsvc_NetSessCtr502_set_array(PyObject *py_obj, PyObject *value, void *closure)
6396 struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(py_obj);
6397 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
6398 if (value == NULL) {
6399 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
6402 if (value == Py_None) {
6403 object->array = NULL;
6405 object->array = NULL;
6406 if (value == NULL) {
6407 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
6410 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
6413 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
6414 if (!object->array) { return -1;; }
6415 talloc_set_name_const(object->array, "ARRAY: object->array");
6416 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
6417 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
6418 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
6421 PY_CHECK_TYPE(&srvsvc_NetSessInfo502_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
6422 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
6426 object->array[array_cntr_1] = *(struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
6433 static PyGetSetDef py_srvsvc_NetSessCtr502_getsetters[] = {
6435 .name = discard_const_p(char, "count"),
6436 .get = py_srvsvc_NetSessCtr502_get_count,
6437 .set = py_srvsvc_NetSessCtr502_set_count,
6438 .doc = discard_const_p(char, "PIDL-generated element count")
6441 .name = discard_const_p(char, "array"),
6442 .get = py_srvsvc_NetSessCtr502_get_array,
6443 .set = py_srvsvc_NetSessCtr502_set_array,
6444 .doc = discard_const_p(char, "PIDL-generated element array")
6449 static PyObject *py_srvsvc_NetSessCtr502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6451 return pytalloc_new(struct srvsvc_NetSessCtr502, type);
6455 static PyTypeObject srvsvc_NetSessCtr502_Type = {
6456 PyObject_HEAD_INIT(NULL) 0,
6457 .tp_name = "srvsvc.NetSessCtr502",
6458 .tp_getset = py_srvsvc_NetSessCtr502_getsetters,
6460 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6461 .tp_new = py_srvsvc_NetSessCtr502_new,
6464 PyObject *py_import_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSessCtr *in)
6470 if (in->ctr0 == NULL) {
6474 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr0_Type, in->ctr0, in->ctr0);
6479 if (in->ctr1 == NULL) {
6483 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr1_Type, in->ctr1, in->ctr1);
6488 if (in->ctr2 == NULL) {
6492 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr2_Type, in->ctr2, in->ctr2);
6497 if (in->ctr10 == NULL) {
6501 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr10_Type, in->ctr10, in->ctr10);
6506 if (in->ctr502 == NULL) {
6510 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr502_Type, in->ctr502, in->ctr502);
6520 PyErr_SetString(PyExc_TypeError, "unknown union level");
6524 union srvsvc_NetSessCtr *py_export_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
6526 union srvsvc_NetSessCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetSessCtr);
6530 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
6531 talloc_free(ret); return NULL;
6533 if (in == Py_None) {
6538 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr0");
6539 talloc_free(ret); return NULL;
6541 PY_CHECK_TYPE(&srvsvc_NetSessCtr0_Type, in, talloc_free(ret); return NULL;);
6542 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
6544 talloc_free(ret); return NULL;
6546 ret->ctr0 = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(in);
6552 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
6553 talloc_free(ret); return NULL;
6555 if (in == Py_None) {
6560 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1");
6561 talloc_free(ret); return NULL;
6563 PY_CHECK_TYPE(&srvsvc_NetSessCtr1_Type, in, talloc_free(ret); return NULL;);
6564 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
6566 talloc_free(ret); return NULL;
6568 ret->ctr1 = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(in);
6574 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
6575 talloc_free(ret); return NULL;
6577 if (in == Py_None) {
6582 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr2");
6583 talloc_free(ret); return NULL;
6585 PY_CHECK_TYPE(&srvsvc_NetSessCtr2_Type, in, talloc_free(ret); return NULL;);
6586 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
6588 talloc_free(ret); return NULL;
6590 ret->ctr2 = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(in);
6596 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr10");
6597 talloc_free(ret); return NULL;
6599 if (in == Py_None) {
6604 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr10");
6605 talloc_free(ret); return NULL;
6607 PY_CHECK_TYPE(&srvsvc_NetSessCtr10_Type, in, talloc_free(ret); return NULL;);
6608 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
6610 talloc_free(ret); return NULL;
6612 ret->ctr10 = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(in);
6618 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr502");
6619 talloc_free(ret); return NULL;
6621 if (in == Py_None) {
6626 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr502");
6627 talloc_free(ret); return NULL;
6629 PY_CHECK_TYPE(&srvsvc_NetSessCtr502_Type, in, talloc_free(ret); return NULL;);
6630 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
6632 talloc_free(ret); return NULL;
6634 ret->ctr502 = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(in);
6647 static PyObject *py_srvsvc_NetSessInfoCtr_get_level(PyObject *obj, void *closure)
6649 struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(obj);
6651 py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
6655 static int py_srvsvc_NetSessInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
6657 struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(py_obj);
6658 if (value == NULL) {
6659 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
6663 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
6664 if (PyLong_Check(value)) {
6665 unsigned long long test_var;
6666 test_var = PyLong_AsUnsignedLongLong(value);
6667 if (PyErr_Occurred() != NULL) {
6670 if (test_var > uint_max) {
6671 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
6672 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6675 object->level = test_var;
6676 } else if (PyInt_Check(value)) {
6678 test_var = PyInt_AsLong(value);
6679 if (test_var < 0 || test_var > uint_max) {
6680 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
6681 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6684 object->level = test_var;
6686 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
6687 PyInt_Type.tp_name, PyLong_Type.tp_name);
6694 static PyObject *py_srvsvc_NetSessInfoCtr_get_ctr(PyObject *obj, void *closure)
6696 struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(obj);
6698 py_ctr = py_import_srvsvc_NetSessCtr(pytalloc_get_mem_ctx(obj), object->level, &object->ctr);
6699 if (py_ctr == NULL) {
6705 static int py_srvsvc_NetSessInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
6707 struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(py_obj);
6708 if (value == NULL) {
6709 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
6713 union srvsvc_NetSessCtr *ctr_switch_0;
6714 ctr_switch_0 = py_export_srvsvc_NetSessCtr(pytalloc_get_mem_ctx(py_obj), object->level, value);
6715 if (ctr_switch_0 == NULL) {
6718 object->ctr = *ctr_switch_0;
6723 static PyGetSetDef py_srvsvc_NetSessInfoCtr_getsetters[] = {
6725 .name = discard_const_p(char, "level"),
6726 .get = py_srvsvc_NetSessInfoCtr_get_level,
6727 .set = py_srvsvc_NetSessInfoCtr_set_level,
6728 .doc = discard_const_p(char, "PIDL-generated element level")
6731 .name = discard_const_p(char, "ctr"),
6732 .get = py_srvsvc_NetSessInfoCtr_get_ctr,
6733 .set = py_srvsvc_NetSessInfoCtr_set_ctr,
6734 .doc = discard_const_p(char, "PIDL-generated element ctr")
6739 static PyObject *py_srvsvc_NetSessInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6741 return pytalloc_new(struct srvsvc_NetSessInfoCtr, type);
6745 static PyTypeObject srvsvc_NetSessInfoCtr_Type = {
6746 PyObject_HEAD_INIT(NULL) 0,
6747 .tp_name = "srvsvc.NetSessInfoCtr",
6748 .tp_getset = py_srvsvc_NetSessInfoCtr_getsetters,
6750 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6751 .tp_new = py_srvsvc_NetSessInfoCtr_new,
6755 static PyObject *py_srvsvc_NetShareInfo0_get_name(PyObject *obj, void *closure)
6757 struct srvsvc_NetShareInfo0 *object = (struct srvsvc_NetShareInfo0 *)pytalloc_get_ptr(obj);
6759 if (object->name == NULL) {
6763 if (object->name == NULL) {
6767 py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
6773 static int py_srvsvc_NetShareInfo0_set_name(PyObject *py_obj, PyObject *value, void *closure)
6775 struct srvsvc_NetShareInfo0 *object = (struct srvsvc_NetShareInfo0 *)pytalloc_get_ptr(py_obj);
6776 if (value == NULL) {
6777 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
6780 if (value == Py_None) {
6781 object->name = NULL;
6783 object->name = NULL;
6784 if (value == NULL) {
6785 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->name");
6789 const char *test_str;
6790 const char *talloc_str;
6791 PyObject *unicode = NULL;
6792 if (PyUnicode_Check(value)) {
6793 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6794 if (unicode == NULL) {
6798 test_str = PyString_AS_STRING(unicode);
6799 } else if (PyString_Check(value)) {
6800 test_str = PyString_AS_STRING(value);
6802 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6805 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6806 if (unicode != NULL) {
6809 if (talloc_str == NULL) {
6813 object->name = talloc_str;
6819 static PyGetSetDef py_srvsvc_NetShareInfo0_getsetters[] = {
6821 .name = discard_const_p(char, "name"),
6822 .get = py_srvsvc_NetShareInfo0_get_name,
6823 .set = py_srvsvc_NetShareInfo0_set_name,
6824 .doc = discard_const_p(char, "PIDL-generated element name")
6829 static PyObject *py_srvsvc_NetShareInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6831 return pytalloc_new(struct srvsvc_NetShareInfo0, type);
6835 static PyTypeObject srvsvc_NetShareInfo0_Type = {
6836 PyObject_HEAD_INIT(NULL) 0,
6837 .tp_name = "srvsvc.NetShareInfo0",
6838 .tp_getset = py_srvsvc_NetShareInfo0_getsetters,
6840 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6841 .tp_new = py_srvsvc_NetShareInfo0_new,
6845 static PyObject *py_srvsvc_NetShareCtr0_get_count(PyObject *obj, void *closure)
6847 struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(obj);
6849 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
6853 static int py_srvsvc_NetShareCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
6855 struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(py_obj);
6856 if (value == NULL) {
6857 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
6861 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
6862 if (PyLong_Check(value)) {
6863 unsigned long long test_var;
6864 test_var = PyLong_AsUnsignedLongLong(value);
6865 if (PyErr_Occurred() != NULL) {
6868 if (test_var > uint_max) {
6869 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
6870 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6873 object->count = test_var;
6874 } else if (PyInt_Check(value)) {
6876 test_var = PyInt_AsLong(value);
6877 if (test_var < 0 || test_var > uint_max) {
6878 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
6879 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
6882 object->count = test_var;
6884 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
6885 PyInt_Type.tp_name, PyLong_Type.tp_name);
6892 static PyObject *py_srvsvc_NetShareCtr0_get_array(PyObject *obj, void *closure)
6894 struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(obj);
6896 if (object->array == NULL) {
6898 Py_INCREF(py_array);
6900 py_array = PyList_New(object->count);
6901 if (py_array == NULL) {
6906 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
6907 PyObject *py_array_1;
6908 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo0_Type, object->array, &object->array[array_cntr_1]);
6909 PyList_SetItem(py_array, array_cntr_1, py_array_1);
6916 static int py_srvsvc_NetShareCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
6918 struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(py_obj);
6919 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
6920 if (value == NULL) {
6921 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
6924 if (value == Py_None) {
6925 object->array = NULL;
6927 object->array = NULL;
6928 if (value == NULL) {
6929 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
6932 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
6935 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
6936 if (!object->array) { return -1;; }
6937 talloc_set_name_const(object->array, "ARRAY: object->array");
6938 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
6939 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
6940 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
6943 PY_CHECK_TYPE(&srvsvc_NetShareInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
6944 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
6948 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
6955 static PyGetSetDef py_srvsvc_NetShareCtr0_getsetters[] = {
6957 .name = discard_const_p(char, "count"),
6958 .get = py_srvsvc_NetShareCtr0_get_count,
6959 .set = py_srvsvc_NetShareCtr0_set_count,
6960 .doc = discard_const_p(char, "PIDL-generated element count")
6963 .name = discard_const_p(char, "array"),
6964 .get = py_srvsvc_NetShareCtr0_get_array,
6965 .set = py_srvsvc_NetShareCtr0_set_array,
6966 .doc = discard_const_p(char, "PIDL-generated element array")
6971 static PyObject *py_srvsvc_NetShareCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6973 return pytalloc_new(struct srvsvc_NetShareCtr0, type);
6977 static PyTypeObject srvsvc_NetShareCtr0_Type = {
6978 PyObject_HEAD_INIT(NULL) 0,
6979 .tp_name = "srvsvc.NetShareCtr0",
6980 .tp_getset = py_srvsvc_NetShareCtr0_getsetters,
6982 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6983 .tp_new = py_srvsvc_NetShareCtr0_new,
6987 static PyObject *py_srvsvc_NetShareInfo1_get_name(PyObject *obj, void *closure)
6989 struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(obj);
6991 if (object->name == NULL) {
6995 if (object->name == NULL) {
6999 py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
7005 static int py_srvsvc_NetShareInfo1_set_name(PyObject *py_obj, PyObject *value, void *closure)
7007 struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(py_obj);
7008 if (value == NULL) {
7009 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
7012 if (value == Py_None) {
7013 object->name = NULL;
7015 object->name = NULL;
7016 if (value == NULL) {
7017 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->name");
7021 const char *test_str;
7022 const char *talloc_str;
7023 PyObject *unicode = NULL;
7024 if (PyUnicode_Check(value)) {
7025 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
7026 if (unicode == NULL) {
7030 test_str = PyString_AS_STRING(unicode);
7031 } else if (PyString_Check(value)) {
7032 test_str = PyString_AS_STRING(value);
7034 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7037 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
7038 if (unicode != NULL) {
7041 if (talloc_str == NULL) {
7045 object->name = talloc_str;
7051 static PyObject *py_srvsvc_NetShareInfo1_get_type(PyObject *obj, void *closure)
7053 struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(obj);
7055 py_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->type);
7059 static int py_srvsvc_NetShareInfo1_set_type(PyObject *py_obj, PyObject *value, void *closure)
7061 struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(py_obj);
7062 if (value == NULL) {
7063 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
7067 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
7068 if (PyLong_Check(value)) {
7069 unsigned long long test_var;
7070 test_var = PyLong_AsUnsignedLongLong(value);
7071 if (PyErr_Occurred() != NULL) {
7074 if (test_var > uint_max) {
7075 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
7076 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7079 object->type = test_var;
7080 } else if (PyInt_Check(value)) {
7082 test_var = PyInt_AsLong(value);
7083 if (test_var < 0 || test_var > uint_max) {
7084 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
7085 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7088 object->type = test_var;
7090 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7091 PyInt_Type.tp_name, PyLong_Type.tp_name);
7098 static PyObject *py_srvsvc_NetShareInfo1_get_comment(PyObject *obj, void *closure)
7100 struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(obj);
7101 PyObject *py_comment;
7102 if (object->comment == NULL) {
7103 py_comment = Py_None;
7104 Py_INCREF(py_comment);
7106 if (object->comment == NULL) {
7107 py_comment = Py_None;
7108 Py_INCREF(py_comment);
7110 py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
7116 static int py_srvsvc_NetShareInfo1_set_comment(PyObject *py_obj, PyObject *value, void *closure)
7118 struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(py_obj);
7119 if (value == NULL) {
7120 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
7123 if (value == Py_None) {
7124 object->comment = NULL;
7126 object->comment = NULL;
7127 if (value == NULL) {
7128 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->comment");
7132 const char *test_str;
7133 const char *talloc_str;
7134 PyObject *unicode = NULL;
7135 if (PyUnicode_Check(value)) {
7136 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
7137 if (unicode == NULL) {
7141 test_str = PyString_AS_STRING(unicode);
7142 } else if (PyString_Check(value)) {
7143 test_str = PyString_AS_STRING(value);
7145 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7148 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
7149 if (unicode != NULL) {
7152 if (talloc_str == NULL) {
7156 object->comment = talloc_str;
7162 static PyGetSetDef py_srvsvc_NetShareInfo1_getsetters[] = {
7164 .name = discard_const_p(char, "name"),
7165 .get = py_srvsvc_NetShareInfo1_get_name,
7166 .set = py_srvsvc_NetShareInfo1_set_name,
7167 .doc = discard_const_p(char, "PIDL-generated element name")
7170 .name = discard_const_p(char, "type"),
7171 .get = py_srvsvc_NetShareInfo1_get_type,
7172 .set = py_srvsvc_NetShareInfo1_set_type,
7173 .doc = discard_const_p(char, "PIDL-generated element type")
7176 .name = discard_const_p(char, "comment"),
7177 .get = py_srvsvc_NetShareInfo1_get_comment,
7178 .set = py_srvsvc_NetShareInfo1_set_comment,
7179 .doc = discard_const_p(char, "PIDL-generated element comment")
7184 static PyObject *py_srvsvc_NetShareInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
7186 return pytalloc_new(struct srvsvc_NetShareInfo1, type);
7190 static PyTypeObject srvsvc_NetShareInfo1_Type = {
7191 PyObject_HEAD_INIT(NULL) 0,
7192 .tp_name = "srvsvc.NetShareInfo1",
7193 .tp_getset = py_srvsvc_NetShareInfo1_getsetters,
7195 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
7196 .tp_new = py_srvsvc_NetShareInfo1_new,
7200 static PyObject *py_srvsvc_NetShareCtr1_get_count(PyObject *obj, void *closure)
7202 struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(obj);
7204 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
7208 static int py_srvsvc_NetShareCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
7210 struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(py_obj);
7211 if (value == NULL) {
7212 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
7216 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
7217 if (PyLong_Check(value)) {
7218 unsigned long long test_var;
7219 test_var = PyLong_AsUnsignedLongLong(value);
7220 if (PyErr_Occurred() != NULL) {
7223 if (test_var > uint_max) {
7224 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
7225 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7228 object->count = test_var;
7229 } else if (PyInt_Check(value)) {
7231 test_var = PyInt_AsLong(value);
7232 if (test_var < 0 || test_var > uint_max) {
7233 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
7234 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7237 object->count = test_var;
7239 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7240 PyInt_Type.tp_name, PyLong_Type.tp_name);
7247 static PyObject *py_srvsvc_NetShareCtr1_get_array(PyObject *obj, void *closure)
7249 struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(obj);
7251 if (object->array == NULL) {
7253 Py_INCREF(py_array);
7255 py_array = PyList_New(object->count);
7256 if (py_array == NULL) {
7261 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
7262 PyObject *py_array_1;
7263 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1_Type, object->array, &object->array[array_cntr_1]);
7264 PyList_SetItem(py_array, array_cntr_1, py_array_1);
7271 static int py_srvsvc_NetShareCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
7273 struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(py_obj);
7274 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
7275 if (value == NULL) {
7276 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
7279 if (value == Py_None) {
7280 object->array = NULL;
7282 object->array = NULL;
7283 if (value == NULL) {
7284 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
7287 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
7290 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
7291 if (!object->array) { return -1;; }
7292 talloc_set_name_const(object->array, "ARRAY: object->array");
7293 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
7294 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
7295 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
7298 PY_CHECK_TYPE(&srvsvc_NetShareInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
7299 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
7303 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
7310 static PyGetSetDef py_srvsvc_NetShareCtr1_getsetters[] = {
7312 .name = discard_const_p(char, "count"),
7313 .get = py_srvsvc_NetShareCtr1_get_count,
7314 .set = py_srvsvc_NetShareCtr1_set_count,
7315 .doc = discard_const_p(char, "PIDL-generated element count")
7318 .name = discard_const_p(char, "array"),
7319 .get = py_srvsvc_NetShareCtr1_get_array,
7320 .set = py_srvsvc_NetShareCtr1_set_array,
7321 .doc = discard_const_p(char, "PIDL-generated element array")
7326 static PyObject *py_srvsvc_NetShareCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
7328 return pytalloc_new(struct srvsvc_NetShareCtr1, type);
7332 static PyTypeObject srvsvc_NetShareCtr1_Type = {
7333 PyObject_HEAD_INIT(NULL) 0,
7334 .tp_name = "srvsvc.NetShareCtr1",
7335 .tp_getset = py_srvsvc_NetShareCtr1_getsetters,
7337 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
7338 .tp_new = py_srvsvc_NetShareCtr1_new,
7342 static PyObject *py_srvsvc_NetShareInfo2_get_name(PyObject *obj, void *closure)
7344 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
7346 if (object->name == NULL) {
7350 if (object->name == NULL) {
7354 py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
7360 static int py_srvsvc_NetShareInfo2_set_name(PyObject *py_obj, PyObject *value, void *closure)
7362 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
7363 if (value == NULL) {
7364 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
7367 if (value == Py_None) {
7368 object->name = NULL;
7370 object->name = NULL;
7371 if (value == NULL) {
7372 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->name");
7376 const char *test_str;
7377 const char *talloc_str;
7378 PyObject *unicode = NULL;
7379 if (PyUnicode_Check(value)) {
7380 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
7381 if (unicode == NULL) {
7385 test_str = PyString_AS_STRING(unicode);
7386 } else if (PyString_Check(value)) {
7387 test_str = PyString_AS_STRING(value);
7389 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7392 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
7393 if (unicode != NULL) {
7396 if (talloc_str == NULL) {
7400 object->name = talloc_str;
7406 static PyObject *py_srvsvc_NetShareInfo2_get_type(PyObject *obj, void *closure)
7408 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
7410 py_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->type);
7414 static int py_srvsvc_NetShareInfo2_set_type(PyObject *py_obj, PyObject *value, void *closure)
7416 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
7417 if (value == NULL) {
7418 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
7422 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
7423 if (PyLong_Check(value)) {
7424 unsigned long long test_var;
7425 test_var = PyLong_AsUnsignedLongLong(value);
7426 if (PyErr_Occurred() != NULL) {
7429 if (test_var > uint_max) {
7430 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
7431 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7434 object->type = test_var;
7435 } else if (PyInt_Check(value)) {
7437 test_var = PyInt_AsLong(value);
7438 if (test_var < 0 || test_var > uint_max) {
7439 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
7440 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7443 object->type = test_var;
7445 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7446 PyInt_Type.tp_name, PyLong_Type.tp_name);
7453 static PyObject *py_srvsvc_NetShareInfo2_get_comment(PyObject *obj, void *closure)
7455 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
7456 PyObject *py_comment;
7457 if (object->comment == NULL) {
7458 py_comment = Py_None;
7459 Py_INCREF(py_comment);
7461 if (object->comment == NULL) {
7462 py_comment = Py_None;
7463 Py_INCREF(py_comment);
7465 py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
7471 static int py_srvsvc_NetShareInfo2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
7473 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
7474 if (value == NULL) {
7475 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
7478 if (value == Py_None) {
7479 object->comment = NULL;
7481 object->comment = NULL;
7482 if (value == NULL) {
7483 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->comment");
7487 const char *test_str;
7488 const char *talloc_str;
7489 PyObject *unicode = NULL;
7490 if (PyUnicode_Check(value)) {
7491 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
7492 if (unicode == NULL) {
7496 test_str = PyString_AS_STRING(unicode);
7497 } else if (PyString_Check(value)) {
7498 test_str = PyString_AS_STRING(value);
7500 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7503 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
7504 if (unicode != NULL) {
7507 if (talloc_str == NULL) {
7511 object->comment = talloc_str;
7517 static PyObject *py_srvsvc_NetShareInfo2_get_permissions(PyObject *obj, void *closure)
7519 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
7520 PyObject *py_permissions;
7521 py_permissions = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->permissions);
7522 return py_permissions;
7525 static int py_srvsvc_NetShareInfo2_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
7527 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
7528 if (value == NULL) {
7529 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->permissions");
7533 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
7534 if (PyLong_Check(value)) {
7535 unsigned long long test_var;
7536 test_var = PyLong_AsUnsignedLongLong(value);
7537 if (PyErr_Occurred() != NULL) {
7540 if (test_var > uint_max) {
7541 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
7542 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7545 object->permissions = test_var;
7546 } else if (PyInt_Check(value)) {
7548 test_var = PyInt_AsLong(value);
7549 if (test_var < 0 || test_var > uint_max) {
7550 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
7551 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7554 object->permissions = test_var;
7556 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7557 PyInt_Type.tp_name, PyLong_Type.tp_name);
7564 static PyObject *py_srvsvc_NetShareInfo2_get_max_users(PyObject *obj, void *closure)
7566 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
7567 PyObject *py_max_users;
7568 py_max_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->max_users);
7569 return py_max_users;
7572 static int py_srvsvc_NetShareInfo2_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
7574 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
7575 if (value == NULL) {
7576 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_users");
7580 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
7581 if (PyLong_Check(value)) {
7582 unsigned long long test_var;
7583 test_var = PyLong_AsUnsignedLongLong(value);
7584 if (PyErr_Occurred() != NULL) {
7587 if (test_var > uint_max) {
7588 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
7589 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7592 object->max_users = test_var;
7593 } else if (PyInt_Check(value)) {
7595 test_var = PyInt_AsLong(value);
7596 if (test_var < 0 || test_var > uint_max) {
7597 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
7598 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7601 object->max_users = test_var;
7603 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7604 PyInt_Type.tp_name, PyLong_Type.tp_name);
7611 static PyObject *py_srvsvc_NetShareInfo2_get_current_users(PyObject *obj, void *closure)
7613 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
7614 PyObject *py_current_users;
7615 py_current_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->current_users);
7616 return py_current_users;
7619 static int py_srvsvc_NetShareInfo2_set_current_users(PyObject *py_obj, PyObject *value, void *closure)
7621 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
7622 if (value == NULL) {
7623 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current_users");
7627 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_users));
7628 if (PyLong_Check(value)) {
7629 unsigned long long test_var;
7630 test_var = PyLong_AsUnsignedLongLong(value);
7631 if (PyErr_Occurred() != NULL) {
7634 if (test_var > uint_max) {
7635 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
7636 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7639 object->current_users = test_var;
7640 } else if (PyInt_Check(value)) {
7642 test_var = PyInt_AsLong(value);
7643 if (test_var < 0 || test_var > uint_max) {
7644 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
7645 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7648 object->current_users = test_var;
7650 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7651 PyInt_Type.tp_name, PyLong_Type.tp_name);
7658 static PyObject *py_srvsvc_NetShareInfo2_get_path(PyObject *obj, void *closure)
7660 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
7662 if (object->path == NULL) {
7666 if (object->path == NULL) {
7670 py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
7676 static int py_srvsvc_NetShareInfo2_set_path(PyObject *py_obj, PyObject *value, void *closure)
7678 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
7679 if (value == NULL) {
7680 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->path");
7683 if (value == Py_None) {
7684 object->path = NULL;
7686 object->path = NULL;
7687 if (value == NULL) {
7688 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->path");
7692 const char *test_str;
7693 const char *talloc_str;
7694 PyObject *unicode = NULL;
7695 if (PyUnicode_Check(value)) {
7696 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
7697 if (unicode == NULL) {
7701 test_str = PyString_AS_STRING(unicode);
7702 } else if (PyString_Check(value)) {
7703 test_str = PyString_AS_STRING(value);
7705 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7708 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
7709 if (unicode != NULL) {
7712 if (talloc_str == NULL) {
7716 object->path = talloc_str;
7722 static PyObject *py_srvsvc_NetShareInfo2_get_password(PyObject *obj, void *closure)
7724 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
7725 PyObject *py_password;
7726 if (object->password == NULL) {
7727 py_password = Py_None;
7728 Py_INCREF(py_password);
7730 if (object->password == NULL) {
7731 py_password = Py_None;
7732 Py_INCREF(py_password);
7734 py_password = PyUnicode_Decode(object->password, strlen(object->password), "utf-8", "ignore");
7740 static int py_srvsvc_NetShareInfo2_set_password(PyObject *py_obj, PyObject *value, void *closure)
7742 struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
7743 if (value == NULL) {
7744 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password");
7747 if (value == Py_None) {
7748 object->password = NULL;
7750 object->password = NULL;
7751 if (value == NULL) {
7752 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->password");
7756 const char *test_str;
7757 const char *talloc_str;
7758 PyObject *unicode = NULL;
7759 if (PyUnicode_Check(value)) {
7760 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
7761 if (unicode == NULL) {
7765 test_str = PyString_AS_STRING(unicode);
7766 } else if (PyString_Check(value)) {
7767 test_str = PyString_AS_STRING(value);
7769 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7772 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
7773 if (unicode != NULL) {
7776 if (talloc_str == NULL) {
7780 object->password = talloc_str;
7786 static PyGetSetDef py_srvsvc_NetShareInfo2_getsetters[] = {
7788 .name = discard_const_p(char, "name"),
7789 .get = py_srvsvc_NetShareInfo2_get_name,
7790 .set = py_srvsvc_NetShareInfo2_set_name,
7791 .doc = discard_const_p(char, "PIDL-generated element name")
7794 .name = discard_const_p(char, "type"),
7795 .get = py_srvsvc_NetShareInfo2_get_type,
7796 .set = py_srvsvc_NetShareInfo2_set_type,
7797 .doc = discard_const_p(char, "PIDL-generated element type")
7800 .name = discard_const_p(char, "comment"),
7801 .get = py_srvsvc_NetShareInfo2_get_comment,
7802 .set = py_srvsvc_NetShareInfo2_set_comment,
7803 .doc = discard_const_p(char, "PIDL-generated element comment")
7806 .name = discard_const_p(char, "permissions"),
7807 .get = py_srvsvc_NetShareInfo2_get_permissions,
7808 .set = py_srvsvc_NetShareInfo2_set_permissions,
7809 .doc = discard_const_p(char, "PIDL-generated element permissions")
7812 .name = discard_const_p(char, "max_users"),
7813 .get = py_srvsvc_NetShareInfo2_get_max_users,
7814 .set = py_srvsvc_NetShareInfo2_set_max_users,
7815 .doc = discard_const_p(char, "PIDL-generated element max_users")
7818 .name = discard_const_p(char, "current_users"),
7819 .get = py_srvsvc_NetShareInfo2_get_current_users,
7820 .set = py_srvsvc_NetShareInfo2_set_current_users,
7821 .doc = discard_const_p(char, "PIDL-generated element current_users")
7824 .name = discard_const_p(char, "path"),
7825 .get = py_srvsvc_NetShareInfo2_get_path,
7826 .set = py_srvsvc_NetShareInfo2_set_path,
7827 .doc = discard_const_p(char, "PIDL-generated element path")
7830 .name = discard_const_p(char, "password"),
7831 .get = py_srvsvc_NetShareInfo2_get_password,
7832 .set = py_srvsvc_NetShareInfo2_set_password,
7833 .doc = discard_const_p(char, "PIDL-generated element password")
7838 static PyObject *py_srvsvc_NetShareInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
7840 return pytalloc_new(struct srvsvc_NetShareInfo2, type);
7844 static PyTypeObject srvsvc_NetShareInfo2_Type = {
7845 PyObject_HEAD_INIT(NULL) 0,
7846 .tp_name = "srvsvc.NetShareInfo2",
7847 .tp_getset = py_srvsvc_NetShareInfo2_getsetters,
7849 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
7850 .tp_new = py_srvsvc_NetShareInfo2_new,
7854 static PyObject *py_srvsvc_NetShareCtr2_get_count(PyObject *obj, void *closure)
7856 struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(obj);
7858 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
7862 static int py_srvsvc_NetShareCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
7864 struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(py_obj);
7865 if (value == NULL) {
7866 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
7870 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
7871 if (PyLong_Check(value)) {
7872 unsigned long long test_var;
7873 test_var = PyLong_AsUnsignedLongLong(value);
7874 if (PyErr_Occurred() != NULL) {
7877 if (test_var > uint_max) {
7878 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
7879 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7882 object->count = test_var;
7883 } else if (PyInt_Check(value)) {
7885 test_var = PyInt_AsLong(value);
7886 if (test_var < 0 || test_var > uint_max) {
7887 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
7888 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
7891 object->count = test_var;
7893 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7894 PyInt_Type.tp_name, PyLong_Type.tp_name);
7901 static PyObject *py_srvsvc_NetShareCtr2_get_array(PyObject *obj, void *closure)
7903 struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(obj);
7905 if (object->array == NULL) {
7907 Py_INCREF(py_array);
7909 py_array = PyList_New(object->count);
7910 if (py_array == NULL) {
7915 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
7916 PyObject *py_array_1;
7917 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo2_Type, object->array, &object->array[array_cntr_1]);
7918 PyList_SetItem(py_array, array_cntr_1, py_array_1);
7925 static int py_srvsvc_NetShareCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
7927 struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(py_obj);
7928 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
7929 if (value == NULL) {
7930 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
7933 if (value == Py_None) {
7934 object->array = NULL;
7936 object->array = NULL;
7937 if (value == NULL) {
7938 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
7941 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
7944 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
7945 if (!object->array) { return -1;; }
7946 talloc_set_name_const(object->array, "ARRAY: object->array");
7947 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
7948 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
7949 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
7952 PY_CHECK_TYPE(&srvsvc_NetShareInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
7953 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
7957 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
7964 static PyGetSetDef py_srvsvc_NetShareCtr2_getsetters[] = {
7966 .name = discard_const_p(char, "count"),
7967 .get = py_srvsvc_NetShareCtr2_get_count,
7968 .set = py_srvsvc_NetShareCtr2_set_count,
7969 .doc = discard_const_p(char, "PIDL-generated element count")
7972 .name = discard_const_p(char, "array"),
7973 .get = py_srvsvc_NetShareCtr2_get_array,
7974 .set = py_srvsvc_NetShareCtr2_set_array,
7975 .doc = discard_const_p(char, "PIDL-generated element array")
7980 static PyObject *py_srvsvc_NetShareCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
7982 return pytalloc_new(struct srvsvc_NetShareCtr2, type);
7986 static PyTypeObject srvsvc_NetShareCtr2_Type = {
7987 PyObject_HEAD_INIT(NULL) 0,
7988 .tp_name = "srvsvc.NetShareCtr2",
7989 .tp_getset = py_srvsvc_NetShareCtr2_getsetters,
7991 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
7992 .tp_new = py_srvsvc_NetShareCtr2_new,
7996 static PyObject *py_srvsvc_NetShareInfo501_get_name(PyObject *obj, void *closure)
7998 struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(obj);
8000 if (object->name == NULL) {
8004 if (object->name == NULL) {
8008 py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
8014 static int py_srvsvc_NetShareInfo501_set_name(PyObject *py_obj, PyObject *value, void *closure)
8016 struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(py_obj);
8017 if (value == NULL) {
8018 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
8021 if (value == Py_None) {
8022 object->name = NULL;
8024 object->name = NULL;
8025 if (value == NULL) {
8026 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->name");
8030 const char *test_str;
8031 const char *talloc_str;
8032 PyObject *unicode = NULL;
8033 if (PyUnicode_Check(value)) {
8034 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
8035 if (unicode == NULL) {
8039 test_str = PyString_AS_STRING(unicode);
8040 } else if (PyString_Check(value)) {
8041 test_str = PyString_AS_STRING(value);
8043 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8046 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
8047 if (unicode != NULL) {
8050 if (talloc_str == NULL) {
8054 object->name = talloc_str;
8060 static PyObject *py_srvsvc_NetShareInfo501_get_type(PyObject *obj, void *closure)
8062 struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(obj);
8064 py_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->type);
8068 static int py_srvsvc_NetShareInfo501_set_type(PyObject *py_obj, PyObject *value, void *closure)
8070 struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(py_obj);
8071 if (value == NULL) {
8072 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
8076 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
8077 if (PyLong_Check(value)) {
8078 unsigned long long test_var;
8079 test_var = PyLong_AsUnsignedLongLong(value);
8080 if (PyErr_Occurred() != NULL) {
8083 if (test_var > uint_max) {
8084 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
8085 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8088 object->type = test_var;
8089 } else if (PyInt_Check(value)) {
8091 test_var = PyInt_AsLong(value);
8092 if (test_var < 0 || test_var > uint_max) {
8093 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
8094 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8097 object->type = test_var;
8099 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8100 PyInt_Type.tp_name, PyLong_Type.tp_name);
8107 static PyObject *py_srvsvc_NetShareInfo501_get_comment(PyObject *obj, void *closure)
8109 struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(obj);
8110 PyObject *py_comment;
8111 if (object->comment == NULL) {
8112 py_comment = Py_None;
8113 Py_INCREF(py_comment);
8115 if (object->comment == NULL) {
8116 py_comment = Py_None;
8117 Py_INCREF(py_comment);
8119 py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
8125 static int py_srvsvc_NetShareInfo501_set_comment(PyObject *py_obj, PyObject *value, void *closure)
8127 struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(py_obj);
8128 if (value == NULL) {
8129 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
8132 if (value == Py_None) {
8133 object->comment = NULL;
8135 object->comment = NULL;
8136 if (value == NULL) {
8137 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->comment");
8141 const char *test_str;
8142 const char *talloc_str;
8143 PyObject *unicode = NULL;
8144 if (PyUnicode_Check(value)) {
8145 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
8146 if (unicode == NULL) {
8150 test_str = PyString_AS_STRING(unicode);
8151 } else if (PyString_Check(value)) {
8152 test_str = PyString_AS_STRING(value);
8154 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8157 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
8158 if (unicode != NULL) {
8161 if (talloc_str == NULL) {
8165 object->comment = talloc_str;
8171 static PyObject *py_srvsvc_NetShareInfo501_get_csc_policy(PyObject *obj, void *closure)
8173 struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(obj);
8174 PyObject *py_csc_policy;
8175 py_csc_policy = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->csc_policy);
8176 return py_csc_policy;
8179 static int py_srvsvc_NetShareInfo501_set_csc_policy(PyObject *py_obj, PyObject *value, void *closure)
8181 struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(py_obj);
8182 if (value == NULL) {
8183 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->csc_policy");
8187 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->csc_policy));
8188 if (PyLong_Check(value)) {
8189 unsigned long long test_var;
8190 test_var = PyLong_AsUnsignedLongLong(value);
8191 if (PyErr_Occurred() != NULL) {
8194 if (test_var > uint_max) {
8195 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
8196 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8199 object->csc_policy = test_var;
8200 } else if (PyInt_Check(value)) {
8202 test_var = PyInt_AsLong(value);
8203 if (test_var < 0 || test_var > uint_max) {
8204 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
8205 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8208 object->csc_policy = test_var;
8210 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8211 PyInt_Type.tp_name, PyLong_Type.tp_name);
8218 static PyGetSetDef py_srvsvc_NetShareInfo501_getsetters[] = {
8220 .name = discard_const_p(char, "name"),
8221 .get = py_srvsvc_NetShareInfo501_get_name,
8222 .set = py_srvsvc_NetShareInfo501_set_name,
8223 .doc = discard_const_p(char, "PIDL-generated element name")
8226 .name = discard_const_p(char, "type"),
8227 .get = py_srvsvc_NetShareInfo501_get_type,
8228 .set = py_srvsvc_NetShareInfo501_set_type,
8229 .doc = discard_const_p(char, "PIDL-generated element type")
8232 .name = discard_const_p(char, "comment"),
8233 .get = py_srvsvc_NetShareInfo501_get_comment,
8234 .set = py_srvsvc_NetShareInfo501_set_comment,
8235 .doc = discard_const_p(char, "PIDL-generated element comment")
8238 .name = discard_const_p(char, "csc_policy"),
8239 .get = py_srvsvc_NetShareInfo501_get_csc_policy,
8240 .set = py_srvsvc_NetShareInfo501_set_csc_policy,
8241 .doc = discard_const_p(char, "PIDL-generated element csc_policy")
8246 static PyObject *py_srvsvc_NetShareInfo501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
8248 return pytalloc_new(struct srvsvc_NetShareInfo501, type);
8252 static PyTypeObject srvsvc_NetShareInfo501_Type = {
8253 PyObject_HEAD_INIT(NULL) 0,
8254 .tp_name = "srvsvc.NetShareInfo501",
8255 .tp_getset = py_srvsvc_NetShareInfo501_getsetters,
8257 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
8258 .tp_new = py_srvsvc_NetShareInfo501_new,
8262 static PyObject *py_srvsvc_NetShareCtr501_get_count(PyObject *obj, void *closure)
8264 struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(obj);
8266 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
8270 static int py_srvsvc_NetShareCtr501_set_count(PyObject *py_obj, PyObject *value, void *closure)
8272 struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(py_obj);
8273 if (value == NULL) {
8274 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
8278 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
8279 if (PyLong_Check(value)) {
8280 unsigned long long test_var;
8281 test_var = PyLong_AsUnsignedLongLong(value);
8282 if (PyErr_Occurred() != NULL) {
8285 if (test_var > uint_max) {
8286 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
8287 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8290 object->count = test_var;
8291 } else if (PyInt_Check(value)) {
8293 test_var = PyInt_AsLong(value);
8294 if (test_var < 0 || test_var > uint_max) {
8295 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
8296 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8299 object->count = test_var;
8301 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8302 PyInt_Type.tp_name, PyLong_Type.tp_name);
8309 static PyObject *py_srvsvc_NetShareCtr501_get_array(PyObject *obj, void *closure)
8311 struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(obj);
8313 if (object->array == NULL) {
8315 Py_INCREF(py_array);
8317 py_array = PyList_New(object->count);
8318 if (py_array == NULL) {
8323 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
8324 PyObject *py_array_1;
8325 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo501_Type, object->array, &object->array[array_cntr_1]);
8326 PyList_SetItem(py_array, array_cntr_1, py_array_1);
8333 static int py_srvsvc_NetShareCtr501_set_array(PyObject *py_obj, PyObject *value, void *closure)
8335 struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(py_obj);
8336 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
8337 if (value == NULL) {
8338 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
8341 if (value == Py_None) {
8342 object->array = NULL;
8344 object->array = NULL;
8345 if (value == NULL) {
8346 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
8349 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
8352 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
8353 if (!object->array) { return -1;; }
8354 talloc_set_name_const(object->array, "ARRAY: object->array");
8355 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
8356 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
8357 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
8360 PY_CHECK_TYPE(&srvsvc_NetShareInfo501_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
8361 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
8365 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
8372 static PyGetSetDef py_srvsvc_NetShareCtr501_getsetters[] = {
8374 .name = discard_const_p(char, "count"),
8375 .get = py_srvsvc_NetShareCtr501_get_count,
8376 .set = py_srvsvc_NetShareCtr501_set_count,
8377 .doc = discard_const_p(char, "PIDL-generated element count")
8380 .name = discard_const_p(char, "array"),
8381 .get = py_srvsvc_NetShareCtr501_get_array,
8382 .set = py_srvsvc_NetShareCtr501_set_array,
8383 .doc = discard_const_p(char, "PIDL-generated element array")
8388 static PyObject *py_srvsvc_NetShareCtr501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
8390 return pytalloc_new(struct srvsvc_NetShareCtr501, type);
8394 static PyTypeObject srvsvc_NetShareCtr501_Type = {
8395 PyObject_HEAD_INIT(NULL) 0,
8396 .tp_name = "srvsvc.NetShareCtr501",
8397 .tp_getset = py_srvsvc_NetShareCtr501_getsetters,
8399 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
8400 .tp_new = py_srvsvc_NetShareCtr501_new,
8404 static PyObject *py_srvsvc_NetShareInfo502_get_name(PyObject *obj, void *closure)
8406 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
8408 if (object->name == NULL) {
8412 if (object->name == NULL) {
8416 py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
8422 static int py_srvsvc_NetShareInfo502_set_name(PyObject *py_obj, PyObject *value, void *closure)
8424 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
8425 if (value == NULL) {
8426 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
8429 if (value == Py_None) {
8430 object->name = NULL;
8432 object->name = NULL;
8433 if (value == NULL) {
8434 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->name");
8438 const char *test_str;
8439 const char *talloc_str;
8440 PyObject *unicode = NULL;
8441 if (PyUnicode_Check(value)) {
8442 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
8443 if (unicode == NULL) {
8447 test_str = PyString_AS_STRING(unicode);
8448 } else if (PyString_Check(value)) {
8449 test_str = PyString_AS_STRING(value);
8451 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8454 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
8455 if (unicode != NULL) {
8458 if (talloc_str == NULL) {
8462 object->name = talloc_str;
8468 static PyObject *py_srvsvc_NetShareInfo502_get_type(PyObject *obj, void *closure)
8470 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
8472 py_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->type);
8476 static int py_srvsvc_NetShareInfo502_set_type(PyObject *py_obj, PyObject *value, void *closure)
8478 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
8479 if (value == NULL) {
8480 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
8484 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
8485 if (PyLong_Check(value)) {
8486 unsigned long long test_var;
8487 test_var = PyLong_AsUnsignedLongLong(value);
8488 if (PyErr_Occurred() != NULL) {
8491 if (test_var > uint_max) {
8492 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
8493 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8496 object->type = test_var;
8497 } else if (PyInt_Check(value)) {
8499 test_var = PyInt_AsLong(value);
8500 if (test_var < 0 || test_var > uint_max) {
8501 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
8502 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8505 object->type = test_var;
8507 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8508 PyInt_Type.tp_name, PyLong_Type.tp_name);
8515 static PyObject *py_srvsvc_NetShareInfo502_get_comment(PyObject *obj, void *closure)
8517 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
8518 PyObject *py_comment;
8519 if (object->comment == NULL) {
8520 py_comment = Py_None;
8521 Py_INCREF(py_comment);
8523 if (object->comment == NULL) {
8524 py_comment = Py_None;
8525 Py_INCREF(py_comment);
8527 py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
8533 static int py_srvsvc_NetShareInfo502_set_comment(PyObject *py_obj, PyObject *value, void *closure)
8535 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
8536 if (value == NULL) {
8537 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
8540 if (value == Py_None) {
8541 object->comment = NULL;
8543 object->comment = NULL;
8544 if (value == NULL) {
8545 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->comment");
8549 const char *test_str;
8550 const char *talloc_str;
8551 PyObject *unicode = NULL;
8552 if (PyUnicode_Check(value)) {
8553 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
8554 if (unicode == NULL) {
8558 test_str = PyString_AS_STRING(unicode);
8559 } else if (PyString_Check(value)) {
8560 test_str = PyString_AS_STRING(value);
8562 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8565 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
8566 if (unicode != NULL) {
8569 if (talloc_str == NULL) {
8573 object->comment = talloc_str;
8579 static PyObject *py_srvsvc_NetShareInfo502_get_permissions(PyObject *obj, void *closure)
8581 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
8582 PyObject *py_permissions;
8583 py_permissions = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->permissions);
8584 return py_permissions;
8587 static int py_srvsvc_NetShareInfo502_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
8589 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
8590 if (value == NULL) {
8591 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->permissions");
8595 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
8596 if (PyLong_Check(value)) {
8597 unsigned long long test_var;
8598 test_var = PyLong_AsUnsignedLongLong(value);
8599 if (PyErr_Occurred() != NULL) {
8602 if (test_var > uint_max) {
8603 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
8604 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8607 object->permissions = test_var;
8608 } else if (PyInt_Check(value)) {
8610 test_var = PyInt_AsLong(value);
8611 if (test_var < 0 || test_var > uint_max) {
8612 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
8613 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8616 object->permissions = test_var;
8618 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8619 PyInt_Type.tp_name, PyLong_Type.tp_name);
8626 static PyObject *py_srvsvc_NetShareInfo502_get_max_users(PyObject *obj, void *closure)
8628 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
8629 PyObject *py_max_users;
8630 py_max_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->max_users);
8631 return py_max_users;
8634 static int py_srvsvc_NetShareInfo502_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
8636 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
8637 if (value == NULL) {
8638 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_users");
8642 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
8643 if (PyLong_Check(value)) {
8644 unsigned long long test_var;
8645 test_var = PyLong_AsUnsignedLongLong(value);
8646 if (PyErr_Occurred() != NULL) {
8649 if (test_var > uint_max) {
8650 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
8651 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8654 object->max_users = test_var;
8655 } else if (PyInt_Check(value)) {
8657 test_var = PyInt_AsLong(value);
8658 if (test_var < 0 || test_var > uint_max) {
8659 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
8660 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8663 object->max_users = test_var;
8665 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8666 PyInt_Type.tp_name, PyLong_Type.tp_name);
8673 static PyObject *py_srvsvc_NetShareInfo502_get_current_users(PyObject *obj, void *closure)
8675 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
8676 PyObject *py_current_users;
8677 py_current_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->current_users);
8678 return py_current_users;
8681 static int py_srvsvc_NetShareInfo502_set_current_users(PyObject *py_obj, PyObject *value, void *closure)
8683 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
8684 if (value == NULL) {
8685 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current_users");
8689 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_users));
8690 if (PyLong_Check(value)) {
8691 unsigned long long test_var;
8692 test_var = PyLong_AsUnsignedLongLong(value);
8693 if (PyErr_Occurred() != NULL) {
8696 if (test_var > uint_max) {
8697 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
8698 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8701 object->current_users = test_var;
8702 } else if (PyInt_Check(value)) {
8704 test_var = PyInt_AsLong(value);
8705 if (test_var < 0 || test_var > uint_max) {
8706 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
8707 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8710 object->current_users = test_var;
8712 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8713 PyInt_Type.tp_name, PyLong_Type.tp_name);
8720 static PyObject *py_srvsvc_NetShareInfo502_get_path(PyObject *obj, void *closure)
8722 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
8724 if (object->path == NULL) {
8728 if (object->path == NULL) {
8732 py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
8738 static int py_srvsvc_NetShareInfo502_set_path(PyObject *py_obj, PyObject *value, void *closure)
8740 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
8741 if (value == NULL) {
8742 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->path");
8745 if (value == Py_None) {
8746 object->path = NULL;
8748 object->path = NULL;
8749 if (value == NULL) {
8750 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->path");
8754 const char *test_str;
8755 const char *talloc_str;
8756 PyObject *unicode = NULL;
8757 if (PyUnicode_Check(value)) {
8758 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
8759 if (unicode == NULL) {
8763 test_str = PyString_AS_STRING(unicode);
8764 } else if (PyString_Check(value)) {
8765 test_str = PyString_AS_STRING(value);
8767 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8770 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
8771 if (unicode != NULL) {
8774 if (talloc_str == NULL) {
8778 object->path = talloc_str;
8784 static PyObject *py_srvsvc_NetShareInfo502_get_password(PyObject *obj, void *closure)
8786 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
8787 PyObject *py_password;
8788 if (object->password == NULL) {
8789 py_password = Py_None;
8790 Py_INCREF(py_password);
8792 if (object->password == NULL) {
8793 py_password = Py_None;
8794 Py_INCREF(py_password);
8796 py_password = PyUnicode_Decode(object->password, strlen(object->password), "utf-8", "ignore");
8802 static int py_srvsvc_NetShareInfo502_set_password(PyObject *py_obj, PyObject *value, void *closure)
8804 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
8805 if (value == NULL) {
8806 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password");
8809 if (value == Py_None) {
8810 object->password = NULL;
8812 object->password = NULL;
8813 if (value == NULL) {
8814 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->password");
8818 const char *test_str;
8819 const char *talloc_str;
8820 PyObject *unicode = NULL;
8821 if (PyUnicode_Check(value)) {
8822 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
8823 if (unicode == NULL) {
8827 test_str = PyString_AS_STRING(unicode);
8828 } else if (PyString_Check(value)) {
8829 test_str = PyString_AS_STRING(value);
8831 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8834 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
8835 if (unicode != NULL) {
8838 if (talloc_str == NULL) {
8842 object->password = talloc_str;
8848 static PyObject *py_srvsvc_NetShareInfo502_get_sd_buf(PyObject *obj, void *closure)
8850 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
8851 PyObject *py_sd_buf;
8852 py_sd_buf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sd_buf);
8856 static int py_srvsvc_NetShareInfo502_set_sd_buf(PyObject *py_obj, PyObject *value, void *closure)
8858 struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
8859 if (value == NULL) {
8860 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sd_buf");
8863 PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
8864 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8868 object->sd_buf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
8872 static PyGetSetDef py_srvsvc_NetShareInfo502_getsetters[] = {
8874 .name = discard_const_p(char, "name"),
8875 .get = py_srvsvc_NetShareInfo502_get_name,
8876 .set = py_srvsvc_NetShareInfo502_set_name,
8877 .doc = discard_const_p(char, "PIDL-generated element name")
8880 .name = discard_const_p(char, "type"),
8881 .get = py_srvsvc_NetShareInfo502_get_type,
8882 .set = py_srvsvc_NetShareInfo502_set_type,
8883 .doc = discard_const_p(char, "PIDL-generated element type")
8886 .name = discard_const_p(char, "comment"),
8887 .get = py_srvsvc_NetShareInfo502_get_comment,
8888 .set = py_srvsvc_NetShareInfo502_set_comment,
8889 .doc = discard_const_p(char, "PIDL-generated element comment")
8892 .name = discard_const_p(char, "permissions"),
8893 .get = py_srvsvc_NetShareInfo502_get_permissions,
8894 .set = py_srvsvc_NetShareInfo502_set_permissions,
8895 .doc = discard_const_p(char, "PIDL-generated element permissions")
8898 .name = discard_const_p(char, "max_users"),
8899 .get = py_srvsvc_NetShareInfo502_get_max_users,
8900 .set = py_srvsvc_NetShareInfo502_set_max_users,
8901 .doc = discard_const_p(char, "PIDL-generated element max_users")
8904 .name = discard_const_p(char, "current_users"),
8905 .get = py_srvsvc_NetShareInfo502_get_current_users,
8906 .set = py_srvsvc_NetShareInfo502_set_current_users,
8907 .doc = discard_const_p(char, "PIDL-generated element current_users")
8910 .name = discard_const_p(char, "path"),
8911 .get = py_srvsvc_NetShareInfo502_get_path,
8912 .set = py_srvsvc_NetShareInfo502_set_path,
8913 .doc = discard_const_p(char, "PIDL-generated element path")
8916 .name = discard_const_p(char, "password"),
8917 .get = py_srvsvc_NetShareInfo502_get_password,
8918 .set = py_srvsvc_NetShareInfo502_set_password,
8919 .doc = discard_const_p(char, "PIDL-generated element password")
8922 .name = discard_const_p(char, "sd_buf"),
8923 .get = py_srvsvc_NetShareInfo502_get_sd_buf,
8924 .set = py_srvsvc_NetShareInfo502_set_sd_buf,
8925 .doc = discard_const_p(char, "PIDL-generated element sd_buf")
8930 static PyObject *py_srvsvc_NetShareInfo502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
8932 return pytalloc_new(struct srvsvc_NetShareInfo502, type);
8936 static PyTypeObject srvsvc_NetShareInfo502_Type = {
8937 PyObject_HEAD_INIT(NULL) 0,
8938 .tp_name = "srvsvc.NetShareInfo502",
8939 .tp_getset = py_srvsvc_NetShareInfo502_getsetters,
8941 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
8942 .tp_new = py_srvsvc_NetShareInfo502_new,
8946 static PyObject *py_srvsvc_NetShareCtr502_get_count(PyObject *obj, void *closure)
8948 struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(obj);
8950 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
8954 static int py_srvsvc_NetShareCtr502_set_count(PyObject *py_obj, PyObject *value, void *closure)
8956 struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(py_obj);
8957 if (value == NULL) {
8958 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
8962 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
8963 if (PyLong_Check(value)) {
8964 unsigned long long test_var;
8965 test_var = PyLong_AsUnsignedLongLong(value);
8966 if (PyErr_Occurred() != NULL) {
8969 if (test_var > uint_max) {
8970 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
8971 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8974 object->count = test_var;
8975 } else if (PyInt_Check(value)) {
8977 test_var = PyInt_AsLong(value);
8978 if (test_var < 0 || test_var > uint_max) {
8979 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
8980 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
8983 object->count = test_var;
8985 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8986 PyInt_Type.tp_name, PyLong_Type.tp_name);
8993 static PyObject *py_srvsvc_NetShareCtr502_get_array(PyObject *obj, void *closure)
8995 struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(obj);
8997 if (object->array == NULL) {
8999 Py_INCREF(py_array);
9001 py_array = PyList_New(object->count);
9002 if (py_array == NULL) {
9007 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
9008 PyObject *py_array_1;
9009 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo502_Type, object->array, &object->array[array_cntr_1]);
9010 PyList_SetItem(py_array, array_cntr_1, py_array_1);
9017 static int py_srvsvc_NetShareCtr502_set_array(PyObject *py_obj, PyObject *value, void *closure)
9019 struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(py_obj);
9020 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
9021 if (value == NULL) {
9022 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
9025 if (value == Py_None) {
9026 object->array = NULL;
9028 object->array = NULL;
9029 if (value == NULL) {
9030 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
9033 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
9036 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
9037 if (!object->array) { return -1;; }
9038 talloc_set_name_const(object->array, "ARRAY: object->array");
9039 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
9040 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
9041 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
9044 PY_CHECK_TYPE(&srvsvc_NetShareInfo502_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
9045 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
9049 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
9056 static PyGetSetDef py_srvsvc_NetShareCtr502_getsetters[] = {
9058 .name = discard_const_p(char, "count"),
9059 .get = py_srvsvc_NetShareCtr502_get_count,
9060 .set = py_srvsvc_NetShareCtr502_set_count,
9061 .doc = discard_const_p(char, "PIDL-generated element count")
9064 .name = discard_const_p(char, "array"),
9065 .get = py_srvsvc_NetShareCtr502_get_array,
9066 .set = py_srvsvc_NetShareCtr502_set_array,
9067 .doc = discard_const_p(char, "PIDL-generated element array")
9072 static PyObject *py_srvsvc_NetShareCtr502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9074 return pytalloc_new(struct srvsvc_NetShareCtr502, type);
9078 static PyTypeObject srvsvc_NetShareCtr502_Type = {
9079 PyObject_HEAD_INIT(NULL) 0,
9080 .tp_name = "srvsvc.NetShareCtr502",
9081 .tp_getset = py_srvsvc_NetShareCtr502_getsetters,
9083 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9084 .tp_new = py_srvsvc_NetShareCtr502_new,
9088 static PyObject *py_srvsvc_NetShareInfo1004_get_comment(PyObject *obj, void *closure)
9090 struct srvsvc_NetShareInfo1004 *object = (struct srvsvc_NetShareInfo1004 *)pytalloc_get_ptr(obj);
9091 PyObject *py_comment;
9092 if (object->comment == NULL) {
9093 py_comment = Py_None;
9094 Py_INCREF(py_comment);
9096 if (object->comment == NULL) {
9097 py_comment = Py_None;
9098 Py_INCREF(py_comment);
9100 py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
9106 static int py_srvsvc_NetShareInfo1004_set_comment(PyObject *py_obj, PyObject *value, void *closure)
9108 struct srvsvc_NetShareInfo1004 *object = (struct srvsvc_NetShareInfo1004 *)pytalloc_get_ptr(py_obj);
9109 if (value == NULL) {
9110 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
9113 if (value == Py_None) {
9114 object->comment = NULL;
9116 object->comment = NULL;
9117 if (value == NULL) {
9118 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->comment");
9122 const char *test_str;
9123 const char *talloc_str;
9124 PyObject *unicode = NULL;
9125 if (PyUnicode_Check(value)) {
9126 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9127 if (unicode == NULL) {
9131 test_str = PyString_AS_STRING(unicode);
9132 } else if (PyString_Check(value)) {
9133 test_str = PyString_AS_STRING(value);
9135 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9138 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9139 if (unicode != NULL) {
9142 if (talloc_str == NULL) {
9146 object->comment = talloc_str;
9152 static PyGetSetDef py_srvsvc_NetShareInfo1004_getsetters[] = {
9154 .name = discard_const_p(char, "comment"),
9155 .get = py_srvsvc_NetShareInfo1004_get_comment,
9156 .set = py_srvsvc_NetShareInfo1004_set_comment,
9157 .doc = discard_const_p(char, "PIDL-generated element comment")
9162 static PyObject *py_srvsvc_NetShareInfo1004_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9164 return pytalloc_new(struct srvsvc_NetShareInfo1004, type);
9168 static PyTypeObject srvsvc_NetShareInfo1004_Type = {
9169 PyObject_HEAD_INIT(NULL) 0,
9170 .tp_name = "srvsvc.NetShareInfo1004",
9171 .tp_getset = py_srvsvc_NetShareInfo1004_getsetters,
9173 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9174 .tp_new = py_srvsvc_NetShareInfo1004_new,
9178 static PyObject *py_srvsvc_NetShareCtr1004_get_count(PyObject *obj, void *closure)
9180 struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(obj);
9182 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
9186 static int py_srvsvc_NetShareCtr1004_set_count(PyObject *py_obj, PyObject *value, void *closure)
9188 struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(py_obj);
9189 if (value == NULL) {
9190 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
9194 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
9195 if (PyLong_Check(value)) {
9196 unsigned long long test_var;
9197 test_var = PyLong_AsUnsignedLongLong(value);
9198 if (PyErr_Occurred() != NULL) {
9201 if (test_var > uint_max) {
9202 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
9203 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9206 object->count = test_var;
9207 } else if (PyInt_Check(value)) {
9209 test_var = PyInt_AsLong(value);
9210 if (test_var < 0 || test_var > uint_max) {
9211 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
9212 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9215 object->count = test_var;
9217 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9218 PyInt_Type.tp_name, PyLong_Type.tp_name);
9225 static PyObject *py_srvsvc_NetShareCtr1004_get_array(PyObject *obj, void *closure)
9227 struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(obj);
9229 if (object->array == NULL) {
9231 Py_INCREF(py_array);
9233 py_array = PyList_New(object->count);
9234 if (py_array == NULL) {
9239 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
9240 PyObject *py_array_1;
9241 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1004_Type, object->array, &object->array[array_cntr_1]);
9242 PyList_SetItem(py_array, array_cntr_1, py_array_1);
9249 static int py_srvsvc_NetShareCtr1004_set_array(PyObject *py_obj, PyObject *value, void *closure)
9251 struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(py_obj);
9252 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
9253 if (value == NULL) {
9254 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
9257 if (value == Py_None) {
9258 object->array = NULL;
9260 object->array = NULL;
9261 if (value == NULL) {
9262 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
9265 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
9268 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
9269 if (!object->array) { return -1;; }
9270 talloc_set_name_const(object->array, "ARRAY: object->array");
9271 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
9272 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
9273 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
9276 PY_CHECK_TYPE(&srvsvc_NetShareInfo1004_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
9277 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
9281 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo1004 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
9288 static PyGetSetDef py_srvsvc_NetShareCtr1004_getsetters[] = {
9290 .name = discard_const_p(char, "count"),
9291 .get = py_srvsvc_NetShareCtr1004_get_count,
9292 .set = py_srvsvc_NetShareCtr1004_set_count,
9293 .doc = discard_const_p(char, "PIDL-generated element count")
9296 .name = discard_const_p(char, "array"),
9297 .get = py_srvsvc_NetShareCtr1004_get_array,
9298 .set = py_srvsvc_NetShareCtr1004_set_array,
9299 .doc = discard_const_p(char, "PIDL-generated element array")
9304 static PyObject *py_srvsvc_NetShareCtr1004_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9306 return pytalloc_new(struct srvsvc_NetShareCtr1004, type);
9310 static PyTypeObject srvsvc_NetShareCtr1004_Type = {
9311 PyObject_HEAD_INIT(NULL) 0,
9312 .tp_name = "srvsvc.NetShareCtr1004",
9313 .tp_getset = py_srvsvc_NetShareCtr1004_getsetters,
9315 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9316 .tp_new = py_srvsvc_NetShareCtr1004_new,
9320 static PyObject *py_srvsvc_NetShareInfo1005_get_dfs_flags(PyObject *obj, void *closure)
9322 struct srvsvc_NetShareInfo1005 *object = (struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(obj);
9323 PyObject *py_dfs_flags;
9324 py_dfs_flags = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->dfs_flags);
9325 return py_dfs_flags;
9328 static int py_srvsvc_NetShareInfo1005_set_dfs_flags(PyObject *py_obj, PyObject *value, void *closure)
9330 struct srvsvc_NetShareInfo1005 *object = (struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(py_obj);
9331 if (value == NULL) {
9332 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dfs_flags");
9336 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dfs_flags));
9337 if (PyLong_Check(value)) {
9338 unsigned long long test_var;
9339 test_var = PyLong_AsUnsignedLongLong(value);
9340 if (PyErr_Occurred() != NULL) {
9343 if (test_var > uint_max) {
9344 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
9345 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9348 object->dfs_flags = test_var;
9349 } else if (PyInt_Check(value)) {
9351 test_var = PyInt_AsLong(value);
9352 if (test_var < 0 || test_var > uint_max) {
9353 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
9354 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9357 object->dfs_flags = test_var;
9359 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9360 PyInt_Type.tp_name, PyLong_Type.tp_name);
9367 static PyGetSetDef py_srvsvc_NetShareInfo1005_getsetters[] = {
9369 .name = discard_const_p(char, "dfs_flags"),
9370 .get = py_srvsvc_NetShareInfo1005_get_dfs_flags,
9371 .set = py_srvsvc_NetShareInfo1005_set_dfs_flags,
9372 .doc = discard_const_p(char, "PIDL-generated element dfs_flags")
9377 static PyObject *py_srvsvc_NetShareInfo1005_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9379 return pytalloc_new(struct srvsvc_NetShareInfo1005, type);
9383 static PyTypeObject srvsvc_NetShareInfo1005_Type = {
9384 PyObject_HEAD_INIT(NULL) 0,
9385 .tp_name = "srvsvc.NetShareInfo1005",
9386 .tp_getset = py_srvsvc_NetShareInfo1005_getsetters,
9388 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9389 .tp_new = py_srvsvc_NetShareInfo1005_new,
9393 static PyObject *py_srvsvc_NetShareCtr1005_get_count(PyObject *obj, void *closure)
9395 struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(obj);
9397 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
9401 static int py_srvsvc_NetShareCtr1005_set_count(PyObject *py_obj, PyObject *value, void *closure)
9403 struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(py_obj);
9404 if (value == NULL) {
9405 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
9409 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
9410 if (PyLong_Check(value)) {
9411 unsigned long long test_var;
9412 test_var = PyLong_AsUnsignedLongLong(value);
9413 if (PyErr_Occurred() != NULL) {
9416 if (test_var > uint_max) {
9417 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
9418 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9421 object->count = test_var;
9422 } else if (PyInt_Check(value)) {
9424 test_var = PyInt_AsLong(value);
9425 if (test_var < 0 || test_var > uint_max) {
9426 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
9427 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9430 object->count = test_var;
9432 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9433 PyInt_Type.tp_name, PyLong_Type.tp_name);
9440 static PyObject *py_srvsvc_NetShareCtr1005_get_array(PyObject *obj, void *closure)
9442 struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(obj);
9444 if (object->array == NULL) {
9446 Py_INCREF(py_array);
9448 py_array = PyList_New(object->count);
9449 if (py_array == NULL) {
9454 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
9455 PyObject *py_array_1;
9456 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1005_Type, object->array, &object->array[array_cntr_1]);
9457 PyList_SetItem(py_array, array_cntr_1, py_array_1);
9464 static int py_srvsvc_NetShareCtr1005_set_array(PyObject *py_obj, PyObject *value, void *closure)
9466 struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(py_obj);
9467 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
9468 if (value == NULL) {
9469 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
9472 if (value == Py_None) {
9473 object->array = NULL;
9475 object->array = NULL;
9476 if (value == NULL) {
9477 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
9480 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
9483 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
9484 if (!object->array) { return -1;; }
9485 talloc_set_name_const(object->array, "ARRAY: object->array");
9486 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
9487 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
9488 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
9491 PY_CHECK_TYPE(&srvsvc_NetShareInfo1005_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
9492 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
9496 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
9503 static PyGetSetDef py_srvsvc_NetShareCtr1005_getsetters[] = {
9505 .name = discard_const_p(char, "count"),
9506 .get = py_srvsvc_NetShareCtr1005_get_count,
9507 .set = py_srvsvc_NetShareCtr1005_set_count,
9508 .doc = discard_const_p(char, "PIDL-generated element count")
9511 .name = discard_const_p(char, "array"),
9512 .get = py_srvsvc_NetShareCtr1005_get_array,
9513 .set = py_srvsvc_NetShareCtr1005_set_array,
9514 .doc = discard_const_p(char, "PIDL-generated element array")
9519 static PyObject *py_srvsvc_NetShareCtr1005_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9521 return pytalloc_new(struct srvsvc_NetShareCtr1005, type);
9525 static PyTypeObject srvsvc_NetShareCtr1005_Type = {
9526 PyObject_HEAD_INIT(NULL) 0,
9527 .tp_name = "srvsvc.NetShareCtr1005",
9528 .tp_getset = py_srvsvc_NetShareCtr1005_getsetters,
9530 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9531 .tp_new = py_srvsvc_NetShareCtr1005_new,
9535 static PyObject *py_srvsvc_NetShareInfo1006_get_max_users(PyObject *obj, void *closure)
9537 struct srvsvc_NetShareInfo1006 *object = (struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(obj);
9538 PyObject *py_max_users;
9539 py_max_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->max_users);
9540 return py_max_users;
9543 static int py_srvsvc_NetShareInfo1006_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
9545 struct srvsvc_NetShareInfo1006 *object = (struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(py_obj);
9546 if (value == NULL) {
9547 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_users");
9551 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
9552 if (PyLong_Check(value)) {
9553 unsigned long long test_var;
9554 test_var = PyLong_AsUnsignedLongLong(value);
9555 if (PyErr_Occurred() != NULL) {
9558 if (test_var > uint_max) {
9559 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
9560 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9563 object->max_users = test_var;
9564 } else if (PyInt_Check(value)) {
9566 test_var = PyInt_AsLong(value);
9567 if (test_var < 0 || test_var > uint_max) {
9568 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
9569 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9572 object->max_users = test_var;
9574 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9575 PyInt_Type.tp_name, PyLong_Type.tp_name);
9582 static PyGetSetDef py_srvsvc_NetShareInfo1006_getsetters[] = {
9584 .name = discard_const_p(char, "max_users"),
9585 .get = py_srvsvc_NetShareInfo1006_get_max_users,
9586 .set = py_srvsvc_NetShareInfo1006_set_max_users,
9587 .doc = discard_const_p(char, "PIDL-generated element max_users")
9592 static PyObject *py_srvsvc_NetShareInfo1006_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9594 return pytalloc_new(struct srvsvc_NetShareInfo1006, type);
9598 static PyTypeObject srvsvc_NetShareInfo1006_Type = {
9599 PyObject_HEAD_INIT(NULL) 0,
9600 .tp_name = "srvsvc.NetShareInfo1006",
9601 .tp_getset = py_srvsvc_NetShareInfo1006_getsetters,
9603 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9604 .tp_new = py_srvsvc_NetShareInfo1006_new,
9608 static PyObject *py_srvsvc_NetShareCtr1006_get_count(PyObject *obj, void *closure)
9610 struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(obj);
9612 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
9616 static int py_srvsvc_NetShareCtr1006_set_count(PyObject *py_obj, PyObject *value, void *closure)
9618 struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(py_obj);
9619 if (value == NULL) {
9620 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
9624 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
9625 if (PyLong_Check(value)) {
9626 unsigned long long test_var;
9627 test_var = PyLong_AsUnsignedLongLong(value);
9628 if (PyErr_Occurred() != NULL) {
9631 if (test_var > uint_max) {
9632 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
9633 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9636 object->count = test_var;
9637 } else if (PyInt_Check(value)) {
9639 test_var = PyInt_AsLong(value);
9640 if (test_var < 0 || test_var > uint_max) {
9641 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
9642 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9645 object->count = test_var;
9647 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9648 PyInt_Type.tp_name, PyLong_Type.tp_name);
9655 static PyObject *py_srvsvc_NetShareCtr1006_get_array(PyObject *obj, void *closure)
9657 struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(obj);
9659 if (object->array == NULL) {
9661 Py_INCREF(py_array);
9663 py_array = PyList_New(object->count);
9664 if (py_array == NULL) {
9669 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
9670 PyObject *py_array_1;
9671 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1006_Type, object->array, &object->array[array_cntr_1]);
9672 PyList_SetItem(py_array, array_cntr_1, py_array_1);
9679 static int py_srvsvc_NetShareCtr1006_set_array(PyObject *py_obj, PyObject *value, void *closure)
9681 struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(py_obj);
9682 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
9683 if (value == NULL) {
9684 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
9687 if (value == Py_None) {
9688 object->array = NULL;
9690 object->array = NULL;
9691 if (value == NULL) {
9692 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
9695 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
9698 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
9699 if (!object->array) { return -1;; }
9700 talloc_set_name_const(object->array, "ARRAY: object->array");
9701 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
9702 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
9703 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
9706 PY_CHECK_TYPE(&srvsvc_NetShareInfo1006_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
9707 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
9711 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
9718 static PyGetSetDef py_srvsvc_NetShareCtr1006_getsetters[] = {
9720 .name = discard_const_p(char, "count"),
9721 .get = py_srvsvc_NetShareCtr1006_get_count,
9722 .set = py_srvsvc_NetShareCtr1006_set_count,
9723 .doc = discard_const_p(char, "PIDL-generated element count")
9726 .name = discard_const_p(char, "array"),
9727 .get = py_srvsvc_NetShareCtr1006_get_array,
9728 .set = py_srvsvc_NetShareCtr1006_set_array,
9729 .doc = discard_const_p(char, "PIDL-generated element array")
9734 static PyObject *py_srvsvc_NetShareCtr1006_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9736 return pytalloc_new(struct srvsvc_NetShareCtr1006, type);
9740 static PyTypeObject srvsvc_NetShareCtr1006_Type = {
9741 PyObject_HEAD_INIT(NULL) 0,
9742 .tp_name = "srvsvc.NetShareCtr1006",
9743 .tp_getset = py_srvsvc_NetShareCtr1006_getsetters,
9745 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9746 .tp_new = py_srvsvc_NetShareCtr1006_new,
9750 static PyObject *py_srvsvc_NetShareInfo1007_get_flags(PyObject *obj, void *closure)
9752 struct srvsvc_NetShareInfo1007 *object = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(obj);
9754 py_flags = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->flags);
9758 static int py_srvsvc_NetShareInfo1007_set_flags(PyObject *py_obj, PyObject *value, void *closure)
9760 struct srvsvc_NetShareInfo1007 *object = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(py_obj);
9761 if (value == NULL) {
9762 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
9766 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
9767 if (PyLong_Check(value)) {
9768 unsigned long long test_var;
9769 test_var = PyLong_AsUnsignedLongLong(value);
9770 if (PyErr_Occurred() != NULL) {
9773 if (test_var > uint_max) {
9774 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
9775 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9778 object->flags = test_var;
9779 } else if (PyInt_Check(value)) {
9781 test_var = PyInt_AsLong(value);
9782 if (test_var < 0 || test_var > uint_max) {
9783 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
9784 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9787 object->flags = test_var;
9789 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9790 PyInt_Type.tp_name, PyLong_Type.tp_name);
9797 static PyObject *py_srvsvc_NetShareInfo1007_get_alternate_directory_name(PyObject *obj, void *closure)
9799 struct srvsvc_NetShareInfo1007 *object = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(obj);
9800 PyObject *py_alternate_directory_name;
9801 if (object->alternate_directory_name == NULL) {
9802 py_alternate_directory_name = Py_None;
9803 Py_INCREF(py_alternate_directory_name);
9805 if (object->alternate_directory_name == NULL) {
9806 py_alternate_directory_name = Py_None;
9807 Py_INCREF(py_alternate_directory_name);
9809 py_alternate_directory_name = PyUnicode_Decode(object->alternate_directory_name, strlen(object->alternate_directory_name), "utf-8", "ignore");
9812 return py_alternate_directory_name;
9815 static int py_srvsvc_NetShareInfo1007_set_alternate_directory_name(PyObject *py_obj, PyObject *value, void *closure)
9817 struct srvsvc_NetShareInfo1007 *object = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(py_obj);
9818 if (value == NULL) {
9819 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alternate_directory_name");
9822 if (value == Py_None) {
9823 object->alternate_directory_name = NULL;
9825 object->alternate_directory_name = NULL;
9826 if (value == NULL) {
9827 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->alternate_directory_name");
9831 const char *test_str;
9832 const char *talloc_str;
9833 PyObject *unicode = NULL;
9834 if (PyUnicode_Check(value)) {
9835 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9836 if (unicode == NULL) {
9840 test_str = PyString_AS_STRING(unicode);
9841 } else if (PyString_Check(value)) {
9842 test_str = PyString_AS_STRING(value);
9844 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9847 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9848 if (unicode != NULL) {
9851 if (talloc_str == NULL) {
9855 object->alternate_directory_name = talloc_str;
9861 static PyGetSetDef py_srvsvc_NetShareInfo1007_getsetters[] = {
9863 .name = discard_const_p(char, "flags"),
9864 .get = py_srvsvc_NetShareInfo1007_get_flags,
9865 .set = py_srvsvc_NetShareInfo1007_set_flags,
9866 .doc = discard_const_p(char, "PIDL-generated element flags")
9869 .name = discard_const_p(char, "alternate_directory_name"),
9870 .get = py_srvsvc_NetShareInfo1007_get_alternate_directory_name,
9871 .set = py_srvsvc_NetShareInfo1007_set_alternate_directory_name,
9872 .doc = discard_const_p(char, "PIDL-generated element alternate_directory_name")
9877 static PyObject *py_srvsvc_NetShareInfo1007_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9879 return pytalloc_new(struct srvsvc_NetShareInfo1007, type);
9883 static PyTypeObject srvsvc_NetShareInfo1007_Type = {
9884 PyObject_HEAD_INIT(NULL) 0,
9885 .tp_name = "srvsvc.NetShareInfo1007",
9886 .tp_getset = py_srvsvc_NetShareInfo1007_getsetters,
9888 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9889 .tp_new = py_srvsvc_NetShareInfo1007_new,
9893 static PyObject *py_srvsvc_NetShareCtr1007_get_count(PyObject *obj, void *closure)
9895 struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(obj);
9897 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
9901 static int py_srvsvc_NetShareCtr1007_set_count(PyObject *py_obj, PyObject *value, void *closure)
9903 struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(py_obj);
9904 if (value == NULL) {
9905 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
9909 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
9910 if (PyLong_Check(value)) {
9911 unsigned long long test_var;
9912 test_var = PyLong_AsUnsignedLongLong(value);
9913 if (PyErr_Occurred() != NULL) {
9916 if (test_var > uint_max) {
9917 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
9918 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9921 object->count = test_var;
9922 } else if (PyInt_Check(value)) {
9924 test_var = PyInt_AsLong(value);
9925 if (test_var < 0 || test_var > uint_max) {
9926 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
9927 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
9930 object->count = test_var;
9932 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9933 PyInt_Type.tp_name, PyLong_Type.tp_name);
9940 static PyObject *py_srvsvc_NetShareCtr1007_get_array(PyObject *obj, void *closure)
9942 struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(obj);
9944 if (object->array == NULL) {
9946 Py_INCREF(py_array);
9948 py_array = PyList_New(object->count);
9949 if (py_array == NULL) {
9954 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
9955 PyObject *py_array_1;
9956 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1007_Type, object->array, &object->array[array_cntr_1]);
9957 PyList_SetItem(py_array, array_cntr_1, py_array_1);
9964 static int py_srvsvc_NetShareCtr1007_set_array(PyObject *py_obj, PyObject *value, void *closure)
9966 struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(py_obj);
9967 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
9968 if (value == NULL) {
9969 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
9972 if (value == Py_None) {
9973 object->array = NULL;
9975 object->array = NULL;
9976 if (value == NULL) {
9977 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
9980 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
9983 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
9984 if (!object->array) { return -1;; }
9985 talloc_set_name_const(object->array, "ARRAY: object->array");
9986 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
9987 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
9988 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
9991 PY_CHECK_TYPE(&srvsvc_NetShareInfo1007_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
9992 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
9996 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
10003 static PyGetSetDef py_srvsvc_NetShareCtr1007_getsetters[] = {
10005 .name = discard_const_p(char, "count"),
10006 .get = py_srvsvc_NetShareCtr1007_get_count,
10007 .set = py_srvsvc_NetShareCtr1007_set_count,
10008 .doc = discard_const_p(char, "PIDL-generated element count")
10011 .name = discard_const_p(char, "array"),
10012 .get = py_srvsvc_NetShareCtr1007_get_array,
10013 .set = py_srvsvc_NetShareCtr1007_set_array,
10014 .doc = discard_const_p(char, "PIDL-generated element array")
10019 static PyObject *py_srvsvc_NetShareCtr1007_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10021 return pytalloc_new(struct srvsvc_NetShareCtr1007, type);
10025 static PyTypeObject srvsvc_NetShareCtr1007_Type = {
10026 PyObject_HEAD_INIT(NULL) 0,
10027 .tp_name = "srvsvc.NetShareCtr1007",
10028 .tp_getset = py_srvsvc_NetShareCtr1007_getsetters,
10029 .tp_methods = NULL,
10030 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
10031 .tp_new = py_srvsvc_NetShareCtr1007_new,
10035 static PyObject *py_srvsvc_NetShareCtr1501_get_count(PyObject *obj, void *closure)
10037 struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(obj);
10038 PyObject *py_count;
10039 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
10043 static int py_srvsvc_NetShareCtr1501_set_count(PyObject *py_obj, PyObject *value, void *closure)
10045 struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(py_obj);
10046 if (value == NULL) {
10047 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
10051 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
10052 if (PyLong_Check(value)) {
10053 unsigned long long test_var;
10054 test_var = PyLong_AsUnsignedLongLong(value);
10055 if (PyErr_Occurred() != NULL) {
10058 if (test_var > uint_max) {
10059 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
10060 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
10063 object->count = test_var;
10064 } else if (PyInt_Check(value)) {
10066 test_var = PyInt_AsLong(value);
10067 if (test_var < 0 || test_var > uint_max) {
10068 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
10069 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
10072 object->count = test_var;
10074 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
10075 PyInt_Type.tp_name, PyLong_Type.tp_name);
10082 static PyObject *py_srvsvc_NetShareCtr1501_get_array(PyObject *obj, void *closure)
10084 struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(obj);
10085 PyObject *py_array;
10086 if (object->array == NULL) {
10087 py_array = Py_None;
10088 Py_INCREF(py_array);
10090 py_array = PyList_New(object->count);
10091 if (py_array == NULL) {
10096 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
10097 PyObject *py_array_1;
10098 py_array_1 = pytalloc_reference_ex(sec_desc_buf_Type, object->array, &object->array[array_cntr_1]);
10099 PyList_SetItem(py_array, array_cntr_1, py_array_1);
10106 static int py_srvsvc_NetShareCtr1501_set_array(PyObject *py_obj, PyObject *value, void *closure)
10108 struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(py_obj);
10109 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
10110 if (value == NULL) {
10111 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
10114 if (value == Py_None) {
10115 object->array = NULL;
10117 object->array = NULL;
10118 if (value == NULL) {
10119 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
10122 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
10125 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
10126 if (!object->array) { return -1;; }
10127 talloc_set_name_const(object->array, "ARRAY: object->array");
10128 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
10129 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
10130 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
10133 PY_CHECK_TYPE(sec_desc_buf_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
10134 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
10138 object->array[array_cntr_1] = *(struct sec_desc_buf *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
10145 static PyGetSetDef py_srvsvc_NetShareCtr1501_getsetters[] = {
10147 .name = discard_const_p(char, "count"),
10148 .get = py_srvsvc_NetShareCtr1501_get_count,
10149 .set = py_srvsvc_NetShareCtr1501_set_count,
10150 .doc = discard_const_p(char, "PIDL-generated element count")
10153 .name = discard_const_p(char, "array"),
10154 .get = py_srvsvc_NetShareCtr1501_get_array,
10155 .set = py_srvsvc_NetShareCtr1501_set_array,
10156 .doc = discard_const_p(char, "PIDL-generated element array")
10161 static PyObject *py_srvsvc_NetShareCtr1501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10163 return pytalloc_new(struct srvsvc_NetShareCtr1501, type);
10167 static PyTypeObject srvsvc_NetShareCtr1501_Type = {
10168 PyObject_HEAD_INIT(NULL) 0,
10169 .tp_name = "srvsvc.NetShareCtr1501",
10170 .tp_getset = py_srvsvc_NetShareCtr1501_getsetters,
10171 .tp_methods = NULL,
10172 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
10173 .tp_new = py_srvsvc_NetShareCtr1501_new,
10176 PyObject *py_import_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareInfo *in)
10182 if (in->info0 == NULL) {
10186 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo0_Type, in->info0, in->info0);
10191 if (in->info1 == NULL) {
10195 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1_Type, in->info1, in->info1);
10200 if (in->info2 == NULL) {
10204 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo2_Type, in->info2, in->info2);
10209 if (in->info501 == NULL) {
10213 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo501_Type, in->info501, in->info501);
10218 if (in->info502 == NULL) {
10222 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo502_Type, in->info502, in->info502);
10227 if (in->info1004 == NULL) {
10231 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1004_Type, in->info1004, in->info1004);
10236 if (in->info1005 == NULL) {
10240 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1005_Type, in->info1005, in->info1005);
10245 if (in->info1006 == NULL) {
10249 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1006_Type, in->info1006, in->info1006);
10254 if (in->info1007 == NULL) {
10258 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1007_Type, in->info1007, in->info1007);
10263 if (in->info1501 == NULL) {
10267 ret = pytalloc_reference_ex(sec_desc_buf_Type, in->info1501, in->info1501);
10277 PyErr_SetString(PyExc_TypeError, "unknown union level");
10281 union srvsvc_NetShareInfo *py_export_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
10283 union srvsvc_NetShareInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
10287 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info0");
10288 talloc_free(ret); return NULL;
10290 if (in == Py_None) {
10295 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info0");
10296 talloc_free(ret); return NULL;
10298 PY_CHECK_TYPE(&srvsvc_NetShareInfo0_Type, in, talloc_free(ret); return NULL;);
10299 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10301 talloc_free(ret); return NULL;
10303 ret->info0 = (struct srvsvc_NetShareInfo0 *)pytalloc_get_ptr(in);
10309 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
10310 talloc_free(ret); return NULL;
10312 if (in == Py_None) {
10317 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1");
10318 talloc_free(ret); return NULL;
10320 PY_CHECK_TYPE(&srvsvc_NetShareInfo1_Type, in, talloc_free(ret); return NULL;);
10321 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10323 talloc_free(ret); return NULL;
10325 ret->info1 = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(in);
10331 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info2");
10332 talloc_free(ret); return NULL;
10334 if (in == Py_None) {
10339 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info2");
10340 talloc_free(ret); return NULL;
10342 PY_CHECK_TYPE(&srvsvc_NetShareInfo2_Type, in, talloc_free(ret); return NULL;);
10343 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10345 talloc_free(ret); return NULL;
10347 ret->info2 = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(in);
10353 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info501");
10354 talloc_free(ret); return NULL;
10356 if (in == Py_None) {
10357 ret->info501 = NULL;
10359 ret->info501 = NULL;
10361 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info501");
10362 talloc_free(ret); return NULL;
10364 PY_CHECK_TYPE(&srvsvc_NetShareInfo501_Type, in, talloc_free(ret); return NULL;);
10365 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10367 talloc_free(ret); return NULL;
10369 ret->info501 = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(in);
10375 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info502");
10376 talloc_free(ret); return NULL;
10378 if (in == Py_None) {
10379 ret->info502 = NULL;
10381 ret->info502 = NULL;
10383 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info502");
10384 talloc_free(ret); return NULL;
10386 PY_CHECK_TYPE(&srvsvc_NetShareInfo502_Type, in, talloc_free(ret); return NULL;);
10387 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10389 talloc_free(ret); return NULL;
10391 ret->info502 = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(in);
10397 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1004");
10398 talloc_free(ret); return NULL;
10400 if (in == Py_None) {
10401 ret->info1004 = NULL;
10403 ret->info1004 = NULL;
10405 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1004");
10406 talloc_free(ret); return NULL;
10408 PY_CHECK_TYPE(&srvsvc_NetShareInfo1004_Type, in, talloc_free(ret); return NULL;);
10409 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10411 talloc_free(ret); return NULL;
10413 ret->info1004 = (struct srvsvc_NetShareInfo1004 *)pytalloc_get_ptr(in);
10419 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1005");
10420 talloc_free(ret); return NULL;
10422 if (in == Py_None) {
10423 ret->info1005 = NULL;
10425 ret->info1005 = NULL;
10427 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1005");
10428 talloc_free(ret); return NULL;
10430 PY_CHECK_TYPE(&srvsvc_NetShareInfo1005_Type, in, talloc_free(ret); return NULL;);
10431 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10433 talloc_free(ret); return NULL;
10435 ret->info1005 = (struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(in);
10441 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1006");
10442 talloc_free(ret); return NULL;
10444 if (in == Py_None) {
10445 ret->info1006 = NULL;
10447 ret->info1006 = NULL;
10449 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1006");
10450 talloc_free(ret); return NULL;
10452 PY_CHECK_TYPE(&srvsvc_NetShareInfo1006_Type, in, talloc_free(ret); return NULL;);
10453 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10455 talloc_free(ret); return NULL;
10457 ret->info1006 = (struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(in);
10463 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1007");
10464 talloc_free(ret); return NULL;
10466 if (in == Py_None) {
10467 ret->info1007 = NULL;
10469 ret->info1007 = NULL;
10471 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1007");
10472 talloc_free(ret); return NULL;
10474 PY_CHECK_TYPE(&srvsvc_NetShareInfo1007_Type, in, talloc_free(ret); return NULL;);
10475 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10477 talloc_free(ret); return NULL;
10479 ret->info1007 = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(in);
10485 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1501");
10486 talloc_free(ret); return NULL;
10488 if (in == Py_None) {
10489 ret->info1501 = NULL;
10491 ret->info1501 = NULL;
10493 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1501");
10494 talloc_free(ret); return NULL;
10496 PY_CHECK_TYPE(sec_desc_buf_Type, in, talloc_free(ret); return NULL;);
10497 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10499 talloc_free(ret); return NULL;
10501 ret->info1501 = (struct sec_desc_buf *)pytalloc_get_ptr(in);
10513 PyObject *py_import_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareCtr *in)
10519 if (in->ctr0 == NULL) {
10523 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr0_Type, in->ctr0, in->ctr0);
10528 if (in->ctr1 == NULL) {
10532 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1_Type, in->ctr1, in->ctr1);
10537 if (in->ctr2 == NULL) {
10541 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr2_Type, in->ctr2, in->ctr2);
10546 if (in->ctr501 == NULL) {
10550 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr501_Type, in->ctr501, in->ctr501);
10555 if (in->ctr502 == NULL) {
10559 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr502_Type, in->ctr502, in->ctr502);
10564 if (in->ctr1004 == NULL) {
10568 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1004_Type, in->ctr1004, in->ctr1004);
10573 if (in->ctr1005 == NULL) {
10577 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1005_Type, in->ctr1005, in->ctr1005);
10582 if (in->ctr1006 == NULL) {
10586 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1006_Type, in->ctr1006, in->ctr1006);
10591 if (in->ctr1007 == NULL) {
10595 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1007_Type, in->ctr1007, in->ctr1007);
10600 if (in->ctr1501 == NULL) {
10604 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1501_Type, in->ctr1501, in->ctr1501);
10614 PyErr_SetString(PyExc_TypeError, "unknown union level");
10618 union srvsvc_NetShareCtr *py_export_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
10620 union srvsvc_NetShareCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetShareCtr);
10624 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
10625 talloc_free(ret); return NULL;
10627 if (in == Py_None) {
10632 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr0");
10633 talloc_free(ret); return NULL;
10635 PY_CHECK_TYPE(&srvsvc_NetShareCtr0_Type, in, talloc_free(ret); return NULL;);
10636 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10638 talloc_free(ret); return NULL;
10640 ret->ctr0 = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(in);
10646 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
10647 talloc_free(ret); return NULL;
10649 if (in == Py_None) {
10654 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1");
10655 talloc_free(ret); return NULL;
10657 PY_CHECK_TYPE(&srvsvc_NetShareCtr1_Type, in, talloc_free(ret); return NULL;);
10658 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10660 talloc_free(ret); return NULL;
10662 ret->ctr1 = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(in);
10668 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
10669 talloc_free(ret); return NULL;
10671 if (in == Py_None) {
10676 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr2");
10677 talloc_free(ret); return NULL;
10679 PY_CHECK_TYPE(&srvsvc_NetShareCtr2_Type, in, talloc_free(ret); return NULL;);
10680 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10682 talloc_free(ret); return NULL;
10684 ret->ctr2 = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(in);
10690 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr501");
10691 talloc_free(ret); return NULL;
10693 if (in == Py_None) {
10694 ret->ctr501 = NULL;
10696 ret->ctr501 = NULL;
10698 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr501");
10699 talloc_free(ret); return NULL;
10701 PY_CHECK_TYPE(&srvsvc_NetShareCtr501_Type, in, talloc_free(ret); return NULL;);
10702 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10704 talloc_free(ret); return NULL;
10706 ret->ctr501 = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(in);
10712 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr502");
10713 talloc_free(ret); return NULL;
10715 if (in == Py_None) {
10716 ret->ctr502 = NULL;
10718 ret->ctr502 = NULL;
10720 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr502");
10721 talloc_free(ret); return NULL;
10723 PY_CHECK_TYPE(&srvsvc_NetShareCtr502_Type, in, talloc_free(ret); return NULL;);
10724 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10726 talloc_free(ret); return NULL;
10728 ret->ctr502 = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(in);
10734 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1004");
10735 talloc_free(ret); return NULL;
10737 if (in == Py_None) {
10738 ret->ctr1004 = NULL;
10740 ret->ctr1004 = NULL;
10742 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1004");
10743 talloc_free(ret); return NULL;
10745 PY_CHECK_TYPE(&srvsvc_NetShareCtr1004_Type, in, talloc_free(ret); return NULL;);
10746 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10748 talloc_free(ret); return NULL;
10750 ret->ctr1004 = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(in);
10756 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1005");
10757 talloc_free(ret); return NULL;
10759 if (in == Py_None) {
10760 ret->ctr1005 = NULL;
10762 ret->ctr1005 = NULL;
10764 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1005");
10765 talloc_free(ret); return NULL;
10767 PY_CHECK_TYPE(&srvsvc_NetShareCtr1005_Type, in, talloc_free(ret); return NULL;);
10768 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10770 talloc_free(ret); return NULL;
10772 ret->ctr1005 = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(in);
10778 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1006");
10779 talloc_free(ret); return NULL;
10781 if (in == Py_None) {
10782 ret->ctr1006 = NULL;
10784 ret->ctr1006 = NULL;
10786 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1006");
10787 talloc_free(ret); return NULL;
10789 PY_CHECK_TYPE(&srvsvc_NetShareCtr1006_Type, in, talloc_free(ret); return NULL;);
10790 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10792 talloc_free(ret); return NULL;
10794 ret->ctr1006 = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(in);
10800 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1007");
10801 talloc_free(ret); return NULL;
10803 if (in == Py_None) {
10804 ret->ctr1007 = NULL;
10806 ret->ctr1007 = NULL;
10808 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1007");
10809 talloc_free(ret); return NULL;
10811 PY_CHECK_TYPE(&srvsvc_NetShareCtr1007_Type, in, talloc_free(ret); return NULL;);
10812 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10814 talloc_free(ret); return NULL;
10816 ret->ctr1007 = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(in);
10822 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1501");
10823 talloc_free(ret); return NULL;
10825 if (in == Py_None) {
10826 ret->ctr1501 = NULL;
10828 ret->ctr1501 = NULL;
10830 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1501");
10831 talloc_free(ret); return NULL;
10833 PY_CHECK_TYPE(&srvsvc_NetShareCtr1501_Type, in, talloc_free(ret); return NULL;);
10834 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
10836 talloc_free(ret); return NULL;
10838 ret->ctr1501 = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(in);
10851 static PyObject *py_srvsvc_NetShareInfoCtr_get_level(PyObject *obj, void *closure)
10853 struct srvsvc_NetShareInfoCtr *object = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(obj);
10854 PyObject *py_level;
10855 py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
10859 static int py_srvsvc_NetShareInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
10861 struct srvsvc_NetShareInfoCtr *object = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_obj);
10862 if (value == NULL) {
10863 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
10867 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
10868 if (PyLong_Check(value)) {
10869 unsigned long long test_var;
10870 test_var = PyLong_AsUnsignedLongLong(value);
10871 if (PyErr_Occurred() != NULL) {
10874 if (test_var > uint_max) {
10875 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
10876 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
10879 object->level = test_var;
10880 } else if (PyInt_Check(value)) {
10882 test_var = PyInt_AsLong(value);
10883 if (test_var < 0 || test_var > uint_max) {
10884 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
10885 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
10888 object->level = test_var;
10890 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
10891 PyInt_Type.tp_name, PyLong_Type.tp_name);
10898 static PyObject *py_srvsvc_NetShareInfoCtr_get_ctr(PyObject *obj, void *closure)
10900 struct srvsvc_NetShareInfoCtr *object = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(obj);
10902 py_ctr = py_import_srvsvc_NetShareCtr(pytalloc_get_mem_ctx(obj), object->level, &object->ctr);
10903 if (py_ctr == NULL) {
10909 static int py_srvsvc_NetShareInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
10911 struct srvsvc_NetShareInfoCtr *object = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_obj);
10912 if (value == NULL) {
10913 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
10917 union srvsvc_NetShareCtr *ctr_switch_0;
10918 ctr_switch_0 = py_export_srvsvc_NetShareCtr(pytalloc_get_mem_ctx(py_obj), object->level, value);
10919 if (ctr_switch_0 == NULL) {
10922 object->ctr = *ctr_switch_0;
10927 static PyGetSetDef py_srvsvc_NetShareInfoCtr_getsetters[] = {
10929 .name = discard_const_p(char, "level"),
10930 .get = py_srvsvc_NetShareInfoCtr_get_level,
10931 .set = py_srvsvc_NetShareInfoCtr_set_level,
10932 .doc = discard_const_p(char, "PIDL-generated element level")
10935 .name = discard_const_p(char, "ctr"),
10936 .get = py_srvsvc_NetShareInfoCtr_get_ctr,
10937 .set = py_srvsvc_NetShareInfoCtr_set_ctr,
10938 .doc = discard_const_p(char, "PIDL-generated element ctr")
10943 static PyObject *py_srvsvc_NetShareInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10945 return pytalloc_new(struct srvsvc_NetShareInfoCtr, type);
10949 static PyTypeObject srvsvc_NetShareInfoCtr_Type = {
10950 PyObject_HEAD_INIT(NULL) 0,
10951 .tp_name = "srvsvc.NetShareInfoCtr",
10952 .tp_getset = py_srvsvc_NetShareInfoCtr_getsetters,
10953 .tp_methods = NULL,
10954 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
10955 .tp_new = py_srvsvc_NetShareInfoCtr_new,
10959 static PyObject *py_srvsvc_NetSrvInfo100_get_platform_id(PyObject *obj, void *closure)
10961 struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(obj);
10962 PyObject *py_platform_id;
10963 py_platform_id = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->platform_id);
10964 return py_platform_id;
10967 static int py_srvsvc_NetSrvInfo100_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
10969 struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
10970 if (value == NULL) {
10971 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->platform_id");
10975 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
10976 if (PyLong_Check(value)) {
10977 unsigned long long test_var;
10978 test_var = PyLong_AsUnsignedLongLong(value);
10979 if (PyErr_Occurred() != NULL) {
10982 if (test_var > uint_max) {
10983 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
10984 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
10987 object->platform_id = test_var;
10988 } else if (PyInt_Check(value)) {
10990 test_var = PyInt_AsLong(value);
10991 if (test_var < 0 || test_var > uint_max) {
10992 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
10993 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
10996 object->platform_id = test_var;
10998 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
10999 PyInt_Type.tp_name, PyLong_Type.tp_name);
11006 static PyObject *py_srvsvc_NetSrvInfo100_get_server_name(PyObject *obj, void *closure)
11008 struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(obj);
11009 PyObject *py_server_name;
11010 if (object->server_name == NULL) {
11011 py_server_name = Py_None;
11012 Py_INCREF(py_server_name);
11014 if (object->server_name == NULL) {
11015 py_server_name = Py_None;
11016 Py_INCREF(py_server_name);
11018 py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
11021 return py_server_name;
11024 static int py_srvsvc_NetSrvInfo100_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
11026 struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
11027 if (value == NULL) {
11028 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_name");
11031 if (value == Py_None) {
11032 object->server_name = NULL;
11034 object->server_name = NULL;
11035 if (value == NULL) {
11036 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->server_name");
11040 const char *test_str;
11041 const char *talloc_str;
11042 PyObject *unicode = NULL;
11043 if (PyUnicode_Check(value)) {
11044 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11045 if (unicode == NULL) {
11049 test_str = PyString_AS_STRING(unicode);
11050 } else if (PyString_Check(value)) {
11051 test_str = PyString_AS_STRING(value);
11053 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11056 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11057 if (unicode != NULL) {
11058 Py_DECREF(unicode);
11060 if (talloc_str == NULL) {
11064 object->server_name = talloc_str;
11070 static PyGetSetDef py_srvsvc_NetSrvInfo100_getsetters[] = {
11072 .name = discard_const_p(char, "platform_id"),
11073 .get = py_srvsvc_NetSrvInfo100_get_platform_id,
11074 .set = py_srvsvc_NetSrvInfo100_set_platform_id,
11075 .doc = discard_const_p(char, "PIDL-generated element platform_id")
11078 .name = discard_const_p(char, "server_name"),
11079 .get = py_srvsvc_NetSrvInfo100_get_server_name,
11080 .set = py_srvsvc_NetSrvInfo100_set_server_name,
11081 .doc = discard_const_p(char, "PIDL-generated element server_name")
11086 static PyObject *py_srvsvc_NetSrvInfo100_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11088 return pytalloc_new(struct srvsvc_NetSrvInfo100, type);
11091 static PyObject *py_srvsvc_NetSrvInfo100_ndr_pack(PyObject *py_obj)
11093 struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
11094 PyObject *ret = NULL;
11096 enum ndr_err_code err;
11097 TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
11098 if (tmp_ctx == NULL) {
11099 PyErr_SetNdrError(NDR_ERR_ALLOC);
11102 err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSrvInfo100);
11103 if (err != NDR_ERR_SUCCESS) {
11104 TALLOC_FREE(tmp_ctx);
11105 PyErr_SetNdrError(err);
11109 ret = PyString_FromStringAndSize((char *)blob.data, blob.length);
11110 TALLOC_FREE(tmp_ctx);
11114 static PyObject *py_srvsvc_NetSrvInfo100_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
11116 struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
11118 Py_ssize_t blob_length = 0;
11119 enum ndr_err_code err;
11120 const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
11121 PyObject *allow_remaining_obj = NULL;
11122 bool allow_remaining = false;
11124 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
11125 discard_const_p(char *, kwnames),
11126 &blob.data, &blob_length,
11127 &allow_remaining_obj)) {
11130 blob.length = blob_length;
11132 if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
11133 allow_remaining = true;
11136 if (allow_remaining) {
11137 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo100);
11139 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo100);
11141 if (err != NDR_ERR_SUCCESS) {
11142 PyErr_SetNdrError(err);
11149 static PyObject *py_srvsvc_NetSrvInfo100_ndr_print(PyObject *py_obj)
11151 struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
11155 retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_srvsvc_NetSrvInfo100, "srvsvc_NetSrvInfo100", object);
11156 ret = PyString_FromString(retstr);
11157 talloc_free(retstr);
11162 static PyMethodDef py_srvsvc_NetSrvInfo100_methods[] = {
11163 { "__ndr_pack__", (PyCFunction)py_srvsvc_NetSrvInfo100_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
11164 { "__ndr_unpack__", (PyCFunction)py_srvsvc_NetSrvInfo100_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
11165 { "__ndr_print__", (PyCFunction)py_srvsvc_NetSrvInfo100_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
11166 { NULL, NULL, 0, NULL }
11170 static PyTypeObject srvsvc_NetSrvInfo100_Type = {
11171 PyObject_HEAD_INIT(NULL) 0,
11172 .tp_name = "srvsvc.NetSrvInfo100",
11173 .tp_getset = py_srvsvc_NetSrvInfo100_getsetters,
11174 .tp_methods = py_srvsvc_NetSrvInfo100_methods,
11175 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11176 .tp_new = py_srvsvc_NetSrvInfo100_new,
11180 static PyObject *py_srvsvc_NetSrvInfo101_get_platform_id(PyObject *obj, void *closure)
11182 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
11183 PyObject *py_platform_id;
11184 py_platform_id = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->platform_id);
11185 return py_platform_id;
11188 static int py_srvsvc_NetSrvInfo101_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
11190 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
11191 if (value == NULL) {
11192 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->platform_id");
11196 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
11197 if (PyLong_Check(value)) {
11198 unsigned long long test_var;
11199 test_var = PyLong_AsUnsignedLongLong(value);
11200 if (PyErr_Occurred() != NULL) {
11203 if (test_var > uint_max) {
11204 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
11205 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11208 object->platform_id = test_var;
11209 } else if (PyInt_Check(value)) {
11211 test_var = PyInt_AsLong(value);
11212 if (test_var < 0 || test_var > uint_max) {
11213 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
11214 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11217 object->platform_id = test_var;
11219 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11220 PyInt_Type.tp_name, PyLong_Type.tp_name);
11227 static PyObject *py_srvsvc_NetSrvInfo101_get_server_name(PyObject *obj, void *closure)
11229 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
11230 PyObject *py_server_name;
11231 if (object->server_name == NULL) {
11232 py_server_name = Py_None;
11233 Py_INCREF(py_server_name);
11235 if (object->server_name == NULL) {
11236 py_server_name = Py_None;
11237 Py_INCREF(py_server_name);
11239 py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
11242 return py_server_name;
11245 static int py_srvsvc_NetSrvInfo101_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
11247 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
11248 if (value == NULL) {
11249 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_name");
11252 if (value == Py_None) {
11253 object->server_name = NULL;
11255 object->server_name = NULL;
11256 if (value == NULL) {
11257 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->server_name");
11261 const char *test_str;
11262 const char *talloc_str;
11263 PyObject *unicode = NULL;
11264 if (PyUnicode_Check(value)) {
11265 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11266 if (unicode == NULL) {
11270 test_str = PyString_AS_STRING(unicode);
11271 } else if (PyString_Check(value)) {
11272 test_str = PyString_AS_STRING(value);
11274 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11277 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11278 if (unicode != NULL) {
11279 Py_DECREF(unicode);
11281 if (talloc_str == NULL) {
11285 object->server_name = talloc_str;
11291 static PyObject *py_srvsvc_NetSrvInfo101_get_version_major(PyObject *obj, void *closure)
11293 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
11294 PyObject *py_version_major;
11295 py_version_major = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->version_major);
11296 return py_version_major;
11299 static int py_srvsvc_NetSrvInfo101_set_version_major(PyObject *py_obj, PyObject *value, void *closure)
11301 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
11302 if (value == NULL) {
11303 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version_major");
11307 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_major));
11308 if (PyLong_Check(value)) {
11309 unsigned long long test_var;
11310 test_var = PyLong_AsUnsignedLongLong(value);
11311 if (PyErr_Occurred() != NULL) {
11314 if (test_var > uint_max) {
11315 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
11316 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11319 object->version_major = test_var;
11320 } else if (PyInt_Check(value)) {
11322 test_var = PyInt_AsLong(value);
11323 if (test_var < 0 || test_var > uint_max) {
11324 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
11325 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11328 object->version_major = test_var;
11330 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11331 PyInt_Type.tp_name, PyLong_Type.tp_name);
11338 static PyObject *py_srvsvc_NetSrvInfo101_get_version_minor(PyObject *obj, void *closure)
11340 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
11341 PyObject *py_version_minor;
11342 py_version_minor = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->version_minor);
11343 return py_version_minor;
11346 static int py_srvsvc_NetSrvInfo101_set_version_minor(PyObject *py_obj, PyObject *value, void *closure)
11348 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
11349 if (value == NULL) {
11350 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version_minor");
11354 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_minor));
11355 if (PyLong_Check(value)) {
11356 unsigned long long test_var;
11357 test_var = PyLong_AsUnsignedLongLong(value);
11358 if (PyErr_Occurred() != NULL) {
11361 if (test_var > uint_max) {
11362 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
11363 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11366 object->version_minor = test_var;
11367 } else if (PyInt_Check(value)) {
11369 test_var = PyInt_AsLong(value);
11370 if (test_var < 0 || test_var > uint_max) {
11371 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
11372 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11375 object->version_minor = test_var;
11377 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11378 PyInt_Type.tp_name, PyLong_Type.tp_name);
11385 static PyObject *py_srvsvc_NetSrvInfo101_get_server_type(PyObject *obj, void *closure)
11387 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
11388 PyObject *py_server_type;
11389 py_server_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->server_type);
11390 return py_server_type;
11393 static int py_srvsvc_NetSrvInfo101_set_server_type(PyObject *py_obj, PyObject *value, void *closure)
11395 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
11396 if (value == NULL) {
11397 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_type");
11401 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->server_type));
11402 if (PyLong_Check(value)) {
11403 unsigned long long test_var;
11404 test_var = PyLong_AsUnsignedLongLong(value);
11405 if (PyErr_Occurred() != NULL) {
11408 if (test_var > uint_max) {
11409 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
11410 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11413 object->server_type = test_var;
11414 } else if (PyInt_Check(value)) {
11416 test_var = PyInt_AsLong(value);
11417 if (test_var < 0 || test_var > uint_max) {
11418 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
11419 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11422 object->server_type = test_var;
11424 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11425 PyInt_Type.tp_name, PyLong_Type.tp_name);
11432 static PyObject *py_srvsvc_NetSrvInfo101_get_comment(PyObject *obj, void *closure)
11434 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
11435 PyObject *py_comment;
11436 if (object->comment == NULL) {
11437 py_comment = Py_None;
11438 Py_INCREF(py_comment);
11440 if (object->comment == NULL) {
11441 py_comment = Py_None;
11442 Py_INCREF(py_comment);
11444 py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
11450 static int py_srvsvc_NetSrvInfo101_set_comment(PyObject *py_obj, PyObject *value, void *closure)
11452 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
11453 if (value == NULL) {
11454 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
11457 if (value == Py_None) {
11458 object->comment = NULL;
11460 object->comment = NULL;
11461 if (value == NULL) {
11462 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->comment");
11466 const char *test_str;
11467 const char *talloc_str;
11468 PyObject *unicode = NULL;
11469 if (PyUnicode_Check(value)) {
11470 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11471 if (unicode == NULL) {
11475 test_str = PyString_AS_STRING(unicode);
11476 } else if (PyString_Check(value)) {
11477 test_str = PyString_AS_STRING(value);
11479 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11482 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11483 if (unicode != NULL) {
11484 Py_DECREF(unicode);
11486 if (talloc_str == NULL) {
11490 object->comment = talloc_str;
11496 static PyGetSetDef py_srvsvc_NetSrvInfo101_getsetters[] = {
11498 .name = discard_const_p(char, "platform_id"),
11499 .get = py_srvsvc_NetSrvInfo101_get_platform_id,
11500 .set = py_srvsvc_NetSrvInfo101_set_platform_id,
11501 .doc = discard_const_p(char, "PIDL-generated element platform_id")
11504 .name = discard_const_p(char, "server_name"),
11505 .get = py_srvsvc_NetSrvInfo101_get_server_name,
11506 .set = py_srvsvc_NetSrvInfo101_set_server_name,
11507 .doc = discard_const_p(char, "PIDL-generated element server_name")
11510 .name = discard_const_p(char, "version_major"),
11511 .get = py_srvsvc_NetSrvInfo101_get_version_major,
11512 .set = py_srvsvc_NetSrvInfo101_set_version_major,
11513 .doc = discard_const_p(char, "PIDL-generated element version_major")
11516 .name = discard_const_p(char, "version_minor"),
11517 .get = py_srvsvc_NetSrvInfo101_get_version_minor,
11518 .set = py_srvsvc_NetSrvInfo101_set_version_minor,
11519 .doc = discard_const_p(char, "PIDL-generated element version_minor")
11522 .name = discard_const_p(char, "server_type"),
11523 .get = py_srvsvc_NetSrvInfo101_get_server_type,
11524 .set = py_srvsvc_NetSrvInfo101_set_server_type,
11525 .doc = discard_const_p(char, "PIDL-generated element server_type")
11528 .name = discard_const_p(char, "comment"),
11529 .get = py_srvsvc_NetSrvInfo101_get_comment,
11530 .set = py_srvsvc_NetSrvInfo101_set_comment,
11531 .doc = discard_const_p(char, "PIDL-generated element comment")
11536 static PyObject *py_srvsvc_NetSrvInfo101_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11538 return pytalloc_new(struct srvsvc_NetSrvInfo101, type);
11541 static PyObject *py_srvsvc_NetSrvInfo101_ndr_pack(PyObject *py_obj)
11543 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
11544 PyObject *ret = NULL;
11546 enum ndr_err_code err;
11547 TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
11548 if (tmp_ctx == NULL) {
11549 PyErr_SetNdrError(NDR_ERR_ALLOC);
11552 err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSrvInfo101);
11553 if (err != NDR_ERR_SUCCESS) {
11554 TALLOC_FREE(tmp_ctx);
11555 PyErr_SetNdrError(err);
11559 ret = PyString_FromStringAndSize((char *)blob.data, blob.length);
11560 TALLOC_FREE(tmp_ctx);
11564 static PyObject *py_srvsvc_NetSrvInfo101_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
11566 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
11568 Py_ssize_t blob_length = 0;
11569 enum ndr_err_code err;
11570 const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
11571 PyObject *allow_remaining_obj = NULL;
11572 bool allow_remaining = false;
11574 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
11575 discard_const_p(char *, kwnames),
11576 &blob.data, &blob_length,
11577 &allow_remaining_obj)) {
11580 blob.length = blob_length;
11582 if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
11583 allow_remaining = true;
11586 if (allow_remaining) {
11587 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo101);
11589 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo101);
11591 if (err != NDR_ERR_SUCCESS) {
11592 PyErr_SetNdrError(err);
11599 static PyObject *py_srvsvc_NetSrvInfo101_ndr_print(PyObject *py_obj)
11601 struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
11605 retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_srvsvc_NetSrvInfo101, "srvsvc_NetSrvInfo101", object);
11606 ret = PyString_FromString(retstr);
11607 talloc_free(retstr);
11612 static PyMethodDef py_srvsvc_NetSrvInfo101_methods[] = {
11613 { "__ndr_pack__", (PyCFunction)py_srvsvc_NetSrvInfo101_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
11614 { "__ndr_unpack__", (PyCFunction)py_srvsvc_NetSrvInfo101_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
11615 { "__ndr_print__", (PyCFunction)py_srvsvc_NetSrvInfo101_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
11616 { NULL, NULL, 0, NULL }
11620 static PyTypeObject srvsvc_NetSrvInfo101_Type = {
11621 PyObject_HEAD_INIT(NULL) 0,
11622 .tp_name = "srvsvc.NetSrvInfo101",
11623 .tp_getset = py_srvsvc_NetSrvInfo101_getsetters,
11624 .tp_methods = py_srvsvc_NetSrvInfo101_methods,
11625 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11626 .tp_new = py_srvsvc_NetSrvInfo101_new,
11630 static PyObject *py_srvsvc_NetSrvInfo102_get_platform_id(PyObject *obj, void *closure)
11632 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
11633 PyObject *py_platform_id;
11634 py_platform_id = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->platform_id);
11635 return py_platform_id;
11638 static int py_srvsvc_NetSrvInfo102_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
11640 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
11641 if (value == NULL) {
11642 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->platform_id");
11646 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
11647 if (PyLong_Check(value)) {
11648 unsigned long long test_var;
11649 test_var = PyLong_AsUnsignedLongLong(value);
11650 if (PyErr_Occurred() != NULL) {
11653 if (test_var > uint_max) {
11654 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
11655 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11658 object->platform_id = test_var;
11659 } else if (PyInt_Check(value)) {
11661 test_var = PyInt_AsLong(value);
11662 if (test_var < 0 || test_var > uint_max) {
11663 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
11664 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11667 object->platform_id = test_var;
11669 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11670 PyInt_Type.tp_name, PyLong_Type.tp_name);
11677 static PyObject *py_srvsvc_NetSrvInfo102_get_server_name(PyObject *obj, void *closure)
11679 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
11680 PyObject *py_server_name;
11681 if (object->server_name == NULL) {
11682 py_server_name = Py_None;
11683 Py_INCREF(py_server_name);
11685 if (object->server_name == NULL) {
11686 py_server_name = Py_None;
11687 Py_INCREF(py_server_name);
11689 py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
11692 return py_server_name;
11695 static int py_srvsvc_NetSrvInfo102_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
11697 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
11698 if (value == NULL) {
11699 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_name");
11702 if (value == Py_None) {
11703 object->server_name = NULL;
11705 object->server_name = NULL;
11706 if (value == NULL) {
11707 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->server_name");
11711 const char *test_str;
11712 const char *talloc_str;
11713 PyObject *unicode = NULL;
11714 if (PyUnicode_Check(value)) {
11715 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11716 if (unicode == NULL) {
11720 test_str = PyString_AS_STRING(unicode);
11721 } else if (PyString_Check(value)) {
11722 test_str = PyString_AS_STRING(value);
11724 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11727 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11728 if (unicode != NULL) {
11729 Py_DECREF(unicode);
11731 if (talloc_str == NULL) {
11735 object->server_name = talloc_str;
11741 static PyObject *py_srvsvc_NetSrvInfo102_get_version_major(PyObject *obj, void *closure)
11743 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
11744 PyObject *py_version_major;
11745 py_version_major = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->version_major);
11746 return py_version_major;
11749 static int py_srvsvc_NetSrvInfo102_set_version_major(PyObject *py_obj, PyObject *value, void *closure)
11751 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
11752 if (value == NULL) {
11753 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version_major");
11757 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_major));
11758 if (PyLong_Check(value)) {
11759 unsigned long long test_var;
11760 test_var = PyLong_AsUnsignedLongLong(value);
11761 if (PyErr_Occurred() != NULL) {
11764 if (test_var > uint_max) {
11765 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
11766 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11769 object->version_major = test_var;
11770 } else if (PyInt_Check(value)) {
11772 test_var = PyInt_AsLong(value);
11773 if (test_var < 0 || test_var > uint_max) {
11774 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
11775 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11778 object->version_major = test_var;
11780 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11781 PyInt_Type.tp_name, PyLong_Type.tp_name);
11788 static PyObject *py_srvsvc_NetSrvInfo102_get_version_minor(PyObject *obj, void *closure)
11790 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
11791 PyObject *py_version_minor;
11792 py_version_minor = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->version_minor);
11793 return py_version_minor;
11796 static int py_srvsvc_NetSrvInfo102_set_version_minor(PyObject *py_obj, PyObject *value, void *closure)
11798 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
11799 if (value == NULL) {
11800 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version_minor");
11804 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_minor));
11805 if (PyLong_Check(value)) {
11806 unsigned long long test_var;
11807 test_var = PyLong_AsUnsignedLongLong(value);
11808 if (PyErr_Occurred() != NULL) {
11811 if (test_var > uint_max) {
11812 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
11813 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11816 object->version_minor = test_var;
11817 } else if (PyInt_Check(value)) {
11819 test_var = PyInt_AsLong(value);
11820 if (test_var < 0 || test_var > uint_max) {
11821 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
11822 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11825 object->version_minor = test_var;
11827 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11828 PyInt_Type.tp_name, PyLong_Type.tp_name);
11835 static PyObject *py_srvsvc_NetSrvInfo102_get_server_type(PyObject *obj, void *closure)
11837 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
11838 PyObject *py_server_type;
11839 py_server_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->server_type);
11840 return py_server_type;
11843 static int py_srvsvc_NetSrvInfo102_set_server_type(PyObject *py_obj, PyObject *value, void *closure)
11845 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
11846 if (value == NULL) {
11847 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_type");
11851 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->server_type));
11852 if (PyLong_Check(value)) {
11853 unsigned long long test_var;
11854 test_var = PyLong_AsUnsignedLongLong(value);
11855 if (PyErr_Occurred() != NULL) {
11858 if (test_var > uint_max) {
11859 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
11860 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11863 object->server_type = test_var;
11864 } else if (PyInt_Check(value)) {
11866 test_var = PyInt_AsLong(value);
11867 if (test_var < 0 || test_var > uint_max) {
11868 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
11869 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11872 object->server_type = test_var;
11874 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11875 PyInt_Type.tp_name, PyLong_Type.tp_name);
11882 static PyObject *py_srvsvc_NetSrvInfo102_get_comment(PyObject *obj, void *closure)
11884 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
11885 PyObject *py_comment;
11886 if (object->comment == NULL) {
11887 py_comment = Py_None;
11888 Py_INCREF(py_comment);
11890 if (object->comment == NULL) {
11891 py_comment = Py_None;
11892 Py_INCREF(py_comment);
11894 py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
11900 static int py_srvsvc_NetSrvInfo102_set_comment(PyObject *py_obj, PyObject *value, void *closure)
11902 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
11903 if (value == NULL) {
11904 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
11907 if (value == Py_None) {
11908 object->comment = NULL;
11910 object->comment = NULL;
11911 if (value == NULL) {
11912 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->comment");
11916 const char *test_str;
11917 const char *talloc_str;
11918 PyObject *unicode = NULL;
11919 if (PyUnicode_Check(value)) {
11920 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11921 if (unicode == NULL) {
11925 test_str = PyString_AS_STRING(unicode);
11926 } else if (PyString_Check(value)) {
11927 test_str = PyString_AS_STRING(value);
11929 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11932 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11933 if (unicode != NULL) {
11934 Py_DECREF(unicode);
11936 if (talloc_str == NULL) {
11940 object->comment = talloc_str;
11946 static PyObject *py_srvsvc_NetSrvInfo102_get_users(PyObject *obj, void *closure)
11948 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
11949 PyObject *py_users;
11950 py_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->users);
11954 static int py_srvsvc_NetSrvInfo102_set_users(PyObject *py_obj, PyObject *value, void *closure)
11956 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
11957 if (value == NULL) {
11958 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->users");
11962 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
11963 if (PyLong_Check(value)) {
11964 unsigned long long test_var;
11965 test_var = PyLong_AsUnsignedLongLong(value);
11966 if (PyErr_Occurred() != NULL) {
11969 if (test_var > uint_max) {
11970 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
11971 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11974 object->users = test_var;
11975 } else if (PyInt_Check(value)) {
11977 test_var = PyInt_AsLong(value);
11978 if (test_var < 0 || test_var > uint_max) {
11979 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
11980 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
11983 object->users = test_var;
11985 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11986 PyInt_Type.tp_name, PyLong_Type.tp_name);
11993 static PyObject *py_srvsvc_NetSrvInfo102_get_disc(PyObject *obj, void *closure)
11995 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
11997 py_disc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->disc);
12001 static int py_srvsvc_NetSrvInfo102_set_disc(PyObject *py_obj, PyObject *value, void *closure)
12003 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
12004 if (value == NULL) {
12005 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->disc");
12009 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->disc));
12010 if (PyLong_Check(value)) {
12011 unsigned long long test_var;
12012 test_var = PyLong_AsUnsignedLongLong(value);
12013 if (PyErr_Occurred() != NULL) {
12016 if (test_var > uint_max) {
12017 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12018 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12021 object->disc = test_var;
12022 } else if (PyInt_Check(value)) {
12024 test_var = PyInt_AsLong(value);
12025 if (test_var < 0 || test_var > uint_max) {
12026 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12027 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12030 object->disc = test_var;
12032 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12033 PyInt_Type.tp_name, PyLong_Type.tp_name);
12040 static PyObject *py_srvsvc_NetSrvInfo102_get_hidden(PyObject *obj, void *closure)
12042 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
12043 PyObject *py_hidden;
12044 py_hidden = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->hidden);
12048 static int py_srvsvc_NetSrvInfo102_set_hidden(PyObject *py_obj, PyObject *value, void *closure)
12050 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
12051 if (value == NULL) {
12052 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hidden");
12056 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hidden));
12057 if (PyLong_Check(value)) {
12058 unsigned long long test_var;
12059 test_var = PyLong_AsUnsignedLongLong(value);
12060 if (PyErr_Occurred() != NULL) {
12063 if (test_var > uint_max) {
12064 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12065 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12068 object->hidden = test_var;
12069 } else if (PyInt_Check(value)) {
12071 test_var = PyInt_AsLong(value);
12072 if (test_var < 0 || test_var > uint_max) {
12073 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12074 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12077 object->hidden = test_var;
12079 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12080 PyInt_Type.tp_name, PyLong_Type.tp_name);
12087 static PyObject *py_srvsvc_NetSrvInfo102_get_announce(PyObject *obj, void *closure)
12089 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
12090 PyObject *py_announce;
12091 py_announce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->announce);
12092 return py_announce;
12095 static int py_srvsvc_NetSrvInfo102_set_announce(PyObject *py_obj, PyObject *value, void *closure)
12097 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
12098 if (value == NULL) {
12099 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->announce");
12103 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->announce));
12104 if (PyLong_Check(value)) {
12105 unsigned long long test_var;
12106 test_var = PyLong_AsUnsignedLongLong(value);
12107 if (PyErr_Occurred() != NULL) {
12110 if (test_var > uint_max) {
12111 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12112 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12115 object->announce = test_var;
12116 } else if (PyInt_Check(value)) {
12118 test_var = PyInt_AsLong(value);
12119 if (test_var < 0 || test_var > uint_max) {
12120 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12121 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12124 object->announce = test_var;
12126 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12127 PyInt_Type.tp_name, PyLong_Type.tp_name);
12134 static PyObject *py_srvsvc_NetSrvInfo102_get_anndelta(PyObject *obj, void *closure)
12136 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
12137 PyObject *py_anndelta;
12138 py_anndelta = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->anndelta);
12139 return py_anndelta;
12142 static int py_srvsvc_NetSrvInfo102_set_anndelta(PyObject *py_obj, PyObject *value, void *closure)
12144 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
12145 if (value == NULL) {
12146 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->anndelta");
12150 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->anndelta));
12151 if (PyLong_Check(value)) {
12152 unsigned long long test_var;
12153 test_var = PyLong_AsUnsignedLongLong(value);
12154 if (PyErr_Occurred() != NULL) {
12157 if (test_var > uint_max) {
12158 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12159 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12162 object->anndelta = test_var;
12163 } else if (PyInt_Check(value)) {
12165 test_var = PyInt_AsLong(value);
12166 if (test_var < 0 || test_var > uint_max) {
12167 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12168 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12171 object->anndelta = test_var;
12173 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12174 PyInt_Type.tp_name, PyLong_Type.tp_name);
12181 static PyObject *py_srvsvc_NetSrvInfo102_get_licenses(PyObject *obj, void *closure)
12183 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
12184 PyObject *py_licenses;
12185 py_licenses = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->licenses);
12186 return py_licenses;
12189 static int py_srvsvc_NetSrvInfo102_set_licenses(PyObject *py_obj, PyObject *value, void *closure)
12191 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
12192 if (value == NULL) {
12193 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->licenses");
12197 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->licenses));
12198 if (PyLong_Check(value)) {
12199 unsigned long long test_var;
12200 test_var = PyLong_AsUnsignedLongLong(value);
12201 if (PyErr_Occurred() != NULL) {
12204 if (test_var > uint_max) {
12205 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12206 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12209 object->licenses = test_var;
12210 } else if (PyInt_Check(value)) {
12212 test_var = PyInt_AsLong(value);
12213 if (test_var < 0 || test_var > uint_max) {
12214 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12215 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12218 object->licenses = test_var;
12220 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12221 PyInt_Type.tp_name, PyLong_Type.tp_name);
12228 static PyObject *py_srvsvc_NetSrvInfo102_get_userpath(PyObject *obj, void *closure)
12230 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
12231 PyObject *py_userpath;
12232 if (object->userpath == NULL) {
12233 py_userpath = Py_None;
12234 Py_INCREF(py_userpath);
12236 if (object->userpath == NULL) {
12237 py_userpath = Py_None;
12238 Py_INCREF(py_userpath);
12240 py_userpath = PyUnicode_Decode(object->userpath, strlen(object->userpath), "utf-8", "ignore");
12243 return py_userpath;
12246 static int py_srvsvc_NetSrvInfo102_set_userpath(PyObject *py_obj, PyObject *value, void *closure)
12248 struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
12249 if (value == NULL) {
12250 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->userpath");
12253 if (value == Py_None) {
12254 object->userpath = NULL;
12256 object->userpath = NULL;
12257 if (value == NULL) {
12258 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->userpath");
12262 const char *test_str;
12263 const char *talloc_str;
12264 PyObject *unicode = NULL;
12265 if (PyUnicode_Check(value)) {
12266 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12267 if (unicode == NULL) {
12271 test_str = PyString_AS_STRING(unicode);
12272 } else if (PyString_Check(value)) {
12273 test_str = PyString_AS_STRING(value);
12275 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12278 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12279 if (unicode != NULL) {
12280 Py_DECREF(unicode);
12282 if (talloc_str == NULL) {
12286 object->userpath = talloc_str;
12292 static PyGetSetDef py_srvsvc_NetSrvInfo102_getsetters[] = {
12294 .name = discard_const_p(char, "platform_id"),
12295 .get = py_srvsvc_NetSrvInfo102_get_platform_id,
12296 .set = py_srvsvc_NetSrvInfo102_set_platform_id,
12297 .doc = discard_const_p(char, "PIDL-generated element platform_id")
12300 .name = discard_const_p(char, "server_name"),
12301 .get = py_srvsvc_NetSrvInfo102_get_server_name,
12302 .set = py_srvsvc_NetSrvInfo102_set_server_name,
12303 .doc = discard_const_p(char, "PIDL-generated element server_name")
12306 .name = discard_const_p(char, "version_major"),
12307 .get = py_srvsvc_NetSrvInfo102_get_version_major,
12308 .set = py_srvsvc_NetSrvInfo102_set_version_major,
12309 .doc = discard_const_p(char, "PIDL-generated element version_major")
12312 .name = discard_const_p(char, "version_minor"),
12313 .get = py_srvsvc_NetSrvInfo102_get_version_minor,
12314 .set = py_srvsvc_NetSrvInfo102_set_version_minor,
12315 .doc = discard_const_p(char, "PIDL-generated element version_minor")
12318 .name = discard_const_p(char, "server_type"),
12319 .get = py_srvsvc_NetSrvInfo102_get_server_type,
12320 .set = py_srvsvc_NetSrvInfo102_set_server_type,
12321 .doc = discard_const_p(char, "PIDL-generated element server_type")
12324 .name = discard_const_p(char, "comment"),
12325 .get = py_srvsvc_NetSrvInfo102_get_comment,
12326 .set = py_srvsvc_NetSrvInfo102_set_comment,
12327 .doc = discard_const_p(char, "PIDL-generated element comment")
12330 .name = discard_const_p(char, "users"),
12331 .get = py_srvsvc_NetSrvInfo102_get_users,
12332 .set = py_srvsvc_NetSrvInfo102_set_users,
12333 .doc = discard_const_p(char, "PIDL-generated element users")
12336 .name = discard_const_p(char, "disc"),
12337 .get = py_srvsvc_NetSrvInfo102_get_disc,
12338 .set = py_srvsvc_NetSrvInfo102_set_disc,
12339 .doc = discard_const_p(char, "PIDL-generated element disc")
12342 .name = discard_const_p(char, "hidden"),
12343 .get = py_srvsvc_NetSrvInfo102_get_hidden,
12344 .set = py_srvsvc_NetSrvInfo102_set_hidden,
12345 .doc = discard_const_p(char, "PIDL-generated element hidden")
12348 .name = discard_const_p(char, "announce"),
12349 .get = py_srvsvc_NetSrvInfo102_get_announce,
12350 .set = py_srvsvc_NetSrvInfo102_set_announce,
12351 .doc = discard_const_p(char, "PIDL-generated element announce")
12354 .name = discard_const_p(char, "anndelta"),
12355 .get = py_srvsvc_NetSrvInfo102_get_anndelta,
12356 .set = py_srvsvc_NetSrvInfo102_set_anndelta,
12357 .doc = discard_const_p(char, "PIDL-generated element anndelta")
12360 .name = discard_const_p(char, "licenses"),
12361 .get = py_srvsvc_NetSrvInfo102_get_licenses,
12362 .set = py_srvsvc_NetSrvInfo102_set_licenses,
12363 .doc = discard_const_p(char, "PIDL-generated element licenses")
12366 .name = discard_const_p(char, "userpath"),
12367 .get = py_srvsvc_NetSrvInfo102_get_userpath,
12368 .set = py_srvsvc_NetSrvInfo102_set_userpath,
12369 .doc = discard_const_p(char, "PIDL-generated element userpath")
12374 static PyObject *py_srvsvc_NetSrvInfo102_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12376 return pytalloc_new(struct srvsvc_NetSrvInfo102, type);
12380 static PyTypeObject srvsvc_NetSrvInfo102_Type = {
12381 PyObject_HEAD_INIT(NULL) 0,
12382 .tp_name = "srvsvc.NetSrvInfo102",
12383 .tp_getset = py_srvsvc_NetSrvInfo102_getsetters,
12384 .tp_methods = NULL,
12385 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12386 .tp_new = py_srvsvc_NetSrvInfo102_new,
12390 static PyObject *py_srvsvc_NetSrvInfo402_get_ulist_mtime(PyObject *obj, void *closure)
12392 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12393 PyObject *py_ulist_mtime;
12394 py_ulist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->ulist_mtime);
12395 return py_ulist_mtime;
12398 static int py_srvsvc_NetSrvInfo402_set_ulist_mtime(PyObject *py_obj, PyObject *value, void *closure)
12400 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12401 if (value == NULL) {
12402 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ulist_mtime");
12406 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ulist_mtime));
12407 if (PyLong_Check(value)) {
12408 unsigned long long test_var;
12409 test_var = PyLong_AsUnsignedLongLong(value);
12410 if (PyErr_Occurred() != NULL) {
12413 if (test_var > uint_max) {
12414 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12415 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12418 object->ulist_mtime = test_var;
12419 } else if (PyInt_Check(value)) {
12421 test_var = PyInt_AsLong(value);
12422 if (test_var < 0 || test_var > uint_max) {
12423 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12424 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12427 object->ulist_mtime = test_var;
12429 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12430 PyInt_Type.tp_name, PyLong_Type.tp_name);
12437 static PyObject *py_srvsvc_NetSrvInfo402_get_glist_mtime(PyObject *obj, void *closure)
12439 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12440 PyObject *py_glist_mtime;
12441 py_glist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->glist_mtime);
12442 return py_glist_mtime;
12445 static int py_srvsvc_NetSrvInfo402_set_glist_mtime(PyObject *py_obj, PyObject *value, void *closure)
12447 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12448 if (value == NULL) {
12449 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->glist_mtime");
12453 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->glist_mtime));
12454 if (PyLong_Check(value)) {
12455 unsigned long long test_var;
12456 test_var = PyLong_AsUnsignedLongLong(value);
12457 if (PyErr_Occurred() != NULL) {
12460 if (test_var > uint_max) {
12461 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12462 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12465 object->glist_mtime = test_var;
12466 } else if (PyInt_Check(value)) {
12468 test_var = PyInt_AsLong(value);
12469 if (test_var < 0 || test_var > uint_max) {
12470 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12471 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12474 object->glist_mtime = test_var;
12476 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12477 PyInt_Type.tp_name, PyLong_Type.tp_name);
12484 static PyObject *py_srvsvc_NetSrvInfo402_get_alist_mtime(PyObject *obj, void *closure)
12486 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12487 PyObject *py_alist_mtime;
12488 py_alist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alist_mtime);
12489 return py_alist_mtime;
12492 static int py_srvsvc_NetSrvInfo402_set_alist_mtime(PyObject *py_obj, PyObject *value, void *closure)
12494 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12495 if (value == NULL) {
12496 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alist_mtime");
12500 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alist_mtime));
12501 if (PyLong_Check(value)) {
12502 unsigned long long test_var;
12503 test_var = PyLong_AsUnsignedLongLong(value);
12504 if (PyErr_Occurred() != NULL) {
12507 if (test_var > uint_max) {
12508 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12509 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12512 object->alist_mtime = test_var;
12513 } else if (PyInt_Check(value)) {
12515 test_var = PyInt_AsLong(value);
12516 if (test_var < 0 || test_var > uint_max) {
12517 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12518 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12521 object->alist_mtime = test_var;
12523 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12524 PyInt_Type.tp_name, PyLong_Type.tp_name);
12531 static PyObject *py_srvsvc_NetSrvInfo402_get_alerts(PyObject *obj, void *closure)
12533 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12534 PyObject *py_alerts;
12535 if (object->alerts == NULL) {
12536 py_alerts = Py_None;
12537 Py_INCREF(py_alerts);
12539 if (object->alerts == NULL) {
12540 py_alerts = Py_None;
12541 Py_INCREF(py_alerts);
12543 py_alerts = PyUnicode_Decode(object->alerts, strlen(object->alerts), "utf-8", "ignore");
12549 static int py_srvsvc_NetSrvInfo402_set_alerts(PyObject *py_obj, PyObject *value, void *closure)
12551 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12552 if (value == NULL) {
12553 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alerts");
12556 if (value == Py_None) {
12557 object->alerts = NULL;
12559 object->alerts = NULL;
12560 if (value == NULL) {
12561 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->alerts");
12565 const char *test_str;
12566 const char *talloc_str;
12567 PyObject *unicode = NULL;
12568 if (PyUnicode_Check(value)) {
12569 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12570 if (unicode == NULL) {
12574 test_str = PyString_AS_STRING(unicode);
12575 } else if (PyString_Check(value)) {
12576 test_str = PyString_AS_STRING(value);
12578 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12581 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12582 if (unicode != NULL) {
12583 Py_DECREF(unicode);
12585 if (talloc_str == NULL) {
12589 object->alerts = talloc_str;
12595 static PyObject *py_srvsvc_NetSrvInfo402_get_security(PyObject *obj, void *closure)
12597 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12598 PyObject *py_security;
12599 py_security = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->security);
12600 return py_security;
12603 static int py_srvsvc_NetSrvInfo402_set_security(PyObject *py_obj, PyObject *value, void *closure)
12605 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12606 if (value == NULL) {
12607 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->security");
12611 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->security));
12612 if (PyLong_Check(value)) {
12613 unsigned long long test_var;
12614 test_var = PyLong_AsUnsignedLongLong(value);
12615 if (PyErr_Occurred() != NULL) {
12618 if (test_var > uint_max) {
12619 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12620 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12623 object->security = test_var;
12624 } else if (PyInt_Check(value)) {
12626 test_var = PyInt_AsLong(value);
12627 if (test_var < 0 || test_var > uint_max) {
12628 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12629 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12632 object->security = test_var;
12634 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12635 PyInt_Type.tp_name, PyLong_Type.tp_name);
12642 static PyObject *py_srvsvc_NetSrvInfo402_get_numadmin(PyObject *obj, void *closure)
12644 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12645 PyObject *py_numadmin;
12646 py_numadmin = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numadmin);
12647 return py_numadmin;
12650 static int py_srvsvc_NetSrvInfo402_set_numadmin(PyObject *py_obj, PyObject *value, void *closure)
12652 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12653 if (value == NULL) {
12654 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numadmin");
12658 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numadmin));
12659 if (PyLong_Check(value)) {
12660 unsigned long long test_var;
12661 test_var = PyLong_AsUnsignedLongLong(value);
12662 if (PyErr_Occurred() != NULL) {
12665 if (test_var > uint_max) {
12666 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12667 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12670 object->numadmin = test_var;
12671 } else if (PyInt_Check(value)) {
12673 test_var = PyInt_AsLong(value);
12674 if (test_var < 0 || test_var > uint_max) {
12675 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12676 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12679 object->numadmin = test_var;
12681 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12682 PyInt_Type.tp_name, PyLong_Type.tp_name);
12689 static PyObject *py_srvsvc_NetSrvInfo402_get_lanmask(PyObject *obj, void *closure)
12691 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12692 PyObject *py_lanmask;
12693 py_lanmask = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lanmask);
12697 static int py_srvsvc_NetSrvInfo402_set_lanmask(PyObject *py_obj, PyObject *value, void *closure)
12699 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12700 if (value == NULL) {
12701 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lanmask");
12705 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lanmask));
12706 if (PyLong_Check(value)) {
12707 unsigned long long test_var;
12708 test_var = PyLong_AsUnsignedLongLong(value);
12709 if (PyErr_Occurred() != NULL) {
12712 if (test_var > uint_max) {
12713 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12714 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12717 object->lanmask = test_var;
12718 } else if (PyInt_Check(value)) {
12720 test_var = PyInt_AsLong(value);
12721 if (test_var < 0 || test_var > uint_max) {
12722 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12723 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12726 object->lanmask = test_var;
12728 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12729 PyInt_Type.tp_name, PyLong_Type.tp_name);
12736 static PyObject *py_srvsvc_NetSrvInfo402_get_guestaccount(PyObject *obj, void *closure)
12738 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12739 PyObject *py_guestaccount;
12740 if (object->guestaccount == NULL) {
12741 py_guestaccount = Py_None;
12742 Py_INCREF(py_guestaccount);
12744 if (object->guestaccount == NULL) {
12745 py_guestaccount = Py_None;
12746 Py_INCREF(py_guestaccount);
12748 py_guestaccount = PyUnicode_Decode(object->guestaccount, strlen(object->guestaccount), "utf-8", "ignore");
12751 return py_guestaccount;
12754 static int py_srvsvc_NetSrvInfo402_set_guestaccount(PyObject *py_obj, PyObject *value, void *closure)
12756 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12757 if (value == NULL) {
12758 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guestaccount");
12761 if (value == Py_None) {
12762 object->guestaccount = NULL;
12764 object->guestaccount = NULL;
12765 if (value == NULL) {
12766 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->guestaccount");
12770 const char *test_str;
12771 const char *talloc_str;
12772 PyObject *unicode = NULL;
12773 if (PyUnicode_Check(value)) {
12774 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12775 if (unicode == NULL) {
12779 test_str = PyString_AS_STRING(unicode);
12780 } else if (PyString_Check(value)) {
12781 test_str = PyString_AS_STRING(value);
12783 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12786 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12787 if (unicode != NULL) {
12788 Py_DECREF(unicode);
12790 if (talloc_str == NULL) {
12794 object->guestaccount = talloc_str;
12800 static PyObject *py_srvsvc_NetSrvInfo402_get_chdevs(PyObject *obj, void *closure)
12802 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12803 PyObject *py_chdevs;
12804 py_chdevs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevs);
12808 static int py_srvsvc_NetSrvInfo402_set_chdevs(PyObject *py_obj, PyObject *value, void *closure)
12810 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12811 if (value == NULL) {
12812 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevs");
12816 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevs));
12817 if (PyLong_Check(value)) {
12818 unsigned long long test_var;
12819 test_var = PyLong_AsUnsignedLongLong(value);
12820 if (PyErr_Occurred() != NULL) {
12823 if (test_var > uint_max) {
12824 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12825 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12828 object->chdevs = test_var;
12829 } else if (PyInt_Check(value)) {
12831 test_var = PyInt_AsLong(value);
12832 if (test_var < 0 || test_var > uint_max) {
12833 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12834 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12837 object->chdevs = test_var;
12839 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12840 PyInt_Type.tp_name, PyLong_Type.tp_name);
12847 static PyObject *py_srvsvc_NetSrvInfo402_get_chdevqs(PyObject *obj, void *closure)
12849 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12850 PyObject *py_chdevqs;
12851 py_chdevqs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevqs);
12855 static int py_srvsvc_NetSrvInfo402_set_chdevqs(PyObject *py_obj, PyObject *value, void *closure)
12857 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12858 if (value == NULL) {
12859 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevqs");
12863 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevqs));
12864 if (PyLong_Check(value)) {
12865 unsigned long long test_var;
12866 test_var = PyLong_AsUnsignedLongLong(value);
12867 if (PyErr_Occurred() != NULL) {
12870 if (test_var > uint_max) {
12871 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12872 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12875 object->chdevqs = test_var;
12876 } else if (PyInt_Check(value)) {
12878 test_var = PyInt_AsLong(value);
12879 if (test_var < 0 || test_var > uint_max) {
12880 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12881 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12884 object->chdevqs = test_var;
12886 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12887 PyInt_Type.tp_name, PyLong_Type.tp_name);
12894 static PyObject *py_srvsvc_NetSrvInfo402_get_chdevjobs(PyObject *obj, void *closure)
12896 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12897 PyObject *py_chdevjobs;
12898 py_chdevjobs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevjobs);
12899 return py_chdevjobs;
12902 static int py_srvsvc_NetSrvInfo402_set_chdevjobs(PyObject *py_obj, PyObject *value, void *closure)
12904 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12905 if (value == NULL) {
12906 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevjobs");
12910 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevjobs));
12911 if (PyLong_Check(value)) {
12912 unsigned long long test_var;
12913 test_var = PyLong_AsUnsignedLongLong(value);
12914 if (PyErr_Occurred() != NULL) {
12917 if (test_var > uint_max) {
12918 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12919 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12922 object->chdevjobs = test_var;
12923 } else if (PyInt_Check(value)) {
12925 test_var = PyInt_AsLong(value);
12926 if (test_var < 0 || test_var > uint_max) {
12927 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12928 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12931 object->chdevjobs = test_var;
12933 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12934 PyInt_Type.tp_name, PyLong_Type.tp_name);
12941 static PyObject *py_srvsvc_NetSrvInfo402_get_connections(PyObject *obj, void *closure)
12943 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12944 PyObject *py_connections;
12945 py_connections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->connections);
12946 return py_connections;
12949 static int py_srvsvc_NetSrvInfo402_set_connections(PyObject *py_obj, PyObject *value, void *closure)
12951 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12952 if (value == NULL) {
12953 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->connections");
12957 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->connections));
12958 if (PyLong_Check(value)) {
12959 unsigned long long test_var;
12960 test_var = PyLong_AsUnsignedLongLong(value);
12961 if (PyErr_Occurred() != NULL) {
12964 if (test_var > uint_max) {
12965 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
12966 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12969 object->connections = test_var;
12970 } else if (PyInt_Check(value)) {
12972 test_var = PyInt_AsLong(value);
12973 if (test_var < 0 || test_var > uint_max) {
12974 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
12975 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
12978 object->connections = test_var;
12980 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12981 PyInt_Type.tp_name, PyLong_Type.tp_name);
12988 static PyObject *py_srvsvc_NetSrvInfo402_get_shares(PyObject *obj, void *closure)
12990 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
12991 PyObject *py_shares;
12992 py_shares = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->shares);
12996 static int py_srvsvc_NetSrvInfo402_set_shares(PyObject *py_obj, PyObject *value, void *closure)
12998 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
12999 if (value == NULL) {
13000 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->shares");
13004 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->shares));
13005 if (PyLong_Check(value)) {
13006 unsigned long long test_var;
13007 test_var = PyLong_AsUnsignedLongLong(value);
13008 if (PyErr_Occurred() != NULL) {
13011 if (test_var > uint_max) {
13012 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13013 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13016 object->shares = test_var;
13017 } else if (PyInt_Check(value)) {
13019 test_var = PyInt_AsLong(value);
13020 if (test_var < 0 || test_var > uint_max) {
13021 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13022 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13025 object->shares = test_var;
13027 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13028 PyInt_Type.tp_name, PyLong_Type.tp_name);
13035 static PyObject *py_srvsvc_NetSrvInfo402_get_openfiles(PyObject *obj, void *closure)
13037 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13038 PyObject *py_openfiles;
13039 py_openfiles = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->openfiles);
13040 return py_openfiles;
13043 static int py_srvsvc_NetSrvInfo402_set_openfiles(PyObject *py_obj, PyObject *value, void *closure)
13045 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13046 if (value == NULL) {
13047 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->openfiles");
13051 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->openfiles));
13052 if (PyLong_Check(value)) {
13053 unsigned long long test_var;
13054 test_var = PyLong_AsUnsignedLongLong(value);
13055 if (PyErr_Occurred() != NULL) {
13058 if (test_var > uint_max) {
13059 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13060 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13063 object->openfiles = test_var;
13064 } else if (PyInt_Check(value)) {
13066 test_var = PyInt_AsLong(value);
13067 if (test_var < 0 || test_var > uint_max) {
13068 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13069 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13072 object->openfiles = test_var;
13074 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13075 PyInt_Type.tp_name, PyLong_Type.tp_name);
13082 static PyObject *py_srvsvc_NetSrvInfo402_get_sessopen(PyObject *obj, void *closure)
13084 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13085 PyObject *py_sessopen;
13086 py_sessopen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
13087 return py_sessopen;
13090 static int py_srvsvc_NetSrvInfo402_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
13092 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13093 if (value == NULL) {
13094 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopen");
13098 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
13099 if (PyLong_Check(value)) {
13100 unsigned long long test_var;
13101 test_var = PyLong_AsUnsignedLongLong(value);
13102 if (PyErr_Occurred() != NULL) {
13105 if (test_var > uint_max) {
13106 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13107 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13110 object->sessopen = test_var;
13111 } else if (PyInt_Check(value)) {
13113 test_var = PyInt_AsLong(value);
13114 if (test_var < 0 || test_var > uint_max) {
13115 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13116 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13119 object->sessopen = test_var;
13121 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13122 PyInt_Type.tp_name, PyLong_Type.tp_name);
13129 static PyObject *py_srvsvc_NetSrvInfo402_get_sesssvc(PyObject *obj, void *closure)
13131 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13132 PyObject *py_sesssvc;
13133 py_sesssvc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
13137 static int py_srvsvc_NetSrvInfo402_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
13139 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13140 if (value == NULL) {
13141 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesssvc");
13145 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
13146 if (PyLong_Check(value)) {
13147 unsigned long long test_var;
13148 test_var = PyLong_AsUnsignedLongLong(value);
13149 if (PyErr_Occurred() != NULL) {
13152 if (test_var > uint_max) {
13153 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13154 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13157 object->sesssvc = test_var;
13158 } else if (PyInt_Check(value)) {
13160 test_var = PyInt_AsLong(value);
13161 if (test_var < 0 || test_var > uint_max) {
13162 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13163 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13166 object->sesssvc = test_var;
13168 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13169 PyInt_Type.tp_name, PyLong_Type.tp_name);
13176 static PyObject *py_srvsvc_NetSrvInfo402_get_sessreqs(PyObject *obj, void *closure)
13178 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13179 PyObject *py_sessreqs;
13180 py_sessreqs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessreqs);
13181 return py_sessreqs;
13184 static int py_srvsvc_NetSrvInfo402_set_sessreqs(PyObject *py_obj, PyObject *value, void *closure)
13186 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13187 if (value == NULL) {
13188 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessreqs");
13192 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessreqs));
13193 if (PyLong_Check(value)) {
13194 unsigned long long test_var;
13195 test_var = PyLong_AsUnsignedLongLong(value);
13196 if (PyErr_Occurred() != NULL) {
13199 if (test_var > uint_max) {
13200 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13201 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13204 object->sessreqs = test_var;
13205 } else if (PyInt_Check(value)) {
13207 test_var = PyInt_AsLong(value);
13208 if (test_var < 0 || test_var > uint_max) {
13209 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13210 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13213 object->sessreqs = test_var;
13215 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13216 PyInt_Type.tp_name, PyLong_Type.tp_name);
13223 static PyObject *py_srvsvc_NetSrvInfo402_get_opensearch(PyObject *obj, void *closure)
13225 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13226 PyObject *py_opensearch;
13227 py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
13228 return py_opensearch;
13231 static int py_srvsvc_NetSrvInfo402_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
13233 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13234 if (value == NULL) {
13235 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
13239 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
13240 if (PyLong_Check(value)) {
13241 unsigned long long test_var;
13242 test_var = PyLong_AsUnsignedLongLong(value);
13243 if (PyErr_Occurred() != NULL) {
13246 if (test_var > uint_max) {
13247 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13248 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13251 object->opensearch = test_var;
13252 } else if (PyInt_Check(value)) {
13254 test_var = PyInt_AsLong(value);
13255 if (test_var < 0 || test_var > uint_max) {
13256 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13257 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13260 object->opensearch = test_var;
13262 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13263 PyInt_Type.tp_name, PyLong_Type.tp_name);
13270 static PyObject *py_srvsvc_NetSrvInfo402_get_activelocks(PyObject *obj, void *closure)
13272 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13273 PyObject *py_activelocks;
13274 py_activelocks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->activelocks);
13275 return py_activelocks;
13278 static int py_srvsvc_NetSrvInfo402_set_activelocks(PyObject *py_obj, PyObject *value, void *closure)
13280 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13281 if (value == NULL) {
13282 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->activelocks");
13286 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->activelocks));
13287 if (PyLong_Check(value)) {
13288 unsigned long long test_var;
13289 test_var = PyLong_AsUnsignedLongLong(value);
13290 if (PyErr_Occurred() != NULL) {
13293 if (test_var > uint_max) {
13294 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13295 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13298 object->activelocks = test_var;
13299 } else if (PyInt_Check(value)) {
13301 test_var = PyInt_AsLong(value);
13302 if (test_var < 0 || test_var > uint_max) {
13303 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13304 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13307 object->activelocks = test_var;
13309 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13310 PyInt_Type.tp_name, PyLong_Type.tp_name);
13317 static PyObject *py_srvsvc_NetSrvInfo402_get_numreqbufs(PyObject *obj, void *closure)
13319 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13320 PyObject *py_numreqbufs;
13321 py_numreqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numreqbufs);
13322 return py_numreqbufs;
13325 static int py_srvsvc_NetSrvInfo402_set_numreqbufs(PyObject *py_obj, PyObject *value, void *closure)
13327 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13328 if (value == NULL) {
13329 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numreqbufs");
13333 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numreqbufs));
13334 if (PyLong_Check(value)) {
13335 unsigned long long test_var;
13336 test_var = PyLong_AsUnsignedLongLong(value);
13337 if (PyErr_Occurred() != NULL) {
13340 if (test_var > uint_max) {
13341 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13342 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13345 object->numreqbufs = test_var;
13346 } else if (PyInt_Check(value)) {
13348 test_var = PyInt_AsLong(value);
13349 if (test_var < 0 || test_var > uint_max) {
13350 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13351 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13354 object->numreqbufs = test_var;
13356 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13357 PyInt_Type.tp_name, PyLong_Type.tp_name);
13364 static PyObject *py_srvsvc_NetSrvInfo402_get_sizereqbufs(PyObject *obj, void *closure)
13366 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13367 PyObject *py_sizereqbufs;
13368 py_sizereqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
13369 return py_sizereqbufs;
13372 static int py_srvsvc_NetSrvInfo402_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
13374 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13375 if (value == NULL) {
13376 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sizereqbufs");
13380 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
13381 if (PyLong_Check(value)) {
13382 unsigned long long test_var;
13383 test_var = PyLong_AsUnsignedLongLong(value);
13384 if (PyErr_Occurred() != NULL) {
13387 if (test_var > uint_max) {
13388 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13389 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13392 object->sizereqbufs = test_var;
13393 } else if (PyInt_Check(value)) {
13395 test_var = PyInt_AsLong(value);
13396 if (test_var < 0 || test_var > uint_max) {
13397 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13398 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13401 object->sizereqbufs = test_var;
13403 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13404 PyInt_Type.tp_name, PyLong_Type.tp_name);
13411 static PyObject *py_srvsvc_NetSrvInfo402_get_numbigbufs(PyObject *obj, void *closure)
13413 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13414 PyObject *py_numbigbufs;
13415 py_numbigbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numbigbufs);
13416 return py_numbigbufs;
13419 static int py_srvsvc_NetSrvInfo402_set_numbigbufs(PyObject *py_obj, PyObject *value, void *closure)
13421 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13422 if (value == NULL) {
13423 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numbigbufs");
13427 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numbigbufs));
13428 if (PyLong_Check(value)) {
13429 unsigned long long test_var;
13430 test_var = PyLong_AsUnsignedLongLong(value);
13431 if (PyErr_Occurred() != NULL) {
13434 if (test_var > uint_max) {
13435 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13436 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13439 object->numbigbufs = test_var;
13440 } else if (PyInt_Check(value)) {
13442 test_var = PyInt_AsLong(value);
13443 if (test_var < 0 || test_var > uint_max) {
13444 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13445 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13448 object->numbigbufs = test_var;
13450 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13451 PyInt_Type.tp_name, PyLong_Type.tp_name);
13458 static PyObject *py_srvsvc_NetSrvInfo402_get_numfiletasks(PyObject *obj, void *closure)
13460 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13461 PyObject *py_numfiletasks;
13462 py_numfiletasks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numfiletasks);
13463 return py_numfiletasks;
13466 static int py_srvsvc_NetSrvInfo402_set_numfiletasks(PyObject *py_obj, PyObject *value, void *closure)
13468 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13469 if (value == NULL) {
13470 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numfiletasks");
13474 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numfiletasks));
13475 if (PyLong_Check(value)) {
13476 unsigned long long test_var;
13477 test_var = PyLong_AsUnsignedLongLong(value);
13478 if (PyErr_Occurred() != NULL) {
13481 if (test_var > uint_max) {
13482 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13483 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13486 object->numfiletasks = test_var;
13487 } else if (PyInt_Check(value)) {
13489 test_var = PyInt_AsLong(value);
13490 if (test_var < 0 || test_var > uint_max) {
13491 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13492 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13495 object->numfiletasks = test_var;
13497 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13498 PyInt_Type.tp_name, PyLong_Type.tp_name);
13505 static PyObject *py_srvsvc_NetSrvInfo402_get_alertsched(PyObject *obj, void *closure)
13507 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13508 PyObject *py_alertsched;
13509 py_alertsched = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
13510 return py_alertsched;
13513 static int py_srvsvc_NetSrvInfo402_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
13515 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13516 if (value == NULL) {
13517 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alertsched");
13521 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
13522 if (PyLong_Check(value)) {
13523 unsigned long long test_var;
13524 test_var = PyLong_AsUnsignedLongLong(value);
13525 if (PyErr_Occurred() != NULL) {
13528 if (test_var > uint_max) {
13529 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13530 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13533 object->alertsched = test_var;
13534 } else if (PyInt_Check(value)) {
13536 test_var = PyInt_AsLong(value);
13537 if (test_var < 0 || test_var > uint_max) {
13538 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13539 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13542 object->alertsched = test_var;
13544 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13545 PyInt_Type.tp_name, PyLong_Type.tp_name);
13552 static PyObject *py_srvsvc_NetSrvInfo402_get_erroralert(PyObject *obj, void *closure)
13554 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13555 PyObject *py_erroralert;
13556 py_erroralert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->erroralert);
13557 return py_erroralert;
13560 static int py_srvsvc_NetSrvInfo402_set_erroralert(PyObject *py_obj, PyObject *value, void *closure)
13562 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13563 if (value == NULL) {
13564 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->erroralert");
13568 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->erroralert));
13569 if (PyLong_Check(value)) {
13570 unsigned long long test_var;
13571 test_var = PyLong_AsUnsignedLongLong(value);
13572 if (PyErr_Occurred() != NULL) {
13575 if (test_var > uint_max) {
13576 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13577 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13580 object->erroralert = test_var;
13581 } else if (PyInt_Check(value)) {
13583 test_var = PyInt_AsLong(value);
13584 if (test_var < 0 || test_var > uint_max) {
13585 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13586 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13589 object->erroralert = test_var;
13591 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13592 PyInt_Type.tp_name, PyLong_Type.tp_name);
13599 static PyObject *py_srvsvc_NetSrvInfo402_get_logonalert(PyObject *obj, void *closure)
13601 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13602 PyObject *py_logonalert;
13603 py_logonalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->logonalert);
13604 return py_logonalert;
13607 static int py_srvsvc_NetSrvInfo402_set_logonalert(PyObject *py_obj, PyObject *value, void *closure)
13609 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13610 if (value == NULL) {
13611 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logonalert");
13615 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logonalert));
13616 if (PyLong_Check(value)) {
13617 unsigned long long test_var;
13618 test_var = PyLong_AsUnsignedLongLong(value);
13619 if (PyErr_Occurred() != NULL) {
13622 if (test_var > uint_max) {
13623 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13624 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13627 object->logonalert = test_var;
13628 } else if (PyInt_Check(value)) {
13630 test_var = PyInt_AsLong(value);
13631 if (test_var < 0 || test_var > uint_max) {
13632 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13633 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13636 object->logonalert = test_var;
13638 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13639 PyInt_Type.tp_name, PyLong_Type.tp_name);
13646 static PyObject *py_srvsvc_NetSrvInfo402_get_accessalert(PyObject *obj, void *closure)
13648 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13649 PyObject *py_accessalert;
13650 py_accessalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->accessalert);
13651 return py_accessalert;
13654 static int py_srvsvc_NetSrvInfo402_set_accessalert(PyObject *py_obj, PyObject *value, void *closure)
13656 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13657 if (value == NULL) {
13658 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->accessalert");
13662 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->accessalert));
13663 if (PyLong_Check(value)) {
13664 unsigned long long test_var;
13665 test_var = PyLong_AsUnsignedLongLong(value);
13666 if (PyErr_Occurred() != NULL) {
13669 if (test_var > uint_max) {
13670 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13671 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13674 object->accessalert = test_var;
13675 } else if (PyInt_Check(value)) {
13677 test_var = PyInt_AsLong(value);
13678 if (test_var < 0 || test_var > uint_max) {
13679 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13680 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13683 object->accessalert = test_var;
13685 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13686 PyInt_Type.tp_name, PyLong_Type.tp_name);
13693 static PyObject *py_srvsvc_NetSrvInfo402_get_diskalert(PyObject *obj, void *closure)
13695 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13696 PyObject *py_diskalert;
13697 py_diskalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->diskalert);
13698 return py_diskalert;
13701 static int py_srvsvc_NetSrvInfo402_set_diskalert(PyObject *py_obj, PyObject *value, void *closure)
13703 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13704 if (value == NULL) {
13705 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->diskalert");
13709 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskalert));
13710 if (PyLong_Check(value)) {
13711 unsigned long long test_var;
13712 test_var = PyLong_AsUnsignedLongLong(value);
13713 if (PyErr_Occurred() != NULL) {
13716 if (test_var > uint_max) {
13717 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13718 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13721 object->diskalert = test_var;
13722 } else if (PyInt_Check(value)) {
13724 test_var = PyInt_AsLong(value);
13725 if (test_var < 0 || test_var > uint_max) {
13726 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13727 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13730 object->diskalert = test_var;
13732 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13733 PyInt_Type.tp_name, PyLong_Type.tp_name);
13740 static PyObject *py_srvsvc_NetSrvInfo402_get_netioalert(PyObject *obj, void *closure)
13742 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13743 PyObject *py_netioalert;
13744 py_netioalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->netioalert);
13745 return py_netioalert;
13748 static int py_srvsvc_NetSrvInfo402_set_netioalert(PyObject *py_obj, PyObject *value, void *closure)
13750 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13751 if (value == NULL) {
13752 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netioalert");
13756 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->netioalert));
13757 if (PyLong_Check(value)) {
13758 unsigned long long test_var;
13759 test_var = PyLong_AsUnsignedLongLong(value);
13760 if (PyErr_Occurred() != NULL) {
13763 if (test_var > uint_max) {
13764 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13765 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13768 object->netioalert = test_var;
13769 } else if (PyInt_Check(value)) {
13771 test_var = PyInt_AsLong(value);
13772 if (test_var < 0 || test_var > uint_max) {
13773 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13774 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13777 object->netioalert = test_var;
13779 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13780 PyInt_Type.tp_name, PyLong_Type.tp_name);
13787 static PyObject *py_srvsvc_NetSrvInfo402_get_maxaudits(PyObject *obj, void *closure)
13789 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13790 PyObject *py_maxaudits;
13791 py_maxaudits = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxaudits);
13792 return py_maxaudits;
13795 static int py_srvsvc_NetSrvInfo402_set_maxaudits(PyObject *py_obj, PyObject *value, void *closure)
13797 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13798 if (value == NULL) {
13799 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxaudits");
13803 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxaudits));
13804 if (PyLong_Check(value)) {
13805 unsigned long long test_var;
13806 test_var = PyLong_AsUnsignedLongLong(value);
13807 if (PyErr_Occurred() != NULL) {
13810 if (test_var > uint_max) {
13811 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
13812 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13815 object->maxaudits = test_var;
13816 } else if (PyInt_Check(value)) {
13818 test_var = PyInt_AsLong(value);
13819 if (test_var < 0 || test_var > uint_max) {
13820 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
13821 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
13824 object->maxaudits = test_var;
13826 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
13827 PyInt_Type.tp_name, PyLong_Type.tp_name);
13834 static PyObject *py_srvsvc_NetSrvInfo402_get_srvheuristics(PyObject *obj, void *closure)
13836 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
13837 PyObject *py_srvheuristics;
13838 if (object->srvheuristics == NULL) {
13839 py_srvheuristics = Py_None;
13840 Py_INCREF(py_srvheuristics);
13842 if (object->srvheuristics == NULL) {
13843 py_srvheuristics = Py_None;
13844 Py_INCREF(py_srvheuristics);
13846 py_srvheuristics = PyUnicode_Decode(object->srvheuristics, strlen(object->srvheuristics), "utf-8", "ignore");
13849 return py_srvheuristics;
13852 static int py_srvsvc_NetSrvInfo402_set_srvheuristics(PyObject *py_obj, PyObject *value, void *closure)
13854 struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
13855 if (value == NULL) {
13856 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->srvheuristics");
13859 if (value == Py_None) {
13860 object->srvheuristics = NULL;
13862 object->srvheuristics = NULL;
13863 if (value == NULL) {
13864 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->srvheuristics");
13868 const char *test_str;
13869 const char *talloc_str;
13870 PyObject *unicode = NULL;
13871 if (PyUnicode_Check(value)) {
13872 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
13873 if (unicode == NULL) {
13877 test_str = PyString_AS_STRING(unicode);
13878 } else if (PyString_Check(value)) {
13879 test_str = PyString_AS_STRING(value);
13881 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
13884 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
13885 if (unicode != NULL) {
13886 Py_DECREF(unicode);
13888 if (talloc_str == NULL) {
13892 object->srvheuristics = talloc_str;
13898 static PyGetSetDef py_srvsvc_NetSrvInfo402_getsetters[] = {
13900 .name = discard_const_p(char, "ulist_mtime"),
13901 .get = py_srvsvc_NetSrvInfo402_get_ulist_mtime,
13902 .set = py_srvsvc_NetSrvInfo402_set_ulist_mtime,
13903 .doc = discard_const_p(char, "PIDL-generated element ulist_mtime")
13906 .name = discard_const_p(char, "glist_mtime"),
13907 .get = py_srvsvc_NetSrvInfo402_get_glist_mtime,
13908 .set = py_srvsvc_NetSrvInfo402_set_glist_mtime,
13909 .doc = discard_const_p(char, "PIDL-generated element glist_mtime")
13912 .name = discard_const_p(char, "alist_mtime"),
13913 .get = py_srvsvc_NetSrvInfo402_get_alist_mtime,
13914 .set = py_srvsvc_NetSrvInfo402_set_alist_mtime,
13915 .doc = discard_const_p(char, "PIDL-generated element alist_mtime")
13918 .name = discard_const_p(char, "alerts"),
13919 .get = py_srvsvc_NetSrvInfo402_get_alerts,
13920 .set = py_srvsvc_NetSrvInfo402_set_alerts,
13921 .doc = discard_const_p(char, "PIDL-generated element alerts")
13924 .name = discard_const_p(char, "security"),
13925 .get = py_srvsvc_NetSrvInfo402_get_security,
13926 .set = py_srvsvc_NetSrvInfo402_set_security,
13927 .doc = discard_const_p(char, "PIDL-generated element security")
13930 .name = discard_const_p(char, "numadmin"),
13931 .get = py_srvsvc_NetSrvInfo402_get_numadmin,
13932 .set = py_srvsvc_NetSrvInfo402_set_numadmin,
13933 .doc = discard_const_p(char, "PIDL-generated element numadmin")
13936 .name = discard_const_p(char, "lanmask"),
13937 .get = py_srvsvc_NetSrvInfo402_get_lanmask,
13938 .set = py_srvsvc_NetSrvInfo402_set_lanmask,
13939 .doc = discard_const_p(char, "PIDL-generated element lanmask")
13942 .name = discard_const_p(char, "guestaccount"),
13943 .get = py_srvsvc_NetSrvInfo402_get_guestaccount,
13944 .set = py_srvsvc_NetSrvInfo402_set_guestaccount,
13945 .doc = discard_const_p(char, "PIDL-generated element guestaccount")
13948 .name = discard_const_p(char, "chdevs"),
13949 .get = py_srvsvc_NetSrvInfo402_get_chdevs,
13950 .set = py_srvsvc_NetSrvInfo402_set_chdevs,
13951 .doc = discard_const_p(char, "PIDL-generated element chdevs")
13954 .name = discard_const_p(char, "chdevqs"),
13955 .get = py_srvsvc_NetSrvInfo402_get_chdevqs,
13956 .set = py_srvsvc_NetSrvInfo402_set_chdevqs,
13957 .doc = discard_const_p(char, "PIDL-generated element chdevqs")
13960 .name = discard_const_p(char, "chdevjobs"),
13961 .get = py_srvsvc_NetSrvInfo402_get_chdevjobs,
13962 .set = py_srvsvc_NetSrvInfo402_set_chdevjobs,
13963 .doc = discard_const_p(char, "PIDL-generated element chdevjobs")
13966 .name = discard_const_p(char, "connections"),
13967 .get = py_srvsvc_NetSrvInfo402_get_connections,
13968 .set = py_srvsvc_NetSrvInfo402_set_connections,
13969 .doc = discard_const_p(char, "PIDL-generated element connections")
13972 .name = discard_const_p(char, "shares"),
13973 .get = py_srvsvc_NetSrvInfo402_get_shares,
13974 .set = py_srvsvc_NetSrvInfo402_set_shares,
13975 .doc = discard_const_p(char, "PIDL-generated element shares")
13978 .name = discard_const_p(char, "openfiles"),
13979 .get = py_srvsvc_NetSrvInfo402_get_openfiles,
13980 .set = py_srvsvc_NetSrvInfo402_set_openfiles,
13981 .doc = discard_const_p(char, "PIDL-generated element openfiles")
13984 .name = discard_const_p(char, "sessopen"),
13985 .get = py_srvsvc_NetSrvInfo402_get_sessopen,
13986 .set = py_srvsvc_NetSrvInfo402_set_sessopen,
13987 .doc = discard_const_p(char, "PIDL-generated element sessopen")
13990 .name = discard_const_p(char, "sesssvc"),
13991 .get = py_srvsvc_NetSrvInfo402_get_sesssvc,
13992 .set = py_srvsvc_NetSrvInfo402_set_sesssvc,
13993 .doc = discard_const_p(char, "PIDL-generated element sesssvc")
13996 .name = discard_const_p(char, "sessreqs"),
13997 .get = py_srvsvc_NetSrvInfo402_get_sessreqs,
13998 .set = py_srvsvc_NetSrvInfo402_set_sessreqs,
13999 .doc = discard_const_p(char, "PIDL-generated element sessreqs")
14002 .name = discard_const_p(char, "opensearch"),
14003 .get = py_srvsvc_NetSrvInfo402_get_opensearch,
14004 .set = py_srvsvc_NetSrvInfo402_set_opensearch,
14005 .doc = discard_const_p(char, "PIDL-generated element opensearch")
14008 .name = discard_const_p(char, "activelocks"),
14009 .get = py_srvsvc_NetSrvInfo402_get_activelocks,
14010 .set = py_srvsvc_NetSrvInfo402_set_activelocks,
14011 .doc = discard_const_p(char, "PIDL-generated element activelocks")
14014 .name = discard_const_p(char, "numreqbufs"),
14015 .get = py_srvsvc_NetSrvInfo402_get_numreqbufs,
14016 .set = py_srvsvc_NetSrvInfo402_set_numreqbufs,
14017 .doc = discard_const_p(char, "PIDL-generated element numreqbufs")
14020 .name = discard_const_p(char, "sizereqbufs"),
14021 .get = py_srvsvc_NetSrvInfo402_get_sizereqbufs,
14022 .set = py_srvsvc_NetSrvInfo402_set_sizereqbufs,
14023 .doc = discard_const_p(char, "PIDL-generated element sizereqbufs")
14026 .name = discard_const_p(char, "numbigbufs"),
14027 .get = py_srvsvc_NetSrvInfo402_get_numbigbufs,
14028 .set = py_srvsvc_NetSrvInfo402_set_numbigbufs,
14029 .doc = discard_const_p(char, "PIDL-generated element numbigbufs")
14032 .name = discard_const_p(char, "numfiletasks"),
14033 .get = py_srvsvc_NetSrvInfo402_get_numfiletasks,
14034 .set = py_srvsvc_NetSrvInfo402_set_numfiletasks,
14035 .doc = discard_const_p(char, "PIDL-generated element numfiletasks")
14038 .name = discard_const_p(char, "alertsched"),
14039 .get = py_srvsvc_NetSrvInfo402_get_alertsched,
14040 .set = py_srvsvc_NetSrvInfo402_set_alertsched,
14041 .doc = discard_const_p(char, "PIDL-generated element alertsched")
14044 .name = discard_const_p(char, "erroralert"),
14045 .get = py_srvsvc_NetSrvInfo402_get_erroralert,
14046 .set = py_srvsvc_NetSrvInfo402_set_erroralert,
14047 .doc = discard_const_p(char, "PIDL-generated element erroralert")
14050 .name = discard_const_p(char, "logonalert"),
14051 .get = py_srvsvc_NetSrvInfo402_get_logonalert,
14052 .set = py_srvsvc_NetSrvInfo402_set_logonalert,
14053 .doc = discard_const_p(char, "PIDL-generated element logonalert")
14056 .name = discard_const_p(char, "accessalert"),
14057 .get = py_srvsvc_NetSrvInfo402_get_accessalert,
14058 .set = py_srvsvc_NetSrvInfo402_set_accessalert,
14059 .doc = discard_const_p(char, "PIDL-generated element accessalert")
14062 .name = discard_const_p(char, "diskalert"),
14063 .get = py_srvsvc_NetSrvInfo402_get_diskalert,
14064 .set = py_srvsvc_NetSrvInfo402_set_diskalert,
14065 .doc = discard_const_p(char, "PIDL-generated element diskalert")
14068 .name = discard_const_p(char, "netioalert"),
14069 .get = py_srvsvc_NetSrvInfo402_get_netioalert,
14070 .set = py_srvsvc_NetSrvInfo402_set_netioalert,
14071 .doc = discard_const_p(char, "PIDL-generated element netioalert")
14074 .name = discard_const_p(char, "maxaudits"),
14075 .get = py_srvsvc_NetSrvInfo402_get_maxaudits,
14076 .set = py_srvsvc_NetSrvInfo402_set_maxaudits,
14077 .doc = discard_const_p(char, "PIDL-generated element maxaudits")
14080 .name = discard_const_p(char, "srvheuristics"),
14081 .get = py_srvsvc_NetSrvInfo402_get_srvheuristics,
14082 .set = py_srvsvc_NetSrvInfo402_set_srvheuristics,
14083 .doc = discard_const_p(char, "PIDL-generated element srvheuristics")
14088 static PyObject *py_srvsvc_NetSrvInfo402_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14090 return pytalloc_new(struct srvsvc_NetSrvInfo402, type);
14094 static PyTypeObject srvsvc_NetSrvInfo402_Type = {
14095 PyObject_HEAD_INIT(NULL) 0,
14096 .tp_name = "srvsvc.NetSrvInfo402",
14097 .tp_getset = py_srvsvc_NetSrvInfo402_getsetters,
14098 .tp_methods = NULL,
14099 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
14100 .tp_new = py_srvsvc_NetSrvInfo402_new,
14104 static PyObject *py_srvsvc_NetSrvInfo403_get_ulist_mtime(PyObject *obj, void *closure)
14106 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14107 PyObject *py_ulist_mtime;
14108 py_ulist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->ulist_mtime);
14109 return py_ulist_mtime;
14112 static int py_srvsvc_NetSrvInfo403_set_ulist_mtime(PyObject *py_obj, PyObject *value, void *closure)
14114 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14115 if (value == NULL) {
14116 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ulist_mtime");
14120 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ulist_mtime));
14121 if (PyLong_Check(value)) {
14122 unsigned long long test_var;
14123 test_var = PyLong_AsUnsignedLongLong(value);
14124 if (PyErr_Occurred() != NULL) {
14127 if (test_var > uint_max) {
14128 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14129 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14132 object->ulist_mtime = test_var;
14133 } else if (PyInt_Check(value)) {
14135 test_var = PyInt_AsLong(value);
14136 if (test_var < 0 || test_var > uint_max) {
14137 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14138 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14141 object->ulist_mtime = test_var;
14143 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14144 PyInt_Type.tp_name, PyLong_Type.tp_name);
14151 static PyObject *py_srvsvc_NetSrvInfo403_get_glist_mtime(PyObject *obj, void *closure)
14153 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14154 PyObject *py_glist_mtime;
14155 py_glist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->glist_mtime);
14156 return py_glist_mtime;
14159 static int py_srvsvc_NetSrvInfo403_set_glist_mtime(PyObject *py_obj, PyObject *value, void *closure)
14161 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14162 if (value == NULL) {
14163 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->glist_mtime");
14167 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->glist_mtime));
14168 if (PyLong_Check(value)) {
14169 unsigned long long test_var;
14170 test_var = PyLong_AsUnsignedLongLong(value);
14171 if (PyErr_Occurred() != NULL) {
14174 if (test_var > uint_max) {
14175 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14176 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14179 object->glist_mtime = test_var;
14180 } else if (PyInt_Check(value)) {
14182 test_var = PyInt_AsLong(value);
14183 if (test_var < 0 || test_var > uint_max) {
14184 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14185 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14188 object->glist_mtime = test_var;
14190 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14191 PyInt_Type.tp_name, PyLong_Type.tp_name);
14198 static PyObject *py_srvsvc_NetSrvInfo403_get_alist_mtime(PyObject *obj, void *closure)
14200 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14201 PyObject *py_alist_mtime;
14202 py_alist_mtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alist_mtime);
14203 return py_alist_mtime;
14206 static int py_srvsvc_NetSrvInfo403_set_alist_mtime(PyObject *py_obj, PyObject *value, void *closure)
14208 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14209 if (value == NULL) {
14210 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alist_mtime");
14214 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alist_mtime));
14215 if (PyLong_Check(value)) {
14216 unsigned long long test_var;
14217 test_var = PyLong_AsUnsignedLongLong(value);
14218 if (PyErr_Occurred() != NULL) {
14221 if (test_var > uint_max) {
14222 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14223 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14226 object->alist_mtime = test_var;
14227 } else if (PyInt_Check(value)) {
14229 test_var = PyInt_AsLong(value);
14230 if (test_var < 0 || test_var > uint_max) {
14231 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14232 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14235 object->alist_mtime = test_var;
14237 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14238 PyInt_Type.tp_name, PyLong_Type.tp_name);
14245 static PyObject *py_srvsvc_NetSrvInfo403_get_alerts(PyObject *obj, void *closure)
14247 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14248 PyObject *py_alerts;
14249 if (object->alerts == NULL) {
14250 py_alerts = Py_None;
14251 Py_INCREF(py_alerts);
14253 if (object->alerts == NULL) {
14254 py_alerts = Py_None;
14255 Py_INCREF(py_alerts);
14257 py_alerts = PyUnicode_Decode(object->alerts, strlen(object->alerts), "utf-8", "ignore");
14263 static int py_srvsvc_NetSrvInfo403_set_alerts(PyObject *py_obj, PyObject *value, void *closure)
14265 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14266 if (value == NULL) {
14267 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alerts");
14270 if (value == Py_None) {
14271 object->alerts = NULL;
14273 object->alerts = NULL;
14274 if (value == NULL) {
14275 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->alerts");
14279 const char *test_str;
14280 const char *talloc_str;
14281 PyObject *unicode = NULL;
14282 if (PyUnicode_Check(value)) {
14283 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
14284 if (unicode == NULL) {
14288 test_str = PyString_AS_STRING(unicode);
14289 } else if (PyString_Check(value)) {
14290 test_str = PyString_AS_STRING(value);
14292 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
14295 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
14296 if (unicode != NULL) {
14297 Py_DECREF(unicode);
14299 if (talloc_str == NULL) {
14303 object->alerts = talloc_str;
14309 static PyObject *py_srvsvc_NetSrvInfo403_get_security(PyObject *obj, void *closure)
14311 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14312 PyObject *py_security;
14313 py_security = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->security);
14314 return py_security;
14317 static int py_srvsvc_NetSrvInfo403_set_security(PyObject *py_obj, PyObject *value, void *closure)
14319 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14320 if (value == NULL) {
14321 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->security");
14325 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->security));
14326 if (PyLong_Check(value)) {
14327 unsigned long long test_var;
14328 test_var = PyLong_AsUnsignedLongLong(value);
14329 if (PyErr_Occurred() != NULL) {
14332 if (test_var > uint_max) {
14333 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14334 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14337 object->security = test_var;
14338 } else if (PyInt_Check(value)) {
14340 test_var = PyInt_AsLong(value);
14341 if (test_var < 0 || test_var > uint_max) {
14342 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14343 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14346 object->security = test_var;
14348 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14349 PyInt_Type.tp_name, PyLong_Type.tp_name);
14356 static PyObject *py_srvsvc_NetSrvInfo403_get_numadmin(PyObject *obj, void *closure)
14358 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14359 PyObject *py_numadmin;
14360 py_numadmin = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numadmin);
14361 return py_numadmin;
14364 static int py_srvsvc_NetSrvInfo403_set_numadmin(PyObject *py_obj, PyObject *value, void *closure)
14366 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14367 if (value == NULL) {
14368 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numadmin");
14372 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numadmin));
14373 if (PyLong_Check(value)) {
14374 unsigned long long test_var;
14375 test_var = PyLong_AsUnsignedLongLong(value);
14376 if (PyErr_Occurred() != NULL) {
14379 if (test_var > uint_max) {
14380 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14381 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14384 object->numadmin = test_var;
14385 } else if (PyInt_Check(value)) {
14387 test_var = PyInt_AsLong(value);
14388 if (test_var < 0 || test_var > uint_max) {
14389 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14390 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14393 object->numadmin = test_var;
14395 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14396 PyInt_Type.tp_name, PyLong_Type.tp_name);
14403 static PyObject *py_srvsvc_NetSrvInfo403_get_lanmask(PyObject *obj, void *closure)
14405 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14406 PyObject *py_lanmask;
14407 py_lanmask = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lanmask);
14411 static int py_srvsvc_NetSrvInfo403_set_lanmask(PyObject *py_obj, PyObject *value, void *closure)
14413 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14414 if (value == NULL) {
14415 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lanmask");
14419 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lanmask));
14420 if (PyLong_Check(value)) {
14421 unsigned long long test_var;
14422 test_var = PyLong_AsUnsignedLongLong(value);
14423 if (PyErr_Occurred() != NULL) {
14426 if (test_var > uint_max) {
14427 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14428 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14431 object->lanmask = test_var;
14432 } else if (PyInt_Check(value)) {
14434 test_var = PyInt_AsLong(value);
14435 if (test_var < 0 || test_var > uint_max) {
14436 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14437 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14440 object->lanmask = test_var;
14442 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14443 PyInt_Type.tp_name, PyLong_Type.tp_name);
14450 static PyObject *py_srvsvc_NetSrvInfo403_get_guestaccount(PyObject *obj, void *closure)
14452 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14453 PyObject *py_guestaccount;
14454 if (object->guestaccount == NULL) {
14455 py_guestaccount = Py_None;
14456 Py_INCREF(py_guestaccount);
14458 if (object->guestaccount == NULL) {
14459 py_guestaccount = Py_None;
14460 Py_INCREF(py_guestaccount);
14462 py_guestaccount = PyUnicode_Decode(object->guestaccount, strlen(object->guestaccount), "utf-8", "ignore");
14465 return py_guestaccount;
14468 static int py_srvsvc_NetSrvInfo403_set_guestaccount(PyObject *py_obj, PyObject *value, void *closure)
14470 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14471 if (value == NULL) {
14472 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guestaccount");
14475 if (value == Py_None) {
14476 object->guestaccount = NULL;
14478 object->guestaccount = NULL;
14479 if (value == NULL) {
14480 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->guestaccount");
14484 const char *test_str;
14485 const char *talloc_str;
14486 PyObject *unicode = NULL;
14487 if (PyUnicode_Check(value)) {
14488 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
14489 if (unicode == NULL) {
14493 test_str = PyString_AS_STRING(unicode);
14494 } else if (PyString_Check(value)) {
14495 test_str = PyString_AS_STRING(value);
14497 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
14500 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
14501 if (unicode != NULL) {
14502 Py_DECREF(unicode);
14504 if (talloc_str == NULL) {
14508 object->guestaccount = talloc_str;
14514 static PyObject *py_srvsvc_NetSrvInfo403_get_chdevs(PyObject *obj, void *closure)
14516 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14517 PyObject *py_chdevs;
14518 py_chdevs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevs);
14522 static int py_srvsvc_NetSrvInfo403_set_chdevs(PyObject *py_obj, PyObject *value, void *closure)
14524 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14525 if (value == NULL) {
14526 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevs");
14530 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevs));
14531 if (PyLong_Check(value)) {
14532 unsigned long long test_var;
14533 test_var = PyLong_AsUnsignedLongLong(value);
14534 if (PyErr_Occurred() != NULL) {
14537 if (test_var > uint_max) {
14538 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14539 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14542 object->chdevs = test_var;
14543 } else if (PyInt_Check(value)) {
14545 test_var = PyInt_AsLong(value);
14546 if (test_var < 0 || test_var > uint_max) {
14547 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14548 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14551 object->chdevs = test_var;
14553 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14554 PyInt_Type.tp_name, PyLong_Type.tp_name);
14561 static PyObject *py_srvsvc_NetSrvInfo403_get_chdevqs(PyObject *obj, void *closure)
14563 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14564 PyObject *py_chdevqs;
14565 py_chdevqs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevqs);
14569 static int py_srvsvc_NetSrvInfo403_set_chdevqs(PyObject *py_obj, PyObject *value, void *closure)
14571 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14572 if (value == NULL) {
14573 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevqs");
14577 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevqs));
14578 if (PyLong_Check(value)) {
14579 unsigned long long test_var;
14580 test_var = PyLong_AsUnsignedLongLong(value);
14581 if (PyErr_Occurred() != NULL) {
14584 if (test_var > uint_max) {
14585 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14586 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14589 object->chdevqs = test_var;
14590 } else if (PyInt_Check(value)) {
14592 test_var = PyInt_AsLong(value);
14593 if (test_var < 0 || test_var > uint_max) {
14594 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14595 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14598 object->chdevqs = test_var;
14600 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14601 PyInt_Type.tp_name, PyLong_Type.tp_name);
14608 static PyObject *py_srvsvc_NetSrvInfo403_get_chdevjobs(PyObject *obj, void *closure)
14610 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14611 PyObject *py_chdevjobs;
14612 py_chdevjobs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->chdevjobs);
14613 return py_chdevjobs;
14616 static int py_srvsvc_NetSrvInfo403_set_chdevjobs(PyObject *py_obj, PyObject *value, void *closure)
14618 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14619 if (value == NULL) {
14620 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevjobs");
14624 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevjobs));
14625 if (PyLong_Check(value)) {
14626 unsigned long long test_var;
14627 test_var = PyLong_AsUnsignedLongLong(value);
14628 if (PyErr_Occurred() != NULL) {
14631 if (test_var > uint_max) {
14632 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14633 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14636 object->chdevjobs = test_var;
14637 } else if (PyInt_Check(value)) {
14639 test_var = PyInt_AsLong(value);
14640 if (test_var < 0 || test_var > uint_max) {
14641 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14642 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14645 object->chdevjobs = test_var;
14647 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14648 PyInt_Type.tp_name, PyLong_Type.tp_name);
14655 static PyObject *py_srvsvc_NetSrvInfo403_get_connections(PyObject *obj, void *closure)
14657 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14658 PyObject *py_connections;
14659 py_connections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->connections);
14660 return py_connections;
14663 static int py_srvsvc_NetSrvInfo403_set_connections(PyObject *py_obj, PyObject *value, void *closure)
14665 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14666 if (value == NULL) {
14667 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->connections");
14671 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->connections));
14672 if (PyLong_Check(value)) {
14673 unsigned long long test_var;
14674 test_var = PyLong_AsUnsignedLongLong(value);
14675 if (PyErr_Occurred() != NULL) {
14678 if (test_var > uint_max) {
14679 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14680 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14683 object->connections = test_var;
14684 } else if (PyInt_Check(value)) {
14686 test_var = PyInt_AsLong(value);
14687 if (test_var < 0 || test_var > uint_max) {
14688 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14689 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14692 object->connections = test_var;
14694 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14695 PyInt_Type.tp_name, PyLong_Type.tp_name);
14702 static PyObject *py_srvsvc_NetSrvInfo403_get_shares(PyObject *obj, void *closure)
14704 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14705 PyObject *py_shares;
14706 py_shares = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->shares);
14710 static int py_srvsvc_NetSrvInfo403_set_shares(PyObject *py_obj, PyObject *value, void *closure)
14712 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14713 if (value == NULL) {
14714 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->shares");
14718 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->shares));
14719 if (PyLong_Check(value)) {
14720 unsigned long long test_var;
14721 test_var = PyLong_AsUnsignedLongLong(value);
14722 if (PyErr_Occurred() != NULL) {
14725 if (test_var > uint_max) {
14726 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14727 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14730 object->shares = test_var;
14731 } else if (PyInt_Check(value)) {
14733 test_var = PyInt_AsLong(value);
14734 if (test_var < 0 || test_var > uint_max) {
14735 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14736 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14739 object->shares = test_var;
14741 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14742 PyInt_Type.tp_name, PyLong_Type.tp_name);
14749 static PyObject *py_srvsvc_NetSrvInfo403_get_openfiles(PyObject *obj, void *closure)
14751 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14752 PyObject *py_openfiles;
14753 py_openfiles = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->openfiles);
14754 return py_openfiles;
14757 static int py_srvsvc_NetSrvInfo403_set_openfiles(PyObject *py_obj, PyObject *value, void *closure)
14759 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14760 if (value == NULL) {
14761 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->openfiles");
14765 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->openfiles));
14766 if (PyLong_Check(value)) {
14767 unsigned long long test_var;
14768 test_var = PyLong_AsUnsignedLongLong(value);
14769 if (PyErr_Occurred() != NULL) {
14772 if (test_var > uint_max) {
14773 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14774 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14777 object->openfiles = test_var;
14778 } else if (PyInt_Check(value)) {
14780 test_var = PyInt_AsLong(value);
14781 if (test_var < 0 || test_var > uint_max) {
14782 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14783 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14786 object->openfiles = test_var;
14788 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14789 PyInt_Type.tp_name, PyLong_Type.tp_name);
14796 static PyObject *py_srvsvc_NetSrvInfo403_get_sessopen(PyObject *obj, void *closure)
14798 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14799 PyObject *py_sessopen;
14800 py_sessopen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
14801 return py_sessopen;
14804 static int py_srvsvc_NetSrvInfo403_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
14806 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14807 if (value == NULL) {
14808 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopen");
14812 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
14813 if (PyLong_Check(value)) {
14814 unsigned long long test_var;
14815 test_var = PyLong_AsUnsignedLongLong(value);
14816 if (PyErr_Occurred() != NULL) {
14819 if (test_var > uint_max) {
14820 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14821 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14824 object->sessopen = test_var;
14825 } else if (PyInt_Check(value)) {
14827 test_var = PyInt_AsLong(value);
14828 if (test_var < 0 || test_var > uint_max) {
14829 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14830 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14833 object->sessopen = test_var;
14835 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14836 PyInt_Type.tp_name, PyLong_Type.tp_name);
14843 static PyObject *py_srvsvc_NetSrvInfo403_get_sesssvc(PyObject *obj, void *closure)
14845 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14846 PyObject *py_sesssvc;
14847 py_sesssvc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
14851 static int py_srvsvc_NetSrvInfo403_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
14853 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14854 if (value == NULL) {
14855 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesssvc");
14859 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
14860 if (PyLong_Check(value)) {
14861 unsigned long long test_var;
14862 test_var = PyLong_AsUnsignedLongLong(value);
14863 if (PyErr_Occurred() != NULL) {
14866 if (test_var > uint_max) {
14867 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14868 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14871 object->sesssvc = test_var;
14872 } else if (PyInt_Check(value)) {
14874 test_var = PyInt_AsLong(value);
14875 if (test_var < 0 || test_var > uint_max) {
14876 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14877 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14880 object->sesssvc = test_var;
14882 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14883 PyInt_Type.tp_name, PyLong_Type.tp_name);
14890 static PyObject *py_srvsvc_NetSrvInfo403_get_sessreqs(PyObject *obj, void *closure)
14892 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14893 PyObject *py_sessreqs;
14894 py_sessreqs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessreqs);
14895 return py_sessreqs;
14898 static int py_srvsvc_NetSrvInfo403_set_sessreqs(PyObject *py_obj, PyObject *value, void *closure)
14900 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14901 if (value == NULL) {
14902 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessreqs");
14906 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessreqs));
14907 if (PyLong_Check(value)) {
14908 unsigned long long test_var;
14909 test_var = PyLong_AsUnsignedLongLong(value);
14910 if (PyErr_Occurred() != NULL) {
14913 if (test_var > uint_max) {
14914 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14915 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14918 object->sessreqs = test_var;
14919 } else if (PyInt_Check(value)) {
14921 test_var = PyInt_AsLong(value);
14922 if (test_var < 0 || test_var > uint_max) {
14923 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14924 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14927 object->sessreqs = test_var;
14929 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14930 PyInt_Type.tp_name, PyLong_Type.tp_name);
14937 static PyObject *py_srvsvc_NetSrvInfo403_get_opensearch(PyObject *obj, void *closure)
14939 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14940 PyObject *py_opensearch;
14941 py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
14942 return py_opensearch;
14945 static int py_srvsvc_NetSrvInfo403_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
14947 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14948 if (value == NULL) {
14949 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
14953 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
14954 if (PyLong_Check(value)) {
14955 unsigned long long test_var;
14956 test_var = PyLong_AsUnsignedLongLong(value);
14957 if (PyErr_Occurred() != NULL) {
14960 if (test_var > uint_max) {
14961 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
14962 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14965 object->opensearch = test_var;
14966 } else if (PyInt_Check(value)) {
14968 test_var = PyInt_AsLong(value);
14969 if (test_var < 0 || test_var > uint_max) {
14970 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
14971 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
14974 object->opensearch = test_var;
14976 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14977 PyInt_Type.tp_name, PyLong_Type.tp_name);
14984 static PyObject *py_srvsvc_NetSrvInfo403_get_activelocks(PyObject *obj, void *closure)
14986 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
14987 PyObject *py_activelocks;
14988 py_activelocks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->activelocks);
14989 return py_activelocks;
14992 static int py_srvsvc_NetSrvInfo403_set_activelocks(PyObject *py_obj, PyObject *value, void *closure)
14994 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
14995 if (value == NULL) {
14996 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->activelocks");
15000 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->activelocks));
15001 if (PyLong_Check(value)) {
15002 unsigned long long test_var;
15003 test_var = PyLong_AsUnsignedLongLong(value);
15004 if (PyErr_Occurred() != NULL) {
15007 if (test_var > uint_max) {
15008 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15009 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15012 object->activelocks = test_var;
15013 } else if (PyInt_Check(value)) {
15015 test_var = PyInt_AsLong(value);
15016 if (test_var < 0 || test_var > uint_max) {
15017 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15018 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15021 object->activelocks = test_var;
15023 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15024 PyInt_Type.tp_name, PyLong_Type.tp_name);
15031 static PyObject *py_srvsvc_NetSrvInfo403_get_numreqbufs(PyObject *obj, void *closure)
15033 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15034 PyObject *py_numreqbufs;
15035 py_numreqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numreqbufs);
15036 return py_numreqbufs;
15039 static int py_srvsvc_NetSrvInfo403_set_numreqbufs(PyObject *py_obj, PyObject *value, void *closure)
15041 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15042 if (value == NULL) {
15043 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numreqbufs");
15047 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numreqbufs));
15048 if (PyLong_Check(value)) {
15049 unsigned long long test_var;
15050 test_var = PyLong_AsUnsignedLongLong(value);
15051 if (PyErr_Occurred() != NULL) {
15054 if (test_var > uint_max) {
15055 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15056 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15059 object->numreqbufs = test_var;
15060 } else if (PyInt_Check(value)) {
15062 test_var = PyInt_AsLong(value);
15063 if (test_var < 0 || test_var > uint_max) {
15064 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15065 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15068 object->numreqbufs = test_var;
15070 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15071 PyInt_Type.tp_name, PyLong_Type.tp_name);
15078 static PyObject *py_srvsvc_NetSrvInfo403_get_sizereqbufs(PyObject *obj, void *closure)
15080 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15081 PyObject *py_sizereqbufs;
15082 py_sizereqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
15083 return py_sizereqbufs;
15086 static int py_srvsvc_NetSrvInfo403_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
15088 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15089 if (value == NULL) {
15090 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sizereqbufs");
15094 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
15095 if (PyLong_Check(value)) {
15096 unsigned long long test_var;
15097 test_var = PyLong_AsUnsignedLongLong(value);
15098 if (PyErr_Occurred() != NULL) {
15101 if (test_var > uint_max) {
15102 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15103 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15106 object->sizereqbufs = test_var;
15107 } else if (PyInt_Check(value)) {
15109 test_var = PyInt_AsLong(value);
15110 if (test_var < 0 || test_var > uint_max) {
15111 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15112 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15115 object->sizereqbufs = test_var;
15117 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15118 PyInt_Type.tp_name, PyLong_Type.tp_name);
15125 static PyObject *py_srvsvc_NetSrvInfo403_get_numbigbufs(PyObject *obj, void *closure)
15127 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15128 PyObject *py_numbigbufs;
15129 py_numbigbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numbigbufs);
15130 return py_numbigbufs;
15133 static int py_srvsvc_NetSrvInfo403_set_numbigbufs(PyObject *py_obj, PyObject *value, void *closure)
15135 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15136 if (value == NULL) {
15137 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numbigbufs");
15141 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numbigbufs));
15142 if (PyLong_Check(value)) {
15143 unsigned long long test_var;
15144 test_var = PyLong_AsUnsignedLongLong(value);
15145 if (PyErr_Occurred() != NULL) {
15148 if (test_var > uint_max) {
15149 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15150 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15153 object->numbigbufs = test_var;
15154 } else if (PyInt_Check(value)) {
15156 test_var = PyInt_AsLong(value);
15157 if (test_var < 0 || test_var > uint_max) {
15158 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15159 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15162 object->numbigbufs = test_var;
15164 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15165 PyInt_Type.tp_name, PyLong_Type.tp_name);
15172 static PyObject *py_srvsvc_NetSrvInfo403_get_numfiletasks(PyObject *obj, void *closure)
15174 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15175 PyObject *py_numfiletasks;
15176 py_numfiletasks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numfiletasks);
15177 return py_numfiletasks;
15180 static int py_srvsvc_NetSrvInfo403_set_numfiletasks(PyObject *py_obj, PyObject *value, void *closure)
15182 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15183 if (value == NULL) {
15184 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numfiletasks");
15188 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numfiletasks));
15189 if (PyLong_Check(value)) {
15190 unsigned long long test_var;
15191 test_var = PyLong_AsUnsignedLongLong(value);
15192 if (PyErr_Occurred() != NULL) {
15195 if (test_var > uint_max) {
15196 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15197 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15200 object->numfiletasks = test_var;
15201 } else if (PyInt_Check(value)) {
15203 test_var = PyInt_AsLong(value);
15204 if (test_var < 0 || test_var > uint_max) {
15205 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15206 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15209 object->numfiletasks = test_var;
15211 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15212 PyInt_Type.tp_name, PyLong_Type.tp_name);
15219 static PyObject *py_srvsvc_NetSrvInfo403_get_alertsched(PyObject *obj, void *closure)
15221 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15222 PyObject *py_alertsched;
15223 py_alertsched = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
15224 return py_alertsched;
15227 static int py_srvsvc_NetSrvInfo403_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
15229 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15230 if (value == NULL) {
15231 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alertsched");
15235 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
15236 if (PyLong_Check(value)) {
15237 unsigned long long test_var;
15238 test_var = PyLong_AsUnsignedLongLong(value);
15239 if (PyErr_Occurred() != NULL) {
15242 if (test_var > uint_max) {
15243 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15244 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15247 object->alertsched = test_var;
15248 } else if (PyInt_Check(value)) {
15250 test_var = PyInt_AsLong(value);
15251 if (test_var < 0 || test_var > uint_max) {
15252 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15253 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15256 object->alertsched = test_var;
15258 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15259 PyInt_Type.tp_name, PyLong_Type.tp_name);
15266 static PyObject *py_srvsvc_NetSrvInfo403_get_erroralert(PyObject *obj, void *closure)
15268 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15269 PyObject *py_erroralert;
15270 py_erroralert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->erroralert);
15271 return py_erroralert;
15274 static int py_srvsvc_NetSrvInfo403_set_erroralert(PyObject *py_obj, PyObject *value, void *closure)
15276 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15277 if (value == NULL) {
15278 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->erroralert");
15282 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->erroralert));
15283 if (PyLong_Check(value)) {
15284 unsigned long long test_var;
15285 test_var = PyLong_AsUnsignedLongLong(value);
15286 if (PyErr_Occurred() != NULL) {
15289 if (test_var > uint_max) {
15290 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15291 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15294 object->erroralert = test_var;
15295 } else if (PyInt_Check(value)) {
15297 test_var = PyInt_AsLong(value);
15298 if (test_var < 0 || test_var > uint_max) {
15299 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15300 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15303 object->erroralert = test_var;
15305 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15306 PyInt_Type.tp_name, PyLong_Type.tp_name);
15313 static PyObject *py_srvsvc_NetSrvInfo403_get_logonalert(PyObject *obj, void *closure)
15315 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15316 PyObject *py_logonalert;
15317 py_logonalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->logonalert);
15318 return py_logonalert;
15321 static int py_srvsvc_NetSrvInfo403_set_logonalert(PyObject *py_obj, PyObject *value, void *closure)
15323 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15324 if (value == NULL) {
15325 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logonalert");
15329 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logonalert));
15330 if (PyLong_Check(value)) {
15331 unsigned long long test_var;
15332 test_var = PyLong_AsUnsignedLongLong(value);
15333 if (PyErr_Occurred() != NULL) {
15336 if (test_var > uint_max) {
15337 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15338 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15341 object->logonalert = test_var;
15342 } else if (PyInt_Check(value)) {
15344 test_var = PyInt_AsLong(value);
15345 if (test_var < 0 || test_var > uint_max) {
15346 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15347 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15350 object->logonalert = test_var;
15352 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15353 PyInt_Type.tp_name, PyLong_Type.tp_name);
15360 static PyObject *py_srvsvc_NetSrvInfo403_get_accessalert(PyObject *obj, void *closure)
15362 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15363 PyObject *py_accessalert;
15364 py_accessalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->accessalert);
15365 return py_accessalert;
15368 static int py_srvsvc_NetSrvInfo403_set_accessalert(PyObject *py_obj, PyObject *value, void *closure)
15370 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15371 if (value == NULL) {
15372 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->accessalert");
15376 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->accessalert));
15377 if (PyLong_Check(value)) {
15378 unsigned long long test_var;
15379 test_var = PyLong_AsUnsignedLongLong(value);
15380 if (PyErr_Occurred() != NULL) {
15383 if (test_var > uint_max) {
15384 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15385 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15388 object->accessalert = test_var;
15389 } else if (PyInt_Check(value)) {
15391 test_var = PyInt_AsLong(value);
15392 if (test_var < 0 || test_var > uint_max) {
15393 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15394 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15397 object->accessalert = test_var;
15399 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15400 PyInt_Type.tp_name, PyLong_Type.tp_name);
15407 static PyObject *py_srvsvc_NetSrvInfo403_get_diskalert(PyObject *obj, void *closure)
15409 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15410 PyObject *py_diskalert;
15411 py_diskalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->diskalert);
15412 return py_diskalert;
15415 static int py_srvsvc_NetSrvInfo403_set_diskalert(PyObject *py_obj, PyObject *value, void *closure)
15417 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15418 if (value == NULL) {
15419 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->diskalert");
15423 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskalert));
15424 if (PyLong_Check(value)) {
15425 unsigned long long test_var;
15426 test_var = PyLong_AsUnsignedLongLong(value);
15427 if (PyErr_Occurred() != NULL) {
15430 if (test_var > uint_max) {
15431 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15432 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15435 object->diskalert = test_var;
15436 } else if (PyInt_Check(value)) {
15438 test_var = PyInt_AsLong(value);
15439 if (test_var < 0 || test_var > uint_max) {
15440 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15441 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15444 object->diskalert = test_var;
15446 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15447 PyInt_Type.tp_name, PyLong_Type.tp_name);
15454 static PyObject *py_srvsvc_NetSrvInfo403_get_netioalert(PyObject *obj, void *closure)
15456 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15457 PyObject *py_netioalert;
15458 py_netioalert = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->netioalert);
15459 return py_netioalert;
15462 static int py_srvsvc_NetSrvInfo403_set_netioalert(PyObject *py_obj, PyObject *value, void *closure)
15464 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15465 if (value == NULL) {
15466 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netioalert");
15470 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->netioalert));
15471 if (PyLong_Check(value)) {
15472 unsigned long long test_var;
15473 test_var = PyLong_AsUnsignedLongLong(value);
15474 if (PyErr_Occurred() != NULL) {
15477 if (test_var > uint_max) {
15478 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15479 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15482 object->netioalert = test_var;
15483 } else if (PyInt_Check(value)) {
15485 test_var = PyInt_AsLong(value);
15486 if (test_var < 0 || test_var > uint_max) {
15487 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15488 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15491 object->netioalert = test_var;
15493 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15494 PyInt_Type.tp_name, PyLong_Type.tp_name);
15501 static PyObject *py_srvsvc_NetSrvInfo403_get_maxaudits(PyObject *obj, void *closure)
15503 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15504 PyObject *py_maxaudits;
15505 py_maxaudits = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxaudits);
15506 return py_maxaudits;
15509 static int py_srvsvc_NetSrvInfo403_set_maxaudits(PyObject *py_obj, PyObject *value, void *closure)
15511 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15512 if (value == NULL) {
15513 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxaudits");
15517 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxaudits));
15518 if (PyLong_Check(value)) {
15519 unsigned long long test_var;
15520 test_var = PyLong_AsUnsignedLongLong(value);
15521 if (PyErr_Occurred() != NULL) {
15524 if (test_var > uint_max) {
15525 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15526 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15529 object->maxaudits = test_var;
15530 } else if (PyInt_Check(value)) {
15532 test_var = PyInt_AsLong(value);
15533 if (test_var < 0 || test_var > uint_max) {
15534 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15535 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15538 object->maxaudits = test_var;
15540 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15541 PyInt_Type.tp_name, PyLong_Type.tp_name);
15548 static PyObject *py_srvsvc_NetSrvInfo403_get_srvheuristics(PyObject *obj, void *closure)
15550 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15551 PyObject *py_srvheuristics;
15552 if (object->srvheuristics == NULL) {
15553 py_srvheuristics = Py_None;
15554 Py_INCREF(py_srvheuristics);
15556 if (object->srvheuristics == NULL) {
15557 py_srvheuristics = Py_None;
15558 Py_INCREF(py_srvheuristics);
15560 py_srvheuristics = PyUnicode_Decode(object->srvheuristics, strlen(object->srvheuristics), "utf-8", "ignore");
15563 return py_srvheuristics;
15566 static int py_srvsvc_NetSrvInfo403_set_srvheuristics(PyObject *py_obj, PyObject *value, void *closure)
15568 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15569 if (value == NULL) {
15570 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->srvheuristics");
15573 if (value == Py_None) {
15574 object->srvheuristics = NULL;
15576 object->srvheuristics = NULL;
15577 if (value == NULL) {
15578 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->srvheuristics");
15582 const char *test_str;
15583 const char *talloc_str;
15584 PyObject *unicode = NULL;
15585 if (PyUnicode_Check(value)) {
15586 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
15587 if (unicode == NULL) {
15591 test_str = PyString_AS_STRING(unicode);
15592 } else if (PyString_Check(value)) {
15593 test_str = PyString_AS_STRING(value);
15595 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
15598 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
15599 if (unicode != NULL) {
15600 Py_DECREF(unicode);
15602 if (talloc_str == NULL) {
15606 object->srvheuristics = talloc_str;
15612 static PyObject *py_srvsvc_NetSrvInfo403_get_auditedevents(PyObject *obj, void *closure)
15614 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15615 PyObject *py_auditedevents;
15616 py_auditedevents = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->auditedevents);
15617 return py_auditedevents;
15620 static int py_srvsvc_NetSrvInfo403_set_auditedevents(PyObject *py_obj, PyObject *value, void *closure)
15622 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15623 if (value == NULL) {
15624 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auditedevents");
15628 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditedevents));
15629 if (PyLong_Check(value)) {
15630 unsigned long long test_var;
15631 test_var = PyLong_AsUnsignedLongLong(value);
15632 if (PyErr_Occurred() != NULL) {
15635 if (test_var > uint_max) {
15636 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15637 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15640 object->auditedevents = test_var;
15641 } else if (PyInt_Check(value)) {
15643 test_var = PyInt_AsLong(value);
15644 if (test_var < 0 || test_var > uint_max) {
15645 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15646 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15649 object->auditedevents = test_var;
15651 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15652 PyInt_Type.tp_name, PyLong_Type.tp_name);
15659 static PyObject *py_srvsvc_NetSrvInfo403_get_auditprofile(PyObject *obj, void *closure)
15661 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15662 PyObject *py_auditprofile;
15663 py_auditprofile = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->auditprofile);
15664 return py_auditprofile;
15667 static int py_srvsvc_NetSrvInfo403_set_auditprofile(PyObject *py_obj, PyObject *value, void *closure)
15669 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15670 if (value == NULL) {
15671 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auditprofile");
15675 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditprofile));
15676 if (PyLong_Check(value)) {
15677 unsigned long long test_var;
15678 test_var = PyLong_AsUnsignedLongLong(value);
15679 if (PyErr_Occurred() != NULL) {
15682 if (test_var > uint_max) {
15683 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
15684 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15687 object->auditprofile = test_var;
15688 } else if (PyInt_Check(value)) {
15690 test_var = PyInt_AsLong(value);
15691 if (test_var < 0 || test_var > uint_max) {
15692 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
15693 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
15696 object->auditprofile = test_var;
15698 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15699 PyInt_Type.tp_name, PyLong_Type.tp_name);
15706 static PyObject *py_srvsvc_NetSrvInfo403_get_autopath(PyObject *obj, void *closure)
15708 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
15709 PyObject *py_autopath;
15710 if (object->autopath == NULL) {
15711 py_autopath = Py_None;
15712 Py_INCREF(py_autopath);
15714 if (object->autopath == NULL) {
15715 py_autopath = Py_None;
15716 Py_INCREF(py_autopath);
15718 py_autopath = PyUnicode_Decode(object->autopath, strlen(object->autopath), "utf-8", "ignore");
15721 return py_autopath;
15724 static int py_srvsvc_NetSrvInfo403_set_autopath(PyObject *py_obj, PyObject *value, void *closure)
15726 struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
15727 if (value == NULL) {
15728 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->autopath");
15731 if (value == Py_None) {
15732 object->autopath = NULL;
15734 object->autopath = NULL;
15735 if (value == NULL) {
15736 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->autopath");
15740 const char *test_str;
15741 const char *talloc_str;
15742 PyObject *unicode = NULL;
15743 if (PyUnicode_Check(value)) {
15744 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
15745 if (unicode == NULL) {
15749 test_str = PyString_AS_STRING(unicode);
15750 } else if (PyString_Check(value)) {
15751 test_str = PyString_AS_STRING(value);
15753 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
15756 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
15757 if (unicode != NULL) {
15758 Py_DECREF(unicode);
15760 if (talloc_str == NULL) {
15764 object->autopath = talloc_str;
15770 static PyGetSetDef py_srvsvc_NetSrvInfo403_getsetters[] = {
15772 .name = discard_const_p(char, "ulist_mtime"),
15773 .get = py_srvsvc_NetSrvInfo403_get_ulist_mtime,
15774 .set = py_srvsvc_NetSrvInfo403_set_ulist_mtime,
15775 .doc = discard_const_p(char, "PIDL-generated element ulist_mtime")
15778 .name = discard_const_p(char, "glist_mtime"),
15779 .get = py_srvsvc_NetSrvInfo403_get_glist_mtime,
15780 .set = py_srvsvc_NetSrvInfo403_set_glist_mtime,
15781 .doc = discard_const_p(char, "PIDL-generated element glist_mtime")
15784 .name = discard_const_p(char, "alist_mtime"),
15785 .get = py_srvsvc_NetSrvInfo403_get_alist_mtime,
15786 .set = py_srvsvc_NetSrvInfo403_set_alist_mtime,
15787 .doc = discard_const_p(char, "PIDL-generated element alist_mtime")
15790 .name = discard_const_p(char, "alerts"),
15791 .get = py_srvsvc_NetSrvInfo403_get_alerts,
15792 .set = py_srvsvc_NetSrvInfo403_set_alerts,
15793 .doc = discard_const_p(char, "PIDL-generated element alerts")
15796 .name = discard_const_p(char, "security"),
15797 .get = py_srvsvc_NetSrvInfo403_get_security,
15798 .set = py_srvsvc_NetSrvInfo403_set_security,
15799 .doc = discard_const_p(char, "PIDL-generated element security")
15802 .name = discard_const_p(char, "numadmin"),
15803 .get = py_srvsvc_NetSrvInfo403_get_numadmin,
15804 .set = py_srvsvc_NetSrvInfo403_set_numadmin,
15805 .doc = discard_const_p(char, "PIDL-generated element numadmin")
15808 .name = discard_const_p(char, "lanmask"),
15809 .get = py_srvsvc_NetSrvInfo403_get_lanmask,
15810 .set = py_srvsvc_NetSrvInfo403_set_lanmask,
15811 .doc = discard_const_p(char, "PIDL-generated element lanmask")
15814 .name = discard_const_p(char, "guestaccount"),
15815 .get = py_srvsvc_NetSrvInfo403_get_guestaccount,
15816 .set = py_srvsvc_NetSrvInfo403_set_guestaccount,
15817 .doc = discard_const_p(char, "PIDL-generated element guestaccount")
15820 .name = discard_const_p(char, "chdevs"),
15821 .get = py_srvsvc_NetSrvInfo403_get_chdevs,
15822 .set = py_srvsvc_NetSrvInfo403_set_chdevs,
15823 .doc = discard_const_p(char, "PIDL-generated element chdevs")
15826 .name = discard_const_p(char, "chdevqs"),
15827 .get = py_srvsvc_NetSrvInfo403_get_chdevqs,
15828 .set = py_srvsvc_NetSrvInfo403_set_chdevqs,
15829 .doc = discard_const_p(char, "PIDL-generated element chdevqs")
15832 .name = discard_const_p(char, "chdevjobs"),
15833 .get = py_srvsvc_NetSrvInfo403_get_chdevjobs,
15834 .set = py_srvsvc_NetSrvInfo403_set_chdevjobs,
15835 .doc = discard_const_p(char, "PIDL-generated element chdevjobs")
15838 .name = discard_const_p(char, "connections"),
15839 .get = py_srvsvc_NetSrvInfo403_get_connections,
15840 .set = py_srvsvc_NetSrvInfo403_set_connections,
15841 .doc = discard_const_p(char, "PIDL-generated element connections")
15844 .name = discard_const_p(char, "shares"),
15845 .get = py_srvsvc_NetSrvInfo403_get_shares,
15846 .set = py_srvsvc_NetSrvInfo403_set_shares,
15847 .doc = discard_const_p(char, "PIDL-generated element shares")
15850 .name = discard_const_p(char, "openfiles"),
15851 .get = py_srvsvc_NetSrvInfo403_get_openfiles,
15852 .set = py_srvsvc_NetSrvInfo403_set_openfiles,
15853 .doc = discard_const_p(char, "PIDL-generated element openfiles")
15856 .name = discard_const_p(char, "sessopen"),
15857 .get = py_srvsvc_NetSrvInfo403_get_sessopen,
15858 .set = py_srvsvc_NetSrvInfo403_set_sessopen,
15859 .doc = discard_const_p(char, "PIDL-generated element sessopen")
15862 .name = discard_const_p(char, "sesssvc"),
15863 .get = py_srvsvc_NetSrvInfo403_get_sesssvc,
15864 .set = py_srvsvc_NetSrvInfo403_set_sesssvc,
15865 .doc = discard_const_p(char, "PIDL-generated element sesssvc")
15868 .name = discard_const_p(char, "sessreqs"),
15869 .get = py_srvsvc_NetSrvInfo403_get_sessreqs,
15870 .set = py_srvsvc_NetSrvInfo403_set_sessreqs,
15871 .doc = discard_const_p(char, "PIDL-generated element sessreqs")
15874 .name = discard_const_p(char, "opensearch"),
15875 .get = py_srvsvc_NetSrvInfo403_get_opensearch,
15876 .set = py_srvsvc_NetSrvInfo403_set_opensearch,
15877 .doc = discard_const_p(char, "PIDL-generated element opensearch")
15880 .name = discard_const_p(char, "activelocks"),
15881 .get = py_srvsvc_NetSrvInfo403_get_activelocks,
15882 .set = py_srvsvc_NetSrvInfo403_set_activelocks,
15883 .doc = discard_const_p(char, "PIDL-generated element activelocks")
15886 .name = discard_const_p(char, "numreqbufs"),
15887 .get = py_srvsvc_NetSrvInfo403_get_numreqbufs,
15888 .set = py_srvsvc_NetSrvInfo403_set_numreqbufs,
15889 .doc = discard_const_p(char, "PIDL-generated element numreqbufs")
15892 .name = discard_const_p(char, "sizereqbufs"),
15893 .get = py_srvsvc_NetSrvInfo403_get_sizereqbufs,
15894 .set = py_srvsvc_NetSrvInfo403_set_sizereqbufs,
15895 .doc = discard_const_p(char, "PIDL-generated element sizereqbufs")
15898 .name = discard_const_p(char, "numbigbufs"),
15899 .get = py_srvsvc_NetSrvInfo403_get_numbigbufs,
15900 .set = py_srvsvc_NetSrvInfo403_set_numbigbufs,
15901 .doc = discard_const_p(char, "PIDL-generated element numbigbufs")
15904 .name = discard_const_p(char, "numfiletasks"),
15905 .get = py_srvsvc_NetSrvInfo403_get_numfiletasks,
15906 .set = py_srvsvc_NetSrvInfo403_set_numfiletasks,
15907 .doc = discard_const_p(char, "PIDL-generated element numfiletasks")
15910 .name = discard_const_p(char, "alertsched"),
15911 .get = py_srvsvc_NetSrvInfo403_get_alertsched,
15912 .set = py_srvsvc_NetSrvInfo403_set_alertsched,
15913 .doc = discard_const_p(char, "PIDL-generated element alertsched")
15916 .name = discard_const_p(char, "erroralert"),
15917 .get = py_srvsvc_NetSrvInfo403_get_erroralert,
15918 .set = py_srvsvc_NetSrvInfo403_set_erroralert,
15919 .doc = discard_const_p(char, "PIDL-generated element erroralert")
15922 .name = discard_const_p(char, "logonalert"),
15923 .get = py_srvsvc_NetSrvInfo403_get_logonalert,
15924 .set = py_srvsvc_NetSrvInfo403_set_logonalert,
15925 .doc = discard_const_p(char, "PIDL-generated element logonalert")
15928 .name = discard_const_p(char, "accessalert"),
15929 .get = py_srvsvc_NetSrvInfo403_get_accessalert,
15930 .set = py_srvsvc_NetSrvInfo403_set_accessalert,
15931 .doc = discard_const_p(char, "PIDL-generated element accessalert")
15934 .name = discard_const_p(char, "diskalert"),
15935 .get = py_srvsvc_NetSrvInfo403_get_diskalert,
15936 .set = py_srvsvc_NetSrvInfo403_set_diskalert,
15937 .doc = discard_const_p(char, "PIDL-generated element diskalert")
15940 .name = discard_const_p(char, "netioalert"),
15941 .get = py_srvsvc_NetSrvInfo403_get_netioalert,
15942 .set = py_srvsvc_NetSrvInfo403_set_netioalert,
15943 .doc = discard_const_p(char, "PIDL-generated element netioalert")
15946 .name = discard_const_p(char, "maxaudits"),
15947 .get = py_srvsvc_NetSrvInfo403_get_maxaudits,
15948 .set = py_srvsvc_NetSrvInfo403_set_maxaudits,
15949 .doc = discard_const_p(char, "PIDL-generated element maxaudits")
15952 .name = discard_const_p(char, "srvheuristics"),
15953 .get = py_srvsvc_NetSrvInfo403_get_srvheuristics,
15954 .set = py_srvsvc_NetSrvInfo403_set_srvheuristics,
15955 .doc = discard_const_p(char, "PIDL-generated element srvheuristics")
15958 .name = discard_const_p(char, "auditedevents"),
15959 .get = py_srvsvc_NetSrvInfo403_get_auditedevents,
15960 .set = py_srvsvc_NetSrvInfo403_set_auditedevents,
15961 .doc = discard_const_p(char, "PIDL-generated element auditedevents")
15964 .name = discard_const_p(char, "auditprofile"),
15965 .get = py_srvsvc_NetSrvInfo403_get_auditprofile,
15966 .set = py_srvsvc_NetSrvInfo403_set_auditprofile,
15967 .doc = discard_const_p(char, "PIDL-generated element auditprofile")
15970 .name = discard_const_p(char, "autopath"),
15971 .get = py_srvsvc_NetSrvInfo403_get_autopath,
15972 .set = py_srvsvc_NetSrvInfo403_set_autopath,
15973 .doc = discard_const_p(char, "PIDL-generated element autopath")
15978 static PyObject *py_srvsvc_NetSrvInfo403_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
15980 return pytalloc_new(struct srvsvc_NetSrvInfo403, type);
15984 static PyTypeObject srvsvc_NetSrvInfo403_Type = {
15985 PyObject_HEAD_INIT(NULL) 0,
15986 .tp_name = "srvsvc.NetSrvInfo403",
15987 .tp_getset = py_srvsvc_NetSrvInfo403_getsetters,
15988 .tp_methods = NULL,
15989 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
15990 .tp_new = py_srvsvc_NetSrvInfo403_new,
15994 static PyObject *py_srvsvc_NetSrvInfo502_get_sessopen(PyObject *obj, void *closure)
15996 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
15997 PyObject *py_sessopen;
15998 py_sessopen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
15999 return py_sessopen;
16002 static int py_srvsvc_NetSrvInfo502_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
16004 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16005 if (value == NULL) {
16006 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopen");
16010 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
16011 if (PyLong_Check(value)) {
16012 unsigned long long test_var;
16013 test_var = PyLong_AsUnsignedLongLong(value);
16014 if (PyErr_Occurred() != NULL) {
16017 if (test_var > uint_max) {
16018 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16019 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16022 object->sessopen = test_var;
16023 } else if (PyInt_Check(value)) {
16025 test_var = PyInt_AsLong(value);
16026 if (test_var < 0 || test_var > uint_max) {
16027 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16028 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16031 object->sessopen = test_var;
16033 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16034 PyInt_Type.tp_name, PyLong_Type.tp_name);
16041 static PyObject *py_srvsvc_NetSrvInfo502_get_sesssvc(PyObject *obj, void *closure)
16043 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16044 PyObject *py_sesssvc;
16045 py_sesssvc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
16049 static int py_srvsvc_NetSrvInfo502_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
16051 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16052 if (value == NULL) {
16053 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesssvc");
16057 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
16058 if (PyLong_Check(value)) {
16059 unsigned long long test_var;
16060 test_var = PyLong_AsUnsignedLongLong(value);
16061 if (PyErr_Occurred() != NULL) {
16064 if (test_var > uint_max) {
16065 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16066 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16069 object->sesssvc = test_var;
16070 } else if (PyInt_Check(value)) {
16072 test_var = PyInt_AsLong(value);
16073 if (test_var < 0 || test_var > uint_max) {
16074 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16075 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16078 object->sesssvc = test_var;
16080 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16081 PyInt_Type.tp_name, PyLong_Type.tp_name);
16088 static PyObject *py_srvsvc_NetSrvInfo502_get_opensearch(PyObject *obj, void *closure)
16090 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16091 PyObject *py_opensearch;
16092 py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
16093 return py_opensearch;
16096 static int py_srvsvc_NetSrvInfo502_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
16098 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16099 if (value == NULL) {
16100 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
16104 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
16105 if (PyLong_Check(value)) {
16106 unsigned long long test_var;
16107 test_var = PyLong_AsUnsignedLongLong(value);
16108 if (PyErr_Occurred() != NULL) {
16111 if (test_var > uint_max) {
16112 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16113 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16116 object->opensearch = test_var;
16117 } else if (PyInt_Check(value)) {
16119 test_var = PyInt_AsLong(value);
16120 if (test_var < 0 || test_var > uint_max) {
16121 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16122 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16125 object->opensearch = test_var;
16127 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16128 PyInt_Type.tp_name, PyLong_Type.tp_name);
16135 static PyObject *py_srvsvc_NetSrvInfo502_get_sizereqbufs(PyObject *obj, void *closure)
16137 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16138 PyObject *py_sizereqbufs;
16139 py_sizereqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
16140 return py_sizereqbufs;
16143 static int py_srvsvc_NetSrvInfo502_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
16145 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16146 if (value == NULL) {
16147 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sizereqbufs");
16151 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
16152 if (PyLong_Check(value)) {
16153 unsigned long long test_var;
16154 test_var = PyLong_AsUnsignedLongLong(value);
16155 if (PyErr_Occurred() != NULL) {
16158 if (test_var > uint_max) {
16159 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16160 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16163 object->sizereqbufs = test_var;
16164 } else if (PyInt_Check(value)) {
16166 test_var = PyInt_AsLong(value);
16167 if (test_var < 0 || test_var > uint_max) {
16168 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16169 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16172 object->sizereqbufs = test_var;
16174 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16175 PyInt_Type.tp_name, PyLong_Type.tp_name);
16182 static PyObject *py_srvsvc_NetSrvInfo502_get_initworkitems(PyObject *obj, void *closure)
16184 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16185 PyObject *py_initworkitems;
16186 py_initworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initworkitems);
16187 return py_initworkitems;
16190 static int py_srvsvc_NetSrvInfo502_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
16192 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16193 if (value == NULL) {
16194 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initworkitems");
16198 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
16199 if (PyLong_Check(value)) {
16200 unsigned long long test_var;
16201 test_var = PyLong_AsUnsignedLongLong(value);
16202 if (PyErr_Occurred() != NULL) {
16205 if (test_var > uint_max) {
16206 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16207 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16210 object->initworkitems = test_var;
16211 } else if (PyInt_Check(value)) {
16213 test_var = PyInt_AsLong(value);
16214 if (test_var < 0 || test_var > uint_max) {
16215 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16216 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16219 object->initworkitems = test_var;
16221 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16222 PyInt_Type.tp_name, PyLong_Type.tp_name);
16229 static PyObject *py_srvsvc_NetSrvInfo502_get_maxworkitems(PyObject *obj, void *closure)
16231 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16232 PyObject *py_maxworkitems;
16233 py_maxworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
16234 return py_maxworkitems;
16237 static int py_srvsvc_NetSrvInfo502_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
16239 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16240 if (value == NULL) {
16241 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitems");
16245 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
16246 if (PyLong_Check(value)) {
16247 unsigned long long test_var;
16248 test_var = PyLong_AsUnsignedLongLong(value);
16249 if (PyErr_Occurred() != NULL) {
16252 if (test_var > uint_max) {
16253 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16254 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16257 object->maxworkitems = test_var;
16258 } else if (PyInt_Check(value)) {
16260 test_var = PyInt_AsLong(value);
16261 if (test_var < 0 || test_var > uint_max) {
16262 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16263 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16266 object->maxworkitems = test_var;
16268 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16269 PyInt_Type.tp_name, PyLong_Type.tp_name);
16276 static PyObject *py_srvsvc_NetSrvInfo502_get_rawworkitems(PyObject *obj, void *closure)
16278 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16279 PyObject *py_rawworkitems;
16280 py_rawworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->rawworkitems);
16281 return py_rawworkitems;
16284 static int py_srvsvc_NetSrvInfo502_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
16286 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16287 if (value == NULL) {
16288 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rawworkitems");
16292 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
16293 if (PyLong_Check(value)) {
16294 unsigned long long test_var;
16295 test_var = PyLong_AsUnsignedLongLong(value);
16296 if (PyErr_Occurred() != NULL) {
16299 if (test_var > uint_max) {
16300 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16301 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16304 object->rawworkitems = test_var;
16305 } else if (PyInt_Check(value)) {
16307 test_var = PyInt_AsLong(value);
16308 if (test_var < 0 || test_var > uint_max) {
16309 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16310 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16313 object->rawworkitems = test_var;
16315 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16316 PyInt_Type.tp_name, PyLong_Type.tp_name);
16323 static PyObject *py_srvsvc_NetSrvInfo502_get_irpstacksize(PyObject *obj, void *closure)
16325 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16326 PyObject *py_irpstacksize;
16327 py_irpstacksize = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->irpstacksize);
16328 return py_irpstacksize;
16331 static int py_srvsvc_NetSrvInfo502_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
16333 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16334 if (value == NULL) {
16335 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->irpstacksize");
16339 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
16340 if (PyLong_Check(value)) {
16341 unsigned long long test_var;
16342 test_var = PyLong_AsUnsignedLongLong(value);
16343 if (PyErr_Occurred() != NULL) {
16346 if (test_var > uint_max) {
16347 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16348 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16351 object->irpstacksize = test_var;
16352 } else if (PyInt_Check(value)) {
16354 test_var = PyInt_AsLong(value);
16355 if (test_var < 0 || test_var > uint_max) {
16356 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16357 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16360 object->irpstacksize = test_var;
16362 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16363 PyInt_Type.tp_name, PyLong_Type.tp_name);
16370 static PyObject *py_srvsvc_NetSrvInfo502_get_maxrawbuflen(PyObject *obj, void *closure)
16372 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16373 PyObject *py_maxrawbuflen;
16374 py_maxrawbuflen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
16375 return py_maxrawbuflen;
16378 static int py_srvsvc_NetSrvInfo502_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
16380 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16381 if (value == NULL) {
16382 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxrawbuflen");
16386 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
16387 if (PyLong_Check(value)) {
16388 unsigned long long test_var;
16389 test_var = PyLong_AsUnsignedLongLong(value);
16390 if (PyErr_Occurred() != NULL) {
16393 if (test_var > uint_max) {
16394 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16395 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16398 object->maxrawbuflen = test_var;
16399 } else if (PyInt_Check(value)) {
16401 test_var = PyInt_AsLong(value);
16402 if (test_var < 0 || test_var > uint_max) {
16403 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16404 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16407 object->maxrawbuflen = test_var;
16409 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16410 PyInt_Type.tp_name, PyLong_Type.tp_name);
16417 static PyObject *py_srvsvc_NetSrvInfo502_get_sessusers(PyObject *obj, void *closure)
16419 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16420 PyObject *py_sessusers;
16421 py_sessusers = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
16422 return py_sessusers;
16425 static int py_srvsvc_NetSrvInfo502_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
16427 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16428 if (value == NULL) {
16429 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessusers");
16433 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
16434 if (PyLong_Check(value)) {
16435 unsigned long long test_var;
16436 test_var = PyLong_AsUnsignedLongLong(value);
16437 if (PyErr_Occurred() != NULL) {
16440 if (test_var > uint_max) {
16441 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16442 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16445 object->sessusers = test_var;
16446 } else if (PyInt_Check(value)) {
16448 test_var = PyInt_AsLong(value);
16449 if (test_var < 0 || test_var > uint_max) {
16450 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16451 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16454 object->sessusers = test_var;
16456 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16457 PyInt_Type.tp_name, PyLong_Type.tp_name);
16464 static PyObject *py_srvsvc_NetSrvInfo502_get_sessconns(PyObject *obj, void *closure)
16466 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16467 PyObject *py_sessconns;
16468 py_sessconns = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessconns);
16469 return py_sessconns;
16472 static int py_srvsvc_NetSrvInfo502_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
16474 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16475 if (value == NULL) {
16476 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessconns");
16480 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
16481 if (PyLong_Check(value)) {
16482 unsigned long long test_var;
16483 test_var = PyLong_AsUnsignedLongLong(value);
16484 if (PyErr_Occurred() != NULL) {
16487 if (test_var > uint_max) {
16488 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16489 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16492 object->sessconns = test_var;
16493 } else if (PyInt_Check(value)) {
16495 test_var = PyInt_AsLong(value);
16496 if (test_var < 0 || test_var > uint_max) {
16497 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16498 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16501 object->sessconns = test_var;
16503 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16504 PyInt_Type.tp_name, PyLong_Type.tp_name);
16511 static PyObject *py_srvsvc_NetSrvInfo502_get_maxpagedmemoryusage(PyObject *obj, void *closure)
16513 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16514 PyObject *py_maxpagedmemoryusage;
16515 py_maxpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
16516 return py_maxpagedmemoryusage;
16519 static int py_srvsvc_NetSrvInfo502_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
16521 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16522 if (value == NULL) {
16523 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxpagedmemoryusage");
16527 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
16528 if (PyLong_Check(value)) {
16529 unsigned long long test_var;
16530 test_var = PyLong_AsUnsignedLongLong(value);
16531 if (PyErr_Occurred() != NULL) {
16534 if (test_var > uint_max) {
16535 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16536 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16539 object->maxpagedmemoryusage = test_var;
16540 } else if (PyInt_Check(value)) {
16542 test_var = PyInt_AsLong(value);
16543 if (test_var < 0 || test_var > uint_max) {
16544 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16545 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16548 object->maxpagedmemoryusage = test_var;
16550 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16551 PyInt_Type.tp_name, PyLong_Type.tp_name);
16558 static PyObject *py_srvsvc_NetSrvInfo502_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
16560 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16561 PyObject *py_maxnonpagedmemoryusage;
16562 py_maxnonpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
16563 return py_maxnonpagedmemoryusage;
16566 static int py_srvsvc_NetSrvInfo502_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
16568 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16569 if (value == NULL) {
16570 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxnonpagedmemoryusage");
16574 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
16575 if (PyLong_Check(value)) {
16576 unsigned long long test_var;
16577 test_var = PyLong_AsUnsignedLongLong(value);
16578 if (PyErr_Occurred() != NULL) {
16581 if (test_var > uint_max) {
16582 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16583 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16586 object->maxnonpagedmemoryusage = test_var;
16587 } else if (PyInt_Check(value)) {
16589 test_var = PyInt_AsLong(value);
16590 if (test_var < 0 || test_var > uint_max) {
16591 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16592 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16595 object->maxnonpagedmemoryusage = test_var;
16597 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16598 PyInt_Type.tp_name, PyLong_Type.tp_name);
16605 static PyObject *py_srvsvc_NetSrvInfo502_get_enablesoftcompat(PyObject *obj, void *closure)
16607 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16608 PyObject *py_enablesoftcompat;
16609 py_enablesoftcompat = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
16610 return py_enablesoftcompat;
16613 static int py_srvsvc_NetSrvInfo502_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
16615 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16616 if (value == NULL) {
16617 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesoftcompat");
16621 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
16622 if (PyLong_Check(value)) {
16623 unsigned long long test_var;
16624 test_var = PyLong_AsUnsignedLongLong(value);
16625 if (PyErr_Occurred() != NULL) {
16628 if (test_var > uint_max) {
16629 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16630 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16633 object->enablesoftcompat = test_var;
16634 } else if (PyInt_Check(value)) {
16636 test_var = PyInt_AsLong(value);
16637 if (test_var < 0 || test_var > uint_max) {
16638 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16639 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16642 object->enablesoftcompat = test_var;
16644 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16645 PyInt_Type.tp_name, PyLong_Type.tp_name);
16652 static PyObject *py_srvsvc_NetSrvInfo502_get_enableforcedlogoff(PyObject *obj, void *closure)
16654 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16655 PyObject *py_enableforcedlogoff;
16656 py_enableforcedlogoff = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
16657 return py_enableforcedlogoff;
16660 static int py_srvsvc_NetSrvInfo502_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
16662 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16663 if (value == NULL) {
16664 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableforcedlogoff");
16668 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
16669 if (PyLong_Check(value)) {
16670 unsigned long long test_var;
16671 test_var = PyLong_AsUnsignedLongLong(value);
16672 if (PyErr_Occurred() != NULL) {
16675 if (test_var > uint_max) {
16676 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16677 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16680 object->enableforcedlogoff = test_var;
16681 } else if (PyInt_Check(value)) {
16683 test_var = PyInt_AsLong(value);
16684 if (test_var < 0 || test_var > uint_max) {
16685 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16686 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16689 object->enableforcedlogoff = test_var;
16691 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16692 PyInt_Type.tp_name, PyLong_Type.tp_name);
16699 static PyObject *py_srvsvc_NetSrvInfo502_get_timesource(PyObject *obj, void *closure)
16701 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16702 PyObject *py_timesource;
16703 py_timesource = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
16704 return py_timesource;
16707 static int py_srvsvc_NetSrvInfo502_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
16709 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16710 if (value == NULL) {
16711 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timesource");
16715 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
16716 if (PyLong_Check(value)) {
16717 unsigned long long test_var;
16718 test_var = PyLong_AsUnsignedLongLong(value);
16719 if (PyErr_Occurred() != NULL) {
16722 if (test_var > uint_max) {
16723 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16724 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16727 object->timesource = test_var;
16728 } else if (PyInt_Check(value)) {
16730 test_var = PyInt_AsLong(value);
16731 if (test_var < 0 || test_var > uint_max) {
16732 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16733 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16736 object->timesource = test_var;
16738 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16739 PyInt_Type.tp_name, PyLong_Type.tp_name);
16746 static PyObject *py_srvsvc_NetSrvInfo502_get_acceptdownlevelapis(PyObject *obj, void *closure)
16748 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16749 PyObject *py_acceptdownlevelapis;
16750 py_acceptdownlevelapis = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->acceptdownlevelapis);
16751 return py_acceptdownlevelapis;
16754 static int py_srvsvc_NetSrvInfo502_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
16756 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16757 if (value == NULL) {
16758 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acceptdownlevelapis");
16762 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
16763 if (PyLong_Check(value)) {
16764 unsigned long long test_var;
16765 test_var = PyLong_AsUnsignedLongLong(value);
16766 if (PyErr_Occurred() != NULL) {
16769 if (test_var > uint_max) {
16770 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16771 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16774 object->acceptdownlevelapis = test_var;
16775 } else if (PyInt_Check(value)) {
16777 test_var = PyInt_AsLong(value);
16778 if (test_var < 0 || test_var > uint_max) {
16779 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16780 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16783 object->acceptdownlevelapis = test_var;
16785 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16786 PyInt_Type.tp_name, PyLong_Type.tp_name);
16793 static PyObject *py_srvsvc_NetSrvInfo502_get_lmannounce(PyObject *obj, void *closure)
16795 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
16796 PyObject *py_lmannounce;
16797 py_lmannounce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
16798 return py_lmannounce;
16801 static int py_srvsvc_NetSrvInfo502_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
16803 struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
16804 if (value == NULL) {
16805 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmannounce");
16809 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
16810 if (PyLong_Check(value)) {
16811 unsigned long long test_var;
16812 test_var = PyLong_AsUnsignedLongLong(value);
16813 if (PyErr_Occurred() != NULL) {
16816 if (test_var > uint_max) {
16817 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16818 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16821 object->lmannounce = test_var;
16822 } else if (PyInt_Check(value)) {
16824 test_var = PyInt_AsLong(value);
16825 if (test_var < 0 || test_var > uint_max) {
16826 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
16827 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16830 object->lmannounce = test_var;
16832 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
16833 PyInt_Type.tp_name, PyLong_Type.tp_name);
16840 static PyGetSetDef py_srvsvc_NetSrvInfo502_getsetters[] = {
16842 .name = discard_const_p(char, "sessopen"),
16843 .get = py_srvsvc_NetSrvInfo502_get_sessopen,
16844 .set = py_srvsvc_NetSrvInfo502_set_sessopen,
16845 .doc = discard_const_p(char, "PIDL-generated element sessopen")
16848 .name = discard_const_p(char, "sesssvc"),
16849 .get = py_srvsvc_NetSrvInfo502_get_sesssvc,
16850 .set = py_srvsvc_NetSrvInfo502_set_sesssvc,
16851 .doc = discard_const_p(char, "PIDL-generated element sesssvc")
16854 .name = discard_const_p(char, "opensearch"),
16855 .get = py_srvsvc_NetSrvInfo502_get_opensearch,
16856 .set = py_srvsvc_NetSrvInfo502_set_opensearch,
16857 .doc = discard_const_p(char, "PIDL-generated element opensearch")
16860 .name = discard_const_p(char, "sizereqbufs"),
16861 .get = py_srvsvc_NetSrvInfo502_get_sizereqbufs,
16862 .set = py_srvsvc_NetSrvInfo502_set_sizereqbufs,
16863 .doc = discard_const_p(char, "PIDL-generated element sizereqbufs")
16866 .name = discard_const_p(char, "initworkitems"),
16867 .get = py_srvsvc_NetSrvInfo502_get_initworkitems,
16868 .set = py_srvsvc_NetSrvInfo502_set_initworkitems,
16869 .doc = discard_const_p(char, "PIDL-generated element initworkitems")
16872 .name = discard_const_p(char, "maxworkitems"),
16873 .get = py_srvsvc_NetSrvInfo502_get_maxworkitems,
16874 .set = py_srvsvc_NetSrvInfo502_set_maxworkitems,
16875 .doc = discard_const_p(char, "PIDL-generated element maxworkitems")
16878 .name = discard_const_p(char, "rawworkitems"),
16879 .get = py_srvsvc_NetSrvInfo502_get_rawworkitems,
16880 .set = py_srvsvc_NetSrvInfo502_set_rawworkitems,
16881 .doc = discard_const_p(char, "PIDL-generated element rawworkitems")
16884 .name = discard_const_p(char, "irpstacksize"),
16885 .get = py_srvsvc_NetSrvInfo502_get_irpstacksize,
16886 .set = py_srvsvc_NetSrvInfo502_set_irpstacksize,
16887 .doc = discard_const_p(char, "PIDL-generated element irpstacksize")
16890 .name = discard_const_p(char, "maxrawbuflen"),
16891 .get = py_srvsvc_NetSrvInfo502_get_maxrawbuflen,
16892 .set = py_srvsvc_NetSrvInfo502_set_maxrawbuflen,
16893 .doc = discard_const_p(char, "PIDL-generated element maxrawbuflen")
16896 .name = discard_const_p(char, "sessusers"),
16897 .get = py_srvsvc_NetSrvInfo502_get_sessusers,
16898 .set = py_srvsvc_NetSrvInfo502_set_sessusers,
16899 .doc = discard_const_p(char, "PIDL-generated element sessusers")
16902 .name = discard_const_p(char, "sessconns"),
16903 .get = py_srvsvc_NetSrvInfo502_get_sessconns,
16904 .set = py_srvsvc_NetSrvInfo502_set_sessconns,
16905 .doc = discard_const_p(char, "PIDL-generated element sessconns")
16908 .name = discard_const_p(char, "maxpagedmemoryusage"),
16909 .get = py_srvsvc_NetSrvInfo502_get_maxpagedmemoryusage,
16910 .set = py_srvsvc_NetSrvInfo502_set_maxpagedmemoryusage,
16911 .doc = discard_const_p(char, "PIDL-generated element maxpagedmemoryusage")
16914 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
16915 .get = py_srvsvc_NetSrvInfo502_get_maxnonpagedmemoryusage,
16916 .set = py_srvsvc_NetSrvInfo502_set_maxnonpagedmemoryusage,
16917 .doc = discard_const_p(char, "PIDL-generated element maxnonpagedmemoryusage")
16920 .name = discard_const_p(char, "enablesoftcompat"),
16921 .get = py_srvsvc_NetSrvInfo502_get_enablesoftcompat,
16922 .set = py_srvsvc_NetSrvInfo502_set_enablesoftcompat,
16923 .doc = discard_const_p(char, "PIDL-generated element enablesoftcompat")
16926 .name = discard_const_p(char, "enableforcedlogoff"),
16927 .get = py_srvsvc_NetSrvInfo502_get_enableforcedlogoff,
16928 .set = py_srvsvc_NetSrvInfo502_set_enableforcedlogoff,
16929 .doc = discard_const_p(char, "PIDL-generated element enableforcedlogoff")
16932 .name = discard_const_p(char, "timesource"),
16933 .get = py_srvsvc_NetSrvInfo502_get_timesource,
16934 .set = py_srvsvc_NetSrvInfo502_set_timesource,
16935 .doc = discard_const_p(char, "PIDL-generated element timesource")
16938 .name = discard_const_p(char, "acceptdownlevelapis"),
16939 .get = py_srvsvc_NetSrvInfo502_get_acceptdownlevelapis,
16940 .set = py_srvsvc_NetSrvInfo502_set_acceptdownlevelapis,
16941 .doc = discard_const_p(char, "PIDL-generated element acceptdownlevelapis")
16944 .name = discard_const_p(char, "lmannounce"),
16945 .get = py_srvsvc_NetSrvInfo502_get_lmannounce,
16946 .set = py_srvsvc_NetSrvInfo502_set_lmannounce,
16947 .doc = discard_const_p(char, "PIDL-generated element lmannounce")
16952 static PyObject *py_srvsvc_NetSrvInfo502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16954 return pytalloc_new(struct srvsvc_NetSrvInfo502, type);
16958 static PyTypeObject srvsvc_NetSrvInfo502_Type = {
16959 PyObject_HEAD_INIT(NULL) 0,
16960 .tp_name = "srvsvc.NetSrvInfo502",
16961 .tp_getset = py_srvsvc_NetSrvInfo502_getsetters,
16962 .tp_methods = NULL,
16963 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
16964 .tp_new = py_srvsvc_NetSrvInfo502_new,
16968 static PyObject *py_srvsvc_NetSrvInfo503_get_sessopen(PyObject *obj, void *closure)
16970 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
16971 PyObject *py_sessopen;
16972 py_sessopen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
16973 return py_sessopen;
16976 static int py_srvsvc_NetSrvInfo503_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
16978 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
16979 if (value == NULL) {
16980 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopen");
16984 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
16985 if (PyLong_Check(value)) {
16986 unsigned long long test_var;
16987 test_var = PyLong_AsUnsignedLongLong(value);
16988 if (PyErr_Occurred() != NULL) {
16991 if (test_var > uint_max) {
16992 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
16993 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
16996 object->sessopen = test_var;
16997 } else if (PyInt_Check(value)) {
16999 test_var = PyInt_AsLong(value);
17000 if (test_var < 0 || test_var > uint_max) {
17001 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17002 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17005 object->sessopen = test_var;
17007 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17008 PyInt_Type.tp_name, PyLong_Type.tp_name);
17015 static PyObject *py_srvsvc_NetSrvInfo503_get_sesssvc(PyObject *obj, void *closure)
17017 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17018 PyObject *py_sesssvc;
17019 py_sesssvc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
17023 static int py_srvsvc_NetSrvInfo503_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
17025 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17026 if (value == NULL) {
17027 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesssvc");
17031 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
17032 if (PyLong_Check(value)) {
17033 unsigned long long test_var;
17034 test_var = PyLong_AsUnsignedLongLong(value);
17035 if (PyErr_Occurred() != NULL) {
17038 if (test_var > uint_max) {
17039 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17040 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17043 object->sesssvc = test_var;
17044 } else if (PyInt_Check(value)) {
17046 test_var = PyInt_AsLong(value);
17047 if (test_var < 0 || test_var > uint_max) {
17048 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17049 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17052 object->sesssvc = test_var;
17054 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17055 PyInt_Type.tp_name, PyLong_Type.tp_name);
17062 static PyObject *py_srvsvc_NetSrvInfo503_get_opensearch(PyObject *obj, void *closure)
17064 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17065 PyObject *py_opensearch;
17066 py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
17067 return py_opensearch;
17070 static int py_srvsvc_NetSrvInfo503_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
17072 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17073 if (value == NULL) {
17074 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
17078 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
17079 if (PyLong_Check(value)) {
17080 unsigned long long test_var;
17081 test_var = PyLong_AsUnsignedLongLong(value);
17082 if (PyErr_Occurred() != NULL) {
17085 if (test_var > uint_max) {
17086 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17087 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17090 object->opensearch = test_var;
17091 } else if (PyInt_Check(value)) {
17093 test_var = PyInt_AsLong(value);
17094 if (test_var < 0 || test_var > uint_max) {
17095 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17096 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17099 object->opensearch = test_var;
17101 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17102 PyInt_Type.tp_name, PyLong_Type.tp_name);
17109 static PyObject *py_srvsvc_NetSrvInfo503_get_sizereqbufs(PyObject *obj, void *closure)
17111 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17112 PyObject *py_sizereqbufs;
17113 py_sizereqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
17114 return py_sizereqbufs;
17117 static int py_srvsvc_NetSrvInfo503_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
17119 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17120 if (value == NULL) {
17121 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sizereqbufs");
17125 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
17126 if (PyLong_Check(value)) {
17127 unsigned long long test_var;
17128 test_var = PyLong_AsUnsignedLongLong(value);
17129 if (PyErr_Occurred() != NULL) {
17132 if (test_var > uint_max) {
17133 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17134 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17137 object->sizereqbufs = test_var;
17138 } else if (PyInt_Check(value)) {
17140 test_var = PyInt_AsLong(value);
17141 if (test_var < 0 || test_var > uint_max) {
17142 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17143 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17146 object->sizereqbufs = test_var;
17148 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17149 PyInt_Type.tp_name, PyLong_Type.tp_name);
17156 static PyObject *py_srvsvc_NetSrvInfo503_get_initworkitems(PyObject *obj, void *closure)
17158 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17159 PyObject *py_initworkitems;
17160 py_initworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initworkitems);
17161 return py_initworkitems;
17164 static int py_srvsvc_NetSrvInfo503_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
17166 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17167 if (value == NULL) {
17168 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initworkitems");
17172 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
17173 if (PyLong_Check(value)) {
17174 unsigned long long test_var;
17175 test_var = PyLong_AsUnsignedLongLong(value);
17176 if (PyErr_Occurred() != NULL) {
17179 if (test_var > uint_max) {
17180 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17181 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17184 object->initworkitems = test_var;
17185 } else if (PyInt_Check(value)) {
17187 test_var = PyInt_AsLong(value);
17188 if (test_var < 0 || test_var > uint_max) {
17189 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17190 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17193 object->initworkitems = test_var;
17195 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17196 PyInt_Type.tp_name, PyLong_Type.tp_name);
17203 static PyObject *py_srvsvc_NetSrvInfo503_get_maxworkitems(PyObject *obj, void *closure)
17205 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17206 PyObject *py_maxworkitems;
17207 py_maxworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
17208 return py_maxworkitems;
17211 static int py_srvsvc_NetSrvInfo503_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
17213 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17214 if (value == NULL) {
17215 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitems");
17219 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
17220 if (PyLong_Check(value)) {
17221 unsigned long long test_var;
17222 test_var = PyLong_AsUnsignedLongLong(value);
17223 if (PyErr_Occurred() != NULL) {
17226 if (test_var > uint_max) {
17227 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17228 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17231 object->maxworkitems = test_var;
17232 } else if (PyInt_Check(value)) {
17234 test_var = PyInt_AsLong(value);
17235 if (test_var < 0 || test_var > uint_max) {
17236 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17237 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17240 object->maxworkitems = test_var;
17242 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17243 PyInt_Type.tp_name, PyLong_Type.tp_name);
17250 static PyObject *py_srvsvc_NetSrvInfo503_get_rawworkitems(PyObject *obj, void *closure)
17252 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17253 PyObject *py_rawworkitems;
17254 py_rawworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->rawworkitems);
17255 return py_rawworkitems;
17258 static int py_srvsvc_NetSrvInfo503_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
17260 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17261 if (value == NULL) {
17262 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rawworkitems");
17266 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
17267 if (PyLong_Check(value)) {
17268 unsigned long long test_var;
17269 test_var = PyLong_AsUnsignedLongLong(value);
17270 if (PyErr_Occurred() != NULL) {
17273 if (test_var > uint_max) {
17274 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17275 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17278 object->rawworkitems = test_var;
17279 } else if (PyInt_Check(value)) {
17281 test_var = PyInt_AsLong(value);
17282 if (test_var < 0 || test_var > uint_max) {
17283 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17284 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17287 object->rawworkitems = test_var;
17289 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17290 PyInt_Type.tp_name, PyLong_Type.tp_name);
17297 static PyObject *py_srvsvc_NetSrvInfo503_get_irpstacksize(PyObject *obj, void *closure)
17299 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17300 PyObject *py_irpstacksize;
17301 py_irpstacksize = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->irpstacksize);
17302 return py_irpstacksize;
17305 static int py_srvsvc_NetSrvInfo503_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
17307 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17308 if (value == NULL) {
17309 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->irpstacksize");
17313 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
17314 if (PyLong_Check(value)) {
17315 unsigned long long test_var;
17316 test_var = PyLong_AsUnsignedLongLong(value);
17317 if (PyErr_Occurred() != NULL) {
17320 if (test_var > uint_max) {
17321 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17322 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17325 object->irpstacksize = test_var;
17326 } else if (PyInt_Check(value)) {
17328 test_var = PyInt_AsLong(value);
17329 if (test_var < 0 || test_var > uint_max) {
17330 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17331 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17334 object->irpstacksize = test_var;
17336 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17337 PyInt_Type.tp_name, PyLong_Type.tp_name);
17344 static PyObject *py_srvsvc_NetSrvInfo503_get_maxrawbuflen(PyObject *obj, void *closure)
17346 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17347 PyObject *py_maxrawbuflen;
17348 py_maxrawbuflen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
17349 return py_maxrawbuflen;
17352 static int py_srvsvc_NetSrvInfo503_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
17354 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17355 if (value == NULL) {
17356 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxrawbuflen");
17360 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
17361 if (PyLong_Check(value)) {
17362 unsigned long long test_var;
17363 test_var = PyLong_AsUnsignedLongLong(value);
17364 if (PyErr_Occurred() != NULL) {
17367 if (test_var > uint_max) {
17368 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17369 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17372 object->maxrawbuflen = test_var;
17373 } else if (PyInt_Check(value)) {
17375 test_var = PyInt_AsLong(value);
17376 if (test_var < 0 || test_var > uint_max) {
17377 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17378 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17381 object->maxrawbuflen = test_var;
17383 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17384 PyInt_Type.tp_name, PyLong_Type.tp_name);
17391 static PyObject *py_srvsvc_NetSrvInfo503_get_sessusers(PyObject *obj, void *closure)
17393 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17394 PyObject *py_sessusers;
17395 py_sessusers = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
17396 return py_sessusers;
17399 static int py_srvsvc_NetSrvInfo503_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
17401 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17402 if (value == NULL) {
17403 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessusers");
17407 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
17408 if (PyLong_Check(value)) {
17409 unsigned long long test_var;
17410 test_var = PyLong_AsUnsignedLongLong(value);
17411 if (PyErr_Occurred() != NULL) {
17414 if (test_var > uint_max) {
17415 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17416 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17419 object->sessusers = test_var;
17420 } else if (PyInt_Check(value)) {
17422 test_var = PyInt_AsLong(value);
17423 if (test_var < 0 || test_var > uint_max) {
17424 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17425 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17428 object->sessusers = test_var;
17430 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17431 PyInt_Type.tp_name, PyLong_Type.tp_name);
17438 static PyObject *py_srvsvc_NetSrvInfo503_get_sessconns(PyObject *obj, void *closure)
17440 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17441 PyObject *py_sessconns;
17442 py_sessconns = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessconns);
17443 return py_sessconns;
17446 static int py_srvsvc_NetSrvInfo503_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
17448 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17449 if (value == NULL) {
17450 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessconns");
17454 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
17455 if (PyLong_Check(value)) {
17456 unsigned long long test_var;
17457 test_var = PyLong_AsUnsignedLongLong(value);
17458 if (PyErr_Occurred() != NULL) {
17461 if (test_var > uint_max) {
17462 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17463 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17466 object->sessconns = test_var;
17467 } else if (PyInt_Check(value)) {
17469 test_var = PyInt_AsLong(value);
17470 if (test_var < 0 || test_var > uint_max) {
17471 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17472 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17475 object->sessconns = test_var;
17477 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17478 PyInt_Type.tp_name, PyLong_Type.tp_name);
17485 static PyObject *py_srvsvc_NetSrvInfo503_get_maxpagedmemoryusage(PyObject *obj, void *closure)
17487 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17488 PyObject *py_maxpagedmemoryusage;
17489 py_maxpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
17490 return py_maxpagedmemoryusage;
17493 static int py_srvsvc_NetSrvInfo503_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
17495 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17496 if (value == NULL) {
17497 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxpagedmemoryusage");
17501 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
17502 if (PyLong_Check(value)) {
17503 unsigned long long test_var;
17504 test_var = PyLong_AsUnsignedLongLong(value);
17505 if (PyErr_Occurred() != NULL) {
17508 if (test_var > uint_max) {
17509 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17510 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17513 object->maxpagedmemoryusage = test_var;
17514 } else if (PyInt_Check(value)) {
17516 test_var = PyInt_AsLong(value);
17517 if (test_var < 0 || test_var > uint_max) {
17518 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17519 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17522 object->maxpagedmemoryusage = test_var;
17524 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17525 PyInt_Type.tp_name, PyLong_Type.tp_name);
17532 static PyObject *py_srvsvc_NetSrvInfo503_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
17534 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17535 PyObject *py_maxnonpagedmemoryusage;
17536 py_maxnonpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
17537 return py_maxnonpagedmemoryusage;
17540 static int py_srvsvc_NetSrvInfo503_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
17542 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17543 if (value == NULL) {
17544 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxnonpagedmemoryusage");
17548 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
17549 if (PyLong_Check(value)) {
17550 unsigned long long test_var;
17551 test_var = PyLong_AsUnsignedLongLong(value);
17552 if (PyErr_Occurred() != NULL) {
17555 if (test_var > uint_max) {
17556 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17557 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17560 object->maxnonpagedmemoryusage = test_var;
17561 } else if (PyInt_Check(value)) {
17563 test_var = PyInt_AsLong(value);
17564 if (test_var < 0 || test_var > uint_max) {
17565 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17566 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17569 object->maxnonpagedmemoryusage = test_var;
17571 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17572 PyInt_Type.tp_name, PyLong_Type.tp_name);
17579 static PyObject *py_srvsvc_NetSrvInfo503_get_enablesoftcompat(PyObject *obj, void *closure)
17581 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17582 PyObject *py_enablesoftcompat;
17583 py_enablesoftcompat = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
17584 return py_enablesoftcompat;
17587 static int py_srvsvc_NetSrvInfo503_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
17589 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17590 if (value == NULL) {
17591 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesoftcompat");
17595 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
17596 if (PyLong_Check(value)) {
17597 unsigned long long test_var;
17598 test_var = PyLong_AsUnsignedLongLong(value);
17599 if (PyErr_Occurred() != NULL) {
17602 if (test_var > uint_max) {
17603 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17604 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17607 object->enablesoftcompat = test_var;
17608 } else if (PyInt_Check(value)) {
17610 test_var = PyInt_AsLong(value);
17611 if (test_var < 0 || test_var > uint_max) {
17612 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17613 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17616 object->enablesoftcompat = test_var;
17618 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17619 PyInt_Type.tp_name, PyLong_Type.tp_name);
17626 static PyObject *py_srvsvc_NetSrvInfo503_get_enableforcedlogoff(PyObject *obj, void *closure)
17628 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17629 PyObject *py_enableforcedlogoff;
17630 py_enableforcedlogoff = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
17631 return py_enableforcedlogoff;
17634 static int py_srvsvc_NetSrvInfo503_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
17636 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17637 if (value == NULL) {
17638 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableforcedlogoff");
17642 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
17643 if (PyLong_Check(value)) {
17644 unsigned long long test_var;
17645 test_var = PyLong_AsUnsignedLongLong(value);
17646 if (PyErr_Occurred() != NULL) {
17649 if (test_var > uint_max) {
17650 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17651 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17654 object->enableforcedlogoff = test_var;
17655 } else if (PyInt_Check(value)) {
17657 test_var = PyInt_AsLong(value);
17658 if (test_var < 0 || test_var > uint_max) {
17659 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17660 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17663 object->enableforcedlogoff = test_var;
17665 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17666 PyInt_Type.tp_name, PyLong_Type.tp_name);
17673 static PyObject *py_srvsvc_NetSrvInfo503_get_timesource(PyObject *obj, void *closure)
17675 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17676 PyObject *py_timesource;
17677 py_timesource = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
17678 return py_timesource;
17681 static int py_srvsvc_NetSrvInfo503_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
17683 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17684 if (value == NULL) {
17685 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timesource");
17689 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
17690 if (PyLong_Check(value)) {
17691 unsigned long long test_var;
17692 test_var = PyLong_AsUnsignedLongLong(value);
17693 if (PyErr_Occurred() != NULL) {
17696 if (test_var > uint_max) {
17697 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17698 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17701 object->timesource = test_var;
17702 } else if (PyInt_Check(value)) {
17704 test_var = PyInt_AsLong(value);
17705 if (test_var < 0 || test_var > uint_max) {
17706 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17707 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17710 object->timesource = test_var;
17712 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17713 PyInt_Type.tp_name, PyLong_Type.tp_name);
17720 static PyObject *py_srvsvc_NetSrvInfo503_get_acceptdownlevelapis(PyObject *obj, void *closure)
17722 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17723 PyObject *py_acceptdownlevelapis;
17724 py_acceptdownlevelapis = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->acceptdownlevelapis);
17725 return py_acceptdownlevelapis;
17728 static int py_srvsvc_NetSrvInfo503_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
17730 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17731 if (value == NULL) {
17732 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acceptdownlevelapis");
17736 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
17737 if (PyLong_Check(value)) {
17738 unsigned long long test_var;
17739 test_var = PyLong_AsUnsignedLongLong(value);
17740 if (PyErr_Occurred() != NULL) {
17743 if (test_var > uint_max) {
17744 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17745 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17748 object->acceptdownlevelapis = test_var;
17749 } else if (PyInt_Check(value)) {
17751 test_var = PyInt_AsLong(value);
17752 if (test_var < 0 || test_var > uint_max) {
17753 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17754 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17757 object->acceptdownlevelapis = test_var;
17759 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17760 PyInt_Type.tp_name, PyLong_Type.tp_name);
17767 static PyObject *py_srvsvc_NetSrvInfo503_get_lmannounce(PyObject *obj, void *closure)
17769 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17770 PyObject *py_lmannounce;
17771 py_lmannounce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
17772 return py_lmannounce;
17775 static int py_srvsvc_NetSrvInfo503_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
17777 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17778 if (value == NULL) {
17779 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmannounce");
17783 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
17784 if (PyLong_Check(value)) {
17785 unsigned long long test_var;
17786 test_var = PyLong_AsUnsignedLongLong(value);
17787 if (PyErr_Occurred() != NULL) {
17790 if (test_var > uint_max) {
17791 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17792 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17795 object->lmannounce = test_var;
17796 } else if (PyInt_Check(value)) {
17798 test_var = PyInt_AsLong(value);
17799 if (test_var < 0 || test_var > uint_max) {
17800 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17801 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17804 object->lmannounce = test_var;
17806 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17807 PyInt_Type.tp_name, PyLong_Type.tp_name);
17814 static PyObject *py_srvsvc_NetSrvInfo503_get_domain(PyObject *obj, void *closure)
17816 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17817 PyObject *py_domain;
17818 if (object->domain == NULL) {
17819 py_domain = Py_None;
17820 Py_INCREF(py_domain);
17822 if (object->domain == NULL) {
17823 py_domain = Py_None;
17824 Py_INCREF(py_domain);
17826 py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
17832 static int py_srvsvc_NetSrvInfo503_set_domain(PyObject *py_obj, PyObject *value, void *closure)
17834 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17835 if (value == NULL) {
17836 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
17839 if (value == Py_None) {
17840 object->domain = NULL;
17842 object->domain = NULL;
17843 if (value == NULL) {
17844 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->domain");
17848 const char *test_str;
17849 const char *talloc_str;
17850 PyObject *unicode = NULL;
17851 if (PyUnicode_Check(value)) {
17852 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
17853 if (unicode == NULL) {
17857 test_str = PyString_AS_STRING(unicode);
17858 } else if (PyString_Check(value)) {
17859 test_str = PyString_AS_STRING(value);
17861 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
17864 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
17865 if (unicode != NULL) {
17866 Py_DECREF(unicode);
17868 if (talloc_str == NULL) {
17872 object->domain = talloc_str;
17878 static PyObject *py_srvsvc_NetSrvInfo503_get_maxcopyreadlen(PyObject *obj, void *closure)
17880 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17881 PyObject *py_maxcopyreadlen;
17882 py_maxcopyreadlen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopyreadlen);
17883 return py_maxcopyreadlen;
17886 static int py_srvsvc_NetSrvInfo503_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
17888 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17889 if (value == NULL) {
17890 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopyreadlen");
17894 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
17895 if (PyLong_Check(value)) {
17896 unsigned long long test_var;
17897 test_var = PyLong_AsUnsignedLongLong(value);
17898 if (PyErr_Occurred() != NULL) {
17901 if (test_var > uint_max) {
17902 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17903 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17906 object->maxcopyreadlen = test_var;
17907 } else if (PyInt_Check(value)) {
17909 test_var = PyInt_AsLong(value);
17910 if (test_var < 0 || test_var > uint_max) {
17911 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17912 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17915 object->maxcopyreadlen = test_var;
17917 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17918 PyInt_Type.tp_name, PyLong_Type.tp_name);
17925 static PyObject *py_srvsvc_NetSrvInfo503_get_maxcopywritelen(PyObject *obj, void *closure)
17927 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17928 PyObject *py_maxcopywritelen;
17929 py_maxcopywritelen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopywritelen);
17930 return py_maxcopywritelen;
17933 static int py_srvsvc_NetSrvInfo503_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
17935 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17936 if (value == NULL) {
17937 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopywritelen");
17941 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
17942 if (PyLong_Check(value)) {
17943 unsigned long long test_var;
17944 test_var = PyLong_AsUnsignedLongLong(value);
17945 if (PyErr_Occurred() != NULL) {
17948 if (test_var > uint_max) {
17949 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17950 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17953 object->maxcopywritelen = test_var;
17954 } else if (PyInt_Check(value)) {
17956 test_var = PyInt_AsLong(value);
17957 if (test_var < 0 || test_var > uint_max) {
17958 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
17959 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
17962 object->maxcopywritelen = test_var;
17964 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
17965 PyInt_Type.tp_name, PyLong_Type.tp_name);
17972 static PyObject *py_srvsvc_NetSrvInfo503_get_minkeepsearch(PyObject *obj, void *closure)
17974 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
17975 PyObject *py_minkeepsearch;
17976 py_minkeepsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepsearch);
17977 return py_minkeepsearch;
17980 static int py_srvsvc_NetSrvInfo503_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
17982 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
17983 if (value == NULL) {
17984 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepsearch");
17988 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
17989 if (PyLong_Check(value)) {
17990 unsigned long long test_var;
17991 test_var = PyLong_AsUnsignedLongLong(value);
17992 if (PyErr_Occurred() != NULL) {
17995 if (test_var > uint_max) {
17996 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
17997 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18000 object->minkeepsearch = test_var;
18001 } else if (PyInt_Check(value)) {
18003 test_var = PyInt_AsLong(value);
18004 if (test_var < 0 || test_var > uint_max) {
18005 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18006 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18009 object->minkeepsearch = test_var;
18011 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18012 PyInt_Type.tp_name, PyLong_Type.tp_name);
18019 static PyObject *py_srvsvc_NetSrvInfo503_get_maxkeepsearch(PyObject *obj, void *closure)
18021 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18022 PyObject *py_maxkeepsearch;
18023 py_maxkeepsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepsearch);
18024 return py_maxkeepsearch;
18027 static int py_srvsvc_NetSrvInfo503_set_maxkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
18029 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18030 if (value == NULL) {
18031 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxkeepsearch");
18035 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepsearch));
18036 if (PyLong_Check(value)) {
18037 unsigned long long test_var;
18038 test_var = PyLong_AsUnsignedLongLong(value);
18039 if (PyErr_Occurred() != NULL) {
18042 if (test_var > uint_max) {
18043 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18044 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18047 object->maxkeepsearch = test_var;
18048 } else if (PyInt_Check(value)) {
18050 test_var = PyInt_AsLong(value);
18051 if (test_var < 0 || test_var > uint_max) {
18052 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18053 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18056 object->maxkeepsearch = test_var;
18058 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18059 PyInt_Type.tp_name, PyLong_Type.tp_name);
18066 static PyObject *py_srvsvc_NetSrvInfo503_get_minkeepcomplsearch(PyObject *obj, void *closure)
18068 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18069 PyObject *py_minkeepcomplsearch;
18070 py_minkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepcomplsearch);
18071 return py_minkeepcomplsearch;
18074 static int py_srvsvc_NetSrvInfo503_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
18076 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18077 if (value == NULL) {
18078 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepcomplsearch");
18082 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
18083 if (PyLong_Check(value)) {
18084 unsigned long long test_var;
18085 test_var = PyLong_AsUnsignedLongLong(value);
18086 if (PyErr_Occurred() != NULL) {
18089 if (test_var > uint_max) {
18090 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18091 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18094 object->minkeepcomplsearch = test_var;
18095 } else if (PyInt_Check(value)) {
18097 test_var = PyInt_AsLong(value);
18098 if (test_var < 0 || test_var > uint_max) {
18099 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18100 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18103 object->minkeepcomplsearch = test_var;
18105 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18106 PyInt_Type.tp_name, PyLong_Type.tp_name);
18113 static PyObject *py_srvsvc_NetSrvInfo503_get_maxkeepcomplsearch(PyObject *obj, void *closure)
18115 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18116 PyObject *py_maxkeepcomplsearch;
18117 py_maxkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepcomplsearch);
18118 return py_maxkeepcomplsearch;
18121 static int py_srvsvc_NetSrvInfo503_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
18123 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18124 if (value == NULL) {
18125 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxkeepcomplsearch");
18129 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
18130 if (PyLong_Check(value)) {
18131 unsigned long long test_var;
18132 test_var = PyLong_AsUnsignedLongLong(value);
18133 if (PyErr_Occurred() != NULL) {
18136 if (test_var > uint_max) {
18137 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18138 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18141 object->maxkeepcomplsearch = test_var;
18142 } else if (PyInt_Check(value)) {
18144 test_var = PyInt_AsLong(value);
18145 if (test_var < 0 || test_var > uint_max) {
18146 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18147 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18150 object->maxkeepcomplsearch = test_var;
18152 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18153 PyInt_Type.tp_name, PyLong_Type.tp_name);
18160 static PyObject *py_srvsvc_NetSrvInfo503_get_threadcountadd(PyObject *obj, void *closure)
18162 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18163 PyObject *py_threadcountadd;
18164 py_threadcountadd = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->threadcountadd);
18165 return py_threadcountadd;
18168 static int py_srvsvc_NetSrvInfo503_set_threadcountadd(PyObject *py_obj, PyObject *value, void *closure)
18170 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18171 if (value == NULL) {
18172 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->threadcountadd");
18176 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadcountadd));
18177 if (PyLong_Check(value)) {
18178 unsigned long long test_var;
18179 test_var = PyLong_AsUnsignedLongLong(value);
18180 if (PyErr_Occurred() != NULL) {
18183 if (test_var > uint_max) {
18184 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18185 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18188 object->threadcountadd = test_var;
18189 } else if (PyInt_Check(value)) {
18191 test_var = PyInt_AsLong(value);
18192 if (test_var < 0 || test_var > uint_max) {
18193 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18194 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18197 object->threadcountadd = test_var;
18199 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18200 PyInt_Type.tp_name, PyLong_Type.tp_name);
18207 static PyObject *py_srvsvc_NetSrvInfo503_get_numlockthreads(PyObject *obj, void *closure)
18209 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18210 PyObject *py_numlockthreads;
18211 py_numlockthreads = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numlockthreads);
18212 return py_numlockthreads;
18215 static int py_srvsvc_NetSrvInfo503_set_numlockthreads(PyObject *py_obj, PyObject *value, void *closure)
18217 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18218 if (value == NULL) {
18219 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numlockthreads");
18223 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numlockthreads));
18224 if (PyLong_Check(value)) {
18225 unsigned long long test_var;
18226 test_var = PyLong_AsUnsignedLongLong(value);
18227 if (PyErr_Occurred() != NULL) {
18230 if (test_var > uint_max) {
18231 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18232 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18235 object->numlockthreads = test_var;
18236 } else if (PyInt_Check(value)) {
18238 test_var = PyInt_AsLong(value);
18239 if (test_var < 0 || test_var > uint_max) {
18240 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18241 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18244 object->numlockthreads = test_var;
18246 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18247 PyInt_Type.tp_name, PyLong_Type.tp_name);
18254 static PyObject *py_srvsvc_NetSrvInfo503_get_scavtimeout(PyObject *obj, void *closure)
18256 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18257 PyObject *py_scavtimeout;
18258 py_scavtimeout = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->scavtimeout);
18259 return py_scavtimeout;
18262 static int py_srvsvc_NetSrvInfo503_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
18264 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18265 if (value == NULL) {
18266 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scavtimeout");
18270 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
18271 if (PyLong_Check(value)) {
18272 unsigned long long test_var;
18273 test_var = PyLong_AsUnsignedLongLong(value);
18274 if (PyErr_Occurred() != NULL) {
18277 if (test_var > uint_max) {
18278 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18279 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18282 object->scavtimeout = test_var;
18283 } else if (PyInt_Check(value)) {
18285 test_var = PyInt_AsLong(value);
18286 if (test_var < 0 || test_var > uint_max) {
18287 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18288 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18291 object->scavtimeout = test_var;
18293 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18294 PyInt_Type.tp_name, PyLong_Type.tp_name);
18301 static PyObject *py_srvsvc_NetSrvInfo503_get_minrcvqueue(PyObject *obj, void *closure)
18303 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18304 PyObject *py_minrcvqueue;
18305 py_minrcvqueue = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minrcvqueue);
18306 return py_minrcvqueue;
18309 static int py_srvsvc_NetSrvInfo503_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
18311 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18312 if (value == NULL) {
18313 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minrcvqueue");
18317 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
18318 if (PyLong_Check(value)) {
18319 unsigned long long test_var;
18320 test_var = PyLong_AsUnsignedLongLong(value);
18321 if (PyErr_Occurred() != NULL) {
18324 if (test_var > uint_max) {
18325 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18326 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18329 object->minrcvqueue = test_var;
18330 } else if (PyInt_Check(value)) {
18332 test_var = PyInt_AsLong(value);
18333 if (test_var < 0 || test_var > uint_max) {
18334 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18335 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18338 object->minrcvqueue = test_var;
18340 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18341 PyInt_Type.tp_name, PyLong_Type.tp_name);
18348 static PyObject *py_srvsvc_NetSrvInfo503_get_minfreeworkitems(PyObject *obj, void *closure)
18350 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18351 PyObject *py_minfreeworkitems;
18352 py_minfreeworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeworkitems);
18353 return py_minfreeworkitems;
18356 static int py_srvsvc_NetSrvInfo503_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
18358 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18359 if (value == NULL) {
18360 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeworkitems");
18364 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
18365 if (PyLong_Check(value)) {
18366 unsigned long long test_var;
18367 test_var = PyLong_AsUnsignedLongLong(value);
18368 if (PyErr_Occurred() != NULL) {
18371 if (test_var > uint_max) {
18372 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18373 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18376 object->minfreeworkitems = test_var;
18377 } else if (PyInt_Check(value)) {
18379 test_var = PyInt_AsLong(value);
18380 if (test_var < 0 || test_var > uint_max) {
18381 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18382 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18385 object->minfreeworkitems = test_var;
18387 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18388 PyInt_Type.tp_name, PyLong_Type.tp_name);
18395 static PyObject *py_srvsvc_NetSrvInfo503_get_xactmemsize(PyObject *obj, void *closure)
18397 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18398 PyObject *py_xactmemsize;
18399 py_xactmemsize = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->xactmemsize);
18400 return py_xactmemsize;
18403 static int py_srvsvc_NetSrvInfo503_set_xactmemsize(PyObject *py_obj, PyObject *value, void *closure)
18405 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18406 if (value == NULL) {
18407 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->xactmemsize");
18411 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->xactmemsize));
18412 if (PyLong_Check(value)) {
18413 unsigned long long test_var;
18414 test_var = PyLong_AsUnsignedLongLong(value);
18415 if (PyErr_Occurred() != NULL) {
18418 if (test_var > uint_max) {
18419 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18420 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18423 object->xactmemsize = test_var;
18424 } else if (PyInt_Check(value)) {
18426 test_var = PyInt_AsLong(value);
18427 if (test_var < 0 || test_var > uint_max) {
18428 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18429 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18432 object->xactmemsize = test_var;
18434 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18435 PyInt_Type.tp_name, PyLong_Type.tp_name);
18442 static PyObject *py_srvsvc_NetSrvInfo503_get_threadpriority(PyObject *obj, void *closure)
18444 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18445 PyObject *py_threadpriority;
18446 py_threadpriority = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->threadpriority);
18447 return py_threadpriority;
18450 static int py_srvsvc_NetSrvInfo503_set_threadpriority(PyObject *py_obj, PyObject *value, void *closure)
18452 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18453 if (value == NULL) {
18454 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->threadpriority");
18458 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadpriority));
18459 if (PyLong_Check(value)) {
18460 unsigned long long test_var;
18461 test_var = PyLong_AsUnsignedLongLong(value);
18462 if (PyErr_Occurred() != NULL) {
18465 if (test_var > uint_max) {
18466 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18467 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18470 object->threadpriority = test_var;
18471 } else if (PyInt_Check(value)) {
18473 test_var = PyInt_AsLong(value);
18474 if (test_var < 0 || test_var > uint_max) {
18475 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18476 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18479 object->threadpriority = test_var;
18481 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18482 PyInt_Type.tp_name, PyLong_Type.tp_name);
18489 static PyObject *py_srvsvc_NetSrvInfo503_get_maxmpxct(PyObject *obj, void *closure)
18491 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18492 PyObject *py_maxmpxct;
18493 py_maxmpxct = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxmpxct);
18494 return py_maxmpxct;
18497 static int py_srvsvc_NetSrvInfo503_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
18499 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18500 if (value == NULL) {
18501 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxmpxct");
18505 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
18506 if (PyLong_Check(value)) {
18507 unsigned long long test_var;
18508 test_var = PyLong_AsUnsignedLongLong(value);
18509 if (PyErr_Occurred() != NULL) {
18512 if (test_var > uint_max) {
18513 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18514 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18517 object->maxmpxct = test_var;
18518 } else if (PyInt_Check(value)) {
18520 test_var = PyInt_AsLong(value);
18521 if (test_var < 0 || test_var > uint_max) {
18522 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18523 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18526 object->maxmpxct = test_var;
18528 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18529 PyInt_Type.tp_name, PyLong_Type.tp_name);
18536 static PyObject *py_srvsvc_NetSrvInfo503_get_oplockbreakwait(PyObject *obj, void *closure)
18538 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18539 PyObject *py_oplockbreakwait;
18540 py_oplockbreakwait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakwait);
18541 return py_oplockbreakwait;
18544 static int py_srvsvc_NetSrvInfo503_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
18546 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18547 if (value == NULL) {
18548 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakwait");
18552 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
18553 if (PyLong_Check(value)) {
18554 unsigned long long test_var;
18555 test_var = PyLong_AsUnsignedLongLong(value);
18556 if (PyErr_Occurred() != NULL) {
18559 if (test_var > uint_max) {
18560 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18561 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18564 object->oplockbreakwait = test_var;
18565 } else if (PyInt_Check(value)) {
18567 test_var = PyInt_AsLong(value);
18568 if (test_var < 0 || test_var > uint_max) {
18569 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18570 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18573 object->oplockbreakwait = test_var;
18575 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18576 PyInt_Type.tp_name, PyLong_Type.tp_name);
18583 static PyObject *py_srvsvc_NetSrvInfo503_get_oplockbreakresponsewait(PyObject *obj, void *closure)
18585 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18586 PyObject *py_oplockbreakresponsewait;
18587 py_oplockbreakresponsewait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakresponsewait);
18588 return py_oplockbreakresponsewait;
18591 static int py_srvsvc_NetSrvInfo503_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
18593 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18594 if (value == NULL) {
18595 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakresponsewait");
18599 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
18600 if (PyLong_Check(value)) {
18601 unsigned long long test_var;
18602 test_var = PyLong_AsUnsignedLongLong(value);
18603 if (PyErr_Occurred() != NULL) {
18606 if (test_var > uint_max) {
18607 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18608 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18611 object->oplockbreakresponsewait = test_var;
18612 } else if (PyInt_Check(value)) {
18614 test_var = PyInt_AsLong(value);
18615 if (test_var < 0 || test_var > uint_max) {
18616 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18617 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18620 object->oplockbreakresponsewait = test_var;
18622 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18623 PyInt_Type.tp_name, PyLong_Type.tp_name);
18630 static PyObject *py_srvsvc_NetSrvInfo503_get_enableoplocks(PyObject *obj, void *closure)
18632 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18633 PyObject *py_enableoplocks;
18634 py_enableoplocks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplocks);
18635 return py_enableoplocks;
18638 static int py_srvsvc_NetSrvInfo503_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
18640 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18641 if (value == NULL) {
18642 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplocks");
18646 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
18647 if (PyLong_Check(value)) {
18648 unsigned long long test_var;
18649 test_var = PyLong_AsUnsignedLongLong(value);
18650 if (PyErr_Occurred() != NULL) {
18653 if (test_var > uint_max) {
18654 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18655 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18658 object->enableoplocks = test_var;
18659 } else if (PyInt_Check(value)) {
18661 test_var = PyInt_AsLong(value);
18662 if (test_var < 0 || test_var > uint_max) {
18663 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18664 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18667 object->enableoplocks = test_var;
18669 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18670 PyInt_Type.tp_name, PyLong_Type.tp_name);
18677 static PyObject *py_srvsvc_NetSrvInfo503_get_enableoplockforceclose(PyObject *obj, void *closure)
18679 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18680 PyObject *py_enableoplockforceclose;
18681 py_enableoplockforceclose = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplockforceclose);
18682 return py_enableoplockforceclose;
18685 static int py_srvsvc_NetSrvInfo503_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
18687 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18688 if (value == NULL) {
18689 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplockforceclose");
18693 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
18694 if (PyLong_Check(value)) {
18695 unsigned long long test_var;
18696 test_var = PyLong_AsUnsignedLongLong(value);
18697 if (PyErr_Occurred() != NULL) {
18700 if (test_var > uint_max) {
18701 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18702 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18705 object->enableoplockforceclose = test_var;
18706 } else if (PyInt_Check(value)) {
18708 test_var = PyInt_AsLong(value);
18709 if (test_var < 0 || test_var > uint_max) {
18710 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18711 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18714 object->enableoplockforceclose = test_var;
18716 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18717 PyInt_Type.tp_name, PyLong_Type.tp_name);
18724 static PyObject *py_srvsvc_NetSrvInfo503_get_enablefcbopens(PyObject *obj, void *closure)
18726 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18727 PyObject *py_enablefcbopens;
18728 py_enablefcbopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablefcbopens);
18729 return py_enablefcbopens;
18732 static int py_srvsvc_NetSrvInfo503_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
18734 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18735 if (value == NULL) {
18736 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablefcbopens");
18740 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
18741 if (PyLong_Check(value)) {
18742 unsigned long long test_var;
18743 test_var = PyLong_AsUnsignedLongLong(value);
18744 if (PyErr_Occurred() != NULL) {
18747 if (test_var > uint_max) {
18748 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18749 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18752 object->enablefcbopens = test_var;
18753 } else if (PyInt_Check(value)) {
18755 test_var = PyInt_AsLong(value);
18756 if (test_var < 0 || test_var > uint_max) {
18757 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18758 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18761 object->enablefcbopens = test_var;
18763 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18764 PyInt_Type.tp_name, PyLong_Type.tp_name);
18771 static PyObject *py_srvsvc_NetSrvInfo503_get_enableraw(PyObject *obj, void *closure)
18773 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18774 PyObject *py_enableraw;
18775 py_enableraw = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableraw);
18776 return py_enableraw;
18779 static int py_srvsvc_NetSrvInfo503_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
18781 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18782 if (value == NULL) {
18783 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableraw");
18787 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
18788 if (PyLong_Check(value)) {
18789 unsigned long long test_var;
18790 test_var = PyLong_AsUnsignedLongLong(value);
18791 if (PyErr_Occurred() != NULL) {
18794 if (test_var > uint_max) {
18795 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18796 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18799 object->enableraw = test_var;
18800 } else if (PyInt_Check(value)) {
18802 test_var = PyInt_AsLong(value);
18803 if (test_var < 0 || test_var > uint_max) {
18804 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18805 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18808 object->enableraw = test_var;
18810 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18811 PyInt_Type.tp_name, PyLong_Type.tp_name);
18818 static PyObject *py_srvsvc_NetSrvInfo503_get_enablesharednetdrives(PyObject *obj, void *closure)
18820 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18821 PyObject *py_enablesharednetdrives;
18822 py_enablesharednetdrives = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesharednetdrives);
18823 return py_enablesharednetdrives;
18826 static int py_srvsvc_NetSrvInfo503_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
18828 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18829 if (value == NULL) {
18830 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesharednetdrives");
18834 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
18835 if (PyLong_Check(value)) {
18836 unsigned long long test_var;
18837 test_var = PyLong_AsUnsignedLongLong(value);
18838 if (PyErr_Occurred() != NULL) {
18841 if (test_var > uint_max) {
18842 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18843 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18846 object->enablesharednetdrives = test_var;
18847 } else if (PyInt_Check(value)) {
18849 test_var = PyInt_AsLong(value);
18850 if (test_var < 0 || test_var > uint_max) {
18851 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18852 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18855 object->enablesharednetdrives = test_var;
18857 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18858 PyInt_Type.tp_name, PyLong_Type.tp_name);
18865 static PyObject *py_srvsvc_NetSrvInfo503_get_minfreeconnections(PyObject *obj, void *closure)
18867 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18868 PyObject *py_minfreeconnections;
18869 py_minfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeconnections);
18870 return py_minfreeconnections;
18873 static int py_srvsvc_NetSrvInfo503_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
18875 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18876 if (value == NULL) {
18877 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeconnections");
18881 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
18882 if (PyLong_Check(value)) {
18883 unsigned long long test_var;
18884 test_var = PyLong_AsUnsignedLongLong(value);
18885 if (PyErr_Occurred() != NULL) {
18888 if (test_var > uint_max) {
18889 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18890 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18893 object->minfreeconnections = test_var;
18894 } else if (PyInt_Check(value)) {
18896 test_var = PyInt_AsLong(value);
18897 if (test_var < 0 || test_var > uint_max) {
18898 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18899 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18902 object->minfreeconnections = test_var;
18904 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18905 PyInt_Type.tp_name, PyLong_Type.tp_name);
18912 static PyObject *py_srvsvc_NetSrvInfo503_get_maxfreeconnections(PyObject *obj, void *closure)
18914 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
18915 PyObject *py_maxfreeconnections;
18916 py_maxfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxfreeconnections);
18917 return py_maxfreeconnections;
18920 static int py_srvsvc_NetSrvInfo503_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
18922 struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
18923 if (value == NULL) {
18924 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxfreeconnections");
18928 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
18929 if (PyLong_Check(value)) {
18930 unsigned long long test_var;
18931 test_var = PyLong_AsUnsignedLongLong(value);
18932 if (PyErr_Occurred() != NULL) {
18935 if (test_var > uint_max) {
18936 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
18937 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18940 object->maxfreeconnections = test_var;
18941 } else if (PyInt_Check(value)) {
18943 test_var = PyInt_AsLong(value);
18944 if (test_var < 0 || test_var > uint_max) {
18945 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
18946 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
18949 object->maxfreeconnections = test_var;
18951 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
18952 PyInt_Type.tp_name, PyLong_Type.tp_name);
18959 static PyGetSetDef py_srvsvc_NetSrvInfo503_getsetters[] = {
18961 .name = discard_const_p(char, "sessopen"),
18962 .get = py_srvsvc_NetSrvInfo503_get_sessopen,
18963 .set = py_srvsvc_NetSrvInfo503_set_sessopen,
18964 .doc = discard_const_p(char, "PIDL-generated element sessopen")
18967 .name = discard_const_p(char, "sesssvc"),
18968 .get = py_srvsvc_NetSrvInfo503_get_sesssvc,
18969 .set = py_srvsvc_NetSrvInfo503_set_sesssvc,
18970 .doc = discard_const_p(char, "PIDL-generated element sesssvc")
18973 .name = discard_const_p(char, "opensearch"),
18974 .get = py_srvsvc_NetSrvInfo503_get_opensearch,
18975 .set = py_srvsvc_NetSrvInfo503_set_opensearch,
18976 .doc = discard_const_p(char, "PIDL-generated element opensearch")
18979 .name = discard_const_p(char, "sizereqbufs"),
18980 .get = py_srvsvc_NetSrvInfo503_get_sizereqbufs,
18981 .set = py_srvsvc_NetSrvInfo503_set_sizereqbufs,
18982 .doc = discard_const_p(char, "PIDL-generated element sizereqbufs")
18985 .name = discard_const_p(char, "initworkitems"),
18986 .get = py_srvsvc_NetSrvInfo503_get_initworkitems,
18987 .set = py_srvsvc_NetSrvInfo503_set_initworkitems,
18988 .doc = discard_const_p(char, "PIDL-generated element initworkitems")
18991 .name = discard_const_p(char, "maxworkitems"),
18992 .get = py_srvsvc_NetSrvInfo503_get_maxworkitems,
18993 .set = py_srvsvc_NetSrvInfo503_set_maxworkitems,
18994 .doc = discard_const_p(char, "PIDL-generated element maxworkitems")
18997 .name = discard_const_p(char, "rawworkitems"),
18998 .get = py_srvsvc_NetSrvInfo503_get_rawworkitems,
18999 .set = py_srvsvc_NetSrvInfo503_set_rawworkitems,
19000 .doc = discard_const_p(char, "PIDL-generated element rawworkitems")
19003 .name = discard_const_p(char, "irpstacksize"),
19004 .get = py_srvsvc_NetSrvInfo503_get_irpstacksize,
19005 .set = py_srvsvc_NetSrvInfo503_set_irpstacksize,
19006 .doc = discard_const_p(char, "PIDL-generated element irpstacksize")
19009 .name = discard_const_p(char, "maxrawbuflen"),
19010 .get = py_srvsvc_NetSrvInfo503_get_maxrawbuflen,
19011 .set = py_srvsvc_NetSrvInfo503_set_maxrawbuflen,
19012 .doc = discard_const_p(char, "PIDL-generated element maxrawbuflen")
19015 .name = discard_const_p(char, "sessusers"),
19016 .get = py_srvsvc_NetSrvInfo503_get_sessusers,
19017 .set = py_srvsvc_NetSrvInfo503_set_sessusers,
19018 .doc = discard_const_p(char, "PIDL-generated element sessusers")
19021 .name = discard_const_p(char, "sessconns"),
19022 .get = py_srvsvc_NetSrvInfo503_get_sessconns,
19023 .set = py_srvsvc_NetSrvInfo503_set_sessconns,
19024 .doc = discard_const_p(char, "PIDL-generated element sessconns")
19027 .name = discard_const_p(char, "maxpagedmemoryusage"),
19028 .get = py_srvsvc_NetSrvInfo503_get_maxpagedmemoryusage,
19029 .set = py_srvsvc_NetSrvInfo503_set_maxpagedmemoryusage,
19030 .doc = discard_const_p(char, "PIDL-generated element maxpagedmemoryusage")
19033 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
19034 .get = py_srvsvc_NetSrvInfo503_get_maxnonpagedmemoryusage,
19035 .set = py_srvsvc_NetSrvInfo503_set_maxnonpagedmemoryusage,
19036 .doc = discard_const_p(char, "PIDL-generated element maxnonpagedmemoryusage")
19039 .name = discard_const_p(char, "enablesoftcompat"),
19040 .get = py_srvsvc_NetSrvInfo503_get_enablesoftcompat,
19041 .set = py_srvsvc_NetSrvInfo503_set_enablesoftcompat,
19042 .doc = discard_const_p(char, "PIDL-generated element enablesoftcompat")
19045 .name = discard_const_p(char, "enableforcedlogoff"),
19046 .get = py_srvsvc_NetSrvInfo503_get_enableforcedlogoff,
19047 .set = py_srvsvc_NetSrvInfo503_set_enableforcedlogoff,
19048 .doc = discard_const_p(char, "PIDL-generated element enableforcedlogoff")
19051 .name = discard_const_p(char, "timesource"),
19052 .get = py_srvsvc_NetSrvInfo503_get_timesource,
19053 .set = py_srvsvc_NetSrvInfo503_set_timesource,
19054 .doc = discard_const_p(char, "PIDL-generated element timesource")
19057 .name = discard_const_p(char, "acceptdownlevelapis"),
19058 .get = py_srvsvc_NetSrvInfo503_get_acceptdownlevelapis,
19059 .set = py_srvsvc_NetSrvInfo503_set_acceptdownlevelapis,
19060 .doc = discard_const_p(char, "PIDL-generated element acceptdownlevelapis")
19063 .name = discard_const_p(char, "lmannounce"),
19064 .get = py_srvsvc_NetSrvInfo503_get_lmannounce,
19065 .set = py_srvsvc_NetSrvInfo503_set_lmannounce,
19066 .doc = discard_const_p(char, "PIDL-generated element lmannounce")
19069 .name = discard_const_p(char, "domain"),
19070 .get = py_srvsvc_NetSrvInfo503_get_domain,
19071 .set = py_srvsvc_NetSrvInfo503_set_domain,
19072 .doc = discard_const_p(char, "PIDL-generated element domain")
19075 .name = discard_const_p(char, "maxcopyreadlen"),
19076 .get = py_srvsvc_NetSrvInfo503_get_maxcopyreadlen,
19077 .set = py_srvsvc_NetSrvInfo503_set_maxcopyreadlen,
19078 .doc = discard_const_p(char, "PIDL-generated element maxcopyreadlen")
19081 .name = discard_const_p(char, "maxcopywritelen"),
19082 .get = py_srvsvc_NetSrvInfo503_get_maxcopywritelen,
19083 .set = py_srvsvc_NetSrvInfo503_set_maxcopywritelen,
19084 .doc = discard_const_p(char, "PIDL-generated element maxcopywritelen")
19087 .name = discard_const_p(char, "minkeepsearch"),
19088 .get = py_srvsvc_NetSrvInfo503_get_minkeepsearch,
19089 .set = py_srvsvc_NetSrvInfo503_set_minkeepsearch,
19090 .doc = discard_const_p(char, "PIDL-generated element minkeepsearch")
19093 .name = discard_const_p(char, "maxkeepsearch"),
19094 .get = py_srvsvc_NetSrvInfo503_get_maxkeepsearch,
19095 .set = py_srvsvc_NetSrvInfo503_set_maxkeepsearch,
19096 .doc = discard_const_p(char, "PIDL-generated element maxkeepsearch")
19099 .name = discard_const_p(char, "minkeepcomplsearch"),
19100 .get = py_srvsvc_NetSrvInfo503_get_minkeepcomplsearch,
19101 .set = py_srvsvc_NetSrvInfo503_set_minkeepcomplsearch,
19102 .doc = discard_const_p(char, "PIDL-generated element minkeepcomplsearch")
19105 .name = discard_const_p(char, "maxkeepcomplsearch"),
19106 .get = py_srvsvc_NetSrvInfo503_get_maxkeepcomplsearch,
19107 .set = py_srvsvc_NetSrvInfo503_set_maxkeepcomplsearch,
19108 .doc = discard_const_p(char, "PIDL-generated element maxkeepcomplsearch")
19111 .name = discard_const_p(char, "threadcountadd"),
19112 .get = py_srvsvc_NetSrvInfo503_get_threadcountadd,
19113 .set = py_srvsvc_NetSrvInfo503_set_threadcountadd,
19114 .doc = discard_const_p(char, "PIDL-generated element threadcountadd")
19117 .name = discard_const_p(char, "numlockthreads"),
19118 .get = py_srvsvc_NetSrvInfo503_get_numlockthreads,
19119 .set = py_srvsvc_NetSrvInfo503_set_numlockthreads,
19120 .doc = discard_const_p(char, "PIDL-generated element numlockthreads")
19123 .name = discard_const_p(char, "scavtimeout"),
19124 .get = py_srvsvc_NetSrvInfo503_get_scavtimeout,
19125 .set = py_srvsvc_NetSrvInfo503_set_scavtimeout,
19126 .doc = discard_const_p(char, "PIDL-generated element scavtimeout")
19129 .name = discard_const_p(char, "minrcvqueue"),
19130 .get = py_srvsvc_NetSrvInfo503_get_minrcvqueue,
19131 .set = py_srvsvc_NetSrvInfo503_set_minrcvqueue,
19132 .doc = discard_const_p(char, "PIDL-generated element minrcvqueue")
19135 .name = discard_const_p(char, "minfreeworkitems"),
19136 .get = py_srvsvc_NetSrvInfo503_get_minfreeworkitems,
19137 .set = py_srvsvc_NetSrvInfo503_set_minfreeworkitems,
19138 .doc = discard_const_p(char, "PIDL-generated element minfreeworkitems")
19141 .name = discard_const_p(char, "xactmemsize"),
19142 .get = py_srvsvc_NetSrvInfo503_get_xactmemsize,
19143 .set = py_srvsvc_NetSrvInfo503_set_xactmemsize,
19144 .doc = discard_const_p(char, "PIDL-generated element xactmemsize")
19147 .name = discard_const_p(char, "threadpriority"),
19148 .get = py_srvsvc_NetSrvInfo503_get_threadpriority,
19149 .set = py_srvsvc_NetSrvInfo503_set_threadpriority,
19150 .doc = discard_const_p(char, "PIDL-generated element threadpriority")
19153 .name = discard_const_p(char, "maxmpxct"),
19154 .get = py_srvsvc_NetSrvInfo503_get_maxmpxct,
19155 .set = py_srvsvc_NetSrvInfo503_set_maxmpxct,
19156 .doc = discard_const_p(char, "PIDL-generated element maxmpxct")
19159 .name = discard_const_p(char, "oplockbreakwait"),
19160 .get = py_srvsvc_NetSrvInfo503_get_oplockbreakwait,
19161 .set = py_srvsvc_NetSrvInfo503_set_oplockbreakwait,
19162 .doc = discard_const_p(char, "PIDL-generated element oplockbreakwait")
19165 .name = discard_const_p(char, "oplockbreakresponsewait"),
19166 .get = py_srvsvc_NetSrvInfo503_get_oplockbreakresponsewait,
19167 .set = py_srvsvc_NetSrvInfo503_set_oplockbreakresponsewait,
19168 .doc = discard_const_p(char, "PIDL-generated element oplockbreakresponsewait")
19171 .name = discard_const_p(char, "enableoplocks"),
19172 .get = py_srvsvc_NetSrvInfo503_get_enableoplocks,
19173 .set = py_srvsvc_NetSrvInfo503_set_enableoplocks,
19174 .doc = discard_const_p(char, "PIDL-generated element enableoplocks")
19177 .name = discard_const_p(char, "enableoplockforceclose"),
19178 .get = py_srvsvc_NetSrvInfo503_get_enableoplockforceclose,
19179 .set = py_srvsvc_NetSrvInfo503_set_enableoplockforceclose,
19180 .doc = discard_const_p(char, "PIDL-generated element enableoplockforceclose")
19183 .name = discard_const_p(char, "enablefcbopens"),
19184 .get = py_srvsvc_NetSrvInfo503_get_enablefcbopens,
19185 .set = py_srvsvc_NetSrvInfo503_set_enablefcbopens,
19186 .doc = discard_const_p(char, "PIDL-generated element enablefcbopens")
19189 .name = discard_const_p(char, "enableraw"),
19190 .get = py_srvsvc_NetSrvInfo503_get_enableraw,
19191 .set = py_srvsvc_NetSrvInfo503_set_enableraw,
19192 .doc = discard_const_p(char, "PIDL-generated element enableraw")
19195 .name = discard_const_p(char, "enablesharednetdrives"),
19196 .get = py_srvsvc_NetSrvInfo503_get_enablesharednetdrives,
19197 .set = py_srvsvc_NetSrvInfo503_set_enablesharednetdrives,
19198 .doc = discard_const_p(char, "PIDL-generated element enablesharednetdrives")
19201 .name = discard_const_p(char, "minfreeconnections"),
19202 .get = py_srvsvc_NetSrvInfo503_get_minfreeconnections,
19203 .set = py_srvsvc_NetSrvInfo503_set_minfreeconnections,
19204 .doc = discard_const_p(char, "PIDL-generated element minfreeconnections")
19207 .name = discard_const_p(char, "maxfreeconnections"),
19208 .get = py_srvsvc_NetSrvInfo503_get_maxfreeconnections,
19209 .set = py_srvsvc_NetSrvInfo503_set_maxfreeconnections,
19210 .doc = discard_const_p(char, "PIDL-generated element maxfreeconnections")
19215 static PyObject *py_srvsvc_NetSrvInfo503_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19217 return pytalloc_new(struct srvsvc_NetSrvInfo503, type);
19221 static PyTypeObject srvsvc_NetSrvInfo503_Type = {
19222 PyObject_HEAD_INIT(NULL) 0,
19223 .tp_name = "srvsvc.NetSrvInfo503",
19224 .tp_getset = py_srvsvc_NetSrvInfo503_getsetters,
19225 .tp_methods = NULL,
19226 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19227 .tp_new = py_srvsvc_NetSrvInfo503_new,
19231 static PyObject *py_srvsvc_NetSrvInfo599_get_sessopen(PyObject *obj, void *closure)
19233 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19234 PyObject *py_sessopen;
19235 py_sessopen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
19236 return py_sessopen;
19239 static int py_srvsvc_NetSrvInfo599_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
19241 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19242 if (value == NULL) {
19243 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopen");
19247 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
19248 if (PyLong_Check(value)) {
19249 unsigned long long test_var;
19250 test_var = PyLong_AsUnsignedLongLong(value);
19251 if (PyErr_Occurred() != NULL) {
19254 if (test_var > uint_max) {
19255 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19256 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19259 object->sessopen = test_var;
19260 } else if (PyInt_Check(value)) {
19262 test_var = PyInt_AsLong(value);
19263 if (test_var < 0 || test_var > uint_max) {
19264 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19265 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19268 object->sessopen = test_var;
19270 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19271 PyInt_Type.tp_name, PyLong_Type.tp_name);
19278 static PyObject *py_srvsvc_NetSrvInfo599_get_sesssvc(PyObject *obj, void *closure)
19280 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19281 PyObject *py_sesssvc;
19282 py_sesssvc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
19286 static int py_srvsvc_NetSrvInfo599_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
19288 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19289 if (value == NULL) {
19290 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesssvc");
19294 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
19295 if (PyLong_Check(value)) {
19296 unsigned long long test_var;
19297 test_var = PyLong_AsUnsignedLongLong(value);
19298 if (PyErr_Occurred() != NULL) {
19301 if (test_var > uint_max) {
19302 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19303 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19306 object->sesssvc = test_var;
19307 } else if (PyInt_Check(value)) {
19309 test_var = PyInt_AsLong(value);
19310 if (test_var < 0 || test_var > uint_max) {
19311 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19312 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19315 object->sesssvc = test_var;
19317 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19318 PyInt_Type.tp_name, PyLong_Type.tp_name);
19325 static PyObject *py_srvsvc_NetSrvInfo599_get_opensearch(PyObject *obj, void *closure)
19327 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19328 PyObject *py_opensearch;
19329 py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
19330 return py_opensearch;
19333 static int py_srvsvc_NetSrvInfo599_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
19335 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19336 if (value == NULL) {
19337 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
19341 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
19342 if (PyLong_Check(value)) {
19343 unsigned long long test_var;
19344 test_var = PyLong_AsUnsignedLongLong(value);
19345 if (PyErr_Occurred() != NULL) {
19348 if (test_var > uint_max) {
19349 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19350 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19353 object->opensearch = test_var;
19354 } else if (PyInt_Check(value)) {
19356 test_var = PyInt_AsLong(value);
19357 if (test_var < 0 || test_var > uint_max) {
19358 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19359 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19362 object->opensearch = test_var;
19364 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19365 PyInt_Type.tp_name, PyLong_Type.tp_name);
19372 static PyObject *py_srvsvc_NetSrvInfo599_get_sizereqbufs(PyObject *obj, void *closure)
19374 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19375 PyObject *py_sizereqbufs;
19376 py_sizereqbufs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
19377 return py_sizereqbufs;
19380 static int py_srvsvc_NetSrvInfo599_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
19382 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19383 if (value == NULL) {
19384 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sizereqbufs");
19388 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
19389 if (PyLong_Check(value)) {
19390 unsigned long long test_var;
19391 test_var = PyLong_AsUnsignedLongLong(value);
19392 if (PyErr_Occurred() != NULL) {
19395 if (test_var > uint_max) {
19396 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19397 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19400 object->sizereqbufs = test_var;
19401 } else if (PyInt_Check(value)) {
19403 test_var = PyInt_AsLong(value);
19404 if (test_var < 0 || test_var > uint_max) {
19405 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19406 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19409 object->sizereqbufs = test_var;
19411 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19412 PyInt_Type.tp_name, PyLong_Type.tp_name);
19419 static PyObject *py_srvsvc_NetSrvInfo599_get_initworkitems(PyObject *obj, void *closure)
19421 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19422 PyObject *py_initworkitems;
19423 py_initworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initworkitems);
19424 return py_initworkitems;
19427 static int py_srvsvc_NetSrvInfo599_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
19429 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19430 if (value == NULL) {
19431 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initworkitems");
19435 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
19436 if (PyLong_Check(value)) {
19437 unsigned long long test_var;
19438 test_var = PyLong_AsUnsignedLongLong(value);
19439 if (PyErr_Occurred() != NULL) {
19442 if (test_var > uint_max) {
19443 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19444 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19447 object->initworkitems = test_var;
19448 } else if (PyInt_Check(value)) {
19450 test_var = PyInt_AsLong(value);
19451 if (test_var < 0 || test_var > uint_max) {
19452 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19453 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19456 object->initworkitems = test_var;
19458 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19459 PyInt_Type.tp_name, PyLong_Type.tp_name);
19466 static PyObject *py_srvsvc_NetSrvInfo599_get_maxworkitems(PyObject *obj, void *closure)
19468 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19469 PyObject *py_maxworkitems;
19470 py_maxworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
19471 return py_maxworkitems;
19474 static int py_srvsvc_NetSrvInfo599_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
19476 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19477 if (value == NULL) {
19478 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitems");
19482 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
19483 if (PyLong_Check(value)) {
19484 unsigned long long test_var;
19485 test_var = PyLong_AsUnsignedLongLong(value);
19486 if (PyErr_Occurred() != NULL) {
19489 if (test_var > uint_max) {
19490 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19491 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19494 object->maxworkitems = test_var;
19495 } else if (PyInt_Check(value)) {
19497 test_var = PyInt_AsLong(value);
19498 if (test_var < 0 || test_var > uint_max) {
19499 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19500 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19503 object->maxworkitems = test_var;
19505 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19506 PyInt_Type.tp_name, PyLong_Type.tp_name);
19513 static PyObject *py_srvsvc_NetSrvInfo599_get_rawworkitems(PyObject *obj, void *closure)
19515 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19516 PyObject *py_rawworkitems;
19517 py_rawworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->rawworkitems);
19518 return py_rawworkitems;
19521 static int py_srvsvc_NetSrvInfo599_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
19523 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19524 if (value == NULL) {
19525 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rawworkitems");
19529 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
19530 if (PyLong_Check(value)) {
19531 unsigned long long test_var;
19532 test_var = PyLong_AsUnsignedLongLong(value);
19533 if (PyErr_Occurred() != NULL) {
19536 if (test_var > uint_max) {
19537 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19538 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19541 object->rawworkitems = test_var;
19542 } else if (PyInt_Check(value)) {
19544 test_var = PyInt_AsLong(value);
19545 if (test_var < 0 || test_var > uint_max) {
19546 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19547 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19550 object->rawworkitems = test_var;
19552 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19553 PyInt_Type.tp_name, PyLong_Type.tp_name);
19560 static PyObject *py_srvsvc_NetSrvInfo599_get_irpstacksize(PyObject *obj, void *closure)
19562 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19563 PyObject *py_irpstacksize;
19564 py_irpstacksize = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->irpstacksize);
19565 return py_irpstacksize;
19568 static int py_srvsvc_NetSrvInfo599_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
19570 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19571 if (value == NULL) {
19572 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->irpstacksize");
19576 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
19577 if (PyLong_Check(value)) {
19578 unsigned long long test_var;
19579 test_var = PyLong_AsUnsignedLongLong(value);
19580 if (PyErr_Occurred() != NULL) {
19583 if (test_var > uint_max) {
19584 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19585 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19588 object->irpstacksize = test_var;
19589 } else if (PyInt_Check(value)) {
19591 test_var = PyInt_AsLong(value);
19592 if (test_var < 0 || test_var > uint_max) {
19593 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19594 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19597 object->irpstacksize = test_var;
19599 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19600 PyInt_Type.tp_name, PyLong_Type.tp_name);
19607 static PyObject *py_srvsvc_NetSrvInfo599_get_maxrawbuflen(PyObject *obj, void *closure)
19609 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19610 PyObject *py_maxrawbuflen;
19611 py_maxrawbuflen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
19612 return py_maxrawbuflen;
19615 static int py_srvsvc_NetSrvInfo599_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
19617 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19618 if (value == NULL) {
19619 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxrawbuflen");
19623 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
19624 if (PyLong_Check(value)) {
19625 unsigned long long test_var;
19626 test_var = PyLong_AsUnsignedLongLong(value);
19627 if (PyErr_Occurred() != NULL) {
19630 if (test_var > uint_max) {
19631 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19632 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19635 object->maxrawbuflen = test_var;
19636 } else if (PyInt_Check(value)) {
19638 test_var = PyInt_AsLong(value);
19639 if (test_var < 0 || test_var > uint_max) {
19640 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19641 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19644 object->maxrawbuflen = test_var;
19646 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19647 PyInt_Type.tp_name, PyLong_Type.tp_name);
19654 static PyObject *py_srvsvc_NetSrvInfo599_get_sessusers(PyObject *obj, void *closure)
19656 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19657 PyObject *py_sessusers;
19658 py_sessusers = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
19659 return py_sessusers;
19662 static int py_srvsvc_NetSrvInfo599_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
19664 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19665 if (value == NULL) {
19666 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessusers");
19670 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
19671 if (PyLong_Check(value)) {
19672 unsigned long long test_var;
19673 test_var = PyLong_AsUnsignedLongLong(value);
19674 if (PyErr_Occurred() != NULL) {
19677 if (test_var > uint_max) {
19678 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19679 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19682 object->sessusers = test_var;
19683 } else if (PyInt_Check(value)) {
19685 test_var = PyInt_AsLong(value);
19686 if (test_var < 0 || test_var > uint_max) {
19687 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19688 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19691 object->sessusers = test_var;
19693 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19694 PyInt_Type.tp_name, PyLong_Type.tp_name);
19701 static PyObject *py_srvsvc_NetSrvInfo599_get_sessconns(PyObject *obj, void *closure)
19703 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19704 PyObject *py_sessconns;
19705 py_sessconns = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessconns);
19706 return py_sessconns;
19709 static int py_srvsvc_NetSrvInfo599_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
19711 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19712 if (value == NULL) {
19713 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessconns");
19717 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
19718 if (PyLong_Check(value)) {
19719 unsigned long long test_var;
19720 test_var = PyLong_AsUnsignedLongLong(value);
19721 if (PyErr_Occurred() != NULL) {
19724 if (test_var > uint_max) {
19725 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19726 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19729 object->sessconns = test_var;
19730 } else if (PyInt_Check(value)) {
19732 test_var = PyInt_AsLong(value);
19733 if (test_var < 0 || test_var > uint_max) {
19734 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19735 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19738 object->sessconns = test_var;
19740 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19741 PyInt_Type.tp_name, PyLong_Type.tp_name);
19748 static PyObject *py_srvsvc_NetSrvInfo599_get_maxpagedmemoryusage(PyObject *obj, void *closure)
19750 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19751 PyObject *py_maxpagedmemoryusage;
19752 py_maxpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
19753 return py_maxpagedmemoryusage;
19756 static int py_srvsvc_NetSrvInfo599_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
19758 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19759 if (value == NULL) {
19760 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxpagedmemoryusage");
19764 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
19765 if (PyLong_Check(value)) {
19766 unsigned long long test_var;
19767 test_var = PyLong_AsUnsignedLongLong(value);
19768 if (PyErr_Occurred() != NULL) {
19771 if (test_var > uint_max) {
19772 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19773 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19776 object->maxpagedmemoryusage = test_var;
19777 } else if (PyInt_Check(value)) {
19779 test_var = PyInt_AsLong(value);
19780 if (test_var < 0 || test_var > uint_max) {
19781 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19782 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19785 object->maxpagedmemoryusage = test_var;
19787 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19788 PyInt_Type.tp_name, PyLong_Type.tp_name);
19795 static PyObject *py_srvsvc_NetSrvInfo599_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
19797 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19798 PyObject *py_maxnonpagedmemoryusage;
19799 py_maxnonpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
19800 return py_maxnonpagedmemoryusage;
19803 static int py_srvsvc_NetSrvInfo599_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
19805 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19806 if (value == NULL) {
19807 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxnonpagedmemoryusage");
19811 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
19812 if (PyLong_Check(value)) {
19813 unsigned long long test_var;
19814 test_var = PyLong_AsUnsignedLongLong(value);
19815 if (PyErr_Occurred() != NULL) {
19818 if (test_var > uint_max) {
19819 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19820 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19823 object->maxnonpagedmemoryusage = test_var;
19824 } else if (PyInt_Check(value)) {
19826 test_var = PyInt_AsLong(value);
19827 if (test_var < 0 || test_var > uint_max) {
19828 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19829 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19832 object->maxnonpagedmemoryusage = test_var;
19834 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19835 PyInt_Type.tp_name, PyLong_Type.tp_name);
19842 static PyObject *py_srvsvc_NetSrvInfo599_get_enablesoftcompat(PyObject *obj, void *closure)
19844 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19845 PyObject *py_enablesoftcompat;
19846 py_enablesoftcompat = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
19847 return py_enablesoftcompat;
19850 static int py_srvsvc_NetSrvInfo599_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
19852 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19853 if (value == NULL) {
19854 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesoftcompat");
19858 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
19859 if (PyLong_Check(value)) {
19860 unsigned long long test_var;
19861 test_var = PyLong_AsUnsignedLongLong(value);
19862 if (PyErr_Occurred() != NULL) {
19865 if (test_var > uint_max) {
19866 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19867 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19870 object->enablesoftcompat = test_var;
19871 } else if (PyInt_Check(value)) {
19873 test_var = PyInt_AsLong(value);
19874 if (test_var < 0 || test_var > uint_max) {
19875 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19876 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19879 object->enablesoftcompat = test_var;
19881 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19882 PyInt_Type.tp_name, PyLong_Type.tp_name);
19889 static PyObject *py_srvsvc_NetSrvInfo599_get_enableforcedlogoff(PyObject *obj, void *closure)
19891 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19892 PyObject *py_enableforcedlogoff;
19893 py_enableforcedlogoff = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
19894 return py_enableforcedlogoff;
19897 static int py_srvsvc_NetSrvInfo599_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
19899 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19900 if (value == NULL) {
19901 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableforcedlogoff");
19905 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
19906 if (PyLong_Check(value)) {
19907 unsigned long long test_var;
19908 test_var = PyLong_AsUnsignedLongLong(value);
19909 if (PyErr_Occurred() != NULL) {
19912 if (test_var > uint_max) {
19913 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19914 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19917 object->enableforcedlogoff = test_var;
19918 } else if (PyInt_Check(value)) {
19920 test_var = PyInt_AsLong(value);
19921 if (test_var < 0 || test_var > uint_max) {
19922 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19923 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19926 object->enableforcedlogoff = test_var;
19928 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19929 PyInt_Type.tp_name, PyLong_Type.tp_name);
19936 static PyObject *py_srvsvc_NetSrvInfo599_get_timesource(PyObject *obj, void *closure)
19938 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19939 PyObject *py_timesource;
19940 py_timesource = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
19941 return py_timesource;
19944 static int py_srvsvc_NetSrvInfo599_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
19946 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19947 if (value == NULL) {
19948 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timesource");
19952 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
19953 if (PyLong_Check(value)) {
19954 unsigned long long test_var;
19955 test_var = PyLong_AsUnsignedLongLong(value);
19956 if (PyErr_Occurred() != NULL) {
19959 if (test_var > uint_max) {
19960 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
19961 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19964 object->timesource = test_var;
19965 } else if (PyInt_Check(value)) {
19967 test_var = PyInt_AsLong(value);
19968 if (test_var < 0 || test_var > uint_max) {
19969 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
19970 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
19973 object->timesource = test_var;
19975 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
19976 PyInt_Type.tp_name, PyLong_Type.tp_name);
19983 static PyObject *py_srvsvc_NetSrvInfo599_get_acceptdownlevelapis(PyObject *obj, void *closure)
19985 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
19986 PyObject *py_acceptdownlevelapis;
19987 py_acceptdownlevelapis = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->acceptdownlevelapis);
19988 return py_acceptdownlevelapis;
19991 static int py_srvsvc_NetSrvInfo599_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
19993 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
19994 if (value == NULL) {
19995 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acceptdownlevelapis");
19999 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
20000 if (PyLong_Check(value)) {
20001 unsigned long long test_var;
20002 test_var = PyLong_AsUnsignedLongLong(value);
20003 if (PyErr_Occurred() != NULL) {
20006 if (test_var > uint_max) {
20007 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20008 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20011 object->acceptdownlevelapis = test_var;
20012 } else if (PyInt_Check(value)) {
20014 test_var = PyInt_AsLong(value);
20015 if (test_var < 0 || test_var > uint_max) {
20016 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20017 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20020 object->acceptdownlevelapis = test_var;
20022 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20023 PyInt_Type.tp_name, PyLong_Type.tp_name);
20030 static PyObject *py_srvsvc_NetSrvInfo599_get_lmannounce(PyObject *obj, void *closure)
20032 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20033 PyObject *py_lmannounce;
20034 py_lmannounce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
20035 return py_lmannounce;
20038 static int py_srvsvc_NetSrvInfo599_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
20040 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20041 if (value == NULL) {
20042 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmannounce");
20046 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
20047 if (PyLong_Check(value)) {
20048 unsigned long long test_var;
20049 test_var = PyLong_AsUnsignedLongLong(value);
20050 if (PyErr_Occurred() != NULL) {
20053 if (test_var > uint_max) {
20054 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20055 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20058 object->lmannounce = test_var;
20059 } else if (PyInt_Check(value)) {
20061 test_var = PyInt_AsLong(value);
20062 if (test_var < 0 || test_var > uint_max) {
20063 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20064 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20067 object->lmannounce = test_var;
20069 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20070 PyInt_Type.tp_name, PyLong_Type.tp_name);
20077 static PyObject *py_srvsvc_NetSrvInfo599_get_domain(PyObject *obj, void *closure)
20079 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20080 PyObject *py_domain;
20081 if (object->domain == NULL) {
20082 py_domain = Py_None;
20083 Py_INCREF(py_domain);
20085 if (object->domain == NULL) {
20086 py_domain = Py_None;
20087 Py_INCREF(py_domain);
20089 py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
20095 static int py_srvsvc_NetSrvInfo599_set_domain(PyObject *py_obj, PyObject *value, void *closure)
20097 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20098 if (value == NULL) {
20099 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
20102 if (value == Py_None) {
20103 object->domain = NULL;
20105 object->domain = NULL;
20106 if (value == NULL) {
20107 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->domain");
20111 const char *test_str;
20112 const char *talloc_str;
20113 PyObject *unicode = NULL;
20114 if (PyUnicode_Check(value)) {
20115 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20116 if (unicode == NULL) {
20120 test_str = PyString_AS_STRING(unicode);
20121 } else if (PyString_Check(value)) {
20122 test_str = PyString_AS_STRING(value);
20124 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20127 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20128 if (unicode != NULL) {
20129 Py_DECREF(unicode);
20131 if (talloc_str == NULL) {
20135 object->domain = talloc_str;
20141 static PyObject *py_srvsvc_NetSrvInfo599_get_maxcopyreadlen(PyObject *obj, void *closure)
20143 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20144 PyObject *py_maxcopyreadlen;
20145 py_maxcopyreadlen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopyreadlen);
20146 return py_maxcopyreadlen;
20149 static int py_srvsvc_NetSrvInfo599_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
20151 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20152 if (value == NULL) {
20153 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopyreadlen");
20157 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
20158 if (PyLong_Check(value)) {
20159 unsigned long long test_var;
20160 test_var = PyLong_AsUnsignedLongLong(value);
20161 if (PyErr_Occurred() != NULL) {
20164 if (test_var > uint_max) {
20165 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20166 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20169 object->maxcopyreadlen = test_var;
20170 } else if (PyInt_Check(value)) {
20172 test_var = PyInt_AsLong(value);
20173 if (test_var < 0 || test_var > uint_max) {
20174 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20175 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20178 object->maxcopyreadlen = test_var;
20180 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20181 PyInt_Type.tp_name, PyLong_Type.tp_name);
20188 static PyObject *py_srvsvc_NetSrvInfo599_get_maxcopywritelen(PyObject *obj, void *closure)
20190 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20191 PyObject *py_maxcopywritelen;
20192 py_maxcopywritelen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopywritelen);
20193 return py_maxcopywritelen;
20196 static int py_srvsvc_NetSrvInfo599_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
20198 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20199 if (value == NULL) {
20200 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopywritelen");
20204 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
20205 if (PyLong_Check(value)) {
20206 unsigned long long test_var;
20207 test_var = PyLong_AsUnsignedLongLong(value);
20208 if (PyErr_Occurred() != NULL) {
20211 if (test_var > uint_max) {
20212 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20213 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20216 object->maxcopywritelen = test_var;
20217 } else if (PyInt_Check(value)) {
20219 test_var = PyInt_AsLong(value);
20220 if (test_var < 0 || test_var > uint_max) {
20221 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20222 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20225 object->maxcopywritelen = test_var;
20227 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20228 PyInt_Type.tp_name, PyLong_Type.tp_name);
20235 static PyObject *py_srvsvc_NetSrvInfo599_get_minkeepsearch(PyObject *obj, void *closure)
20237 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20238 PyObject *py_minkeepsearch;
20239 py_minkeepsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepsearch);
20240 return py_minkeepsearch;
20243 static int py_srvsvc_NetSrvInfo599_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
20245 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20246 if (value == NULL) {
20247 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepsearch");
20251 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
20252 if (PyLong_Check(value)) {
20253 unsigned long long test_var;
20254 test_var = PyLong_AsUnsignedLongLong(value);
20255 if (PyErr_Occurred() != NULL) {
20258 if (test_var > uint_max) {
20259 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20260 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20263 object->minkeepsearch = test_var;
20264 } else if (PyInt_Check(value)) {
20266 test_var = PyInt_AsLong(value);
20267 if (test_var < 0 || test_var > uint_max) {
20268 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20269 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20272 object->minkeepsearch = test_var;
20274 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20275 PyInt_Type.tp_name, PyLong_Type.tp_name);
20282 static PyObject *py_srvsvc_NetSrvInfo599_get_minkeepcomplsearch(PyObject *obj, void *closure)
20284 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20285 PyObject *py_minkeepcomplsearch;
20286 py_minkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepcomplsearch);
20287 return py_minkeepcomplsearch;
20290 static int py_srvsvc_NetSrvInfo599_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
20292 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20293 if (value == NULL) {
20294 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepcomplsearch");
20298 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
20299 if (PyLong_Check(value)) {
20300 unsigned long long test_var;
20301 test_var = PyLong_AsUnsignedLongLong(value);
20302 if (PyErr_Occurred() != NULL) {
20305 if (test_var > uint_max) {
20306 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20307 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20310 object->minkeepcomplsearch = test_var;
20311 } else if (PyInt_Check(value)) {
20313 test_var = PyInt_AsLong(value);
20314 if (test_var < 0 || test_var > uint_max) {
20315 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20316 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20319 object->minkeepcomplsearch = test_var;
20321 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20322 PyInt_Type.tp_name, PyLong_Type.tp_name);
20329 static PyObject *py_srvsvc_NetSrvInfo599_get_maxkeepcomplsearch(PyObject *obj, void *closure)
20331 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20332 PyObject *py_maxkeepcomplsearch;
20333 py_maxkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepcomplsearch);
20334 return py_maxkeepcomplsearch;
20337 static int py_srvsvc_NetSrvInfo599_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
20339 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20340 if (value == NULL) {
20341 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxkeepcomplsearch");
20345 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
20346 if (PyLong_Check(value)) {
20347 unsigned long long test_var;
20348 test_var = PyLong_AsUnsignedLongLong(value);
20349 if (PyErr_Occurred() != NULL) {
20352 if (test_var > uint_max) {
20353 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20354 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20357 object->maxkeepcomplsearch = test_var;
20358 } else if (PyInt_Check(value)) {
20360 test_var = PyInt_AsLong(value);
20361 if (test_var < 0 || test_var > uint_max) {
20362 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20363 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20366 object->maxkeepcomplsearch = test_var;
20368 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20369 PyInt_Type.tp_name, PyLong_Type.tp_name);
20376 static PyObject *py_srvsvc_NetSrvInfo599_get_threadcountadd(PyObject *obj, void *closure)
20378 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20379 PyObject *py_threadcountadd;
20380 py_threadcountadd = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->threadcountadd);
20381 return py_threadcountadd;
20384 static int py_srvsvc_NetSrvInfo599_set_threadcountadd(PyObject *py_obj, PyObject *value, void *closure)
20386 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20387 if (value == NULL) {
20388 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->threadcountadd");
20392 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadcountadd));
20393 if (PyLong_Check(value)) {
20394 unsigned long long test_var;
20395 test_var = PyLong_AsUnsignedLongLong(value);
20396 if (PyErr_Occurred() != NULL) {
20399 if (test_var > uint_max) {
20400 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20401 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20404 object->threadcountadd = test_var;
20405 } else if (PyInt_Check(value)) {
20407 test_var = PyInt_AsLong(value);
20408 if (test_var < 0 || test_var > uint_max) {
20409 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20410 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20413 object->threadcountadd = test_var;
20415 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20416 PyInt_Type.tp_name, PyLong_Type.tp_name);
20423 static PyObject *py_srvsvc_NetSrvInfo599_get_numlockthreads(PyObject *obj, void *closure)
20425 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20426 PyObject *py_numlockthreads;
20427 py_numlockthreads = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->numlockthreads);
20428 return py_numlockthreads;
20431 static int py_srvsvc_NetSrvInfo599_set_numlockthreads(PyObject *py_obj, PyObject *value, void *closure)
20433 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20434 if (value == NULL) {
20435 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numlockthreads");
20439 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numlockthreads));
20440 if (PyLong_Check(value)) {
20441 unsigned long long test_var;
20442 test_var = PyLong_AsUnsignedLongLong(value);
20443 if (PyErr_Occurred() != NULL) {
20446 if (test_var > uint_max) {
20447 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20448 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20451 object->numlockthreads = test_var;
20452 } else if (PyInt_Check(value)) {
20454 test_var = PyInt_AsLong(value);
20455 if (test_var < 0 || test_var > uint_max) {
20456 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20457 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20460 object->numlockthreads = test_var;
20462 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20463 PyInt_Type.tp_name, PyLong_Type.tp_name);
20470 static PyObject *py_srvsvc_NetSrvInfo599_get_scavtimeout(PyObject *obj, void *closure)
20472 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20473 PyObject *py_scavtimeout;
20474 py_scavtimeout = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->scavtimeout);
20475 return py_scavtimeout;
20478 static int py_srvsvc_NetSrvInfo599_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
20480 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20481 if (value == NULL) {
20482 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scavtimeout");
20486 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
20487 if (PyLong_Check(value)) {
20488 unsigned long long test_var;
20489 test_var = PyLong_AsUnsignedLongLong(value);
20490 if (PyErr_Occurred() != NULL) {
20493 if (test_var > uint_max) {
20494 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20495 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20498 object->scavtimeout = test_var;
20499 } else if (PyInt_Check(value)) {
20501 test_var = PyInt_AsLong(value);
20502 if (test_var < 0 || test_var > uint_max) {
20503 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20504 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20507 object->scavtimeout = test_var;
20509 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20510 PyInt_Type.tp_name, PyLong_Type.tp_name);
20517 static PyObject *py_srvsvc_NetSrvInfo599_get_minrcvqueue(PyObject *obj, void *closure)
20519 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20520 PyObject *py_minrcvqueue;
20521 py_minrcvqueue = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minrcvqueue);
20522 return py_minrcvqueue;
20525 static int py_srvsvc_NetSrvInfo599_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
20527 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20528 if (value == NULL) {
20529 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minrcvqueue");
20533 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
20534 if (PyLong_Check(value)) {
20535 unsigned long long test_var;
20536 test_var = PyLong_AsUnsignedLongLong(value);
20537 if (PyErr_Occurred() != NULL) {
20540 if (test_var > uint_max) {
20541 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20542 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20545 object->minrcvqueue = test_var;
20546 } else if (PyInt_Check(value)) {
20548 test_var = PyInt_AsLong(value);
20549 if (test_var < 0 || test_var > uint_max) {
20550 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20551 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20554 object->minrcvqueue = test_var;
20556 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20557 PyInt_Type.tp_name, PyLong_Type.tp_name);
20564 static PyObject *py_srvsvc_NetSrvInfo599_get_minfreeworkitems(PyObject *obj, void *closure)
20566 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20567 PyObject *py_minfreeworkitems;
20568 py_minfreeworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeworkitems);
20569 return py_minfreeworkitems;
20572 static int py_srvsvc_NetSrvInfo599_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
20574 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20575 if (value == NULL) {
20576 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeworkitems");
20580 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
20581 if (PyLong_Check(value)) {
20582 unsigned long long test_var;
20583 test_var = PyLong_AsUnsignedLongLong(value);
20584 if (PyErr_Occurred() != NULL) {
20587 if (test_var > uint_max) {
20588 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20589 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20592 object->minfreeworkitems = test_var;
20593 } else if (PyInt_Check(value)) {
20595 test_var = PyInt_AsLong(value);
20596 if (test_var < 0 || test_var > uint_max) {
20597 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20598 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20601 object->minfreeworkitems = test_var;
20603 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20604 PyInt_Type.tp_name, PyLong_Type.tp_name);
20611 static PyObject *py_srvsvc_NetSrvInfo599_get_xactmemsize(PyObject *obj, void *closure)
20613 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20614 PyObject *py_xactmemsize;
20615 py_xactmemsize = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->xactmemsize);
20616 return py_xactmemsize;
20619 static int py_srvsvc_NetSrvInfo599_set_xactmemsize(PyObject *py_obj, PyObject *value, void *closure)
20621 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20622 if (value == NULL) {
20623 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->xactmemsize");
20627 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->xactmemsize));
20628 if (PyLong_Check(value)) {
20629 unsigned long long test_var;
20630 test_var = PyLong_AsUnsignedLongLong(value);
20631 if (PyErr_Occurred() != NULL) {
20634 if (test_var > uint_max) {
20635 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20636 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20639 object->xactmemsize = test_var;
20640 } else if (PyInt_Check(value)) {
20642 test_var = PyInt_AsLong(value);
20643 if (test_var < 0 || test_var > uint_max) {
20644 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20645 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20648 object->xactmemsize = test_var;
20650 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20651 PyInt_Type.tp_name, PyLong_Type.tp_name);
20658 static PyObject *py_srvsvc_NetSrvInfo599_get_threadpriority(PyObject *obj, void *closure)
20660 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20661 PyObject *py_threadpriority;
20662 py_threadpriority = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->threadpriority);
20663 return py_threadpriority;
20666 static int py_srvsvc_NetSrvInfo599_set_threadpriority(PyObject *py_obj, PyObject *value, void *closure)
20668 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20669 if (value == NULL) {
20670 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->threadpriority");
20674 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadpriority));
20675 if (PyLong_Check(value)) {
20676 unsigned long long test_var;
20677 test_var = PyLong_AsUnsignedLongLong(value);
20678 if (PyErr_Occurred() != NULL) {
20681 if (test_var > uint_max) {
20682 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20683 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20686 object->threadpriority = test_var;
20687 } else if (PyInt_Check(value)) {
20689 test_var = PyInt_AsLong(value);
20690 if (test_var < 0 || test_var > uint_max) {
20691 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20692 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20695 object->threadpriority = test_var;
20697 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20698 PyInt_Type.tp_name, PyLong_Type.tp_name);
20705 static PyObject *py_srvsvc_NetSrvInfo599_get_maxmpxct(PyObject *obj, void *closure)
20707 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20708 PyObject *py_maxmpxct;
20709 py_maxmpxct = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxmpxct);
20710 return py_maxmpxct;
20713 static int py_srvsvc_NetSrvInfo599_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
20715 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20716 if (value == NULL) {
20717 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxmpxct");
20721 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
20722 if (PyLong_Check(value)) {
20723 unsigned long long test_var;
20724 test_var = PyLong_AsUnsignedLongLong(value);
20725 if (PyErr_Occurred() != NULL) {
20728 if (test_var > uint_max) {
20729 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20730 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20733 object->maxmpxct = test_var;
20734 } else if (PyInt_Check(value)) {
20736 test_var = PyInt_AsLong(value);
20737 if (test_var < 0 || test_var > uint_max) {
20738 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20739 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20742 object->maxmpxct = test_var;
20744 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20745 PyInt_Type.tp_name, PyLong_Type.tp_name);
20752 static PyObject *py_srvsvc_NetSrvInfo599_get_oplockbreakwait(PyObject *obj, void *closure)
20754 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20755 PyObject *py_oplockbreakwait;
20756 py_oplockbreakwait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakwait);
20757 return py_oplockbreakwait;
20760 static int py_srvsvc_NetSrvInfo599_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
20762 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20763 if (value == NULL) {
20764 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakwait");
20768 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
20769 if (PyLong_Check(value)) {
20770 unsigned long long test_var;
20771 test_var = PyLong_AsUnsignedLongLong(value);
20772 if (PyErr_Occurred() != NULL) {
20775 if (test_var > uint_max) {
20776 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20777 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20780 object->oplockbreakwait = test_var;
20781 } else if (PyInt_Check(value)) {
20783 test_var = PyInt_AsLong(value);
20784 if (test_var < 0 || test_var > uint_max) {
20785 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20786 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20789 object->oplockbreakwait = test_var;
20791 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20792 PyInt_Type.tp_name, PyLong_Type.tp_name);
20799 static PyObject *py_srvsvc_NetSrvInfo599_get_oplockbreakresponsewait(PyObject *obj, void *closure)
20801 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20802 PyObject *py_oplockbreakresponsewait;
20803 py_oplockbreakresponsewait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakresponsewait);
20804 return py_oplockbreakresponsewait;
20807 static int py_srvsvc_NetSrvInfo599_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
20809 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20810 if (value == NULL) {
20811 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakresponsewait");
20815 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
20816 if (PyLong_Check(value)) {
20817 unsigned long long test_var;
20818 test_var = PyLong_AsUnsignedLongLong(value);
20819 if (PyErr_Occurred() != NULL) {
20822 if (test_var > uint_max) {
20823 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20824 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20827 object->oplockbreakresponsewait = test_var;
20828 } else if (PyInt_Check(value)) {
20830 test_var = PyInt_AsLong(value);
20831 if (test_var < 0 || test_var > uint_max) {
20832 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20833 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20836 object->oplockbreakresponsewait = test_var;
20838 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20839 PyInt_Type.tp_name, PyLong_Type.tp_name);
20846 static PyObject *py_srvsvc_NetSrvInfo599_get_enableoplocks(PyObject *obj, void *closure)
20848 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20849 PyObject *py_enableoplocks;
20850 py_enableoplocks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplocks);
20851 return py_enableoplocks;
20854 static int py_srvsvc_NetSrvInfo599_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
20856 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20857 if (value == NULL) {
20858 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplocks");
20862 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
20863 if (PyLong_Check(value)) {
20864 unsigned long long test_var;
20865 test_var = PyLong_AsUnsignedLongLong(value);
20866 if (PyErr_Occurred() != NULL) {
20869 if (test_var > uint_max) {
20870 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20871 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20874 object->enableoplocks = test_var;
20875 } else if (PyInt_Check(value)) {
20877 test_var = PyInt_AsLong(value);
20878 if (test_var < 0 || test_var > uint_max) {
20879 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20880 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20883 object->enableoplocks = test_var;
20885 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20886 PyInt_Type.tp_name, PyLong_Type.tp_name);
20893 static PyObject *py_srvsvc_NetSrvInfo599_get_enableoplockforceclose(PyObject *obj, void *closure)
20895 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20896 PyObject *py_enableoplockforceclose;
20897 py_enableoplockforceclose = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplockforceclose);
20898 return py_enableoplockforceclose;
20901 static int py_srvsvc_NetSrvInfo599_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
20903 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20904 if (value == NULL) {
20905 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplockforceclose");
20909 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
20910 if (PyLong_Check(value)) {
20911 unsigned long long test_var;
20912 test_var = PyLong_AsUnsignedLongLong(value);
20913 if (PyErr_Occurred() != NULL) {
20916 if (test_var > uint_max) {
20917 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20918 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20921 object->enableoplockforceclose = test_var;
20922 } else if (PyInt_Check(value)) {
20924 test_var = PyInt_AsLong(value);
20925 if (test_var < 0 || test_var > uint_max) {
20926 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20927 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20930 object->enableoplockforceclose = test_var;
20932 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20933 PyInt_Type.tp_name, PyLong_Type.tp_name);
20940 static PyObject *py_srvsvc_NetSrvInfo599_get_enablefcbopens(PyObject *obj, void *closure)
20942 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20943 PyObject *py_enablefcbopens;
20944 py_enablefcbopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablefcbopens);
20945 return py_enablefcbopens;
20948 static int py_srvsvc_NetSrvInfo599_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
20950 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20951 if (value == NULL) {
20952 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablefcbopens");
20956 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
20957 if (PyLong_Check(value)) {
20958 unsigned long long test_var;
20959 test_var = PyLong_AsUnsignedLongLong(value);
20960 if (PyErr_Occurred() != NULL) {
20963 if (test_var > uint_max) {
20964 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
20965 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20968 object->enablefcbopens = test_var;
20969 } else if (PyInt_Check(value)) {
20971 test_var = PyInt_AsLong(value);
20972 if (test_var < 0 || test_var > uint_max) {
20973 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
20974 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
20977 object->enablefcbopens = test_var;
20979 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
20980 PyInt_Type.tp_name, PyLong_Type.tp_name);
20987 static PyObject *py_srvsvc_NetSrvInfo599_get_enableraw(PyObject *obj, void *closure)
20989 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
20990 PyObject *py_enableraw;
20991 py_enableraw = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableraw);
20992 return py_enableraw;
20995 static int py_srvsvc_NetSrvInfo599_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
20997 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
20998 if (value == NULL) {
20999 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableraw");
21003 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
21004 if (PyLong_Check(value)) {
21005 unsigned long long test_var;
21006 test_var = PyLong_AsUnsignedLongLong(value);
21007 if (PyErr_Occurred() != NULL) {
21010 if (test_var > uint_max) {
21011 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21012 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21015 object->enableraw = test_var;
21016 } else if (PyInt_Check(value)) {
21018 test_var = PyInt_AsLong(value);
21019 if (test_var < 0 || test_var > uint_max) {
21020 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21021 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21024 object->enableraw = test_var;
21026 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21027 PyInt_Type.tp_name, PyLong_Type.tp_name);
21034 static PyObject *py_srvsvc_NetSrvInfo599_get_enablesharednetdrives(PyObject *obj, void *closure)
21036 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21037 PyObject *py_enablesharednetdrives;
21038 py_enablesharednetdrives = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesharednetdrives);
21039 return py_enablesharednetdrives;
21042 static int py_srvsvc_NetSrvInfo599_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
21044 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21045 if (value == NULL) {
21046 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesharednetdrives");
21050 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
21051 if (PyLong_Check(value)) {
21052 unsigned long long test_var;
21053 test_var = PyLong_AsUnsignedLongLong(value);
21054 if (PyErr_Occurred() != NULL) {
21057 if (test_var > uint_max) {
21058 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21059 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21062 object->enablesharednetdrives = test_var;
21063 } else if (PyInt_Check(value)) {
21065 test_var = PyInt_AsLong(value);
21066 if (test_var < 0 || test_var > uint_max) {
21067 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21068 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21071 object->enablesharednetdrives = test_var;
21073 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21074 PyInt_Type.tp_name, PyLong_Type.tp_name);
21081 static PyObject *py_srvsvc_NetSrvInfo599_get_minfreeconnections(PyObject *obj, void *closure)
21083 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21084 PyObject *py_minfreeconnections;
21085 py_minfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeconnections);
21086 return py_minfreeconnections;
21089 static int py_srvsvc_NetSrvInfo599_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
21091 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21092 if (value == NULL) {
21093 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeconnections");
21097 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
21098 if (PyLong_Check(value)) {
21099 unsigned long long test_var;
21100 test_var = PyLong_AsUnsignedLongLong(value);
21101 if (PyErr_Occurred() != NULL) {
21104 if (test_var > uint_max) {
21105 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21106 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21109 object->minfreeconnections = test_var;
21110 } else if (PyInt_Check(value)) {
21112 test_var = PyInt_AsLong(value);
21113 if (test_var < 0 || test_var > uint_max) {
21114 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21115 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21118 object->minfreeconnections = test_var;
21120 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21121 PyInt_Type.tp_name, PyLong_Type.tp_name);
21128 static PyObject *py_srvsvc_NetSrvInfo599_get_maxfreeconnections(PyObject *obj, void *closure)
21130 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21131 PyObject *py_maxfreeconnections;
21132 py_maxfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxfreeconnections);
21133 return py_maxfreeconnections;
21136 static int py_srvsvc_NetSrvInfo599_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
21138 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21139 if (value == NULL) {
21140 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxfreeconnections");
21144 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
21145 if (PyLong_Check(value)) {
21146 unsigned long long test_var;
21147 test_var = PyLong_AsUnsignedLongLong(value);
21148 if (PyErr_Occurred() != NULL) {
21151 if (test_var > uint_max) {
21152 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21153 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21156 object->maxfreeconnections = test_var;
21157 } else if (PyInt_Check(value)) {
21159 test_var = PyInt_AsLong(value);
21160 if (test_var < 0 || test_var > uint_max) {
21161 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21162 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21165 object->maxfreeconnections = test_var;
21167 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21168 PyInt_Type.tp_name, PyLong_Type.tp_name);
21175 static PyObject *py_srvsvc_NetSrvInfo599_get_initsesstable(PyObject *obj, void *closure)
21177 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21178 PyObject *py_initsesstable;
21179 py_initsesstable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initsesstable);
21180 return py_initsesstable;
21183 static int py_srvsvc_NetSrvInfo599_set_initsesstable(PyObject *py_obj, PyObject *value, void *closure)
21185 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21186 if (value == NULL) {
21187 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initsesstable");
21191 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsesstable));
21192 if (PyLong_Check(value)) {
21193 unsigned long long test_var;
21194 test_var = PyLong_AsUnsignedLongLong(value);
21195 if (PyErr_Occurred() != NULL) {
21198 if (test_var > uint_max) {
21199 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21200 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21203 object->initsesstable = test_var;
21204 } else if (PyInt_Check(value)) {
21206 test_var = PyInt_AsLong(value);
21207 if (test_var < 0 || test_var > uint_max) {
21208 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21209 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21212 object->initsesstable = test_var;
21214 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21215 PyInt_Type.tp_name, PyLong_Type.tp_name);
21222 static PyObject *py_srvsvc_NetSrvInfo599_get_initconntable(PyObject *obj, void *closure)
21224 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21225 PyObject *py_initconntable;
21226 py_initconntable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initconntable);
21227 return py_initconntable;
21230 static int py_srvsvc_NetSrvInfo599_set_initconntable(PyObject *py_obj, PyObject *value, void *closure)
21232 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21233 if (value == NULL) {
21234 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initconntable");
21238 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initconntable));
21239 if (PyLong_Check(value)) {
21240 unsigned long long test_var;
21241 test_var = PyLong_AsUnsignedLongLong(value);
21242 if (PyErr_Occurred() != NULL) {
21245 if (test_var > uint_max) {
21246 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21247 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21250 object->initconntable = test_var;
21251 } else if (PyInt_Check(value)) {
21253 test_var = PyInt_AsLong(value);
21254 if (test_var < 0 || test_var > uint_max) {
21255 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21256 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21259 object->initconntable = test_var;
21261 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21262 PyInt_Type.tp_name, PyLong_Type.tp_name);
21269 static PyObject *py_srvsvc_NetSrvInfo599_get_initfiletable(PyObject *obj, void *closure)
21271 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21272 PyObject *py_initfiletable;
21273 py_initfiletable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initfiletable);
21274 return py_initfiletable;
21277 static int py_srvsvc_NetSrvInfo599_set_initfiletable(PyObject *py_obj, PyObject *value, void *closure)
21279 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21280 if (value == NULL) {
21281 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initfiletable");
21285 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initfiletable));
21286 if (PyLong_Check(value)) {
21287 unsigned long long test_var;
21288 test_var = PyLong_AsUnsignedLongLong(value);
21289 if (PyErr_Occurred() != NULL) {
21292 if (test_var > uint_max) {
21293 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21294 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21297 object->initfiletable = test_var;
21298 } else if (PyInt_Check(value)) {
21300 test_var = PyInt_AsLong(value);
21301 if (test_var < 0 || test_var > uint_max) {
21302 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21303 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21306 object->initfiletable = test_var;
21308 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21309 PyInt_Type.tp_name, PyLong_Type.tp_name);
21316 static PyObject *py_srvsvc_NetSrvInfo599_get_initsearchtable(PyObject *obj, void *closure)
21318 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21319 PyObject *py_initsearchtable;
21320 py_initsearchtable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initsearchtable);
21321 return py_initsearchtable;
21324 static int py_srvsvc_NetSrvInfo599_set_initsearchtable(PyObject *py_obj, PyObject *value, void *closure)
21326 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21327 if (value == NULL) {
21328 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initsearchtable");
21332 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsearchtable));
21333 if (PyLong_Check(value)) {
21334 unsigned long long test_var;
21335 test_var = PyLong_AsUnsignedLongLong(value);
21336 if (PyErr_Occurred() != NULL) {
21339 if (test_var > uint_max) {
21340 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21341 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21344 object->initsearchtable = test_var;
21345 } else if (PyInt_Check(value)) {
21347 test_var = PyInt_AsLong(value);
21348 if (test_var < 0 || test_var > uint_max) {
21349 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21350 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21353 object->initsearchtable = test_var;
21355 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21356 PyInt_Type.tp_name, PyLong_Type.tp_name);
21363 static PyObject *py_srvsvc_NetSrvInfo599_get_alertsched(PyObject *obj, void *closure)
21365 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21366 PyObject *py_alertsched;
21367 py_alertsched = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
21368 return py_alertsched;
21371 static int py_srvsvc_NetSrvInfo599_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
21373 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21374 if (value == NULL) {
21375 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alertsched");
21379 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
21380 if (PyLong_Check(value)) {
21381 unsigned long long test_var;
21382 test_var = PyLong_AsUnsignedLongLong(value);
21383 if (PyErr_Occurred() != NULL) {
21386 if (test_var > uint_max) {
21387 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21388 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21391 object->alertsched = test_var;
21392 } else if (PyInt_Check(value)) {
21394 test_var = PyInt_AsLong(value);
21395 if (test_var < 0 || test_var > uint_max) {
21396 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21397 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21400 object->alertsched = test_var;
21402 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21403 PyInt_Type.tp_name, PyLong_Type.tp_name);
21410 static PyObject *py_srvsvc_NetSrvInfo599_get_errortreshold(PyObject *obj, void *closure)
21412 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21413 PyObject *py_errortreshold;
21414 py_errortreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->errortreshold);
21415 return py_errortreshold;
21418 static int py_srvsvc_NetSrvInfo599_set_errortreshold(PyObject *py_obj, PyObject *value, void *closure)
21420 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21421 if (value == NULL) {
21422 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->errortreshold");
21426 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->errortreshold));
21427 if (PyLong_Check(value)) {
21428 unsigned long long test_var;
21429 test_var = PyLong_AsUnsignedLongLong(value);
21430 if (PyErr_Occurred() != NULL) {
21433 if (test_var > uint_max) {
21434 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21435 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21438 object->errortreshold = test_var;
21439 } else if (PyInt_Check(value)) {
21441 test_var = PyInt_AsLong(value);
21442 if (test_var < 0 || test_var > uint_max) {
21443 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21444 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21447 object->errortreshold = test_var;
21449 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21450 PyInt_Type.tp_name, PyLong_Type.tp_name);
21457 static PyObject *py_srvsvc_NetSrvInfo599_get_networkerrortreshold(PyObject *obj, void *closure)
21459 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21460 PyObject *py_networkerrortreshold;
21461 py_networkerrortreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->networkerrortreshold);
21462 return py_networkerrortreshold;
21465 static int py_srvsvc_NetSrvInfo599_set_networkerrortreshold(PyObject *py_obj, PyObject *value, void *closure)
21467 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21468 if (value == NULL) {
21469 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->networkerrortreshold");
21473 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->networkerrortreshold));
21474 if (PyLong_Check(value)) {
21475 unsigned long long test_var;
21476 test_var = PyLong_AsUnsignedLongLong(value);
21477 if (PyErr_Occurred() != NULL) {
21480 if (test_var > uint_max) {
21481 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21482 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21485 object->networkerrortreshold = test_var;
21486 } else if (PyInt_Check(value)) {
21488 test_var = PyInt_AsLong(value);
21489 if (test_var < 0 || test_var > uint_max) {
21490 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21491 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21494 object->networkerrortreshold = test_var;
21496 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21497 PyInt_Type.tp_name, PyLong_Type.tp_name);
21504 static PyObject *py_srvsvc_NetSrvInfo599_get_diskspacetreshold(PyObject *obj, void *closure)
21506 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21507 PyObject *py_diskspacetreshold;
21508 py_diskspacetreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->diskspacetreshold);
21509 return py_diskspacetreshold;
21512 static int py_srvsvc_NetSrvInfo599_set_diskspacetreshold(PyObject *py_obj, PyObject *value, void *closure)
21514 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21515 if (value == NULL) {
21516 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->diskspacetreshold");
21520 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskspacetreshold));
21521 if (PyLong_Check(value)) {
21522 unsigned long long test_var;
21523 test_var = PyLong_AsUnsignedLongLong(value);
21524 if (PyErr_Occurred() != NULL) {
21527 if (test_var > uint_max) {
21528 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21529 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21532 object->diskspacetreshold = test_var;
21533 } else if (PyInt_Check(value)) {
21535 test_var = PyInt_AsLong(value);
21536 if (test_var < 0 || test_var > uint_max) {
21537 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21538 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21541 object->diskspacetreshold = test_var;
21543 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21544 PyInt_Type.tp_name, PyLong_Type.tp_name);
21551 static PyObject *py_srvsvc_NetSrvInfo599_get_reserved(PyObject *obj, void *closure)
21553 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21554 PyObject *py_reserved;
21555 py_reserved = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
21556 return py_reserved;
21559 static int py_srvsvc_NetSrvInfo599_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
21561 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21562 if (value == NULL) {
21563 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
21567 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
21568 if (PyLong_Check(value)) {
21569 unsigned long long test_var;
21570 test_var = PyLong_AsUnsignedLongLong(value);
21571 if (PyErr_Occurred() != NULL) {
21574 if (test_var > uint_max) {
21575 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21576 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21579 object->reserved = test_var;
21580 } else if (PyInt_Check(value)) {
21582 test_var = PyInt_AsLong(value);
21583 if (test_var < 0 || test_var > uint_max) {
21584 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21585 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21588 object->reserved = test_var;
21590 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21591 PyInt_Type.tp_name, PyLong_Type.tp_name);
21598 static PyObject *py_srvsvc_NetSrvInfo599_get_maxlinkdelay(PyObject *obj, void *closure)
21600 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21601 PyObject *py_maxlinkdelay;
21602 py_maxlinkdelay = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxlinkdelay);
21603 return py_maxlinkdelay;
21606 static int py_srvsvc_NetSrvInfo599_set_maxlinkdelay(PyObject *py_obj, PyObject *value, void *closure)
21608 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21609 if (value == NULL) {
21610 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxlinkdelay");
21614 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlinkdelay));
21615 if (PyLong_Check(value)) {
21616 unsigned long long test_var;
21617 test_var = PyLong_AsUnsignedLongLong(value);
21618 if (PyErr_Occurred() != NULL) {
21621 if (test_var > uint_max) {
21622 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21623 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21626 object->maxlinkdelay = test_var;
21627 } else if (PyInt_Check(value)) {
21629 test_var = PyInt_AsLong(value);
21630 if (test_var < 0 || test_var > uint_max) {
21631 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21632 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21635 object->maxlinkdelay = test_var;
21637 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21638 PyInt_Type.tp_name, PyLong_Type.tp_name);
21645 static PyObject *py_srvsvc_NetSrvInfo599_get_minlinkthroughput(PyObject *obj, void *closure)
21647 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21648 PyObject *py_minlinkthroughput;
21649 py_minlinkthroughput = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minlinkthroughput);
21650 return py_minlinkthroughput;
21653 static int py_srvsvc_NetSrvInfo599_set_minlinkthroughput(PyObject *py_obj, PyObject *value, void *closure)
21655 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21656 if (value == NULL) {
21657 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minlinkthroughput");
21661 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minlinkthroughput));
21662 if (PyLong_Check(value)) {
21663 unsigned long long test_var;
21664 test_var = PyLong_AsUnsignedLongLong(value);
21665 if (PyErr_Occurred() != NULL) {
21668 if (test_var > uint_max) {
21669 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21670 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21673 object->minlinkthroughput = test_var;
21674 } else if (PyInt_Check(value)) {
21676 test_var = PyInt_AsLong(value);
21677 if (test_var < 0 || test_var > uint_max) {
21678 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21679 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21682 object->minlinkthroughput = test_var;
21684 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21685 PyInt_Type.tp_name, PyLong_Type.tp_name);
21692 static PyObject *py_srvsvc_NetSrvInfo599_get_linkinfovalidtime(PyObject *obj, void *closure)
21694 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21695 PyObject *py_linkinfovalidtime;
21696 py_linkinfovalidtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->linkinfovalidtime);
21697 return py_linkinfovalidtime;
21700 static int py_srvsvc_NetSrvInfo599_set_linkinfovalidtime(PyObject *py_obj, PyObject *value, void *closure)
21702 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21703 if (value == NULL) {
21704 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->linkinfovalidtime");
21708 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->linkinfovalidtime));
21709 if (PyLong_Check(value)) {
21710 unsigned long long test_var;
21711 test_var = PyLong_AsUnsignedLongLong(value);
21712 if (PyErr_Occurred() != NULL) {
21715 if (test_var > uint_max) {
21716 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21717 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21720 object->linkinfovalidtime = test_var;
21721 } else if (PyInt_Check(value)) {
21723 test_var = PyInt_AsLong(value);
21724 if (test_var < 0 || test_var > uint_max) {
21725 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21726 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21729 object->linkinfovalidtime = test_var;
21731 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21732 PyInt_Type.tp_name, PyLong_Type.tp_name);
21739 static PyObject *py_srvsvc_NetSrvInfo599_get_scavqosinfoupdatetime(PyObject *obj, void *closure)
21741 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21742 PyObject *py_scavqosinfoupdatetime;
21743 py_scavqosinfoupdatetime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->scavqosinfoupdatetime);
21744 return py_scavqosinfoupdatetime;
21747 static int py_srvsvc_NetSrvInfo599_set_scavqosinfoupdatetime(PyObject *py_obj, PyObject *value, void *closure)
21749 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21750 if (value == NULL) {
21751 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scavqosinfoupdatetime");
21755 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavqosinfoupdatetime));
21756 if (PyLong_Check(value)) {
21757 unsigned long long test_var;
21758 test_var = PyLong_AsUnsignedLongLong(value);
21759 if (PyErr_Occurred() != NULL) {
21762 if (test_var > uint_max) {
21763 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21764 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21767 object->scavqosinfoupdatetime = test_var;
21768 } else if (PyInt_Check(value)) {
21770 test_var = PyInt_AsLong(value);
21771 if (test_var < 0 || test_var > uint_max) {
21772 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21773 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21776 object->scavqosinfoupdatetime = test_var;
21778 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21779 PyInt_Type.tp_name, PyLong_Type.tp_name);
21786 static PyObject *py_srvsvc_NetSrvInfo599_get_maxworkitemidletime(PyObject *obj, void *closure)
21788 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
21789 PyObject *py_maxworkitemidletime;
21790 py_maxworkitemidletime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitemidletime);
21791 return py_maxworkitemidletime;
21794 static int py_srvsvc_NetSrvInfo599_set_maxworkitemidletime(PyObject *py_obj, PyObject *value, void *closure)
21796 struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
21797 if (value == NULL) {
21798 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitemidletime");
21802 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitemidletime));
21803 if (PyLong_Check(value)) {
21804 unsigned long long test_var;
21805 test_var = PyLong_AsUnsignedLongLong(value);
21806 if (PyErr_Occurred() != NULL) {
21809 if (test_var > uint_max) {
21810 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
21811 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21814 object->maxworkitemidletime = test_var;
21815 } else if (PyInt_Check(value)) {
21817 test_var = PyInt_AsLong(value);
21818 if (test_var < 0 || test_var > uint_max) {
21819 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
21820 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
21823 object->maxworkitemidletime = test_var;
21825 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
21826 PyInt_Type.tp_name, PyLong_Type.tp_name);
21833 static PyGetSetDef py_srvsvc_NetSrvInfo599_getsetters[] = {
21835 .name = discard_const_p(char, "sessopen"),
21836 .get = py_srvsvc_NetSrvInfo599_get_sessopen,
21837 .set = py_srvsvc_NetSrvInfo599_set_sessopen,
21838 .doc = discard_const_p(char, "PIDL-generated element sessopen")
21841 .name = discard_const_p(char, "sesssvc"),
21842 .get = py_srvsvc_NetSrvInfo599_get_sesssvc,
21843 .set = py_srvsvc_NetSrvInfo599_set_sesssvc,
21844 .doc = discard_const_p(char, "PIDL-generated element sesssvc")
21847 .name = discard_const_p(char, "opensearch"),
21848 .get = py_srvsvc_NetSrvInfo599_get_opensearch,
21849 .set = py_srvsvc_NetSrvInfo599_set_opensearch,
21850 .doc = discard_const_p(char, "PIDL-generated element opensearch")
21853 .name = discard_const_p(char, "sizereqbufs"),
21854 .get = py_srvsvc_NetSrvInfo599_get_sizereqbufs,
21855 .set = py_srvsvc_NetSrvInfo599_set_sizereqbufs,
21856 .doc = discard_const_p(char, "PIDL-generated element sizereqbufs")
21859 .name = discard_const_p(char, "initworkitems"),
21860 .get = py_srvsvc_NetSrvInfo599_get_initworkitems,
21861 .set = py_srvsvc_NetSrvInfo599_set_initworkitems,
21862 .doc = discard_const_p(char, "PIDL-generated element initworkitems")
21865 .name = discard_const_p(char, "maxworkitems"),
21866 .get = py_srvsvc_NetSrvInfo599_get_maxworkitems,
21867 .set = py_srvsvc_NetSrvInfo599_set_maxworkitems,
21868 .doc = discard_const_p(char, "PIDL-generated element maxworkitems")
21871 .name = discard_const_p(char, "rawworkitems"),
21872 .get = py_srvsvc_NetSrvInfo599_get_rawworkitems,
21873 .set = py_srvsvc_NetSrvInfo599_set_rawworkitems,
21874 .doc = discard_const_p(char, "PIDL-generated element rawworkitems")
21877 .name = discard_const_p(char, "irpstacksize"),
21878 .get = py_srvsvc_NetSrvInfo599_get_irpstacksize,
21879 .set = py_srvsvc_NetSrvInfo599_set_irpstacksize,
21880 .doc = discard_const_p(char, "PIDL-generated element irpstacksize")
21883 .name = discard_const_p(char, "maxrawbuflen"),
21884 .get = py_srvsvc_NetSrvInfo599_get_maxrawbuflen,
21885 .set = py_srvsvc_NetSrvInfo599_set_maxrawbuflen,
21886 .doc = discard_const_p(char, "PIDL-generated element maxrawbuflen")
21889 .name = discard_const_p(char, "sessusers"),
21890 .get = py_srvsvc_NetSrvInfo599_get_sessusers,
21891 .set = py_srvsvc_NetSrvInfo599_set_sessusers,
21892 .doc = discard_const_p(char, "PIDL-generated element sessusers")
21895 .name = discard_const_p(char, "sessconns"),
21896 .get = py_srvsvc_NetSrvInfo599_get_sessconns,
21897 .set = py_srvsvc_NetSrvInfo599_set_sessconns,
21898 .doc = discard_const_p(char, "PIDL-generated element sessconns")
21901 .name = discard_const_p(char, "maxpagedmemoryusage"),
21902 .get = py_srvsvc_NetSrvInfo599_get_maxpagedmemoryusage,
21903 .set = py_srvsvc_NetSrvInfo599_set_maxpagedmemoryusage,
21904 .doc = discard_const_p(char, "PIDL-generated element maxpagedmemoryusage")
21907 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
21908 .get = py_srvsvc_NetSrvInfo599_get_maxnonpagedmemoryusage,
21909 .set = py_srvsvc_NetSrvInfo599_set_maxnonpagedmemoryusage,
21910 .doc = discard_const_p(char, "PIDL-generated element maxnonpagedmemoryusage")
21913 .name = discard_const_p(char, "enablesoftcompat"),
21914 .get = py_srvsvc_NetSrvInfo599_get_enablesoftcompat,
21915 .set = py_srvsvc_NetSrvInfo599_set_enablesoftcompat,
21916 .doc = discard_const_p(char, "PIDL-generated element enablesoftcompat")
21919 .name = discard_const_p(char, "enableforcedlogoff"),
21920 .get = py_srvsvc_NetSrvInfo599_get_enableforcedlogoff,
21921 .set = py_srvsvc_NetSrvInfo599_set_enableforcedlogoff,
21922 .doc = discard_const_p(char, "PIDL-generated element enableforcedlogoff")
21925 .name = discard_const_p(char, "timesource"),
21926 .get = py_srvsvc_NetSrvInfo599_get_timesource,
21927 .set = py_srvsvc_NetSrvInfo599_set_timesource,
21928 .doc = discard_const_p(char, "PIDL-generated element timesource")
21931 .name = discard_const_p(char, "acceptdownlevelapis"),
21932 .get = py_srvsvc_NetSrvInfo599_get_acceptdownlevelapis,
21933 .set = py_srvsvc_NetSrvInfo599_set_acceptdownlevelapis,
21934 .doc = discard_const_p(char, "PIDL-generated element acceptdownlevelapis")
21937 .name = discard_const_p(char, "lmannounce"),
21938 .get = py_srvsvc_NetSrvInfo599_get_lmannounce,
21939 .set = py_srvsvc_NetSrvInfo599_set_lmannounce,
21940 .doc = discard_const_p(char, "PIDL-generated element lmannounce")
21943 .name = discard_const_p(char, "domain"),
21944 .get = py_srvsvc_NetSrvInfo599_get_domain,
21945 .set = py_srvsvc_NetSrvInfo599_set_domain,
21946 .doc = discard_const_p(char, "PIDL-generated element domain")
21949 .name = discard_const_p(char, "maxcopyreadlen"),
21950 .get = py_srvsvc_NetSrvInfo599_get_maxcopyreadlen,
21951 .set = py_srvsvc_NetSrvInfo599_set_maxcopyreadlen,
21952 .doc = discard_const_p(char, "PIDL-generated element maxcopyreadlen")
21955 .name = discard_const_p(char, "maxcopywritelen"),
21956 .get = py_srvsvc_NetSrvInfo599_get_maxcopywritelen,
21957 .set = py_srvsvc_NetSrvInfo599_set_maxcopywritelen,
21958 .doc = discard_const_p(char, "PIDL-generated element maxcopywritelen")
21961 .name = discard_const_p(char, "minkeepsearch"),
21962 .get = py_srvsvc_NetSrvInfo599_get_minkeepsearch,
21963 .set = py_srvsvc_NetSrvInfo599_set_minkeepsearch,
21964 .doc = discard_const_p(char, "PIDL-generated element minkeepsearch")
21967 .name = discard_const_p(char, "minkeepcomplsearch"),
21968 .get = py_srvsvc_NetSrvInfo599_get_minkeepcomplsearch,
21969 .set = py_srvsvc_NetSrvInfo599_set_minkeepcomplsearch,
21970 .doc = discard_const_p(char, "PIDL-generated element minkeepcomplsearch")
21973 .name = discard_const_p(char, "maxkeepcomplsearch"),
21974 .get = py_srvsvc_NetSrvInfo599_get_maxkeepcomplsearch,
21975 .set = py_srvsvc_NetSrvInfo599_set_maxkeepcomplsearch,
21976 .doc = discard_const_p(char, "PIDL-generated element maxkeepcomplsearch")
21979 .name = discard_const_p(char, "threadcountadd"),
21980 .get = py_srvsvc_NetSrvInfo599_get_threadcountadd,
21981 .set = py_srvsvc_NetSrvInfo599_set_threadcountadd,
21982 .doc = discard_const_p(char, "PIDL-generated element threadcountadd")
21985 .name = discard_const_p(char, "numlockthreads"),
21986 .get = py_srvsvc_NetSrvInfo599_get_numlockthreads,
21987 .set = py_srvsvc_NetSrvInfo599_set_numlockthreads,
21988 .doc = discard_const_p(char, "PIDL-generated element numlockthreads")
21991 .name = discard_const_p(char, "scavtimeout"),
21992 .get = py_srvsvc_NetSrvInfo599_get_scavtimeout,
21993 .set = py_srvsvc_NetSrvInfo599_set_scavtimeout,
21994 .doc = discard_const_p(char, "PIDL-generated element scavtimeout")
21997 .name = discard_const_p(char, "minrcvqueue"),
21998 .get = py_srvsvc_NetSrvInfo599_get_minrcvqueue,
21999 .set = py_srvsvc_NetSrvInfo599_set_minrcvqueue,
22000 .doc = discard_const_p(char, "PIDL-generated element minrcvqueue")
22003 .name = discard_const_p(char, "minfreeworkitems"),
22004 .get = py_srvsvc_NetSrvInfo599_get_minfreeworkitems,
22005 .set = py_srvsvc_NetSrvInfo599_set_minfreeworkitems,
22006 .doc = discard_const_p(char, "PIDL-generated element minfreeworkitems")
22009 .name = discard_const_p(char, "xactmemsize"),
22010 .get = py_srvsvc_NetSrvInfo599_get_xactmemsize,
22011 .set = py_srvsvc_NetSrvInfo599_set_xactmemsize,
22012 .doc = discard_const_p(char, "PIDL-generated element xactmemsize")
22015 .name = discard_const_p(char, "threadpriority"),
22016 .get = py_srvsvc_NetSrvInfo599_get_threadpriority,
22017 .set = py_srvsvc_NetSrvInfo599_set_threadpriority,
22018 .doc = discard_const_p(char, "PIDL-generated element threadpriority")
22021 .name = discard_const_p(char, "maxmpxct"),
22022 .get = py_srvsvc_NetSrvInfo599_get_maxmpxct,
22023 .set = py_srvsvc_NetSrvInfo599_set_maxmpxct,
22024 .doc = discard_const_p(char, "PIDL-generated element maxmpxct")
22027 .name = discard_const_p(char, "oplockbreakwait"),
22028 .get = py_srvsvc_NetSrvInfo599_get_oplockbreakwait,
22029 .set = py_srvsvc_NetSrvInfo599_set_oplockbreakwait,
22030 .doc = discard_const_p(char, "PIDL-generated element oplockbreakwait")
22033 .name = discard_const_p(char, "oplockbreakresponsewait"),
22034 .get = py_srvsvc_NetSrvInfo599_get_oplockbreakresponsewait,
22035 .set = py_srvsvc_NetSrvInfo599_set_oplockbreakresponsewait,
22036 .doc = discard_const_p(char, "PIDL-generated element oplockbreakresponsewait")
22039 .name = discard_const_p(char, "enableoplocks"),
22040 .get = py_srvsvc_NetSrvInfo599_get_enableoplocks,
22041 .set = py_srvsvc_NetSrvInfo599_set_enableoplocks,
22042 .doc = discard_const_p(char, "PIDL-generated element enableoplocks")
22045 .name = discard_const_p(char, "enableoplockforceclose"),
22046 .get = py_srvsvc_NetSrvInfo599_get_enableoplockforceclose,
22047 .set = py_srvsvc_NetSrvInfo599_set_enableoplockforceclose,
22048 .doc = discard_const_p(char, "PIDL-generated element enableoplockforceclose")
22051 .name = discard_const_p(char, "enablefcbopens"),
22052 .get = py_srvsvc_NetSrvInfo599_get_enablefcbopens,
22053 .set = py_srvsvc_NetSrvInfo599_set_enablefcbopens,
22054 .doc = discard_const_p(char, "PIDL-generated element enablefcbopens")
22057 .name = discard_const_p(char, "enableraw"),
22058 .get = py_srvsvc_NetSrvInfo599_get_enableraw,
22059 .set = py_srvsvc_NetSrvInfo599_set_enableraw,
22060 .doc = discard_const_p(char, "PIDL-generated element enableraw")
22063 .name = discard_const_p(char, "enablesharednetdrives"),
22064 .get = py_srvsvc_NetSrvInfo599_get_enablesharednetdrives,
22065 .set = py_srvsvc_NetSrvInfo599_set_enablesharednetdrives,
22066 .doc = discard_const_p(char, "PIDL-generated element enablesharednetdrives")
22069 .name = discard_const_p(char, "minfreeconnections"),
22070 .get = py_srvsvc_NetSrvInfo599_get_minfreeconnections,
22071 .set = py_srvsvc_NetSrvInfo599_set_minfreeconnections,
22072 .doc = discard_const_p(char, "PIDL-generated element minfreeconnections")
22075 .name = discard_const_p(char, "maxfreeconnections"),
22076 .get = py_srvsvc_NetSrvInfo599_get_maxfreeconnections,
22077 .set = py_srvsvc_NetSrvInfo599_set_maxfreeconnections,
22078 .doc = discard_const_p(char, "PIDL-generated element maxfreeconnections")
22081 .name = discard_const_p(char, "initsesstable"),
22082 .get = py_srvsvc_NetSrvInfo599_get_initsesstable,
22083 .set = py_srvsvc_NetSrvInfo599_set_initsesstable,
22084 .doc = discard_const_p(char, "PIDL-generated element initsesstable")
22087 .name = discard_const_p(char, "initconntable"),
22088 .get = py_srvsvc_NetSrvInfo599_get_initconntable,
22089 .set = py_srvsvc_NetSrvInfo599_set_initconntable,
22090 .doc = discard_const_p(char, "PIDL-generated element initconntable")
22093 .name = discard_const_p(char, "initfiletable"),
22094 .get = py_srvsvc_NetSrvInfo599_get_initfiletable,
22095 .set = py_srvsvc_NetSrvInfo599_set_initfiletable,
22096 .doc = discard_const_p(char, "PIDL-generated element initfiletable")
22099 .name = discard_const_p(char, "initsearchtable"),
22100 .get = py_srvsvc_NetSrvInfo599_get_initsearchtable,
22101 .set = py_srvsvc_NetSrvInfo599_set_initsearchtable,
22102 .doc = discard_const_p(char, "PIDL-generated element initsearchtable")
22105 .name = discard_const_p(char, "alertsched"),
22106 .get = py_srvsvc_NetSrvInfo599_get_alertsched,
22107 .set = py_srvsvc_NetSrvInfo599_set_alertsched,
22108 .doc = discard_const_p(char, "PIDL-generated element alertsched")
22111 .name = discard_const_p(char, "errortreshold"),
22112 .get = py_srvsvc_NetSrvInfo599_get_errortreshold,
22113 .set = py_srvsvc_NetSrvInfo599_set_errortreshold,
22114 .doc = discard_const_p(char, "PIDL-generated element errortreshold")
22117 .name = discard_const_p(char, "networkerrortreshold"),
22118 .get = py_srvsvc_NetSrvInfo599_get_networkerrortreshold,
22119 .set = py_srvsvc_NetSrvInfo599_set_networkerrortreshold,
22120 .doc = discard_const_p(char, "PIDL-generated element networkerrortreshold")
22123 .name = discard_const_p(char, "diskspacetreshold"),
22124 .get = py_srvsvc_NetSrvInfo599_get_diskspacetreshold,
22125 .set = py_srvsvc_NetSrvInfo599_set_diskspacetreshold,
22126 .doc = discard_const_p(char, "PIDL-generated element diskspacetreshold")
22129 .name = discard_const_p(char, "reserved"),
22130 .get = py_srvsvc_NetSrvInfo599_get_reserved,
22131 .set = py_srvsvc_NetSrvInfo599_set_reserved,
22132 .doc = discard_const_p(char, "PIDL-generated element reserved")
22135 .name = discard_const_p(char, "maxlinkdelay"),
22136 .get = py_srvsvc_NetSrvInfo599_get_maxlinkdelay,
22137 .set = py_srvsvc_NetSrvInfo599_set_maxlinkdelay,
22138 .doc = discard_const_p(char, "PIDL-generated element maxlinkdelay")
22141 .name = discard_const_p(char, "minlinkthroughput"),
22142 .get = py_srvsvc_NetSrvInfo599_get_minlinkthroughput,
22143 .set = py_srvsvc_NetSrvInfo599_set_minlinkthroughput,
22144 .doc = discard_const_p(char, "PIDL-generated element minlinkthroughput")
22147 .name = discard_const_p(char, "linkinfovalidtime"),
22148 .get = py_srvsvc_NetSrvInfo599_get_linkinfovalidtime,
22149 .set = py_srvsvc_NetSrvInfo599_set_linkinfovalidtime,
22150 .doc = discard_const_p(char, "PIDL-generated element linkinfovalidtime")
22153 .name = discard_const_p(char, "scavqosinfoupdatetime"),
22154 .get = py_srvsvc_NetSrvInfo599_get_scavqosinfoupdatetime,
22155 .set = py_srvsvc_NetSrvInfo599_set_scavqosinfoupdatetime,
22156 .doc = discard_const_p(char, "PIDL-generated element scavqosinfoupdatetime")
22159 .name = discard_const_p(char, "maxworkitemidletime"),
22160 .get = py_srvsvc_NetSrvInfo599_get_maxworkitemidletime,
22161 .set = py_srvsvc_NetSrvInfo599_set_maxworkitemidletime,
22162 .doc = discard_const_p(char, "PIDL-generated element maxworkitemidletime")
22167 static PyObject *py_srvsvc_NetSrvInfo599_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22169 return pytalloc_new(struct srvsvc_NetSrvInfo599, type);
22173 static PyTypeObject srvsvc_NetSrvInfo599_Type = {
22174 PyObject_HEAD_INIT(NULL) 0,
22175 .tp_name = "srvsvc.NetSrvInfo599",
22176 .tp_getset = py_srvsvc_NetSrvInfo599_getsetters,
22177 .tp_methods = NULL,
22178 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22179 .tp_new = py_srvsvc_NetSrvInfo599_new,
22183 static PyObject *py_srvsvc_NetSrvInfo1005_get_comment(PyObject *obj, void *closure)
22185 struct srvsvc_NetSrvInfo1005 *object = (struct srvsvc_NetSrvInfo1005 *)pytalloc_get_ptr(obj);
22186 PyObject *py_comment;
22187 if (object->comment == NULL) {
22188 py_comment = Py_None;
22189 Py_INCREF(py_comment);
22191 if (object->comment == NULL) {
22192 py_comment = Py_None;
22193 Py_INCREF(py_comment);
22195 py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
22201 static int py_srvsvc_NetSrvInfo1005_set_comment(PyObject *py_obj, PyObject *value, void *closure)
22203 struct srvsvc_NetSrvInfo1005 *object = (struct srvsvc_NetSrvInfo1005 *)pytalloc_get_ptr(py_obj);
22204 if (value == NULL) {
22205 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
22208 if (value == Py_None) {
22209 object->comment = NULL;
22211 object->comment = NULL;
22212 if (value == NULL) {
22213 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->comment");
22217 const char *test_str;
22218 const char *talloc_str;
22219 PyObject *unicode = NULL;
22220 if (PyUnicode_Check(value)) {
22221 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
22222 if (unicode == NULL) {
22226 test_str = PyString_AS_STRING(unicode);
22227 } else if (PyString_Check(value)) {
22228 test_str = PyString_AS_STRING(value);
22230 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
22233 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
22234 if (unicode != NULL) {
22235 Py_DECREF(unicode);
22237 if (talloc_str == NULL) {
22241 object->comment = talloc_str;
22247 static PyGetSetDef py_srvsvc_NetSrvInfo1005_getsetters[] = {
22249 .name = discard_const_p(char, "comment"),
22250 .get = py_srvsvc_NetSrvInfo1005_get_comment,
22251 .set = py_srvsvc_NetSrvInfo1005_set_comment,
22252 .doc = discard_const_p(char, "PIDL-generated element comment")
22257 static PyObject *py_srvsvc_NetSrvInfo1005_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22259 return pytalloc_new(struct srvsvc_NetSrvInfo1005, type);
22263 static PyTypeObject srvsvc_NetSrvInfo1005_Type = {
22264 PyObject_HEAD_INIT(NULL) 0,
22265 .tp_name = "srvsvc.NetSrvInfo1005",
22266 .tp_getset = py_srvsvc_NetSrvInfo1005_getsetters,
22267 .tp_methods = NULL,
22268 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22269 .tp_new = py_srvsvc_NetSrvInfo1005_new,
22273 static PyObject *py_srvsvc_NetSrvInfo1010_get_disc(PyObject *obj, void *closure)
22275 struct srvsvc_NetSrvInfo1010 *object = (struct srvsvc_NetSrvInfo1010 *)pytalloc_get_ptr(obj);
22277 py_disc = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->disc);
22281 static int py_srvsvc_NetSrvInfo1010_set_disc(PyObject *py_obj, PyObject *value, void *closure)
22283 struct srvsvc_NetSrvInfo1010 *object = (struct srvsvc_NetSrvInfo1010 *)pytalloc_get_ptr(py_obj);
22284 if (value == NULL) {
22285 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->disc");
22289 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->disc));
22290 if (PyLong_Check(value)) {
22291 unsigned long long test_var;
22292 test_var = PyLong_AsUnsignedLongLong(value);
22293 if (PyErr_Occurred() != NULL) {
22296 if (test_var > uint_max) {
22297 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
22298 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22301 object->disc = test_var;
22302 } else if (PyInt_Check(value)) {
22304 test_var = PyInt_AsLong(value);
22305 if (test_var < 0 || test_var > uint_max) {
22306 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
22307 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22310 object->disc = test_var;
22312 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
22313 PyInt_Type.tp_name, PyLong_Type.tp_name);
22320 static PyGetSetDef py_srvsvc_NetSrvInfo1010_getsetters[] = {
22322 .name = discard_const_p(char, "disc"),
22323 .get = py_srvsvc_NetSrvInfo1010_get_disc,
22324 .set = py_srvsvc_NetSrvInfo1010_set_disc,
22325 .doc = discard_const_p(char, "PIDL-generated element disc")
22330 static PyObject *py_srvsvc_NetSrvInfo1010_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22332 return pytalloc_new(struct srvsvc_NetSrvInfo1010, type);
22336 static PyTypeObject srvsvc_NetSrvInfo1010_Type = {
22337 PyObject_HEAD_INIT(NULL) 0,
22338 .tp_name = "srvsvc.NetSrvInfo1010",
22339 .tp_getset = py_srvsvc_NetSrvInfo1010_getsetters,
22340 .tp_methods = NULL,
22341 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22342 .tp_new = py_srvsvc_NetSrvInfo1010_new,
22346 static PyObject *py_srvsvc_NetSrvInfo1016_get_hidden(PyObject *obj, void *closure)
22348 struct srvsvc_NetSrvInfo1016 *object = (struct srvsvc_NetSrvInfo1016 *)pytalloc_get_ptr(obj);
22349 PyObject *py_hidden;
22350 py_hidden = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->hidden);
22354 static int py_srvsvc_NetSrvInfo1016_set_hidden(PyObject *py_obj, PyObject *value, void *closure)
22356 struct srvsvc_NetSrvInfo1016 *object = (struct srvsvc_NetSrvInfo1016 *)pytalloc_get_ptr(py_obj);
22357 if (value == NULL) {
22358 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hidden");
22362 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hidden));
22363 if (PyLong_Check(value)) {
22364 unsigned long long test_var;
22365 test_var = PyLong_AsUnsignedLongLong(value);
22366 if (PyErr_Occurred() != NULL) {
22369 if (test_var > uint_max) {
22370 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
22371 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22374 object->hidden = test_var;
22375 } else if (PyInt_Check(value)) {
22377 test_var = PyInt_AsLong(value);
22378 if (test_var < 0 || test_var > uint_max) {
22379 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
22380 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22383 object->hidden = test_var;
22385 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
22386 PyInt_Type.tp_name, PyLong_Type.tp_name);
22393 static PyGetSetDef py_srvsvc_NetSrvInfo1016_getsetters[] = {
22395 .name = discard_const_p(char, "hidden"),
22396 .get = py_srvsvc_NetSrvInfo1016_get_hidden,
22397 .set = py_srvsvc_NetSrvInfo1016_set_hidden,
22398 .doc = discard_const_p(char, "PIDL-generated element hidden")
22403 static PyObject *py_srvsvc_NetSrvInfo1016_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22405 return pytalloc_new(struct srvsvc_NetSrvInfo1016, type);
22409 static PyTypeObject srvsvc_NetSrvInfo1016_Type = {
22410 PyObject_HEAD_INIT(NULL) 0,
22411 .tp_name = "srvsvc.NetSrvInfo1016",
22412 .tp_getset = py_srvsvc_NetSrvInfo1016_getsetters,
22413 .tp_methods = NULL,
22414 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22415 .tp_new = py_srvsvc_NetSrvInfo1016_new,
22419 static PyObject *py_srvsvc_NetSrvInfo1017_get_announce(PyObject *obj, void *closure)
22421 struct srvsvc_NetSrvInfo1017 *object = (struct srvsvc_NetSrvInfo1017 *)pytalloc_get_ptr(obj);
22422 PyObject *py_announce;
22423 py_announce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->announce);
22424 return py_announce;
22427 static int py_srvsvc_NetSrvInfo1017_set_announce(PyObject *py_obj, PyObject *value, void *closure)
22429 struct srvsvc_NetSrvInfo1017 *object = (struct srvsvc_NetSrvInfo1017 *)pytalloc_get_ptr(py_obj);
22430 if (value == NULL) {
22431 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->announce");
22435 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->announce));
22436 if (PyLong_Check(value)) {
22437 unsigned long long test_var;
22438 test_var = PyLong_AsUnsignedLongLong(value);
22439 if (PyErr_Occurred() != NULL) {
22442 if (test_var > uint_max) {
22443 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
22444 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22447 object->announce = test_var;
22448 } else if (PyInt_Check(value)) {
22450 test_var = PyInt_AsLong(value);
22451 if (test_var < 0 || test_var > uint_max) {
22452 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
22453 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22456 object->announce = test_var;
22458 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
22459 PyInt_Type.tp_name, PyLong_Type.tp_name);
22466 static PyGetSetDef py_srvsvc_NetSrvInfo1017_getsetters[] = {
22468 .name = discard_const_p(char, "announce"),
22469 .get = py_srvsvc_NetSrvInfo1017_get_announce,
22470 .set = py_srvsvc_NetSrvInfo1017_set_announce,
22471 .doc = discard_const_p(char, "PIDL-generated element announce")
22476 static PyObject *py_srvsvc_NetSrvInfo1017_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22478 return pytalloc_new(struct srvsvc_NetSrvInfo1017, type);
22482 static PyTypeObject srvsvc_NetSrvInfo1017_Type = {
22483 PyObject_HEAD_INIT(NULL) 0,
22484 .tp_name = "srvsvc.NetSrvInfo1017",
22485 .tp_getset = py_srvsvc_NetSrvInfo1017_getsetters,
22486 .tp_methods = NULL,
22487 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22488 .tp_new = py_srvsvc_NetSrvInfo1017_new,
22492 static PyObject *py_srvsvc_NetSrvInfo1018_get_anndelta(PyObject *obj, void *closure)
22494 struct srvsvc_NetSrvInfo1018 *object = (struct srvsvc_NetSrvInfo1018 *)pytalloc_get_ptr(obj);
22495 PyObject *py_anndelta;
22496 py_anndelta = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->anndelta);
22497 return py_anndelta;
22500 static int py_srvsvc_NetSrvInfo1018_set_anndelta(PyObject *py_obj, PyObject *value, void *closure)
22502 struct srvsvc_NetSrvInfo1018 *object = (struct srvsvc_NetSrvInfo1018 *)pytalloc_get_ptr(py_obj);
22503 if (value == NULL) {
22504 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->anndelta");
22508 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->anndelta));
22509 if (PyLong_Check(value)) {
22510 unsigned long long test_var;
22511 test_var = PyLong_AsUnsignedLongLong(value);
22512 if (PyErr_Occurred() != NULL) {
22515 if (test_var > uint_max) {
22516 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
22517 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22520 object->anndelta = test_var;
22521 } else if (PyInt_Check(value)) {
22523 test_var = PyInt_AsLong(value);
22524 if (test_var < 0 || test_var > uint_max) {
22525 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
22526 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22529 object->anndelta = test_var;
22531 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
22532 PyInt_Type.tp_name, PyLong_Type.tp_name);
22539 static PyGetSetDef py_srvsvc_NetSrvInfo1018_getsetters[] = {
22541 .name = discard_const_p(char, "anndelta"),
22542 .get = py_srvsvc_NetSrvInfo1018_get_anndelta,
22543 .set = py_srvsvc_NetSrvInfo1018_set_anndelta,
22544 .doc = discard_const_p(char, "PIDL-generated element anndelta")
22549 static PyObject *py_srvsvc_NetSrvInfo1018_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22551 return pytalloc_new(struct srvsvc_NetSrvInfo1018, type);
22555 static PyTypeObject srvsvc_NetSrvInfo1018_Type = {
22556 PyObject_HEAD_INIT(NULL) 0,
22557 .tp_name = "srvsvc.NetSrvInfo1018",
22558 .tp_getset = py_srvsvc_NetSrvInfo1018_getsetters,
22559 .tp_methods = NULL,
22560 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22561 .tp_new = py_srvsvc_NetSrvInfo1018_new,
22565 static PyObject *py_srvsvc_NetSrvInfo1107_get_users(PyObject *obj, void *closure)
22567 struct srvsvc_NetSrvInfo1107 *object = (struct srvsvc_NetSrvInfo1107 *)pytalloc_get_ptr(obj);
22568 PyObject *py_users;
22569 py_users = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->users);
22573 static int py_srvsvc_NetSrvInfo1107_set_users(PyObject *py_obj, PyObject *value, void *closure)
22575 struct srvsvc_NetSrvInfo1107 *object = (struct srvsvc_NetSrvInfo1107 *)pytalloc_get_ptr(py_obj);
22576 if (value == NULL) {
22577 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->users");
22581 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
22582 if (PyLong_Check(value)) {
22583 unsigned long long test_var;
22584 test_var = PyLong_AsUnsignedLongLong(value);
22585 if (PyErr_Occurred() != NULL) {
22588 if (test_var > uint_max) {
22589 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
22590 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22593 object->users = test_var;
22594 } else if (PyInt_Check(value)) {
22596 test_var = PyInt_AsLong(value);
22597 if (test_var < 0 || test_var > uint_max) {
22598 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
22599 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22602 object->users = test_var;
22604 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
22605 PyInt_Type.tp_name, PyLong_Type.tp_name);
22612 static PyGetSetDef py_srvsvc_NetSrvInfo1107_getsetters[] = {
22614 .name = discard_const_p(char, "users"),
22615 .get = py_srvsvc_NetSrvInfo1107_get_users,
22616 .set = py_srvsvc_NetSrvInfo1107_set_users,
22617 .doc = discard_const_p(char, "PIDL-generated element users")
22622 static PyObject *py_srvsvc_NetSrvInfo1107_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22624 return pytalloc_new(struct srvsvc_NetSrvInfo1107, type);
22628 static PyTypeObject srvsvc_NetSrvInfo1107_Type = {
22629 PyObject_HEAD_INIT(NULL) 0,
22630 .tp_name = "srvsvc.NetSrvInfo1107",
22631 .tp_getset = py_srvsvc_NetSrvInfo1107_getsetters,
22632 .tp_methods = NULL,
22633 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22634 .tp_new = py_srvsvc_NetSrvInfo1107_new,
22638 static PyObject *py_srvsvc_NetSrvInfo1501_get_sessopens(PyObject *obj, void *closure)
22640 struct srvsvc_NetSrvInfo1501 *object = (struct srvsvc_NetSrvInfo1501 *)pytalloc_get_ptr(obj);
22641 PyObject *py_sessopens;
22642 py_sessopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessopens);
22643 return py_sessopens;
22646 static int py_srvsvc_NetSrvInfo1501_set_sessopens(PyObject *py_obj, PyObject *value, void *closure)
22648 struct srvsvc_NetSrvInfo1501 *object = (struct srvsvc_NetSrvInfo1501 *)pytalloc_get_ptr(py_obj);
22649 if (value == NULL) {
22650 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopens");
22654 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopens));
22655 if (PyLong_Check(value)) {
22656 unsigned long long test_var;
22657 test_var = PyLong_AsUnsignedLongLong(value);
22658 if (PyErr_Occurred() != NULL) {
22661 if (test_var > uint_max) {
22662 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
22663 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22666 object->sessopens = test_var;
22667 } else if (PyInt_Check(value)) {
22669 test_var = PyInt_AsLong(value);
22670 if (test_var < 0 || test_var > uint_max) {
22671 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
22672 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22675 object->sessopens = test_var;
22677 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
22678 PyInt_Type.tp_name, PyLong_Type.tp_name);
22685 static PyGetSetDef py_srvsvc_NetSrvInfo1501_getsetters[] = {
22687 .name = discard_const_p(char, "sessopens"),
22688 .get = py_srvsvc_NetSrvInfo1501_get_sessopens,
22689 .set = py_srvsvc_NetSrvInfo1501_set_sessopens,
22690 .doc = discard_const_p(char, "PIDL-generated element sessopens")
22695 static PyObject *py_srvsvc_NetSrvInfo1501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22697 return pytalloc_new(struct srvsvc_NetSrvInfo1501, type);
22701 static PyTypeObject srvsvc_NetSrvInfo1501_Type = {
22702 PyObject_HEAD_INIT(NULL) 0,
22703 .tp_name = "srvsvc.NetSrvInfo1501",
22704 .tp_getset = py_srvsvc_NetSrvInfo1501_getsetters,
22705 .tp_methods = NULL,
22706 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22707 .tp_new = py_srvsvc_NetSrvInfo1501_new,
22711 static PyObject *py_srvsvc_NetSrvInfo1502_get_sessvcs(PyObject *obj, void *closure)
22713 struct srvsvc_NetSrvInfo1502 *object = (struct srvsvc_NetSrvInfo1502 *)pytalloc_get_ptr(obj);
22714 PyObject *py_sessvcs;
22715 py_sessvcs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessvcs);
22719 static int py_srvsvc_NetSrvInfo1502_set_sessvcs(PyObject *py_obj, PyObject *value, void *closure)
22721 struct srvsvc_NetSrvInfo1502 *object = (struct srvsvc_NetSrvInfo1502 *)pytalloc_get_ptr(py_obj);
22722 if (value == NULL) {
22723 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessvcs");
22727 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessvcs));
22728 if (PyLong_Check(value)) {
22729 unsigned long long test_var;
22730 test_var = PyLong_AsUnsignedLongLong(value);
22731 if (PyErr_Occurred() != NULL) {
22734 if (test_var > uint_max) {
22735 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
22736 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22739 object->sessvcs = test_var;
22740 } else if (PyInt_Check(value)) {
22742 test_var = PyInt_AsLong(value);
22743 if (test_var < 0 || test_var > uint_max) {
22744 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
22745 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22748 object->sessvcs = test_var;
22750 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
22751 PyInt_Type.tp_name, PyLong_Type.tp_name);
22758 static PyGetSetDef py_srvsvc_NetSrvInfo1502_getsetters[] = {
22760 .name = discard_const_p(char, "sessvcs"),
22761 .get = py_srvsvc_NetSrvInfo1502_get_sessvcs,
22762 .set = py_srvsvc_NetSrvInfo1502_set_sessvcs,
22763 .doc = discard_const_p(char, "PIDL-generated element sessvcs")
22768 static PyObject *py_srvsvc_NetSrvInfo1502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22770 return pytalloc_new(struct srvsvc_NetSrvInfo1502, type);
22774 static PyTypeObject srvsvc_NetSrvInfo1502_Type = {
22775 PyObject_HEAD_INIT(NULL) 0,
22776 .tp_name = "srvsvc.NetSrvInfo1502",
22777 .tp_getset = py_srvsvc_NetSrvInfo1502_getsetters,
22778 .tp_methods = NULL,
22779 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22780 .tp_new = py_srvsvc_NetSrvInfo1502_new,
22784 static PyObject *py_srvsvc_NetSrvInfo1503_get_opensearch(PyObject *obj, void *closure)
22786 struct srvsvc_NetSrvInfo1503 *object = (struct srvsvc_NetSrvInfo1503 *)pytalloc_get_ptr(obj);
22787 PyObject *py_opensearch;
22788 py_opensearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
22789 return py_opensearch;
22792 static int py_srvsvc_NetSrvInfo1503_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
22794 struct srvsvc_NetSrvInfo1503 *object = (struct srvsvc_NetSrvInfo1503 *)pytalloc_get_ptr(py_obj);
22795 if (value == NULL) {
22796 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
22800 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
22801 if (PyLong_Check(value)) {
22802 unsigned long long test_var;
22803 test_var = PyLong_AsUnsignedLongLong(value);
22804 if (PyErr_Occurred() != NULL) {
22807 if (test_var > uint_max) {
22808 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
22809 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22812 object->opensearch = test_var;
22813 } else if (PyInt_Check(value)) {
22815 test_var = PyInt_AsLong(value);
22816 if (test_var < 0 || test_var > uint_max) {
22817 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
22818 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22821 object->opensearch = test_var;
22823 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
22824 PyInt_Type.tp_name, PyLong_Type.tp_name);
22831 static PyGetSetDef py_srvsvc_NetSrvInfo1503_getsetters[] = {
22833 .name = discard_const_p(char, "opensearch"),
22834 .get = py_srvsvc_NetSrvInfo1503_get_opensearch,
22835 .set = py_srvsvc_NetSrvInfo1503_set_opensearch,
22836 .doc = discard_const_p(char, "PIDL-generated element opensearch")
22841 static PyObject *py_srvsvc_NetSrvInfo1503_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22843 return pytalloc_new(struct srvsvc_NetSrvInfo1503, type);
22847 static PyTypeObject srvsvc_NetSrvInfo1503_Type = {
22848 PyObject_HEAD_INIT(NULL) 0,
22849 .tp_name = "srvsvc.NetSrvInfo1503",
22850 .tp_getset = py_srvsvc_NetSrvInfo1503_getsetters,
22851 .tp_methods = NULL,
22852 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22853 .tp_new = py_srvsvc_NetSrvInfo1503_new,
22857 static PyObject *py_srvsvc_NetSrvInfo1506_get_maxworkitems(PyObject *obj, void *closure)
22859 struct srvsvc_NetSrvInfo1506 *object = (struct srvsvc_NetSrvInfo1506 *)pytalloc_get_ptr(obj);
22860 PyObject *py_maxworkitems;
22861 py_maxworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
22862 return py_maxworkitems;
22865 static int py_srvsvc_NetSrvInfo1506_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
22867 struct srvsvc_NetSrvInfo1506 *object = (struct srvsvc_NetSrvInfo1506 *)pytalloc_get_ptr(py_obj);
22868 if (value == NULL) {
22869 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitems");
22873 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
22874 if (PyLong_Check(value)) {
22875 unsigned long long test_var;
22876 test_var = PyLong_AsUnsignedLongLong(value);
22877 if (PyErr_Occurred() != NULL) {
22880 if (test_var > uint_max) {
22881 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
22882 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22885 object->maxworkitems = test_var;
22886 } else if (PyInt_Check(value)) {
22888 test_var = PyInt_AsLong(value);
22889 if (test_var < 0 || test_var > uint_max) {
22890 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
22891 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22894 object->maxworkitems = test_var;
22896 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
22897 PyInt_Type.tp_name, PyLong_Type.tp_name);
22904 static PyGetSetDef py_srvsvc_NetSrvInfo1506_getsetters[] = {
22906 .name = discard_const_p(char, "maxworkitems"),
22907 .get = py_srvsvc_NetSrvInfo1506_get_maxworkitems,
22908 .set = py_srvsvc_NetSrvInfo1506_set_maxworkitems,
22909 .doc = discard_const_p(char, "PIDL-generated element maxworkitems")
22914 static PyObject *py_srvsvc_NetSrvInfo1506_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22916 return pytalloc_new(struct srvsvc_NetSrvInfo1506, type);
22920 static PyTypeObject srvsvc_NetSrvInfo1506_Type = {
22921 PyObject_HEAD_INIT(NULL) 0,
22922 .tp_name = "srvsvc.NetSrvInfo1506",
22923 .tp_getset = py_srvsvc_NetSrvInfo1506_getsetters,
22924 .tp_methods = NULL,
22925 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22926 .tp_new = py_srvsvc_NetSrvInfo1506_new,
22930 static PyObject *py_srvsvc_NetSrvInfo1509_get_maxrawbuflen(PyObject *obj, void *closure)
22932 struct srvsvc_NetSrvInfo1509 *object = (struct srvsvc_NetSrvInfo1509 *)pytalloc_get_ptr(obj);
22933 PyObject *py_maxrawbuflen;
22934 py_maxrawbuflen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
22935 return py_maxrawbuflen;
22938 static int py_srvsvc_NetSrvInfo1509_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
22940 struct srvsvc_NetSrvInfo1509 *object = (struct srvsvc_NetSrvInfo1509 *)pytalloc_get_ptr(py_obj);
22941 if (value == NULL) {
22942 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxrawbuflen");
22946 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
22947 if (PyLong_Check(value)) {
22948 unsigned long long test_var;
22949 test_var = PyLong_AsUnsignedLongLong(value);
22950 if (PyErr_Occurred() != NULL) {
22953 if (test_var > uint_max) {
22954 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
22955 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22958 object->maxrawbuflen = test_var;
22959 } else if (PyInt_Check(value)) {
22961 test_var = PyInt_AsLong(value);
22962 if (test_var < 0 || test_var > uint_max) {
22963 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
22964 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
22967 object->maxrawbuflen = test_var;
22969 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
22970 PyInt_Type.tp_name, PyLong_Type.tp_name);
22977 static PyGetSetDef py_srvsvc_NetSrvInfo1509_getsetters[] = {
22979 .name = discard_const_p(char, "maxrawbuflen"),
22980 .get = py_srvsvc_NetSrvInfo1509_get_maxrawbuflen,
22981 .set = py_srvsvc_NetSrvInfo1509_set_maxrawbuflen,
22982 .doc = discard_const_p(char, "PIDL-generated element maxrawbuflen")
22987 static PyObject *py_srvsvc_NetSrvInfo1509_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22989 return pytalloc_new(struct srvsvc_NetSrvInfo1509, type);
22993 static PyTypeObject srvsvc_NetSrvInfo1509_Type = {
22994 PyObject_HEAD_INIT(NULL) 0,
22995 .tp_name = "srvsvc.NetSrvInfo1509",
22996 .tp_getset = py_srvsvc_NetSrvInfo1509_getsetters,
22997 .tp_methods = NULL,
22998 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22999 .tp_new = py_srvsvc_NetSrvInfo1509_new,
23003 static PyObject *py_srvsvc_NetSrvInfo1510_get_sessusers(PyObject *obj, void *closure)
23005 struct srvsvc_NetSrvInfo1510 *object = (struct srvsvc_NetSrvInfo1510 *)pytalloc_get_ptr(obj);
23006 PyObject *py_sessusers;
23007 py_sessusers = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
23008 return py_sessusers;
23011 static int py_srvsvc_NetSrvInfo1510_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
23013 struct srvsvc_NetSrvInfo1510 *object = (struct srvsvc_NetSrvInfo1510 *)pytalloc_get_ptr(py_obj);
23014 if (value == NULL) {
23015 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessusers");
23019 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
23020 if (PyLong_Check(value)) {
23021 unsigned long long test_var;
23022 test_var = PyLong_AsUnsignedLongLong(value);
23023 if (PyErr_Occurred() != NULL) {
23026 if (test_var > uint_max) {
23027 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23028 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23031 object->sessusers = test_var;
23032 } else if (PyInt_Check(value)) {
23034 test_var = PyInt_AsLong(value);
23035 if (test_var < 0 || test_var > uint_max) {
23036 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23037 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23040 object->sessusers = test_var;
23042 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23043 PyInt_Type.tp_name, PyLong_Type.tp_name);
23050 static PyGetSetDef py_srvsvc_NetSrvInfo1510_getsetters[] = {
23052 .name = discard_const_p(char, "sessusers"),
23053 .get = py_srvsvc_NetSrvInfo1510_get_sessusers,
23054 .set = py_srvsvc_NetSrvInfo1510_set_sessusers,
23055 .doc = discard_const_p(char, "PIDL-generated element sessusers")
23060 static PyObject *py_srvsvc_NetSrvInfo1510_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23062 return pytalloc_new(struct srvsvc_NetSrvInfo1510, type);
23066 static PyTypeObject srvsvc_NetSrvInfo1510_Type = {
23067 PyObject_HEAD_INIT(NULL) 0,
23068 .tp_name = "srvsvc.NetSrvInfo1510",
23069 .tp_getset = py_srvsvc_NetSrvInfo1510_getsetters,
23070 .tp_methods = NULL,
23071 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23072 .tp_new = py_srvsvc_NetSrvInfo1510_new,
23076 static PyObject *py_srvsvc_NetSrvInfo1511_get_sesscons(PyObject *obj, void *closure)
23078 struct srvsvc_NetSrvInfo1511 *object = (struct srvsvc_NetSrvInfo1511 *)pytalloc_get_ptr(obj);
23079 PyObject *py_sesscons;
23080 py_sesscons = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sesscons);
23081 return py_sesscons;
23084 static int py_srvsvc_NetSrvInfo1511_set_sesscons(PyObject *py_obj, PyObject *value, void *closure)
23086 struct srvsvc_NetSrvInfo1511 *object = (struct srvsvc_NetSrvInfo1511 *)pytalloc_get_ptr(py_obj);
23087 if (value == NULL) {
23088 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesscons");
23092 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesscons));
23093 if (PyLong_Check(value)) {
23094 unsigned long long test_var;
23095 test_var = PyLong_AsUnsignedLongLong(value);
23096 if (PyErr_Occurred() != NULL) {
23099 if (test_var > uint_max) {
23100 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23101 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23104 object->sesscons = test_var;
23105 } else if (PyInt_Check(value)) {
23107 test_var = PyInt_AsLong(value);
23108 if (test_var < 0 || test_var > uint_max) {
23109 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23110 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23113 object->sesscons = test_var;
23115 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23116 PyInt_Type.tp_name, PyLong_Type.tp_name);
23123 static PyGetSetDef py_srvsvc_NetSrvInfo1511_getsetters[] = {
23125 .name = discard_const_p(char, "sesscons"),
23126 .get = py_srvsvc_NetSrvInfo1511_get_sesscons,
23127 .set = py_srvsvc_NetSrvInfo1511_set_sesscons,
23128 .doc = discard_const_p(char, "PIDL-generated element sesscons")
23133 static PyObject *py_srvsvc_NetSrvInfo1511_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23135 return pytalloc_new(struct srvsvc_NetSrvInfo1511, type);
23139 static PyTypeObject srvsvc_NetSrvInfo1511_Type = {
23140 PyObject_HEAD_INIT(NULL) 0,
23141 .tp_name = "srvsvc.NetSrvInfo1511",
23142 .tp_getset = py_srvsvc_NetSrvInfo1511_getsetters,
23143 .tp_methods = NULL,
23144 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23145 .tp_new = py_srvsvc_NetSrvInfo1511_new,
23149 static PyObject *py_srvsvc_NetSrvInfo1512_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
23151 struct srvsvc_NetSrvInfo1512 *object = (struct srvsvc_NetSrvInfo1512 *)pytalloc_get_ptr(obj);
23152 PyObject *py_maxnonpagedmemoryusage;
23153 py_maxnonpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
23154 return py_maxnonpagedmemoryusage;
23157 static int py_srvsvc_NetSrvInfo1512_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
23159 struct srvsvc_NetSrvInfo1512 *object = (struct srvsvc_NetSrvInfo1512 *)pytalloc_get_ptr(py_obj);
23160 if (value == NULL) {
23161 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxnonpagedmemoryusage");
23165 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
23166 if (PyLong_Check(value)) {
23167 unsigned long long test_var;
23168 test_var = PyLong_AsUnsignedLongLong(value);
23169 if (PyErr_Occurred() != NULL) {
23172 if (test_var > uint_max) {
23173 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23174 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23177 object->maxnonpagedmemoryusage = test_var;
23178 } else if (PyInt_Check(value)) {
23180 test_var = PyInt_AsLong(value);
23181 if (test_var < 0 || test_var > uint_max) {
23182 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23183 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23186 object->maxnonpagedmemoryusage = test_var;
23188 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23189 PyInt_Type.tp_name, PyLong_Type.tp_name);
23196 static PyGetSetDef py_srvsvc_NetSrvInfo1512_getsetters[] = {
23198 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
23199 .get = py_srvsvc_NetSrvInfo1512_get_maxnonpagedmemoryusage,
23200 .set = py_srvsvc_NetSrvInfo1512_set_maxnonpagedmemoryusage,
23201 .doc = discard_const_p(char, "PIDL-generated element maxnonpagedmemoryusage")
23206 static PyObject *py_srvsvc_NetSrvInfo1512_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23208 return pytalloc_new(struct srvsvc_NetSrvInfo1512, type);
23212 static PyTypeObject srvsvc_NetSrvInfo1512_Type = {
23213 PyObject_HEAD_INIT(NULL) 0,
23214 .tp_name = "srvsvc.NetSrvInfo1512",
23215 .tp_getset = py_srvsvc_NetSrvInfo1512_getsetters,
23216 .tp_methods = NULL,
23217 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23218 .tp_new = py_srvsvc_NetSrvInfo1512_new,
23222 static PyObject *py_srvsvc_NetSrvInfo1513_get_maxpagedmemoryusage(PyObject *obj, void *closure)
23224 struct srvsvc_NetSrvInfo1513 *object = (struct srvsvc_NetSrvInfo1513 *)pytalloc_get_ptr(obj);
23225 PyObject *py_maxpagedmemoryusage;
23226 py_maxpagedmemoryusage = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
23227 return py_maxpagedmemoryusage;
23230 static int py_srvsvc_NetSrvInfo1513_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
23232 struct srvsvc_NetSrvInfo1513 *object = (struct srvsvc_NetSrvInfo1513 *)pytalloc_get_ptr(py_obj);
23233 if (value == NULL) {
23234 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxpagedmemoryusage");
23238 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
23239 if (PyLong_Check(value)) {
23240 unsigned long long test_var;
23241 test_var = PyLong_AsUnsignedLongLong(value);
23242 if (PyErr_Occurred() != NULL) {
23245 if (test_var > uint_max) {
23246 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23247 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23250 object->maxpagedmemoryusage = test_var;
23251 } else if (PyInt_Check(value)) {
23253 test_var = PyInt_AsLong(value);
23254 if (test_var < 0 || test_var > uint_max) {
23255 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23256 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23259 object->maxpagedmemoryusage = test_var;
23261 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23262 PyInt_Type.tp_name, PyLong_Type.tp_name);
23269 static PyGetSetDef py_srvsvc_NetSrvInfo1513_getsetters[] = {
23271 .name = discard_const_p(char, "maxpagedmemoryusage"),
23272 .get = py_srvsvc_NetSrvInfo1513_get_maxpagedmemoryusage,
23273 .set = py_srvsvc_NetSrvInfo1513_set_maxpagedmemoryusage,
23274 .doc = discard_const_p(char, "PIDL-generated element maxpagedmemoryusage")
23279 static PyObject *py_srvsvc_NetSrvInfo1513_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23281 return pytalloc_new(struct srvsvc_NetSrvInfo1513, type);
23285 static PyTypeObject srvsvc_NetSrvInfo1513_Type = {
23286 PyObject_HEAD_INIT(NULL) 0,
23287 .tp_name = "srvsvc.NetSrvInfo1513",
23288 .tp_getset = py_srvsvc_NetSrvInfo1513_getsetters,
23289 .tp_methods = NULL,
23290 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23291 .tp_new = py_srvsvc_NetSrvInfo1513_new,
23295 static PyObject *py_srvsvc_NetSrvInfo1514_get_enablesoftcompat(PyObject *obj, void *closure)
23297 struct srvsvc_NetSrvInfo1514 *object = (struct srvsvc_NetSrvInfo1514 *)pytalloc_get_ptr(obj);
23298 PyObject *py_enablesoftcompat;
23299 py_enablesoftcompat = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
23300 return py_enablesoftcompat;
23303 static int py_srvsvc_NetSrvInfo1514_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
23305 struct srvsvc_NetSrvInfo1514 *object = (struct srvsvc_NetSrvInfo1514 *)pytalloc_get_ptr(py_obj);
23306 if (value == NULL) {
23307 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesoftcompat");
23311 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
23312 if (PyLong_Check(value)) {
23313 unsigned long long test_var;
23314 test_var = PyLong_AsUnsignedLongLong(value);
23315 if (PyErr_Occurred() != NULL) {
23318 if (test_var > uint_max) {
23319 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23320 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23323 object->enablesoftcompat = test_var;
23324 } else if (PyInt_Check(value)) {
23326 test_var = PyInt_AsLong(value);
23327 if (test_var < 0 || test_var > uint_max) {
23328 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23329 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23332 object->enablesoftcompat = test_var;
23334 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23335 PyInt_Type.tp_name, PyLong_Type.tp_name);
23342 static PyGetSetDef py_srvsvc_NetSrvInfo1514_getsetters[] = {
23344 .name = discard_const_p(char, "enablesoftcompat"),
23345 .get = py_srvsvc_NetSrvInfo1514_get_enablesoftcompat,
23346 .set = py_srvsvc_NetSrvInfo1514_set_enablesoftcompat,
23347 .doc = discard_const_p(char, "PIDL-generated element enablesoftcompat")
23352 static PyObject *py_srvsvc_NetSrvInfo1514_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23354 return pytalloc_new(struct srvsvc_NetSrvInfo1514, type);
23358 static PyTypeObject srvsvc_NetSrvInfo1514_Type = {
23359 PyObject_HEAD_INIT(NULL) 0,
23360 .tp_name = "srvsvc.NetSrvInfo1514",
23361 .tp_getset = py_srvsvc_NetSrvInfo1514_getsetters,
23362 .tp_methods = NULL,
23363 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23364 .tp_new = py_srvsvc_NetSrvInfo1514_new,
23368 static PyObject *py_srvsvc_NetSrvInfo1515_get_enableforcedlogoff(PyObject *obj, void *closure)
23370 struct srvsvc_NetSrvInfo1515 *object = (struct srvsvc_NetSrvInfo1515 *)pytalloc_get_ptr(obj);
23371 PyObject *py_enableforcedlogoff;
23372 py_enableforcedlogoff = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
23373 return py_enableforcedlogoff;
23376 static int py_srvsvc_NetSrvInfo1515_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
23378 struct srvsvc_NetSrvInfo1515 *object = (struct srvsvc_NetSrvInfo1515 *)pytalloc_get_ptr(py_obj);
23379 if (value == NULL) {
23380 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableforcedlogoff");
23384 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
23385 if (PyLong_Check(value)) {
23386 unsigned long long test_var;
23387 test_var = PyLong_AsUnsignedLongLong(value);
23388 if (PyErr_Occurred() != NULL) {
23391 if (test_var > uint_max) {
23392 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23393 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23396 object->enableforcedlogoff = test_var;
23397 } else if (PyInt_Check(value)) {
23399 test_var = PyInt_AsLong(value);
23400 if (test_var < 0 || test_var > uint_max) {
23401 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23402 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23405 object->enableforcedlogoff = test_var;
23407 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23408 PyInt_Type.tp_name, PyLong_Type.tp_name);
23415 static PyGetSetDef py_srvsvc_NetSrvInfo1515_getsetters[] = {
23417 .name = discard_const_p(char, "enableforcedlogoff"),
23418 .get = py_srvsvc_NetSrvInfo1515_get_enableforcedlogoff,
23419 .set = py_srvsvc_NetSrvInfo1515_set_enableforcedlogoff,
23420 .doc = discard_const_p(char, "PIDL-generated element enableforcedlogoff")
23425 static PyObject *py_srvsvc_NetSrvInfo1515_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23427 return pytalloc_new(struct srvsvc_NetSrvInfo1515, type);
23431 static PyTypeObject srvsvc_NetSrvInfo1515_Type = {
23432 PyObject_HEAD_INIT(NULL) 0,
23433 .tp_name = "srvsvc.NetSrvInfo1515",
23434 .tp_getset = py_srvsvc_NetSrvInfo1515_getsetters,
23435 .tp_methods = NULL,
23436 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23437 .tp_new = py_srvsvc_NetSrvInfo1515_new,
23441 static PyObject *py_srvsvc_NetSrvInfo1516_get_timesource(PyObject *obj, void *closure)
23443 struct srvsvc_NetSrvInfo1516 *object = (struct srvsvc_NetSrvInfo1516 *)pytalloc_get_ptr(obj);
23444 PyObject *py_timesource;
23445 py_timesource = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
23446 return py_timesource;
23449 static int py_srvsvc_NetSrvInfo1516_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
23451 struct srvsvc_NetSrvInfo1516 *object = (struct srvsvc_NetSrvInfo1516 *)pytalloc_get_ptr(py_obj);
23452 if (value == NULL) {
23453 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timesource");
23457 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
23458 if (PyLong_Check(value)) {
23459 unsigned long long test_var;
23460 test_var = PyLong_AsUnsignedLongLong(value);
23461 if (PyErr_Occurred() != NULL) {
23464 if (test_var > uint_max) {
23465 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23466 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23469 object->timesource = test_var;
23470 } else if (PyInt_Check(value)) {
23472 test_var = PyInt_AsLong(value);
23473 if (test_var < 0 || test_var > uint_max) {
23474 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23475 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23478 object->timesource = test_var;
23480 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23481 PyInt_Type.tp_name, PyLong_Type.tp_name);
23488 static PyGetSetDef py_srvsvc_NetSrvInfo1516_getsetters[] = {
23490 .name = discard_const_p(char, "timesource"),
23491 .get = py_srvsvc_NetSrvInfo1516_get_timesource,
23492 .set = py_srvsvc_NetSrvInfo1516_set_timesource,
23493 .doc = discard_const_p(char, "PIDL-generated element timesource")
23498 static PyObject *py_srvsvc_NetSrvInfo1516_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23500 return pytalloc_new(struct srvsvc_NetSrvInfo1516, type);
23504 static PyTypeObject srvsvc_NetSrvInfo1516_Type = {
23505 PyObject_HEAD_INIT(NULL) 0,
23506 .tp_name = "srvsvc.NetSrvInfo1516",
23507 .tp_getset = py_srvsvc_NetSrvInfo1516_getsetters,
23508 .tp_methods = NULL,
23509 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23510 .tp_new = py_srvsvc_NetSrvInfo1516_new,
23514 static PyObject *py_srvsvc_NetSrvInfo1518_get_lmannounce(PyObject *obj, void *closure)
23516 struct srvsvc_NetSrvInfo1518 *object = (struct srvsvc_NetSrvInfo1518 *)pytalloc_get_ptr(obj);
23517 PyObject *py_lmannounce;
23518 py_lmannounce = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
23519 return py_lmannounce;
23522 static int py_srvsvc_NetSrvInfo1518_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
23524 struct srvsvc_NetSrvInfo1518 *object = (struct srvsvc_NetSrvInfo1518 *)pytalloc_get_ptr(py_obj);
23525 if (value == NULL) {
23526 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmannounce");
23530 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
23531 if (PyLong_Check(value)) {
23532 unsigned long long test_var;
23533 test_var = PyLong_AsUnsignedLongLong(value);
23534 if (PyErr_Occurred() != NULL) {
23537 if (test_var > uint_max) {
23538 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23539 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23542 object->lmannounce = test_var;
23543 } else if (PyInt_Check(value)) {
23545 test_var = PyInt_AsLong(value);
23546 if (test_var < 0 || test_var > uint_max) {
23547 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23548 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23551 object->lmannounce = test_var;
23553 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23554 PyInt_Type.tp_name, PyLong_Type.tp_name);
23561 static PyGetSetDef py_srvsvc_NetSrvInfo1518_getsetters[] = {
23563 .name = discard_const_p(char, "lmannounce"),
23564 .get = py_srvsvc_NetSrvInfo1518_get_lmannounce,
23565 .set = py_srvsvc_NetSrvInfo1518_set_lmannounce,
23566 .doc = discard_const_p(char, "PIDL-generated element lmannounce")
23571 static PyObject *py_srvsvc_NetSrvInfo1518_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23573 return pytalloc_new(struct srvsvc_NetSrvInfo1518, type);
23577 static PyTypeObject srvsvc_NetSrvInfo1518_Type = {
23578 PyObject_HEAD_INIT(NULL) 0,
23579 .tp_name = "srvsvc.NetSrvInfo1518",
23580 .tp_getset = py_srvsvc_NetSrvInfo1518_getsetters,
23581 .tp_methods = NULL,
23582 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23583 .tp_new = py_srvsvc_NetSrvInfo1518_new,
23587 static PyObject *py_srvsvc_NetSrvInfo1520_get_maxcopyreadlen(PyObject *obj, void *closure)
23589 struct srvsvc_NetSrvInfo1520 *object = (struct srvsvc_NetSrvInfo1520 *)pytalloc_get_ptr(obj);
23590 PyObject *py_maxcopyreadlen;
23591 py_maxcopyreadlen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopyreadlen);
23592 return py_maxcopyreadlen;
23595 static int py_srvsvc_NetSrvInfo1520_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
23597 struct srvsvc_NetSrvInfo1520 *object = (struct srvsvc_NetSrvInfo1520 *)pytalloc_get_ptr(py_obj);
23598 if (value == NULL) {
23599 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopyreadlen");
23603 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
23604 if (PyLong_Check(value)) {
23605 unsigned long long test_var;
23606 test_var = PyLong_AsUnsignedLongLong(value);
23607 if (PyErr_Occurred() != NULL) {
23610 if (test_var > uint_max) {
23611 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23612 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23615 object->maxcopyreadlen = test_var;
23616 } else if (PyInt_Check(value)) {
23618 test_var = PyInt_AsLong(value);
23619 if (test_var < 0 || test_var > uint_max) {
23620 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23621 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23624 object->maxcopyreadlen = test_var;
23626 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23627 PyInt_Type.tp_name, PyLong_Type.tp_name);
23634 static PyGetSetDef py_srvsvc_NetSrvInfo1520_getsetters[] = {
23636 .name = discard_const_p(char, "maxcopyreadlen"),
23637 .get = py_srvsvc_NetSrvInfo1520_get_maxcopyreadlen,
23638 .set = py_srvsvc_NetSrvInfo1520_set_maxcopyreadlen,
23639 .doc = discard_const_p(char, "PIDL-generated element maxcopyreadlen")
23644 static PyObject *py_srvsvc_NetSrvInfo1520_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23646 return pytalloc_new(struct srvsvc_NetSrvInfo1520, type);
23650 static PyTypeObject srvsvc_NetSrvInfo1520_Type = {
23651 PyObject_HEAD_INIT(NULL) 0,
23652 .tp_name = "srvsvc.NetSrvInfo1520",
23653 .tp_getset = py_srvsvc_NetSrvInfo1520_getsetters,
23654 .tp_methods = NULL,
23655 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23656 .tp_new = py_srvsvc_NetSrvInfo1520_new,
23660 static PyObject *py_srvsvc_NetSrvInfo1521_get_maxcopywritelen(PyObject *obj, void *closure)
23662 struct srvsvc_NetSrvInfo1521 *object = (struct srvsvc_NetSrvInfo1521 *)pytalloc_get_ptr(obj);
23663 PyObject *py_maxcopywritelen;
23664 py_maxcopywritelen = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxcopywritelen);
23665 return py_maxcopywritelen;
23668 static int py_srvsvc_NetSrvInfo1521_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
23670 struct srvsvc_NetSrvInfo1521 *object = (struct srvsvc_NetSrvInfo1521 *)pytalloc_get_ptr(py_obj);
23671 if (value == NULL) {
23672 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopywritelen");
23676 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
23677 if (PyLong_Check(value)) {
23678 unsigned long long test_var;
23679 test_var = PyLong_AsUnsignedLongLong(value);
23680 if (PyErr_Occurred() != NULL) {
23683 if (test_var > uint_max) {
23684 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23685 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23688 object->maxcopywritelen = test_var;
23689 } else if (PyInt_Check(value)) {
23691 test_var = PyInt_AsLong(value);
23692 if (test_var < 0 || test_var > uint_max) {
23693 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23694 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23697 object->maxcopywritelen = test_var;
23699 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23700 PyInt_Type.tp_name, PyLong_Type.tp_name);
23707 static PyGetSetDef py_srvsvc_NetSrvInfo1521_getsetters[] = {
23709 .name = discard_const_p(char, "maxcopywritelen"),
23710 .get = py_srvsvc_NetSrvInfo1521_get_maxcopywritelen,
23711 .set = py_srvsvc_NetSrvInfo1521_set_maxcopywritelen,
23712 .doc = discard_const_p(char, "PIDL-generated element maxcopywritelen")
23717 static PyObject *py_srvsvc_NetSrvInfo1521_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23719 return pytalloc_new(struct srvsvc_NetSrvInfo1521, type);
23723 static PyTypeObject srvsvc_NetSrvInfo1521_Type = {
23724 PyObject_HEAD_INIT(NULL) 0,
23725 .tp_name = "srvsvc.NetSrvInfo1521",
23726 .tp_getset = py_srvsvc_NetSrvInfo1521_getsetters,
23727 .tp_methods = NULL,
23728 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23729 .tp_new = py_srvsvc_NetSrvInfo1521_new,
23733 static PyObject *py_srvsvc_NetSrvInfo1522_get_minkeepsearch(PyObject *obj, void *closure)
23735 struct srvsvc_NetSrvInfo1522 *object = (struct srvsvc_NetSrvInfo1522 *)pytalloc_get_ptr(obj);
23736 PyObject *py_minkeepsearch;
23737 py_minkeepsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepsearch);
23738 return py_minkeepsearch;
23741 static int py_srvsvc_NetSrvInfo1522_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
23743 struct srvsvc_NetSrvInfo1522 *object = (struct srvsvc_NetSrvInfo1522 *)pytalloc_get_ptr(py_obj);
23744 if (value == NULL) {
23745 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepsearch");
23749 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
23750 if (PyLong_Check(value)) {
23751 unsigned long long test_var;
23752 test_var = PyLong_AsUnsignedLongLong(value);
23753 if (PyErr_Occurred() != NULL) {
23756 if (test_var > uint_max) {
23757 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23758 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23761 object->minkeepsearch = test_var;
23762 } else if (PyInt_Check(value)) {
23764 test_var = PyInt_AsLong(value);
23765 if (test_var < 0 || test_var > uint_max) {
23766 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23767 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23770 object->minkeepsearch = test_var;
23772 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23773 PyInt_Type.tp_name, PyLong_Type.tp_name);
23780 static PyGetSetDef py_srvsvc_NetSrvInfo1522_getsetters[] = {
23782 .name = discard_const_p(char, "minkeepsearch"),
23783 .get = py_srvsvc_NetSrvInfo1522_get_minkeepsearch,
23784 .set = py_srvsvc_NetSrvInfo1522_set_minkeepsearch,
23785 .doc = discard_const_p(char, "PIDL-generated element minkeepsearch")
23790 static PyObject *py_srvsvc_NetSrvInfo1522_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23792 return pytalloc_new(struct srvsvc_NetSrvInfo1522, type);
23796 static PyTypeObject srvsvc_NetSrvInfo1522_Type = {
23797 PyObject_HEAD_INIT(NULL) 0,
23798 .tp_name = "srvsvc.NetSrvInfo1522",
23799 .tp_getset = py_srvsvc_NetSrvInfo1522_getsetters,
23800 .tp_methods = NULL,
23801 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23802 .tp_new = py_srvsvc_NetSrvInfo1522_new,
23806 static PyObject *py_srvsvc_NetSrvInfo1523_get_maxkeepsearch(PyObject *obj, void *closure)
23808 struct srvsvc_NetSrvInfo1523 *object = (struct srvsvc_NetSrvInfo1523 *)pytalloc_get_ptr(obj);
23809 PyObject *py_maxkeepsearch;
23810 py_maxkeepsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepsearch);
23811 return py_maxkeepsearch;
23814 static int py_srvsvc_NetSrvInfo1523_set_maxkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
23816 struct srvsvc_NetSrvInfo1523 *object = (struct srvsvc_NetSrvInfo1523 *)pytalloc_get_ptr(py_obj);
23817 if (value == NULL) {
23818 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxkeepsearch");
23822 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepsearch));
23823 if (PyLong_Check(value)) {
23824 unsigned long long test_var;
23825 test_var = PyLong_AsUnsignedLongLong(value);
23826 if (PyErr_Occurred() != NULL) {
23829 if (test_var > uint_max) {
23830 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23831 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23834 object->maxkeepsearch = test_var;
23835 } else if (PyInt_Check(value)) {
23837 test_var = PyInt_AsLong(value);
23838 if (test_var < 0 || test_var > uint_max) {
23839 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23840 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23843 object->maxkeepsearch = test_var;
23845 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23846 PyInt_Type.tp_name, PyLong_Type.tp_name);
23853 static PyGetSetDef py_srvsvc_NetSrvInfo1523_getsetters[] = {
23855 .name = discard_const_p(char, "maxkeepsearch"),
23856 .get = py_srvsvc_NetSrvInfo1523_get_maxkeepsearch,
23857 .set = py_srvsvc_NetSrvInfo1523_set_maxkeepsearch,
23858 .doc = discard_const_p(char, "PIDL-generated element maxkeepsearch")
23863 static PyObject *py_srvsvc_NetSrvInfo1523_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23865 return pytalloc_new(struct srvsvc_NetSrvInfo1523, type);
23869 static PyTypeObject srvsvc_NetSrvInfo1523_Type = {
23870 PyObject_HEAD_INIT(NULL) 0,
23871 .tp_name = "srvsvc.NetSrvInfo1523",
23872 .tp_getset = py_srvsvc_NetSrvInfo1523_getsetters,
23873 .tp_methods = NULL,
23874 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23875 .tp_new = py_srvsvc_NetSrvInfo1523_new,
23879 static PyObject *py_srvsvc_NetSrvInfo1524_get_minkeepcomplsearch(PyObject *obj, void *closure)
23881 struct srvsvc_NetSrvInfo1524 *object = (struct srvsvc_NetSrvInfo1524 *)pytalloc_get_ptr(obj);
23882 PyObject *py_minkeepcomplsearch;
23883 py_minkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minkeepcomplsearch);
23884 return py_minkeepcomplsearch;
23887 static int py_srvsvc_NetSrvInfo1524_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
23889 struct srvsvc_NetSrvInfo1524 *object = (struct srvsvc_NetSrvInfo1524 *)pytalloc_get_ptr(py_obj);
23890 if (value == NULL) {
23891 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepcomplsearch");
23895 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
23896 if (PyLong_Check(value)) {
23897 unsigned long long test_var;
23898 test_var = PyLong_AsUnsignedLongLong(value);
23899 if (PyErr_Occurred() != NULL) {
23902 if (test_var > uint_max) {
23903 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23904 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23907 object->minkeepcomplsearch = test_var;
23908 } else if (PyInt_Check(value)) {
23910 test_var = PyInt_AsLong(value);
23911 if (test_var < 0 || test_var > uint_max) {
23912 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23913 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23916 object->minkeepcomplsearch = test_var;
23918 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23919 PyInt_Type.tp_name, PyLong_Type.tp_name);
23926 static PyGetSetDef py_srvsvc_NetSrvInfo1524_getsetters[] = {
23928 .name = discard_const_p(char, "minkeepcomplsearch"),
23929 .get = py_srvsvc_NetSrvInfo1524_get_minkeepcomplsearch,
23930 .set = py_srvsvc_NetSrvInfo1524_set_minkeepcomplsearch,
23931 .doc = discard_const_p(char, "PIDL-generated element minkeepcomplsearch")
23936 static PyObject *py_srvsvc_NetSrvInfo1524_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23938 return pytalloc_new(struct srvsvc_NetSrvInfo1524, type);
23942 static PyTypeObject srvsvc_NetSrvInfo1524_Type = {
23943 PyObject_HEAD_INIT(NULL) 0,
23944 .tp_name = "srvsvc.NetSrvInfo1524",
23945 .tp_getset = py_srvsvc_NetSrvInfo1524_getsetters,
23946 .tp_methods = NULL,
23947 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23948 .tp_new = py_srvsvc_NetSrvInfo1524_new,
23952 static PyObject *py_srvsvc_NetSrvInfo1525_get_maxkeepcomplsearch(PyObject *obj, void *closure)
23954 struct srvsvc_NetSrvInfo1525 *object = (struct srvsvc_NetSrvInfo1525 *)pytalloc_get_ptr(obj);
23955 PyObject *py_maxkeepcomplsearch;
23956 py_maxkeepcomplsearch = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepcomplsearch);
23957 return py_maxkeepcomplsearch;
23960 static int py_srvsvc_NetSrvInfo1525_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
23962 struct srvsvc_NetSrvInfo1525 *object = (struct srvsvc_NetSrvInfo1525 *)pytalloc_get_ptr(py_obj);
23963 if (value == NULL) {
23964 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxkeepcomplsearch");
23968 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
23969 if (PyLong_Check(value)) {
23970 unsigned long long test_var;
23971 test_var = PyLong_AsUnsignedLongLong(value);
23972 if (PyErr_Occurred() != NULL) {
23975 if (test_var > uint_max) {
23976 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
23977 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23980 object->maxkeepcomplsearch = test_var;
23981 } else if (PyInt_Check(value)) {
23983 test_var = PyInt_AsLong(value);
23984 if (test_var < 0 || test_var > uint_max) {
23985 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
23986 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
23989 object->maxkeepcomplsearch = test_var;
23991 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
23992 PyInt_Type.tp_name, PyLong_Type.tp_name);
23999 static PyGetSetDef py_srvsvc_NetSrvInfo1525_getsetters[] = {
24001 .name = discard_const_p(char, "maxkeepcomplsearch"),
24002 .get = py_srvsvc_NetSrvInfo1525_get_maxkeepcomplsearch,
24003 .set = py_srvsvc_NetSrvInfo1525_set_maxkeepcomplsearch,
24004 .doc = discard_const_p(char, "PIDL-generated element maxkeepcomplsearch")
24009 static PyObject *py_srvsvc_NetSrvInfo1525_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24011 return pytalloc_new(struct srvsvc_NetSrvInfo1525, type);
24015 static PyTypeObject srvsvc_NetSrvInfo1525_Type = {
24016 PyObject_HEAD_INIT(NULL) 0,
24017 .tp_name = "srvsvc.NetSrvInfo1525",
24018 .tp_getset = py_srvsvc_NetSrvInfo1525_getsetters,
24019 .tp_methods = NULL,
24020 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24021 .tp_new = py_srvsvc_NetSrvInfo1525_new,
24025 static PyObject *py_srvsvc_NetSrvInfo1528_get_scavtimeout(PyObject *obj, void *closure)
24027 struct srvsvc_NetSrvInfo1528 *object = (struct srvsvc_NetSrvInfo1528 *)pytalloc_get_ptr(obj);
24028 PyObject *py_scavtimeout;
24029 py_scavtimeout = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->scavtimeout);
24030 return py_scavtimeout;
24033 static int py_srvsvc_NetSrvInfo1528_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
24035 struct srvsvc_NetSrvInfo1528 *object = (struct srvsvc_NetSrvInfo1528 *)pytalloc_get_ptr(py_obj);
24036 if (value == NULL) {
24037 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scavtimeout");
24041 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
24042 if (PyLong_Check(value)) {
24043 unsigned long long test_var;
24044 test_var = PyLong_AsUnsignedLongLong(value);
24045 if (PyErr_Occurred() != NULL) {
24048 if (test_var > uint_max) {
24049 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24050 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24053 object->scavtimeout = test_var;
24054 } else if (PyInt_Check(value)) {
24056 test_var = PyInt_AsLong(value);
24057 if (test_var < 0 || test_var > uint_max) {
24058 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24059 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24062 object->scavtimeout = test_var;
24064 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24065 PyInt_Type.tp_name, PyLong_Type.tp_name);
24072 static PyGetSetDef py_srvsvc_NetSrvInfo1528_getsetters[] = {
24074 .name = discard_const_p(char, "scavtimeout"),
24075 .get = py_srvsvc_NetSrvInfo1528_get_scavtimeout,
24076 .set = py_srvsvc_NetSrvInfo1528_set_scavtimeout,
24077 .doc = discard_const_p(char, "PIDL-generated element scavtimeout")
24082 static PyObject *py_srvsvc_NetSrvInfo1528_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24084 return pytalloc_new(struct srvsvc_NetSrvInfo1528, type);
24088 static PyTypeObject srvsvc_NetSrvInfo1528_Type = {
24089 PyObject_HEAD_INIT(NULL) 0,
24090 .tp_name = "srvsvc.NetSrvInfo1528",
24091 .tp_getset = py_srvsvc_NetSrvInfo1528_getsetters,
24092 .tp_methods = NULL,
24093 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24094 .tp_new = py_srvsvc_NetSrvInfo1528_new,
24098 static PyObject *py_srvsvc_NetSrvInfo1529_get_minrcvqueue(PyObject *obj, void *closure)
24100 struct srvsvc_NetSrvInfo1529 *object = (struct srvsvc_NetSrvInfo1529 *)pytalloc_get_ptr(obj);
24101 PyObject *py_minrcvqueue;
24102 py_minrcvqueue = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minrcvqueue);
24103 return py_minrcvqueue;
24106 static int py_srvsvc_NetSrvInfo1529_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
24108 struct srvsvc_NetSrvInfo1529 *object = (struct srvsvc_NetSrvInfo1529 *)pytalloc_get_ptr(py_obj);
24109 if (value == NULL) {
24110 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minrcvqueue");
24114 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
24115 if (PyLong_Check(value)) {
24116 unsigned long long test_var;
24117 test_var = PyLong_AsUnsignedLongLong(value);
24118 if (PyErr_Occurred() != NULL) {
24121 if (test_var > uint_max) {
24122 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24123 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24126 object->minrcvqueue = test_var;
24127 } else if (PyInt_Check(value)) {
24129 test_var = PyInt_AsLong(value);
24130 if (test_var < 0 || test_var > uint_max) {
24131 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24132 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24135 object->minrcvqueue = test_var;
24137 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24138 PyInt_Type.tp_name, PyLong_Type.tp_name);
24145 static PyGetSetDef py_srvsvc_NetSrvInfo1529_getsetters[] = {
24147 .name = discard_const_p(char, "minrcvqueue"),
24148 .get = py_srvsvc_NetSrvInfo1529_get_minrcvqueue,
24149 .set = py_srvsvc_NetSrvInfo1529_set_minrcvqueue,
24150 .doc = discard_const_p(char, "PIDL-generated element minrcvqueue")
24155 static PyObject *py_srvsvc_NetSrvInfo1529_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24157 return pytalloc_new(struct srvsvc_NetSrvInfo1529, type);
24161 static PyTypeObject srvsvc_NetSrvInfo1529_Type = {
24162 PyObject_HEAD_INIT(NULL) 0,
24163 .tp_name = "srvsvc.NetSrvInfo1529",
24164 .tp_getset = py_srvsvc_NetSrvInfo1529_getsetters,
24165 .tp_methods = NULL,
24166 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24167 .tp_new = py_srvsvc_NetSrvInfo1529_new,
24171 static PyObject *py_srvsvc_NetSrvInfo1530_get_minfreeworkitems(PyObject *obj, void *closure)
24173 struct srvsvc_NetSrvInfo1530 *object = (struct srvsvc_NetSrvInfo1530 *)pytalloc_get_ptr(obj);
24174 PyObject *py_minfreeworkitems;
24175 py_minfreeworkitems = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeworkitems);
24176 return py_minfreeworkitems;
24179 static int py_srvsvc_NetSrvInfo1530_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
24181 struct srvsvc_NetSrvInfo1530 *object = (struct srvsvc_NetSrvInfo1530 *)pytalloc_get_ptr(py_obj);
24182 if (value == NULL) {
24183 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeworkitems");
24187 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
24188 if (PyLong_Check(value)) {
24189 unsigned long long test_var;
24190 test_var = PyLong_AsUnsignedLongLong(value);
24191 if (PyErr_Occurred() != NULL) {
24194 if (test_var > uint_max) {
24195 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24196 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24199 object->minfreeworkitems = test_var;
24200 } else if (PyInt_Check(value)) {
24202 test_var = PyInt_AsLong(value);
24203 if (test_var < 0 || test_var > uint_max) {
24204 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24205 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24208 object->minfreeworkitems = test_var;
24210 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24211 PyInt_Type.tp_name, PyLong_Type.tp_name);
24218 static PyGetSetDef py_srvsvc_NetSrvInfo1530_getsetters[] = {
24220 .name = discard_const_p(char, "minfreeworkitems"),
24221 .get = py_srvsvc_NetSrvInfo1530_get_minfreeworkitems,
24222 .set = py_srvsvc_NetSrvInfo1530_set_minfreeworkitems,
24223 .doc = discard_const_p(char, "PIDL-generated element minfreeworkitems")
24228 static PyObject *py_srvsvc_NetSrvInfo1530_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24230 return pytalloc_new(struct srvsvc_NetSrvInfo1530, type);
24234 static PyTypeObject srvsvc_NetSrvInfo1530_Type = {
24235 PyObject_HEAD_INIT(NULL) 0,
24236 .tp_name = "srvsvc.NetSrvInfo1530",
24237 .tp_getset = py_srvsvc_NetSrvInfo1530_getsetters,
24238 .tp_methods = NULL,
24239 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24240 .tp_new = py_srvsvc_NetSrvInfo1530_new,
24244 static PyObject *py_srvsvc_NetSrvInfo1533_get_maxmpxct(PyObject *obj, void *closure)
24246 struct srvsvc_NetSrvInfo1533 *object = (struct srvsvc_NetSrvInfo1533 *)pytalloc_get_ptr(obj);
24247 PyObject *py_maxmpxct;
24248 py_maxmpxct = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxmpxct);
24249 return py_maxmpxct;
24252 static int py_srvsvc_NetSrvInfo1533_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
24254 struct srvsvc_NetSrvInfo1533 *object = (struct srvsvc_NetSrvInfo1533 *)pytalloc_get_ptr(py_obj);
24255 if (value == NULL) {
24256 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxmpxct");
24260 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
24261 if (PyLong_Check(value)) {
24262 unsigned long long test_var;
24263 test_var = PyLong_AsUnsignedLongLong(value);
24264 if (PyErr_Occurred() != NULL) {
24267 if (test_var > uint_max) {
24268 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24269 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24272 object->maxmpxct = test_var;
24273 } else if (PyInt_Check(value)) {
24275 test_var = PyInt_AsLong(value);
24276 if (test_var < 0 || test_var > uint_max) {
24277 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24278 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24281 object->maxmpxct = test_var;
24283 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24284 PyInt_Type.tp_name, PyLong_Type.tp_name);
24291 static PyGetSetDef py_srvsvc_NetSrvInfo1533_getsetters[] = {
24293 .name = discard_const_p(char, "maxmpxct"),
24294 .get = py_srvsvc_NetSrvInfo1533_get_maxmpxct,
24295 .set = py_srvsvc_NetSrvInfo1533_set_maxmpxct,
24296 .doc = discard_const_p(char, "PIDL-generated element maxmpxct")
24301 static PyObject *py_srvsvc_NetSrvInfo1533_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24303 return pytalloc_new(struct srvsvc_NetSrvInfo1533, type);
24307 static PyTypeObject srvsvc_NetSrvInfo1533_Type = {
24308 PyObject_HEAD_INIT(NULL) 0,
24309 .tp_name = "srvsvc.NetSrvInfo1533",
24310 .tp_getset = py_srvsvc_NetSrvInfo1533_getsetters,
24311 .tp_methods = NULL,
24312 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24313 .tp_new = py_srvsvc_NetSrvInfo1533_new,
24317 static PyObject *py_srvsvc_NetSrvInfo1534_get_oplockbreakwait(PyObject *obj, void *closure)
24319 struct srvsvc_NetSrvInfo1534 *object = (struct srvsvc_NetSrvInfo1534 *)pytalloc_get_ptr(obj);
24320 PyObject *py_oplockbreakwait;
24321 py_oplockbreakwait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakwait);
24322 return py_oplockbreakwait;
24325 static int py_srvsvc_NetSrvInfo1534_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
24327 struct srvsvc_NetSrvInfo1534 *object = (struct srvsvc_NetSrvInfo1534 *)pytalloc_get_ptr(py_obj);
24328 if (value == NULL) {
24329 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakwait");
24333 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
24334 if (PyLong_Check(value)) {
24335 unsigned long long test_var;
24336 test_var = PyLong_AsUnsignedLongLong(value);
24337 if (PyErr_Occurred() != NULL) {
24340 if (test_var > uint_max) {
24341 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24342 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24345 object->oplockbreakwait = test_var;
24346 } else if (PyInt_Check(value)) {
24348 test_var = PyInt_AsLong(value);
24349 if (test_var < 0 || test_var > uint_max) {
24350 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24351 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24354 object->oplockbreakwait = test_var;
24356 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24357 PyInt_Type.tp_name, PyLong_Type.tp_name);
24364 static PyGetSetDef py_srvsvc_NetSrvInfo1534_getsetters[] = {
24366 .name = discard_const_p(char, "oplockbreakwait"),
24367 .get = py_srvsvc_NetSrvInfo1534_get_oplockbreakwait,
24368 .set = py_srvsvc_NetSrvInfo1534_set_oplockbreakwait,
24369 .doc = discard_const_p(char, "PIDL-generated element oplockbreakwait")
24374 static PyObject *py_srvsvc_NetSrvInfo1534_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24376 return pytalloc_new(struct srvsvc_NetSrvInfo1534, type);
24380 static PyTypeObject srvsvc_NetSrvInfo1534_Type = {
24381 PyObject_HEAD_INIT(NULL) 0,
24382 .tp_name = "srvsvc.NetSrvInfo1534",
24383 .tp_getset = py_srvsvc_NetSrvInfo1534_getsetters,
24384 .tp_methods = NULL,
24385 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24386 .tp_new = py_srvsvc_NetSrvInfo1534_new,
24390 static PyObject *py_srvsvc_NetSrvInfo1535_get_oplockbreakresponsewait(PyObject *obj, void *closure)
24392 struct srvsvc_NetSrvInfo1535 *object = (struct srvsvc_NetSrvInfo1535 *)pytalloc_get_ptr(obj);
24393 PyObject *py_oplockbreakresponsewait;
24394 py_oplockbreakresponsewait = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakresponsewait);
24395 return py_oplockbreakresponsewait;
24398 static int py_srvsvc_NetSrvInfo1535_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
24400 struct srvsvc_NetSrvInfo1535 *object = (struct srvsvc_NetSrvInfo1535 *)pytalloc_get_ptr(py_obj);
24401 if (value == NULL) {
24402 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakresponsewait");
24406 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
24407 if (PyLong_Check(value)) {
24408 unsigned long long test_var;
24409 test_var = PyLong_AsUnsignedLongLong(value);
24410 if (PyErr_Occurred() != NULL) {
24413 if (test_var > uint_max) {
24414 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24415 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24418 object->oplockbreakresponsewait = test_var;
24419 } else if (PyInt_Check(value)) {
24421 test_var = PyInt_AsLong(value);
24422 if (test_var < 0 || test_var > uint_max) {
24423 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24424 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24427 object->oplockbreakresponsewait = test_var;
24429 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24430 PyInt_Type.tp_name, PyLong_Type.tp_name);
24437 static PyGetSetDef py_srvsvc_NetSrvInfo1535_getsetters[] = {
24439 .name = discard_const_p(char, "oplockbreakresponsewait"),
24440 .get = py_srvsvc_NetSrvInfo1535_get_oplockbreakresponsewait,
24441 .set = py_srvsvc_NetSrvInfo1535_set_oplockbreakresponsewait,
24442 .doc = discard_const_p(char, "PIDL-generated element oplockbreakresponsewait")
24447 static PyObject *py_srvsvc_NetSrvInfo1535_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24449 return pytalloc_new(struct srvsvc_NetSrvInfo1535, type);
24453 static PyTypeObject srvsvc_NetSrvInfo1535_Type = {
24454 PyObject_HEAD_INIT(NULL) 0,
24455 .tp_name = "srvsvc.NetSrvInfo1535",
24456 .tp_getset = py_srvsvc_NetSrvInfo1535_getsetters,
24457 .tp_methods = NULL,
24458 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24459 .tp_new = py_srvsvc_NetSrvInfo1535_new,
24463 static PyObject *py_srvsvc_NetSrvInfo1536_get_enableoplocks(PyObject *obj, void *closure)
24465 struct srvsvc_NetSrvInfo1536 *object = (struct srvsvc_NetSrvInfo1536 *)pytalloc_get_ptr(obj);
24466 PyObject *py_enableoplocks;
24467 py_enableoplocks = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplocks);
24468 return py_enableoplocks;
24471 static int py_srvsvc_NetSrvInfo1536_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
24473 struct srvsvc_NetSrvInfo1536 *object = (struct srvsvc_NetSrvInfo1536 *)pytalloc_get_ptr(py_obj);
24474 if (value == NULL) {
24475 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplocks");
24479 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
24480 if (PyLong_Check(value)) {
24481 unsigned long long test_var;
24482 test_var = PyLong_AsUnsignedLongLong(value);
24483 if (PyErr_Occurred() != NULL) {
24486 if (test_var > uint_max) {
24487 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24488 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24491 object->enableoplocks = test_var;
24492 } else if (PyInt_Check(value)) {
24494 test_var = PyInt_AsLong(value);
24495 if (test_var < 0 || test_var > uint_max) {
24496 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24497 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24500 object->enableoplocks = test_var;
24502 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24503 PyInt_Type.tp_name, PyLong_Type.tp_name);
24510 static PyGetSetDef py_srvsvc_NetSrvInfo1536_getsetters[] = {
24512 .name = discard_const_p(char, "enableoplocks"),
24513 .get = py_srvsvc_NetSrvInfo1536_get_enableoplocks,
24514 .set = py_srvsvc_NetSrvInfo1536_set_enableoplocks,
24515 .doc = discard_const_p(char, "PIDL-generated element enableoplocks")
24520 static PyObject *py_srvsvc_NetSrvInfo1536_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24522 return pytalloc_new(struct srvsvc_NetSrvInfo1536, type);
24526 static PyTypeObject srvsvc_NetSrvInfo1536_Type = {
24527 PyObject_HEAD_INIT(NULL) 0,
24528 .tp_name = "srvsvc.NetSrvInfo1536",
24529 .tp_getset = py_srvsvc_NetSrvInfo1536_getsetters,
24530 .tp_methods = NULL,
24531 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24532 .tp_new = py_srvsvc_NetSrvInfo1536_new,
24536 static PyObject *py_srvsvc_NetSrvInfo1537_get_enableoplockforceclose(PyObject *obj, void *closure)
24538 struct srvsvc_NetSrvInfo1537 *object = (struct srvsvc_NetSrvInfo1537 *)pytalloc_get_ptr(obj);
24539 PyObject *py_enableoplockforceclose;
24540 py_enableoplockforceclose = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableoplockforceclose);
24541 return py_enableoplockforceclose;
24544 static int py_srvsvc_NetSrvInfo1537_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
24546 struct srvsvc_NetSrvInfo1537 *object = (struct srvsvc_NetSrvInfo1537 *)pytalloc_get_ptr(py_obj);
24547 if (value == NULL) {
24548 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplockforceclose");
24552 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
24553 if (PyLong_Check(value)) {
24554 unsigned long long test_var;
24555 test_var = PyLong_AsUnsignedLongLong(value);
24556 if (PyErr_Occurred() != NULL) {
24559 if (test_var > uint_max) {
24560 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24561 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24564 object->enableoplockforceclose = test_var;
24565 } else if (PyInt_Check(value)) {
24567 test_var = PyInt_AsLong(value);
24568 if (test_var < 0 || test_var > uint_max) {
24569 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24570 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24573 object->enableoplockforceclose = test_var;
24575 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24576 PyInt_Type.tp_name, PyLong_Type.tp_name);
24583 static PyGetSetDef py_srvsvc_NetSrvInfo1537_getsetters[] = {
24585 .name = discard_const_p(char, "enableoplockforceclose"),
24586 .get = py_srvsvc_NetSrvInfo1537_get_enableoplockforceclose,
24587 .set = py_srvsvc_NetSrvInfo1537_set_enableoplockforceclose,
24588 .doc = discard_const_p(char, "PIDL-generated element enableoplockforceclose")
24593 static PyObject *py_srvsvc_NetSrvInfo1537_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24595 return pytalloc_new(struct srvsvc_NetSrvInfo1537, type);
24599 static PyTypeObject srvsvc_NetSrvInfo1537_Type = {
24600 PyObject_HEAD_INIT(NULL) 0,
24601 .tp_name = "srvsvc.NetSrvInfo1537",
24602 .tp_getset = py_srvsvc_NetSrvInfo1537_getsetters,
24603 .tp_methods = NULL,
24604 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24605 .tp_new = py_srvsvc_NetSrvInfo1537_new,
24609 static PyObject *py_srvsvc_NetSrvInfo1538_get_enablefcbopens(PyObject *obj, void *closure)
24611 struct srvsvc_NetSrvInfo1538 *object = (struct srvsvc_NetSrvInfo1538 *)pytalloc_get_ptr(obj);
24612 PyObject *py_enablefcbopens;
24613 py_enablefcbopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablefcbopens);
24614 return py_enablefcbopens;
24617 static int py_srvsvc_NetSrvInfo1538_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
24619 struct srvsvc_NetSrvInfo1538 *object = (struct srvsvc_NetSrvInfo1538 *)pytalloc_get_ptr(py_obj);
24620 if (value == NULL) {
24621 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablefcbopens");
24625 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
24626 if (PyLong_Check(value)) {
24627 unsigned long long test_var;
24628 test_var = PyLong_AsUnsignedLongLong(value);
24629 if (PyErr_Occurred() != NULL) {
24632 if (test_var > uint_max) {
24633 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24634 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24637 object->enablefcbopens = test_var;
24638 } else if (PyInt_Check(value)) {
24640 test_var = PyInt_AsLong(value);
24641 if (test_var < 0 || test_var > uint_max) {
24642 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24643 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24646 object->enablefcbopens = test_var;
24648 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24649 PyInt_Type.tp_name, PyLong_Type.tp_name);
24656 static PyGetSetDef py_srvsvc_NetSrvInfo1538_getsetters[] = {
24658 .name = discard_const_p(char, "enablefcbopens"),
24659 .get = py_srvsvc_NetSrvInfo1538_get_enablefcbopens,
24660 .set = py_srvsvc_NetSrvInfo1538_set_enablefcbopens,
24661 .doc = discard_const_p(char, "PIDL-generated element enablefcbopens")
24666 static PyObject *py_srvsvc_NetSrvInfo1538_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24668 return pytalloc_new(struct srvsvc_NetSrvInfo1538, type);
24672 static PyTypeObject srvsvc_NetSrvInfo1538_Type = {
24673 PyObject_HEAD_INIT(NULL) 0,
24674 .tp_name = "srvsvc.NetSrvInfo1538",
24675 .tp_getset = py_srvsvc_NetSrvInfo1538_getsetters,
24676 .tp_methods = NULL,
24677 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24678 .tp_new = py_srvsvc_NetSrvInfo1538_new,
24682 static PyObject *py_srvsvc_NetSrvInfo1539_get_enableraw(PyObject *obj, void *closure)
24684 struct srvsvc_NetSrvInfo1539 *object = (struct srvsvc_NetSrvInfo1539 *)pytalloc_get_ptr(obj);
24685 PyObject *py_enableraw;
24686 py_enableraw = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enableraw);
24687 return py_enableraw;
24690 static int py_srvsvc_NetSrvInfo1539_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
24692 struct srvsvc_NetSrvInfo1539 *object = (struct srvsvc_NetSrvInfo1539 *)pytalloc_get_ptr(py_obj);
24693 if (value == NULL) {
24694 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableraw");
24698 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
24699 if (PyLong_Check(value)) {
24700 unsigned long long test_var;
24701 test_var = PyLong_AsUnsignedLongLong(value);
24702 if (PyErr_Occurred() != NULL) {
24705 if (test_var > uint_max) {
24706 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24707 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24710 object->enableraw = test_var;
24711 } else if (PyInt_Check(value)) {
24713 test_var = PyInt_AsLong(value);
24714 if (test_var < 0 || test_var > uint_max) {
24715 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24716 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24719 object->enableraw = test_var;
24721 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24722 PyInt_Type.tp_name, PyLong_Type.tp_name);
24729 static PyGetSetDef py_srvsvc_NetSrvInfo1539_getsetters[] = {
24731 .name = discard_const_p(char, "enableraw"),
24732 .get = py_srvsvc_NetSrvInfo1539_get_enableraw,
24733 .set = py_srvsvc_NetSrvInfo1539_set_enableraw,
24734 .doc = discard_const_p(char, "PIDL-generated element enableraw")
24739 static PyObject *py_srvsvc_NetSrvInfo1539_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24741 return pytalloc_new(struct srvsvc_NetSrvInfo1539, type);
24745 static PyTypeObject srvsvc_NetSrvInfo1539_Type = {
24746 PyObject_HEAD_INIT(NULL) 0,
24747 .tp_name = "srvsvc.NetSrvInfo1539",
24748 .tp_getset = py_srvsvc_NetSrvInfo1539_getsetters,
24749 .tp_methods = NULL,
24750 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24751 .tp_new = py_srvsvc_NetSrvInfo1539_new,
24755 static PyObject *py_srvsvc_NetSrvInfo1540_get_enablesharednetdrives(PyObject *obj, void *closure)
24757 struct srvsvc_NetSrvInfo1540 *object = (struct srvsvc_NetSrvInfo1540 *)pytalloc_get_ptr(obj);
24758 PyObject *py_enablesharednetdrives;
24759 py_enablesharednetdrives = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->enablesharednetdrives);
24760 return py_enablesharednetdrives;
24763 static int py_srvsvc_NetSrvInfo1540_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
24765 struct srvsvc_NetSrvInfo1540 *object = (struct srvsvc_NetSrvInfo1540 *)pytalloc_get_ptr(py_obj);
24766 if (value == NULL) {
24767 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesharednetdrives");
24771 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
24772 if (PyLong_Check(value)) {
24773 unsigned long long test_var;
24774 test_var = PyLong_AsUnsignedLongLong(value);
24775 if (PyErr_Occurred() != NULL) {
24778 if (test_var > uint_max) {
24779 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24780 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24783 object->enablesharednetdrives = test_var;
24784 } else if (PyInt_Check(value)) {
24786 test_var = PyInt_AsLong(value);
24787 if (test_var < 0 || test_var > uint_max) {
24788 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24789 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24792 object->enablesharednetdrives = test_var;
24794 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24795 PyInt_Type.tp_name, PyLong_Type.tp_name);
24802 static PyGetSetDef py_srvsvc_NetSrvInfo1540_getsetters[] = {
24804 .name = discard_const_p(char, "enablesharednetdrives"),
24805 .get = py_srvsvc_NetSrvInfo1540_get_enablesharednetdrives,
24806 .set = py_srvsvc_NetSrvInfo1540_set_enablesharednetdrives,
24807 .doc = discard_const_p(char, "PIDL-generated element enablesharednetdrives")
24812 static PyObject *py_srvsvc_NetSrvInfo1540_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24814 return pytalloc_new(struct srvsvc_NetSrvInfo1540, type);
24818 static PyTypeObject srvsvc_NetSrvInfo1540_Type = {
24819 PyObject_HEAD_INIT(NULL) 0,
24820 .tp_name = "srvsvc.NetSrvInfo1540",
24821 .tp_getset = py_srvsvc_NetSrvInfo1540_getsetters,
24822 .tp_methods = NULL,
24823 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24824 .tp_new = py_srvsvc_NetSrvInfo1540_new,
24828 static PyObject *py_srvsvc_NetSrvInfo1541_get_minfreeconnections(PyObject *obj, void *closure)
24830 struct srvsvc_NetSrvInfo1541 *object = (struct srvsvc_NetSrvInfo1541 *)pytalloc_get_ptr(obj);
24831 PyObject *py_minfreeconnections;
24832 py_minfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minfreeconnections);
24833 return py_minfreeconnections;
24836 static int py_srvsvc_NetSrvInfo1541_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
24838 struct srvsvc_NetSrvInfo1541 *object = (struct srvsvc_NetSrvInfo1541 *)pytalloc_get_ptr(py_obj);
24839 if (value == NULL) {
24840 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeconnections");
24844 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
24845 if (PyLong_Check(value)) {
24846 unsigned long long test_var;
24847 test_var = PyLong_AsUnsignedLongLong(value);
24848 if (PyErr_Occurred() != NULL) {
24851 if (test_var > uint_max) {
24852 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24853 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24856 object->minfreeconnections = test_var;
24857 } else if (PyInt_Check(value)) {
24859 test_var = PyInt_AsLong(value);
24860 if (test_var < 0 || test_var > uint_max) {
24861 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24862 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24865 object->minfreeconnections = test_var;
24867 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24868 PyInt_Type.tp_name, PyLong_Type.tp_name);
24875 static PyGetSetDef py_srvsvc_NetSrvInfo1541_getsetters[] = {
24877 .name = discard_const_p(char, "minfreeconnections"),
24878 .get = py_srvsvc_NetSrvInfo1541_get_minfreeconnections,
24879 .set = py_srvsvc_NetSrvInfo1541_set_minfreeconnections,
24880 .doc = discard_const_p(char, "PIDL-generated element minfreeconnections")
24885 static PyObject *py_srvsvc_NetSrvInfo1541_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24887 return pytalloc_new(struct srvsvc_NetSrvInfo1541, type);
24891 static PyTypeObject srvsvc_NetSrvInfo1541_Type = {
24892 PyObject_HEAD_INIT(NULL) 0,
24893 .tp_name = "srvsvc.NetSrvInfo1541",
24894 .tp_getset = py_srvsvc_NetSrvInfo1541_getsetters,
24895 .tp_methods = NULL,
24896 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24897 .tp_new = py_srvsvc_NetSrvInfo1541_new,
24901 static PyObject *py_srvsvc_NetSrvInfo1542_get_maxfreeconnections(PyObject *obj, void *closure)
24903 struct srvsvc_NetSrvInfo1542 *object = (struct srvsvc_NetSrvInfo1542 *)pytalloc_get_ptr(obj);
24904 PyObject *py_maxfreeconnections;
24905 py_maxfreeconnections = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxfreeconnections);
24906 return py_maxfreeconnections;
24909 static int py_srvsvc_NetSrvInfo1542_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
24911 struct srvsvc_NetSrvInfo1542 *object = (struct srvsvc_NetSrvInfo1542 *)pytalloc_get_ptr(py_obj);
24912 if (value == NULL) {
24913 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxfreeconnections");
24917 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
24918 if (PyLong_Check(value)) {
24919 unsigned long long test_var;
24920 test_var = PyLong_AsUnsignedLongLong(value);
24921 if (PyErr_Occurred() != NULL) {
24924 if (test_var > uint_max) {
24925 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24926 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24929 object->maxfreeconnections = test_var;
24930 } else if (PyInt_Check(value)) {
24932 test_var = PyInt_AsLong(value);
24933 if (test_var < 0 || test_var > uint_max) {
24934 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
24935 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
24938 object->maxfreeconnections = test_var;
24940 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
24941 PyInt_Type.tp_name, PyLong_Type.tp_name);
24948 static PyGetSetDef py_srvsvc_NetSrvInfo1542_getsetters[] = {
24950 .name = discard_const_p(char, "maxfreeconnections"),
24951 .get = py_srvsvc_NetSrvInfo1542_get_maxfreeconnections,
24952 .set = py_srvsvc_NetSrvInfo1542_set_maxfreeconnections,
24953 .doc = discard_const_p(char, "PIDL-generated element maxfreeconnections")
24958 static PyObject *py_srvsvc_NetSrvInfo1542_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24960 return pytalloc_new(struct srvsvc_NetSrvInfo1542, type);
24964 static PyTypeObject srvsvc_NetSrvInfo1542_Type = {
24965 PyObject_HEAD_INIT(NULL) 0,
24966 .tp_name = "srvsvc.NetSrvInfo1542",
24967 .tp_getset = py_srvsvc_NetSrvInfo1542_getsetters,
24968 .tp_methods = NULL,
24969 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24970 .tp_new = py_srvsvc_NetSrvInfo1542_new,
24974 static PyObject *py_srvsvc_NetSrvInfo1543_get_initsesstable(PyObject *obj, void *closure)
24976 struct srvsvc_NetSrvInfo1543 *object = (struct srvsvc_NetSrvInfo1543 *)pytalloc_get_ptr(obj);
24977 PyObject *py_initsesstable;
24978 py_initsesstable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initsesstable);
24979 return py_initsesstable;
24982 static int py_srvsvc_NetSrvInfo1543_set_initsesstable(PyObject *py_obj, PyObject *value, void *closure)
24984 struct srvsvc_NetSrvInfo1543 *object = (struct srvsvc_NetSrvInfo1543 *)pytalloc_get_ptr(py_obj);
24985 if (value == NULL) {
24986 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initsesstable");
24990 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsesstable));
24991 if (PyLong_Check(value)) {
24992 unsigned long long test_var;
24993 test_var = PyLong_AsUnsignedLongLong(value);
24994 if (PyErr_Occurred() != NULL) {
24997 if (test_var > uint_max) {
24998 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
24999 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25002 object->initsesstable = test_var;
25003 } else if (PyInt_Check(value)) {
25005 test_var = PyInt_AsLong(value);
25006 if (test_var < 0 || test_var > uint_max) {
25007 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25008 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25011 object->initsesstable = test_var;
25013 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25014 PyInt_Type.tp_name, PyLong_Type.tp_name);
25021 static PyGetSetDef py_srvsvc_NetSrvInfo1543_getsetters[] = {
25023 .name = discard_const_p(char, "initsesstable"),
25024 .get = py_srvsvc_NetSrvInfo1543_get_initsesstable,
25025 .set = py_srvsvc_NetSrvInfo1543_set_initsesstable,
25026 .doc = discard_const_p(char, "PIDL-generated element initsesstable")
25031 static PyObject *py_srvsvc_NetSrvInfo1543_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25033 return pytalloc_new(struct srvsvc_NetSrvInfo1543, type);
25037 static PyTypeObject srvsvc_NetSrvInfo1543_Type = {
25038 PyObject_HEAD_INIT(NULL) 0,
25039 .tp_name = "srvsvc.NetSrvInfo1543",
25040 .tp_getset = py_srvsvc_NetSrvInfo1543_getsetters,
25041 .tp_methods = NULL,
25042 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25043 .tp_new = py_srvsvc_NetSrvInfo1543_new,
25047 static PyObject *py_srvsvc_NetSrvInfo1544_get_initconntable(PyObject *obj, void *closure)
25049 struct srvsvc_NetSrvInfo1544 *object = (struct srvsvc_NetSrvInfo1544 *)pytalloc_get_ptr(obj);
25050 PyObject *py_initconntable;
25051 py_initconntable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initconntable);
25052 return py_initconntable;
25055 static int py_srvsvc_NetSrvInfo1544_set_initconntable(PyObject *py_obj, PyObject *value, void *closure)
25057 struct srvsvc_NetSrvInfo1544 *object = (struct srvsvc_NetSrvInfo1544 *)pytalloc_get_ptr(py_obj);
25058 if (value == NULL) {
25059 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initconntable");
25063 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initconntable));
25064 if (PyLong_Check(value)) {
25065 unsigned long long test_var;
25066 test_var = PyLong_AsUnsignedLongLong(value);
25067 if (PyErr_Occurred() != NULL) {
25070 if (test_var > uint_max) {
25071 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25072 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25075 object->initconntable = test_var;
25076 } else if (PyInt_Check(value)) {
25078 test_var = PyInt_AsLong(value);
25079 if (test_var < 0 || test_var > uint_max) {
25080 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25081 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25084 object->initconntable = test_var;
25086 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25087 PyInt_Type.tp_name, PyLong_Type.tp_name);
25094 static PyGetSetDef py_srvsvc_NetSrvInfo1544_getsetters[] = {
25096 .name = discard_const_p(char, "initconntable"),
25097 .get = py_srvsvc_NetSrvInfo1544_get_initconntable,
25098 .set = py_srvsvc_NetSrvInfo1544_set_initconntable,
25099 .doc = discard_const_p(char, "PIDL-generated element initconntable")
25104 static PyObject *py_srvsvc_NetSrvInfo1544_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25106 return pytalloc_new(struct srvsvc_NetSrvInfo1544, type);
25110 static PyTypeObject srvsvc_NetSrvInfo1544_Type = {
25111 PyObject_HEAD_INIT(NULL) 0,
25112 .tp_name = "srvsvc.NetSrvInfo1544",
25113 .tp_getset = py_srvsvc_NetSrvInfo1544_getsetters,
25114 .tp_methods = NULL,
25115 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25116 .tp_new = py_srvsvc_NetSrvInfo1544_new,
25120 static PyObject *py_srvsvc_NetSrvInfo1545_get_initfiletable(PyObject *obj, void *closure)
25122 struct srvsvc_NetSrvInfo1545 *object = (struct srvsvc_NetSrvInfo1545 *)pytalloc_get_ptr(obj);
25123 PyObject *py_initfiletable;
25124 py_initfiletable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initfiletable);
25125 return py_initfiletable;
25128 static int py_srvsvc_NetSrvInfo1545_set_initfiletable(PyObject *py_obj, PyObject *value, void *closure)
25130 struct srvsvc_NetSrvInfo1545 *object = (struct srvsvc_NetSrvInfo1545 *)pytalloc_get_ptr(py_obj);
25131 if (value == NULL) {
25132 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initfiletable");
25136 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initfiletable));
25137 if (PyLong_Check(value)) {
25138 unsigned long long test_var;
25139 test_var = PyLong_AsUnsignedLongLong(value);
25140 if (PyErr_Occurred() != NULL) {
25143 if (test_var > uint_max) {
25144 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25145 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25148 object->initfiletable = test_var;
25149 } else if (PyInt_Check(value)) {
25151 test_var = PyInt_AsLong(value);
25152 if (test_var < 0 || test_var > uint_max) {
25153 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25154 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25157 object->initfiletable = test_var;
25159 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25160 PyInt_Type.tp_name, PyLong_Type.tp_name);
25167 static PyGetSetDef py_srvsvc_NetSrvInfo1545_getsetters[] = {
25169 .name = discard_const_p(char, "initfiletable"),
25170 .get = py_srvsvc_NetSrvInfo1545_get_initfiletable,
25171 .set = py_srvsvc_NetSrvInfo1545_set_initfiletable,
25172 .doc = discard_const_p(char, "PIDL-generated element initfiletable")
25177 static PyObject *py_srvsvc_NetSrvInfo1545_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25179 return pytalloc_new(struct srvsvc_NetSrvInfo1545, type);
25183 static PyTypeObject srvsvc_NetSrvInfo1545_Type = {
25184 PyObject_HEAD_INIT(NULL) 0,
25185 .tp_name = "srvsvc.NetSrvInfo1545",
25186 .tp_getset = py_srvsvc_NetSrvInfo1545_getsetters,
25187 .tp_methods = NULL,
25188 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25189 .tp_new = py_srvsvc_NetSrvInfo1545_new,
25193 static PyObject *py_srvsvc_NetSrvInfo1546_get_initsearchtable(PyObject *obj, void *closure)
25195 struct srvsvc_NetSrvInfo1546 *object = (struct srvsvc_NetSrvInfo1546 *)pytalloc_get_ptr(obj);
25196 PyObject *py_initsearchtable;
25197 py_initsearchtable = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->initsearchtable);
25198 return py_initsearchtable;
25201 static int py_srvsvc_NetSrvInfo1546_set_initsearchtable(PyObject *py_obj, PyObject *value, void *closure)
25203 struct srvsvc_NetSrvInfo1546 *object = (struct srvsvc_NetSrvInfo1546 *)pytalloc_get_ptr(py_obj);
25204 if (value == NULL) {
25205 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initsearchtable");
25209 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsearchtable));
25210 if (PyLong_Check(value)) {
25211 unsigned long long test_var;
25212 test_var = PyLong_AsUnsignedLongLong(value);
25213 if (PyErr_Occurred() != NULL) {
25216 if (test_var > uint_max) {
25217 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25218 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25221 object->initsearchtable = test_var;
25222 } else if (PyInt_Check(value)) {
25224 test_var = PyInt_AsLong(value);
25225 if (test_var < 0 || test_var > uint_max) {
25226 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25227 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25230 object->initsearchtable = test_var;
25232 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25233 PyInt_Type.tp_name, PyLong_Type.tp_name);
25240 static PyGetSetDef py_srvsvc_NetSrvInfo1546_getsetters[] = {
25242 .name = discard_const_p(char, "initsearchtable"),
25243 .get = py_srvsvc_NetSrvInfo1546_get_initsearchtable,
25244 .set = py_srvsvc_NetSrvInfo1546_set_initsearchtable,
25245 .doc = discard_const_p(char, "PIDL-generated element initsearchtable")
25250 static PyObject *py_srvsvc_NetSrvInfo1546_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25252 return pytalloc_new(struct srvsvc_NetSrvInfo1546, type);
25256 static PyTypeObject srvsvc_NetSrvInfo1546_Type = {
25257 PyObject_HEAD_INIT(NULL) 0,
25258 .tp_name = "srvsvc.NetSrvInfo1546",
25259 .tp_getset = py_srvsvc_NetSrvInfo1546_getsetters,
25260 .tp_methods = NULL,
25261 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25262 .tp_new = py_srvsvc_NetSrvInfo1546_new,
25266 static PyObject *py_srvsvc_NetSrvInfo1547_get_alertsched(PyObject *obj, void *closure)
25268 struct srvsvc_NetSrvInfo1547 *object = (struct srvsvc_NetSrvInfo1547 *)pytalloc_get_ptr(obj);
25269 PyObject *py_alertsched;
25270 py_alertsched = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
25271 return py_alertsched;
25274 static int py_srvsvc_NetSrvInfo1547_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
25276 struct srvsvc_NetSrvInfo1547 *object = (struct srvsvc_NetSrvInfo1547 *)pytalloc_get_ptr(py_obj);
25277 if (value == NULL) {
25278 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alertsched");
25282 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
25283 if (PyLong_Check(value)) {
25284 unsigned long long test_var;
25285 test_var = PyLong_AsUnsignedLongLong(value);
25286 if (PyErr_Occurred() != NULL) {
25289 if (test_var > uint_max) {
25290 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25291 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25294 object->alertsched = test_var;
25295 } else if (PyInt_Check(value)) {
25297 test_var = PyInt_AsLong(value);
25298 if (test_var < 0 || test_var > uint_max) {
25299 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25300 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25303 object->alertsched = test_var;
25305 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25306 PyInt_Type.tp_name, PyLong_Type.tp_name);
25313 static PyGetSetDef py_srvsvc_NetSrvInfo1547_getsetters[] = {
25315 .name = discard_const_p(char, "alertsched"),
25316 .get = py_srvsvc_NetSrvInfo1547_get_alertsched,
25317 .set = py_srvsvc_NetSrvInfo1547_set_alertsched,
25318 .doc = discard_const_p(char, "PIDL-generated element alertsched")
25323 static PyObject *py_srvsvc_NetSrvInfo1547_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25325 return pytalloc_new(struct srvsvc_NetSrvInfo1547, type);
25329 static PyTypeObject srvsvc_NetSrvInfo1547_Type = {
25330 PyObject_HEAD_INIT(NULL) 0,
25331 .tp_name = "srvsvc.NetSrvInfo1547",
25332 .tp_getset = py_srvsvc_NetSrvInfo1547_getsetters,
25333 .tp_methods = NULL,
25334 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25335 .tp_new = py_srvsvc_NetSrvInfo1547_new,
25339 static PyObject *py_srvsvc_NetSrvInfo1548_get_errortreshold(PyObject *obj, void *closure)
25341 struct srvsvc_NetSrvInfo1548 *object = (struct srvsvc_NetSrvInfo1548 *)pytalloc_get_ptr(obj);
25342 PyObject *py_errortreshold;
25343 py_errortreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->errortreshold);
25344 return py_errortreshold;
25347 static int py_srvsvc_NetSrvInfo1548_set_errortreshold(PyObject *py_obj, PyObject *value, void *closure)
25349 struct srvsvc_NetSrvInfo1548 *object = (struct srvsvc_NetSrvInfo1548 *)pytalloc_get_ptr(py_obj);
25350 if (value == NULL) {
25351 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->errortreshold");
25355 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->errortreshold));
25356 if (PyLong_Check(value)) {
25357 unsigned long long test_var;
25358 test_var = PyLong_AsUnsignedLongLong(value);
25359 if (PyErr_Occurred() != NULL) {
25362 if (test_var > uint_max) {
25363 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25364 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25367 object->errortreshold = test_var;
25368 } else if (PyInt_Check(value)) {
25370 test_var = PyInt_AsLong(value);
25371 if (test_var < 0 || test_var > uint_max) {
25372 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25373 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25376 object->errortreshold = test_var;
25378 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25379 PyInt_Type.tp_name, PyLong_Type.tp_name);
25386 static PyGetSetDef py_srvsvc_NetSrvInfo1548_getsetters[] = {
25388 .name = discard_const_p(char, "errortreshold"),
25389 .get = py_srvsvc_NetSrvInfo1548_get_errortreshold,
25390 .set = py_srvsvc_NetSrvInfo1548_set_errortreshold,
25391 .doc = discard_const_p(char, "PIDL-generated element errortreshold")
25396 static PyObject *py_srvsvc_NetSrvInfo1548_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25398 return pytalloc_new(struct srvsvc_NetSrvInfo1548, type);
25402 static PyTypeObject srvsvc_NetSrvInfo1548_Type = {
25403 PyObject_HEAD_INIT(NULL) 0,
25404 .tp_name = "srvsvc.NetSrvInfo1548",
25405 .tp_getset = py_srvsvc_NetSrvInfo1548_getsetters,
25406 .tp_methods = NULL,
25407 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25408 .tp_new = py_srvsvc_NetSrvInfo1548_new,
25412 static PyObject *py_srvsvc_NetSrvInfo1549_get_networkerrortreshold(PyObject *obj, void *closure)
25414 struct srvsvc_NetSrvInfo1549 *object = (struct srvsvc_NetSrvInfo1549 *)pytalloc_get_ptr(obj);
25415 PyObject *py_networkerrortreshold;
25416 py_networkerrortreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->networkerrortreshold);
25417 return py_networkerrortreshold;
25420 static int py_srvsvc_NetSrvInfo1549_set_networkerrortreshold(PyObject *py_obj, PyObject *value, void *closure)
25422 struct srvsvc_NetSrvInfo1549 *object = (struct srvsvc_NetSrvInfo1549 *)pytalloc_get_ptr(py_obj);
25423 if (value == NULL) {
25424 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->networkerrortreshold");
25428 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->networkerrortreshold));
25429 if (PyLong_Check(value)) {
25430 unsigned long long test_var;
25431 test_var = PyLong_AsUnsignedLongLong(value);
25432 if (PyErr_Occurred() != NULL) {
25435 if (test_var > uint_max) {
25436 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25437 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25440 object->networkerrortreshold = test_var;
25441 } else if (PyInt_Check(value)) {
25443 test_var = PyInt_AsLong(value);
25444 if (test_var < 0 || test_var > uint_max) {
25445 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25446 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25449 object->networkerrortreshold = test_var;
25451 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25452 PyInt_Type.tp_name, PyLong_Type.tp_name);
25459 static PyGetSetDef py_srvsvc_NetSrvInfo1549_getsetters[] = {
25461 .name = discard_const_p(char, "networkerrortreshold"),
25462 .get = py_srvsvc_NetSrvInfo1549_get_networkerrortreshold,
25463 .set = py_srvsvc_NetSrvInfo1549_set_networkerrortreshold,
25464 .doc = discard_const_p(char, "PIDL-generated element networkerrortreshold")
25469 static PyObject *py_srvsvc_NetSrvInfo1549_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25471 return pytalloc_new(struct srvsvc_NetSrvInfo1549, type);
25475 static PyTypeObject srvsvc_NetSrvInfo1549_Type = {
25476 PyObject_HEAD_INIT(NULL) 0,
25477 .tp_name = "srvsvc.NetSrvInfo1549",
25478 .tp_getset = py_srvsvc_NetSrvInfo1549_getsetters,
25479 .tp_methods = NULL,
25480 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25481 .tp_new = py_srvsvc_NetSrvInfo1549_new,
25485 static PyObject *py_srvsvc_NetSrvInfo1550_get_diskspacetreshold(PyObject *obj, void *closure)
25487 struct srvsvc_NetSrvInfo1550 *object = (struct srvsvc_NetSrvInfo1550 *)pytalloc_get_ptr(obj);
25488 PyObject *py_diskspacetreshold;
25489 py_diskspacetreshold = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->diskspacetreshold);
25490 return py_diskspacetreshold;
25493 static int py_srvsvc_NetSrvInfo1550_set_diskspacetreshold(PyObject *py_obj, PyObject *value, void *closure)
25495 struct srvsvc_NetSrvInfo1550 *object = (struct srvsvc_NetSrvInfo1550 *)pytalloc_get_ptr(py_obj);
25496 if (value == NULL) {
25497 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->diskspacetreshold");
25501 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskspacetreshold));
25502 if (PyLong_Check(value)) {
25503 unsigned long long test_var;
25504 test_var = PyLong_AsUnsignedLongLong(value);
25505 if (PyErr_Occurred() != NULL) {
25508 if (test_var > uint_max) {
25509 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25510 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25513 object->diskspacetreshold = test_var;
25514 } else if (PyInt_Check(value)) {
25516 test_var = PyInt_AsLong(value);
25517 if (test_var < 0 || test_var > uint_max) {
25518 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25519 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25522 object->diskspacetreshold = test_var;
25524 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25525 PyInt_Type.tp_name, PyLong_Type.tp_name);
25532 static PyGetSetDef py_srvsvc_NetSrvInfo1550_getsetters[] = {
25534 .name = discard_const_p(char, "diskspacetreshold"),
25535 .get = py_srvsvc_NetSrvInfo1550_get_diskspacetreshold,
25536 .set = py_srvsvc_NetSrvInfo1550_set_diskspacetreshold,
25537 .doc = discard_const_p(char, "PIDL-generated element diskspacetreshold")
25542 static PyObject *py_srvsvc_NetSrvInfo1550_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25544 return pytalloc_new(struct srvsvc_NetSrvInfo1550, type);
25548 static PyTypeObject srvsvc_NetSrvInfo1550_Type = {
25549 PyObject_HEAD_INIT(NULL) 0,
25550 .tp_name = "srvsvc.NetSrvInfo1550",
25551 .tp_getset = py_srvsvc_NetSrvInfo1550_getsetters,
25552 .tp_methods = NULL,
25553 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25554 .tp_new = py_srvsvc_NetSrvInfo1550_new,
25558 static PyObject *py_srvsvc_NetSrvInfo1552_get_maxlinkdelay(PyObject *obj, void *closure)
25560 struct srvsvc_NetSrvInfo1552 *object = (struct srvsvc_NetSrvInfo1552 *)pytalloc_get_ptr(obj);
25561 PyObject *py_maxlinkdelay;
25562 py_maxlinkdelay = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxlinkdelay);
25563 return py_maxlinkdelay;
25566 static int py_srvsvc_NetSrvInfo1552_set_maxlinkdelay(PyObject *py_obj, PyObject *value, void *closure)
25568 struct srvsvc_NetSrvInfo1552 *object = (struct srvsvc_NetSrvInfo1552 *)pytalloc_get_ptr(py_obj);
25569 if (value == NULL) {
25570 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxlinkdelay");
25574 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlinkdelay));
25575 if (PyLong_Check(value)) {
25576 unsigned long long test_var;
25577 test_var = PyLong_AsUnsignedLongLong(value);
25578 if (PyErr_Occurred() != NULL) {
25581 if (test_var > uint_max) {
25582 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25583 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25586 object->maxlinkdelay = test_var;
25587 } else if (PyInt_Check(value)) {
25589 test_var = PyInt_AsLong(value);
25590 if (test_var < 0 || test_var > uint_max) {
25591 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25592 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25595 object->maxlinkdelay = test_var;
25597 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25598 PyInt_Type.tp_name, PyLong_Type.tp_name);
25605 static PyGetSetDef py_srvsvc_NetSrvInfo1552_getsetters[] = {
25607 .name = discard_const_p(char, "maxlinkdelay"),
25608 .get = py_srvsvc_NetSrvInfo1552_get_maxlinkdelay,
25609 .set = py_srvsvc_NetSrvInfo1552_set_maxlinkdelay,
25610 .doc = discard_const_p(char, "PIDL-generated element maxlinkdelay")
25615 static PyObject *py_srvsvc_NetSrvInfo1552_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25617 return pytalloc_new(struct srvsvc_NetSrvInfo1552, type);
25621 static PyTypeObject srvsvc_NetSrvInfo1552_Type = {
25622 PyObject_HEAD_INIT(NULL) 0,
25623 .tp_name = "srvsvc.NetSrvInfo1552",
25624 .tp_getset = py_srvsvc_NetSrvInfo1552_getsetters,
25625 .tp_methods = NULL,
25626 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25627 .tp_new = py_srvsvc_NetSrvInfo1552_new,
25631 static PyObject *py_srvsvc_NetSrvInfo1553_get_minlinkthroughput(PyObject *obj, void *closure)
25633 struct srvsvc_NetSrvInfo1553 *object = (struct srvsvc_NetSrvInfo1553 *)pytalloc_get_ptr(obj);
25634 PyObject *py_minlinkthroughput;
25635 py_minlinkthroughput = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->minlinkthroughput);
25636 return py_minlinkthroughput;
25639 static int py_srvsvc_NetSrvInfo1553_set_minlinkthroughput(PyObject *py_obj, PyObject *value, void *closure)
25641 struct srvsvc_NetSrvInfo1553 *object = (struct srvsvc_NetSrvInfo1553 *)pytalloc_get_ptr(py_obj);
25642 if (value == NULL) {
25643 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minlinkthroughput");
25647 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minlinkthroughput));
25648 if (PyLong_Check(value)) {
25649 unsigned long long test_var;
25650 test_var = PyLong_AsUnsignedLongLong(value);
25651 if (PyErr_Occurred() != NULL) {
25654 if (test_var > uint_max) {
25655 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25656 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25659 object->minlinkthroughput = test_var;
25660 } else if (PyInt_Check(value)) {
25662 test_var = PyInt_AsLong(value);
25663 if (test_var < 0 || test_var > uint_max) {
25664 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25665 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25668 object->minlinkthroughput = test_var;
25670 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25671 PyInt_Type.tp_name, PyLong_Type.tp_name);
25678 static PyGetSetDef py_srvsvc_NetSrvInfo1553_getsetters[] = {
25680 .name = discard_const_p(char, "minlinkthroughput"),
25681 .get = py_srvsvc_NetSrvInfo1553_get_minlinkthroughput,
25682 .set = py_srvsvc_NetSrvInfo1553_set_minlinkthroughput,
25683 .doc = discard_const_p(char, "PIDL-generated element minlinkthroughput")
25688 static PyObject *py_srvsvc_NetSrvInfo1553_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25690 return pytalloc_new(struct srvsvc_NetSrvInfo1553, type);
25694 static PyTypeObject srvsvc_NetSrvInfo1553_Type = {
25695 PyObject_HEAD_INIT(NULL) 0,
25696 .tp_name = "srvsvc.NetSrvInfo1553",
25697 .tp_getset = py_srvsvc_NetSrvInfo1553_getsetters,
25698 .tp_methods = NULL,
25699 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25700 .tp_new = py_srvsvc_NetSrvInfo1553_new,
25704 static PyObject *py_srvsvc_NetSrvInfo1554_get_linkinfovalidtime(PyObject *obj, void *closure)
25706 struct srvsvc_NetSrvInfo1554 *object = (struct srvsvc_NetSrvInfo1554 *)pytalloc_get_ptr(obj);
25707 PyObject *py_linkinfovalidtime;
25708 py_linkinfovalidtime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->linkinfovalidtime);
25709 return py_linkinfovalidtime;
25712 static int py_srvsvc_NetSrvInfo1554_set_linkinfovalidtime(PyObject *py_obj, PyObject *value, void *closure)
25714 struct srvsvc_NetSrvInfo1554 *object = (struct srvsvc_NetSrvInfo1554 *)pytalloc_get_ptr(py_obj);
25715 if (value == NULL) {
25716 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->linkinfovalidtime");
25720 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->linkinfovalidtime));
25721 if (PyLong_Check(value)) {
25722 unsigned long long test_var;
25723 test_var = PyLong_AsUnsignedLongLong(value);
25724 if (PyErr_Occurred() != NULL) {
25727 if (test_var > uint_max) {
25728 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25729 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25732 object->linkinfovalidtime = test_var;
25733 } else if (PyInt_Check(value)) {
25735 test_var = PyInt_AsLong(value);
25736 if (test_var < 0 || test_var > uint_max) {
25737 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25738 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25741 object->linkinfovalidtime = test_var;
25743 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25744 PyInt_Type.tp_name, PyLong_Type.tp_name);
25751 static PyGetSetDef py_srvsvc_NetSrvInfo1554_getsetters[] = {
25753 .name = discard_const_p(char, "linkinfovalidtime"),
25754 .get = py_srvsvc_NetSrvInfo1554_get_linkinfovalidtime,
25755 .set = py_srvsvc_NetSrvInfo1554_set_linkinfovalidtime,
25756 .doc = discard_const_p(char, "PIDL-generated element linkinfovalidtime")
25761 static PyObject *py_srvsvc_NetSrvInfo1554_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25763 return pytalloc_new(struct srvsvc_NetSrvInfo1554, type);
25767 static PyTypeObject srvsvc_NetSrvInfo1554_Type = {
25768 PyObject_HEAD_INIT(NULL) 0,
25769 .tp_name = "srvsvc.NetSrvInfo1554",
25770 .tp_getset = py_srvsvc_NetSrvInfo1554_getsetters,
25771 .tp_methods = NULL,
25772 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25773 .tp_new = py_srvsvc_NetSrvInfo1554_new,
25777 static PyObject *py_srvsvc_NetSrvInfo1555_get_scavqosinfoupdatetime(PyObject *obj, void *closure)
25779 struct srvsvc_NetSrvInfo1555 *object = (struct srvsvc_NetSrvInfo1555 *)pytalloc_get_ptr(obj);
25780 PyObject *py_scavqosinfoupdatetime;
25781 py_scavqosinfoupdatetime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->scavqosinfoupdatetime);
25782 return py_scavqosinfoupdatetime;
25785 static int py_srvsvc_NetSrvInfo1555_set_scavqosinfoupdatetime(PyObject *py_obj, PyObject *value, void *closure)
25787 struct srvsvc_NetSrvInfo1555 *object = (struct srvsvc_NetSrvInfo1555 *)pytalloc_get_ptr(py_obj);
25788 if (value == NULL) {
25789 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scavqosinfoupdatetime");
25793 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavqosinfoupdatetime));
25794 if (PyLong_Check(value)) {
25795 unsigned long long test_var;
25796 test_var = PyLong_AsUnsignedLongLong(value);
25797 if (PyErr_Occurred() != NULL) {
25800 if (test_var > uint_max) {
25801 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25802 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25805 object->scavqosinfoupdatetime = test_var;
25806 } else if (PyInt_Check(value)) {
25808 test_var = PyInt_AsLong(value);
25809 if (test_var < 0 || test_var > uint_max) {
25810 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25811 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25814 object->scavqosinfoupdatetime = test_var;
25816 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25817 PyInt_Type.tp_name, PyLong_Type.tp_name);
25824 static PyGetSetDef py_srvsvc_NetSrvInfo1555_getsetters[] = {
25826 .name = discard_const_p(char, "scavqosinfoupdatetime"),
25827 .get = py_srvsvc_NetSrvInfo1555_get_scavqosinfoupdatetime,
25828 .set = py_srvsvc_NetSrvInfo1555_set_scavqosinfoupdatetime,
25829 .doc = discard_const_p(char, "PIDL-generated element scavqosinfoupdatetime")
25834 static PyObject *py_srvsvc_NetSrvInfo1555_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25836 return pytalloc_new(struct srvsvc_NetSrvInfo1555, type);
25840 static PyTypeObject srvsvc_NetSrvInfo1555_Type = {
25841 PyObject_HEAD_INIT(NULL) 0,
25842 .tp_name = "srvsvc.NetSrvInfo1555",
25843 .tp_getset = py_srvsvc_NetSrvInfo1555_getsetters,
25844 .tp_methods = NULL,
25845 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25846 .tp_new = py_srvsvc_NetSrvInfo1555_new,
25850 static PyObject *py_srvsvc_NetSrvInfo1556_get_maxworkitemidletime(PyObject *obj, void *closure)
25852 struct srvsvc_NetSrvInfo1556 *object = (struct srvsvc_NetSrvInfo1556 *)pytalloc_get_ptr(obj);
25853 PyObject *py_maxworkitemidletime;
25854 py_maxworkitemidletime = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitemidletime);
25855 return py_maxworkitemidletime;
25858 static int py_srvsvc_NetSrvInfo1556_set_maxworkitemidletime(PyObject *py_obj, PyObject *value, void *closure)
25860 struct srvsvc_NetSrvInfo1556 *object = (struct srvsvc_NetSrvInfo1556 *)pytalloc_get_ptr(py_obj);
25861 if (value == NULL) {
25862 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitemidletime");
25866 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitemidletime));
25867 if (PyLong_Check(value)) {
25868 unsigned long long test_var;
25869 test_var = PyLong_AsUnsignedLongLong(value);
25870 if (PyErr_Occurred() != NULL) {
25873 if (test_var > uint_max) {
25874 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
25875 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25878 object->maxworkitemidletime = test_var;
25879 } else if (PyInt_Check(value)) {
25881 test_var = PyInt_AsLong(value);
25882 if (test_var < 0 || test_var > uint_max) {
25883 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
25884 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
25887 object->maxworkitemidletime = test_var;
25889 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
25890 PyInt_Type.tp_name, PyLong_Type.tp_name);
25897 static PyGetSetDef py_srvsvc_NetSrvInfo1556_getsetters[] = {
25899 .name = discard_const_p(char, "maxworkitemidletime"),
25900 .get = py_srvsvc_NetSrvInfo1556_get_maxworkitemidletime,
25901 .set = py_srvsvc_NetSrvInfo1556_set_maxworkitemidletime,
25902 .doc = discard_const_p(char, "PIDL-generated element maxworkitemidletime")
25907 static PyObject *py_srvsvc_NetSrvInfo1556_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25909 return pytalloc_new(struct srvsvc_NetSrvInfo1556, type);
25913 static PyTypeObject srvsvc_NetSrvInfo1556_Type = {
25914 PyObject_HEAD_INIT(NULL) 0,
25915 .tp_name = "srvsvc.NetSrvInfo1556",
25916 .tp_getset = py_srvsvc_NetSrvInfo1556_getsetters,
25917 .tp_methods = NULL,
25918 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25919 .tp_new = py_srvsvc_NetSrvInfo1556_new,
25922 PyObject *py_import_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSrvInfo *in)
25928 if (in->info100 == NULL) {
25932 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo100_Type, in->info100, in->info100);
25937 if (in->info101 == NULL) {
25941 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo101_Type, in->info101, in->info101);
25946 if (in->info102 == NULL) {
25950 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo102_Type, in->info102, in->info102);
25955 if (in->info402 == NULL) {
25959 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo402_Type, in->info402, in->info402);
25964 if (in->info403 == NULL) {
25968 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo403_Type, in->info403, in->info403);
25973 if (in->info502 == NULL) {
25977 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo502_Type, in->info502, in->info502);
25982 if (in->info503 == NULL) {
25986 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo503_Type, in->info503, in->info503);
25991 if (in->info599 == NULL) {
25995 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo599_Type, in->info599, in->info599);
26000 if (in->info1005 == NULL) {
26004 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1005_Type, in->info1005, in->info1005);
26009 if (in->info1010 == NULL) {
26013 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1010_Type, in->info1010, in->info1010);
26018 if (in->info1016 == NULL) {
26022 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1016_Type, in->info1016, in->info1016);
26027 if (in->info1017 == NULL) {
26031 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1017_Type, in->info1017, in->info1017);
26036 if (in->info1018 == NULL) {
26040 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1018_Type, in->info1018, in->info1018);
26045 if (in->info1107 == NULL) {
26049 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1107_Type, in->info1107, in->info1107);
26054 if (in->info1501 == NULL) {
26058 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1501_Type, in->info1501, in->info1501);
26063 if (in->info1502 == NULL) {
26067 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1502_Type, in->info1502, in->info1502);
26072 if (in->info1503 == NULL) {
26076 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1503_Type, in->info1503, in->info1503);
26081 if (in->info1506 == NULL) {
26085 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1506_Type, in->info1506, in->info1506);
26090 if (in->info1509 == NULL) {
26094 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1509_Type, in->info1509, in->info1509);
26099 if (in->info1510 == NULL) {
26103 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1510_Type, in->info1510, in->info1510);
26108 if (in->info1511 == NULL) {
26112 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1511_Type, in->info1511, in->info1511);
26117 if (in->info1512 == NULL) {
26121 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1512_Type, in->info1512, in->info1512);
26126 if (in->info1513 == NULL) {
26130 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1513_Type, in->info1513, in->info1513);
26135 if (in->info1514 == NULL) {
26139 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1514_Type, in->info1514, in->info1514);
26144 if (in->info1515 == NULL) {
26148 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1515_Type, in->info1515, in->info1515);
26153 if (in->info1516 == NULL) {
26157 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1516_Type, in->info1516, in->info1516);
26162 if (in->info1518 == NULL) {
26166 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1518_Type, in->info1518, in->info1518);
26171 if (in->info1520 == NULL) {
26175 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1520_Type, in->info1520, in->info1520);
26180 if (in->info1521 == NULL) {
26184 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1521_Type, in->info1521, in->info1521);
26189 if (in->info1522 == NULL) {
26193 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1522_Type, in->info1522, in->info1522);
26198 if (in->info1523 == NULL) {
26202 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1523_Type, in->info1523, in->info1523);
26207 if (in->info1524 == NULL) {
26211 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1524_Type, in->info1524, in->info1524);
26216 if (in->info1525 == NULL) {
26220 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1525_Type, in->info1525, in->info1525);
26225 if (in->info1528 == NULL) {
26229 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1528_Type, in->info1528, in->info1528);
26234 if (in->info1529 == NULL) {
26238 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1529_Type, in->info1529, in->info1529);
26243 if (in->info1530 == NULL) {
26247 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1530_Type, in->info1530, in->info1530);
26252 if (in->info1533 == NULL) {
26256 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1533_Type, in->info1533, in->info1533);
26261 if (in->info1534 == NULL) {
26265 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1534_Type, in->info1534, in->info1534);
26270 if (in->info1535 == NULL) {
26274 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1535_Type, in->info1535, in->info1535);
26279 if (in->info1536 == NULL) {
26283 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1536_Type, in->info1536, in->info1536);
26288 if (in->info1537 == NULL) {
26292 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1537_Type, in->info1537, in->info1537);
26297 if (in->info1538 == NULL) {
26301 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1538_Type, in->info1538, in->info1538);
26306 if (in->info1539 == NULL) {
26310 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1539_Type, in->info1539, in->info1539);
26315 if (in->info1540 == NULL) {
26319 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1540_Type, in->info1540, in->info1540);
26324 if (in->info1541 == NULL) {
26328 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1541_Type, in->info1541, in->info1541);
26333 if (in->info1542 == NULL) {
26337 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1542_Type, in->info1542, in->info1542);
26342 if (in->info1543 == NULL) {
26346 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1543_Type, in->info1543, in->info1543);
26351 if (in->info1544 == NULL) {
26355 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1544_Type, in->info1544, in->info1544);
26360 if (in->info1545 == NULL) {
26364 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1545_Type, in->info1545, in->info1545);
26369 if (in->info1546 == NULL) {
26373 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1546_Type, in->info1546, in->info1546);
26378 if (in->info1547 == NULL) {
26382 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1547_Type, in->info1547, in->info1547);
26387 if (in->info1548 == NULL) {
26391 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1548_Type, in->info1548, in->info1548);
26396 if (in->info1549 == NULL) {
26400 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1549_Type, in->info1549, in->info1549);
26405 if (in->info1550 == NULL) {
26409 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1550_Type, in->info1550, in->info1550);
26414 if (in->info1552 == NULL) {
26418 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1552_Type, in->info1552, in->info1552);
26423 if (in->info1553 == NULL) {
26427 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1553_Type, in->info1553, in->info1553);
26432 if (in->info1554 == NULL) {
26436 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1554_Type, in->info1554, in->info1554);
26441 if (in->info1555 == NULL) {
26445 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1555_Type, in->info1555, in->info1555);
26450 if (in->info1556 == NULL) {
26454 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1556_Type, in->info1556, in->info1556);
26464 PyErr_SetString(PyExc_TypeError, "unknown union level");
26468 union srvsvc_NetSrvInfo *py_export_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
26470 union srvsvc_NetSrvInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo);
26474 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info100");
26475 talloc_free(ret); return NULL;
26477 if (in == Py_None) {
26478 ret->info100 = NULL;
26480 ret->info100 = NULL;
26482 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info100");
26483 talloc_free(ret); return NULL;
26485 PY_CHECK_TYPE(&srvsvc_NetSrvInfo100_Type, in, talloc_free(ret); return NULL;);
26486 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26488 talloc_free(ret); return NULL;
26490 ret->info100 = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(in);
26496 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info101");
26497 talloc_free(ret); return NULL;
26499 if (in == Py_None) {
26500 ret->info101 = NULL;
26502 ret->info101 = NULL;
26504 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info101");
26505 talloc_free(ret); return NULL;
26507 PY_CHECK_TYPE(&srvsvc_NetSrvInfo101_Type, in, talloc_free(ret); return NULL;);
26508 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26510 talloc_free(ret); return NULL;
26512 ret->info101 = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(in);
26518 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info102");
26519 talloc_free(ret); return NULL;
26521 if (in == Py_None) {
26522 ret->info102 = NULL;
26524 ret->info102 = NULL;
26526 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info102");
26527 talloc_free(ret); return NULL;
26529 PY_CHECK_TYPE(&srvsvc_NetSrvInfo102_Type, in, talloc_free(ret); return NULL;);
26530 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26532 talloc_free(ret); return NULL;
26534 ret->info102 = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(in);
26540 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info402");
26541 talloc_free(ret); return NULL;
26543 if (in == Py_None) {
26544 ret->info402 = NULL;
26546 ret->info402 = NULL;
26548 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info402");
26549 talloc_free(ret); return NULL;
26551 PY_CHECK_TYPE(&srvsvc_NetSrvInfo402_Type, in, talloc_free(ret); return NULL;);
26552 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26554 talloc_free(ret); return NULL;
26556 ret->info402 = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(in);
26562 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info403");
26563 talloc_free(ret); return NULL;
26565 if (in == Py_None) {
26566 ret->info403 = NULL;
26568 ret->info403 = NULL;
26570 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info403");
26571 talloc_free(ret); return NULL;
26573 PY_CHECK_TYPE(&srvsvc_NetSrvInfo403_Type, in, talloc_free(ret); return NULL;);
26574 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26576 talloc_free(ret); return NULL;
26578 ret->info403 = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(in);
26584 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info502");
26585 talloc_free(ret); return NULL;
26587 if (in == Py_None) {
26588 ret->info502 = NULL;
26590 ret->info502 = NULL;
26592 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info502");
26593 talloc_free(ret); return NULL;
26595 PY_CHECK_TYPE(&srvsvc_NetSrvInfo502_Type, in, talloc_free(ret); return NULL;);
26596 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26598 talloc_free(ret); return NULL;
26600 ret->info502 = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(in);
26606 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info503");
26607 talloc_free(ret); return NULL;
26609 if (in == Py_None) {
26610 ret->info503 = NULL;
26612 ret->info503 = NULL;
26614 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info503");
26615 talloc_free(ret); return NULL;
26617 PY_CHECK_TYPE(&srvsvc_NetSrvInfo503_Type, in, talloc_free(ret); return NULL;);
26618 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26620 talloc_free(ret); return NULL;
26622 ret->info503 = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(in);
26628 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info599");
26629 talloc_free(ret); return NULL;
26631 if (in == Py_None) {
26632 ret->info599 = NULL;
26634 ret->info599 = NULL;
26636 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info599");
26637 talloc_free(ret); return NULL;
26639 PY_CHECK_TYPE(&srvsvc_NetSrvInfo599_Type, in, talloc_free(ret); return NULL;);
26640 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26642 talloc_free(ret); return NULL;
26644 ret->info599 = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(in);
26650 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1005");
26651 talloc_free(ret); return NULL;
26653 if (in == Py_None) {
26654 ret->info1005 = NULL;
26656 ret->info1005 = NULL;
26658 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1005");
26659 talloc_free(ret); return NULL;
26661 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1005_Type, in, talloc_free(ret); return NULL;);
26662 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26664 talloc_free(ret); return NULL;
26666 ret->info1005 = (struct srvsvc_NetSrvInfo1005 *)pytalloc_get_ptr(in);
26672 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1010");
26673 talloc_free(ret); return NULL;
26675 if (in == Py_None) {
26676 ret->info1010 = NULL;
26678 ret->info1010 = NULL;
26680 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1010");
26681 talloc_free(ret); return NULL;
26683 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1010_Type, in, talloc_free(ret); return NULL;);
26684 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26686 talloc_free(ret); return NULL;
26688 ret->info1010 = (struct srvsvc_NetSrvInfo1010 *)pytalloc_get_ptr(in);
26694 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1016");
26695 talloc_free(ret); return NULL;
26697 if (in == Py_None) {
26698 ret->info1016 = NULL;
26700 ret->info1016 = NULL;
26702 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1016");
26703 talloc_free(ret); return NULL;
26705 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1016_Type, in, talloc_free(ret); return NULL;);
26706 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26708 talloc_free(ret); return NULL;
26710 ret->info1016 = (struct srvsvc_NetSrvInfo1016 *)pytalloc_get_ptr(in);
26716 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1017");
26717 talloc_free(ret); return NULL;
26719 if (in == Py_None) {
26720 ret->info1017 = NULL;
26722 ret->info1017 = NULL;
26724 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1017");
26725 talloc_free(ret); return NULL;
26727 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1017_Type, in, talloc_free(ret); return NULL;);
26728 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26730 talloc_free(ret); return NULL;
26732 ret->info1017 = (struct srvsvc_NetSrvInfo1017 *)pytalloc_get_ptr(in);
26738 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1018");
26739 talloc_free(ret); return NULL;
26741 if (in == Py_None) {
26742 ret->info1018 = NULL;
26744 ret->info1018 = NULL;
26746 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1018");
26747 talloc_free(ret); return NULL;
26749 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1018_Type, in, talloc_free(ret); return NULL;);
26750 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26752 talloc_free(ret); return NULL;
26754 ret->info1018 = (struct srvsvc_NetSrvInfo1018 *)pytalloc_get_ptr(in);
26760 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1107");
26761 talloc_free(ret); return NULL;
26763 if (in == Py_None) {
26764 ret->info1107 = NULL;
26766 ret->info1107 = NULL;
26768 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1107");
26769 talloc_free(ret); return NULL;
26771 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1107_Type, in, talloc_free(ret); return NULL;);
26772 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26774 talloc_free(ret); return NULL;
26776 ret->info1107 = (struct srvsvc_NetSrvInfo1107 *)pytalloc_get_ptr(in);
26782 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1501");
26783 talloc_free(ret); return NULL;
26785 if (in == Py_None) {
26786 ret->info1501 = NULL;
26788 ret->info1501 = NULL;
26790 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1501");
26791 talloc_free(ret); return NULL;
26793 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1501_Type, in, talloc_free(ret); return NULL;);
26794 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26796 talloc_free(ret); return NULL;
26798 ret->info1501 = (struct srvsvc_NetSrvInfo1501 *)pytalloc_get_ptr(in);
26804 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1502");
26805 talloc_free(ret); return NULL;
26807 if (in == Py_None) {
26808 ret->info1502 = NULL;
26810 ret->info1502 = NULL;
26812 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1502");
26813 talloc_free(ret); return NULL;
26815 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1502_Type, in, talloc_free(ret); return NULL;);
26816 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26818 talloc_free(ret); return NULL;
26820 ret->info1502 = (struct srvsvc_NetSrvInfo1502 *)pytalloc_get_ptr(in);
26826 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1503");
26827 talloc_free(ret); return NULL;
26829 if (in == Py_None) {
26830 ret->info1503 = NULL;
26832 ret->info1503 = NULL;
26834 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1503");
26835 talloc_free(ret); return NULL;
26837 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1503_Type, in, talloc_free(ret); return NULL;);
26838 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26840 talloc_free(ret); return NULL;
26842 ret->info1503 = (struct srvsvc_NetSrvInfo1503 *)pytalloc_get_ptr(in);
26848 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1506");
26849 talloc_free(ret); return NULL;
26851 if (in == Py_None) {
26852 ret->info1506 = NULL;
26854 ret->info1506 = NULL;
26856 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1506");
26857 talloc_free(ret); return NULL;
26859 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1506_Type, in, talloc_free(ret); return NULL;);
26860 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26862 talloc_free(ret); return NULL;
26864 ret->info1506 = (struct srvsvc_NetSrvInfo1506 *)pytalloc_get_ptr(in);
26870 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1509");
26871 talloc_free(ret); return NULL;
26873 if (in == Py_None) {
26874 ret->info1509 = NULL;
26876 ret->info1509 = NULL;
26878 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1509");
26879 talloc_free(ret); return NULL;
26881 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1509_Type, in, talloc_free(ret); return NULL;);
26882 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26884 talloc_free(ret); return NULL;
26886 ret->info1509 = (struct srvsvc_NetSrvInfo1509 *)pytalloc_get_ptr(in);
26892 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1510");
26893 talloc_free(ret); return NULL;
26895 if (in == Py_None) {
26896 ret->info1510 = NULL;
26898 ret->info1510 = NULL;
26900 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1510");
26901 talloc_free(ret); return NULL;
26903 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1510_Type, in, talloc_free(ret); return NULL;);
26904 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26906 talloc_free(ret); return NULL;
26908 ret->info1510 = (struct srvsvc_NetSrvInfo1510 *)pytalloc_get_ptr(in);
26914 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1511");
26915 talloc_free(ret); return NULL;
26917 if (in == Py_None) {
26918 ret->info1511 = NULL;
26920 ret->info1511 = NULL;
26922 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1511");
26923 talloc_free(ret); return NULL;
26925 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1511_Type, in, talloc_free(ret); return NULL;);
26926 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26928 talloc_free(ret); return NULL;
26930 ret->info1511 = (struct srvsvc_NetSrvInfo1511 *)pytalloc_get_ptr(in);
26936 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1512");
26937 talloc_free(ret); return NULL;
26939 if (in == Py_None) {
26940 ret->info1512 = NULL;
26942 ret->info1512 = NULL;
26944 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1512");
26945 talloc_free(ret); return NULL;
26947 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1512_Type, in, talloc_free(ret); return NULL;);
26948 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26950 talloc_free(ret); return NULL;
26952 ret->info1512 = (struct srvsvc_NetSrvInfo1512 *)pytalloc_get_ptr(in);
26958 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1513");
26959 talloc_free(ret); return NULL;
26961 if (in == Py_None) {
26962 ret->info1513 = NULL;
26964 ret->info1513 = NULL;
26966 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1513");
26967 talloc_free(ret); return NULL;
26969 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1513_Type, in, talloc_free(ret); return NULL;);
26970 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26972 talloc_free(ret); return NULL;
26974 ret->info1513 = (struct srvsvc_NetSrvInfo1513 *)pytalloc_get_ptr(in);
26980 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1514");
26981 talloc_free(ret); return NULL;
26983 if (in == Py_None) {
26984 ret->info1514 = NULL;
26986 ret->info1514 = NULL;
26988 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1514");
26989 talloc_free(ret); return NULL;
26991 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1514_Type, in, talloc_free(ret); return NULL;);
26992 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26994 talloc_free(ret); return NULL;
26996 ret->info1514 = (struct srvsvc_NetSrvInfo1514 *)pytalloc_get_ptr(in);
27002 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1515");
27003 talloc_free(ret); return NULL;
27005 if (in == Py_None) {
27006 ret->info1515 = NULL;
27008 ret->info1515 = NULL;
27010 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1515");
27011 talloc_free(ret); return NULL;
27013 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1515_Type, in, talloc_free(ret); return NULL;);
27014 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27016 talloc_free(ret); return NULL;
27018 ret->info1515 = (struct srvsvc_NetSrvInfo1515 *)pytalloc_get_ptr(in);
27024 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1516");
27025 talloc_free(ret); return NULL;
27027 if (in == Py_None) {
27028 ret->info1516 = NULL;
27030 ret->info1516 = NULL;
27032 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1516");
27033 talloc_free(ret); return NULL;
27035 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1516_Type, in, talloc_free(ret); return NULL;);
27036 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27038 talloc_free(ret); return NULL;
27040 ret->info1516 = (struct srvsvc_NetSrvInfo1516 *)pytalloc_get_ptr(in);
27046 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1518");
27047 talloc_free(ret); return NULL;
27049 if (in == Py_None) {
27050 ret->info1518 = NULL;
27052 ret->info1518 = NULL;
27054 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1518");
27055 talloc_free(ret); return NULL;
27057 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1518_Type, in, talloc_free(ret); return NULL;);
27058 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27060 talloc_free(ret); return NULL;
27062 ret->info1518 = (struct srvsvc_NetSrvInfo1518 *)pytalloc_get_ptr(in);
27068 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1520");
27069 talloc_free(ret); return NULL;
27071 if (in == Py_None) {
27072 ret->info1520 = NULL;
27074 ret->info1520 = NULL;
27076 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1520");
27077 talloc_free(ret); return NULL;
27079 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1520_Type, in, talloc_free(ret); return NULL;);
27080 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27082 talloc_free(ret); return NULL;
27084 ret->info1520 = (struct srvsvc_NetSrvInfo1520 *)pytalloc_get_ptr(in);
27090 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1521");
27091 talloc_free(ret); return NULL;
27093 if (in == Py_None) {
27094 ret->info1521 = NULL;
27096 ret->info1521 = NULL;
27098 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1521");
27099 talloc_free(ret); return NULL;
27101 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1521_Type, in, talloc_free(ret); return NULL;);
27102 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27104 talloc_free(ret); return NULL;
27106 ret->info1521 = (struct srvsvc_NetSrvInfo1521 *)pytalloc_get_ptr(in);
27112 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1522");
27113 talloc_free(ret); return NULL;
27115 if (in == Py_None) {
27116 ret->info1522 = NULL;
27118 ret->info1522 = NULL;
27120 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1522");
27121 talloc_free(ret); return NULL;
27123 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1522_Type, in, talloc_free(ret); return NULL;);
27124 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27126 talloc_free(ret); return NULL;
27128 ret->info1522 = (struct srvsvc_NetSrvInfo1522 *)pytalloc_get_ptr(in);
27134 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1523");
27135 talloc_free(ret); return NULL;
27137 if (in == Py_None) {
27138 ret->info1523 = NULL;
27140 ret->info1523 = NULL;
27142 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1523");
27143 talloc_free(ret); return NULL;
27145 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1523_Type, in, talloc_free(ret); return NULL;);
27146 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27148 talloc_free(ret); return NULL;
27150 ret->info1523 = (struct srvsvc_NetSrvInfo1523 *)pytalloc_get_ptr(in);
27156 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1524");
27157 talloc_free(ret); return NULL;
27159 if (in == Py_None) {
27160 ret->info1524 = NULL;
27162 ret->info1524 = NULL;
27164 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1524");
27165 talloc_free(ret); return NULL;
27167 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1524_Type, in, talloc_free(ret); return NULL;);
27168 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27170 talloc_free(ret); return NULL;
27172 ret->info1524 = (struct srvsvc_NetSrvInfo1524 *)pytalloc_get_ptr(in);
27178 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1525");
27179 talloc_free(ret); return NULL;
27181 if (in == Py_None) {
27182 ret->info1525 = NULL;
27184 ret->info1525 = NULL;
27186 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1525");
27187 talloc_free(ret); return NULL;
27189 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1525_Type, in, talloc_free(ret); return NULL;);
27190 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27192 talloc_free(ret); return NULL;
27194 ret->info1525 = (struct srvsvc_NetSrvInfo1525 *)pytalloc_get_ptr(in);
27200 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1528");
27201 talloc_free(ret); return NULL;
27203 if (in == Py_None) {
27204 ret->info1528 = NULL;
27206 ret->info1528 = NULL;
27208 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1528");
27209 talloc_free(ret); return NULL;
27211 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1528_Type, in, talloc_free(ret); return NULL;);
27212 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27214 talloc_free(ret); return NULL;
27216 ret->info1528 = (struct srvsvc_NetSrvInfo1528 *)pytalloc_get_ptr(in);
27222 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1529");
27223 talloc_free(ret); return NULL;
27225 if (in == Py_None) {
27226 ret->info1529 = NULL;
27228 ret->info1529 = NULL;
27230 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1529");
27231 talloc_free(ret); return NULL;
27233 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1529_Type, in, talloc_free(ret); return NULL;);
27234 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27236 talloc_free(ret); return NULL;
27238 ret->info1529 = (struct srvsvc_NetSrvInfo1529 *)pytalloc_get_ptr(in);
27244 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1530");
27245 talloc_free(ret); return NULL;
27247 if (in == Py_None) {
27248 ret->info1530 = NULL;
27250 ret->info1530 = NULL;
27252 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1530");
27253 talloc_free(ret); return NULL;
27255 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1530_Type, in, talloc_free(ret); return NULL;);
27256 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27258 talloc_free(ret); return NULL;
27260 ret->info1530 = (struct srvsvc_NetSrvInfo1530 *)pytalloc_get_ptr(in);
27266 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1533");
27267 talloc_free(ret); return NULL;
27269 if (in == Py_None) {
27270 ret->info1533 = NULL;
27272 ret->info1533 = NULL;
27274 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1533");
27275 talloc_free(ret); return NULL;
27277 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1533_Type, in, talloc_free(ret); return NULL;);
27278 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27280 talloc_free(ret); return NULL;
27282 ret->info1533 = (struct srvsvc_NetSrvInfo1533 *)pytalloc_get_ptr(in);
27288 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1534");
27289 talloc_free(ret); return NULL;
27291 if (in == Py_None) {
27292 ret->info1534 = NULL;
27294 ret->info1534 = NULL;
27296 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1534");
27297 talloc_free(ret); return NULL;
27299 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1534_Type, in, talloc_free(ret); return NULL;);
27300 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27302 talloc_free(ret); return NULL;
27304 ret->info1534 = (struct srvsvc_NetSrvInfo1534 *)pytalloc_get_ptr(in);
27310 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1535");
27311 talloc_free(ret); return NULL;
27313 if (in == Py_None) {
27314 ret->info1535 = NULL;
27316 ret->info1535 = NULL;
27318 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1535");
27319 talloc_free(ret); return NULL;
27321 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1535_Type, in, talloc_free(ret); return NULL;);
27322 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27324 talloc_free(ret); return NULL;
27326 ret->info1535 = (struct srvsvc_NetSrvInfo1535 *)pytalloc_get_ptr(in);
27332 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1536");
27333 talloc_free(ret); return NULL;
27335 if (in == Py_None) {
27336 ret->info1536 = NULL;
27338 ret->info1536 = NULL;
27340 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1536");
27341 talloc_free(ret); return NULL;
27343 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1536_Type, in, talloc_free(ret); return NULL;);
27344 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27346 talloc_free(ret); return NULL;
27348 ret->info1536 = (struct srvsvc_NetSrvInfo1536 *)pytalloc_get_ptr(in);
27354 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1537");
27355 talloc_free(ret); return NULL;
27357 if (in == Py_None) {
27358 ret->info1537 = NULL;
27360 ret->info1537 = NULL;
27362 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1537");
27363 talloc_free(ret); return NULL;
27365 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1537_Type, in, talloc_free(ret); return NULL;);
27366 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27368 talloc_free(ret); return NULL;
27370 ret->info1537 = (struct srvsvc_NetSrvInfo1537 *)pytalloc_get_ptr(in);
27376 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1538");
27377 talloc_free(ret); return NULL;
27379 if (in == Py_None) {
27380 ret->info1538 = NULL;
27382 ret->info1538 = NULL;
27384 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1538");
27385 talloc_free(ret); return NULL;
27387 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1538_Type, in, talloc_free(ret); return NULL;);
27388 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27390 talloc_free(ret); return NULL;
27392 ret->info1538 = (struct srvsvc_NetSrvInfo1538 *)pytalloc_get_ptr(in);
27398 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1539");
27399 talloc_free(ret); return NULL;
27401 if (in == Py_None) {
27402 ret->info1539 = NULL;
27404 ret->info1539 = NULL;
27406 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1539");
27407 talloc_free(ret); return NULL;
27409 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1539_Type, in, talloc_free(ret); return NULL;);
27410 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27412 talloc_free(ret); return NULL;
27414 ret->info1539 = (struct srvsvc_NetSrvInfo1539 *)pytalloc_get_ptr(in);
27420 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1540");
27421 talloc_free(ret); return NULL;
27423 if (in == Py_None) {
27424 ret->info1540 = NULL;
27426 ret->info1540 = NULL;
27428 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1540");
27429 talloc_free(ret); return NULL;
27431 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1540_Type, in, talloc_free(ret); return NULL;);
27432 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27434 talloc_free(ret); return NULL;
27436 ret->info1540 = (struct srvsvc_NetSrvInfo1540 *)pytalloc_get_ptr(in);
27442 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1541");
27443 talloc_free(ret); return NULL;
27445 if (in == Py_None) {
27446 ret->info1541 = NULL;
27448 ret->info1541 = NULL;
27450 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1541");
27451 talloc_free(ret); return NULL;
27453 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1541_Type, in, talloc_free(ret); return NULL;);
27454 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27456 talloc_free(ret); return NULL;
27458 ret->info1541 = (struct srvsvc_NetSrvInfo1541 *)pytalloc_get_ptr(in);
27464 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1542");
27465 talloc_free(ret); return NULL;
27467 if (in == Py_None) {
27468 ret->info1542 = NULL;
27470 ret->info1542 = NULL;
27472 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1542");
27473 talloc_free(ret); return NULL;
27475 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1542_Type, in, talloc_free(ret); return NULL;);
27476 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27478 talloc_free(ret); return NULL;
27480 ret->info1542 = (struct srvsvc_NetSrvInfo1542 *)pytalloc_get_ptr(in);
27486 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1543");
27487 talloc_free(ret); return NULL;
27489 if (in == Py_None) {
27490 ret->info1543 = NULL;
27492 ret->info1543 = NULL;
27494 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1543");
27495 talloc_free(ret); return NULL;
27497 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1543_Type, in, talloc_free(ret); return NULL;);
27498 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27500 talloc_free(ret); return NULL;
27502 ret->info1543 = (struct srvsvc_NetSrvInfo1543 *)pytalloc_get_ptr(in);
27508 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1544");
27509 talloc_free(ret); return NULL;
27511 if (in == Py_None) {
27512 ret->info1544 = NULL;
27514 ret->info1544 = NULL;
27516 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1544");
27517 talloc_free(ret); return NULL;
27519 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1544_Type, in, talloc_free(ret); return NULL;);
27520 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27522 talloc_free(ret); return NULL;
27524 ret->info1544 = (struct srvsvc_NetSrvInfo1544 *)pytalloc_get_ptr(in);
27530 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1545");
27531 talloc_free(ret); return NULL;
27533 if (in == Py_None) {
27534 ret->info1545 = NULL;
27536 ret->info1545 = NULL;
27538 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1545");
27539 talloc_free(ret); return NULL;
27541 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1545_Type, in, talloc_free(ret); return NULL;);
27542 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27544 talloc_free(ret); return NULL;
27546 ret->info1545 = (struct srvsvc_NetSrvInfo1545 *)pytalloc_get_ptr(in);
27552 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1546");
27553 talloc_free(ret); return NULL;
27555 if (in == Py_None) {
27556 ret->info1546 = NULL;
27558 ret->info1546 = NULL;
27560 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1546");
27561 talloc_free(ret); return NULL;
27563 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1546_Type, in, talloc_free(ret); return NULL;);
27564 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27566 talloc_free(ret); return NULL;
27568 ret->info1546 = (struct srvsvc_NetSrvInfo1546 *)pytalloc_get_ptr(in);
27574 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1547");
27575 talloc_free(ret); return NULL;
27577 if (in == Py_None) {
27578 ret->info1547 = NULL;
27580 ret->info1547 = NULL;
27582 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1547");
27583 talloc_free(ret); return NULL;
27585 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1547_Type, in, talloc_free(ret); return NULL;);
27586 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27588 talloc_free(ret); return NULL;
27590 ret->info1547 = (struct srvsvc_NetSrvInfo1547 *)pytalloc_get_ptr(in);
27596 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1548");
27597 talloc_free(ret); return NULL;
27599 if (in == Py_None) {
27600 ret->info1548 = NULL;
27602 ret->info1548 = NULL;
27604 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1548");
27605 talloc_free(ret); return NULL;
27607 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1548_Type, in, talloc_free(ret); return NULL;);
27608 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27610 talloc_free(ret); return NULL;
27612 ret->info1548 = (struct srvsvc_NetSrvInfo1548 *)pytalloc_get_ptr(in);
27618 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1549");
27619 talloc_free(ret); return NULL;
27621 if (in == Py_None) {
27622 ret->info1549 = NULL;
27624 ret->info1549 = NULL;
27626 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1549");
27627 talloc_free(ret); return NULL;
27629 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1549_Type, in, talloc_free(ret); return NULL;);
27630 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27632 talloc_free(ret); return NULL;
27634 ret->info1549 = (struct srvsvc_NetSrvInfo1549 *)pytalloc_get_ptr(in);
27640 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1550");
27641 talloc_free(ret); return NULL;
27643 if (in == Py_None) {
27644 ret->info1550 = NULL;
27646 ret->info1550 = NULL;
27648 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1550");
27649 talloc_free(ret); return NULL;
27651 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1550_Type, in, talloc_free(ret); return NULL;);
27652 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27654 talloc_free(ret); return NULL;
27656 ret->info1550 = (struct srvsvc_NetSrvInfo1550 *)pytalloc_get_ptr(in);
27662 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1552");
27663 talloc_free(ret); return NULL;
27665 if (in == Py_None) {
27666 ret->info1552 = NULL;
27668 ret->info1552 = NULL;
27670 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1552");
27671 talloc_free(ret); return NULL;
27673 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1552_Type, in, talloc_free(ret); return NULL;);
27674 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27676 talloc_free(ret); return NULL;
27678 ret->info1552 = (struct srvsvc_NetSrvInfo1552 *)pytalloc_get_ptr(in);
27684 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1553");
27685 talloc_free(ret); return NULL;
27687 if (in == Py_None) {
27688 ret->info1553 = NULL;
27690 ret->info1553 = NULL;
27692 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1553");
27693 talloc_free(ret); return NULL;
27695 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1553_Type, in, talloc_free(ret); return NULL;);
27696 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27698 talloc_free(ret); return NULL;
27700 ret->info1553 = (struct srvsvc_NetSrvInfo1553 *)pytalloc_get_ptr(in);
27706 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1554");
27707 talloc_free(ret); return NULL;
27709 if (in == Py_None) {
27710 ret->info1554 = NULL;
27712 ret->info1554 = NULL;
27714 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1554");
27715 talloc_free(ret); return NULL;
27717 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1554_Type, in, talloc_free(ret); return NULL;);
27718 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27720 talloc_free(ret); return NULL;
27722 ret->info1554 = (struct srvsvc_NetSrvInfo1554 *)pytalloc_get_ptr(in);
27728 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1555");
27729 talloc_free(ret); return NULL;
27731 if (in == Py_None) {
27732 ret->info1555 = NULL;
27734 ret->info1555 = NULL;
27736 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1555");
27737 talloc_free(ret); return NULL;
27739 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1555_Type, in, talloc_free(ret); return NULL;);
27740 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27742 talloc_free(ret); return NULL;
27744 ret->info1555 = (struct srvsvc_NetSrvInfo1555 *)pytalloc_get_ptr(in);
27750 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1556");
27751 talloc_free(ret); return NULL;
27753 if (in == Py_None) {
27754 ret->info1556 = NULL;
27756 ret->info1556 = NULL;
27758 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->info1556");
27759 talloc_free(ret); return NULL;
27761 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1556_Type, in, talloc_free(ret); return NULL;);
27762 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
27764 talloc_free(ret); return NULL;
27766 ret->info1556 = (struct srvsvc_NetSrvInfo1556 *)pytalloc_get_ptr(in);
27779 static PyObject *py_srvsvc_NetDiskInfo0_get___disk_offset(PyObject *obj, void *closure)
27781 struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(obj);
27782 PyObject *py___disk_offset;
27783 py___disk_offset = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->__disk_offset);
27784 return py___disk_offset;
27787 static int py_srvsvc_NetDiskInfo0_set___disk_offset(PyObject *py_obj, PyObject *value, void *closure)
27789 struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(py_obj);
27790 if (value == NULL) {
27791 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__disk_offset");
27795 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__disk_offset));
27796 if (PyLong_Check(value)) {
27797 unsigned long long test_var;
27798 test_var = PyLong_AsUnsignedLongLong(value);
27799 if (PyErr_Occurred() != NULL) {
27802 if (test_var > uint_max) {
27803 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
27804 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
27807 object->__disk_offset = test_var;
27808 } else if (PyInt_Check(value)) {
27810 test_var = PyInt_AsLong(value);
27811 if (test_var < 0 || test_var > uint_max) {
27812 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
27813 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
27816 object->__disk_offset = test_var;
27818 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
27819 PyInt_Type.tp_name, PyLong_Type.tp_name);
27826 static PyObject *py_srvsvc_NetDiskInfo0_get___disk_length(PyObject *obj, void *closure)
27828 struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(obj);
27829 PyObject *py___disk_length;
27830 py___disk_length = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->__disk_length);
27831 return py___disk_length;
27834 static int py_srvsvc_NetDiskInfo0_set___disk_length(PyObject *py_obj, PyObject *value, void *closure)
27836 struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(py_obj);
27837 if (value == NULL) {
27838 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__disk_length");
27842 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__disk_length));
27843 if (PyLong_Check(value)) {
27844 unsigned long long test_var;
27845 test_var = PyLong_AsUnsignedLongLong(value);
27846 if (PyErr_Occurred() != NULL) {
27849 if (test_var > uint_max) {
27850 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
27851 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
27854 object->__disk_length = test_var;
27855 } else if (PyInt_Check(value)) {
27857 test_var = PyInt_AsLong(value);
27858 if (test_var < 0 || test_var > uint_max) {
27859 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
27860 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
27863 object->__disk_length = test_var;
27865 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
27866 PyInt_Type.tp_name, PyLong_Type.tp_name);
27873 static PyObject *py_srvsvc_NetDiskInfo0_get_disk(PyObject *obj, void *closure)
27875 struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(obj);
27877 if (object->disk == NULL) {
27879 Py_INCREF(py_disk);
27881 py_disk = PyUnicode_Decode(object->disk, strlen(object->disk), "utf-8", "ignore");
27886 static int py_srvsvc_NetDiskInfo0_set_disk(PyObject *py_obj, PyObject *value, void *closure)
27888 struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(py_obj);
27889 if (value == NULL) {
27890 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->disk");
27894 const char *test_str;
27895 const char *talloc_str;
27896 PyObject *unicode = NULL;
27897 if (PyUnicode_Check(value)) {
27898 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
27899 if (unicode == NULL) {
27903 test_str = PyString_AS_STRING(unicode);
27904 } else if (PyString_Check(value)) {
27905 test_str = PyString_AS_STRING(value);
27907 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
27910 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
27911 if (unicode != NULL) {
27912 Py_DECREF(unicode);
27914 if (talloc_str == NULL) {
27918 object->disk = talloc_str;
27923 static PyGetSetDef py_srvsvc_NetDiskInfo0_getsetters[] = {
27925 .name = discard_const_p(char, "__disk_offset"),
27926 .get = py_srvsvc_NetDiskInfo0_get___disk_offset,
27927 .set = py_srvsvc_NetDiskInfo0_set___disk_offset,
27928 .doc = discard_const_p(char, "PIDL-generated element __disk_offset")
27931 .name = discard_const_p(char, "__disk_length"),
27932 .get = py_srvsvc_NetDiskInfo0_get___disk_length,
27933 .set = py_srvsvc_NetDiskInfo0_set___disk_length,
27934 .doc = discard_const_p(char, "PIDL-generated element __disk_length")
27937 .name = discard_const_p(char, "disk"),
27938 .get = py_srvsvc_NetDiskInfo0_get_disk,
27939 .set = py_srvsvc_NetDiskInfo0_set_disk,
27940 .doc = discard_const_p(char, "PIDL-generated element disk")
27945 static PyObject *py_srvsvc_NetDiskInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
27947 return pytalloc_new(struct srvsvc_NetDiskInfo0, type);
27951 static PyTypeObject srvsvc_NetDiskInfo0_Type = {
27952 PyObject_HEAD_INIT(NULL) 0,
27953 .tp_name = "srvsvc.NetDiskInfo0",
27954 .tp_getset = py_srvsvc_NetDiskInfo0_getsetters,
27955 .tp_methods = NULL,
27956 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
27957 .tp_new = py_srvsvc_NetDiskInfo0_new,
27961 static PyObject *py_srvsvc_NetDiskInfo_get_count(PyObject *obj, void *closure)
27963 struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(obj);
27964 PyObject *py_count;
27965 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
27969 static int py_srvsvc_NetDiskInfo_set_count(PyObject *py_obj, PyObject *value, void *closure)
27971 struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(py_obj);
27972 if (value == NULL) {
27973 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
27977 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
27978 if (PyLong_Check(value)) {
27979 unsigned long long test_var;
27980 test_var = PyLong_AsUnsignedLongLong(value);
27981 if (PyErr_Occurred() != NULL) {
27984 if (test_var > uint_max) {
27985 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
27986 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
27989 object->count = test_var;
27990 } else if (PyInt_Check(value)) {
27992 test_var = PyInt_AsLong(value);
27993 if (test_var < 0 || test_var > uint_max) {
27994 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
27995 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
27998 object->count = test_var;
28000 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28001 PyInt_Type.tp_name, PyLong_Type.tp_name);
28008 static PyObject *py_srvsvc_NetDiskInfo_get_disks(PyObject *obj, void *closure)
28010 struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(obj);
28011 PyObject *py_disks;
28012 if (object->disks == NULL) {
28013 py_disks = Py_None;
28014 Py_INCREF(py_disks);
28016 py_disks = PyList_New(object->count);
28017 if (py_disks == NULL) {
28022 for (disks_cntr_1 = 0; disks_cntr_1 < (object->count); disks_cntr_1++) {
28023 PyObject *py_disks_1;
28024 py_disks_1 = pytalloc_reference_ex(&srvsvc_NetDiskInfo0_Type, object->disks, &object->disks[disks_cntr_1]);
28025 PyList_SetItem(py_disks, disks_cntr_1, py_disks_1);
28032 static int py_srvsvc_NetDiskInfo_set_disks(PyObject *py_obj, PyObject *value, void *closure)
28034 struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(py_obj);
28035 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->disks));
28036 if (value == NULL) {
28037 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->disks");
28040 if (value == Py_None) {
28041 object->disks = NULL;
28043 object->disks = NULL;
28044 if (value == NULL) {
28045 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->disks");
28048 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
28051 object->disks = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->disks, PyList_GET_SIZE(value));
28052 if (!object->disks) { return -1;; }
28053 talloc_set_name_const(object->disks, "ARRAY: object->disks");
28054 for (disks_cntr_1 = 0; disks_cntr_1 < PyList_GET_SIZE(value); disks_cntr_1++) {
28055 if (PyList_GET_ITEM(value, disks_cntr_1) == NULL) {
28056 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->disks[disks_cntr_1]");
28059 PY_CHECK_TYPE(&srvsvc_NetDiskInfo0_Type, PyList_GET_ITEM(value, disks_cntr_1), return -1;);
28060 if (talloc_reference(object->disks, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, disks_cntr_1))) == NULL) {
28064 object->disks[disks_cntr_1] = *(struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, disks_cntr_1));
28071 static PyGetSetDef py_srvsvc_NetDiskInfo_getsetters[] = {
28073 .name = discard_const_p(char, "count"),
28074 .get = py_srvsvc_NetDiskInfo_get_count,
28075 .set = py_srvsvc_NetDiskInfo_set_count,
28076 .doc = discard_const_p(char, "PIDL-generated element count")
28079 .name = discard_const_p(char, "disks"),
28080 .get = py_srvsvc_NetDiskInfo_get_disks,
28081 .set = py_srvsvc_NetDiskInfo_set_disks,
28082 .doc = discard_const_p(char, "PIDL-generated element disks")
28087 static PyObject *py_srvsvc_NetDiskInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
28089 return pytalloc_new(struct srvsvc_NetDiskInfo, type);
28093 static PyTypeObject srvsvc_NetDiskInfo_Type = {
28094 PyObject_HEAD_INIT(NULL) 0,
28095 .tp_name = "srvsvc.NetDiskInfo",
28096 .tp_getset = py_srvsvc_NetDiskInfo_getsetters,
28097 .tp_methods = NULL,
28098 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
28099 .tp_new = py_srvsvc_NetDiskInfo_new,
28103 static PyObject *py_srvsvc_Statistics_get_start(PyObject *obj, void *closure)
28105 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28106 PyObject *py_start;
28107 py_start = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->start);
28111 static int py_srvsvc_Statistics_set_start(PyObject *py_obj, PyObject *value, void *closure)
28113 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28114 if (value == NULL) {
28115 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->start");
28119 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->start));
28120 if (PyLong_Check(value)) {
28121 unsigned long long test_var;
28122 test_var = PyLong_AsUnsignedLongLong(value);
28123 if (PyErr_Occurred() != NULL) {
28126 if (test_var > uint_max) {
28127 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28128 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28131 object->start = test_var;
28132 } else if (PyInt_Check(value)) {
28134 test_var = PyInt_AsLong(value);
28135 if (test_var < 0 || test_var > uint_max) {
28136 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28137 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28140 object->start = test_var;
28142 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28143 PyInt_Type.tp_name, PyLong_Type.tp_name);
28150 static PyObject *py_srvsvc_Statistics_get_fopens(PyObject *obj, void *closure)
28152 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28153 PyObject *py_fopens;
28154 py_fopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->fopens);
28158 static int py_srvsvc_Statistics_set_fopens(PyObject *py_obj, PyObject *value, void *closure)
28160 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28161 if (value == NULL) {
28162 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fopens");
28166 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fopens));
28167 if (PyLong_Check(value)) {
28168 unsigned long long test_var;
28169 test_var = PyLong_AsUnsignedLongLong(value);
28170 if (PyErr_Occurred() != NULL) {
28173 if (test_var > uint_max) {
28174 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28175 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28178 object->fopens = test_var;
28179 } else if (PyInt_Check(value)) {
28181 test_var = PyInt_AsLong(value);
28182 if (test_var < 0 || test_var > uint_max) {
28183 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28184 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28187 object->fopens = test_var;
28189 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28190 PyInt_Type.tp_name, PyLong_Type.tp_name);
28197 static PyObject *py_srvsvc_Statistics_get_devopens(PyObject *obj, void *closure)
28199 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28200 PyObject *py_devopens;
28201 py_devopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->devopens);
28202 return py_devopens;
28205 static int py_srvsvc_Statistics_set_devopens(PyObject *py_obj, PyObject *value, void *closure)
28207 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28208 if (value == NULL) {
28209 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->devopens");
28213 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->devopens));
28214 if (PyLong_Check(value)) {
28215 unsigned long long test_var;
28216 test_var = PyLong_AsUnsignedLongLong(value);
28217 if (PyErr_Occurred() != NULL) {
28220 if (test_var > uint_max) {
28221 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28222 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28225 object->devopens = test_var;
28226 } else if (PyInt_Check(value)) {
28228 test_var = PyInt_AsLong(value);
28229 if (test_var < 0 || test_var > uint_max) {
28230 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28231 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28234 object->devopens = test_var;
28236 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28237 PyInt_Type.tp_name, PyLong_Type.tp_name);
28244 static PyObject *py_srvsvc_Statistics_get_jobsqueued(PyObject *obj, void *closure)
28246 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28247 PyObject *py_jobsqueued;
28248 py_jobsqueued = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->jobsqueued);
28249 return py_jobsqueued;
28252 static int py_srvsvc_Statistics_set_jobsqueued(PyObject *py_obj, PyObject *value, void *closure)
28254 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28255 if (value == NULL) {
28256 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->jobsqueued");
28260 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->jobsqueued));
28261 if (PyLong_Check(value)) {
28262 unsigned long long test_var;
28263 test_var = PyLong_AsUnsignedLongLong(value);
28264 if (PyErr_Occurred() != NULL) {
28267 if (test_var > uint_max) {
28268 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28269 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28272 object->jobsqueued = test_var;
28273 } else if (PyInt_Check(value)) {
28275 test_var = PyInt_AsLong(value);
28276 if (test_var < 0 || test_var > uint_max) {
28277 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28278 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28281 object->jobsqueued = test_var;
28283 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28284 PyInt_Type.tp_name, PyLong_Type.tp_name);
28291 static PyObject *py_srvsvc_Statistics_get_sopens(PyObject *obj, void *closure)
28293 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28294 PyObject *py_sopens;
28295 py_sopens = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->sopens);
28299 static int py_srvsvc_Statistics_set_sopens(PyObject *py_obj, PyObject *value, void *closure)
28301 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28302 if (value == NULL) {
28303 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sopens");
28307 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sopens));
28308 if (PyLong_Check(value)) {
28309 unsigned long long test_var;
28310 test_var = PyLong_AsUnsignedLongLong(value);
28311 if (PyErr_Occurred() != NULL) {
28314 if (test_var > uint_max) {
28315 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28316 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28319 object->sopens = test_var;
28320 } else if (PyInt_Check(value)) {
28322 test_var = PyInt_AsLong(value);
28323 if (test_var < 0 || test_var > uint_max) {
28324 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28325 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28328 object->sopens = test_var;
28330 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28331 PyInt_Type.tp_name, PyLong_Type.tp_name);
28338 static PyObject *py_srvsvc_Statistics_get_stimeouts(PyObject *obj, void *closure)
28340 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28341 PyObject *py_stimeouts;
28342 py_stimeouts = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->stimeouts);
28343 return py_stimeouts;
28346 static int py_srvsvc_Statistics_set_stimeouts(PyObject *py_obj, PyObject *value, void *closure)
28348 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28349 if (value == NULL) {
28350 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->stimeouts");
28354 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->stimeouts));
28355 if (PyLong_Check(value)) {
28356 unsigned long long test_var;
28357 test_var = PyLong_AsUnsignedLongLong(value);
28358 if (PyErr_Occurred() != NULL) {
28361 if (test_var > uint_max) {
28362 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28363 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28366 object->stimeouts = test_var;
28367 } else if (PyInt_Check(value)) {
28369 test_var = PyInt_AsLong(value);
28370 if (test_var < 0 || test_var > uint_max) {
28371 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28372 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28375 object->stimeouts = test_var;
28377 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28378 PyInt_Type.tp_name, PyLong_Type.tp_name);
28385 static PyObject *py_srvsvc_Statistics_get_serrorout(PyObject *obj, void *closure)
28387 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28388 PyObject *py_serrorout;
28389 py_serrorout = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->serrorout);
28390 return py_serrorout;
28393 static int py_srvsvc_Statistics_set_serrorout(PyObject *py_obj, PyObject *value, void *closure)
28395 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28396 if (value == NULL) {
28397 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serrorout");
28401 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serrorout));
28402 if (PyLong_Check(value)) {
28403 unsigned long long test_var;
28404 test_var = PyLong_AsUnsignedLongLong(value);
28405 if (PyErr_Occurred() != NULL) {
28408 if (test_var > uint_max) {
28409 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28410 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28413 object->serrorout = test_var;
28414 } else if (PyInt_Check(value)) {
28416 test_var = PyInt_AsLong(value);
28417 if (test_var < 0 || test_var > uint_max) {
28418 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28419 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28422 object->serrorout = test_var;
28424 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28425 PyInt_Type.tp_name, PyLong_Type.tp_name);
28432 static PyObject *py_srvsvc_Statistics_get_pwerrors(PyObject *obj, void *closure)
28434 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28435 PyObject *py_pwerrors;
28436 py_pwerrors = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->pwerrors);
28437 return py_pwerrors;
28440 static int py_srvsvc_Statistics_set_pwerrors(PyObject *py_obj, PyObject *value, void *closure)
28442 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28443 if (value == NULL) {
28444 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwerrors");
28448 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pwerrors));
28449 if (PyLong_Check(value)) {
28450 unsigned long long test_var;
28451 test_var = PyLong_AsUnsignedLongLong(value);
28452 if (PyErr_Occurred() != NULL) {
28455 if (test_var > uint_max) {
28456 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28457 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28460 object->pwerrors = test_var;
28461 } else if (PyInt_Check(value)) {
28463 test_var = PyInt_AsLong(value);
28464 if (test_var < 0 || test_var > uint_max) {
28465 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28466 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28469 object->pwerrors = test_var;
28471 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28472 PyInt_Type.tp_name, PyLong_Type.tp_name);
28479 static PyObject *py_srvsvc_Statistics_get_permerrors(PyObject *obj, void *closure)
28481 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28482 PyObject *py_permerrors;
28483 py_permerrors = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->permerrors);
28484 return py_permerrors;
28487 static int py_srvsvc_Statistics_set_permerrors(PyObject *py_obj, PyObject *value, void *closure)
28489 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28490 if (value == NULL) {
28491 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->permerrors");
28495 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permerrors));
28496 if (PyLong_Check(value)) {
28497 unsigned long long test_var;
28498 test_var = PyLong_AsUnsignedLongLong(value);
28499 if (PyErr_Occurred() != NULL) {
28502 if (test_var > uint_max) {
28503 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28504 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28507 object->permerrors = test_var;
28508 } else if (PyInt_Check(value)) {
28510 test_var = PyInt_AsLong(value);
28511 if (test_var < 0 || test_var > uint_max) {
28512 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28513 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28516 object->permerrors = test_var;
28518 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28519 PyInt_Type.tp_name, PyLong_Type.tp_name);
28526 static PyObject *py_srvsvc_Statistics_get_syserrors(PyObject *obj, void *closure)
28528 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28529 PyObject *py_syserrors;
28530 py_syserrors = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->syserrors);
28531 return py_syserrors;
28534 static int py_srvsvc_Statistics_set_syserrors(PyObject *py_obj, PyObject *value, void *closure)
28536 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28537 if (value == NULL) {
28538 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->syserrors");
28542 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->syserrors));
28543 if (PyLong_Check(value)) {
28544 unsigned long long test_var;
28545 test_var = PyLong_AsUnsignedLongLong(value);
28546 if (PyErr_Occurred() != NULL) {
28549 if (test_var > uint_max) {
28550 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28551 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28554 object->syserrors = test_var;
28555 } else if (PyInt_Check(value)) {
28557 test_var = PyInt_AsLong(value);
28558 if (test_var < 0 || test_var > uint_max) {
28559 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28560 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28563 object->syserrors = test_var;
28565 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28566 PyInt_Type.tp_name, PyLong_Type.tp_name);
28573 static PyObject *py_srvsvc_Statistics_get_bytessent_low(PyObject *obj, void *closure)
28575 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28576 PyObject *py_bytessent_low;
28577 py_bytessent_low = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->bytessent_low);
28578 return py_bytessent_low;
28581 static int py_srvsvc_Statistics_set_bytessent_low(PyObject *py_obj, PyObject *value, void *closure)
28583 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28584 if (value == NULL) {
28585 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bytessent_low");
28589 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytessent_low));
28590 if (PyLong_Check(value)) {
28591 unsigned long long test_var;
28592 test_var = PyLong_AsUnsignedLongLong(value);
28593 if (PyErr_Occurred() != NULL) {
28596 if (test_var > uint_max) {
28597 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28598 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28601 object->bytessent_low = test_var;
28602 } else if (PyInt_Check(value)) {
28604 test_var = PyInt_AsLong(value);
28605 if (test_var < 0 || test_var > uint_max) {
28606 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28607 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28610 object->bytessent_low = test_var;
28612 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28613 PyInt_Type.tp_name, PyLong_Type.tp_name);
28620 static PyObject *py_srvsvc_Statistics_get_bytessent_high(PyObject *obj, void *closure)
28622 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28623 PyObject *py_bytessent_high;
28624 py_bytessent_high = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->bytessent_high);
28625 return py_bytessent_high;
28628 static int py_srvsvc_Statistics_set_bytessent_high(PyObject *py_obj, PyObject *value, void *closure)
28630 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28631 if (value == NULL) {
28632 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bytessent_high");
28636 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytessent_high));
28637 if (PyLong_Check(value)) {
28638 unsigned long long test_var;
28639 test_var = PyLong_AsUnsignedLongLong(value);
28640 if (PyErr_Occurred() != NULL) {
28643 if (test_var > uint_max) {
28644 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28645 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28648 object->bytessent_high = test_var;
28649 } else if (PyInt_Check(value)) {
28651 test_var = PyInt_AsLong(value);
28652 if (test_var < 0 || test_var > uint_max) {
28653 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28654 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28657 object->bytessent_high = test_var;
28659 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28660 PyInt_Type.tp_name, PyLong_Type.tp_name);
28667 static PyObject *py_srvsvc_Statistics_get_bytesrcvd_low(PyObject *obj, void *closure)
28669 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28670 PyObject *py_bytesrcvd_low;
28671 py_bytesrcvd_low = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->bytesrcvd_low);
28672 return py_bytesrcvd_low;
28675 static int py_srvsvc_Statistics_set_bytesrcvd_low(PyObject *py_obj, PyObject *value, void *closure)
28677 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28678 if (value == NULL) {
28679 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bytesrcvd_low");
28683 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytesrcvd_low));
28684 if (PyLong_Check(value)) {
28685 unsigned long long test_var;
28686 test_var = PyLong_AsUnsignedLongLong(value);
28687 if (PyErr_Occurred() != NULL) {
28690 if (test_var > uint_max) {
28691 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28692 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28695 object->bytesrcvd_low = test_var;
28696 } else if (PyInt_Check(value)) {
28698 test_var = PyInt_AsLong(value);
28699 if (test_var < 0 || test_var > uint_max) {
28700 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28701 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28704 object->bytesrcvd_low = test_var;
28706 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28707 PyInt_Type.tp_name, PyLong_Type.tp_name);
28714 static PyObject *py_srvsvc_Statistics_get_bytesrcvd_high(PyObject *obj, void *closure)
28716 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28717 PyObject *py_bytesrcvd_high;
28718 py_bytesrcvd_high = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->bytesrcvd_high);
28719 return py_bytesrcvd_high;
28722 static int py_srvsvc_Statistics_set_bytesrcvd_high(PyObject *py_obj, PyObject *value, void *closure)
28724 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28725 if (value == NULL) {
28726 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bytesrcvd_high");
28730 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytesrcvd_high));
28731 if (PyLong_Check(value)) {
28732 unsigned long long test_var;
28733 test_var = PyLong_AsUnsignedLongLong(value);
28734 if (PyErr_Occurred() != NULL) {
28737 if (test_var > uint_max) {
28738 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28739 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28742 object->bytesrcvd_high = test_var;
28743 } else if (PyInt_Check(value)) {
28745 test_var = PyInt_AsLong(value);
28746 if (test_var < 0 || test_var > uint_max) {
28747 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28748 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28751 object->bytesrcvd_high = test_var;
28753 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28754 PyInt_Type.tp_name, PyLong_Type.tp_name);
28761 static PyObject *py_srvsvc_Statistics_get_avresponse(PyObject *obj, void *closure)
28763 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28764 PyObject *py_avresponse;
28765 py_avresponse = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->avresponse);
28766 return py_avresponse;
28769 static int py_srvsvc_Statistics_set_avresponse(PyObject *py_obj, PyObject *value, void *closure)
28771 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28772 if (value == NULL) {
28773 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->avresponse");
28777 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->avresponse));
28778 if (PyLong_Check(value)) {
28779 unsigned long long test_var;
28780 test_var = PyLong_AsUnsignedLongLong(value);
28781 if (PyErr_Occurred() != NULL) {
28784 if (test_var > uint_max) {
28785 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28786 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28789 object->avresponse = test_var;
28790 } else if (PyInt_Check(value)) {
28792 test_var = PyInt_AsLong(value);
28793 if (test_var < 0 || test_var > uint_max) {
28794 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28795 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28798 object->avresponse = test_var;
28800 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28801 PyInt_Type.tp_name, PyLong_Type.tp_name);
28808 static PyObject *py_srvsvc_Statistics_get_reqbufneed(PyObject *obj, void *closure)
28810 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28811 PyObject *py_reqbufneed;
28812 py_reqbufneed = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->reqbufneed);
28813 return py_reqbufneed;
28816 static int py_srvsvc_Statistics_set_reqbufneed(PyObject *py_obj, PyObject *value, void *closure)
28818 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28819 if (value == NULL) {
28820 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reqbufneed");
28824 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reqbufneed));
28825 if (PyLong_Check(value)) {
28826 unsigned long long test_var;
28827 test_var = PyLong_AsUnsignedLongLong(value);
28828 if (PyErr_Occurred() != NULL) {
28831 if (test_var > uint_max) {
28832 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28833 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28836 object->reqbufneed = test_var;
28837 } else if (PyInt_Check(value)) {
28839 test_var = PyInt_AsLong(value);
28840 if (test_var < 0 || test_var > uint_max) {
28841 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28842 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28845 object->reqbufneed = test_var;
28847 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28848 PyInt_Type.tp_name, PyLong_Type.tp_name);
28855 static PyObject *py_srvsvc_Statistics_get_bigbufneed(PyObject *obj, void *closure)
28857 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
28858 PyObject *py_bigbufneed;
28859 py_bigbufneed = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->bigbufneed);
28860 return py_bigbufneed;
28863 static int py_srvsvc_Statistics_set_bigbufneed(PyObject *py_obj, PyObject *value, void *closure)
28865 struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
28866 if (value == NULL) {
28867 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bigbufneed");
28871 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bigbufneed));
28872 if (PyLong_Check(value)) {
28873 unsigned long long test_var;
28874 test_var = PyLong_AsUnsignedLongLong(value);
28875 if (PyErr_Occurred() != NULL) {
28878 if (test_var > uint_max) {
28879 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
28880 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28883 object->bigbufneed = test_var;
28884 } else if (PyInt_Check(value)) {
28886 test_var = PyInt_AsLong(value);
28887 if (test_var < 0 || test_var > uint_max) {
28888 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
28889 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
28892 object->bigbufneed = test_var;
28894 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
28895 PyInt_Type.tp_name, PyLong_Type.tp_name);
28902 static PyGetSetDef py_srvsvc_Statistics_getsetters[] = {
28904 .name = discard_const_p(char, "start"),
28905 .get = py_srvsvc_Statistics_get_start,
28906 .set = py_srvsvc_Statistics_set_start,
28907 .doc = discard_const_p(char, "PIDL-generated element start")
28910 .name = discard_const_p(char, "fopens"),
28911 .get = py_srvsvc_Statistics_get_fopens,
28912 .set = py_srvsvc_Statistics_set_fopens,
28913 .doc = discard_const_p(char, "PIDL-generated element fopens")
28916 .name = discard_const_p(char, "devopens"),
28917 .get = py_srvsvc_Statistics_get_devopens,
28918 .set = py_srvsvc_Statistics_set_devopens,
28919 .doc = discard_const_p(char, "PIDL-generated element devopens")
28922 .name = discard_const_p(char, "jobsqueued"),
28923 .get = py_srvsvc_Statistics_get_jobsqueued,
28924 .set = py_srvsvc_Statistics_set_jobsqueued,
28925 .doc = discard_const_p(char, "PIDL-generated element jobsqueued")
28928 .name = discard_const_p(char, "sopens"),
28929 .get = py_srvsvc_Statistics_get_sopens,
28930 .set = py_srvsvc_Statistics_set_sopens,
28931 .doc = discard_const_p(char, "PIDL-generated element sopens")
28934 .name = discard_const_p(char, "stimeouts"),
28935 .get = py_srvsvc_Statistics_get_stimeouts,
28936 .set = py_srvsvc_Statistics_set_stimeouts,
28937 .doc = discard_const_p(char, "PIDL-generated element stimeouts")
28940 .name = discard_const_p(char, "serrorout"),
28941 .get = py_srvsvc_Statistics_get_serrorout,
28942 .set = py_srvsvc_Statistics_set_serrorout,
28943 .doc = discard_const_p(char, "PIDL-generated element serrorout")
28946 .name = discard_const_p(char, "pwerrors"),
28947 .get = py_srvsvc_Statistics_get_pwerrors,
28948 .set = py_srvsvc_Statistics_set_pwerrors,
28949 .doc = discard_const_p(char, "PIDL-generated element pwerrors")
28952 .name = discard_const_p(char, "permerrors"),
28953 .get = py_srvsvc_Statistics_get_permerrors,
28954 .set = py_srvsvc_Statistics_set_permerrors,
28955 .doc = discard_const_p(char, "PIDL-generated element permerrors")
28958 .name = discard_const_p(char, "syserrors"),
28959 .get = py_srvsvc_Statistics_get_syserrors,
28960 .set = py_srvsvc_Statistics_set_syserrors,
28961 .doc = discard_const_p(char, "PIDL-generated element syserrors")
28964 .name = discard_const_p(char, "bytessent_low"),
28965 .get = py_srvsvc_Statistics_get_bytessent_low,
28966 .set = py_srvsvc_Statistics_set_bytessent_low,
28967 .doc = discard_const_p(char, "PIDL-generated element bytessent_low")
28970 .name = discard_const_p(char, "bytessent_high"),
28971 .get = py_srvsvc_Statistics_get_bytessent_high,
28972 .set = py_srvsvc_Statistics_set_bytessent_high,
28973 .doc = discard_const_p(char, "PIDL-generated element bytessent_high")
28976 .name = discard_const_p(char, "bytesrcvd_low"),
28977 .get = py_srvsvc_Statistics_get_bytesrcvd_low,
28978 .set = py_srvsvc_Statistics_set_bytesrcvd_low,
28979 .doc = discard_const_p(char, "PIDL-generated element bytesrcvd_low")
28982 .name = discard_const_p(char, "bytesrcvd_high"),
28983 .get = py_srvsvc_Statistics_get_bytesrcvd_high,
28984 .set = py_srvsvc_Statistics_set_bytesrcvd_high,
28985 .doc = discard_const_p(char, "PIDL-generated element bytesrcvd_high")
28988 .name = discard_const_p(char, "avresponse"),
28989 .get = py_srvsvc_Statistics_get_avresponse,
28990 .set = py_srvsvc_Statistics_set_avresponse,
28991 .doc = discard_const_p(char, "PIDL-generated element avresponse")
28994 .name = discard_const_p(char, "reqbufneed"),
28995 .get = py_srvsvc_Statistics_get_reqbufneed,
28996 .set = py_srvsvc_Statistics_set_reqbufneed,
28997 .doc = discard_const_p(char, "PIDL-generated element reqbufneed")
29000 .name = discard_const_p(char, "bigbufneed"),
29001 .get = py_srvsvc_Statistics_get_bigbufneed,
29002 .set = py_srvsvc_Statistics_set_bigbufneed,
29003 .doc = discard_const_p(char, "PIDL-generated element bigbufneed")
29008 static PyObject *py_srvsvc_Statistics_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29010 return pytalloc_new(struct srvsvc_Statistics, type);
29014 static PyTypeObject srvsvc_Statistics_Type = {
29015 PyObject_HEAD_INIT(NULL) 0,
29016 .tp_name = "srvsvc.Statistics",
29017 .tp_getset = py_srvsvc_Statistics_getsetters,
29018 .tp_methods = NULL,
29019 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29020 .tp_new = py_srvsvc_Statistics_new,
29024 static PyObject *py_srvsvc_NetTransportInfo0_get_vcs(PyObject *obj, void *closure)
29026 struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
29028 py_vcs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
29032 static int py_srvsvc_NetTransportInfo0_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
29034 struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
29035 if (value == NULL) {
29036 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->vcs");
29040 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
29041 if (PyLong_Check(value)) {
29042 unsigned long long test_var;
29043 test_var = PyLong_AsUnsignedLongLong(value);
29044 if (PyErr_Occurred() != NULL) {
29047 if (test_var > uint_max) {
29048 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
29049 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29052 object->vcs = test_var;
29053 } else if (PyInt_Check(value)) {
29055 test_var = PyInt_AsLong(value);
29056 if (test_var < 0 || test_var > uint_max) {
29057 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
29058 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29061 object->vcs = test_var;
29063 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
29064 PyInt_Type.tp_name, PyLong_Type.tp_name);
29071 static PyObject *py_srvsvc_NetTransportInfo0_get_name(PyObject *obj, void *closure)
29073 struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
29075 if (object->name == NULL) {
29077 Py_INCREF(py_name);
29079 if (object->name == NULL) {
29081 Py_INCREF(py_name);
29083 py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
29089 static int py_srvsvc_NetTransportInfo0_set_name(PyObject *py_obj, PyObject *value, void *closure)
29091 struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
29092 if (value == NULL) {
29093 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
29096 if (value == Py_None) {
29097 object->name = NULL;
29099 object->name = NULL;
29100 if (value == NULL) {
29101 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->name");
29105 const char *test_str;
29106 const char *talloc_str;
29107 PyObject *unicode = NULL;
29108 if (PyUnicode_Check(value)) {
29109 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29110 if (unicode == NULL) {
29114 test_str = PyString_AS_STRING(unicode);
29115 } else if (PyString_Check(value)) {
29116 test_str = PyString_AS_STRING(value);
29118 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29121 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29122 if (unicode != NULL) {
29123 Py_DECREF(unicode);
29125 if (talloc_str == NULL) {
29129 object->name = talloc_str;
29135 static PyObject *py_srvsvc_NetTransportInfo0_get_addr(PyObject *obj, void *closure)
29137 struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
29139 if (object->addr == NULL) {
29141 Py_INCREF(py_addr);
29143 py_addr = PyList_New(object->addr_len);
29144 if (py_addr == NULL) {
29149 for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
29150 PyObject *py_addr_1;
29151 py_addr_1 = PyInt_FromLong((uint16_t)object->addr[addr_cntr_1]);
29152 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
29159 static int py_srvsvc_NetTransportInfo0_set_addr(PyObject *py_obj, PyObject *value, void *closure)
29161 struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
29162 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
29163 if (value == NULL) {
29164 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr");
29167 if (value == Py_None) {
29168 object->addr = NULL;
29170 object->addr = NULL;
29171 if (value == NULL) {
29172 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->addr");
29175 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
29178 object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
29179 if (!object->addr) { return -1;; }
29180 talloc_set_name_const(object->addr, "ARRAY: object->addr");
29181 for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
29182 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
29183 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr[addr_cntr_1]");
29187 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
29188 if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
29189 unsigned long long test_var;
29190 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
29191 if (PyErr_Occurred() != NULL) {
29194 if (test_var > uint_max) {
29195 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
29196 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29199 object->addr[addr_cntr_1] = test_var;
29200 } else if (PyInt_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
29202 test_var = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
29203 if (test_var < 0 || test_var > uint_max) {
29204 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
29205 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29208 object->addr[addr_cntr_1] = test_var;
29210 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
29211 PyInt_Type.tp_name, PyLong_Type.tp_name);
29221 static PyObject *py_srvsvc_NetTransportInfo0_get_addr_len(PyObject *obj, void *closure)
29223 struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
29224 PyObject *py_addr_len;
29225 py_addr_len = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
29226 return py_addr_len;
29229 static int py_srvsvc_NetTransportInfo0_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
29231 struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
29232 if (value == NULL) {
29233 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_len");
29237 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
29238 if (PyLong_Check(value)) {
29239 unsigned long long test_var;
29240 test_var = PyLong_AsUnsignedLongLong(value);
29241 if (PyErr_Occurred() != NULL) {
29244 if (test_var > uint_max) {
29245 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
29246 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29249 object->addr_len = test_var;
29250 } else if (PyInt_Check(value)) {
29252 test_var = PyInt_AsLong(value);
29253 if (test_var < 0 || test_var > uint_max) {
29254 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
29255 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29258 object->addr_len = test_var;
29260 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
29261 PyInt_Type.tp_name, PyLong_Type.tp_name);
29268 static PyObject *py_srvsvc_NetTransportInfo0_get_net_addr(PyObject *obj, void *closure)
29270 struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
29271 PyObject *py_net_addr;
29272 if (object->net_addr == NULL) {
29273 py_net_addr = Py_None;
29274 Py_INCREF(py_net_addr);
29276 if (object->net_addr == NULL) {
29277 py_net_addr = Py_None;
29278 Py_INCREF(py_net_addr);
29280 py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
29283 return py_net_addr;
29286 static int py_srvsvc_NetTransportInfo0_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
29288 struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
29289 if (value == NULL) {
29290 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->net_addr");
29293 if (value == Py_None) {
29294 object->net_addr = NULL;
29296 object->net_addr = NULL;
29297 if (value == NULL) {
29298 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->net_addr");
29302 const char *test_str;
29303 const char *talloc_str;
29304 PyObject *unicode = NULL;
29305 if (PyUnicode_Check(value)) {
29306 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29307 if (unicode == NULL) {
29311 test_str = PyString_AS_STRING(unicode);
29312 } else if (PyString_Check(value)) {
29313 test_str = PyString_AS_STRING(value);
29315 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29318 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29319 if (unicode != NULL) {
29320 Py_DECREF(unicode);
29322 if (talloc_str == NULL) {
29326 object->net_addr = talloc_str;
29332 static PyGetSetDef py_srvsvc_NetTransportInfo0_getsetters[] = {
29334 .name = discard_const_p(char, "vcs"),
29335 .get = py_srvsvc_NetTransportInfo0_get_vcs,
29336 .set = py_srvsvc_NetTransportInfo0_set_vcs,
29337 .doc = discard_const_p(char, "PIDL-generated element vcs")
29340 .name = discard_const_p(char, "name"),
29341 .get = py_srvsvc_NetTransportInfo0_get_name,
29342 .set = py_srvsvc_NetTransportInfo0_set_name,
29343 .doc = discard_const_p(char, "PIDL-generated element name")
29346 .name = discard_const_p(char, "addr"),
29347 .get = py_srvsvc_NetTransportInfo0_get_addr,
29348 .set = py_srvsvc_NetTransportInfo0_set_addr,
29349 .doc = discard_const_p(char, "PIDL-generated element addr")
29352 .name = discard_const_p(char, "addr_len"),
29353 .get = py_srvsvc_NetTransportInfo0_get_addr_len,
29354 .set = py_srvsvc_NetTransportInfo0_set_addr_len,
29355 .doc = discard_const_p(char, "PIDL-generated element addr_len")
29358 .name = discard_const_p(char, "net_addr"),
29359 .get = py_srvsvc_NetTransportInfo0_get_net_addr,
29360 .set = py_srvsvc_NetTransportInfo0_set_net_addr,
29361 .doc = discard_const_p(char, "PIDL-generated element net_addr")
29366 static PyObject *py_srvsvc_NetTransportInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29368 return pytalloc_new(struct srvsvc_NetTransportInfo0, type);
29372 static PyTypeObject srvsvc_NetTransportInfo0_Type = {
29373 PyObject_HEAD_INIT(NULL) 0,
29374 .tp_name = "srvsvc.NetTransportInfo0",
29375 .tp_getset = py_srvsvc_NetTransportInfo0_getsetters,
29376 .tp_methods = NULL,
29377 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29378 .tp_new = py_srvsvc_NetTransportInfo0_new,
29382 static PyObject *py_srvsvc_NetTransportCtr0_get_count(PyObject *obj, void *closure)
29384 struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(obj);
29385 PyObject *py_count;
29386 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
29390 static int py_srvsvc_NetTransportCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
29392 struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(py_obj);
29393 if (value == NULL) {
29394 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
29398 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
29399 if (PyLong_Check(value)) {
29400 unsigned long long test_var;
29401 test_var = PyLong_AsUnsignedLongLong(value);
29402 if (PyErr_Occurred() != NULL) {
29405 if (test_var > uint_max) {
29406 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
29407 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29410 object->count = test_var;
29411 } else if (PyInt_Check(value)) {
29413 test_var = PyInt_AsLong(value);
29414 if (test_var < 0 || test_var > uint_max) {
29415 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
29416 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29419 object->count = test_var;
29421 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
29422 PyInt_Type.tp_name, PyLong_Type.tp_name);
29429 static PyObject *py_srvsvc_NetTransportCtr0_get_array(PyObject *obj, void *closure)
29431 struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(obj);
29432 PyObject *py_array;
29433 if (object->array == NULL) {
29434 py_array = Py_None;
29435 Py_INCREF(py_array);
29437 py_array = PyList_New(object->count);
29438 if (py_array == NULL) {
29443 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
29444 PyObject *py_array_1;
29445 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo0_Type, object->array, &object->array[array_cntr_1]);
29446 PyList_SetItem(py_array, array_cntr_1, py_array_1);
29453 static int py_srvsvc_NetTransportCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
29455 struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(py_obj);
29456 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
29457 if (value == NULL) {
29458 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
29461 if (value == Py_None) {
29462 object->array = NULL;
29464 object->array = NULL;
29465 if (value == NULL) {
29466 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
29469 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
29472 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
29473 if (!object->array) { return -1;; }
29474 talloc_set_name_const(object->array, "ARRAY: object->array");
29475 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
29476 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
29477 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
29480 PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
29481 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
29485 object->array[array_cntr_1] = *(struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
29492 static PyGetSetDef py_srvsvc_NetTransportCtr0_getsetters[] = {
29494 .name = discard_const_p(char, "count"),
29495 .get = py_srvsvc_NetTransportCtr0_get_count,
29496 .set = py_srvsvc_NetTransportCtr0_set_count,
29497 .doc = discard_const_p(char, "PIDL-generated element count")
29500 .name = discard_const_p(char, "array"),
29501 .get = py_srvsvc_NetTransportCtr0_get_array,
29502 .set = py_srvsvc_NetTransportCtr0_set_array,
29503 .doc = discard_const_p(char, "PIDL-generated element array")
29508 static PyObject *py_srvsvc_NetTransportCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29510 return pytalloc_new(struct srvsvc_NetTransportCtr0, type);
29514 static PyTypeObject srvsvc_NetTransportCtr0_Type = {
29515 PyObject_HEAD_INIT(NULL) 0,
29516 .tp_name = "srvsvc.NetTransportCtr0",
29517 .tp_getset = py_srvsvc_NetTransportCtr0_getsetters,
29518 .tp_methods = NULL,
29519 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29520 .tp_new = py_srvsvc_NetTransportCtr0_new,
29524 static PyObject *py_srvsvc_NetTransportInfo1_get_vcs(PyObject *obj, void *closure)
29526 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
29528 py_vcs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
29532 static int py_srvsvc_NetTransportInfo1_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
29534 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
29535 if (value == NULL) {
29536 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->vcs");
29540 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
29541 if (PyLong_Check(value)) {
29542 unsigned long long test_var;
29543 test_var = PyLong_AsUnsignedLongLong(value);
29544 if (PyErr_Occurred() != NULL) {
29547 if (test_var > uint_max) {
29548 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
29549 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29552 object->vcs = test_var;
29553 } else if (PyInt_Check(value)) {
29555 test_var = PyInt_AsLong(value);
29556 if (test_var < 0 || test_var > uint_max) {
29557 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
29558 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29561 object->vcs = test_var;
29563 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
29564 PyInt_Type.tp_name, PyLong_Type.tp_name);
29571 static PyObject *py_srvsvc_NetTransportInfo1_get_name(PyObject *obj, void *closure)
29573 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
29575 if (object->name == NULL) {
29577 Py_INCREF(py_name);
29579 if (object->name == NULL) {
29581 Py_INCREF(py_name);
29583 py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
29589 static int py_srvsvc_NetTransportInfo1_set_name(PyObject *py_obj, PyObject *value, void *closure)
29591 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
29592 if (value == NULL) {
29593 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
29596 if (value == Py_None) {
29597 object->name = NULL;
29599 object->name = NULL;
29600 if (value == NULL) {
29601 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->name");
29605 const char *test_str;
29606 const char *talloc_str;
29607 PyObject *unicode = NULL;
29608 if (PyUnicode_Check(value)) {
29609 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29610 if (unicode == NULL) {
29614 test_str = PyString_AS_STRING(unicode);
29615 } else if (PyString_Check(value)) {
29616 test_str = PyString_AS_STRING(value);
29618 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29621 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29622 if (unicode != NULL) {
29623 Py_DECREF(unicode);
29625 if (talloc_str == NULL) {
29629 object->name = talloc_str;
29635 static PyObject *py_srvsvc_NetTransportInfo1_get_addr(PyObject *obj, void *closure)
29637 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
29639 if (object->addr == NULL) {
29641 Py_INCREF(py_addr);
29643 py_addr = PyList_New(object->addr_len);
29644 if (py_addr == NULL) {
29649 for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
29650 PyObject *py_addr_1;
29651 py_addr_1 = PyInt_FromLong((uint16_t)object->addr[addr_cntr_1]);
29652 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
29659 static int py_srvsvc_NetTransportInfo1_set_addr(PyObject *py_obj, PyObject *value, void *closure)
29661 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
29662 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
29663 if (value == NULL) {
29664 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr");
29667 if (value == Py_None) {
29668 object->addr = NULL;
29670 object->addr = NULL;
29671 if (value == NULL) {
29672 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->addr");
29675 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
29678 object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
29679 if (!object->addr) { return -1;; }
29680 talloc_set_name_const(object->addr, "ARRAY: object->addr");
29681 for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
29682 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
29683 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr[addr_cntr_1]");
29687 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
29688 if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
29689 unsigned long long test_var;
29690 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
29691 if (PyErr_Occurred() != NULL) {
29694 if (test_var > uint_max) {
29695 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
29696 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29699 object->addr[addr_cntr_1] = test_var;
29700 } else if (PyInt_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
29702 test_var = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
29703 if (test_var < 0 || test_var > uint_max) {
29704 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
29705 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29708 object->addr[addr_cntr_1] = test_var;
29710 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
29711 PyInt_Type.tp_name, PyLong_Type.tp_name);
29721 static PyObject *py_srvsvc_NetTransportInfo1_get_addr_len(PyObject *obj, void *closure)
29723 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
29724 PyObject *py_addr_len;
29725 py_addr_len = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
29726 return py_addr_len;
29729 static int py_srvsvc_NetTransportInfo1_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
29731 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
29732 if (value == NULL) {
29733 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_len");
29737 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
29738 if (PyLong_Check(value)) {
29739 unsigned long long test_var;
29740 test_var = PyLong_AsUnsignedLongLong(value);
29741 if (PyErr_Occurred() != NULL) {
29744 if (test_var > uint_max) {
29745 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
29746 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29749 object->addr_len = test_var;
29750 } else if (PyInt_Check(value)) {
29752 test_var = PyInt_AsLong(value);
29753 if (test_var < 0 || test_var > uint_max) {
29754 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
29755 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29758 object->addr_len = test_var;
29760 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
29761 PyInt_Type.tp_name, PyLong_Type.tp_name);
29768 static PyObject *py_srvsvc_NetTransportInfo1_get_net_addr(PyObject *obj, void *closure)
29770 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
29771 PyObject *py_net_addr;
29772 if (object->net_addr == NULL) {
29773 py_net_addr = Py_None;
29774 Py_INCREF(py_net_addr);
29776 if (object->net_addr == NULL) {
29777 py_net_addr = Py_None;
29778 Py_INCREF(py_net_addr);
29780 py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
29783 return py_net_addr;
29786 static int py_srvsvc_NetTransportInfo1_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
29788 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
29789 if (value == NULL) {
29790 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->net_addr");
29793 if (value == Py_None) {
29794 object->net_addr = NULL;
29796 object->net_addr = NULL;
29797 if (value == NULL) {
29798 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->net_addr");
29802 const char *test_str;
29803 const char *talloc_str;
29804 PyObject *unicode = NULL;
29805 if (PyUnicode_Check(value)) {
29806 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29807 if (unicode == NULL) {
29811 test_str = PyString_AS_STRING(unicode);
29812 } else if (PyString_Check(value)) {
29813 test_str = PyString_AS_STRING(value);
29815 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29818 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29819 if (unicode != NULL) {
29820 Py_DECREF(unicode);
29822 if (talloc_str == NULL) {
29826 object->net_addr = talloc_str;
29832 static PyObject *py_srvsvc_NetTransportInfo1_get_domain(PyObject *obj, void *closure)
29834 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
29835 PyObject *py_domain;
29836 if (object->domain == NULL) {
29837 py_domain = Py_None;
29838 Py_INCREF(py_domain);
29840 if (object->domain == NULL) {
29841 py_domain = Py_None;
29842 Py_INCREF(py_domain);
29844 py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
29850 static int py_srvsvc_NetTransportInfo1_set_domain(PyObject *py_obj, PyObject *value, void *closure)
29852 struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
29853 if (value == NULL) {
29854 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
29857 if (value == Py_None) {
29858 object->domain = NULL;
29860 object->domain = NULL;
29861 if (value == NULL) {
29862 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->domain");
29866 const char *test_str;
29867 const char *talloc_str;
29868 PyObject *unicode = NULL;
29869 if (PyUnicode_Check(value)) {
29870 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29871 if (unicode == NULL) {
29875 test_str = PyString_AS_STRING(unicode);
29876 } else if (PyString_Check(value)) {
29877 test_str = PyString_AS_STRING(value);
29879 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29882 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29883 if (unicode != NULL) {
29884 Py_DECREF(unicode);
29886 if (talloc_str == NULL) {
29890 object->domain = talloc_str;
29896 static PyGetSetDef py_srvsvc_NetTransportInfo1_getsetters[] = {
29898 .name = discard_const_p(char, "vcs"),
29899 .get = py_srvsvc_NetTransportInfo1_get_vcs,
29900 .set = py_srvsvc_NetTransportInfo1_set_vcs,
29901 .doc = discard_const_p(char, "PIDL-generated element vcs")
29904 .name = discard_const_p(char, "name"),
29905 .get = py_srvsvc_NetTransportInfo1_get_name,
29906 .set = py_srvsvc_NetTransportInfo1_set_name,
29907 .doc = discard_const_p(char, "PIDL-generated element name")
29910 .name = discard_const_p(char, "addr"),
29911 .get = py_srvsvc_NetTransportInfo1_get_addr,
29912 .set = py_srvsvc_NetTransportInfo1_set_addr,
29913 .doc = discard_const_p(char, "PIDL-generated element addr")
29916 .name = discard_const_p(char, "addr_len"),
29917 .get = py_srvsvc_NetTransportInfo1_get_addr_len,
29918 .set = py_srvsvc_NetTransportInfo1_set_addr_len,
29919 .doc = discard_const_p(char, "PIDL-generated element addr_len")
29922 .name = discard_const_p(char, "net_addr"),
29923 .get = py_srvsvc_NetTransportInfo1_get_net_addr,
29924 .set = py_srvsvc_NetTransportInfo1_set_net_addr,
29925 .doc = discard_const_p(char, "PIDL-generated element net_addr")
29928 .name = discard_const_p(char, "domain"),
29929 .get = py_srvsvc_NetTransportInfo1_get_domain,
29930 .set = py_srvsvc_NetTransportInfo1_set_domain,
29931 .doc = discard_const_p(char, "PIDL-generated element domain")
29936 static PyObject *py_srvsvc_NetTransportInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29938 return pytalloc_new(struct srvsvc_NetTransportInfo1, type);
29942 static PyTypeObject srvsvc_NetTransportInfo1_Type = {
29943 PyObject_HEAD_INIT(NULL) 0,
29944 .tp_name = "srvsvc.NetTransportInfo1",
29945 .tp_getset = py_srvsvc_NetTransportInfo1_getsetters,
29946 .tp_methods = NULL,
29947 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29948 .tp_new = py_srvsvc_NetTransportInfo1_new,
29952 static PyObject *py_srvsvc_NetTransportCtr1_get_count(PyObject *obj, void *closure)
29954 struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(obj);
29955 PyObject *py_count;
29956 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
29960 static int py_srvsvc_NetTransportCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
29962 struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(py_obj);
29963 if (value == NULL) {
29964 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
29968 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
29969 if (PyLong_Check(value)) {
29970 unsigned long long test_var;
29971 test_var = PyLong_AsUnsignedLongLong(value);
29972 if (PyErr_Occurred() != NULL) {
29975 if (test_var > uint_max) {
29976 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
29977 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29980 object->count = test_var;
29981 } else if (PyInt_Check(value)) {
29983 test_var = PyInt_AsLong(value);
29984 if (test_var < 0 || test_var > uint_max) {
29985 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
29986 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
29989 object->count = test_var;
29991 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
29992 PyInt_Type.tp_name, PyLong_Type.tp_name);
29999 static PyObject *py_srvsvc_NetTransportCtr1_get_array(PyObject *obj, void *closure)
30001 struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(obj);
30002 PyObject *py_array;
30003 if (object->array == NULL) {
30004 py_array = Py_None;
30005 Py_INCREF(py_array);
30007 py_array = PyList_New(object->count);
30008 if (py_array == NULL) {
30013 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
30014 PyObject *py_array_1;
30015 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo1_Type, object->array, &object->array[array_cntr_1]);
30016 PyList_SetItem(py_array, array_cntr_1, py_array_1);
30023 static int py_srvsvc_NetTransportCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
30025 struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(py_obj);
30026 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
30027 if (value == NULL) {
30028 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
30031 if (value == Py_None) {
30032 object->array = NULL;
30034 object->array = NULL;
30035 if (value == NULL) {
30036 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
30039 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
30042 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
30043 if (!object->array) { return -1;; }
30044 talloc_set_name_const(object->array, "ARRAY: object->array");
30045 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
30046 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
30047 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
30050 PY_CHECK_TYPE(&srvsvc_NetTransportInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
30051 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
30055 object->array[array_cntr_1] = *(struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
30062 static PyGetSetDef py_srvsvc_NetTransportCtr1_getsetters[] = {
30064 .name = discard_const_p(char, "count"),
30065 .get = py_srvsvc_NetTransportCtr1_get_count,
30066 .set = py_srvsvc_NetTransportCtr1_set_count,
30067 .doc = discard_const_p(char, "PIDL-generated element count")
30070 .name = discard_const_p(char, "array"),
30071 .get = py_srvsvc_NetTransportCtr1_get_array,
30072 .set = py_srvsvc_NetTransportCtr1_set_array,
30073 .doc = discard_const_p(char, "PIDL-generated element array")
30078 static PyObject *py_srvsvc_NetTransportCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
30080 return pytalloc_new(struct srvsvc_NetTransportCtr1, type);
30084 static PyTypeObject srvsvc_NetTransportCtr1_Type = {
30085 PyObject_HEAD_INIT(NULL) 0,
30086 .tp_name = "srvsvc.NetTransportCtr1",
30087 .tp_getset = py_srvsvc_NetTransportCtr1_getsetters,
30088 .tp_methods = NULL,
30089 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
30090 .tp_new = py_srvsvc_NetTransportCtr1_new,
30094 static PyObject *py_srvsvc_NetTransportInfo2_get_vcs(PyObject *obj, void *closure)
30096 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
30098 py_vcs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
30102 static int py_srvsvc_NetTransportInfo2_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
30104 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
30105 if (value == NULL) {
30106 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->vcs");
30110 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
30111 if (PyLong_Check(value)) {
30112 unsigned long long test_var;
30113 test_var = PyLong_AsUnsignedLongLong(value);
30114 if (PyErr_Occurred() != NULL) {
30117 if (test_var > uint_max) {
30118 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
30119 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30122 object->vcs = test_var;
30123 } else if (PyInt_Check(value)) {
30125 test_var = PyInt_AsLong(value);
30126 if (test_var < 0 || test_var > uint_max) {
30127 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
30128 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30131 object->vcs = test_var;
30133 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
30134 PyInt_Type.tp_name, PyLong_Type.tp_name);
30141 static PyObject *py_srvsvc_NetTransportInfo2_get_name(PyObject *obj, void *closure)
30143 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
30145 if (object->name == NULL) {
30147 Py_INCREF(py_name);
30149 if (object->name == NULL) {
30151 Py_INCREF(py_name);
30153 py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
30159 static int py_srvsvc_NetTransportInfo2_set_name(PyObject *py_obj, PyObject *value, void *closure)
30161 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
30162 if (value == NULL) {
30163 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
30166 if (value == Py_None) {
30167 object->name = NULL;
30169 object->name = NULL;
30170 if (value == NULL) {
30171 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->name");
30175 const char *test_str;
30176 const char *talloc_str;
30177 PyObject *unicode = NULL;
30178 if (PyUnicode_Check(value)) {
30179 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30180 if (unicode == NULL) {
30184 test_str = PyString_AS_STRING(unicode);
30185 } else if (PyString_Check(value)) {
30186 test_str = PyString_AS_STRING(value);
30188 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30191 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30192 if (unicode != NULL) {
30193 Py_DECREF(unicode);
30195 if (talloc_str == NULL) {
30199 object->name = talloc_str;
30205 static PyObject *py_srvsvc_NetTransportInfo2_get_addr(PyObject *obj, void *closure)
30207 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
30209 if (object->addr == NULL) {
30211 Py_INCREF(py_addr);
30213 py_addr = PyList_New(object->addr_len);
30214 if (py_addr == NULL) {
30219 for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
30220 PyObject *py_addr_1;
30221 py_addr_1 = PyInt_FromLong((uint16_t)object->addr[addr_cntr_1]);
30222 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
30229 static int py_srvsvc_NetTransportInfo2_set_addr(PyObject *py_obj, PyObject *value, void *closure)
30231 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
30232 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
30233 if (value == NULL) {
30234 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr");
30237 if (value == Py_None) {
30238 object->addr = NULL;
30240 object->addr = NULL;
30241 if (value == NULL) {
30242 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->addr");
30245 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
30248 object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
30249 if (!object->addr) { return -1;; }
30250 talloc_set_name_const(object->addr, "ARRAY: object->addr");
30251 for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
30252 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
30253 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr[addr_cntr_1]");
30257 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
30258 if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
30259 unsigned long long test_var;
30260 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
30261 if (PyErr_Occurred() != NULL) {
30264 if (test_var > uint_max) {
30265 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
30266 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30269 object->addr[addr_cntr_1] = test_var;
30270 } else if (PyInt_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
30272 test_var = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
30273 if (test_var < 0 || test_var > uint_max) {
30274 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
30275 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30278 object->addr[addr_cntr_1] = test_var;
30280 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
30281 PyInt_Type.tp_name, PyLong_Type.tp_name);
30291 static PyObject *py_srvsvc_NetTransportInfo2_get_addr_len(PyObject *obj, void *closure)
30293 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
30294 PyObject *py_addr_len;
30295 py_addr_len = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
30296 return py_addr_len;
30299 static int py_srvsvc_NetTransportInfo2_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
30301 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
30302 if (value == NULL) {
30303 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_len");
30307 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
30308 if (PyLong_Check(value)) {
30309 unsigned long long test_var;
30310 test_var = PyLong_AsUnsignedLongLong(value);
30311 if (PyErr_Occurred() != NULL) {
30314 if (test_var > uint_max) {
30315 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
30316 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30319 object->addr_len = test_var;
30320 } else if (PyInt_Check(value)) {
30322 test_var = PyInt_AsLong(value);
30323 if (test_var < 0 || test_var > uint_max) {
30324 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
30325 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30328 object->addr_len = test_var;
30330 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
30331 PyInt_Type.tp_name, PyLong_Type.tp_name);
30338 static PyObject *py_srvsvc_NetTransportInfo2_get_net_addr(PyObject *obj, void *closure)
30340 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
30341 PyObject *py_net_addr;
30342 if (object->net_addr == NULL) {
30343 py_net_addr = Py_None;
30344 Py_INCREF(py_net_addr);
30346 if (object->net_addr == NULL) {
30347 py_net_addr = Py_None;
30348 Py_INCREF(py_net_addr);
30350 py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
30353 return py_net_addr;
30356 static int py_srvsvc_NetTransportInfo2_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
30358 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
30359 if (value == NULL) {
30360 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->net_addr");
30363 if (value == Py_None) {
30364 object->net_addr = NULL;
30366 object->net_addr = NULL;
30367 if (value == NULL) {
30368 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->net_addr");
30372 const char *test_str;
30373 const char *talloc_str;
30374 PyObject *unicode = NULL;
30375 if (PyUnicode_Check(value)) {
30376 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30377 if (unicode == NULL) {
30381 test_str = PyString_AS_STRING(unicode);
30382 } else if (PyString_Check(value)) {
30383 test_str = PyString_AS_STRING(value);
30385 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30388 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30389 if (unicode != NULL) {
30390 Py_DECREF(unicode);
30392 if (talloc_str == NULL) {
30396 object->net_addr = talloc_str;
30402 static PyObject *py_srvsvc_NetTransportInfo2_get_domain(PyObject *obj, void *closure)
30404 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
30405 PyObject *py_domain;
30406 if (object->domain == NULL) {
30407 py_domain = Py_None;
30408 Py_INCREF(py_domain);
30410 if (object->domain == NULL) {
30411 py_domain = Py_None;
30412 Py_INCREF(py_domain);
30414 py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
30420 static int py_srvsvc_NetTransportInfo2_set_domain(PyObject *py_obj, PyObject *value, void *closure)
30422 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
30423 if (value == NULL) {
30424 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
30427 if (value == Py_None) {
30428 object->domain = NULL;
30430 object->domain = NULL;
30431 if (value == NULL) {
30432 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->domain");
30436 const char *test_str;
30437 const char *talloc_str;
30438 PyObject *unicode = NULL;
30439 if (PyUnicode_Check(value)) {
30440 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30441 if (unicode == NULL) {
30445 test_str = PyString_AS_STRING(unicode);
30446 } else if (PyString_Check(value)) {
30447 test_str = PyString_AS_STRING(value);
30449 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30452 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30453 if (unicode != NULL) {
30454 Py_DECREF(unicode);
30456 if (talloc_str == NULL) {
30460 object->domain = talloc_str;
30466 static PyObject *py_srvsvc_NetTransportInfo2_get_unknown(PyObject *obj, void *closure)
30468 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
30469 PyObject *py_unknown;
30470 py_unknown = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->unknown);
30474 static int py_srvsvc_NetTransportInfo2_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
30476 struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
30477 if (value == NULL) {
30478 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown");
30482 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown));
30483 if (PyLong_Check(value)) {
30484 unsigned long long test_var;
30485 test_var = PyLong_AsUnsignedLongLong(value);
30486 if (PyErr_Occurred() != NULL) {
30489 if (test_var > uint_max) {
30490 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
30491 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30494 object->unknown = test_var;
30495 } else if (PyInt_Check(value)) {
30497 test_var = PyInt_AsLong(value);
30498 if (test_var < 0 || test_var > uint_max) {
30499 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
30500 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30503 object->unknown = test_var;
30505 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
30506 PyInt_Type.tp_name, PyLong_Type.tp_name);
30513 static PyGetSetDef py_srvsvc_NetTransportInfo2_getsetters[] = {
30515 .name = discard_const_p(char, "vcs"),
30516 .get = py_srvsvc_NetTransportInfo2_get_vcs,
30517 .set = py_srvsvc_NetTransportInfo2_set_vcs,
30518 .doc = discard_const_p(char, "PIDL-generated element vcs")
30521 .name = discard_const_p(char, "name"),
30522 .get = py_srvsvc_NetTransportInfo2_get_name,
30523 .set = py_srvsvc_NetTransportInfo2_set_name,
30524 .doc = discard_const_p(char, "PIDL-generated element name")
30527 .name = discard_const_p(char, "addr"),
30528 .get = py_srvsvc_NetTransportInfo2_get_addr,
30529 .set = py_srvsvc_NetTransportInfo2_set_addr,
30530 .doc = discard_const_p(char, "PIDL-generated element addr")
30533 .name = discard_const_p(char, "addr_len"),
30534 .get = py_srvsvc_NetTransportInfo2_get_addr_len,
30535 .set = py_srvsvc_NetTransportInfo2_set_addr_len,
30536 .doc = discard_const_p(char, "PIDL-generated element addr_len")
30539 .name = discard_const_p(char, "net_addr"),
30540 .get = py_srvsvc_NetTransportInfo2_get_net_addr,
30541 .set = py_srvsvc_NetTransportInfo2_set_net_addr,
30542 .doc = discard_const_p(char, "PIDL-generated element net_addr")
30545 .name = discard_const_p(char, "domain"),
30546 .get = py_srvsvc_NetTransportInfo2_get_domain,
30547 .set = py_srvsvc_NetTransportInfo2_set_domain,
30548 .doc = discard_const_p(char, "PIDL-generated element domain")
30551 .name = discard_const_p(char, "unknown"),
30552 .get = py_srvsvc_NetTransportInfo2_get_unknown,
30553 .set = py_srvsvc_NetTransportInfo2_set_unknown,
30554 .doc = discard_const_p(char, "PIDL-generated element unknown")
30559 static PyObject *py_srvsvc_NetTransportInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
30561 return pytalloc_new(struct srvsvc_NetTransportInfo2, type);
30565 static PyTypeObject srvsvc_NetTransportInfo2_Type = {
30566 PyObject_HEAD_INIT(NULL) 0,
30567 .tp_name = "srvsvc.NetTransportInfo2",
30568 .tp_getset = py_srvsvc_NetTransportInfo2_getsetters,
30569 .tp_methods = NULL,
30570 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
30571 .tp_new = py_srvsvc_NetTransportInfo2_new,
30575 static PyObject *py_srvsvc_NetTransportCtr2_get_count(PyObject *obj, void *closure)
30577 struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(obj);
30578 PyObject *py_count;
30579 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
30583 static int py_srvsvc_NetTransportCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
30585 struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(py_obj);
30586 if (value == NULL) {
30587 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
30591 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
30592 if (PyLong_Check(value)) {
30593 unsigned long long test_var;
30594 test_var = PyLong_AsUnsignedLongLong(value);
30595 if (PyErr_Occurred() != NULL) {
30598 if (test_var > uint_max) {
30599 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
30600 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30603 object->count = test_var;
30604 } else if (PyInt_Check(value)) {
30606 test_var = PyInt_AsLong(value);
30607 if (test_var < 0 || test_var > uint_max) {
30608 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
30609 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30612 object->count = test_var;
30614 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
30615 PyInt_Type.tp_name, PyLong_Type.tp_name);
30622 static PyObject *py_srvsvc_NetTransportCtr2_get_array(PyObject *obj, void *closure)
30624 struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(obj);
30625 PyObject *py_array;
30626 if (object->array == NULL) {
30627 py_array = Py_None;
30628 Py_INCREF(py_array);
30630 py_array = PyList_New(object->count);
30631 if (py_array == NULL) {
30636 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
30637 PyObject *py_array_1;
30638 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo2_Type, object->array, &object->array[array_cntr_1]);
30639 PyList_SetItem(py_array, array_cntr_1, py_array_1);
30646 static int py_srvsvc_NetTransportCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
30648 struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(py_obj);
30649 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
30650 if (value == NULL) {
30651 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
30654 if (value == Py_None) {
30655 object->array = NULL;
30657 object->array = NULL;
30658 if (value == NULL) {
30659 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
30662 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
30665 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
30666 if (!object->array) { return -1;; }
30667 talloc_set_name_const(object->array, "ARRAY: object->array");
30668 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
30669 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
30670 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
30673 PY_CHECK_TYPE(&srvsvc_NetTransportInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
30674 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
30678 object->array[array_cntr_1] = *(struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
30685 static PyGetSetDef py_srvsvc_NetTransportCtr2_getsetters[] = {
30687 .name = discard_const_p(char, "count"),
30688 .get = py_srvsvc_NetTransportCtr2_get_count,
30689 .set = py_srvsvc_NetTransportCtr2_set_count,
30690 .doc = discard_const_p(char, "PIDL-generated element count")
30693 .name = discard_const_p(char, "array"),
30694 .get = py_srvsvc_NetTransportCtr2_get_array,
30695 .set = py_srvsvc_NetTransportCtr2_set_array,
30696 .doc = discard_const_p(char, "PIDL-generated element array")
30701 static PyObject *py_srvsvc_NetTransportCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
30703 return pytalloc_new(struct srvsvc_NetTransportCtr2, type);
30707 static PyTypeObject srvsvc_NetTransportCtr2_Type = {
30708 PyObject_HEAD_INIT(NULL) 0,
30709 .tp_name = "srvsvc.NetTransportCtr2",
30710 .tp_getset = py_srvsvc_NetTransportCtr2_getsetters,
30711 .tp_methods = NULL,
30712 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
30713 .tp_new = py_srvsvc_NetTransportCtr2_new,
30717 static PyObject *py_srvsvc_NetTransportInfo3_get_vcs(PyObject *obj, void *closure)
30719 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
30721 py_vcs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
30725 static int py_srvsvc_NetTransportInfo3_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
30727 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
30728 if (value == NULL) {
30729 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->vcs");
30733 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
30734 if (PyLong_Check(value)) {
30735 unsigned long long test_var;
30736 test_var = PyLong_AsUnsignedLongLong(value);
30737 if (PyErr_Occurred() != NULL) {
30740 if (test_var > uint_max) {
30741 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
30742 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30745 object->vcs = test_var;
30746 } else if (PyInt_Check(value)) {
30748 test_var = PyInt_AsLong(value);
30749 if (test_var < 0 || test_var > uint_max) {
30750 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
30751 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30754 object->vcs = test_var;
30756 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
30757 PyInt_Type.tp_name, PyLong_Type.tp_name);
30764 static PyObject *py_srvsvc_NetTransportInfo3_get_name(PyObject *obj, void *closure)
30766 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
30768 if (object->name == NULL) {
30770 Py_INCREF(py_name);
30772 if (object->name == NULL) {
30774 Py_INCREF(py_name);
30776 py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
30782 static int py_srvsvc_NetTransportInfo3_set_name(PyObject *py_obj, PyObject *value, void *closure)
30784 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
30785 if (value == NULL) {
30786 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
30789 if (value == Py_None) {
30790 object->name = NULL;
30792 object->name = NULL;
30793 if (value == NULL) {
30794 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->name");
30798 const char *test_str;
30799 const char *talloc_str;
30800 PyObject *unicode = NULL;
30801 if (PyUnicode_Check(value)) {
30802 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30803 if (unicode == NULL) {
30807 test_str = PyString_AS_STRING(unicode);
30808 } else if (PyString_Check(value)) {
30809 test_str = PyString_AS_STRING(value);
30811 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30814 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30815 if (unicode != NULL) {
30816 Py_DECREF(unicode);
30818 if (talloc_str == NULL) {
30822 object->name = talloc_str;
30828 static PyObject *py_srvsvc_NetTransportInfo3_get_addr(PyObject *obj, void *closure)
30830 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
30832 if (object->addr == NULL) {
30834 Py_INCREF(py_addr);
30836 py_addr = PyList_New(object->addr_len);
30837 if (py_addr == NULL) {
30842 for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
30843 PyObject *py_addr_1;
30844 py_addr_1 = PyInt_FromLong((uint16_t)object->addr[addr_cntr_1]);
30845 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
30852 static int py_srvsvc_NetTransportInfo3_set_addr(PyObject *py_obj, PyObject *value, void *closure)
30854 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
30855 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
30856 if (value == NULL) {
30857 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr");
30860 if (value == Py_None) {
30861 object->addr = NULL;
30863 object->addr = NULL;
30864 if (value == NULL) {
30865 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->addr");
30868 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
30871 object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
30872 if (!object->addr) { return -1;; }
30873 talloc_set_name_const(object->addr, "ARRAY: object->addr");
30874 for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
30875 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
30876 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr[addr_cntr_1]");
30880 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
30881 if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
30882 unsigned long long test_var;
30883 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
30884 if (PyErr_Occurred() != NULL) {
30887 if (test_var > uint_max) {
30888 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
30889 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30892 object->addr[addr_cntr_1] = test_var;
30893 } else if (PyInt_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
30895 test_var = PyInt_AsLong(PyList_GET_ITEM(value, addr_cntr_1));
30896 if (test_var < 0 || test_var > uint_max) {
30897 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
30898 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30901 object->addr[addr_cntr_1] = test_var;
30903 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
30904 PyInt_Type.tp_name, PyLong_Type.tp_name);
30914 static PyObject *py_srvsvc_NetTransportInfo3_get_addr_len(PyObject *obj, void *closure)
30916 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
30917 PyObject *py_addr_len;
30918 py_addr_len = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
30919 return py_addr_len;
30922 static int py_srvsvc_NetTransportInfo3_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
30924 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
30925 if (value == NULL) {
30926 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_len");
30930 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
30931 if (PyLong_Check(value)) {
30932 unsigned long long test_var;
30933 test_var = PyLong_AsUnsignedLongLong(value);
30934 if (PyErr_Occurred() != NULL) {
30937 if (test_var > uint_max) {
30938 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
30939 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30942 object->addr_len = test_var;
30943 } else if (PyInt_Check(value)) {
30945 test_var = PyInt_AsLong(value);
30946 if (test_var < 0 || test_var > uint_max) {
30947 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
30948 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
30951 object->addr_len = test_var;
30953 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
30954 PyInt_Type.tp_name, PyLong_Type.tp_name);
30961 static PyObject *py_srvsvc_NetTransportInfo3_get_net_addr(PyObject *obj, void *closure)
30963 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
30964 PyObject *py_net_addr;
30965 if (object->net_addr == NULL) {
30966 py_net_addr = Py_None;
30967 Py_INCREF(py_net_addr);
30969 if (object->net_addr == NULL) {
30970 py_net_addr = Py_None;
30971 Py_INCREF(py_net_addr);
30973 py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
30976 return py_net_addr;
30979 static int py_srvsvc_NetTransportInfo3_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
30981 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
30982 if (value == NULL) {
30983 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->net_addr");
30986 if (value == Py_None) {
30987 object->net_addr = NULL;
30989 object->net_addr = NULL;
30990 if (value == NULL) {
30991 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->net_addr");
30995 const char *test_str;
30996 const char *talloc_str;
30997 PyObject *unicode = NULL;
30998 if (PyUnicode_Check(value)) {
30999 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31000 if (unicode == NULL) {
31004 test_str = PyString_AS_STRING(unicode);
31005 } else if (PyString_Check(value)) {
31006 test_str = PyString_AS_STRING(value);
31008 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31011 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31012 if (unicode != NULL) {
31013 Py_DECREF(unicode);
31015 if (talloc_str == NULL) {
31019 object->net_addr = talloc_str;
31025 static PyObject *py_srvsvc_NetTransportInfo3_get_domain(PyObject *obj, void *closure)
31027 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
31028 PyObject *py_domain;
31029 if (object->domain == NULL) {
31030 py_domain = Py_None;
31031 Py_INCREF(py_domain);
31033 if (object->domain == NULL) {
31034 py_domain = Py_None;
31035 Py_INCREF(py_domain);
31037 py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
31043 static int py_srvsvc_NetTransportInfo3_set_domain(PyObject *py_obj, PyObject *value, void *closure)
31045 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
31046 if (value == NULL) {
31047 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
31050 if (value == Py_None) {
31051 object->domain = NULL;
31053 object->domain = NULL;
31054 if (value == NULL) {
31055 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->domain");
31059 const char *test_str;
31060 const char *talloc_str;
31061 PyObject *unicode = NULL;
31062 if (PyUnicode_Check(value)) {
31063 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31064 if (unicode == NULL) {
31068 test_str = PyString_AS_STRING(unicode);
31069 } else if (PyString_Check(value)) {
31070 test_str = PyString_AS_STRING(value);
31072 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31075 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31076 if (unicode != NULL) {
31077 Py_DECREF(unicode);
31079 if (talloc_str == NULL) {
31083 object->domain = talloc_str;
31089 static PyObject *py_srvsvc_NetTransportInfo3_get_unknown1(PyObject *obj, void *closure)
31091 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
31092 PyObject *py_unknown1;
31093 py_unknown1 = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->unknown1);
31094 return py_unknown1;
31097 static int py_srvsvc_NetTransportInfo3_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
31099 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
31100 if (value == NULL) {
31101 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
31105 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
31106 if (PyLong_Check(value)) {
31107 unsigned long long test_var;
31108 test_var = PyLong_AsUnsignedLongLong(value);
31109 if (PyErr_Occurred() != NULL) {
31112 if (test_var > uint_max) {
31113 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31114 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31117 object->unknown1 = test_var;
31118 } else if (PyInt_Check(value)) {
31120 test_var = PyInt_AsLong(value);
31121 if (test_var < 0 || test_var > uint_max) {
31122 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31123 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31126 object->unknown1 = test_var;
31128 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
31129 PyInt_Type.tp_name, PyLong_Type.tp_name);
31136 static PyObject *py_srvsvc_NetTransportInfo3_get_unknown2(PyObject *obj, void *closure)
31138 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
31139 PyObject *py_unknown2;
31140 py_unknown2 = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->unknown2);
31141 return py_unknown2;
31144 static int py_srvsvc_NetTransportInfo3_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
31146 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
31147 if (value == NULL) {
31148 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
31152 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
31153 if (PyLong_Check(value)) {
31154 unsigned long long test_var;
31155 test_var = PyLong_AsUnsignedLongLong(value);
31156 if (PyErr_Occurred() != NULL) {
31159 if (test_var > uint_max) {
31160 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31161 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31164 object->unknown2 = test_var;
31165 } else if (PyInt_Check(value)) {
31167 test_var = PyInt_AsLong(value);
31168 if (test_var < 0 || test_var > uint_max) {
31169 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31170 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31173 object->unknown2 = test_var;
31175 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
31176 PyInt_Type.tp_name, PyLong_Type.tp_name);
31183 static PyObject *py_srvsvc_NetTransportInfo3_get_unknown3(PyObject *obj, void *closure)
31185 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
31186 PyObject *py_unknown3;
31187 py_unknown3 = PyList_New(256);
31188 if (py_unknown3 == NULL) {
31192 int unknown3_cntr_0;
31193 for (unknown3_cntr_0 = 0; unknown3_cntr_0 < (256); unknown3_cntr_0++) {
31194 PyObject *py_unknown3_0;
31195 py_unknown3_0 = PyInt_FromLong((uint16_t)object->unknown3[unknown3_cntr_0]);
31196 PyList_SetItem(py_unknown3, unknown3_cntr_0, py_unknown3_0);
31199 return py_unknown3;
31202 static int py_srvsvc_NetTransportInfo3_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
31204 struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
31205 if (value == NULL) {
31206 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
31209 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
31211 int unknown3_cntr_0;
31212 if (ARRAY_SIZE(object->unknown3) != PyList_GET_SIZE(value)) {
31213 PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->unknown3), PyList_GET_SIZE(value));
31216 for (unknown3_cntr_0 = 0; unknown3_cntr_0 < PyList_GET_SIZE(value); unknown3_cntr_0++) {
31217 if (PyList_GET_ITEM(value, unknown3_cntr_0) == NULL) {
31218 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3[unknown3_cntr_0]");
31222 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3[unknown3_cntr_0]));
31223 if (PyLong_Check(PyList_GET_ITEM(value, unknown3_cntr_0))) {
31224 unsigned long long test_var;
31225 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, unknown3_cntr_0));
31226 if (PyErr_Occurred() != NULL) {
31229 if (test_var > uint_max) {
31230 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31231 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31234 object->unknown3[unknown3_cntr_0] = test_var;
31235 } else if (PyInt_Check(PyList_GET_ITEM(value, unknown3_cntr_0))) {
31237 test_var = PyInt_AsLong(PyList_GET_ITEM(value, unknown3_cntr_0));
31238 if (test_var < 0 || test_var > uint_max) {
31239 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31240 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31243 object->unknown3[unknown3_cntr_0] = test_var;
31245 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
31246 PyInt_Type.tp_name, PyLong_Type.tp_name);
31255 static PyGetSetDef py_srvsvc_NetTransportInfo3_getsetters[] = {
31257 .name = discard_const_p(char, "vcs"),
31258 .get = py_srvsvc_NetTransportInfo3_get_vcs,
31259 .set = py_srvsvc_NetTransportInfo3_set_vcs,
31260 .doc = discard_const_p(char, "PIDL-generated element vcs")
31263 .name = discard_const_p(char, "name"),
31264 .get = py_srvsvc_NetTransportInfo3_get_name,
31265 .set = py_srvsvc_NetTransportInfo3_set_name,
31266 .doc = discard_const_p(char, "PIDL-generated element name")
31269 .name = discard_const_p(char, "addr"),
31270 .get = py_srvsvc_NetTransportInfo3_get_addr,
31271 .set = py_srvsvc_NetTransportInfo3_set_addr,
31272 .doc = discard_const_p(char, "PIDL-generated element addr")
31275 .name = discard_const_p(char, "addr_len"),
31276 .get = py_srvsvc_NetTransportInfo3_get_addr_len,
31277 .set = py_srvsvc_NetTransportInfo3_set_addr_len,
31278 .doc = discard_const_p(char, "PIDL-generated element addr_len")
31281 .name = discard_const_p(char, "net_addr"),
31282 .get = py_srvsvc_NetTransportInfo3_get_net_addr,
31283 .set = py_srvsvc_NetTransportInfo3_set_net_addr,
31284 .doc = discard_const_p(char, "PIDL-generated element net_addr")
31287 .name = discard_const_p(char, "domain"),
31288 .get = py_srvsvc_NetTransportInfo3_get_domain,
31289 .set = py_srvsvc_NetTransportInfo3_set_domain,
31290 .doc = discard_const_p(char, "PIDL-generated element domain")
31293 .name = discard_const_p(char, "unknown1"),
31294 .get = py_srvsvc_NetTransportInfo3_get_unknown1,
31295 .set = py_srvsvc_NetTransportInfo3_set_unknown1,
31296 .doc = discard_const_p(char, "PIDL-generated element unknown1")
31299 .name = discard_const_p(char, "unknown2"),
31300 .get = py_srvsvc_NetTransportInfo3_get_unknown2,
31301 .set = py_srvsvc_NetTransportInfo3_set_unknown2,
31302 .doc = discard_const_p(char, "PIDL-generated element unknown2")
31305 .name = discard_const_p(char, "unknown3"),
31306 .get = py_srvsvc_NetTransportInfo3_get_unknown3,
31307 .set = py_srvsvc_NetTransportInfo3_set_unknown3,
31308 .doc = discard_const_p(char, "PIDL-generated element unknown3")
31313 static PyObject *py_srvsvc_NetTransportInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
31315 return pytalloc_new(struct srvsvc_NetTransportInfo3, type);
31319 static PyTypeObject srvsvc_NetTransportInfo3_Type = {
31320 PyObject_HEAD_INIT(NULL) 0,
31321 .tp_name = "srvsvc.NetTransportInfo3",
31322 .tp_getset = py_srvsvc_NetTransportInfo3_getsetters,
31323 .tp_methods = NULL,
31324 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
31325 .tp_new = py_srvsvc_NetTransportInfo3_new,
31329 static PyObject *py_srvsvc_NetTransportCtr3_get_count(PyObject *obj, void *closure)
31331 struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(obj);
31332 PyObject *py_count;
31333 py_count = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->count);
31337 static int py_srvsvc_NetTransportCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
31339 struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(py_obj);
31340 if (value == NULL) {
31341 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
31345 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
31346 if (PyLong_Check(value)) {
31347 unsigned long long test_var;
31348 test_var = PyLong_AsUnsignedLongLong(value);
31349 if (PyErr_Occurred() != NULL) {
31352 if (test_var > uint_max) {
31353 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31354 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31357 object->count = test_var;
31358 } else if (PyInt_Check(value)) {
31360 test_var = PyInt_AsLong(value);
31361 if (test_var < 0 || test_var > uint_max) {
31362 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31363 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31366 object->count = test_var;
31368 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
31369 PyInt_Type.tp_name, PyLong_Type.tp_name);
31376 static PyObject *py_srvsvc_NetTransportCtr3_get_array(PyObject *obj, void *closure)
31378 struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(obj);
31379 PyObject *py_array;
31380 if (object->array == NULL) {
31381 py_array = Py_None;
31382 Py_INCREF(py_array);
31384 py_array = PyList_New(object->count);
31385 if (py_array == NULL) {
31390 for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
31391 PyObject *py_array_1;
31392 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo3_Type, object->array, &object->array[array_cntr_1]);
31393 PyList_SetItem(py_array, array_cntr_1, py_array_1);
31400 static int py_srvsvc_NetTransportCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
31402 struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(py_obj);
31403 talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
31404 if (value == NULL) {
31405 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
31408 if (value == Py_None) {
31409 object->array = NULL;
31411 object->array = NULL;
31412 if (value == NULL) {
31413 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *object->array");
31416 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
31419 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
31420 if (!object->array) { return -1;; }
31421 talloc_set_name_const(object->array, "ARRAY: object->array");
31422 for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
31423 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
31424 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
31427 PY_CHECK_TYPE(&srvsvc_NetTransportInfo3_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
31428 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
31432 object->array[array_cntr_1] = *(struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
31439 static PyGetSetDef py_srvsvc_NetTransportCtr3_getsetters[] = {
31441 .name = discard_const_p(char, "count"),
31442 .get = py_srvsvc_NetTransportCtr3_get_count,
31443 .set = py_srvsvc_NetTransportCtr3_set_count,
31444 .doc = discard_const_p(char, "PIDL-generated element count")
31447 .name = discard_const_p(char, "array"),
31448 .get = py_srvsvc_NetTransportCtr3_get_array,
31449 .set = py_srvsvc_NetTransportCtr3_set_array,
31450 .doc = discard_const_p(char, "PIDL-generated element array")
31455 static PyObject *py_srvsvc_NetTransportCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
31457 return pytalloc_new(struct srvsvc_NetTransportCtr3, type);
31461 static PyTypeObject srvsvc_NetTransportCtr3_Type = {
31462 PyObject_HEAD_INIT(NULL) 0,
31463 .tp_name = "srvsvc.NetTransportCtr3",
31464 .tp_getset = py_srvsvc_NetTransportCtr3_getsetters,
31465 .tp_methods = NULL,
31466 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
31467 .tp_new = py_srvsvc_NetTransportCtr3_new,
31470 PyObject *py_import_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportCtr *in)
31476 if (in->ctr0 == NULL) {
31480 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr0_Type, in->ctr0, in->ctr0);
31485 if (in->ctr1 == NULL) {
31489 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr1_Type, in->ctr1, in->ctr1);
31494 if (in->ctr2 == NULL) {
31498 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr2_Type, in->ctr2, in->ctr2);
31503 if (in->ctr3 == NULL) {
31507 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr3_Type, in->ctr3, in->ctr3);
31517 PyErr_SetString(PyExc_TypeError, "unknown union level");
31521 union srvsvc_NetTransportCtr *py_export_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
31523 union srvsvc_NetTransportCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetTransportCtr);
31527 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
31528 talloc_free(ret); return NULL;
31530 if (in == Py_None) {
31535 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr0");
31536 talloc_free(ret); return NULL;
31538 PY_CHECK_TYPE(&srvsvc_NetTransportCtr0_Type, in, talloc_free(ret); return NULL;);
31539 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
31541 talloc_free(ret); return NULL;
31543 ret->ctr0 = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(in);
31549 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
31550 talloc_free(ret); return NULL;
31552 if (in == Py_None) {
31557 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr1");
31558 talloc_free(ret); return NULL;
31560 PY_CHECK_TYPE(&srvsvc_NetTransportCtr1_Type, in, talloc_free(ret); return NULL;);
31561 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
31563 talloc_free(ret); return NULL;
31565 ret->ctr1 = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(in);
31571 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
31572 talloc_free(ret); return NULL;
31574 if (in == Py_None) {
31579 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr2");
31580 talloc_free(ret); return NULL;
31582 PY_CHECK_TYPE(&srvsvc_NetTransportCtr2_Type, in, talloc_free(ret); return NULL;);
31583 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
31585 talloc_free(ret); return NULL;
31587 ret->ctr2 = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(in);
31593 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr3");
31594 talloc_free(ret); return NULL;
31596 if (in == Py_None) {
31601 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *ret->ctr3");
31602 talloc_free(ret); return NULL;
31604 PY_CHECK_TYPE(&srvsvc_NetTransportCtr3_Type, in, talloc_free(ret); return NULL;);
31605 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
31607 talloc_free(ret); return NULL;
31609 ret->ctr3 = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(in);
31622 static PyObject *py_srvsvc_NetTransportInfoCtr_get_level(PyObject *obj, void *closure)
31624 struct srvsvc_NetTransportInfoCtr *object = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(obj);
31625 PyObject *py_level;
31626 py_level = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->level);
31630 static int py_srvsvc_NetTransportInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
31632 struct srvsvc_NetTransportInfoCtr *object = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(py_obj);
31633 if (value == NULL) {
31634 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
31638 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
31639 if (PyLong_Check(value)) {
31640 unsigned long long test_var;
31641 test_var = PyLong_AsUnsignedLongLong(value);
31642 if (PyErr_Occurred() != NULL) {
31645 if (test_var > uint_max) {
31646 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31647 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31650 object->level = test_var;
31651 } else if (PyInt_Check(value)) {
31653 test_var = PyInt_AsLong(value);
31654 if (test_var < 0 || test_var > uint_max) {
31655 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31656 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31659 object->level = test_var;
31661 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
31662 PyInt_Type.tp_name, PyLong_Type.tp_name);
31669 static PyObject *py_srvsvc_NetTransportInfoCtr_get_ctr(PyObject *obj, void *closure)
31671 struct srvsvc_NetTransportInfoCtr *object = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(obj);
31673 py_ctr = py_import_srvsvc_NetTransportCtr(pytalloc_get_mem_ctx(obj), object->level, &object->ctr);
31674 if (py_ctr == NULL) {
31680 static int py_srvsvc_NetTransportInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
31682 struct srvsvc_NetTransportInfoCtr *object = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(py_obj);
31683 if (value == NULL) {
31684 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
31688 union srvsvc_NetTransportCtr *ctr_switch_0;
31689 ctr_switch_0 = py_export_srvsvc_NetTransportCtr(pytalloc_get_mem_ctx(py_obj), object->level, value);
31690 if (ctr_switch_0 == NULL) {
31693 object->ctr = *ctr_switch_0;
31698 static PyGetSetDef py_srvsvc_NetTransportInfoCtr_getsetters[] = {
31700 .name = discard_const_p(char, "level"),
31701 .get = py_srvsvc_NetTransportInfoCtr_get_level,
31702 .set = py_srvsvc_NetTransportInfoCtr_set_level,
31703 .doc = discard_const_p(char, "PIDL-generated element level")
31706 .name = discard_const_p(char, "ctr"),
31707 .get = py_srvsvc_NetTransportInfoCtr_get_ctr,
31708 .set = py_srvsvc_NetTransportInfoCtr_set_ctr,
31709 .doc = discard_const_p(char, "PIDL-generated element ctr")
31714 static PyObject *py_srvsvc_NetTransportInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
31716 return pytalloc_new(struct srvsvc_NetTransportInfoCtr, type);
31720 static PyTypeObject srvsvc_NetTransportInfoCtr_Type = {
31721 PyObject_HEAD_INIT(NULL) 0,
31722 .tp_name = "srvsvc.NetTransportInfoCtr",
31723 .tp_getset = py_srvsvc_NetTransportInfoCtr_getsetters,
31724 .tp_methods = NULL,
31725 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
31726 .tp_new = py_srvsvc_NetTransportInfoCtr_new,
31730 static PyObject *py_srvsvc_NetRemoteTODInfo_get_elapsed(PyObject *obj, void *closure)
31732 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
31733 PyObject *py_elapsed;
31734 py_elapsed = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->elapsed);
31738 static int py_srvsvc_NetRemoteTODInfo_set_elapsed(PyObject *py_obj, PyObject *value, void *closure)
31740 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
31741 if (value == NULL) {
31742 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->elapsed");
31746 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->elapsed));
31747 if (PyLong_Check(value)) {
31748 unsigned long long test_var;
31749 test_var = PyLong_AsUnsignedLongLong(value);
31750 if (PyErr_Occurred() != NULL) {
31753 if (test_var > uint_max) {
31754 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31755 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31758 object->elapsed = test_var;
31759 } else if (PyInt_Check(value)) {
31761 test_var = PyInt_AsLong(value);
31762 if (test_var < 0 || test_var > uint_max) {
31763 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31764 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31767 object->elapsed = test_var;
31769 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
31770 PyInt_Type.tp_name, PyLong_Type.tp_name);
31777 static PyObject *py_srvsvc_NetRemoteTODInfo_get_msecs(PyObject *obj, void *closure)
31779 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
31780 PyObject *py_msecs;
31781 py_msecs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->msecs);
31785 static int py_srvsvc_NetRemoteTODInfo_set_msecs(PyObject *py_obj, PyObject *value, void *closure)
31787 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
31788 if (value == NULL) {
31789 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->msecs");
31793 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->msecs));
31794 if (PyLong_Check(value)) {
31795 unsigned long long test_var;
31796 test_var = PyLong_AsUnsignedLongLong(value);
31797 if (PyErr_Occurred() != NULL) {
31800 if (test_var > uint_max) {
31801 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31802 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31805 object->msecs = test_var;
31806 } else if (PyInt_Check(value)) {
31808 test_var = PyInt_AsLong(value);
31809 if (test_var < 0 || test_var > uint_max) {
31810 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31811 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31814 object->msecs = test_var;
31816 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
31817 PyInt_Type.tp_name, PyLong_Type.tp_name);
31824 static PyObject *py_srvsvc_NetRemoteTODInfo_get_hours(PyObject *obj, void *closure)
31826 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
31827 PyObject *py_hours;
31828 py_hours = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->hours);
31832 static int py_srvsvc_NetRemoteTODInfo_set_hours(PyObject *py_obj, PyObject *value, void *closure)
31834 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
31835 if (value == NULL) {
31836 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hours");
31840 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hours));
31841 if (PyLong_Check(value)) {
31842 unsigned long long test_var;
31843 test_var = PyLong_AsUnsignedLongLong(value);
31844 if (PyErr_Occurred() != NULL) {
31847 if (test_var > uint_max) {
31848 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31849 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31852 object->hours = test_var;
31853 } else if (PyInt_Check(value)) {
31855 test_var = PyInt_AsLong(value);
31856 if (test_var < 0 || test_var > uint_max) {
31857 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31858 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31861 object->hours = test_var;
31863 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
31864 PyInt_Type.tp_name, PyLong_Type.tp_name);
31871 static PyObject *py_srvsvc_NetRemoteTODInfo_get_mins(PyObject *obj, void *closure)
31873 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
31875 py_mins = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->mins);
31879 static int py_srvsvc_NetRemoteTODInfo_set_mins(PyObject *py_obj, PyObject *value, void *closure)
31881 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
31882 if (value == NULL) {
31883 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mins");
31887 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->mins));
31888 if (PyLong_Check(value)) {
31889 unsigned long long test_var;
31890 test_var = PyLong_AsUnsignedLongLong(value);
31891 if (PyErr_Occurred() != NULL) {
31894 if (test_var > uint_max) {
31895 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31896 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31899 object->mins = test_var;
31900 } else if (PyInt_Check(value)) {
31902 test_var = PyInt_AsLong(value);
31903 if (test_var < 0 || test_var > uint_max) {
31904 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31905 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31908 object->mins = test_var;
31910 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
31911 PyInt_Type.tp_name, PyLong_Type.tp_name);
31918 static PyObject *py_srvsvc_NetRemoteTODInfo_get_secs(PyObject *obj, void *closure)
31920 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
31922 py_secs = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->secs);
31926 static int py_srvsvc_NetRemoteTODInfo_set_secs(PyObject *py_obj, PyObject *value, void *closure)
31928 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
31929 if (value == NULL) {
31930 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->secs");
31934 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->secs));
31935 if (PyLong_Check(value)) {
31936 unsigned long long test_var;
31937 test_var = PyLong_AsUnsignedLongLong(value);
31938 if (PyErr_Occurred() != NULL) {
31941 if (test_var > uint_max) {
31942 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31943 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31946 object->secs = test_var;
31947 } else if (PyInt_Check(value)) {
31949 test_var = PyInt_AsLong(value);
31950 if (test_var < 0 || test_var > uint_max) {
31951 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31952 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31955 object->secs = test_var;
31957 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
31958 PyInt_Type.tp_name, PyLong_Type.tp_name);
31965 static PyObject *py_srvsvc_NetRemoteTODInfo_get_hunds(PyObject *obj, void *closure)
31967 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
31968 PyObject *py_hunds;
31969 py_hunds = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->hunds);
31973 static int py_srvsvc_NetRemoteTODInfo_set_hunds(PyObject *py_obj, PyObject *value, void *closure)
31975 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
31976 if (value == NULL) {
31977 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hunds");
31981 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hunds));
31982 if (PyLong_Check(value)) {
31983 unsigned long long test_var;
31984 test_var = PyLong_AsUnsignedLongLong(value);
31985 if (PyErr_Occurred() != NULL) {
31988 if (test_var > uint_max) {
31989 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
31990 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
31993 object->hunds = test_var;
31994 } else if (PyInt_Check(value)) {
31996 test_var = PyInt_AsLong(value);
31997 if (test_var < 0 || test_var > uint_max) {
31998 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
31999 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32002 object->hunds = test_var;
32004 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32005 PyInt_Type.tp_name, PyLong_Type.tp_name);
32012 static PyObject *py_srvsvc_NetRemoteTODInfo_get_timezone(PyObject *obj, void *closure)
32014 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
32015 PyObject *py_timezone;
32016 py_timezone = PyInt_FromLong(object->timezone);
32017 return py_timezone;
32020 static int py_srvsvc_NetRemoteTODInfo_set_timezone(PyObject *py_obj, PyObject *value, void *closure)
32022 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
32023 if (value == NULL) {
32024 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timezone");
32028 const long long int_max = ndr_sizeof2intmax(sizeof(object->timezone));
32029 const long long int_min = -int_max - 1;
32030 if (PyLong_Check(value)) {
32031 long long test_var;
32032 test_var = PyLong_AsLongLong(value);
32033 if (PyErr_Occurred() != NULL) {
32036 if (test_var < int_min || test_var > int_max) {
32037 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range %lld - %lld, got %lld",\
32038 PyInt_Type.tp_name, PyLong_Type.tp_name, int_min, int_max, test_var);
32041 object->timezone = test_var;
32042 } else if (PyInt_Check(value)) {
32044 test_var = PyInt_AsLong(value);
32045 if (test_var < int_min || test_var > int_max) {
32046 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range %lld - %lld, got %ld",\
32047 PyInt_Type.tp_name, PyLong_Type.tp_name, int_min, int_max, test_var);
32050 object->timezone = test_var;
32052 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32053 PyInt_Type.tp_name, PyLong_Type.tp_name);
32060 static PyObject *py_srvsvc_NetRemoteTODInfo_get_tinterval(PyObject *obj, void *closure)
32062 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
32063 PyObject *py_tinterval;
32064 py_tinterval = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->tinterval);
32065 return py_tinterval;
32068 static int py_srvsvc_NetRemoteTODInfo_set_tinterval(PyObject *py_obj, PyObject *value, void *closure)
32070 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
32071 if (value == NULL) {
32072 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->tinterval");
32076 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->tinterval));
32077 if (PyLong_Check(value)) {
32078 unsigned long long test_var;
32079 test_var = PyLong_AsUnsignedLongLong(value);
32080 if (PyErr_Occurred() != NULL) {
32083 if (test_var > uint_max) {
32084 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
32085 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32088 object->tinterval = test_var;
32089 } else if (PyInt_Check(value)) {
32091 test_var = PyInt_AsLong(value);
32092 if (test_var < 0 || test_var > uint_max) {
32093 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
32094 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32097 object->tinterval = test_var;
32099 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32100 PyInt_Type.tp_name, PyLong_Type.tp_name);
32107 static PyObject *py_srvsvc_NetRemoteTODInfo_get_day(PyObject *obj, void *closure)
32109 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
32111 py_day = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->day);
32115 static int py_srvsvc_NetRemoteTODInfo_set_day(PyObject *py_obj, PyObject *value, void *closure)
32117 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
32118 if (value == NULL) {
32119 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->day");
32123 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->day));
32124 if (PyLong_Check(value)) {
32125 unsigned long long test_var;
32126 test_var = PyLong_AsUnsignedLongLong(value);
32127 if (PyErr_Occurred() != NULL) {
32130 if (test_var > uint_max) {
32131 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
32132 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32135 object->day = test_var;
32136 } else if (PyInt_Check(value)) {
32138 test_var = PyInt_AsLong(value);
32139 if (test_var < 0 || test_var > uint_max) {
32140 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
32141 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32144 object->day = test_var;
32146 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32147 PyInt_Type.tp_name, PyLong_Type.tp_name);
32154 static PyObject *py_srvsvc_NetRemoteTODInfo_get_month(PyObject *obj, void *closure)
32156 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
32157 PyObject *py_month;
32158 py_month = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->month);
32162 static int py_srvsvc_NetRemoteTODInfo_set_month(PyObject *py_obj, PyObject *value, void *closure)
32164 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
32165 if (value == NULL) {
32166 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->month");
32170 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->month));
32171 if (PyLong_Check(value)) {
32172 unsigned long long test_var;
32173 test_var = PyLong_AsUnsignedLongLong(value);
32174 if (PyErr_Occurred() != NULL) {
32177 if (test_var > uint_max) {
32178 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
32179 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32182 object->month = test_var;
32183 } else if (PyInt_Check(value)) {
32185 test_var = PyInt_AsLong(value);
32186 if (test_var < 0 || test_var > uint_max) {
32187 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
32188 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32191 object->month = test_var;
32193 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32194 PyInt_Type.tp_name, PyLong_Type.tp_name);
32201 static PyObject *py_srvsvc_NetRemoteTODInfo_get_year(PyObject *obj, void *closure)
32203 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
32205 py_year = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->year);
32209 static int py_srvsvc_NetRemoteTODInfo_set_year(PyObject *py_obj, PyObject *value, void *closure)
32211 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
32212 if (value == NULL) {
32213 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->year");
32217 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->year));
32218 if (PyLong_Check(value)) {
32219 unsigned long long test_var;
32220 test_var = PyLong_AsUnsignedLongLong(value);
32221 if (PyErr_Occurred() != NULL) {
32224 if (test_var > uint_max) {
32225 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
32226 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32229 object->year = test_var;
32230 } else if (PyInt_Check(value)) {
32232 test_var = PyInt_AsLong(value);
32233 if (test_var < 0 || test_var > uint_max) {
32234 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
32235 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32238 object->year = test_var;
32240 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32241 PyInt_Type.tp_name, PyLong_Type.tp_name);
32248 static PyObject *py_srvsvc_NetRemoteTODInfo_get_weekday(PyObject *obj, void *closure)
32250 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
32251 PyObject *py_weekday;
32252 py_weekday = ndr_PyLong_FromUnsignedLongLong((uint32_t)object->weekday);
32256 static int py_srvsvc_NetRemoteTODInfo_set_weekday(PyObject *py_obj, PyObject *value, void *closure)
32258 struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
32259 if (value == NULL) {
32260 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->weekday");
32264 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->weekday));
32265 if (PyLong_Check(value)) {
32266 unsigned long long test_var;
32267 test_var = PyLong_AsUnsignedLongLong(value);
32268 if (PyErr_Occurred() != NULL) {
32271 if (test_var > uint_max) {
32272 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
32273 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32276 object->weekday = test_var;
32277 } else if (PyInt_Check(value)) {
32279 test_var = PyInt_AsLong(value);
32280 if (test_var < 0 || test_var > uint_max) {
32281 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
32282 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32285 object->weekday = test_var;
32287 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32288 PyInt_Type.tp_name, PyLong_Type.tp_name);
32295 static PyGetSetDef py_srvsvc_NetRemoteTODInfo_getsetters[] = {
32297 .name = discard_const_p(char, "elapsed"),
32298 .get = py_srvsvc_NetRemoteTODInfo_get_elapsed,
32299 .set = py_srvsvc_NetRemoteTODInfo_set_elapsed,
32300 .doc = discard_const_p(char, "PIDL-generated element elapsed")
32303 .name = discard_const_p(char, "msecs"),
32304 .get = py_srvsvc_NetRemoteTODInfo_get_msecs,
32305 .set = py_srvsvc_NetRemoteTODInfo_set_msecs,
32306 .doc = discard_const_p(char, "PIDL-generated element msecs")
32309 .name = discard_const_p(char, "hours"),
32310 .get = py_srvsvc_NetRemoteTODInfo_get_hours,
32311 .set = py_srvsvc_NetRemoteTODInfo_set_hours,
32312 .doc = discard_const_p(char, "PIDL-generated element hours")
32315 .name = discard_const_p(char, "mins"),
32316 .get = py_srvsvc_NetRemoteTODInfo_get_mins,
32317 .set = py_srvsvc_NetRemoteTODInfo_set_mins,
32318 .doc = discard_const_p(char, "PIDL-generated element mins")
32321 .name = discard_const_p(char, "secs"),
32322 .get = py_srvsvc_NetRemoteTODInfo_get_secs,
32323 .set = py_srvsvc_NetRemoteTODInfo_set_secs,
32324 .doc = discard_const_p(char, "PIDL-generated element secs")
32327 .name = discard_const_p(char, "hunds"),
32328 .get = py_srvsvc_NetRemoteTODInfo_get_hunds,
32329 .set = py_srvsvc_NetRemoteTODInfo_set_hunds,
32330 .doc = discard_const_p(char, "PIDL-generated element hunds")
32333 .name = discard_const_p(char, "timezone"),
32334 .get = py_srvsvc_NetRemoteTODInfo_get_timezone,
32335 .set = py_srvsvc_NetRemoteTODInfo_set_timezone,
32336 .doc = discard_const_p(char, "PIDL-generated element timezone")
32339 .name = discard_const_p(char, "tinterval"),
32340 .get = py_srvsvc_NetRemoteTODInfo_get_tinterval,
32341 .set = py_srvsvc_NetRemoteTODInfo_set_tinterval,
32342 .doc = discard_const_p(char, "PIDL-generated element tinterval")
32345 .name = discard_const_p(char, "day"),
32346 .get = py_srvsvc_NetRemoteTODInfo_get_day,
32347 .set = py_srvsvc_NetRemoteTODInfo_set_day,
32348 .doc = discard_const_p(char, "PIDL-generated element day")
32351 .name = discard_const_p(char, "month"),
32352 .get = py_srvsvc_NetRemoteTODInfo_get_month,
32353 .set = py_srvsvc_NetRemoteTODInfo_set_month,
32354 .doc = discard_const_p(char, "PIDL-generated element month")
32357 .name = discard_const_p(char, "year"),
32358 .get = py_srvsvc_NetRemoteTODInfo_get_year,
32359 .set = py_srvsvc_NetRemoteTODInfo_set_year,
32360 .doc = discard_const_p(char, "PIDL-generated element year")
32363 .name = discard_const_p(char, "weekday"),
32364 .get = py_srvsvc_NetRemoteTODInfo_get_weekday,
32365 .set = py_srvsvc_NetRemoteTODInfo_set_weekday,
32366 .doc = discard_const_p(char, "PIDL-generated element weekday")
32371 static PyObject *py_srvsvc_NetRemoteTODInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32373 return pytalloc_new(struct srvsvc_NetRemoteTODInfo, type);
32377 static PyTypeObject srvsvc_NetRemoteTODInfo_Type = {
32378 PyObject_HEAD_INIT(NULL) 0,
32379 .tp_name = "srvsvc.NetRemoteTODInfo",
32380 .tp_getset = py_srvsvc_NetRemoteTODInfo_getsetters,
32381 .tp_methods = NULL,
32382 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
32383 .tp_new = py_srvsvc_NetRemoteTODInfo_new,
32386 PyObject *py_import_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportInfo *in)
32392 ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo0_Type, mem_ctx, &in->info0);
32396 ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo1_Type, mem_ctx, &in->info1);
32400 ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo2_Type, mem_ctx, &in->info2);
32404 ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo3_Type, mem_ctx, &in->info3);
32408 PyErr_SetString(PyExc_TypeError, "unknown union level");
32412 union srvsvc_NetTransportInfo *py_export_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
32414 union srvsvc_NetTransportInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetTransportInfo);
32418 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info0");
32419 talloc_free(ret); return NULL;
32421 PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, in, talloc_free(ret); return NULL;);
32422 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32424 talloc_free(ret); return NULL;
32426 ret->info0 = *(struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(in);
32431 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
32432 talloc_free(ret); return NULL;
32434 PY_CHECK_TYPE(&srvsvc_NetTransportInfo1_Type, in, talloc_free(ret); return NULL;);
32435 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32437 talloc_free(ret); return NULL;
32439 ret->info1 = *(struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(in);
32444 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info2");
32445 talloc_free(ret); return NULL;
32447 PY_CHECK_TYPE(&srvsvc_NetTransportInfo2_Type, in, talloc_free(ret); return NULL;);
32448 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32450 talloc_free(ret); return NULL;
32452 ret->info2 = *(struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(in);
32457 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info3");
32458 talloc_free(ret); return NULL;
32460 PY_CHECK_TYPE(&srvsvc_NetTransportInfo3_Type, in, talloc_free(ret); return NULL;);
32461 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32463 talloc_free(ret); return NULL;
32465 ret->info3 = *(struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(in);
32469 PyErr_SetString(PyExc_TypeError, "invalid union level value");
32478 static bool pack_py_srvsvc_NetCharDevEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevEnum *r)
32480 PyObject *py_server_unc;
32481 PyObject *py_info_ctr;
32482 PyObject *py_max_buffer;
32483 PyObject *py_resume_handle;
32484 const char *kwnames[] = {
32485 "server_unc", "info_ctr", "max_buffer", "resume_handle", NULL
32488 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetCharDevEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
32492 if (py_server_unc == NULL) {
32493 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
32496 if (py_server_unc == Py_None) {
32497 r->in.server_unc = NULL;
32499 r->in.server_unc = NULL;
32500 if (py_server_unc == NULL) {
32501 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
32505 const char *test_str;
32506 const char *talloc_str;
32507 PyObject *unicode = NULL;
32508 if (PyUnicode_Check(py_server_unc)) {
32509 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
32510 if (unicode == NULL) {
32514 test_str = PyString_AS_STRING(unicode);
32515 } else if (PyString_Check(py_server_unc)) {
32516 test_str = PyString_AS_STRING(py_server_unc);
32518 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
32521 talloc_str = talloc_strdup(r, test_str);
32522 if (unicode != NULL) {
32523 Py_DECREF(unicode);
32525 if (talloc_str == NULL) {
32529 r->in.server_unc = talloc_str;
32532 if (py_info_ctr == NULL) {
32533 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
32536 r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
32537 if (py_info_ctr == NULL) {
32538 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info_ctr");
32541 PY_CHECK_TYPE(&srvsvc_NetCharDevInfoCtr_Type, py_info_ctr, return false;);
32542 if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
32546 r->in.info_ctr = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(py_info_ctr);
32547 if (py_max_buffer == NULL) {
32548 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
32552 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
32553 if (PyLong_Check(py_max_buffer)) {
32554 unsigned long long test_var;
32555 test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
32556 if (PyErr_Occurred() != NULL) {
32559 if (test_var > uint_max) {
32560 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
32561 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32564 r->in.max_buffer = test_var;
32565 } else if (PyInt_Check(py_max_buffer)) {
32567 test_var = PyInt_AsLong(py_max_buffer);
32568 if (test_var < 0 || test_var > uint_max) {
32569 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
32570 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32573 r->in.max_buffer = test_var;
32575 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32576 PyInt_Type.tp_name, PyLong_Type.tp_name);
32580 if (py_resume_handle == NULL) {
32581 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
32584 if (py_resume_handle == Py_None) {
32585 r->in.resume_handle = NULL;
32587 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
32588 if (py_resume_handle == NULL) {
32589 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.resume_handle");
32593 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
32594 if (PyLong_Check(py_resume_handle)) {
32595 unsigned long long test_var;
32596 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
32597 if (PyErr_Occurred() != NULL) {
32600 if (test_var > uint_max) {
32601 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
32602 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32605 *r->in.resume_handle = test_var;
32606 } else if (PyInt_Check(py_resume_handle)) {
32608 test_var = PyInt_AsLong(py_resume_handle);
32609 if (test_var < 0 || test_var > uint_max) {
32610 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
32611 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32614 *r->in.resume_handle = test_var;
32616 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32617 PyInt_Type.tp_name, PyLong_Type.tp_name);
32625 static PyObject *unpack_py_srvsvc_NetCharDevEnum_args_out(struct srvsvc_NetCharDevEnum *r)
32628 PyObject *py_info_ctr;
32629 PyObject *py_totalentries;
32630 PyObject *py_resume_handle;
32631 result = PyTuple_New(3);
32632 py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
32633 PyTuple_SetItem(result, 0, py_info_ctr);
32634 py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
32635 PyTuple_SetItem(result, 1, py_totalentries);
32636 if (r->out.resume_handle == NULL) {
32637 py_resume_handle = Py_None;
32638 Py_INCREF(py_resume_handle);
32640 py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
32642 PyTuple_SetItem(result, 2, py_resume_handle);
32643 if (!W_ERROR_IS_OK(r->out.result)) {
32644 PyErr_SetWERROR(r->out.result);
32651 static bool pack_py_srvsvc_NetCharDevGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevGetInfo *r)
32653 PyObject *py_server_unc;
32654 PyObject *py_device_name;
32655 PyObject *py_level;
32656 const char *kwnames[] = {
32657 "server_unc", "device_name", "level", NULL
32660 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetCharDevGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_device_name, &py_level)) {
32664 if (py_server_unc == NULL) {
32665 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
32668 if (py_server_unc == Py_None) {
32669 r->in.server_unc = NULL;
32671 r->in.server_unc = NULL;
32672 if (py_server_unc == NULL) {
32673 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
32677 const char *test_str;
32678 const char *talloc_str;
32679 PyObject *unicode = NULL;
32680 if (PyUnicode_Check(py_server_unc)) {
32681 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
32682 if (unicode == NULL) {
32686 test_str = PyString_AS_STRING(unicode);
32687 } else if (PyString_Check(py_server_unc)) {
32688 test_str = PyString_AS_STRING(py_server_unc);
32690 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
32693 talloc_str = talloc_strdup(r, test_str);
32694 if (unicode != NULL) {
32695 Py_DECREF(unicode);
32697 if (talloc_str == NULL) {
32701 r->in.server_unc = talloc_str;
32704 if (py_device_name == NULL) {
32705 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.device_name");
32709 const char *test_str;
32710 const char *talloc_str;
32711 PyObject *unicode = NULL;
32712 if (PyUnicode_Check(py_device_name)) {
32713 unicode = PyUnicode_AsEncodedString(py_device_name, "utf-8", "ignore");
32714 if (unicode == NULL) {
32718 test_str = PyString_AS_STRING(unicode);
32719 } else if (PyString_Check(py_device_name)) {
32720 test_str = PyString_AS_STRING(py_device_name);
32722 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
32725 talloc_str = talloc_strdup(r, test_str);
32726 if (unicode != NULL) {
32727 Py_DECREF(unicode);
32729 if (talloc_str == NULL) {
32733 r->in.device_name = talloc_str;
32735 if (py_level == NULL) {
32736 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
32740 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
32741 if (PyLong_Check(py_level)) {
32742 unsigned long long test_var;
32743 test_var = PyLong_AsUnsignedLongLong(py_level);
32744 if (PyErr_Occurred() != NULL) {
32747 if (test_var > uint_max) {
32748 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
32749 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32752 r->in.level = test_var;
32753 } else if (PyInt_Check(py_level)) {
32755 test_var = PyInt_AsLong(py_level);
32756 if (test_var < 0 || test_var > uint_max) {
32757 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
32758 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32761 r->in.level = test_var;
32763 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32764 PyInt_Type.tp_name, PyLong_Type.tp_name);
32771 static PyObject *unpack_py_srvsvc_NetCharDevGetInfo_args_out(struct srvsvc_NetCharDevGetInfo *r)
32775 py_info = py_import_srvsvc_NetCharDevInfo(r->out.info, r->in.level, r->out.info);
32776 if (py_info == NULL) {
32780 if (!W_ERROR_IS_OK(r->out.result)) {
32781 PyErr_SetWERROR(r->out.result);
32788 static bool pack_py_srvsvc_NetCharDevControl_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevControl *r)
32790 PyObject *py_server_unc;
32791 PyObject *py_device_name;
32792 PyObject *py_opcode;
32793 const char *kwnames[] = {
32794 "server_unc", "device_name", "opcode", NULL
32797 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetCharDevControl", discard_const_p(char *, kwnames), &py_server_unc, &py_device_name, &py_opcode)) {
32801 if (py_server_unc == NULL) {
32802 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
32805 if (py_server_unc == Py_None) {
32806 r->in.server_unc = NULL;
32808 r->in.server_unc = NULL;
32809 if (py_server_unc == NULL) {
32810 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
32814 const char *test_str;
32815 const char *talloc_str;
32816 PyObject *unicode = NULL;
32817 if (PyUnicode_Check(py_server_unc)) {
32818 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
32819 if (unicode == NULL) {
32823 test_str = PyString_AS_STRING(unicode);
32824 } else if (PyString_Check(py_server_unc)) {
32825 test_str = PyString_AS_STRING(py_server_unc);
32827 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
32830 talloc_str = talloc_strdup(r, test_str);
32831 if (unicode != NULL) {
32832 Py_DECREF(unicode);
32834 if (talloc_str == NULL) {
32838 r->in.server_unc = talloc_str;
32841 if (py_device_name == NULL) {
32842 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.device_name");
32846 const char *test_str;
32847 const char *talloc_str;
32848 PyObject *unicode = NULL;
32849 if (PyUnicode_Check(py_device_name)) {
32850 unicode = PyUnicode_AsEncodedString(py_device_name, "utf-8", "ignore");
32851 if (unicode == NULL) {
32855 test_str = PyString_AS_STRING(unicode);
32856 } else if (PyString_Check(py_device_name)) {
32857 test_str = PyString_AS_STRING(py_device_name);
32859 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
32862 talloc_str = talloc_strdup(r, test_str);
32863 if (unicode != NULL) {
32864 Py_DECREF(unicode);
32866 if (talloc_str == NULL) {
32870 r->in.device_name = talloc_str;
32872 if (py_opcode == NULL) {
32873 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.opcode");
32877 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.opcode));
32878 if (PyLong_Check(py_opcode)) {
32879 unsigned long long test_var;
32880 test_var = PyLong_AsUnsignedLongLong(py_opcode);
32881 if (PyErr_Occurred() != NULL) {
32884 if (test_var > uint_max) {
32885 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
32886 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32889 r->in.opcode = test_var;
32890 } else if (PyInt_Check(py_opcode)) {
32892 test_var = PyInt_AsLong(py_opcode);
32893 if (test_var < 0 || test_var > uint_max) {
32894 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
32895 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
32898 r->in.opcode = test_var;
32900 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
32901 PyInt_Type.tp_name, PyLong_Type.tp_name);
32908 static PyObject *unpack_py_srvsvc_NetCharDevControl_args_out(struct srvsvc_NetCharDevControl *r)
32913 if (!W_ERROR_IS_OK(r->out.result)) {
32914 PyErr_SetWERROR(r->out.result);
32921 static bool pack_py_srvsvc_NetCharDevQEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQEnum *r)
32923 PyObject *py_server_unc;
32925 PyObject *py_info_ctr;
32926 PyObject *py_max_buffer;
32927 PyObject *py_resume_handle;
32928 const char *kwnames[] = {
32929 "server_unc", "user", "info_ctr", "max_buffer", "resume_handle", NULL
32932 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetCharDevQEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_user, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
32936 if (py_server_unc == NULL) {
32937 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
32940 if (py_server_unc == Py_None) {
32941 r->in.server_unc = NULL;
32943 r->in.server_unc = NULL;
32944 if (py_server_unc == NULL) {
32945 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
32949 const char *test_str;
32950 const char *talloc_str;
32951 PyObject *unicode = NULL;
32952 if (PyUnicode_Check(py_server_unc)) {
32953 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
32954 if (unicode == NULL) {
32958 test_str = PyString_AS_STRING(unicode);
32959 } else if (PyString_Check(py_server_unc)) {
32960 test_str = PyString_AS_STRING(py_server_unc);
32962 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
32965 talloc_str = talloc_strdup(r, test_str);
32966 if (unicode != NULL) {
32967 Py_DECREF(unicode);
32969 if (talloc_str == NULL) {
32973 r->in.server_unc = talloc_str;
32976 if (py_user == NULL) {
32977 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
32980 if (py_user == Py_None) {
32984 if (py_user == NULL) {
32985 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.user");
32989 const char *test_str;
32990 const char *talloc_str;
32991 PyObject *unicode = NULL;
32992 if (PyUnicode_Check(py_user)) {
32993 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
32994 if (unicode == NULL) {
32998 test_str = PyString_AS_STRING(unicode);
32999 } else if (PyString_Check(py_user)) {
33000 test_str = PyString_AS_STRING(py_user);
33002 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
33005 talloc_str = talloc_strdup(r, test_str);
33006 if (unicode != NULL) {
33007 Py_DECREF(unicode);
33009 if (talloc_str == NULL) {
33013 r->in.user = talloc_str;
33016 if (py_info_ctr == NULL) {
33017 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
33020 r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
33021 if (py_info_ctr == NULL) {
33022 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info_ctr");
33025 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfoCtr_Type, py_info_ctr, return false;);
33026 if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
33030 r->in.info_ctr = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(py_info_ctr);
33031 if (py_max_buffer == NULL) {
33032 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
33036 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
33037 if (PyLong_Check(py_max_buffer)) {
33038 unsigned long long test_var;
33039 test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
33040 if (PyErr_Occurred() != NULL) {
33043 if (test_var > uint_max) {
33044 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
33045 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33048 r->in.max_buffer = test_var;
33049 } else if (PyInt_Check(py_max_buffer)) {
33051 test_var = PyInt_AsLong(py_max_buffer);
33052 if (test_var < 0 || test_var > uint_max) {
33053 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
33054 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33057 r->in.max_buffer = test_var;
33059 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
33060 PyInt_Type.tp_name, PyLong_Type.tp_name);
33064 if (py_resume_handle == NULL) {
33065 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
33068 if (py_resume_handle == Py_None) {
33069 r->in.resume_handle = NULL;
33071 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
33072 if (py_resume_handle == NULL) {
33073 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.resume_handle");
33077 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
33078 if (PyLong_Check(py_resume_handle)) {
33079 unsigned long long test_var;
33080 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
33081 if (PyErr_Occurred() != NULL) {
33084 if (test_var > uint_max) {
33085 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
33086 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33089 *r->in.resume_handle = test_var;
33090 } else if (PyInt_Check(py_resume_handle)) {
33092 test_var = PyInt_AsLong(py_resume_handle);
33093 if (test_var < 0 || test_var > uint_max) {
33094 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
33095 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33098 *r->in.resume_handle = test_var;
33100 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
33101 PyInt_Type.tp_name, PyLong_Type.tp_name);
33109 static PyObject *unpack_py_srvsvc_NetCharDevQEnum_args_out(struct srvsvc_NetCharDevQEnum *r)
33112 PyObject *py_info_ctr;
33113 PyObject *py_totalentries;
33114 PyObject *py_resume_handle;
33115 result = PyTuple_New(3);
33116 py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevQInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
33117 PyTuple_SetItem(result, 0, py_info_ctr);
33118 py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
33119 PyTuple_SetItem(result, 1, py_totalentries);
33120 if (r->out.resume_handle == NULL) {
33121 py_resume_handle = Py_None;
33122 Py_INCREF(py_resume_handle);
33124 py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
33126 PyTuple_SetItem(result, 2, py_resume_handle);
33127 if (!W_ERROR_IS_OK(r->out.result)) {
33128 PyErr_SetWERROR(r->out.result);
33135 static bool pack_py_srvsvc_NetCharDevQGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQGetInfo *r)
33137 PyObject *py_server_unc;
33138 PyObject *py_queue_name;
33140 PyObject *py_level;
33141 const char *kwnames[] = {
33142 "server_unc", "queue_name", "user", "level", NULL
33145 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetCharDevQGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name, &py_user, &py_level)) {
33149 if (py_server_unc == NULL) {
33150 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
33153 if (py_server_unc == Py_None) {
33154 r->in.server_unc = NULL;
33156 r->in.server_unc = NULL;
33157 if (py_server_unc == NULL) {
33158 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
33162 const char *test_str;
33163 const char *talloc_str;
33164 PyObject *unicode = NULL;
33165 if (PyUnicode_Check(py_server_unc)) {
33166 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
33167 if (unicode == NULL) {
33171 test_str = PyString_AS_STRING(unicode);
33172 } else if (PyString_Check(py_server_unc)) {
33173 test_str = PyString_AS_STRING(py_server_unc);
33175 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
33178 talloc_str = talloc_strdup(r, test_str);
33179 if (unicode != NULL) {
33180 Py_DECREF(unicode);
33182 if (talloc_str == NULL) {
33186 r->in.server_unc = talloc_str;
33189 if (py_queue_name == NULL) {
33190 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.queue_name");
33194 const char *test_str;
33195 const char *talloc_str;
33196 PyObject *unicode = NULL;
33197 if (PyUnicode_Check(py_queue_name)) {
33198 unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
33199 if (unicode == NULL) {
33203 test_str = PyString_AS_STRING(unicode);
33204 } else if (PyString_Check(py_queue_name)) {
33205 test_str = PyString_AS_STRING(py_queue_name);
33207 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
33210 talloc_str = talloc_strdup(r, test_str);
33211 if (unicode != NULL) {
33212 Py_DECREF(unicode);
33214 if (talloc_str == NULL) {
33218 r->in.queue_name = talloc_str;
33220 if (py_user == NULL) {
33221 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
33225 const char *test_str;
33226 const char *talloc_str;
33227 PyObject *unicode = NULL;
33228 if (PyUnicode_Check(py_user)) {
33229 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
33230 if (unicode == NULL) {
33234 test_str = PyString_AS_STRING(unicode);
33235 } else if (PyString_Check(py_user)) {
33236 test_str = PyString_AS_STRING(py_user);
33238 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
33241 talloc_str = talloc_strdup(r, test_str);
33242 if (unicode != NULL) {
33243 Py_DECREF(unicode);
33245 if (talloc_str == NULL) {
33249 r->in.user = talloc_str;
33251 if (py_level == NULL) {
33252 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
33256 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
33257 if (PyLong_Check(py_level)) {
33258 unsigned long long test_var;
33259 test_var = PyLong_AsUnsignedLongLong(py_level);
33260 if (PyErr_Occurred() != NULL) {
33263 if (test_var > uint_max) {
33264 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
33265 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33268 r->in.level = test_var;
33269 } else if (PyInt_Check(py_level)) {
33271 test_var = PyInt_AsLong(py_level);
33272 if (test_var < 0 || test_var > uint_max) {
33273 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
33274 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33277 r->in.level = test_var;
33279 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
33280 PyInt_Type.tp_name, PyLong_Type.tp_name);
33287 static PyObject *unpack_py_srvsvc_NetCharDevQGetInfo_args_out(struct srvsvc_NetCharDevQGetInfo *r)
33291 py_info = py_import_srvsvc_NetCharDevQInfo(r->out.info, r->in.level, r->out.info);
33292 if (py_info == NULL) {
33296 if (!W_ERROR_IS_OK(r->out.result)) {
33297 PyErr_SetWERROR(r->out.result);
33304 static bool pack_py_srvsvc_NetCharDevQSetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQSetInfo *r)
33306 PyObject *py_server_unc;
33307 PyObject *py_queue_name;
33308 PyObject *py_level;
33310 PyObject *py_parm_error;
33311 const char *kwnames[] = {
33312 "server_unc", "queue_name", "level", "info", "parm_error", NULL
33315 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetCharDevQSetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name, &py_level, &py_info, &py_parm_error)) {
33319 if (py_server_unc == NULL) {
33320 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
33323 if (py_server_unc == Py_None) {
33324 r->in.server_unc = NULL;
33326 r->in.server_unc = NULL;
33327 if (py_server_unc == NULL) {
33328 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
33332 const char *test_str;
33333 const char *talloc_str;
33334 PyObject *unicode = NULL;
33335 if (PyUnicode_Check(py_server_unc)) {
33336 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
33337 if (unicode == NULL) {
33341 test_str = PyString_AS_STRING(unicode);
33342 } else if (PyString_Check(py_server_unc)) {
33343 test_str = PyString_AS_STRING(py_server_unc);
33345 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
33348 talloc_str = talloc_strdup(r, test_str);
33349 if (unicode != NULL) {
33350 Py_DECREF(unicode);
33352 if (talloc_str == NULL) {
33356 r->in.server_unc = talloc_str;
33359 if (py_queue_name == NULL) {
33360 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.queue_name");
33364 const char *test_str;
33365 const char *talloc_str;
33366 PyObject *unicode = NULL;
33367 if (PyUnicode_Check(py_queue_name)) {
33368 unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
33369 if (unicode == NULL) {
33373 test_str = PyString_AS_STRING(unicode);
33374 } else if (PyString_Check(py_queue_name)) {
33375 test_str = PyString_AS_STRING(py_queue_name);
33377 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
33380 talloc_str = talloc_strdup(r, test_str);
33381 if (unicode != NULL) {
33382 Py_DECREF(unicode);
33384 if (talloc_str == NULL) {
33388 r->in.queue_name = talloc_str;
33390 if (py_level == NULL) {
33391 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
33395 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
33396 if (PyLong_Check(py_level)) {
33397 unsigned long long test_var;
33398 test_var = PyLong_AsUnsignedLongLong(py_level);
33399 if (PyErr_Occurred() != NULL) {
33402 if (test_var > uint_max) {
33403 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
33404 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33407 r->in.level = test_var;
33408 } else if (PyInt_Check(py_level)) {
33410 test_var = PyInt_AsLong(py_level);
33411 if (test_var < 0 || test_var > uint_max) {
33412 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
33413 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33416 r->in.level = test_var;
33418 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
33419 PyInt_Type.tp_name, PyLong_Type.tp_name);
33423 if (py_info == NULL) {
33424 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
33428 union srvsvc_NetCharDevQInfo *info_switch_0;
33429 info_switch_0 = py_export_srvsvc_NetCharDevQInfo(r, r->in.level, py_info);
33430 if (info_switch_0 == NULL) {
33433 r->in.info = *info_switch_0;
33435 if (py_parm_error == NULL) {
33436 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.parm_error");
33439 if (py_parm_error == Py_None) {
33440 r->in.parm_error = NULL;
33442 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
33443 if (py_parm_error == NULL) {
33444 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.parm_error");
33448 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
33449 if (PyLong_Check(py_parm_error)) {
33450 unsigned long long test_var;
33451 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
33452 if (PyErr_Occurred() != NULL) {
33455 if (test_var > uint_max) {
33456 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
33457 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33460 *r->in.parm_error = test_var;
33461 } else if (PyInt_Check(py_parm_error)) {
33463 test_var = PyInt_AsLong(py_parm_error);
33464 if (test_var < 0 || test_var > uint_max) {
33465 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
33466 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33469 *r->in.parm_error = test_var;
33471 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
33472 PyInt_Type.tp_name, PyLong_Type.tp_name);
33480 static PyObject *unpack_py_srvsvc_NetCharDevQSetInfo_args_out(struct srvsvc_NetCharDevQSetInfo *r)
33483 PyObject *py_parm_error;
33484 if (r->out.parm_error == NULL) {
33485 py_parm_error = Py_None;
33486 Py_INCREF(py_parm_error);
33488 py_parm_error = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
33490 result = py_parm_error;
33491 if (!W_ERROR_IS_OK(r->out.result)) {
33492 PyErr_SetWERROR(r->out.result);
33499 static bool pack_py_srvsvc_NetCharDevQPurge_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQPurge *r)
33501 PyObject *py_server_unc;
33502 PyObject *py_queue_name;
33503 const char *kwnames[] = {
33504 "server_unc", "queue_name", NULL
33507 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetCharDevQPurge", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name)) {
33511 if (py_server_unc == NULL) {
33512 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
33515 if (py_server_unc == Py_None) {
33516 r->in.server_unc = NULL;
33518 r->in.server_unc = NULL;
33519 if (py_server_unc == NULL) {
33520 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
33524 const char *test_str;
33525 const char *talloc_str;
33526 PyObject *unicode = NULL;
33527 if (PyUnicode_Check(py_server_unc)) {
33528 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
33529 if (unicode == NULL) {
33533 test_str = PyString_AS_STRING(unicode);
33534 } else if (PyString_Check(py_server_unc)) {
33535 test_str = PyString_AS_STRING(py_server_unc);
33537 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
33540 talloc_str = talloc_strdup(r, test_str);
33541 if (unicode != NULL) {
33542 Py_DECREF(unicode);
33544 if (talloc_str == NULL) {
33548 r->in.server_unc = talloc_str;
33551 if (py_queue_name == NULL) {
33552 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.queue_name");
33556 const char *test_str;
33557 const char *talloc_str;
33558 PyObject *unicode = NULL;
33559 if (PyUnicode_Check(py_queue_name)) {
33560 unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
33561 if (unicode == NULL) {
33565 test_str = PyString_AS_STRING(unicode);
33566 } else if (PyString_Check(py_queue_name)) {
33567 test_str = PyString_AS_STRING(py_queue_name);
33569 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
33572 talloc_str = talloc_strdup(r, test_str);
33573 if (unicode != NULL) {
33574 Py_DECREF(unicode);
33576 if (talloc_str == NULL) {
33580 r->in.queue_name = talloc_str;
33585 static PyObject *unpack_py_srvsvc_NetCharDevQPurge_args_out(struct srvsvc_NetCharDevQPurge *r)
33590 if (!W_ERROR_IS_OK(r->out.result)) {
33591 PyErr_SetWERROR(r->out.result);
33598 static bool pack_py_srvsvc_NetCharDevQPurgeSelf_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQPurgeSelf *r)
33600 PyObject *py_server_unc;
33601 PyObject *py_queue_name;
33602 PyObject *py_computer_name;
33603 const char *kwnames[] = {
33604 "server_unc", "queue_name", "computer_name", NULL
33607 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetCharDevQPurgeSelf", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name, &py_computer_name)) {
33611 if (py_server_unc == NULL) {
33612 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
33615 if (py_server_unc == Py_None) {
33616 r->in.server_unc = NULL;
33618 r->in.server_unc = NULL;
33619 if (py_server_unc == NULL) {
33620 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
33624 const char *test_str;
33625 const char *talloc_str;
33626 PyObject *unicode = NULL;
33627 if (PyUnicode_Check(py_server_unc)) {
33628 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
33629 if (unicode == NULL) {
33633 test_str = PyString_AS_STRING(unicode);
33634 } else if (PyString_Check(py_server_unc)) {
33635 test_str = PyString_AS_STRING(py_server_unc);
33637 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
33640 talloc_str = talloc_strdup(r, test_str);
33641 if (unicode != NULL) {
33642 Py_DECREF(unicode);
33644 if (talloc_str == NULL) {
33648 r->in.server_unc = talloc_str;
33651 if (py_queue_name == NULL) {
33652 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.queue_name");
33656 const char *test_str;
33657 const char *talloc_str;
33658 PyObject *unicode = NULL;
33659 if (PyUnicode_Check(py_queue_name)) {
33660 unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
33661 if (unicode == NULL) {
33665 test_str = PyString_AS_STRING(unicode);
33666 } else if (PyString_Check(py_queue_name)) {
33667 test_str = PyString_AS_STRING(py_queue_name);
33669 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
33672 talloc_str = talloc_strdup(r, test_str);
33673 if (unicode != NULL) {
33674 Py_DECREF(unicode);
33676 if (talloc_str == NULL) {
33680 r->in.queue_name = talloc_str;
33682 if (py_computer_name == NULL) {
33683 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
33687 const char *test_str;
33688 const char *talloc_str;
33689 PyObject *unicode = NULL;
33690 if (PyUnicode_Check(py_computer_name)) {
33691 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
33692 if (unicode == NULL) {
33696 test_str = PyString_AS_STRING(unicode);
33697 } else if (PyString_Check(py_computer_name)) {
33698 test_str = PyString_AS_STRING(py_computer_name);
33700 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
33703 talloc_str = talloc_strdup(r, test_str);
33704 if (unicode != NULL) {
33705 Py_DECREF(unicode);
33707 if (talloc_str == NULL) {
33711 r->in.computer_name = talloc_str;
33716 static PyObject *unpack_py_srvsvc_NetCharDevQPurgeSelf_args_out(struct srvsvc_NetCharDevQPurgeSelf *r)
33721 if (!W_ERROR_IS_OK(r->out.result)) {
33722 PyErr_SetWERROR(r->out.result);
33729 static bool pack_py_srvsvc_NetConnEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetConnEnum *r)
33731 PyObject *py_server_unc;
33733 PyObject *py_info_ctr;
33734 PyObject *py_max_buffer;
33735 PyObject *py_resume_handle;
33736 const char *kwnames[] = {
33737 "server_unc", "path", "info_ctr", "max_buffer", "resume_handle", NULL
33740 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetConnEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_path, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
33744 if (py_server_unc == NULL) {
33745 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
33748 if (py_server_unc == Py_None) {
33749 r->in.server_unc = NULL;
33751 r->in.server_unc = NULL;
33752 if (py_server_unc == NULL) {
33753 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
33757 const char *test_str;
33758 const char *talloc_str;
33759 PyObject *unicode = NULL;
33760 if (PyUnicode_Check(py_server_unc)) {
33761 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
33762 if (unicode == NULL) {
33766 test_str = PyString_AS_STRING(unicode);
33767 } else if (PyString_Check(py_server_unc)) {
33768 test_str = PyString_AS_STRING(py_server_unc);
33770 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
33773 talloc_str = talloc_strdup(r, test_str);
33774 if (unicode != NULL) {
33775 Py_DECREF(unicode);
33777 if (talloc_str == NULL) {
33781 r->in.server_unc = talloc_str;
33784 if (py_path == NULL) {
33785 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path");
33788 if (py_path == Py_None) {
33792 if (py_path == NULL) {
33793 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.path");
33797 const char *test_str;
33798 const char *talloc_str;
33799 PyObject *unicode = NULL;
33800 if (PyUnicode_Check(py_path)) {
33801 unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
33802 if (unicode == NULL) {
33806 test_str = PyString_AS_STRING(unicode);
33807 } else if (PyString_Check(py_path)) {
33808 test_str = PyString_AS_STRING(py_path);
33810 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
33813 talloc_str = talloc_strdup(r, test_str);
33814 if (unicode != NULL) {
33815 Py_DECREF(unicode);
33817 if (talloc_str == NULL) {
33821 r->in.path = talloc_str;
33824 if (py_info_ctr == NULL) {
33825 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
33828 r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
33829 if (py_info_ctr == NULL) {
33830 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info_ctr");
33833 PY_CHECK_TYPE(&srvsvc_NetConnInfoCtr_Type, py_info_ctr, return false;);
33834 if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
33838 r->in.info_ctr = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(py_info_ctr);
33839 if (py_max_buffer == NULL) {
33840 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
33844 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
33845 if (PyLong_Check(py_max_buffer)) {
33846 unsigned long long test_var;
33847 test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
33848 if (PyErr_Occurred() != NULL) {
33851 if (test_var > uint_max) {
33852 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
33853 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33856 r->in.max_buffer = test_var;
33857 } else if (PyInt_Check(py_max_buffer)) {
33859 test_var = PyInt_AsLong(py_max_buffer);
33860 if (test_var < 0 || test_var > uint_max) {
33861 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
33862 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33865 r->in.max_buffer = test_var;
33867 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
33868 PyInt_Type.tp_name, PyLong_Type.tp_name);
33872 if (py_resume_handle == NULL) {
33873 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
33876 if (py_resume_handle == Py_None) {
33877 r->in.resume_handle = NULL;
33879 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
33880 if (py_resume_handle == NULL) {
33881 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.resume_handle");
33885 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
33886 if (PyLong_Check(py_resume_handle)) {
33887 unsigned long long test_var;
33888 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
33889 if (PyErr_Occurred() != NULL) {
33892 if (test_var > uint_max) {
33893 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
33894 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33897 *r->in.resume_handle = test_var;
33898 } else if (PyInt_Check(py_resume_handle)) {
33900 test_var = PyInt_AsLong(py_resume_handle);
33901 if (test_var < 0 || test_var > uint_max) {
33902 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
33903 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
33906 *r->in.resume_handle = test_var;
33908 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
33909 PyInt_Type.tp_name, PyLong_Type.tp_name);
33917 static PyObject *unpack_py_srvsvc_NetConnEnum_args_out(struct srvsvc_NetConnEnum *r)
33920 PyObject *py_info_ctr;
33921 PyObject *py_totalentries;
33922 PyObject *py_resume_handle;
33923 result = PyTuple_New(3);
33924 py_info_ctr = pytalloc_reference_ex(&srvsvc_NetConnInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
33925 PyTuple_SetItem(result, 0, py_info_ctr);
33926 py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
33927 PyTuple_SetItem(result, 1, py_totalentries);
33928 if (r->out.resume_handle == NULL) {
33929 py_resume_handle = Py_None;
33930 Py_INCREF(py_resume_handle);
33932 py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
33934 PyTuple_SetItem(result, 2, py_resume_handle);
33935 if (!W_ERROR_IS_OK(r->out.result)) {
33936 PyErr_SetWERROR(r->out.result);
33943 static bool pack_py_srvsvc_NetFileEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetFileEnum *r)
33945 PyObject *py_server_unc;
33948 PyObject *py_info_ctr;
33949 PyObject *py_max_buffer;
33950 PyObject *py_resume_handle;
33951 const char *kwnames[] = {
33952 "server_unc", "path", "user", "info_ctr", "max_buffer", "resume_handle", NULL
33955 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:srvsvc_NetFileEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_path, &py_user, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
33959 if (py_server_unc == NULL) {
33960 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
33963 if (py_server_unc == Py_None) {
33964 r->in.server_unc = NULL;
33966 r->in.server_unc = NULL;
33967 if (py_server_unc == NULL) {
33968 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
33972 const char *test_str;
33973 const char *talloc_str;
33974 PyObject *unicode = NULL;
33975 if (PyUnicode_Check(py_server_unc)) {
33976 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
33977 if (unicode == NULL) {
33981 test_str = PyString_AS_STRING(unicode);
33982 } else if (PyString_Check(py_server_unc)) {
33983 test_str = PyString_AS_STRING(py_server_unc);
33985 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
33988 talloc_str = talloc_strdup(r, test_str);
33989 if (unicode != NULL) {
33990 Py_DECREF(unicode);
33992 if (talloc_str == NULL) {
33996 r->in.server_unc = talloc_str;
33999 if (py_path == NULL) {
34000 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path");
34003 if (py_path == Py_None) {
34007 if (py_path == NULL) {
34008 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.path");
34012 const char *test_str;
34013 const char *talloc_str;
34014 PyObject *unicode = NULL;
34015 if (PyUnicode_Check(py_path)) {
34016 unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
34017 if (unicode == NULL) {
34021 test_str = PyString_AS_STRING(unicode);
34022 } else if (PyString_Check(py_path)) {
34023 test_str = PyString_AS_STRING(py_path);
34025 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
34028 talloc_str = talloc_strdup(r, test_str);
34029 if (unicode != NULL) {
34030 Py_DECREF(unicode);
34032 if (talloc_str == NULL) {
34036 r->in.path = talloc_str;
34039 if (py_user == NULL) {
34040 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
34043 if (py_user == Py_None) {
34047 if (py_user == NULL) {
34048 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.user");
34052 const char *test_str;
34053 const char *talloc_str;
34054 PyObject *unicode = NULL;
34055 if (PyUnicode_Check(py_user)) {
34056 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
34057 if (unicode == NULL) {
34061 test_str = PyString_AS_STRING(unicode);
34062 } else if (PyString_Check(py_user)) {
34063 test_str = PyString_AS_STRING(py_user);
34065 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
34068 talloc_str = talloc_strdup(r, test_str);
34069 if (unicode != NULL) {
34070 Py_DECREF(unicode);
34072 if (talloc_str == NULL) {
34076 r->in.user = talloc_str;
34079 if (py_info_ctr == NULL) {
34080 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
34083 r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
34084 if (py_info_ctr == NULL) {
34085 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info_ctr");
34088 PY_CHECK_TYPE(&srvsvc_NetFileInfoCtr_Type, py_info_ctr, return false;);
34089 if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
34093 r->in.info_ctr = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(py_info_ctr);
34094 if (py_max_buffer == NULL) {
34095 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
34099 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
34100 if (PyLong_Check(py_max_buffer)) {
34101 unsigned long long test_var;
34102 test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
34103 if (PyErr_Occurred() != NULL) {
34106 if (test_var > uint_max) {
34107 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
34108 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34111 r->in.max_buffer = test_var;
34112 } else if (PyInt_Check(py_max_buffer)) {
34114 test_var = PyInt_AsLong(py_max_buffer);
34115 if (test_var < 0 || test_var > uint_max) {
34116 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
34117 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34120 r->in.max_buffer = test_var;
34122 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
34123 PyInt_Type.tp_name, PyLong_Type.tp_name);
34127 if (py_resume_handle == NULL) {
34128 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
34131 if (py_resume_handle == Py_None) {
34132 r->in.resume_handle = NULL;
34134 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
34135 if (py_resume_handle == NULL) {
34136 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.resume_handle");
34140 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
34141 if (PyLong_Check(py_resume_handle)) {
34142 unsigned long long test_var;
34143 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
34144 if (PyErr_Occurred() != NULL) {
34147 if (test_var > uint_max) {
34148 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
34149 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34152 *r->in.resume_handle = test_var;
34153 } else if (PyInt_Check(py_resume_handle)) {
34155 test_var = PyInt_AsLong(py_resume_handle);
34156 if (test_var < 0 || test_var > uint_max) {
34157 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
34158 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34161 *r->in.resume_handle = test_var;
34163 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
34164 PyInt_Type.tp_name, PyLong_Type.tp_name);
34172 static PyObject *unpack_py_srvsvc_NetFileEnum_args_out(struct srvsvc_NetFileEnum *r)
34175 PyObject *py_info_ctr;
34176 PyObject *py_totalentries;
34177 PyObject *py_resume_handle;
34178 result = PyTuple_New(3);
34179 py_info_ctr = pytalloc_reference_ex(&srvsvc_NetFileInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
34180 PyTuple_SetItem(result, 0, py_info_ctr);
34181 py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
34182 PyTuple_SetItem(result, 1, py_totalentries);
34183 if (r->out.resume_handle == NULL) {
34184 py_resume_handle = Py_None;
34185 Py_INCREF(py_resume_handle);
34187 py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
34189 PyTuple_SetItem(result, 2, py_resume_handle);
34190 if (!W_ERROR_IS_OK(r->out.result)) {
34191 PyErr_SetWERROR(r->out.result);
34198 static bool pack_py_srvsvc_NetFileGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetFileGetInfo *r)
34200 PyObject *py_server_unc;
34202 PyObject *py_level;
34203 const char *kwnames[] = {
34204 "server_unc", "fid", "level", NULL
34207 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetFileGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_fid, &py_level)) {
34211 if (py_server_unc == NULL) {
34212 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
34215 if (py_server_unc == Py_None) {
34216 r->in.server_unc = NULL;
34218 r->in.server_unc = NULL;
34219 if (py_server_unc == NULL) {
34220 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
34224 const char *test_str;
34225 const char *talloc_str;
34226 PyObject *unicode = NULL;
34227 if (PyUnicode_Check(py_server_unc)) {
34228 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
34229 if (unicode == NULL) {
34233 test_str = PyString_AS_STRING(unicode);
34234 } else if (PyString_Check(py_server_unc)) {
34235 test_str = PyString_AS_STRING(py_server_unc);
34237 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
34240 talloc_str = talloc_strdup(r, test_str);
34241 if (unicode != NULL) {
34242 Py_DECREF(unicode);
34244 if (talloc_str == NULL) {
34248 r->in.server_unc = talloc_str;
34251 if (py_fid == NULL) {
34252 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.fid");
34256 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fid));
34257 if (PyLong_Check(py_fid)) {
34258 unsigned long long test_var;
34259 test_var = PyLong_AsUnsignedLongLong(py_fid);
34260 if (PyErr_Occurred() != NULL) {
34263 if (test_var > uint_max) {
34264 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
34265 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34268 r->in.fid = test_var;
34269 } else if (PyInt_Check(py_fid)) {
34271 test_var = PyInt_AsLong(py_fid);
34272 if (test_var < 0 || test_var > uint_max) {
34273 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
34274 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34277 r->in.fid = test_var;
34279 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
34280 PyInt_Type.tp_name, PyLong_Type.tp_name);
34284 if (py_level == NULL) {
34285 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
34289 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
34290 if (PyLong_Check(py_level)) {
34291 unsigned long long test_var;
34292 test_var = PyLong_AsUnsignedLongLong(py_level);
34293 if (PyErr_Occurred() != NULL) {
34296 if (test_var > uint_max) {
34297 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
34298 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34301 r->in.level = test_var;
34302 } else if (PyInt_Check(py_level)) {
34304 test_var = PyInt_AsLong(py_level);
34305 if (test_var < 0 || test_var > uint_max) {
34306 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
34307 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34310 r->in.level = test_var;
34312 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
34313 PyInt_Type.tp_name, PyLong_Type.tp_name);
34320 static PyObject *unpack_py_srvsvc_NetFileGetInfo_args_out(struct srvsvc_NetFileGetInfo *r)
34324 py_info = py_import_srvsvc_NetFileInfo(r->out.info, r->in.level, r->out.info);
34325 if (py_info == NULL) {
34329 if (!W_ERROR_IS_OK(r->out.result)) {
34330 PyErr_SetWERROR(r->out.result);
34337 static bool pack_py_srvsvc_NetFileClose_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetFileClose *r)
34339 PyObject *py_server_unc;
34341 const char *kwnames[] = {
34342 "server_unc", "fid", NULL
34345 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetFileClose", discard_const_p(char *, kwnames), &py_server_unc, &py_fid)) {
34349 if (py_server_unc == NULL) {
34350 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
34353 if (py_server_unc == Py_None) {
34354 r->in.server_unc = NULL;
34356 r->in.server_unc = NULL;
34357 if (py_server_unc == NULL) {
34358 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
34362 const char *test_str;
34363 const char *talloc_str;
34364 PyObject *unicode = NULL;
34365 if (PyUnicode_Check(py_server_unc)) {
34366 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
34367 if (unicode == NULL) {
34371 test_str = PyString_AS_STRING(unicode);
34372 } else if (PyString_Check(py_server_unc)) {
34373 test_str = PyString_AS_STRING(py_server_unc);
34375 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
34378 talloc_str = talloc_strdup(r, test_str);
34379 if (unicode != NULL) {
34380 Py_DECREF(unicode);
34382 if (talloc_str == NULL) {
34386 r->in.server_unc = talloc_str;
34389 if (py_fid == NULL) {
34390 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.fid");
34394 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fid));
34395 if (PyLong_Check(py_fid)) {
34396 unsigned long long test_var;
34397 test_var = PyLong_AsUnsignedLongLong(py_fid);
34398 if (PyErr_Occurred() != NULL) {
34401 if (test_var > uint_max) {
34402 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
34403 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34406 r->in.fid = test_var;
34407 } else if (PyInt_Check(py_fid)) {
34409 test_var = PyInt_AsLong(py_fid);
34410 if (test_var < 0 || test_var > uint_max) {
34411 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
34412 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34415 r->in.fid = test_var;
34417 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
34418 PyInt_Type.tp_name, PyLong_Type.tp_name);
34425 static PyObject *unpack_py_srvsvc_NetFileClose_args_out(struct srvsvc_NetFileClose *r)
34430 if (!W_ERROR_IS_OK(r->out.result)) {
34431 PyErr_SetWERROR(r->out.result);
34438 static bool pack_py_srvsvc_NetSessEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSessEnum *r)
34440 PyObject *py_server_unc;
34441 PyObject *py_client;
34443 PyObject *py_info_ctr;
34444 PyObject *py_max_buffer;
34445 PyObject *py_resume_handle;
34446 const char *kwnames[] = {
34447 "server_unc", "client", "user", "info_ctr", "max_buffer", "resume_handle", NULL
34450 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:srvsvc_NetSessEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_client, &py_user, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
34454 if (py_server_unc == NULL) {
34455 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
34458 if (py_server_unc == Py_None) {
34459 r->in.server_unc = NULL;
34461 r->in.server_unc = NULL;
34462 if (py_server_unc == NULL) {
34463 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
34467 const char *test_str;
34468 const char *talloc_str;
34469 PyObject *unicode = NULL;
34470 if (PyUnicode_Check(py_server_unc)) {
34471 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
34472 if (unicode == NULL) {
34476 test_str = PyString_AS_STRING(unicode);
34477 } else if (PyString_Check(py_server_unc)) {
34478 test_str = PyString_AS_STRING(py_server_unc);
34480 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
34483 talloc_str = talloc_strdup(r, test_str);
34484 if (unicode != NULL) {
34485 Py_DECREF(unicode);
34487 if (talloc_str == NULL) {
34491 r->in.server_unc = talloc_str;
34494 if (py_client == NULL) {
34495 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client");
34498 if (py_client == Py_None) {
34499 r->in.client = NULL;
34501 r->in.client = NULL;
34502 if (py_client == NULL) {
34503 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.client");
34507 const char *test_str;
34508 const char *talloc_str;
34509 PyObject *unicode = NULL;
34510 if (PyUnicode_Check(py_client)) {
34511 unicode = PyUnicode_AsEncodedString(py_client, "utf-8", "ignore");
34512 if (unicode == NULL) {
34516 test_str = PyString_AS_STRING(unicode);
34517 } else if (PyString_Check(py_client)) {
34518 test_str = PyString_AS_STRING(py_client);
34520 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client)->tp_name);
34523 talloc_str = talloc_strdup(r, test_str);
34524 if (unicode != NULL) {
34525 Py_DECREF(unicode);
34527 if (talloc_str == NULL) {
34531 r->in.client = talloc_str;
34534 if (py_user == NULL) {
34535 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
34538 if (py_user == Py_None) {
34542 if (py_user == NULL) {
34543 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.user");
34547 const char *test_str;
34548 const char *talloc_str;
34549 PyObject *unicode = NULL;
34550 if (PyUnicode_Check(py_user)) {
34551 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
34552 if (unicode == NULL) {
34556 test_str = PyString_AS_STRING(unicode);
34557 } else if (PyString_Check(py_user)) {
34558 test_str = PyString_AS_STRING(py_user);
34560 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
34563 talloc_str = talloc_strdup(r, test_str);
34564 if (unicode != NULL) {
34565 Py_DECREF(unicode);
34567 if (talloc_str == NULL) {
34571 r->in.user = talloc_str;
34574 if (py_info_ctr == NULL) {
34575 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
34578 r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
34579 if (py_info_ctr == NULL) {
34580 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info_ctr");
34583 PY_CHECK_TYPE(&srvsvc_NetSessInfoCtr_Type, py_info_ctr, return false;);
34584 if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
34588 r->in.info_ctr = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(py_info_ctr);
34589 if (py_max_buffer == NULL) {
34590 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
34594 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
34595 if (PyLong_Check(py_max_buffer)) {
34596 unsigned long long test_var;
34597 test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
34598 if (PyErr_Occurred() != NULL) {
34601 if (test_var > uint_max) {
34602 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
34603 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34606 r->in.max_buffer = test_var;
34607 } else if (PyInt_Check(py_max_buffer)) {
34609 test_var = PyInt_AsLong(py_max_buffer);
34610 if (test_var < 0 || test_var > uint_max) {
34611 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
34612 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34615 r->in.max_buffer = test_var;
34617 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
34618 PyInt_Type.tp_name, PyLong_Type.tp_name);
34622 if (py_resume_handle == NULL) {
34623 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
34626 if (py_resume_handle == Py_None) {
34627 r->in.resume_handle = NULL;
34629 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
34630 if (py_resume_handle == NULL) {
34631 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.resume_handle");
34635 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
34636 if (PyLong_Check(py_resume_handle)) {
34637 unsigned long long test_var;
34638 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
34639 if (PyErr_Occurred() != NULL) {
34642 if (test_var > uint_max) {
34643 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
34644 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34647 *r->in.resume_handle = test_var;
34648 } else if (PyInt_Check(py_resume_handle)) {
34650 test_var = PyInt_AsLong(py_resume_handle);
34651 if (test_var < 0 || test_var > uint_max) {
34652 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
34653 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34656 *r->in.resume_handle = test_var;
34658 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
34659 PyInt_Type.tp_name, PyLong_Type.tp_name);
34667 static PyObject *unpack_py_srvsvc_NetSessEnum_args_out(struct srvsvc_NetSessEnum *r)
34670 PyObject *py_info_ctr;
34671 PyObject *py_totalentries;
34672 PyObject *py_resume_handle;
34673 result = PyTuple_New(3);
34674 py_info_ctr = pytalloc_reference_ex(&srvsvc_NetSessInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
34675 PyTuple_SetItem(result, 0, py_info_ctr);
34676 py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
34677 PyTuple_SetItem(result, 1, py_totalentries);
34678 if (r->out.resume_handle == NULL) {
34679 py_resume_handle = Py_None;
34680 Py_INCREF(py_resume_handle);
34682 py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
34684 PyTuple_SetItem(result, 2, py_resume_handle);
34685 if (!W_ERROR_IS_OK(r->out.result)) {
34686 PyErr_SetWERROR(r->out.result);
34693 static bool pack_py_srvsvc_NetSessDel_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSessDel *r)
34695 PyObject *py_server_unc;
34696 PyObject *py_client;
34698 const char *kwnames[] = {
34699 "server_unc", "client", "user", NULL
34702 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetSessDel", discard_const_p(char *, kwnames), &py_server_unc, &py_client, &py_user)) {
34706 if (py_server_unc == NULL) {
34707 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
34710 if (py_server_unc == Py_None) {
34711 r->in.server_unc = NULL;
34713 r->in.server_unc = NULL;
34714 if (py_server_unc == NULL) {
34715 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
34719 const char *test_str;
34720 const char *talloc_str;
34721 PyObject *unicode = NULL;
34722 if (PyUnicode_Check(py_server_unc)) {
34723 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
34724 if (unicode == NULL) {
34728 test_str = PyString_AS_STRING(unicode);
34729 } else if (PyString_Check(py_server_unc)) {
34730 test_str = PyString_AS_STRING(py_server_unc);
34732 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
34735 talloc_str = talloc_strdup(r, test_str);
34736 if (unicode != NULL) {
34737 Py_DECREF(unicode);
34739 if (talloc_str == NULL) {
34743 r->in.server_unc = talloc_str;
34746 if (py_client == NULL) {
34747 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client");
34750 if (py_client == Py_None) {
34751 r->in.client = NULL;
34753 r->in.client = NULL;
34754 if (py_client == NULL) {
34755 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.client");
34759 const char *test_str;
34760 const char *talloc_str;
34761 PyObject *unicode = NULL;
34762 if (PyUnicode_Check(py_client)) {
34763 unicode = PyUnicode_AsEncodedString(py_client, "utf-8", "ignore");
34764 if (unicode == NULL) {
34768 test_str = PyString_AS_STRING(unicode);
34769 } else if (PyString_Check(py_client)) {
34770 test_str = PyString_AS_STRING(py_client);
34772 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client)->tp_name);
34775 talloc_str = talloc_strdup(r, test_str);
34776 if (unicode != NULL) {
34777 Py_DECREF(unicode);
34779 if (talloc_str == NULL) {
34783 r->in.client = talloc_str;
34786 if (py_user == NULL) {
34787 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
34790 if (py_user == Py_None) {
34794 if (py_user == NULL) {
34795 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.user");
34799 const char *test_str;
34800 const char *talloc_str;
34801 PyObject *unicode = NULL;
34802 if (PyUnicode_Check(py_user)) {
34803 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
34804 if (unicode == NULL) {
34808 test_str = PyString_AS_STRING(unicode);
34809 } else if (PyString_Check(py_user)) {
34810 test_str = PyString_AS_STRING(py_user);
34812 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
34815 talloc_str = talloc_strdup(r, test_str);
34816 if (unicode != NULL) {
34817 Py_DECREF(unicode);
34819 if (talloc_str == NULL) {
34823 r->in.user = talloc_str;
34829 static PyObject *unpack_py_srvsvc_NetSessDel_args_out(struct srvsvc_NetSessDel *r)
34834 if (!W_ERROR_IS_OK(r->out.result)) {
34835 PyErr_SetWERROR(r->out.result);
34842 static bool pack_py_srvsvc_NetShareAdd_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareAdd *r)
34844 PyObject *py_server_unc;
34845 PyObject *py_level;
34847 PyObject *py_parm_error;
34848 const char *kwnames[] = {
34849 "server_unc", "level", "info", "parm_error", NULL
34852 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetShareAdd", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info, &py_parm_error)) {
34856 if (py_server_unc == NULL) {
34857 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
34860 if (py_server_unc == Py_None) {
34861 r->in.server_unc = NULL;
34863 r->in.server_unc = NULL;
34864 if (py_server_unc == NULL) {
34865 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
34869 const char *test_str;
34870 const char *talloc_str;
34871 PyObject *unicode = NULL;
34872 if (PyUnicode_Check(py_server_unc)) {
34873 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
34874 if (unicode == NULL) {
34878 test_str = PyString_AS_STRING(unicode);
34879 } else if (PyString_Check(py_server_unc)) {
34880 test_str = PyString_AS_STRING(py_server_unc);
34882 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
34885 talloc_str = talloc_strdup(r, test_str);
34886 if (unicode != NULL) {
34887 Py_DECREF(unicode);
34889 if (talloc_str == NULL) {
34893 r->in.server_unc = talloc_str;
34896 if (py_level == NULL) {
34897 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
34901 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
34902 if (PyLong_Check(py_level)) {
34903 unsigned long long test_var;
34904 test_var = PyLong_AsUnsignedLongLong(py_level);
34905 if (PyErr_Occurred() != NULL) {
34908 if (test_var > uint_max) {
34909 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
34910 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34913 r->in.level = test_var;
34914 } else if (PyInt_Check(py_level)) {
34916 test_var = PyInt_AsLong(py_level);
34917 if (test_var < 0 || test_var > uint_max) {
34918 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
34919 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34922 r->in.level = test_var;
34924 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
34925 PyInt_Type.tp_name, PyLong_Type.tp_name);
34929 if (py_info == NULL) {
34930 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
34933 r->in.info = talloc_ptrtype(r, r->in.info);
34934 if (py_info == NULL) {
34935 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info");
34939 union srvsvc_NetShareInfo *info_switch_1;
34940 info_switch_1 = py_export_srvsvc_NetShareInfo(r, r->in.level, py_info);
34941 if (info_switch_1 == NULL) {
34944 r->in.info = info_switch_1;
34946 if (py_parm_error == NULL) {
34947 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.parm_error");
34950 if (py_parm_error == Py_None) {
34951 r->in.parm_error = NULL;
34953 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
34954 if (py_parm_error == NULL) {
34955 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.parm_error");
34959 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
34960 if (PyLong_Check(py_parm_error)) {
34961 unsigned long long test_var;
34962 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
34963 if (PyErr_Occurred() != NULL) {
34966 if (test_var > uint_max) {
34967 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
34968 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34971 *r->in.parm_error = test_var;
34972 } else if (PyInt_Check(py_parm_error)) {
34974 test_var = PyInt_AsLong(py_parm_error);
34975 if (test_var < 0 || test_var > uint_max) {
34976 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
34977 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
34980 *r->in.parm_error = test_var;
34982 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
34983 PyInt_Type.tp_name, PyLong_Type.tp_name);
34991 static PyObject *unpack_py_srvsvc_NetShareAdd_args_out(struct srvsvc_NetShareAdd *r)
34994 PyObject *py_parm_error;
34995 if (r->out.parm_error == NULL) {
34996 py_parm_error = Py_None;
34997 Py_INCREF(py_parm_error);
34999 py_parm_error = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
35001 result = py_parm_error;
35002 if (!W_ERROR_IS_OK(r->out.result)) {
35003 PyErr_SetWERROR(r->out.result);
35010 static bool pack_py_srvsvc_NetShareEnumAll_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareEnumAll *r)
35012 PyObject *py_server_unc;
35013 PyObject *py_info_ctr;
35014 PyObject *py_max_buffer;
35015 PyObject *py_resume_handle;
35016 const char *kwnames[] = {
35017 "server_unc", "info_ctr", "max_buffer", "resume_handle", NULL
35020 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetShareEnumAll", discard_const_p(char *, kwnames), &py_server_unc, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
35024 if (py_server_unc == NULL) {
35025 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
35028 if (py_server_unc == Py_None) {
35029 r->in.server_unc = NULL;
35031 r->in.server_unc = NULL;
35032 if (py_server_unc == NULL) {
35033 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
35037 const char *test_str;
35038 const char *talloc_str;
35039 PyObject *unicode = NULL;
35040 if (PyUnicode_Check(py_server_unc)) {
35041 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
35042 if (unicode == NULL) {
35046 test_str = PyString_AS_STRING(unicode);
35047 } else if (PyString_Check(py_server_unc)) {
35048 test_str = PyString_AS_STRING(py_server_unc);
35050 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
35053 talloc_str = talloc_strdup(r, test_str);
35054 if (unicode != NULL) {
35055 Py_DECREF(unicode);
35057 if (talloc_str == NULL) {
35061 r->in.server_unc = talloc_str;
35064 if (py_info_ctr == NULL) {
35065 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
35068 r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
35069 if (py_info_ctr == NULL) {
35070 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info_ctr");
35073 PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, py_info_ctr, return false;);
35074 if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
35078 r->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_info_ctr);
35079 if (py_max_buffer == NULL) {
35080 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
35084 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
35085 if (PyLong_Check(py_max_buffer)) {
35086 unsigned long long test_var;
35087 test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
35088 if (PyErr_Occurred() != NULL) {
35091 if (test_var > uint_max) {
35092 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
35093 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35096 r->in.max_buffer = test_var;
35097 } else if (PyInt_Check(py_max_buffer)) {
35099 test_var = PyInt_AsLong(py_max_buffer);
35100 if (test_var < 0 || test_var > uint_max) {
35101 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
35102 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35105 r->in.max_buffer = test_var;
35107 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
35108 PyInt_Type.tp_name, PyLong_Type.tp_name);
35112 if (py_resume_handle == NULL) {
35113 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
35116 if (py_resume_handle == Py_None) {
35117 r->in.resume_handle = NULL;
35119 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
35120 if (py_resume_handle == NULL) {
35121 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.resume_handle");
35125 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
35126 if (PyLong_Check(py_resume_handle)) {
35127 unsigned long long test_var;
35128 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
35129 if (PyErr_Occurred() != NULL) {
35132 if (test_var > uint_max) {
35133 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
35134 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35137 *r->in.resume_handle = test_var;
35138 } else if (PyInt_Check(py_resume_handle)) {
35140 test_var = PyInt_AsLong(py_resume_handle);
35141 if (test_var < 0 || test_var > uint_max) {
35142 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
35143 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35146 *r->in.resume_handle = test_var;
35148 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
35149 PyInt_Type.tp_name, PyLong_Type.tp_name);
35157 static PyObject *unpack_py_srvsvc_NetShareEnumAll_args_out(struct srvsvc_NetShareEnumAll *r)
35160 PyObject *py_info_ctr;
35161 PyObject *py_totalentries;
35162 PyObject *py_resume_handle;
35163 result = PyTuple_New(3);
35164 py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
35165 PyTuple_SetItem(result, 0, py_info_ctr);
35166 py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
35167 PyTuple_SetItem(result, 1, py_totalentries);
35168 if (r->out.resume_handle == NULL) {
35169 py_resume_handle = Py_None;
35170 Py_INCREF(py_resume_handle);
35172 py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
35174 PyTuple_SetItem(result, 2, py_resume_handle);
35175 if (!W_ERROR_IS_OK(r->out.result)) {
35176 PyErr_SetWERROR(r->out.result);
35183 static bool pack_py_srvsvc_NetShareGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareGetInfo *r)
35185 PyObject *py_server_unc;
35186 PyObject *py_share_name;
35187 PyObject *py_level;
35188 const char *kwnames[] = {
35189 "server_unc", "share_name", "level", NULL
35192 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_level)) {
35196 if (py_server_unc == NULL) {
35197 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
35200 if (py_server_unc == Py_None) {
35201 r->in.server_unc = NULL;
35203 r->in.server_unc = NULL;
35204 if (py_server_unc == NULL) {
35205 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
35209 const char *test_str;
35210 const char *talloc_str;
35211 PyObject *unicode = NULL;
35212 if (PyUnicode_Check(py_server_unc)) {
35213 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
35214 if (unicode == NULL) {
35218 test_str = PyString_AS_STRING(unicode);
35219 } else if (PyString_Check(py_server_unc)) {
35220 test_str = PyString_AS_STRING(py_server_unc);
35222 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
35225 talloc_str = talloc_strdup(r, test_str);
35226 if (unicode != NULL) {
35227 Py_DECREF(unicode);
35229 if (talloc_str == NULL) {
35233 r->in.server_unc = talloc_str;
35236 if (py_share_name == NULL) {
35237 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share_name");
35241 const char *test_str;
35242 const char *talloc_str;
35243 PyObject *unicode = NULL;
35244 if (PyUnicode_Check(py_share_name)) {
35245 unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
35246 if (unicode == NULL) {
35250 test_str = PyString_AS_STRING(unicode);
35251 } else if (PyString_Check(py_share_name)) {
35252 test_str = PyString_AS_STRING(py_share_name);
35254 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
35257 talloc_str = talloc_strdup(r, test_str);
35258 if (unicode != NULL) {
35259 Py_DECREF(unicode);
35261 if (talloc_str == NULL) {
35265 r->in.share_name = talloc_str;
35267 if (py_level == NULL) {
35268 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
35272 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
35273 if (PyLong_Check(py_level)) {
35274 unsigned long long test_var;
35275 test_var = PyLong_AsUnsignedLongLong(py_level);
35276 if (PyErr_Occurred() != NULL) {
35279 if (test_var > uint_max) {
35280 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
35281 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35284 r->in.level = test_var;
35285 } else if (PyInt_Check(py_level)) {
35287 test_var = PyInt_AsLong(py_level);
35288 if (test_var < 0 || test_var > uint_max) {
35289 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
35290 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35293 r->in.level = test_var;
35295 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
35296 PyInt_Type.tp_name, PyLong_Type.tp_name);
35303 static PyObject *unpack_py_srvsvc_NetShareGetInfo_args_out(struct srvsvc_NetShareGetInfo *r)
35307 py_info = py_import_srvsvc_NetShareInfo(r->out.info, r->in.level, r->out.info);
35308 if (py_info == NULL) {
35312 if (!W_ERROR_IS_OK(r->out.result)) {
35313 PyErr_SetWERROR(r->out.result);
35320 static bool pack_py_srvsvc_NetShareSetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareSetInfo *r)
35322 PyObject *py_server_unc;
35323 PyObject *py_share_name;
35324 PyObject *py_level;
35326 PyObject *py_parm_error;
35327 const char *kwnames[] = {
35328 "server_unc", "share_name", "level", "info", "parm_error", NULL
35331 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetShareSetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_level, &py_info, &py_parm_error)) {
35335 if (py_server_unc == NULL) {
35336 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
35339 if (py_server_unc == Py_None) {
35340 r->in.server_unc = NULL;
35342 r->in.server_unc = NULL;
35343 if (py_server_unc == NULL) {
35344 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
35348 const char *test_str;
35349 const char *talloc_str;
35350 PyObject *unicode = NULL;
35351 if (PyUnicode_Check(py_server_unc)) {
35352 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
35353 if (unicode == NULL) {
35357 test_str = PyString_AS_STRING(unicode);
35358 } else if (PyString_Check(py_server_unc)) {
35359 test_str = PyString_AS_STRING(py_server_unc);
35361 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
35364 talloc_str = talloc_strdup(r, test_str);
35365 if (unicode != NULL) {
35366 Py_DECREF(unicode);
35368 if (talloc_str == NULL) {
35372 r->in.server_unc = talloc_str;
35375 if (py_share_name == NULL) {
35376 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share_name");
35380 const char *test_str;
35381 const char *talloc_str;
35382 PyObject *unicode = NULL;
35383 if (PyUnicode_Check(py_share_name)) {
35384 unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
35385 if (unicode == NULL) {
35389 test_str = PyString_AS_STRING(unicode);
35390 } else if (PyString_Check(py_share_name)) {
35391 test_str = PyString_AS_STRING(py_share_name);
35393 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
35396 talloc_str = talloc_strdup(r, test_str);
35397 if (unicode != NULL) {
35398 Py_DECREF(unicode);
35400 if (talloc_str == NULL) {
35404 r->in.share_name = talloc_str;
35406 if (py_level == NULL) {
35407 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
35411 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
35412 if (PyLong_Check(py_level)) {
35413 unsigned long long test_var;
35414 test_var = PyLong_AsUnsignedLongLong(py_level);
35415 if (PyErr_Occurred() != NULL) {
35418 if (test_var > uint_max) {
35419 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
35420 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35423 r->in.level = test_var;
35424 } else if (PyInt_Check(py_level)) {
35426 test_var = PyInt_AsLong(py_level);
35427 if (test_var < 0 || test_var > uint_max) {
35428 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
35429 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35432 r->in.level = test_var;
35434 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
35435 PyInt_Type.tp_name, PyLong_Type.tp_name);
35439 if (py_info == NULL) {
35440 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
35443 r->in.info = talloc_ptrtype(r, r->in.info);
35444 if (py_info == NULL) {
35445 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info");
35449 union srvsvc_NetShareInfo *info_switch_1;
35450 info_switch_1 = py_export_srvsvc_NetShareInfo(r, r->in.level, py_info);
35451 if (info_switch_1 == NULL) {
35454 r->in.info = info_switch_1;
35456 if (py_parm_error == NULL) {
35457 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.parm_error");
35460 if (py_parm_error == Py_None) {
35461 r->in.parm_error = NULL;
35463 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
35464 if (py_parm_error == NULL) {
35465 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.parm_error");
35469 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
35470 if (PyLong_Check(py_parm_error)) {
35471 unsigned long long test_var;
35472 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
35473 if (PyErr_Occurred() != NULL) {
35476 if (test_var > uint_max) {
35477 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
35478 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35481 *r->in.parm_error = test_var;
35482 } else if (PyInt_Check(py_parm_error)) {
35484 test_var = PyInt_AsLong(py_parm_error);
35485 if (test_var < 0 || test_var > uint_max) {
35486 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
35487 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35490 *r->in.parm_error = test_var;
35492 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
35493 PyInt_Type.tp_name, PyLong_Type.tp_name);
35501 static PyObject *unpack_py_srvsvc_NetShareSetInfo_args_out(struct srvsvc_NetShareSetInfo *r)
35504 PyObject *py_parm_error;
35505 if (r->out.parm_error == NULL) {
35506 py_parm_error = Py_None;
35507 Py_INCREF(py_parm_error);
35509 py_parm_error = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
35511 result = py_parm_error;
35512 if (!W_ERROR_IS_OK(r->out.result)) {
35513 PyErr_SetWERROR(r->out.result);
35520 static bool pack_py_srvsvc_NetShareDel_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDel *r)
35522 PyObject *py_server_unc;
35523 PyObject *py_share_name;
35524 PyObject *py_reserved;
35525 const char *kwnames[] = {
35526 "server_unc", "share_name", "reserved", NULL
35529 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareDel", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_reserved)) {
35533 if (py_server_unc == NULL) {
35534 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
35537 if (py_server_unc == Py_None) {
35538 r->in.server_unc = NULL;
35540 r->in.server_unc = NULL;
35541 if (py_server_unc == NULL) {
35542 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
35546 const char *test_str;
35547 const char *talloc_str;
35548 PyObject *unicode = NULL;
35549 if (PyUnicode_Check(py_server_unc)) {
35550 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
35551 if (unicode == NULL) {
35555 test_str = PyString_AS_STRING(unicode);
35556 } else if (PyString_Check(py_server_unc)) {
35557 test_str = PyString_AS_STRING(py_server_unc);
35559 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
35562 talloc_str = talloc_strdup(r, test_str);
35563 if (unicode != NULL) {
35564 Py_DECREF(unicode);
35566 if (talloc_str == NULL) {
35570 r->in.server_unc = talloc_str;
35573 if (py_share_name == NULL) {
35574 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share_name");
35578 const char *test_str;
35579 const char *talloc_str;
35580 PyObject *unicode = NULL;
35581 if (PyUnicode_Check(py_share_name)) {
35582 unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
35583 if (unicode == NULL) {
35587 test_str = PyString_AS_STRING(unicode);
35588 } else if (PyString_Check(py_share_name)) {
35589 test_str = PyString_AS_STRING(py_share_name);
35591 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
35594 talloc_str = talloc_strdup(r, test_str);
35595 if (unicode != NULL) {
35596 Py_DECREF(unicode);
35598 if (talloc_str == NULL) {
35602 r->in.share_name = talloc_str;
35604 if (py_reserved == NULL) {
35605 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.reserved");
35609 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
35610 if (PyLong_Check(py_reserved)) {
35611 unsigned long long test_var;
35612 test_var = PyLong_AsUnsignedLongLong(py_reserved);
35613 if (PyErr_Occurred() != NULL) {
35616 if (test_var > uint_max) {
35617 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
35618 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35621 r->in.reserved = test_var;
35622 } else if (PyInt_Check(py_reserved)) {
35624 test_var = PyInt_AsLong(py_reserved);
35625 if (test_var < 0 || test_var > uint_max) {
35626 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
35627 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35630 r->in.reserved = test_var;
35632 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
35633 PyInt_Type.tp_name, PyLong_Type.tp_name);
35640 static PyObject *unpack_py_srvsvc_NetShareDel_args_out(struct srvsvc_NetShareDel *r)
35645 if (!W_ERROR_IS_OK(r->out.result)) {
35646 PyErr_SetWERROR(r->out.result);
35653 static bool pack_py_srvsvc_NetShareDelSticky_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDelSticky *r)
35655 PyObject *py_server_unc;
35656 PyObject *py_share_name;
35657 PyObject *py_reserved;
35658 const char *kwnames[] = {
35659 "server_unc", "share_name", "reserved", NULL
35662 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareDelSticky", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_reserved)) {
35666 if (py_server_unc == NULL) {
35667 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
35670 if (py_server_unc == Py_None) {
35671 r->in.server_unc = NULL;
35673 r->in.server_unc = NULL;
35674 if (py_server_unc == NULL) {
35675 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
35679 const char *test_str;
35680 const char *talloc_str;
35681 PyObject *unicode = NULL;
35682 if (PyUnicode_Check(py_server_unc)) {
35683 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
35684 if (unicode == NULL) {
35688 test_str = PyString_AS_STRING(unicode);
35689 } else if (PyString_Check(py_server_unc)) {
35690 test_str = PyString_AS_STRING(py_server_unc);
35692 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
35695 talloc_str = talloc_strdup(r, test_str);
35696 if (unicode != NULL) {
35697 Py_DECREF(unicode);
35699 if (talloc_str == NULL) {
35703 r->in.server_unc = talloc_str;
35706 if (py_share_name == NULL) {
35707 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share_name");
35711 const char *test_str;
35712 const char *talloc_str;
35713 PyObject *unicode = NULL;
35714 if (PyUnicode_Check(py_share_name)) {
35715 unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
35716 if (unicode == NULL) {
35720 test_str = PyString_AS_STRING(unicode);
35721 } else if (PyString_Check(py_share_name)) {
35722 test_str = PyString_AS_STRING(py_share_name);
35724 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
35727 talloc_str = talloc_strdup(r, test_str);
35728 if (unicode != NULL) {
35729 Py_DECREF(unicode);
35731 if (talloc_str == NULL) {
35735 r->in.share_name = talloc_str;
35737 if (py_reserved == NULL) {
35738 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.reserved");
35742 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
35743 if (PyLong_Check(py_reserved)) {
35744 unsigned long long test_var;
35745 test_var = PyLong_AsUnsignedLongLong(py_reserved);
35746 if (PyErr_Occurred() != NULL) {
35749 if (test_var > uint_max) {
35750 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
35751 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35754 r->in.reserved = test_var;
35755 } else if (PyInt_Check(py_reserved)) {
35757 test_var = PyInt_AsLong(py_reserved);
35758 if (test_var < 0 || test_var > uint_max) {
35759 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
35760 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35763 r->in.reserved = test_var;
35765 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
35766 PyInt_Type.tp_name, PyLong_Type.tp_name);
35773 static PyObject *unpack_py_srvsvc_NetShareDelSticky_args_out(struct srvsvc_NetShareDelSticky *r)
35778 if (!W_ERROR_IS_OK(r->out.result)) {
35779 PyErr_SetWERROR(r->out.result);
35786 static bool pack_py_srvsvc_NetShareCheck_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareCheck *r)
35788 PyObject *py_server_unc;
35789 PyObject *py_device_name;
35790 const char *kwnames[] = {
35791 "server_unc", "device_name", NULL
35794 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetShareCheck", discard_const_p(char *, kwnames), &py_server_unc, &py_device_name)) {
35798 if (py_server_unc == NULL) {
35799 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
35802 if (py_server_unc == Py_None) {
35803 r->in.server_unc = NULL;
35805 r->in.server_unc = NULL;
35806 if (py_server_unc == NULL) {
35807 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
35811 const char *test_str;
35812 const char *talloc_str;
35813 PyObject *unicode = NULL;
35814 if (PyUnicode_Check(py_server_unc)) {
35815 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
35816 if (unicode == NULL) {
35820 test_str = PyString_AS_STRING(unicode);
35821 } else if (PyString_Check(py_server_unc)) {
35822 test_str = PyString_AS_STRING(py_server_unc);
35824 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
35827 talloc_str = talloc_strdup(r, test_str);
35828 if (unicode != NULL) {
35829 Py_DECREF(unicode);
35831 if (talloc_str == NULL) {
35835 r->in.server_unc = talloc_str;
35838 if (py_device_name == NULL) {
35839 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.device_name");
35843 const char *test_str;
35844 const char *talloc_str;
35845 PyObject *unicode = NULL;
35846 if (PyUnicode_Check(py_device_name)) {
35847 unicode = PyUnicode_AsEncodedString(py_device_name, "utf-8", "ignore");
35848 if (unicode == NULL) {
35852 test_str = PyString_AS_STRING(unicode);
35853 } else if (PyString_Check(py_device_name)) {
35854 test_str = PyString_AS_STRING(py_device_name);
35856 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
35859 talloc_str = talloc_strdup(r, test_str);
35860 if (unicode != NULL) {
35861 Py_DECREF(unicode);
35863 if (talloc_str == NULL) {
35867 r->in.device_name = talloc_str;
35872 static PyObject *unpack_py_srvsvc_NetShareCheck_args_out(struct srvsvc_NetShareCheck *r)
35876 py_type = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.type);
35878 if (!W_ERROR_IS_OK(r->out.result)) {
35879 PyErr_SetWERROR(r->out.result);
35886 static bool pack_py_srvsvc_NetSrvGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSrvGetInfo *r)
35888 PyObject *py_server_unc;
35889 PyObject *py_level;
35890 const char *kwnames[] = {
35891 "server_unc", "level", NULL
35894 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetSrvGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_level)) {
35898 if (py_server_unc == NULL) {
35899 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
35902 if (py_server_unc == Py_None) {
35903 r->in.server_unc = NULL;
35905 r->in.server_unc = NULL;
35906 if (py_server_unc == NULL) {
35907 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
35911 const char *test_str;
35912 const char *talloc_str;
35913 PyObject *unicode = NULL;
35914 if (PyUnicode_Check(py_server_unc)) {
35915 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
35916 if (unicode == NULL) {
35920 test_str = PyString_AS_STRING(unicode);
35921 } else if (PyString_Check(py_server_unc)) {
35922 test_str = PyString_AS_STRING(py_server_unc);
35924 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
35927 talloc_str = talloc_strdup(r, test_str);
35928 if (unicode != NULL) {
35929 Py_DECREF(unicode);
35931 if (talloc_str == NULL) {
35935 r->in.server_unc = talloc_str;
35938 if (py_level == NULL) {
35939 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
35943 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
35944 if (PyLong_Check(py_level)) {
35945 unsigned long long test_var;
35946 test_var = PyLong_AsUnsignedLongLong(py_level);
35947 if (PyErr_Occurred() != NULL) {
35950 if (test_var > uint_max) {
35951 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
35952 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35955 r->in.level = test_var;
35956 } else if (PyInt_Check(py_level)) {
35958 test_var = PyInt_AsLong(py_level);
35959 if (test_var < 0 || test_var > uint_max) {
35960 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
35961 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
35964 r->in.level = test_var;
35966 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
35967 PyInt_Type.tp_name, PyLong_Type.tp_name);
35974 static PyObject *unpack_py_srvsvc_NetSrvGetInfo_args_out(struct srvsvc_NetSrvGetInfo *r)
35978 py_info = py_import_srvsvc_NetSrvInfo(r->out.info, r->in.level, r->out.info);
35979 if (py_info == NULL) {
35983 if (!W_ERROR_IS_OK(r->out.result)) {
35984 PyErr_SetWERROR(r->out.result);
35991 static bool pack_py_srvsvc_NetSrvSetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSrvSetInfo *r)
35993 PyObject *py_server_unc;
35994 PyObject *py_level;
35996 PyObject *py_parm_error;
35997 const char *kwnames[] = {
35998 "server_unc", "level", "info", "parm_error", NULL
36001 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetSrvSetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info, &py_parm_error)) {
36005 if (py_server_unc == NULL) {
36006 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
36009 if (py_server_unc == Py_None) {
36010 r->in.server_unc = NULL;
36012 r->in.server_unc = NULL;
36013 if (py_server_unc == NULL) {
36014 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
36018 const char *test_str;
36019 const char *talloc_str;
36020 PyObject *unicode = NULL;
36021 if (PyUnicode_Check(py_server_unc)) {
36022 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
36023 if (unicode == NULL) {
36027 test_str = PyString_AS_STRING(unicode);
36028 } else if (PyString_Check(py_server_unc)) {
36029 test_str = PyString_AS_STRING(py_server_unc);
36031 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
36034 talloc_str = talloc_strdup(r, test_str);
36035 if (unicode != NULL) {
36036 Py_DECREF(unicode);
36038 if (talloc_str == NULL) {
36042 r->in.server_unc = talloc_str;
36045 if (py_level == NULL) {
36046 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
36050 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
36051 if (PyLong_Check(py_level)) {
36052 unsigned long long test_var;
36053 test_var = PyLong_AsUnsignedLongLong(py_level);
36054 if (PyErr_Occurred() != NULL) {
36057 if (test_var > uint_max) {
36058 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36059 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36062 r->in.level = test_var;
36063 } else if (PyInt_Check(py_level)) {
36065 test_var = PyInt_AsLong(py_level);
36066 if (test_var < 0 || test_var > uint_max) {
36067 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36068 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36071 r->in.level = test_var;
36073 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36074 PyInt_Type.tp_name, PyLong_Type.tp_name);
36078 if (py_info == NULL) {
36079 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
36082 r->in.info = talloc_ptrtype(r, r->in.info);
36083 if (py_info == NULL) {
36084 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info");
36088 union srvsvc_NetSrvInfo *info_switch_1;
36089 info_switch_1 = py_export_srvsvc_NetSrvInfo(r, r->in.level, py_info);
36090 if (info_switch_1 == NULL) {
36093 r->in.info = info_switch_1;
36095 if (py_parm_error == NULL) {
36096 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.parm_error");
36099 if (py_parm_error == Py_None) {
36100 r->in.parm_error = NULL;
36102 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
36103 if (py_parm_error == NULL) {
36104 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.parm_error");
36108 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
36109 if (PyLong_Check(py_parm_error)) {
36110 unsigned long long test_var;
36111 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
36112 if (PyErr_Occurred() != NULL) {
36115 if (test_var > uint_max) {
36116 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36117 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36120 *r->in.parm_error = test_var;
36121 } else if (PyInt_Check(py_parm_error)) {
36123 test_var = PyInt_AsLong(py_parm_error);
36124 if (test_var < 0 || test_var > uint_max) {
36125 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36126 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36129 *r->in.parm_error = test_var;
36131 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36132 PyInt_Type.tp_name, PyLong_Type.tp_name);
36140 static PyObject *unpack_py_srvsvc_NetSrvSetInfo_args_out(struct srvsvc_NetSrvSetInfo *r)
36143 PyObject *py_parm_error;
36144 if (r->out.parm_error == NULL) {
36145 py_parm_error = Py_None;
36146 Py_INCREF(py_parm_error);
36148 py_parm_error = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
36150 result = py_parm_error;
36151 if (!W_ERROR_IS_OK(r->out.result)) {
36152 PyErr_SetWERROR(r->out.result);
36159 static bool pack_py_srvsvc_NetDiskEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetDiskEnum *r)
36161 PyObject *py_server_unc;
36162 PyObject *py_level;
36164 PyObject *py_maxlen;
36165 PyObject *py_resume_handle;
36166 const char *kwnames[] = {
36167 "server_unc", "level", "info", "maxlen", "resume_handle", NULL
36170 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetDiskEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info, &py_maxlen, &py_resume_handle)) {
36174 if (py_server_unc == NULL) {
36175 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
36178 if (py_server_unc == Py_None) {
36179 r->in.server_unc = NULL;
36181 r->in.server_unc = NULL;
36182 if (py_server_unc == NULL) {
36183 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
36187 const char *test_str;
36188 const char *talloc_str;
36189 PyObject *unicode = NULL;
36190 if (PyUnicode_Check(py_server_unc)) {
36191 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
36192 if (unicode == NULL) {
36196 test_str = PyString_AS_STRING(unicode);
36197 } else if (PyString_Check(py_server_unc)) {
36198 test_str = PyString_AS_STRING(py_server_unc);
36200 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
36203 talloc_str = talloc_strdup(r, test_str);
36204 if (unicode != NULL) {
36205 Py_DECREF(unicode);
36207 if (talloc_str == NULL) {
36211 r->in.server_unc = talloc_str;
36214 if (py_level == NULL) {
36215 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
36219 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
36220 if (PyLong_Check(py_level)) {
36221 unsigned long long test_var;
36222 test_var = PyLong_AsUnsignedLongLong(py_level);
36223 if (PyErr_Occurred() != NULL) {
36226 if (test_var > uint_max) {
36227 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36228 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36231 r->in.level = test_var;
36232 } else if (PyInt_Check(py_level)) {
36234 test_var = PyInt_AsLong(py_level);
36235 if (test_var < 0 || test_var > uint_max) {
36236 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36237 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36240 r->in.level = test_var;
36242 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36243 PyInt_Type.tp_name, PyLong_Type.tp_name);
36247 if (py_info == NULL) {
36248 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
36251 r->in.info = talloc_ptrtype(r, r->in.info);
36252 if (py_info == NULL) {
36253 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info");
36256 PY_CHECK_TYPE(&srvsvc_NetDiskInfo_Type, py_info, return false;);
36257 if (talloc_reference(r, pytalloc_get_mem_ctx(py_info)) == NULL) {
36261 r->in.info = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(py_info);
36262 if (py_maxlen == NULL) {
36263 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.maxlen");
36267 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.maxlen));
36268 if (PyLong_Check(py_maxlen)) {
36269 unsigned long long test_var;
36270 test_var = PyLong_AsUnsignedLongLong(py_maxlen);
36271 if (PyErr_Occurred() != NULL) {
36274 if (test_var > uint_max) {
36275 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36276 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36279 r->in.maxlen = test_var;
36280 } else if (PyInt_Check(py_maxlen)) {
36282 test_var = PyInt_AsLong(py_maxlen);
36283 if (test_var < 0 || test_var > uint_max) {
36284 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36285 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36288 r->in.maxlen = test_var;
36290 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36291 PyInt_Type.tp_name, PyLong_Type.tp_name);
36295 if (py_resume_handle == NULL) {
36296 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
36299 if (py_resume_handle == Py_None) {
36300 r->in.resume_handle = NULL;
36302 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
36303 if (py_resume_handle == NULL) {
36304 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.resume_handle");
36308 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
36309 if (PyLong_Check(py_resume_handle)) {
36310 unsigned long long test_var;
36311 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
36312 if (PyErr_Occurred() != NULL) {
36315 if (test_var > uint_max) {
36316 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36317 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36320 *r->in.resume_handle = test_var;
36321 } else if (PyInt_Check(py_resume_handle)) {
36323 test_var = PyInt_AsLong(py_resume_handle);
36324 if (test_var < 0 || test_var > uint_max) {
36325 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36326 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36329 *r->in.resume_handle = test_var;
36331 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36332 PyInt_Type.tp_name, PyLong_Type.tp_name);
36340 static PyObject *unpack_py_srvsvc_NetDiskEnum_args_out(struct srvsvc_NetDiskEnum *r)
36344 PyObject *py_totalentries;
36345 PyObject *py_resume_handle;
36346 result = PyTuple_New(3);
36347 py_info = pytalloc_reference_ex(&srvsvc_NetDiskInfo_Type, r->out.info, r->out.info);
36348 PyTuple_SetItem(result, 0, py_info);
36349 py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
36350 PyTuple_SetItem(result, 1, py_totalentries);
36351 if (r->out.resume_handle == NULL) {
36352 py_resume_handle = Py_None;
36353 Py_INCREF(py_resume_handle);
36355 py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
36357 PyTuple_SetItem(result, 2, py_resume_handle);
36358 if (!W_ERROR_IS_OK(r->out.result)) {
36359 PyErr_SetWERROR(r->out.result);
36366 static bool pack_py_srvsvc_NetServerStatisticsGet_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetServerStatisticsGet *r)
36368 PyObject *py_server_unc;
36369 PyObject *py_service;
36370 PyObject *py_level;
36371 PyObject *py_options;
36372 const char *kwnames[] = {
36373 "server_unc", "service", "level", "options", NULL
36376 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetServerStatisticsGet", discard_const_p(char *, kwnames), &py_server_unc, &py_service, &py_level, &py_options)) {
36380 if (py_server_unc == NULL) {
36381 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
36384 if (py_server_unc == Py_None) {
36385 r->in.server_unc = NULL;
36387 r->in.server_unc = NULL;
36388 if (py_server_unc == NULL) {
36389 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
36393 const char *test_str;
36394 const char *talloc_str;
36395 PyObject *unicode = NULL;
36396 if (PyUnicode_Check(py_server_unc)) {
36397 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
36398 if (unicode == NULL) {
36402 test_str = PyString_AS_STRING(unicode);
36403 } else if (PyString_Check(py_server_unc)) {
36404 test_str = PyString_AS_STRING(py_server_unc);
36406 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
36409 talloc_str = talloc_strdup(r, test_str);
36410 if (unicode != NULL) {
36411 Py_DECREF(unicode);
36413 if (talloc_str == NULL) {
36417 r->in.server_unc = talloc_str;
36420 if (py_service == NULL) {
36421 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.service");
36424 if (py_service == Py_None) {
36425 r->in.service = NULL;
36427 r->in.service = NULL;
36428 if (py_service == NULL) {
36429 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.service");
36433 const char *test_str;
36434 const char *talloc_str;
36435 PyObject *unicode = NULL;
36436 if (PyUnicode_Check(py_service)) {
36437 unicode = PyUnicode_AsEncodedString(py_service, "utf-8", "ignore");
36438 if (unicode == NULL) {
36442 test_str = PyString_AS_STRING(unicode);
36443 } else if (PyString_Check(py_service)) {
36444 test_str = PyString_AS_STRING(py_service);
36446 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_service)->tp_name);
36449 talloc_str = talloc_strdup(r, test_str);
36450 if (unicode != NULL) {
36451 Py_DECREF(unicode);
36453 if (talloc_str == NULL) {
36457 r->in.service = talloc_str;
36460 if (py_level == NULL) {
36461 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
36465 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
36466 if (PyLong_Check(py_level)) {
36467 unsigned long long test_var;
36468 test_var = PyLong_AsUnsignedLongLong(py_level);
36469 if (PyErr_Occurred() != NULL) {
36472 if (test_var > uint_max) {
36473 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36474 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36477 r->in.level = test_var;
36478 } else if (PyInt_Check(py_level)) {
36480 test_var = PyInt_AsLong(py_level);
36481 if (test_var < 0 || test_var > uint_max) {
36482 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36483 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36486 r->in.level = test_var;
36488 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36489 PyInt_Type.tp_name, PyLong_Type.tp_name);
36493 if (py_options == NULL) {
36494 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.options");
36498 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.options));
36499 if (PyLong_Check(py_options)) {
36500 unsigned long long test_var;
36501 test_var = PyLong_AsUnsignedLongLong(py_options);
36502 if (PyErr_Occurred() != NULL) {
36505 if (test_var > uint_max) {
36506 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36507 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36510 r->in.options = test_var;
36511 } else if (PyInt_Check(py_options)) {
36513 test_var = PyInt_AsLong(py_options);
36514 if (test_var < 0 || test_var > uint_max) {
36515 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36516 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36519 r->in.options = test_var;
36521 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36522 PyInt_Type.tp_name, PyLong_Type.tp_name);
36529 static PyObject *unpack_py_srvsvc_NetServerStatisticsGet_args_out(struct srvsvc_NetServerStatisticsGet *r)
36532 PyObject *py_stats;
36533 if (*r->out.stats == NULL) {
36534 py_stats = Py_None;
36535 Py_INCREF(py_stats);
36537 py_stats = pytalloc_reference_ex(&srvsvc_Statistics_Type, *r->out.stats, *r->out.stats);
36540 if (!W_ERROR_IS_OK(r->out.result)) {
36541 PyErr_SetWERROR(r->out.result);
36548 static bool pack_py_srvsvc_NetTransportAdd_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetTransportAdd *r)
36550 PyObject *py_server_unc;
36551 PyObject *py_level;
36553 const char *kwnames[] = {
36554 "server_unc", "level", "info", NULL
36557 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetTransportAdd", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info)) {
36561 if (py_server_unc == NULL) {
36562 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
36565 if (py_server_unc == Py_None) {
36566 r->in.server_unc = NULL;
36568 r->in.server_unc = NULL;
36569 if (py_server_unc == NULL) {
36570 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
36574 const char *test_str;
36575 const char *talloc_str;
36576 PyObject *unicode = NULL;
36577 if (PyUnicode_Check(py_server_unc)) {
36578 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
36579 if (unicode == NULL) {
36583 test_str = PyString_AS_STRING(unicode);
36584 } else if (PyString_Check(py_server_unc)) {
36585 test_str = PyString_AS_STRING(py_server_unc);
36587 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
36590 talloc_str = talloc_strdup(r, test_str);
36591 if (unicode != NULL) {
36592 Py_DECREF(unicode);
36594 if (talloc_str == NULL) {
36598 r->in.server_unc = talloc_str;
36601 if (py_level == NULL) {
36602 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
36606 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
36607 if (PyLong_Check(py_level)) {
36608 unsigned long long test_var;
36609 test_var = PyLong_AsUnsignedLongLong(py_level);
36610 if (PyErr_Occurred() != NULL) {
36613 if (test_var > uint_max) {
36614 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36615 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36618 r->in.level = test_var;
36619 } else if (PyInt_Check(py_level)) {
36621 test_var = PyInt_AsLong(py_level);
36622 if (test_var < 0 || test_var > uint_max) {
36623 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36624 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36627 r->in.level = test_var;
36629 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36630 PyInt_Type.tp_name, PyLong_Type.tp_name);
36634 if (py_info == NULL) {
36635 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
36639 union srvsvc_NetTransportInfo *info_switch_0;
36640 info_switch_0 = py_export_srvsvc_NetTransportInfo(r, r->in.level, py_info);
36641 if (info_switch_0 == NULL) {
36644 r->in.info = *info_switch_0;
36649 static PyObject *unpack_py_srvsvc_NetTransportAdd_args_out(struct srvsvc_NetTransportAdd *r)
36654 if (!W_ERROR_IS_OK(r->out.result)) {
36655 PyErr_SetWERROR(r->out.result);
36662 static bool pack_py_srvsvc_NetTransportEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetTransportEnum *r)
36664 PyObject *py_server_unc;
36665 PyObject *py_transports;
36666 PyObject *py_max_buffer;
36667 PyObject *py_resume_handle;
36668 const char *kwnames[] = {
36669 "server_unc", "transports", "max_buffer", "resume_handle", NULL
36672 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetTransportEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_transports, &py_max_buffer, &py_resume_handle)) {
36676 if (py_server_unc == NULL) {
36677 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
36680 if (py_server_unc == Py_None) {
36681 r->in.server_unc = NULL;
36683 r->in.server_unc = NULL;
36684 if (py_server_unc == NULL) {
36685 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
36689 const char *test_str;
36690 const char *talloc_str;
36691 PyObject *unicode = NULL;
36692 if (PyUnicode_Check(py_server_unc)) {
36693 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
36694 if (unicode == NULL) {
36698 test_str = PyString_AS_STRING(unicode);
36699 } else if (PyString_Check(py_server_unc)) {
36700 test_str = PyString_AS_STRING(py_server_unc);
36702 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
36705 talloc_str = talloc_strdup(r, test_str);
36706 if (unicode != NULL) {
36707 Py_DECREF(unicode);
36709 if (talloc_str == NULL) {
36713 r->in.server_unc = talloc_str;
36716 if (py_transports == NULL) {
36717 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.transports");
36720 r->in.transports = talloc_ptrtype(r, r->in.transports);
36721 if (py_transports == NULL) {
36722 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.transports");
36725 PY_CHECK_TYPE(&srvsvc_NetTransportInfoCtr_Type, py_transports, return false;);
36726 if (talloc_reference(r, pytalloc_get_mem_ctx(py_transports)) == NULL) {
36730 r->in.transports = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(py_transports);
36731 if (py_max_buffer == NULL) {
36732 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
36736 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
36737 if (PyLong_Check(py_max_buffer)) {
36738 unsigned long long test_var;
36739 test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
36740 if (PyErr_Occurred() != NULL) {
36743 if (test_var > uint_max) {
36744 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36745 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36748 r->in.max_buffer = test_var;
36749 } else if (PyInt_Check(py_max_buffer)) {
36751 test_var = PyInt_AsLong(py_max_buffer);
36752 if (test_var < 0 || test_var > uint_max) {
36753 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36754 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36757 r->in.max_buffer = test_var;
36759 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36760 PyInt_Type.tp_name, PyLong_Type.tp_name);
36764 if (py_resume_handle == NULL) {
36765 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
36768 if (py_resume_handle == Py_None) {
36769 r->in.resume_handle = NULL;
36771 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
36772 if (py_resume_handle == NULL) {
36773 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.resume_handle");
36777 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
36778 if (PyLong_Check(py_resume_handle)) {
36779 unsigned long long test_var;
36780 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
36781 if (PyErr_Occurred() != NULL) {
36784 if (test_var > uint_max) {
36785 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36786 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36789 *r->in.resume_handle = test_var;
36790 } else if (PyInt_Check(py_resume_handle)) {
36792 test_var = PyInt_AsLong(py_resume_handle);
36793 if (test_var < 0 || test_var > uint_max) {
36794 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36795 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36798 *r->in.resume_handle = test_var;
36800 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36801 PyInt_Type.tp_name, PyLong_Type.tp_name);
36809 static PyObject *unpack_py_srvsvc_NetTransportEnum_args_out(struct srvsvc_NetTransportEnum *r)
36812 PyObject *py_transports;
36813 PyObject *py_totalentries;
36814 PyObject *py_resume_handle;
36815 result = PyTuple_New(3);
36816 py_transports = pytalloc_reference_ex(&srvsvc_NetTransportInfoCtr_Type, r->out.transports, r->out.transports);
36817 PyTuple_SetItem(result, 0, py_transports);
36818 py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
36819 PyTuple_SetItem(result, 1, py_totalentries);
36820 if (r->out.resume_handle == NULL) {
36821 py_resume_handle = Py_None;
36822 Py_INCREF(py_resume_handle);
36824 py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
36826 PyTuple_SetItem(result, 2, py_resume_handle);
36827 if (!W_ERROR_IS_OK(r->out.result)) {
36828 PyErr_SetWERROR(r->out.result);
36835 static bool pack_py_srvsvc_NetTransportDel_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetTransportDel *r)
36837 PyObject *py_server_unc;
36838 PyObject *py_level;
36839 PyObject *py_info0;
36840 const char *kwnames[] = {
36841 "server_unc", "level", "info0", NULL
36844 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetTransportDel", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info0)) {
36848 if (py_server_unc == NULL) {
36849 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
36852 if (py_server_unc == Py_None) {
36853 r->in.server_unc = NULL;
36855 r->in.server_unc = NULL;
36856 if (py_server_unc == NULL) {
36857 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
36861 const char *test_str;
36862 const char *talloc_str;
36863 PyObject *unicode = NULL;
36864 if (PyUnicode_Check(py_server_unc)) {
36865 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
36866 if (unicode == NULL) {
36870 test_str = PyString_AS_STRING(unicode);
36871 } else if (PyString_Check(py_server_unc)) {
36872 test_str = PyString_AS_STRING(py_server_unc);
36874 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
36877 talloc_str = talloc_strdup(r, test_str);
36878 if (unicode != NULL) {
36879 Py_DECREF(unicode);
36881 if (talloc_str == NULL) {
36885 r->in.server_unc = talloc_str;
36888 if (py_level == NULL) {
36889 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
36893 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
36894 if (PyLong_Check(py_level)) {
36895 unsigned long long test_var;
36896 test_var = PyLong_AsUnsignedLongLong(py_level);
36897 if (PyErr_Occurred() != NULL) {
36900 if (test_var > uint_max) {
36901 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
36902 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36905 r->in.level = test_var;
36906 } else if (PyInt_Check(py_level)) {
36908 test_var = PyInt_AsLong(py_level);
36909 if (test_var < 0 || test_var > uint_max) {
36910 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
36911 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
36914 r->in.level = test_var;
36916 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
36917 PyInt_Type.tp_name, PyLong_Type.tp_name);
36921 if (py_info0 == NULL) {
36922 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info0");
36925 r->in.info0 = talloc_ptrtype(r, r->in.info0);
36926 if (py_info0 == NULL) {
36927 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info0");
36930 PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, py_info0, return false;);
36931 if (talloc_reference(r, pytalloc_get_mem_ctx(py_info0)) == NULL) {
36935 r->in.info0 = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_info0);
36939 static PyObject *unpack_py_srvsvc_NetTransportDel_args_out(struct srvsvc_NetTransportDel *r)
36944 if (!W_ERROR_IS_OK(r->out.result)) {
36945 PyErr_SetWERROR(r->out.result);
36952 static bool pack_py_srvsvc_NetRemoteTOD_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetRemoteTOD *r)
36954 PyObject *py_server_unc;
36955 const char *kwnames[] = {
36959 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:srvsvc_NetRemoteTOD", discard_const_p(char *, kwnames), &py_server_unc)) {
36963 if (py_server_unc == NULL) {
36964 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
36967 if (py_server_unc == Py_None) {
36968 r->in.server_unc = NULL;
36970 r->in.server_unc = NULL;
36971 if (py_server_unc == NULL) {
36972 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
36976 const char *test_str;
36977 const char *talloc_str;
36978 PyObject *unicode = NULL;
36979 if (PyUnicode_Check(py_server_unc)) {
36980 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
36981 if (unicode == NULL) {
36985 test_str = PyString_AS_STRING(unicode);
36986 } else if (PyString_Check(py_server_unc)) {
36987 test_str = PyString_AS_STRING(py_server_unc);
36989 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
36992 talloc_str = talloc_strdup(r, test_str);
36993 if (unicode != NULL) {
36994 Py_DECREF(unicode);
36996 if (talloc_str == NULL) {
37000 r->in.server_unc = talloc_str;
37006 static PyObject *unpack_py_srvsvc_NetRemoteTOD_args_out(struct srvsvc_NetRemoteTOD *r)
37010 if (*r->out.info == NULL) {
37012 Py_INCREF(py_info);
37014 py_info = pytalloc_reference_ex(&srvsvc_NetRemoteTODInfo_Type, *r->out.info, *r->out.info);
37017 if (!W_ERROR_IS_OK(r->out.result)) {
37018 PyErr_SetWERROR(r->out.result);
37025 static bool pack_py_srvsvc_NetSetServiceBits_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSetServiceBits *r)
37027 PyObject *py_server_unc;
37028 PyObject *py_transport;
37029 PyObject *py_servicebits;
37030 PyObject *py_updateimmediately;
37031 const char *kwnames[] = {
37032 "server_unc", "transport", "servicebits", "updateimmediately", NULL
37035 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetSetServiceBits", discard_const_p(char *, kwnames), &py_server_unc, &py_transport, &py_servicebits, &py_updateimmediately)) {
37039 if (py_server_unc == NULL) {
37040 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
37043 if (py_server_unc == Py_None) {
37044 r->in.server_unc = NULL;
37046 r->in.server_unc = NULL;
37047 if (py_server_unc == NULL) {
37048 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
37052 const char *test_str;
37053 const char *talloc_str;
37054 PyObject *unicode = NULL;
37055 if (PyUnicode_Check(py_server_unc)) {
37056 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
37057 if (unicode == NULL) {
37061 test_str = PyString_AS_STRING(unicode);
37062 } else if (PyString_Check(py_server_unc)) {
37063 test_str = PyString_AS_STRING(py_server_unc);
37065 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
37068 talloc_str = talloc_strdup(r, test_str);
37069 if (unicode != NULL) {
37070 Py_DECREF(unicode);
37072 if (talloc_str == NULL) {
37076 r->in.server_unc = talloc_str;
37079 if (py_transport == NULL) {
37080 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.transport");
37083 if (py_transport == Py_None) {
37084 r->in.transport = NULL;
37086 r->in.transport = NULL;
37087 if (py_transport == NULL) {
37088 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.transport");
37092 const char *test_str;
37093 const char *talloc_str;
37094 PyObject *unicode = NULL;
37095 if (PyUnicode_Check(py_transport)) {
37096 unicode = PyUnicode_AsEncodedString(py_transport, "utf-8", "ignore");
37097 if (unicode == NULL) {
37101 test_str = PyString_AS_STRING(unicode);
37102 } else if (PyString_Check(py_transport)) {
37103 test_str = PyString_AS_STRING(py_transport);
37105 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_transport)->tp_name);
37108 talloc_str = talloc_strdup(r, test_str);
37109 if (unicode != NULL) {
37110 Py_DECREF(unicode);
37112 if (talloc_str == NULL) {
37116 r->in.transport = talloc_str;
37119 if (py_servicebits == NULL) {
37120 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.servicebits");
37124 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebits));
37125 if (PyLong_Check(py_servicebits)) {
37126 unsigned long long test_var;
37127 test_var = PyLong_AsUnsignedLongLong(py_servicebits);
37128 if (PyErr_Occurred() != NULL) {
37131 if (test_var > uint_max) {
37132 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
37133 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37136 r->in.servicebits = test_var;
37137 } else if (PyInt_Check(py_servicebits)) {
37139 test_var = PyInt_AsLong(py_servicebits);
37140 if (test_var < 0 || test_var > uint_max) {
37141 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
37142 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37145 r->in.servicebits = test_var;
37147 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
37148 PyInt_Type.tp_name, PyLong_Type.tp_name);
37152 if (py_updateimmediately == NULL) {
37153 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.updateimmediately");
37157 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.updateimmediately));
37158 if (PyLong_Check(py_updateimmediately)) {
37159 unsigned long long test_var;
37160 test_var = PyLong_AsUnsignedLongLong(py_updateimmediately);
37161 if (PyErr_Occurred() != NULL) {
37164 if (test_var > uint_max) {
37165 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
37166 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37169 r->in.updateimmediately = test_var;
37170 } else if (PyInt_Check(py_updateimmediately)) {
37172 test_var = PyInt_AsLong(py_updateimmediately);
37173 if (test_var < 0 || test_var > uint_max) {
37174 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
37175 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37178 r->in.updateimmediately = test_var;
37180 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
37181 PyInt_Type.tp_name, PyLong_Type.tp_name);
37188 static PyObject *unpack_py_srvsvc_NetSetServiceBits_args_out(struct srvsvc_NetSetServiceBits *r)
37193 if (!W_ERROR_IS_OK(r->out.result)) {
37194 PyErr_SetWERROR(r->out.result);
37201 static bool pack_py_srvsvc_NetPathType_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPathType *r)
37203 PyObject *py_server_unc;
37205 PyObject *py_pathflags;
37206 const char *kwnames[] = {
37207 "server_unc", "path", "pathflags", NULL
37210 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetPathType", discard_const_p(char *, kwnames), &py_server_unc, &py_path, &py_pathflags)) {
37214 if (py_server_unc == NULL) {
37215 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
37218 if (py_server_unc == Py_None) {
37219 r->in.server_unc = NULL;
37221 r->in.server_unc = NULL;
37222 if (py_server_unc == NULL) {
37223 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
37227 const char *test_str;
37228 const char *talloc_str;
37229 PyObject *unicode = NULL;
37230 if (PyUnicode_Check(py_server_unc)) {
37231 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
37232 if (unicode == NULL) {
37236 test_str = PyString_AS_STRING(unicode);
37237 } else if (PyString_Check(py_server_unc)) {
37238 test_str = PyString_AS_STRING(py_server_unc);
37240 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
37243 talloc_str = talloc_strdup(r, test_str);
37244 if (unicode != NULL) {
37245 Py_DECREF(unicode);
37247 if (talloc_str == NULL) {
37251 r->in.server_unc = talloc_str;
37254 if (py_path == NULL) {
37255 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path");
37259 const char *test_str;
37260 const char *talloc_str;
37261 PyObject *unicode = NULL;
37262 if (PyUnicode_Check(py_path)) {
37263 unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
37264 if (unicode == NULL) {
37268 test_str = PyString_AS_STRING(unicode);
37269 } else if (PyString_Check(py_path)) {
37270 test_str = PyString_AS_STRING(py_path);
37272 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
37275 talloc_str = talloc_strdup(r, test_str);
37276 if (unicode != NULL) {
37277 Py_DECREF(unicode);
37279 if (talloc_str == NULL) {
37283 r->in.path = talloc_str;
37285 if (py_pathflags == NULL) {
37286 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pathflags");
37290 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
37291 if (PyLong_Check(py_pathflags)) {
37292 unsigned long long test_var;
37293 test_var = PyLong_AsUnsignedLongLong(py_pathflags);
37294 if (PyErr_Occurred() != NULL) {
37297 if (test_var > uint_max) {
37298 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
37299 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37302 r->in.pathflags = test_var;
37303 } else if (PyInt_Check(py_pathflags)) {
37305 test_var = PyInt_AsLong(py_pathflags);
37306 if (test_var < 0 || test_var > uint_max) {
37307 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
37308 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37311 r->in.pathflags = test_var;
37313 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
37314 PyInt_Type.tp_name, PyLong_Type.tp_name);
37321 static PyObject *unpack_py_srvsvc_NetPathType_args_out(struct srvsvc_NetPathType *r)
37324 PyObject *py_pathtype;
37325 py_pathtype = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.pathtype);
37326 result = py_pathtype;
37327 if (!W_ERROR_IS_OK(r->out.result)) {
37328 PyErr_SetWERROR(r->out.result);
37335 static bool pack_py_srvsvc_NetPathCanonicalize_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPathCanonicalize *r)
37337 PyObject *py_server_unc;
37339 PyObject *py_maxbuf;
37340 PyObject *py_prefix;
37341 PyObject *py_pathtype;
37342 PyObject *py_pathflags;
37343 const char *kwnames[] = {
37344 "server_unc", "path", "maxbuf", "prefix", "pathtype", "pathflags", NULL
37347 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:srvsvc_NetPathCanonicalize", discard_const_p(char *, kwnames), &py_server_unc, &py_path, &py_maxbuf, &py_prefix, &py_pathtype, &py_pathflags)) {
37351 if (py_server_unc == NULL) {
37352 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
37355 if (py_server_unc == Py_None) {
37356 r->in.server_unc = NULL;
37358 r->in.server_unc = NULL;
37359 if (py_server_unc == NULL) {
37360 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
37364 const char *test_str;
37365 const char *talloc_str;
37366 PyObject *unicode = NULL;
37367 if (PyUnicode_Check(py_server_unc)) {
37368 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
37369 if (unicode == NULL) {
37373 test_str = PyString_AS_STRING(unicode);
37374 } else if (PyString_Check(py_server_unc)) {
37375 test_str = PyString_AS_STRING(py_server_unc);
37377 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
37380 talloc_str = talloc_strdup(r, test_str);
37381 if (unicode != NULL) {
37382 Py_DECREF(unicode);
37384 if (talloc_str == NULL) {
37388 r->in.server_unc = talloc_str;
37391 if (py_path == NULL) {
37392 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path");
37396 const char *test_str;
37397 const char *talloc_str;
37398 PyObject *unicode = NULL;
37399 if (PyUnicode_Check(py_path)) {
37400 unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
37401 if (unicode == NULL) {
37405 test_str = PyString_AS_STRING(unicode);
37406 } else if (PyString_Check(py_path)) {
37407 test_str = PyString_AS_STRING(py_path);
37409 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
37412 talloc_str = talloc_strdup(r, test_str);
37413 if (unicode != NULL) {
37414 Py_DECREF(unicode);
37416 if (talloc_str == NULL) {
37420 r->in.path = talloc_str;
37422 if (py_maxbuf == NULL) {
37423 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.maxbuf");
37427 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.maxbuf));
37428 if (PyLong_Check(py_maxbuf)) {
37429 unsigned long long test_var;
37430 test_var = PyLong_AsUnsignedLongLong(py_maxbuf);
37431 if (PyErr_Occurred() != NULL) {
37434 if (test_var > uint_max) {
37435 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
37436 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37439 r->in.maxbuf = test_var;
37440 } else if (PyInt_Check(py_maxbuf)) {
37442 test_var = PyInt_AsLong(py_maxbuf);
37443 if (test_var < 0 || test_var > uint_max) {
37444 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
37445 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37448 r->in.maxbuf = test_var;
37450 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
37451 PyInt_Type.tp_name, PyLong_Type.tp_name);
37455 if (py_prefix == NULL) {
37456 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.prefix");
37460 const char *test_str;
37461 const char *talloc_str;
37462 PyObject *unicode = NULL;
37463 if (PyUnicode_Check(py_prefix)) {
37464 unicode = PyUnicode_AsEncodedString(py_prefix, "utf-8", "ignore");
37465 if (unicode == NULL) {
37469 test_str = PyString_AS_STRING(unicode);
37470 } else if (PyString_Check(py_prefix)) {
37471 test_str = PyString_AS_STRING(py_prefix);
37473 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_prefix)->tp_name);
37476 talloc_str = talloc_strdup(r, test_str);
37477 if (unicode != NULL) {
37478 Py_DECREF(unicode);
37480 if (talloc_str == NULL) {
37484 r->in.prefix = talloc_str;
37486 if (py_pathtype == NULL) {
37487 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pathtype");
37490 r->in.pathtype = talloc_ptrtype(r, r->in.pathtype);
37491 if (py_pathtype == NULL) {
37492 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.pathtype");
37496 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.pathtype));
37497 if (PyLong_Check(py_pathtype)) {
37498 unsigned long long test_var;
37499 test_var = PyLong_AsUnsignedLongLong(py_pathtype);
37500 if (PyErr_Occurred() != NULL) {
37503 if (test_var > uint_max) {
37504 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
37505 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37508 *r->in.pathtype = test_var;
37509 } else if (PyInt_Check(py_pathtype)) {
37511 test_var = PyInt_AsLong(py_pathtype);
37512 if (test_var < 0 || test_var > uint_max) {
37513 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
37514 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37517 *r->in.pathtype = test_var;
37519 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
37520 PyInt_Type.tp_name, PyLong_Type.tp_name);
37524 if (py_pathflags == NULL) {
37525 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pathflags");
37529 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
37530 if (PyLong_Check(py_pathflags)) {
37531 unsigned long long test_var;
37532 test_var = PyLong_AsUnsignedLongLong(py_pathflags);
37533 if (PyErr_Occurred() != NULL) {
37536 if (test_var > uint_max) {
37537 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
37538 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37541 r->in.pathflags = test_var;
37542 } else if (PyInt_Check(py_pathflags)) {
37544 test_var = PyInt_AsLong(py_pathflags);
37545 if (test_var < 0 || test_var > uint_max) {
37546 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
37547 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37550 r->in.pathflags = test_var;
37552 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
37553 PyInt_Type.tp_name, PyLong_Type.tp_name);
37560 static PyObject *unpack_py_srvsvc_NetPathCanonicalize_args_out(struct srvsvc_NetPathCanonicalize *r)
37563 PyObject *py_can_path;
37564 PyObject *py_pathtype;
37565 result = PyTuple_New(2);
37566 py_can_path = PyList_New(r->in.maxbuf);
37567 if (py_can_path == NULL) {
37571 int can_path_cntr_0;
37572 for (can_path_cntr_0 = 0; can_path_cntr_0 < (r->in.maxbuf); can_path_cntr_0++) {
37573 PyObject *py_can_path_0;
37574 py_can_path_0 = PyInt_FromLong((uint16_t)r->out.can_path[can_path_cntr_0]);
37575 PyList_SetItem(py_can_path, can_path_cntr_0, py_can_path_0);
37578 PyTuple_SetItem(result, 0, py_can_path);
37579 py_pathtype = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.pathtype);
37580 PyTuple_SetItem(result, 1, py_pathtype);
37581 if (!W_ERROR_IS_OK(r->out.result)) {
37582 PyErr_SetWERROR(r->out.result);
37589 static bool pack_py_srvsvc_NetPathCompare_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPathCompare *r)
37591 PyObject *py_server_unc;
37592 PyObject *py_path1;
37593 PyObject *py_path2;
37594 PyObject *py_pathtype;
37595 PyObject *py_pathflags;
37596 const char *kwnames[] = {
37597 "server_unc", "path1", "path2", "pathtype", "pathflags", NULL
37600 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetPathCompare", discard_const_p(char *, kwnames), &py_server_unc, &py_path1, &py_path2, &py_pathtype, &py_pathflags)) {
37604 if (py_server_unc == NULL) {
37605 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
37608 if (py_server_unc == Py_None) {
37609 r->in.server_unc = NULL;
37611 r->in.server_unc = NULL;
37612 if (py_server_unc == NULL) {
37613 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
37617 const char *test_str;
37618 const char *talloc_str;
37619 PyObject *unicode = NULL;
37620 if (PyUnicode_Check(py_server_unc)) {
37621 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
37622 if (unicode == NULL) {
37626 test_str = PyString_AS_STRING(unicode);
37627 } else if (PyString_Check(py_server_unc)) {
37628 test_str = PyString_AS_STRING(py_server_unc);
37630 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
37633 talloc_str = talloc_strdup(r, test_str);
37634 if (unicode != NULL) {
37635 Py_DECREF(unicode);
37637 if (talloc_str == NULL) {
37641 r->in.server_unc = talloc_str;
37644 if (py_path1 == NULL) {
37645 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path1");
37649 const char *test_str;
37650 const char *talloc_str;
37651 PyObject *unicode = NULL;
37652 if (PyUnicode_Check(py_path1)) {
37653 unicode = PyUnicode_AsEncodedString(py_path1, "utf-8", "ignore");
37654 if (unicode == NULL) {
37658 test_str = PyString_AS_STRING(unicode);
37659 } else if (PyString_Check(py_path1)) {
37660 test_str = PyString_AS_STRING(py_path1);
37662 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path1)->tp_name);
37665 talloc_str = talloc_strdup(r, test_str);
37666 if (unicode != NULL) {
37667 Py_DECREF(unicode);
37669 if (talloc_str == NULL) {
37673 r->in.path1 = talloc_str;
37675 if (py_path2 == NULL) {
37676 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path2");
37680 const char *test_str;
37681 const char *talloc_str;
37682 PyObject *unicode = NULL;
37683 if (PyUnicode_Check(py_path2)) {
37684 unicode = PyUnicode_AsEncodedString(py_path2, "utf-8", "ignore");
37685 if (unicode == NULL) {
37689 test_str = PyString_AS_STRING(unicode);
37690 } else if (PyString_Check(py_path2)) {
37691 test_str = PyString_AS_STRING(py_path2);
37693 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path2)->tp_name);
37696 talloc_str = talloc_strdup(r, test_str);
37697 if (unicode != NULL) {
37698 Py_DECREF(unicode);
37700 if (talloc_str == NULL) {
37704 r->in.path2 = talloc_str;
37706 if (py_pathtype == NULL) {
37707 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pathtype");
37711 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathtype));
37712 if (PyLong_Check(py_pathtype)) {
37713 unsigned long long test_var;
37714 test_var = PyLong_AsUnsignedLongLong(py_pathtype);
37715 if (PyErr_Occurred() != NULL) {
37718 if (test_var > uint_max) {
37719 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
37720 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37723 r->in.pathtype = test_var;
37724 } else if (PyInt_Check(py_pathtype)) {
37726 test_var = PyInt_AsLong(py_pathtype);
37727 if (test_var < 0 || test_var > uint_max) {
37728 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
37729 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37732 r->in.pathtype = test_var;
37734 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
37735 PyInt_Type.tp_name, PyLong_Type.tp_name);
37739 if (py_pathflags == NULL) {
37740 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pathflags");
37744 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
37745 if (PyLong_Check(py_pathflags)) {
37746 unsigned long long test_var;
37747 test_var = PyLong_AsUnsignedLongLong(py_pathflags);
37748 if (PyErr_Occurred() != NULL) {
37751 if (test_var > uint_max) {
37752 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
37753 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37756 r->in.pathflags = test_var;
37757 } else if (PyInt_Check(py_pathflags)) {
37759 test_var = PyInt_AsLong(py_pathflags);
37760 if (test_var < 0 || test_var > uint_max) {
37761 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
37762 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37765 r->in.pathflags = test_var;
37767 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
37768 PyInt_Type.tp_name, PyLong_Type.tp_name);
37775 static PyObject *unpack_py_srvsvc_NetPathCompare_args_out(struct srvsvc_NetPathCompare *r)
37780 if (!W_ERROR_IS_OK(r->out.result)) {
37781 PyErr_SetWERROR(r->out.result);
37788 static bool pack_py_srvsvc_NetNameValidate_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetNameValidate *r)
37790 PyObject *py_server_unc;
37792 PyObject *py_name_type;
37793 PyObject *py_flags;
37794 const char *kwnames[] = {
37795 "server_unc", "name", "name_type", "flags", NULL
37798 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetNameValidate", discard_const_p(char *, kwnames), &py_server_unc, &py_name, &py_name_type, &py_flags)) {
37802 if (py_server_unc == NULL) {
37803 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
37806 if (py_server_unc == Py_None) {
37807 r->in.server_unc = NULL;
37809 r->in.server_unc = NULL;
37810 if (py_server_unc == NULL) {
37811 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
37815 const char *test_str;
37816 const char *talloc_str;
37817 PyObject *unicode = NULL;
37818 if (PyUnicode_Check(py_server_unc)) {
37819 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
37820 if (unicode == NULL) {
37824 test_str = PyString_AS_STRING(unicode);
37825 } else if (PyString_Check(py_server_unc)) {
37826 test_str = PyString_AS_STRING(py_server_unc);
37828 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
37831 talloc_str = talloc_strdup(r, test_str);
37832 if (unicode != NULL) {
37833 Py_DECREF(unicode);
37835 if (talloc_str == NULL) {
37839 r->in.server_unc = talloc_str;
37842 if (py_name == NULL) {
37843 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name");
37847 const char *test_str;
37848 const char *talloc_str;
37849 PyObject *unicode = NULL;
37850 if (PyUnicode_Check(py_name)) {
37851 unicode = PyUnicode_AsEncodedString(py_name, "utf-8", "ignore");
37852 if (unicode == NULL) {
37856 test_str = PyString_AS_STRING(unicode);
37857 } else if (PyString_Check(py_name)) {
37858 test_str = PyString_AS_STRING(py_name);
37860 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name)->tp_name);
37863 talloc_str = talloc_strdup(r, test_str);
37864 if (unicode != NULL) {
37865 Py_DECREF(unicode);
37867 if (talloc_str == NULL) {
37871 r->in.name = talloc_str;
37873 if (py_name_type == NULL) {
37874 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name_type");
37878 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.name_type));
37879 if (PyLong_Check(py_name_type)) {
37880 unsigned long long test_var;
37881 test_var = PyLong_AsUnsignedLongLong(py_name_type);
37882 if (PyErr_Occurred() != NULL) {
37885 if (test_var > uint_max) {
37886 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
37887 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37890 r->in.name_type = test_var;
37891 } else if (PyInt_Check(py_name_type)) {
37893 test_var = PyInt_AsLong(py_name_type);
37894 if (test_var < 0 || test_var > uint_max) {
37895 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
37896 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37899 r->in.name_type = test_var;
37901 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
37902 PyInt_Type.tp_name, PyLong_Type.tp_name);
37906 if (py_flags == NULL) {
37907 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
37911 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
37912 if (PyLong_Check(py_flags)) {
37913 unsigned long long test_var;
37914 test_var = PyLong_AsUnsignedLongLong(py_flags);
37915 if (PyErr_Occurred() != NULL) {
37918 if (test_var > uint_max) {
37919 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
37920 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37923 r->in.flags = test_var;
37924 } else if (PyInt_Check(py_flags)) {
37926 test_var = PyInt_AsLong(py_flags);
37927 if (test_var < 0 || test_var > uint_max) {
37928 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
37929 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
37932 r->in.flags = test_var;
37934 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
37935 PyInt_Type.tp_name, PyLong_Type.tp_name);
37942 static PyObject *unpack_py_srvsvc_NetNameValidate_args_out(struct srvsvc_NetNameValidate *r)
37947 if (!W_ERROR_IS_OK(r->out.result)) {
37948 PyErr_SetWERROR(r->out.result);
37955 static bool pack_py_srvsvc_NetPRNameCompare_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPRNameCompare *r)
37957 PyObject *py_server_unc;
37958 PyObject *py_name1;
37959 PyObject *py_name2;
37960 PyObject *py_name_type;
37961 PyObject *py_flags;
37962 const char *kwnames[] = {
37963 "server_unc", "name1", "name2", "name_type", "flags", NULL
37966 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetPRNameCompare", discard_const_p(char *, kwnames), &py_server_unc, &py_name1, &py_name2, &py_name_type, &py_flags)) {
37970 if (py_server_unc == NULL) {
37971 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
37974 if (py_server_unc == Py_None) {
37975 r->in.server_unc = NULL;
37977 r->in.server_unc = NULL;
37978 if (py_server_unc == NULL) {
37979 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
37983 const char *test_str;
37984 const char *talloc_str;
37985 PyObject *unicode = NULL;
37986 if (PyUnicode_Check(py_server_unc)) {
37987 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
37988 if (unicode == NULL) {
37992 test_str = PyString_AS_STRING(unicode);
37993 } else if (PyString_Check(py_server_unc)) {
37994 test_str = PyString_AS_STRING(py_server_unc);
37996 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
37999 talloc_str = talloc_strdup(r, test_str);
38000 if (unicode != NULL) {
38001 Py_DECREF(unicode);
38003 if (talloc_str == NULL) {
38007 r->in.server_unc = talloc_str;
38010 if (py_name1 == NULL) {
38011 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name1");
38015 const char *test_str;
38016 const char *talloc_str;
38017 PyObject *unicode = NULL;
38018 if (PyUnicode_Check(py_name1)) {
38019 unicode = PyUnicode_AsEncodedString(py_name1, "utf-8", "ignore");
38020 if (unicode == NULL) {
38024 test_str = PyString_AS_STRING(unicode);
38025 } else if (PyString_Check(py_name1)) {
38026 test_str = PyString_AS_STRING(py_name1);
38028 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name1)->tp_name);
38031 talloc_str = talloc_strdup(r, test_str);
38032 if (unicode != NULL) {
38033 Py_DECREF(unicode);
38035 if (talloc_str == NULL) {
38039 r->in.name1 = talloc_str;
38041 if (py_name2 == NULL) {
38042 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name2");
38046 const char *test_str;
38047 const char *talloc_str;
38048 PyObject *unicode = NULL;
38049 if (PyUnicode_Check(py_name2)) {
38050 unicode = PyUnicode_AsEncodedString(py_name2, "utf-8", "ignore");
38051 if (unicode == NULL) {
38055 test_str = PyString_AS_STRING(unicode);
38056 } else if (PyString_Check(py_name2)) {
38057 test_str = PyString_AS_STRING(py_name2);
38059 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name2)->tp_name);
38062 talloc_str = talloc_strdup(r, test_str);
38063 if (unicode != NULL) {
38064 Py_DECREF(unicode);
38066 if (talloc_str == NULL) {
38070 r->in.name2 = talloc_str;
38072 if (py_name_type == NULL) {
38073 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name_type");
38077 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.name_type));
38078 if (PyLong_Check(py_name_type)) {
38079 unsigned long long test_var;
38080 test_var = PyLong_AsUnsignedLongLong(py_name_type);
38081 if (PyErr_Occurred() != NULL) {
38084 if (test_var > uint_max) {
38085 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
38086 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38089 r->in.name_type = test_var;
38090 } else if (PyInt_Check(py_name_type)) {
38092 test_var = PyInt_AsLong(py_name_type);
38093 if (test_var < 0 || test_var > uint_max) {
38094 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
38095 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38098 r->in.name_type = test_var;
38100 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
38101 PyInt_Type.tp_name, PyLong_Type.tp_name);
38105 if (py_flags == NULL) {
38106 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
38110 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
38111 if (PyLong_Check(py_flags)) {
38112 unsigned long long test_var;
38113 test_var = PyLong_AsUnsignedLongLong(py_flags);
38114 if (PyErr_Occurred() != NULL) {
38117 if (test_var > uint_max) {
38118 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
38119 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38122 r->in.flags = test_var;
38123 } else if (PyInt_Check(py_flags)) {
38125 test_var = PyInt_AsLong(py_flags);
38126 if (test_var < 0 || test_var > uint_max) {
38127 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
38128 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38131 r->in.flags = test_var;
38133 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
38134 PyInt_Type.tp_name, PyLong_Type.tp_name);
38141 static PyObject *unpack_py_srvsvc_NetPRNameCompare_args_out(struct srvsvc_NetPRNameCompare *r)
38146 if (!W_ERROR_IS_OK(r->out.result)) {
38147 PyErr_SetWERROR(r->out.result);
38154 static bool pack_py_srvsvc_NetShareEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareEnum *r)
38156 PyObject *py_server_unc;
38157 PyObject *py_info_ctr;
38158 PyObject *py_max_buffer;
38159 PyObject *py_resume_handle;
38160 const char *kwnames[] = {
38161 "server_unc", "info_ctr", "max_buffer", "resume_handle", NULL
38164 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetShareEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
38168 if (py_server_unc == NULL) {
38169 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
38172 if (py_server_unc == Py_None) {
38173 r->in.server_unc = NULL;
38175 r->in.server_unc = NULL;
38176 if (py_server_unc == NULL) {
38177 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
38181 const char *test_str;
38182 const char *talloc_str;
38183 PyObject *unicode = NULL;
38184 if (PyUnicode_Check(py_server_unc)) {
38185 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
38186 if (unicode == NULL) {
38190 test_str = PyString_AS_STRING(unicode);
38191 } else if (PyString_Check(py_server_unc)) {
38192 test_str = PyString_AS_STRING(py_server_unc);
38194 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
38197 talloc_str = talloc_strdup(r, test_str);
38198 if (unicode != NULL) {
38199 Py_DECREF(unicode);
38201 if (talloc_str == NULL) {
38205 r->in.server_unc = talloc_str;
38208 if (py_info_ctr == NULL) {
38209 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
38212 r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
38213 if (py_info_ctr == NULL) {
38214 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.info_ctr");
38217 PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, py_info_ctr, return false;);
38218 if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
38222 r->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_info_ctr);
38223 if (py_max_buffer == NULL) {
38224 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
38228 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
38229 if (PyLong_Check(py_max_buffer)) {
38230 unsigned long long test_var;
38231 test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
38232 if (PyErr_Occurred() != NULL) {
38235 if (test_var > uint_max) {
38236 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
38237 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38240 r->in.max_buffer = test_var;
38241 } else if (PyInt_Check(py_max_buffer)) {
38243 test_var = PyInt_AsLong(py_max_buffer);
38244 if (test_var < 0 || test_var > uint_max) {
38245 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
38246 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38249 r->in.max_buffer = test_var;
38251 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
38252 PyInt_Type.tp_name, PyLong_Type.tp_name);
38256 if (py_resume_handle == NULL) {
38257 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
38260 if (py_resume_handle == Py_None) {
38261 r->in.resume_handle = NULL;
38263 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
38264 if (py_resume_handle == NULL) {
38265 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.resume_handle");
38269 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
38270 if (PyLong_Check(py_resume_handle)) {
38271 unsigned long long test_var;
38272 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
38273 if (PyErr_Occurred() != NULL) {
38276 if (test_var > uint_max) {
38277 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
38278 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38281 *r->in.resume_handle = test_var;
38282 } else if (PyInt_Check(py_resume_handle)) {
38284 test_var = PyInt_AsLong(py_resume_handle);
38285 if (test_var < 0 || test_var > uint_max) {
38286 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
38287 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38290 *r->in.resume_handle = test_var;
38292 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
38293 PyInt_Type.tp_name, PyLong_Type.tp_name);
38301 static PyObject *unpack_py_srvsvc_NetShareEnum_args_out(struct srvsvc_NetShareEnum *r)
38304 PyObject *py_info_ctr;
38305 PyObject *py_totalentries;
38306 PyObject *py_resume_handle;
38307 result = PyTuple_New(3);
38308 py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
38309 PyTuple_SetItem(result, 0, py_info_ctr);
38310 py_totalentries = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
38311 PyTuple_SetItem(result, 1, py_totalentries);
38312 if (r->out.resume_handle == NULL) {
38313 py_resume_handle = Py_None;
38314 Py_INCREF(py_resume_handle);
38316 py_resume_handle = ndr_PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
38318 PyTuple_SetItem(result, 2, py_resume_handle);
38319 if (!W_ERROR_IS_OK(r->out.result)) {
38320 PyErr_SetWERROR(r->out.result);
38327 static bool pack_py_srvsvc_NetShareDelStart_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDelStart *r)
38329 PyObject *py_server_unc;
38330 PyObject *py_share;
38331 PyObject *py_reserved;
38332 const char *kwnames[] = {
38333 "server_unc", "share", "reserved", NULL
38336 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareDelStart", discard_const_p(char *, kwnames), &py_server_unc, &py_share, &py_reserved)) {
38340 if (py_server_unc == NULL) {
38341 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
38344 if (py_server_unc == Py_None) {
38345 r->in.server_unc = NULL;
38347 r->in.server_unc = NULL;
38348 if (py_server_unc == NULL) {
38349 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
38353 const char *test_str;
38354 const char *talloc_str;
38355 PyObject *unicode = NULL;
38356 if (PyUnicode_Check(py_server_unc)) {
38357 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
38358 if (unicode == NULL) {
38362 test_str = PyString_AS_STRING(unicode);
38363 } else if (PyString_Check(py_server_unc)) {
38364 test_str = PyString_AS_STRING(py_server_unc);
38366 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
38369 talloc_str = talloc_strdup(r, test_str);
38370 if (unicode != NULL) {
38371 Py_DECREF(unicode);
38373 if (talloc_str == NULL) {
38377 r->in.server_unc = talloc_str;
38380 if (py_share == NULL) {
38381 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share");
38385 const char *test_str;
38386 const char *talloc_str;
38387 PyObject *unicode = NULL;
38388 if (PyUnicode_Check(py_share)) {
38389 unicode = PyUnicode_AsEncodedString(py_share, "utf-8", "ignore");
38390 if (unicode == NULL) {
38394 test_str = PyString_AS_STRING(unicode);
38395 } else if (PyString_Check(py_share)) {
38396 test_str = PyString_AS_STRING(py_share);
38398 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
38401 talloc_str = talloc_strdup(r, test_str);
38402 if (unicode != NULL) {
38403 Py_DECREF(unicode);
38405 if (talloc_str == NULL) {
38409 r->in.share = talloc_str;
38411 if (py_reserved == NULL) {
38412 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.reserved");
38416 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
38417 if (PyLong_Check(py_reserved)) {
38418 unsigned long long test_var;
38419 test_var = PyLong_AsUnsignedLongLong(py_reserved);
38420 if (PyErr_Occurred() != NULL) {
38423 if (test_var > uint_max) {
38424 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
38425 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38428 r->in.reserved = test_var;
38429 } else if (PyInt_Check(py_reserved)) {
38431 test_var = PyInt_AsLong(py_reserved);
38432 if (test_var < 0 || test_var > uint_max) {
38433 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
38434 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38437 r->in.reserved = test_var;
38439 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
38440 PyInt_Type.tp_name, PyLong_Type.tp_name);
38447 static PyObject *unpack_py_srvsvc_NetShareDelStart_args_out(struct srvsvc_NetShareDelStart *r)
38451 if (r->out.hnd == NULL) {
38455 py_hnd = pytalloc_reference_ex(policy_handle_Type, r->out.hnd, r->out.hnd);
38458 if (!W_ERROR_IS_OK(r->out.result)) {
38459 PyErr_SetWERROR(r->out.result);
38466 static bool pack_py_srvsvc_NetShareDelCommit_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDelCommit *r)
38469 const char *kwnames[] = {
38473 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:srvsvc_NetShareDelCommit", discard_const_p(char *, kwnames), &py_hnd)) {
38477 if (py_hnd == NULL) {
38478 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.hnd");
38481 if (py_hnd == Py_None) {
38485 if (py_hnd == NULL) {
38486 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.hnd");
38489 PY_CHECK_TYPE(policy_handle_Type, py_hnd, return false;);
38490 if (talloc_reference(r, pytalloc_get_mem_ctx(py_hnd)) == NULL) {
38494 r->in.hnd = (struct policy_handle *)pytalloc_get_ptr(py_hnd);
38499 static PyObject *unpack_py_srvsvc_NetShareDelCommit_args_out(struct srvsvc_NetShareDelCommit *r)
38503 if (r->out.hnd == NULL) {
38507 py_hnd = pytalloc_reference_ex(policy_handle_Type, r->out.hnd, r->out.hnd);
38510 if (!W_ERROR_IS_OK(r->out.result)) {
38511 PyErr_SetWERROR(r->out.result);
38518 static bool pack_py_srvsvc_NetGetFileSecurity_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetGetFileSecurity *r)
38520 PyObject *py_server_unc;
38521 PyObject *py_share;
38523 PyObject *py_securityinformation;
38524 const char *kwnames[] = {
38525 "server_unc", "share", "file", "securityinformation", NULL
38528 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetGetFileSecurity", discard_const_p(char *, kwnames), &py_server_unc, &py_share, &py_file, &py_securityinformation)) {
38532 if (py_server_unc == NULL) {
38533 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
38536 if (py_server_unc == Py_None) {
38537 r->in.server_unc = NULL;
38539 r->in.server_unc = NULL;
38540 if (py_server_unc == NULL) {
38541 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
38545 const char *test_str;
38546 const char *talloc_str;
38547 PyObject *unicode = NULL;
38548 if (PyUnicode_Check(py_server_unc)) {
38549 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
38550 if (unicode == NULL) {
38554 test_str = PyString_AS_STRING(unicode);
38555 } else if (PyString_Check(py_server_unc)) {
38556 test_str = PyString_AS_STRING(py_server_unc);
38558 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
38561 talloc_str = talloc_strdup(r, test_str);
38562 if (unicode != NULL) {
38563 Py_DECREF(unicode);
38565 if (talloc_str == NULL) {
38569 r->in.server_unc = talloc_str;
38572 if (py_share == NULL) {
38573 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share");
38576 if (py_share == Py_None) {
38577 r->in.share = NULL;
38579 r->in.share = NULL;
38580 if (py_share == NULL) {
38581 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.share");
38585 const char *test_str;
38586 const char *talloc_str;
38587 PyObject *unicode = NULL;
38588 if (PyUnicode_Check(py_share)) {
38589 unicode = PyUnicode_AsEncodedString(py_share, "utf-8", "ignore");
38590 if (unicode == NULL) {
38594 test_str = PyString_AS_STRING(unicode);
38595 } else if (PyString_Check(py_share)) {
38596 test_str = PyString_AS_STRING(py_share);
38598 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
38601 talloc_str = talloc_strdup(r, test_str);
38602 if (unicode != NULL) {
38603 Py_DECREF(unicode);
38605 if (talloc_str == NULL) {
38609 r->in.share = talloc_str;
38612 if (py_file == NULL) {
38613 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.file");
38617 const char *test_str;
38618 const char *talloc_str;
38619 PyObject *unicode = NULL;
38620 if (PyUnicode_Check(py_file)) {
38621 unicode = PyUnicode_AsEncodedString(py_file, "utf-8", "ignore");
38622 if (unicode == NULL) {
38626 test_str = PyString_AS_STRING(unicode);
38627 } else if (PyString_Check(py_file)) {
38628 test_str = PyString_AS_STRING(py_file);
38630 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_file)->tp_name);
38633 talloc_str = talloc_strdup(r, test_str);
38634 if (unicode != NULL) {
38635 Py_DECREF(unicode);
38637 if (talloc_str == NULL) {
38641 r->in.file = talloc_str;
38643 if (py_securityinformation == NULL) {
38644 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.securityinformation");
38648 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.securityinformation));
38649 if (PyLong_Check(py_securityinformation)) {
38650 unsigned long long test_var;
38651 test_var = PyLong_AsUnsignedLongLong(py_securityinformation);
38652 if (PyErr_Occurred() != NULL) {
38655 if (test_var > uint_max) {
38656 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
38657 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38660 r->in.securityinformation = test_var;
38661 } else if (PyInt_Check(py_securityinformation)) {
38663 test_var = PyInt_AsLong(py_securityinformation);
38664 if (test_var < 0 || test_var > uint_max) {
38665 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
38666 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38669 r->in.securityinformation = test_var;
38671 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
38672 PyInt_Type.tp_name, PyLong_Type.tp_name);
38679 static PyObject *unpack_py_srvsvc_NetGetFileSecurity_args_out(struct srvsvc_NetGetFileSecurity *r)
38682 PyObject *py_sd_buf;
38683 if (*r->out.sd_buf == NULL) {
38684 py_sd_buf = Py_None;
38685 Py_INCREF(py_sd_buf);
38687 py_sd_buf = pytalloc_reference_ex(sec_desc_buf_Type, *r->out.sd_buf, *r->out.sd_buf);
38689 result = py_sd_buf;
38690 if (!W_ERROR_IS_OK(r->out.result)) {
38691 PyErr_SetWERROR(r->out.result);
38698 static bool pack_py_srvsvc_NetSetFileSecurity_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSetFileSecurity *r)
38700 PyObject *py_server_unc;
38701 PyObject *py_share;
38703 PyObject *py_securityinformation;
38704 PyObject *py_sd_buf;
38705 const char *kwnames[] = {
38706 "server_unc", "share", "file", "securityinformation", "sd_buf", NULL
38709 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetSetFileSecurity", discard_const_p(char *, kwnames), &py_server_unc, &py_share, &py_file, &py_securityinformation, &py_sd_buf)) {
38713 if (py_server_unc == NULL) {
38714 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
38717 if (py_server_unc == Py_None) {
38718 r->in.server_unc = NULL;
38720 r->in.server_unc = NULL;
38721 if (py_server_unc == NULL) {
38722 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
38726 const char *test_str;
38727 const char *talloc_str;
38728 PyObject *unicode = NULL;
38729 if (PyUnicode_Check(py_server_unc)) {
38730 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
38731 if (unicode == NULL) {
38735 test_str = PyString_AS_STRING(unicode);
38736 } else if (PyString_Check(py_server_unc)) {
38737 test_str = PyString_AS_STRING(py_server_unc);
38739 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
38742 talloc_str = talloc_strdup(r, test_str);
38743 if (unicode != NULL) {
38744 Py_DECREF(unicode);
38746 if (talloc_str == NULL) {
38750 r->in.server_unc = talloc_str;
38753 if (py_share == NULL) {
38754 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share");
38757 if (py_share == Py_None) {
38758 r->in.share = NULL;
38760 r->in.share = NULL;
38761 if (py_share == NULL) {
38762 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.share");
38766 const char *test_str;
38767 const char *talloc_str;
38768 PyObject *unicode = NULL;
38769 if (PyUnicode_Check(py_share)) {
38770 unicode = PyUnicode_AsEncodedString(py_share, "utf-8", "ignore");
38771 if (unicode == NULL) {
38775 test_str = PyString_AS_STRING(unicode);
38776 } else if (PyString_Check(py_share)) {
38777 test_str = PyString_AS_STRING(py_share);
38779 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
38782 talloc_str = talloc_strdup(r, test_str);
38783 if (unicode != NULL) {
38784 Py_DECREF(unicode);
38786 if (talloc_str == NULL) {
38790 r->in.share = talloc_str;
38793 if (py_file == NULL) {
38794 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.file");
38798 const char *test_str;
38799 const char *talloc_str;
38800 PyObject *unicode = NULL;
38801 if (PyUnicode_Check(py_file)) {
38802 unicode = PyUnicode_AsEncodedString(py_file, "utf-8", "ignore");
38803 if (unicode == NULL) {
38807 test_str = PyString_AS_STRING(unicode);
38808 } else if (PyString_Check(py_file)) {
38809 test_str = PyString_AS_STRING(py_file);
38811 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_file)->tp_name);
38814 talloc_str = talloc_strdup(r, test_str);
38815 if (unicode != NULL) {
38816 Py_DECREF(unicode);
38818 if (talloc_str == NULL) {
38822 r->in.file = talloc_str;
38824 if (py_securityinformation == NULL) {
38825 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.securityinformation");
38829 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.securityinformation));
38830 if (PyLong_Check(py_securityinformation)) {
38831 unsigned long long test_var;
38832 test_var = PyLong_AsUnsignedLongLong(py_securityinformation);
38833 if (PyErr_Occurred() != NULL) {
38836 if (test_var > uint_max) {
38837 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
38838 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38841 r->in.securityinformation = test_var;
38842 } else if (PyInt_Check(py_securityinformation)) {
38844 test_var = PyInt_AsLong(py_securityinformation);
38845 if (test_var < 0 || test_var > uint_max) {
38846 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
38847 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38850 r->in.securityinformation = test_var;
38852 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
38853 PyInt_Type.tp_name, PyLong_Type.tp_name);
38857 if (py_sd_buf == NULL) {
38858 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sd_buf");
38861 r->in.sd_buf = talloc_ptrtype(r, r->in.sd_buf);
38862 if (py_sd_buf == NULL) {
38863 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.sd_buf");
38866 PY_CHECK_TYPE(sec_desc_buf_Type, py_sd_buf, return false;);
38867 if (talloc_reference(r, pytalloc_get_mem_ctx(py_sd_buf)) == NULL) {
38871 r->in.sd_buf = (struct sec_desc_buf *)pytalloc_get_ptr(py_sd_buf);
38875 static PyObject *unpack_py_srvsvc_NetSetFileSecurity_args_out(struct srvsvc_NetSetFileSecurity *r)
38880 if (!W_ERROR_IS_OK(r->out.result)) {
38881 PyErr_SetWERROR(r->out.result);
38888 static bool pack_py_srvsvc_NetServerTransportAddEx_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetServerTransportAddEx *r)
38890 PyObject *py_server_unc;
38891 PyObject *py_level;
38893 const char *kwnames[] = {
38894 "server_unc", "level", "info", NULL
38897 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetServerTransportAddEx", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info)) {
38901 if (py_server_unc == NULL) {
38902 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
38905 if (py_server_unc == Py_None) {
38906 r->in.server_unc = NULL;
38908 r->in.server_unc = NULL;
38909 if (py_server_unc == NULL) {
38910 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
38914 const char *test_str;
38915 const char *talloc_str;
38916 PyObject *unicode = NULL;
38917 if (PyUnicode_Check(py_server_unc)) {
38918 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
38919 if (unicode == NULL) {
38923 test_str = PyString_AS_STRING(unicode);
38924 } else if (PyString_Check(py_server_unc)) {
38925 test_str = PyString_AS_STRING(py_server_unc);
38927 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
38930 talloc_str = talloc_strdup(r, test_str);
38931 if (unicode != NULL) {
38932 Py_DECREF(unicode);
38934 if (talloc_str == NULL) {
38938 r->in.server_unc = talloc_str;
38941 if (py_level == NULL) {
38942 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
38946 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
38947 if (PyLong_Check(py_level)) {
38948 unsigned long long test_var;
38949 test_var = PyLong_AsUnsignedLongLong(py_level);
38950 if (PyErr_Occurred() != NULL) {
38953 if (test_var > uint_max) {
38954 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
38955 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38958 r->in.level = test_var;
38959 } else if (PyInt_Check(py_level)) {
38961 test_var = PyInt_AsLong(py_level);
38962 if (test_var < 0 || test_var > uint_max) {
38963 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
38964 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
38967 r->in.level = test_var;
38969 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
38970 PyInt_Type.tp_name, PyLong_Type.tp_name);
38974 if (py_info == NULL) {
38975 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
38979 union srvsvc_NetTransportInfo *info_switch_0;
38980 info_switch_0 = py_export_srvsvc_NetTransportInfo(r, r->in.level, py_info);
38981 if (info_switch_0 == NULL) {
38984 r->in.info = *info_switch_0;
38989 static PyObject *unpack_py_srvsvc_NetServerTransportAddEx_args_out(struct srvsvc_NetServerTransportAddEx *r)
38994 if (!W_ERROR_IS_OK(r->out.result)) {
38995 PyErr_SetWERROR(r->out.result);
39002 static bool pack_py_srvsvc_NetServerSetServiceBitsEx_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetServerSetServiceBitsEx *r)
39004 PyObject *py_server_unc;
39005 PyObject *py_emulated_server_unc;
39006 PyObject *py_transport;
39007 PyObject *py_servicebitsofinterest;
39008 PyObject *py_servicebits;
39009 PyObject *py_updateimmediately;
39010 const char *kwnames[] = {
39011 "server_unc", "emulated_server_unc", "transport", "servicebitsofinterest", "servicebits", "updateimmediately", NULL
39014 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:srvsvc_NetServerSetServiceBitsEx", discard_const_p(char *, kwnames), &py_server_unc, &py_emulated_server_unc, &py_transport, &py_servicebitsofinterest, &py_servicebits, &py_updateimmediately)) {
39018 if (py_server_unc == NULL) {
39019 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
39022 if (py_server_unc == Py_None) {
39023 r->in.server_unc = NULL;
39025 r->in.server_unc = NULL;
39026 if (py_server_unc == NULL) {
39027 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.server_unc");
39031 const char *test_str;
39032 const char *talloc_str;
39033 PyObject *unicode = NULL;
39034 if (PyUnicode_Check(py_server_unc)) {
39035 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
39036 if (unicode == NULL) {
39040 test_str = PyString_AS_STRING(unicode);
39041 } else if (PyString_Check(py_server_unc)) {
39042 test_str = PyString_AS_STRING(py_server_unc);
39044 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
39047 talloc_str = talloc_strdup(r, test_str);
39048 if (unicode != NULL) {
39049 Py_DECREF(unicode);
39051 if (talloc_str == NULL) {
39055 r->in.server_unc = talloc_str;
39058 if (py_emulated_server_unc == NULL) {
39059 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.emulated_server_unc");
39062 if (py_emulated_server_unc == Py_None) {
39063 r->in.emulated_server_unc = NULL;
39065 r->in.emulated_server_unc = NULL;
39066 if (py_emulated_server_unc == NULL) {
39067 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.emulated_server_unc");
39071 const char *test_str;
39072 const char *talloc_str;
39073 PyObject *unicode = NULL;
39074 if (PyUnicode_Check(py_emulated_server_unc)) {
39075 unicode = PyUnicode_AsEncodedString(py_emulated_server_unc, "utf-8", "ignore");
39076 if (unicode == NULL) {
39080 test_str = PyString_AS_STRING(unicode);
39081 } else if (PyString_Check(py_emulated_server_unc)) {
39082 test_str = PyString_AS_STRING(py_emulated_server_unc);
39084 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_emulated_server_unc)->tp_name);
39087 talloc_str = talloc_strdup(r, test_str);
39088 if (unicode != NULL) {
39089 Py_DECREF(unicode);
39091 if (talloc_str == NULL) {
39095 r->in.emulated_server_unc = talloc_str;
39098 if (py_transport == NULL) {
39099 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.transport");
39102 if (py_transport == Py_None) {
39103 r->in.transport = NULL;
39105 r->in.transport = NULL;
39106 if (py_transport == NULL) {
39107 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct *r->in.transport");
39111 const char *test_str;
39112 const char *talloc_str;
39113 PyObject *unicode = NULL;
39114 if (PyUnicode_Check(py_transport)) {
39115 unicode = PyUnicode_AsEncodedString(py_transport, "utf-8", "ignore");
39116 if (unicode == NULL) {
39120 test_str = PyString_AS_STRING(unicode);
39121 } else if (PyString_Check(py_transport)) {
39122 test_str = PyString_AS_STRING(py_transport);
39124 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_transport)->tp_name);
39127 talloc_str = talloc_strdup(r, test_str);
39128 if (unicode != NULL) {
39129 Py_DECREF(unicode);
39131 if (talloc_str == NULL) {
39135 r->in.transport = talloc_str;
39138 if (py_servicebitsofinterest == NULL) {
39139 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.servicebitsofinterest");
39143 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebitsofinterest));
39144 if (PyLong_Check(py_servicebitsofinterest)) {
39145 unsigned long long test_var;
39146 test_var = PyLong_AsUnsignedLongLong(py_servicebitsofinterest);
39147 if (PyErr_Occurred() != NULL) {
39150 if (test_var > uint_max) {
39151 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
39152 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
39155 r->in.servicebitsofinterest = test_var;
39156 } else if (PyInt_Check(py_servicebitsofinterest)) {
39158 test_var = PyInt_AsLong(py_servicebitsofinterest);
39159 if (test_var < 0 || test_var > uint_max) {
39160 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
39161 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
39164 r->in.servicebitsofinterest = test_var;
39166 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
39167 PyInt_Type.tp_name, PyLong_Type.tp_name);
39171 if (py_servicebits == NULL) {
39172 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.servicebits");
39176 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebits));
39177 if (PyLong_Check(py_servicebits)) {
39178 unsigned long long test_var;
39179 test_var = PyLong_AsUnsignedLongLong(py_servicebits);
39180 if (PyErr_Occurred() != NULL) {
39183 if (test_var > uint_max) {
39184 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
39185 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
39188 r->in.servicebits = test_var;
39189 } else if (PyInt_Check(py_servicebits)) {
39191 test_var = PyInt_AsLong(py_servicebits);
39192 if (test_var < 0 || test_var > uint_max) {
39193 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
39194 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
39197 r->in.servicebits = test_var;
39199 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
39200 PyInt_Type.tp_name, PyLong_Type.tp_name);
39204 if (py_updateimmediately == NULL) {
39205 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.updateimmediately");
39209 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.updateimmediately));
39210 if (PyLong_Check(py_updateimmediately)) {
39211 unsigned long long test_var;
39212 test_var = PyLong_AsUnsignedLongLong(py_updateimmediately);
39213 if (PyErr_Occurred() != NULL) {
39216 if (test_var > uint_max) {
39217 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %llu",\
39218 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
39221 r->in.updateimmediately = test_var;
39222 } else if (PyInt_Check(py_updateimmediately)) {
39224 test_var = PyInt_AsLong(py_updateimmediately);
39225 if (test_var < 0 || test_var > uint_max) {
39226 PyErr_Format(PyExc_OverflowError, "Expected type %s or %s within range 0 - %llu, got %ld",\
39227 PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);
39230 r->in.updateimmediately = test_var;
39232 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
39233 PyInt_Type.tp_name, PyLong_Type.tp_name);
39240 static PyObject *unpack_py_srvsvc_NetServerSetServiceBitsEx_args_out(struct srvsvc_NetServerSetServiceBitsEx *r)
39245 if (!W_ERROR_IS_OK(r->out.result)) {
39246 PyErr_SetWERROR(r->out.result);
39253 const struct PyNdrRpcMethodDef py_ndr_srvsvc_methods[] = {
39254 { "NetCharDevEnum", "S.NetCharDevEnum(server_unc, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevEnum_args_out, 0, &ndr_table_srvsvc },
39255 { "NetCharDevGetInfo", "S.NetCharDevGetInfo(server_unc, device_name, level) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevGetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevGetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevGetInfo_args_out, 1, &ndr_table_srvsvc },
39256 { "NetCharDevControl", "S.NetCharDevControl(server_unc, device_name, opcode) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevControl_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevControl_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevControl_args_out, 2, &ndr_table_srvsvc },
39257 { "NetCharDevQEnum", "S.NetCharDevQEnum(server_unc, user, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevQEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevQEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevQEnum_args_out, 3, &ndr_table_srvsvc },
39258 { "NetCharDevQGetInfo", "S.NetCharDevQGetInfo(server_unc, queue_name, user, level) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevQGetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevQGetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevQGetInfo_args_out, 4, &ndr_table_srvsvc },
39259 { "NetCharDevQSetInfo", "S.NetCharDevQSetInfo(server_unc, queue_name, level, info, parm_error) -> parm_error", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevQSetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevQSetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevQSetInfo_args_out, 5, &ndr_table_srvsvc },
39260 { "NetCharDevQPurge", "S.NetCharDevQPurge(server_unc, queue_name) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevQPurge_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevQPurge_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevQPurge_args_out, 6, &ndr_table_srvsvc },
39261 { "NetCharDevQPurgeSelf", "S.NetCharDevQPurgeSelf(server_unc, queue_name, computer_name) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevQPurgeSelf_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevQPurgeSelf_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevQPurgeSelf_args_out, 7, &ndr_table_srvsvc },
39262 { "NetConnEnum", "S.NetConnEnum(server_unc, path, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetConnEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetConnEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetConnEnum_args_out, 8, &ndr_table_srvsvc },
39263 { "NetFileEnum", "S.NetFileEnum(server_unc, path, user, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetFileEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetFileEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetFileEnum_args_out, 9, &ndr_table_srvsvc },
39264 { "NetFileGetInfo", "S.NetFileGetInfo(server_unc, fid, level) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetFileGetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetFileGetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetFileGetInfo_args_out, 10, &ndr_table_srvsvc },
39265 { "NetFileClose", "S.NetFileClose(server_unc, fid) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetFileClose_r, (py_data_pack_fn)pack_py_srvsvc_NetFileClose_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetFileClose_args_out, 11, &ndr_table_srvsvc },
39266 { "NetSessEnum", "S.NetSessEnum(server_unc, client, user, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSessEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetSessEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSessEnum_args_out, 12, &ndr_table_srvsvc },
39267 { "NetSessDel", "S.NetSessDel(server_unc, client, user) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSessDel_r, (py_data_pack_fn)pack_py_srvsvc_NetSessDel_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSessDel_args_out, 13, &ndr_table_srvsvc },
39268 { "NetShareAdd", "S.NetShareAdd(server_unc, level, info, parm_error) -> parm_error", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareAdd_r, (py_data_pack_fn)pack_py_srvsvc_NetShareAdd_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareAdd_args_out, 14, &ndr_table_srvsvc },
39269 { "NetShareEnumAll", "S.NetShareEnumAll(server_unc, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareEnumAll_r, (py_data_pack_fn)pack_py_srvsvc_NetShareEnumAll_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareEnumAll_args_out, 15, &ndr_table_srvsvc },
39270 { "NetShareGetInfo", "S.NetShareGetInfo(server_unc, share_name, level) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareGetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetShareGetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareGetInfo_args_out, 16, &ndr_table_srvsvc },
39271 { "NetShareSetInfo", "S.NetShareSetInfo(server_unc, share_name, level, info, parm_error) -> parm_error", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareSetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetShareSetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareSetInfo_args_out, 17, &ndr_table_srvsvc },
39272 { "NetShareDel", "S.NetShareDel(server_unc, share_name, reserved) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareDel_r, (py_data_pack_fn)pack_py_srvsvc_NetShareDel_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareDel_args_out, 18, &ndr_table_srvsvc },
39273 { "NetShareDelSticky", "S.NetShareDelSticky(server_unc, share_name, reserved) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareDelSticky_r, (py_data_pack_fn)pack_py_srvsvc_NetShareDelSticky_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareDelSticky_args_out, 19, &ndr_table_srvsvc },
39274 { "NetShareCheck", "S.NetShareCheck(server_unc, device_name) -> type", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareCheck_r, (py_data_pack_fn)pack_py_srvsvc_NetShareCheck_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareCheck_args_out, 20, &ndr_table_srvsvc },
39275 { "NetSrvGetInfo", "S.NetSrvGetInfo(server_unc, level) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSrvGetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetSrvGetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSrvGetInfo_args_out, 21, &ndr_table_srvsvc },
39276 { "NetSrvSetInfo", "S.NetSrvSetInfo(server_unc, level, info, parm_error) -> parm_error", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSrvSetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetSrvSetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSrvSetInfo_args_out, 22, &ndr_table_srvsvc },
39277 { "NetDiskEnum", "S.NetDiskEnum(server_unc, level, info, maxlen, resume_handle) -> (info, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetDiskEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetDiskEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetDiskEnum_args_out, 23, &ndr_table_srvsvc },
39278 { "NetServerStatisticsGet", "S.NetServerStatisticsGet(server_unc, service, level, options) -> stats", (py_dcerpc_call_fn)dcerpc_srvsvc_NetServerStatisticsGet_r, (py_data_pack_fn)pack_py_srvsvc_NetServerStatisticsGet_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetServerStatisticsGet_args_out, 24, &ndr_table_srvsvc },
39279 { "NetTransportAdd", "S.NetTransportAdd(server_unc, level, info) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetTransportAdd_r, (py_data_pack_fn)pack_py_srvsvc_NetTransportAdd_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetTransportAdd_args_out, 25, &ndr_table_srvsvc },
39280 { "NetTransportEnum", "S.NetTransportEnum(server_unc, transports, max_buffer, resume_handle) -> (transports, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetTransportEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetTransportEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetTransportEnum_args_out, 26, &ndr_table_srvsvc },
39281 { "NetTransportDel", "S.NetTransportDel(server_unc, level, info0) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetTransportDel_r, (py_data_pack_fn)pack_py_srvsvc_NetTransportDel_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetTransportDel_args_out, 27, &ndr_table_srvsvc },
39282 { "NetRemoteTOD", "S.NetRemoteTOD(server_unc) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetRemoteTOD_r, (py_data_pack_fn)pack_py_srvsvc_NetRemoteTOD_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetRemoteTOD_args_out, 28, &ndr_table_srvsvc },
39283 { "NetSetServiceBits", "S.NetSetServiceBits(server_unc, transport, servicebits, updateimmediately) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSetServiceBits_r, (py_data_pack_fn)pack_py_srvsvc_NetSetServiceBits_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSetServiceBits_args_out, 29, &ndr_table_srvsvc },
39284 { "NetPathType", "S.NetPathType(server_unc, path, pathflags) -> pathtype", (py_dcerpc_call_fn)dcerpc_srvsvc_NetPathType_r, (py_data_pack_fn)pack_py_srvsvc_NetPathType_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetPathType_args_out, 30, &ndr_table_srvsvc },
39285 { "NetPathCanonicalize", "S.NetPathCanonicalize(server_unc, path, maxbuf, prefix, pathtype, pathflags) -> (can_path, pathtype)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetPathCanonicalize_r, (py_data_pack_fn)pack_py_srvsvc_NetPathCanonicalize_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetPathCanonicalize_args_out, 31, &ndr_table_srvsvc },
39286 { "NetPathCompare", "S.NetPathCompare(server_unc, path1, path2, pathtype, pathflags) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetPathCompare_r, (py_data_pack_fn)pack_py_srvsvc_NetPathCompare_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetPathCompare_args_out, 32, &ndr_table_srvsvc },
39287 { "NetNameValidate", "S.NetNameValidate(server_unc, name, name_type, flags) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetNameValidate_r, (py_data_pack_fn)pack_py_srvsvc_NetNameValidate_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetNameValidate_args_out, 33, &ndr_table_srvsvc },
39288 { "NetPRNameCompare", "S.NetPRNameCompare(server_unc, name1, name2, name_type, flags) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetPRNameCompare_r, (py_data_pack_fn)pack_py_srvsvc_NetPRNameCompare_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetPRNameCompare_args_out, 35, &ndr_table_srvsvc },
39289 { "NetShareEnum", "S.NetShareEnum(server_unc, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetShareEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareEnum_args_out, 36, &ndr_table_srvsvc },
39290 { "NetShareDelStart", "S.NetShareDelStart(server_unc, share, reserved) -> hnd", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareDelStart_r, (py_data_pack_fn)pack_py_srvsvc_NetShareDelStart_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareDelStart_args_out, 37, &ndr_table_srvsvc },
39291 { "NetShareDelCommit", "S.NetShareDelCommit(hnd) -> hnd", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareDelCommit_r, (py_data_pack_fn)pack_py_srvsvc_NetShareDelCommit_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareDelCommit_args_out, 38, &ndr_table_srvsvc },
39292 { "NetGetFileSecurity", "S.NetGetFileSecurity(server_unc, share, file, securityinformation) -> sd_buf", (py_dcerpc_call_fn)dcerpc_srvsvc_NetGetFileSecurity_r, (py_data_pack_fn)pack_py_srvsvc_NetGetFileSecurity_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetGetFileSecurity_args_out, 39, &ndr_table_srvsvc },
39293 { "NetSetFileSecurity", "S.NetSetFileSecurity(server_unc, share, file, securityinformation, sd_buf) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSetFileSecurity_r, (py_data_pack_fn)pack_py_srvsvc_NetSetFileSecurity_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSetFileSecurity_args_out, 40, &ndr_table_srvsvc },
39294 { "NetServerTransportAddEx", "S.NetServerTransportAddEx(server_unc, level, info) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetServerTransportAddEx_r, (py_data_pack_fn)pack_py_srvsvc_NetServerTransportAddEx_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetServerTransportAddEx_args_out, 41, &ndr_table_srvsvc },
39295 { "NetServerSetServiceBitsEx", "S.NetServerSetServiceBitsEx(server_unc, emulated_server_unc, transport, servicebitsofinterest, servicebits, updateimmediately) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetServerSetServiceBitsEx_r, (py_data_pack_fn)pack_py_srvsvc_NetServerSetServiceBitsEx_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetServerSetServiceBitsEx_args_out, 42, &ndr_table_srvsvc },
39299 static PyObject *interface_srvsvc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
39301 return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_srvsvc);
39304 #define PY_DOC_SRVSVC "Server Service"
39305 static PyTypeObject srvsvc_InterfaceType = {
39306 PyObject_HEAD_INIT(NULL) 0,
39307 .tp_name = "srvsvc.srvsvc",
39308 .tp_basicsize = sizeof(dcerpc_InterfaceObject),
39309 .tp_doc = "srvsvc(binding, lp_ctx=None, credentials=None) -> connection\n"
39311 "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
39312 "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
39313 "credentials should be a credentials.Credentials object.\n\n"PY_DOC_SRVSVC,
39314 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
39315 .tp_new = interface_srvsvc_new,
39318 static PyObject *syntax_srvsvc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
39320 return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_srvsvc.syntax_id);
39323 #define PY_DOC_SRVSVC_SYNTAX "Server Service"
39324 static PyTypeObject srvsvc_SyntaxType = {
39325 PyObject_HEAD_INIT(NULL) 0,
39326 .tp_name = "srvsvc.srvsvc",
39327 .tp_doc = "abstract_syntax()\n"PY_DOC_SRVSVC_SYNTAX,
39328 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
39329 .tp_new = syntax_srvsvc_new,
39332 static PyMethodDef srvsvc_methods[] = {
39333 { NULL, NULL, 0, NULL }
39336 void initsrvsvc(void)
39339 PyObject *dep_samba_dcerpc_misc;
39340 PyObject *dep_samba_dcerpc_security;
39341 PyObject *dep_samba_dcerpc_svcctl;
39342 PyObject *dep_talloc;
39343 PyObject *dep_samba_dcerpc_base;
39345 dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
39346 if (dep_samba_dcerpc_misc == NULL)
39349 dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
39350 if (dep_samba_dcerpc_security == NULL)
39353 dep_samba_dcerpc_svcctl = PyImport_ImportModule("samba.dcerpc.svcctl");
39354 if (dep_samba_dcerpc_svcctl == NULL)
39357 dep_talloc = PyImport_ImportModule("talloc");
39358 if (dep_talloc == NULL)
39361 dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
39362 if (dep_samba_dcerpc_base == NULL)
39365 BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
39366 if (BaseObject_Type == NULL)
39369 sec_desc_buf_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "sec_desc_buf");
39370 if (sec_desc_buf_Type == NULL)
39373 policy_handle_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "policy_handle");
39374 if (policy_handle_Type == NULL)
39377 ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
39378 if (ClientConnection_Type == NULL)
39381 ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
39382 if (ndr_syntax_id_Type == NULL)
39385 srvsvc_NetCharDevInfo0_Type.tp_base = BaseObject_Type;
39386 srvsvc_NetCharDevInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
39388 srvsvc_NetCharDevCtr0_Type.tp_base = BaseObject_Type;
39389 srvsvc_NetCharDevCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
39391 srvsvc_NetCharDevInfo1_Type.tp_base = BaseObject_Type;
39392 srvsvc_NetCharDevInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
39394 srvsvc_NetCharDevCtr1_Type.tp_base = BaseObject_Type;
39395 srvsvc_NetCharDevCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
39397 srvsvc_NetCharDevInfoCtr_Type.tp_base = BaseObject_Type;
39398 srvsvc_NetCharDevInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
39400 srvsvc_NetCharDevQInfo0_Type.tp_base = BaseObject_Type;
39401 srvsvc_NetCharDevQInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
39403 srvsvc_NetCharDevQCtr0_Type.tp_base = BaseObject_Type;
39404 srvsvc_NetCharDevQCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
39406 srvsvc_NetCharDevQInfo1_Type.tp_base = BaseObject_Type;
39407 srvsvc_NetCharDevQInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
39409 srvsvc_NetCharDevQCtr1_Type.tp_base = BaseObject_Type;
39410 srvsvc_NetCharDevQCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
39412 srvsvc_NetCharDevQInfoCtr_Type.tp_base = BaseObject_Type;
39413 srvsvc_NetCharDevQInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
39415 srvsvc_NetConnInfo0_Type.tp_base = BaseObject_Type;
39416 srvsvc_NetConnInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
39418 srvsvc_NetConnCtr0_Type.tp_base = BaseObject_Type;
39419 srvsvc_NetConnCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
39421 srvsvc_NetConnInfo1_Type.tp_base = BaseObject_Type;
39422 srvsvc_NetConnInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
39424 srvsvc_NetConnCtr1_Type.tp_base = BaseObject_Type;
39425 srvsvc_NetConnCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
39427 srvsvc_NetConnInfoCtr_Type.tp_base = BaseObject_Type;
39428 srvsvc_NetConnInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
39430 srvsvc_NetFileInfo2_Type.tp_base = BaseObject_Type;
39431 srvsvc_NetFileInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
39433 srvsvc_NetFileCtr2_Type.tp_base = BaseObject_Type;
39434 srvsvc_NetFileCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
39436 srvsvc_NetFileInfo3_Type.tp_base = BaseObject_Type;
39437 srvsvc_NetFileInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
39439 srvsvc_NetFileCtr3_Type.tp_base = BaseObject_Type;
39440 srvsvc_NetFileCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
39442 srvsvc_NetFileInfoCtr_Type.tp_base = BaseObject_Type;
39443 srvsvc_NetFileInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
39445 srvsvc_NetSessInfo0_Type.tp_base = BaseObject_Type;
39446 srvsvc_NetSessInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
39448 srvsvc_NetSessCtr0_Type.tp_base = BaseObject_Type;
39449 srvsvc_NetSessCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
39451 srvsvc_NetSessInfo1_Type.tp_base = BaseObject_Type;
39452 srvsvc_NetSessInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
39454 srvsvc_NetSessCtr1_Type.tp_base = BaseObject_Type;
39455 srvsvc_NetSessCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
39457 srvsvc_NetSessInfo2_Type.tp_base = BaseObject_Type;
39458 srvsvc_NetSessInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
39460 srvsvc_NetSessCtr2_Type.tp_base = BaseObject_Type;
39461 srvsvc_NetSessCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
39463 srvsvc_NetSessInfo10_Type.tp_base = BaseObject_Type;
39464 srvsvc_NetSessInfo10_Type.tp_basicsize = pytalloc_BaseObject_size();
39466 srvsvc_NetSessCtr10_Type.tp_base = BaseObject_Type;
39467 srvsvc_NetSessCtr10_Type.tp_basicsize = pytalloc_BaseObject_size();
39469 srvsvc_NetSessInfo502_Type.tp_base = BaseObject_Type;
39470 srvsvc_NetSessInfo502_Type.tp_basicsize = pytalloc_BaseObject_size();
39472 srvsvc_NetSessCtr502_Type.tp_base = BaseObject_Type;
39473 srvsvc_NetSessCtr502_Type.tp_basicsize = pytalloc_BaseObject_size();
39475 srvsvc_NetSessInfoCtr_Type.tp_base = BaseObject_Type;
39476 srvsvc_NetSessInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
39478 srvsvc_NetShareInfo0_Type.tp_base = BaseObject_Type;
39479 srvsvc_NetShareInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
39481 srvsvc_NetShareCtr0_Type.tp_base = BaseObject_Type;
39482 srvsvc_NetShareCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
39484 srvsvc_NetShareInfo1_Type.tp_base = BaseObject_Type;
39485 srvsvc_NetShareInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
39487 srvsvc_NetShareCtr1_Type.tp_base = BaseObject_Type;
39488 srvsvc_NetShareCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
39490 srvsvc_NetShareInfo2_Type.tp_base = BaseObject_Type;
39491 srvsvc_NetShareInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
39493 srvsvc_NetShareCtr2_Type.tp_base = BaseObject_Type;
39494 srvsvc_NetShareCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
39496 srvsvc_NetShareInfo501_Type.tp_base = BaseObject_Type;
39497 srvsvc_NetShareInfo501_Type.tp_basicsize = pytalloc_BaseObject_size();
39499 srvsvc_NetShareCtr501_Type.tp_base = BaseObject_Type;
39500 srvsvc_NetShareCtr501_Type.tp_basicsize = pytalloc_BaseObject_size();
39502 srvsvc_NetShareInfo502_Type.tp_base = BaseObject_Type;
39503 srvsvc_NetShareInfo502_Type.tp_basicsize = pytalloc_BaseObject_size();
39505 srvsvc_NetShareCtr502_Type.tp_base = BaseObject_Type;
39506 srvsvc_NetShareCtr502_Type.tp_basicsize = pytalloc_BaseObject_size();
39508 srvsvc_NetShareInfo1004_Type.tp_base = BaseObject_Type;
39509 srvsvc_NetShareInfo1004_Type.tp_basicsize = pytalloc_BaseObject_size();
39511 srvsvc_NetShareCtr1004_Type.tp_base = BaseObject_Type;
39512 srvsvc_NetShareCtr1004_Type.tp_basicsize = pytalloc_BaseObject_size();
39514 srvsvc_NetShareInfo1005_Type.tp_base = BaseObject_Type;
39515 srvsvc_NetShareInfo1005_Type.tp_basicsize = pytalloc_BaseObject_size();
39517 srvsvc_NetShareCtr1005_Type.tp_base = BaseObject_Type;
39518 srvsvc_NetShareCtr1005_Type.tp_basicsize = pytalloc_BaseObject_size();
39520 srvsvc_NetShareInfo1006_Type.tp_base = BaseObject_Type;
39521 srvsvc_NetShareInfo1006_Type.tp_basicsize = pytalloc_BaseObject_size();
39523 srvsvc_NetShareCtr1006_Type.tp_base = BaseObject_Type;
39524 srvsvc_NetShareCtr1006_Type.tp_basicsize = pytalloc_BaseObject_size();
39526 srvsvc_NetShareInfo1007_Type.tp_base = BaseObject_Type;
39527 srvsvc_NetShareInfo1007_Type.tp_basicsize = pytalloc_BaseObject_size();
39529 srvsvc_NetShareCtr1007_Type.tp_base = BaseObject_Type;
39530 srvsvc_NetShareCtr1007_Type.tp_basicsize = pytalloc_BaseObject_size();
39532 srvsvc_NetShareCtr1501_Type.tp_base = BaseObject_Type;
39533 srvsvc_NetShareCtr1501_Type.tp_basicsize = pytalloc_BaseObject_size();
39535 srvsvc_NetShareInfoCtr_Type.tp_base = BaseObject_Type;
39536 srvsvc_NetShareInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
39538 srvsvc_NetSrvInfo100_Type.tp_base = BaseObject_Type;
39539 srvsvc_NetSrvInfo100_Type.tp_basicsize = pytalloc_BaseObject_size();
39541 srvsvc_NetSrvInfo101_Type.tp_base = BaseObject_Type;
39542 srvsvc_NetSrvInfo101_Type.tp_basicsize = pytalloc_BaseObject_size();
39544 srvsvc_NetSrvInfo102_Type.tp_base = BaseObject_Type;
39545 srvsvc_NetSrvInfo102_Type.tp_basicsize = pytalloc_BaseObject_size();
39547 srvsvc_NetSrvInfo402_Type.tp_base = BaseObject_Type;
39548 srvsvc_NetSrvInfo402_Type.tp_basicsize = pytalloc_BaseObject_size();
39550 srvsvc_NetSrvInfo403_Type.tp_base = BaseObject_Type;
39551 srvsvc_NetSrvInfo403_Type.tp_basicsize = pytalloc_BaseObject_size();
39553 srvsvc_NetSrvInfo502_Type.tp_base = BaseObject_Type;
39554 srvsvc_NetSrvInfo502_Type.tp_basicsize = pytalloc_BaseObject_size();
39556 srvsvc_NetSrvInfo503_Type.tp_base = BaseObject_Type;
39557 srvsvc_NetSrvInfo503_Type.tp_basicsize = pytalloc_BaseObject_size();
39559 srvsvc_NetSrvInfo599_Type.tp_base = BaseObject_Type;
39560 srvsvc_NetSrvInfo599_Type.tp_basicsize = pytalloc_BaseObject_size();
39562 srvsvc_NetSrvInfo1005_Type.tp_base = BaseObject_Type;
39563 srvsvc_NetSrvInfo1005_Type.tp_basicsize = pytalloc_BaseObject_size();
39565 srvsvc_NetSrvInfo1010_Type.tp_base = BaseObject_Type;
39566 srvsvc_NetSrvInfo1010_Type.tp_basicsize = pytalloc_BaseObject_size();
39568 srvsvc_NetSrvInfo1016_Type.tp_base = BaseObject_Type;
39569 srvsvc_NetSrvInfo1016_Type.tp_basicsize = pytalloc_BaseObject_size();
39571 srvsvc_NetSrvInfo1017_Type.tp_base = BaseObject_Type;
39572 srvsvc_NetSrvInfo1017_Type.tp_basicsize = pytalloc_BaseObject_size();
39574 srvsvc_NetSrvInfo1018_Type.tp_base = BaseObject_Type;
39575 srvsvc_NetSrvInfo1018_Type.tp_basicsize = pytalloc_BaseObject_size();
39577 srvsvc_NetSrvInfo1107_Type.tp_base = BaseObject_Type;
39578 srvsvc_NetSrvInfo1107_Type.tp_basicsize = pytalloc_BaseObject_size();
39580 srvsvc_NetSrvInfo1501_Type.tp_base = BaseObject_Type;
39581 srvsvc_NetSrvInfo1501_Type.tp_basicsize = pytalloc_BaseObject_size();
39583 srvsvc_NetSrvInfo1502_Type.tp_base = BaseObject_Type;
39584 srvsvc_NetSrvInfo1502_Type.tp_basicsize = pytalloc_BaseObject_size();
39586 srvsvc_NetSrvInfo1503_Type.tp_base = BaseObject_Type;
39587 srvsvc_NetSrvInfo1503_Type.tp_basicsize = pytalloc_BaseObject_size();
39589 srvsvc_NetSrvInfo1506_Type.tp_base = BaseObject_Type;
39590 srvsvc_NetSrvInfo1506_Type.tp_basicsize = pytalloc_BaseObject_size();
39592 srvsvc_NetSrvInfo1509_Type.tp_base = BaseObject_Type;
39593 srvsvc_NetSrvInfo1509_Type.tp_basicsize = pytalloc_BaseObject_size();
39595 srvsvc_NetSrvInfo1510_Type.tp_base = BaseObject_Type;
39596 srvsvc_NetSrvInfo1510_Type.tp_basicsize = pytalloc_BaseObject_size();
39598 srvsvc_NetSrvInfo1511_Type.tp_base = BaseObject_Type;
39599 srvsvc_NetSrvInfo1511_Type.tp_basicsize = pytalloc_BaseObject_size();
39601 srvsvc_NetSrvInfo1512_Type.tp_base = BaseObject_Type;
39602 srvsvc_NetSrvInfo1512_Type.tp_basicsize = pytalloc_BaseObject_size();
39604 srvsvc_NetSrvInfo1513_Type.tp_base = BaseObject_Type;
39605 srvsvc_NetSrvInfo1513_Type.tp_basicsize = pytalloc_BaseObject_size();
39607 srvsvc_NetSrvInfo1514_Type.tp_base = BaseObject_Type;
39608 srvsvc_NetSrvInfo1514_Type.tp_basicsize = pytalloc_BaseObject_size();
39610 srvsvc_NetSrvInfo1515_Type.tp_base = BaseObject_Type;
39611 srvsvc_NetSrvInfo1515_Type.tp_basicsize = pytalloc_BaseObject_size();
39613 srvsvc_NetSrvInfo1516_Type.tp_base = BaseObject_Type;
39614 srvsvc_NetSrvInfo1516_Type.tp_basicsize = pytalloc_BaseObject_size();
39616 srvsvc_NetSrvInfo1518_Type.tp_base = BaseObject_Type;
39617 srvsvc_NetSrvInfo1518_Type.tp_basicsize = pytalloc_BaseObject_size();
39619 srvsvc_NetSrvInfo1520_Type.tp_base = BaseObject_Type;
39620 srvsvc_NetSrvInfo1520_Type.tp_basicsize = pytalloc_BaseObject_size();
39622 srvsvc_NetSrvInfo1521_Type.tp_base = BaseObject_Type;
39623 srvsvc_NetSrvInfo1521_Type.tp_basicsize = pytalloc_BaseObject_size();
39625 srvsvc_NetSrvInfo1522_Type.tp_base = BaseObject_Type;
39626 srvsvc_NetSrvInfo1522_Type.tp_basicsize = pytalloc_BaseObject_size();
39628 srvsvc_NetSrvInfo1523_Type.tp_base = BaseObject_Type;
39629 srvsvc_NetSrvInfo1523_Type.tp_basicsize = pytalloc_BaseObject_size();
39631 srvsvc_NetSrvInfo1524_Type.tp_base = BaseObject_Type;
39632 srvsvc_NetSrvInfo1524_Type.tp_basicsize = pytalloc_BaseObject_size();
39634 srvsvc_NetSrvInfo1525_Type.tp_base = BaseObject_Type;
39635 srvsvc_NetSrvInfo1525_Type.tp_basicsize = pytalloc_BaseObject_size();
39637 srvsvc_NetSrvInfo1528_Type.tp_base = BaseObject_Type;
39638 srvsvc_NetSrvInfo1528_Type.tp_basicsize = pytalloc_BaseObject_size();
39640 srvsvc_NetSrvInfo1529_Type.tp_base = BaseObject_Type;
39641 srvsvc_NetSrvInfo1529_Type.tp_basicsize = pytalloc_BaseObject_size();
39643 srvsvc_NetSrvInfo1530_Type.tp_base = BaseObject_Type;
39644 srvsvc_NetSrvInfo1530_Type.tp_basicsize = pytalloc_BaseObject_size();
39646 srvsvc_NetSrvInfo1533_Type.tp_base = BaseObject_Type;
39647 srvsvc_NetSrvInfo1533_Type.tp_basicsize = pytalloc_BaseObject_size();
39649 srvsvc_NetSrvInfo1534_Type.tp_base = BaseObject_Type;
39650 srvsvc_NetSrvInfo1534_Type.tp_basicsize = pytalloc_BaseObject_size();
39652 srvsvc_NetSrvInfo1535_Type.tp_base = BaseObject_Type;
39653 srvsvc_NetSrvInfo1535_Type.tp_basicsize = pytalloc_BaseObject_size();
39655 srvsvc_NetSrvInfo1536_Type.tp_base = BaseObject_Type;
39656 srvsvc_NetSrvInfo1536_Type.tp_basicsize = pytalloc_BaseObject_size();
39658 srvsvc_NetSrvInfo1537_Type.tp_base = BaseObject_Type;
39659 srvsvc_NetSrvInfo1537_Type.tp_basicsize = pytalloc_BaseObject_size();
39661 srvsvc_NetSrvInfo1538_Type.tp_base = BaseObject_Type;
39662 srvsvc_NetSrvInfo1538_Type.tp_basicsize = pytalloc_BaseObject_size();
39664 srvsvc_NetSrvInfo1539_Type.tp_base = BaseObject_Type;
39665 srvsvc_NetSrvInfo1539_Type.tp_basicsize = pytalloc_BaseObject_size();
39667 srvsvc_NetSrvInfo1540_Type.tp_base = BaseObject_Type;
39668 srvsvc_NetSrvInfo1540_Type.tp_basicsize = pytalloc_BaseObject_size();
39670 srvsvc_NetSrvInfo1541_Type.tp_base = BaseObject_Type;
39671 srvsvc_NetSrvInfo1541_Type.tp_basicsize = pytalloc_BaseObject_size();
39673 srvsvc_NetSrvInfo1542_Type.tp_base = BaseObject_Type;
39674 srvsvc_NetSrvInfo1542_Type.tp_basicsize = pytalloc_BaseObject_size();
39676 srvsvc_NetSrvInfo1543_Type.tp_base = BaseObject_Type;
39677 srvsvc_NetSrvInfo1543_Type.tp_basicsize = pytalloc_BaseObject_size();
39679 srvsvc_NetSrvInfo1544_Type.tp_base = BaseObject_Type;
39680 srvsvc_NetSrvInfo1544_Type.tp_basicsize = pytalloc_BaseObject_size();
39682 srvsvc_NetSrvInfo1545_Type.tp_base = BaseObject_Type;
39683 srvsvc_NetSrvInfo1545_Type.tp_basicsize = pytalloc_BaseObject_size();
39685 srvsvc_NetSrvInfo1546_Type.tp_base = BaseObject_Type;
39686 srvsvc_NetSrvInfo1546_Type.tp_basicsize = pytalloc_BaseObject_size();
39688 srvsvc_NetSrvInfo1547_Type.tp_base = BaseObject_Type;
39689 srvsvc_NetSrvInfo1547_Type.tp_basicsize = pytalloc_BaseObject_size();
39691 srvsvc_NetSrvInfo1548_Type.tp_base = BaseObject_Type;
39692 srvsvc_NetSrvInfo1548_Type.tp_basicsize = pytalloc_BaseObject_size();
39694 srvsvc_NetSrvInfo1549_Type.tp_base = BaseObject_Type;
39695 srvsvc_NetSrvInfo1549_Type.tp_basicsize = pytalloc_BaseObject_size();
39697 srvsvc_NetSrvInfo1550_Type.tp_base = BaseObject_Type;
39698 srvsvc_NetSrvInfo1550_Type.tp_basicsize = pytalloc_BaseObject_size();
39700 srvsvc_NetSrvInfo1552_Type.tp_base = BaseObject_Type;
39701 srvsvc_NetSrvInfo1552_Type.tp_basicsize = pytalloc_BaseObject_size();
39703 srvsvc_NetSrvInfo1553_Type.tp_base = BaseObject_Type;
39704 srvsvc_NetSrvInfo1553_Type.tp_basicsize = pytalloc_BaseObject_size();
39706 srvsvc_NetSrvInfo1554_Type.tp_base = BaseObject_Type;
39707 srvsvc_NetSrvInfo1554_Type.tp_basicsize = pytalloc_BaseObject_size();
39709 srvsvc_NetSrvInfo1555_Type.tp_base = BaseObject_Type;
39710 srvsvc_NetSrvInfo1555_Type.tp_basicsize = pytalloc_BaseObject_size();
39712 srvsvc_NetSrvInfo1556_Type.tp_base = BaseObject_Type;
39713 srvsvc_NetSrvInfo1556_Type.tp_basicsize = pytalloc_BaseObject_size();
39715 srvsvc_NetDiskInfo0_Type.tp_base = BaseObject_Type;
39716 srvsvc_NetDiskInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
39718 srvsvc_NetDiskInfo_Type.tp_base = BaseObject_Type;
39719 srvsvc_NetDiskInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
39721 srvsvc_Statistics_Type.tp_base = BaseObject_Type;
39722 srvsvc_Statistics_Type.tp_basicsize = pytalloc_BaseObject_size();
39724 srvsvc_NetTransportInfo0_Type.tp_base = BaseObject_Type;
39725 srvsvc_NetTransportInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
39727 srvsvc_NetTransportCtr0_Type.tp_base = BaseObject_Type;
39728 srvsvc_NetTransportCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
39730 srvsvc_NetTransportInfo1_Type.tp_base = BaseObject_Type;
39731 srvsvc_NetTransportInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
39733 srvsvc_NetTransportCtr1_Type.tp_base = BaseObject_Type;
39734 srvsvc_NetTransportCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
39736 srvsvc_NetTransportInfo2_Type.tp_base = BaseObject_Type;
39737 srvsvc_NetTransportInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
39739 srvsvc_NetTransportCtr2_Type.tp_base = BaseObject_Type;
39740 srvsvc_NetTransportCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
39742 srvsvc_NetTransportInfo3_Type.tp_base = BaseObject_Type;
39743 srvsvc_NetTransportInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
39745 srvsvc_NetTransportCtr3_Type.tp_base = BaseObject_Type;
39746 srvsvc_NetTransportCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
39748 srvsvc_NetTransportInfoCtr_Type.tp_base = BaseObject_Type;
39749 srvsvc_NetTransportInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
39751 srvsvc_NetRemoteTODInfo_Type.tp_base = BaseObject_Type;
39752 srvsvc_NetRemoteTODInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
39754 srvsvc_InterfaceType.tp_base = ClientConnection_Type;
39756 srvsvc_SyntaxType.tp_base = ndr_syntax_id_Type;
39757 srvsvc_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
39759 if (PyType_Ready(&srvsvc_NetCharDevInfo0_Type) < 0)
39761 if (PyType_Ready(&srvsvc_NetCharDevCtr0_Type) < 0)
39763 if (PyType_Ready(&srvsvc_NetCharDevInfo1_Type) < 0)
39765 if (PyType_Ready(&srvsvc_NetCharDevCtr1_Type) < 0)
39767 if (PyType_Ready(&srvsvc_NetCharDevInfoCtr_Type) < 0)
39769 if (PyType_Ready(&srvsvc_NetCharDevQInfo0_Type) < 0)
39771 if (PyType_Ready(&srvsvc_NetCharDevQCtr0_Type) < 0)
39773 if (PyType_Ready(&srvsvc_NetCharDevQInfo1_Type) < 0)
39775 if (PyType_Ready(&srvsvc_NetCharDevQCtr1_Type) < 0)
39777 if (PyType_Ready(&srvsvc_NetCharDevQInfoCtr_Type) < 0)
39779 if (PyType_Ready(&srvsvc_NetConnInfo0_Type) < 0)
39781 if (PyType_Ready(&srvsvc_NetConnCtr0_Type) < 0)
39783 if (PyType_Ready(&srvsvc_NetConnInfo1_Type) < 0)
39785 if (PyType_Ready(&srvsvc_NetConnCtr1_Type) < 0)
39787 if (PyType_Ready(&srvsvc_NetConnInfoCtr_Type) < 0)
39789 if (PyType_Ready(&srvsvc_NetFileInfo2_Type) < 0)
39791 if (PyType_Ready(&srvsvc_NetFileCtr2_Type) < 0)
39793 if (PyType_Ready(&srvsvc_NetFileInfo3_Type) < 0)
39795 if (PyType_Ready(&srvsvc_NetFileCtr3_Type) < 0)
39797 if (PyType_Ready(&srvsvc_NetFileInfoCtr_Type) < 0)
39799 if (PyType_Ready(&srvsvc_NetSessInfo0_Type) < 0)
39801 if (PyType_Ready(&srvsvc_NetSessCtr0_Type) < 0)
39803 if (PyType_Ready(&srvsvc_NetSessInfo1_Type) < 0)
39805 if (PyType_Ready(&srvsvc_NetSessCtr1_Type) < 0)
39807 if (PyType_Ready(&srvsvc_NetSessInfo2_Type) < 0)
39809 if (PyType_Ready(&srvsvc_NetSessCtr2_Type) < 0)
39811 if (PyType_Ready(&srvsvc_NetSessInfo10_Type) < 0)
39813 if (PyType_Ready(&srvsvc_NetSessCtr10_Type) < 0)
39815 if (PyType_Ready(&srvsvc_NetSessInfo502_Type) < 0)
39817 if (PyType_Ready(&srvsvc_NetSessCtr502_Type) < 0)
39819 if (PyType_Ready(&srvsvc_NetSessInfoCtr_Type) < 0)
39821 if (PyType_Ready(&srvsvc_NetShareInfo0_Type) < 0)
39823 if (PyType_Ready(&srvsvc_NetShareCtr0_Type) < 0)
39825 if (PyType_Ready(&srvsvc_NetShareInfo1_Type) < 0)
39827 if (PyType_Ready(&srvsvc_NetShareCtr1_Type) < 0)
39829 if (PyType_Ready(&srvsvc_NetShareInfo2_Type) < 0)
39831 if (PyType_Ready(&srvsvc_NetShareCtr2_Type) < 0)
39833 if (PyType_Ready(&srvsvc_NetShareInfo501_Type) < 0)
39835 if (PyType_Ready(&srvsvc_NetShareCtr501_Type) < 0)
39837 if (PyType_Ready(&srvsvc_NetShareInfo502_Type) < 0)
39839 if (PyType_Ready(&srvsvc_NetShareCtr502_Type) < 0)
39841 if (PyType_Ready(&srvsvc_NetShareInfo1004_Type) < 0)
39843 if (PyType_Ready(&srvsvc_NetShareCtr1004_Type) < 0)
39845 if (PyType_Ready(&srvsvc_NetShareInfo1005_Type) < 0)
39847 if (PyType_Ready(&srvsvc_NetShareCtr1005_Type) < 0)
39849 if (PyType_Ready(&srvsvc_NetShareInfo1006_Type) < 0)
39851 if (PyType_Ready(&srvsvc_NetShareCtr1006_Type) < 0)
39853 if (PyType_Ready(&srvsvc_NetShareInfo1007_Type) < 0)
39855 if (PyType_Ready(&srvsvc_NetShareCtr1007_Type) < 0)
39857 if (PyType_Ready(&srvsvc_NetShareCtr1501_Type) < 0)
39859 if (PyType_Ready(&srvsvc_NetShareInfoCtr_Type) < 0)
39861 if (PyType_Ready(&srvsvc_NetSrvInfo100_Type) < 0)
39863 if (PyType_Ready(&srvsvc_NetSrvInfo101_Type) < 0)
39865 if (PyType_Ready(&srvsvc_NetSrvInfo102_Type) < 0)
39867 if (PyType_Ready(&srvsvc_NetSrvInfo402_Type) < 0)
39869 if (PyType_Ready(&srvsvc_NetSrvInfo403_Type) < 0)
39871 if (PyType_Ready(&srvsvc_NetSrvInfo502_Type) < 0)
39873 if (PyType_Ready(&srvsvc_NetSrvInfo503_Type) < 0)
39875 if (PyType_Ready(&srvsvc_NetSrvInfo599_Type) < 0)
39877 if (PyType_Ready(&srvsvc_NetSrvInfo1005_Type) < 0)
39879 if (PyType_Ready(&srvsvc_NetSrvInfo1010_Type) < 0)
39881 if (PyType_Ready(&srvsvc_NetSrvInfo1016_Type) < 0)
39883 if (PyType_Ready(&srvsvc_NetSrvInfo1017_Type) < 0)
39885 if (PyType_Ready(&srvsvc_NetSrvInfo1018_Type) < 0)
39887 if (PyType_Ready(&srvsvc_NetSrvInfo1107_Type) < 0)
39889 if (PyType_Ready(&srvsvc_NetSrvInfo1501_Type) < 0)
39891 if (PyType_Ready(&srvsvc_NetSrvInfo1502_Type) < 0)
39893 if (PyType_Ready(&srvsvc_NetSrvInfo1503_Type) < 0)
39895 if (PyType_Ready(&srvsvc_NetSrvInfo1506_Type) < 0)
39897 if (PyType_Ready(&srvsvc_NetSrvInfo1509_Type) < 0)
39899 if (PyType_Ready(&srvsvc_NetSrvInfo1510_Type) < 0)
39901 if (PyType_Ready(&srvsvc_NetSrvInfo1511_Type) < 0)
39903 if (PyType_Ready(&srvsvc_NetSrvInfo1512_Type) < 0)
39905 if (PyType_Ready(&srvsvc_NetSrvInfo1513_Type) < 0)
39907 if (PyType_Ready(&srvsvc_NetSrvInfo1514_Type) < 0)
39909 if (PyType_Ready(&srvsvc_NetSrvInfo1515_Type) < 0)
39911 if (PyType_Ready(&srvsvc_NetSrvInfo1516_Type) < 0)
39913 if (PyType_Ready(&srvsvc_NetSrvInfo1518_Type) < 0)
39915 if (PyType_Ready(&srvsvc_NetSrvInfo1520_Type) < 0)
39917 if (PyType_Ready(&srvsvc_NetSrvInfo1521_Type) < 0)
39919 if (PyType_Ready(&srvsvc_NetSrvInfo1522_Type) < 0)
39921 if (PyType_Ready(&srvsvc_NetSrvInfo1523_Type) < 0)
39923 if (PyType_Ready(&srvsvc_NetSrvInfo1524_Type) < 0)
39925 if (PyType_Ready(&srvsvc_NetSrvInfo1525_Type) < 0)
39927 if (PyType_Ready(&srvsvc_NetSrvInfo1528_Type) < 0)
39929 if (PyType_Ready(&srvsvc_NetSrvInfo1529_Type) < 0)
39931 if (PyType_Ready(&srvsvc_NetSrvInfo1530_Type) < 0)
39933 if (PyType_Ready(&srvsvc_NetSrvInfo1533_Type) < 0)
39935 if (PyType_Ready(&srvsvc_NetSrvInfo1534_Type) < 0)
39937 if (PyType_Ready(&srvsvc_NetSrvInfo1535_Type) < 0)
39939 if (PyType_Ready(&srvsvc_NetSrvInfo1536_Type) < 0)
39941 if (PyType_Ready(&srvsvc_NetSrvInfo1537_Type) < 0)
39943 if (PyType_Ready(&srvsvc_NetSrvInfo1538_Type) < 0)
39945 if (PyType_Ready(&srvsvc_NetSrvInfo1539_Type) < 0)
39947 if (PyType_Ready(&srvsvc_NetSrvInfo1540_Type) < 0)
39949 if (PyType_Ready(&srvsvc_NetSrvInfo1541_Type) < 0)
39951 if (PyType_Ready(&srvsvc_NetSrvInfo1542_Type) < 0)
39953 if (PyType_Ready(&srvsvc_NetSrvInfo1543_Type) < 0)
39955 if (PyType_Ready(&srvsvc_NetSrvInfo1544_Type) < 0)
39957 if (PyType_Ready(&srvsvc_NetSrvInfo1545_Type) < 0)
39959 if (PyType_Ready(&srvsvc_NetSrvInfo1546_Type) < 0)
39961 if (PyType_Ready(&srvsvc_NetSrvInfo1547_Type) < 0)
39963 if (PyType_Ready(&srvsvc_NetSrvInfo1548_Type) < 0)
39965 if (PyType_Ready(&srvsvc_NetSrvInfo1549_Type) < 0)
39967 if (PyType_Ready(&srvsvc_NetSrvInfo1550_Type) < 0)
39969 if (PyType_Ready(&srvsvc_NetSrvInfo1552_Type) < 0)
39971 if (PyType_Ready(&srvsvc_NetSrvInfo1553_Type) < 0)
39973 if (PyType_Ready(&srvsvc_NetSrvInfo1554_Type) < 0)
39975 if (PyType_Ready(&srvsvc_NetSrvInfo1555_Type) < 0)
39977 if (PyType_Ready(&srvsvc_NetSrvInfo1556_Type) < 0)
39979 if (PyType_Ready(&srvsvc_NetDiskInfo0_Type) < 0)
39981 if (PyType_Ready(&srvsvc_NetDiskInfo_Type) < 0)
39983 if (PyType_Ready(&srvsvc_Statistics_Type) < 0)
39985 if (PyType_Ready(&srvsvc_NetTransportInfo0_Type) < 0)
39987 if (PyType_Ready(&srvsvc_NetTransportCtr0_Type) < 0)
39989 if (PyType_Ready(&srvsvc_NetTransportInfo1_Type) < 0)
39991 if (PyType_Ready(&srvsvc_NetTransportCtr1_Type) < 0)
39993 if (PyType_Ready(&srvsvc_NetTransportInfo2_Type) < 0)
39995 if (PyType_Ready(&srvsvc_NetTransportCtr2_Type) < 0)
39997 if (PyType_Ready(&srvsvc_NetTransportInfo3_Type) < 0)
39999 if (PyType_Ready(&srvsvc_NetTransportCtr3_Type) < 0)
40001 if (PyType_Ready(&srvsvc_NetTransportInfoCtr_Type) < 0)
40003 if (PyType_Ready(&srvsvc_NetRemoteTODInfo_Type) < 0)
40005 if (PyType_Ready(&srvsvc_InterfaceType) < 0)
40007 if (PyType_Ready(&srvsvc_SyntaxType) < 0)
40009 if (!PyInterface_AddNdrRpcMethods(&srvsvc_InterfaceType, py_ndr_srvsvc_methods))
40012 #ifdef PY_NETCHARDEVINFO0_PATCH
40013 PY_NETCHARDEVINFO0_PATCH(&srvsvc_NetCharDevInfo0_Type);
40015 #ifdef PY_NETCHARDEVCTR0_PATCH
40016 PY_NETCHARDEVCTR0_PATCH(&srvsvc_NetCharDevCtr0_Type);
40018 #ifdef PY_NETCHARDEVINFO1_PATCH
40019 PY_NETCHARDEVINFO1_PATCH(&srvsvc_NetCharDevInfo1_Type);
40021 #ifdef PY_NETCHARDEVCTR1_PATCH
40022 PY_NETCHARDEVCTR1_PATCH(&srvsvc_NetCharDevCtr1_Type);
40024 #ifdef PY_NETCHARDEVINFOCTR_PATCH
40025 PY_NETCHARDEVINFOCTR_PATCH(&srvsvc_NetCharDevInfoCtr_Type);
40027 #ifdef PY_NETCHARDEVQINFO0_PATCH
40028 PY_NETCHARDEVQINFO0_PATCH(&srvsvc_NetCharDevQInfo0_Type);
40030 #ifdef PY_NETCHARDEVQCTR0_PATCH
40031 PY_NETCHARDEVQCTR0_PATCH(&srvsvc_NetCharDevQCtr0_Type);
40033 #ifdef PY_NETCHARDEVQINFO1_PATCH
40034 PY_NETCHARDEVQINFO1_PATCH(&srvsvc_NetCharDevQInfo1_Type);
40036 #ifdef PY_NETCHARDEVQCTR1_PATCH
40037 PY_NETCHARDEVQCTR1_PATCH(&srvsvc_NetCharDevQCtr1_Type);
40039 #ifdef PY_NETCHARDEVQINFOCTR_PATCH
40040 PY_NETCHARDEVQINFOCTR_PATCH(&srvsvc_NetCharDevQInfoCtr_Type);
40042 #ifdef PY_NETCONNINFO0_PATCH
40043 PY_NETCONNINFO0_PATCH(&srvsvc_NetConnInfo0_Type);
40045 #ifdef PY_NETCONNCTR0_PATCH
40046 PY_NETCONNCTR0_PATCH(&srvsvc_NetConnCtr0_Type);
40048 #ifdef PY_NETCONNINFO1_PATCH
40049 PY_NETCONNINFO1_PATCH(&srvsvc_NetConnInfo1_Type);
40051 #ifdef PY_NETCONNCTR1_PATCH
40052 PY_NETCONNCTR1_PATCH(&srvsvc_NetConnCtr1_Type);
40054 #ifdef PY_NETCONNINFOCTR_PATCH
40055 PY_NETCONNINFOCTR_PATCH(&srvsvc_NetConnInfoCtr_Type);
40057 #ifdef PY_NETFILEINFO2_PATCH
40058 PY_NETFILEINFO2_PATCH(&srvsvc_NetFileInfo2_Type);
40060 #ifdef PY_NETFILECTR2_PATCH
40061 PY_NETFILECTR2_PATCH(&srvsvc_NetFileCtr2_Type);
40063 #ifdef PY_NETFILEINFO3_PATCH
40064 PY_NETFILEINFO3_PATCH(&srvsvc_NetFileInfo3_Type);
40066 #ifdef PY_NETFILECTR3_PATCH
40067 PY_NETFILECTR3_PATCH(&srvsvc_NetFileCtr3_Type);
40069 #ifdef PY_NETFILEINFOCTR_PATCH
40070 PY_NETFILEINFOCTR_PATCH(&srvsvc_NetFileInfoCtr_Type);
40072 #ifdef PY_NETSESSINFO0_PATCH
40073 PY_NETSESSINFO0_PATCH(&srvsvc_NetSessInfo0_Type);
40075 #ifdef PY_NETSESSCTR0_PATCH
40076 PY_NETSESSCTR0_PATCH(&srvsvc_NetSessCtr0_Type);
40078 #ifdef PY_NETSESSINFO1_PATCH
40079 PY_NETSESSINFO1_PATCH(&srvsvc_NetSessInfo1_Type);
40081 #ifdef PY_NETSESSCTR1_PATCH
40082 PY_NETSESSCTR1_PATCH(&srvsvc_NetSessCtr1_Type);
40084 #ifdef PY_NETSESSINFO2_PATCH
40085 PY_NETSESSINFO2_PATCH(&srvsvc_NetSessInfo2_Type);
40087 #ifdef PY_NETSESSCTR2_PATCH
40088 PY_NETSESSCTR2_PATCH(&srvsvc_NetSessCtr2_Type);
40090 #ifdef PY_NETSESSINFO10_PATCH
40091 PY_NETSESSINFO10_PATCH(&srvsvc_NetSessInfo10_Type);
40093 #ifdef PY_NETSESSCTR10_PATCH
40094 PY_NETSESSCTR10_PATCH(&srvsvc_NetSessCtr10_Type);
40096 #ifdef PY_NETSESSINFO502_PATCH
40097 PY_NETSESSINFO502_PATCH(&srvsvc_NetSessInfo502_Type);
40099 #ifdef PY_NETSESSCTR502_PATCH
40100 PY_NETSESSCTR502_PATCH(&srvsvc_NetSessCtr502_Type);
40102 #ifdef PY_NETSESSINFOCTR_PATCH
40103 PY_NETSESSINFOCTR_PATCH(&srvsvc_NetSessInfoCtr_Type);
40105 #ifdef PY_NETSHAREINFO0_PATCH
40106 PY_NETSHAREINFO0_PATCH(&srvsvc_NetShareInfo0_Type);
40108 #ifdef PY_NETSHARECTR0_PATCH
40109 PY_NETSHARECTR0_PATCH(&srvsvc_NetShareCtr0_Type);
40111 #ifdef PY_NETSHAREINFO1_PATCH
40112 PY_NETSHAREINFO1_PATCH(&srvsvc_NetShareInfo1_Type);
40114 #ifdef PY_NETSHARECTR1_PATCH
40115 PY_NETSHARECTR1_PATCH(&srvsvc_NetShareCtr1_Type);
40117 #ifdef PY_NETSHAREINFO2_PATCH
40118 PY_NETSHAREINFO2_PATCH(&srvsvc_NetShareInfo2_Type);
40120 #ifdef PY_NETSHARECTR2_PATCH
40121 PY_NETSHARECTR2_PATCH(&srvsvc_NetShareCtr2_Type);
40123 #ifdef PY_NETSHAREINFO501_PATCH
40124 PY_NETSHAREINFO501_PATCH(&srvsvc_NetShareInfo501_Type);
40126 #ifdef PY_NETSHARECTR501_PATCH
40127 PY_NETSHARECTR501_PATCH(&srvsvc_NetShareCtr501_Type);
40129 #ifdef PY_NETSHAREINFO502_PATCH
40130 PY_NETSHAREINFO502_PATCH(&srvsvc_NetShareInfo502_Type);
40132 #ifdef PY_NETSHARECTR502_PATCH
40133 PY_NETSHARECTR502_PATCH(&srvsvc_NetShareCtr502_Type);
40135 #ifdef PY_NETSHAREINFO1004_PATCH
40136 PY_NETSHAREINFO1004_PATCH(&srvsvc_NetShareInfo1004_Type);
40138 #ifdef PY_NETSHARECTR1004_PATCH
40139 PY_NETSHARECTR1004_PATCH(&srvsvc_NetShareCtr1004_Type);
40141 #ifdef PY_NETSHAREINFO1005_PATCH
40142 PY_NETSHAREINFO1005_PATCH(&srvsvc_NetShareInfo1005_Type);
40144 #ifdef PY_NETSHARECTR1005_PATCH
40145 PY_NETSHARECTR1005_PATCH(&srvsvc_NetShareCtr1005_Type);
40147 #ifdef PY_NETSHAREINFO1006_PATCH
40148 PY_NETSHAREINFO1006_PATCH(&srvsvc_NetShareInfo1006_Type);
40150 #ifdef PY_NETSHARECTR1006_PATCH
40151 PY_NETSHARECTR1006_PATCH(&srvsvc_NetShareCtr1006_Type);
40153 #ifdef PY_NETSHAREINFO1007_PATCH
40154 PY_NETSHAREINFO1007_PATCH(&srvsvc_NetShareInfo1007_Type);
40156 #ifdef PY_NETSHARECTR1007_PATCH
40157 PY_NETSHARECTR1007_PATCH(&srvsvc_NetShareCtr1007_Type);
40159 #ifdef PY_NETSHARECTR1501_PATCH
40160 PY_NETSHARECTR1501_PATCH(&srvsvc_NetShareCtr1501_Type);
40162 #ifdef PY_NETSHAREINFOCTR_PATCH
40163 PY_NETSHAREINFOCTR_PATCH(&srvsvc_NetShareInfoCtr_Type);
40165 #ifdef PY_NETSRVINFO100_PATCH
40166 PY_NETSRVINFO100_PATCH(&srvsvc_NetSrvInfo100_Type);
40168 #ifdef PY_NETSRVINFO101_PATCH
40169 PY_NETSRVINFO101_PATCH(&srvsvc_NetSrvInfo101_Type);
40171 #ifdef PY_NETSRVINFO102_PATCH
40172 PY_NETSRVINFO102_PATCH(&srvsvc_NetSrvInfo102_Type);
40174 #ifdef PY_NETSRVINFO402_PATCH
40175 PY_NETSRVINFO402_PATCH(&srvsvc_NetSrvInfo402_Type);
40177 #ifdef PY_NETSRVINFO403_PATCH
40178 PY_NETSRVINFO403_PATCH(&srvsvc_NetSrvInfo403_Type);
40180 #ifdef PY_NETSRVINFO502_PATCH
40181 PY_NETSRVINFO502_PATCH(&srvsvc_NetSrvInfo502_Type);
40183 #ifdef PY_NETSRVINFO503_PATCH
40184 PY_NETSRVINFO503_PATCH(&srvsvc_NetSrvInfo503_Type);
40186 #ifdef PY_NETSRVINFO599_PATCH
40187 PY_NETSRVINFO599_PATCH(&srvsvc_NetSrvInfo599_Type);
40189 #ifdef PY_NETSRVINFO1005_PATCH
40190 PY_NETSRVINFO1005_PATCH(&srvsvc_NetSrvInfo1005_Type);
40192 #ifdef PY_NETSRVINFO1010_PATCH
40193 PY_NETSRVINFO1010_PATCH(&srvsvc_NetSrvInfo1010_Type);
40195 #ifdef PY_NETSRVINFO1016_PATCH
40196 PY_NETSRVINFO1016_PATCH(&srvsvc_NetSrvInfo1016_Type);
40198 #ifdef PY_NETSRVINFO1017_PATCH
40199 PY_NETSRVINFO1017_PATCH(&srvsvc_NetSrvInfo1017_Type);
40201 #ifdef PY_NETSRVINFO1018_PATCH
40202 PY_NETSRVINFO1018_PATCH(&srvsvc_NetSrvInfo1018_Type);
40204 #ifdef PY_NETSRVINFO1107_PATCH
40205 PY_NETSRVINFO1107_PATCH(&srvsvc_NetSrvInfo1107_Type);
40207 #ifdef PY_NETSRVINFO1501_PATCH
40208 PY_NETSRVINFO1501_PATCH(&srvsvc_NetSrvInfo1501_Type);
40210 #ifdef PY_NETSRVINFO1502_PATCH
40211 PY_NETSRVINFO1502_PATCH(&srvsvc_NetSrvInfo1502_Type);
40213 #ifdef PY_NETSRVINFO1503_PATCH
40214 PY_NETSRVINFO1503_PATCH(&srvsvc_NetSrvInfo1503_Type);
40216 #ifdef PY_NETSRVINFO1506_PATCH
40217 PY_NETSRVINFO1506_PATCH(&srvsvc_NetSrvInfo1506_Type);
40219 #ifdef PY_NETSRVINFO1509_PATCH
40220 PY_NETSRVINFO1509_PATCH(&srvsvc_NetSrvInfo1509_Type);
40222 #ifdef PY_NETSRVINFO1510_PATCH
40223 PY_NETSRVINFO1510_PATCH(&srvsvc_NetSrvInfo1510_Type);
40225 #ifdef PY_NETSRVINFO1511_PATCH
40226 PY_NETSRVINFO1511_PATCH(&srvsvc_NetSrvInfo1511_Type);
40228 #ifdef PY_NETSRVINFO1512_PATCH
40229 PY_NETSRVINFO1512_PATCH(&srvsvc_NetSrvInfo1512_Type);
40231 #ifdef PY_NETSRVINFO1513_PATCH
40232 PY_NETSRVINFO1513_PATCH(&srvsvc_NetSrvInfo1513_Type);
40234 #ifdef PY_NETSRVINFO1514_PATCH
40235 PY_NETSRVINFO1514_PATCH(&srvsvc_NetSrvInfo1514_Type);
40237 #ifdef PY_NETSRVINFO1515_PATCH
40238 PY_NETSRVINFO1515_PATCH(&srvsvc_NetSrvInfo1515_Type);
40240 #ifdef PY_NETSRVINFO1516_PATCH
40241 PY_NETSRVINFO1516_PATCH(&srvsvc_NetSrvInfo1516_Type);
40243 #ifdef PY_NETSRVINFO1518_PATCH
40244 PY_NETSRVINFO1518_PATCH(&srvsvc_NetSrvInfo1518_Type);
40246 #ifdef PY_NETSRVINFO1520_PATCH
40247 PY_NETSRVINFO1520_PATCH(&srvsvc_NetSrvInfo1520_Type);
40249 #ifdef PY_NETSRVINFO1521_PATCH
40250 PY_NETSRVINFO1521_PATCH(&srvsvc_NetSrvInfo1521_Type);
40252 #ifdef PY_NETSRVINFO1522_PATCH
40253 PY_NETSRVINFO1522_PATCH(&srvsvc_NetSrvInfo1522_Type);
40255 #ifdef PY_NETSRVINFO1523_PATCH
40256 PY_NETSRVINFO1523_PATCH(&srvsvc_NetSrvInfo1523_Type);
40258 #ifdef PY_NETSRVINFO1524_PATCH
40259 PY_NETSRVINFO1524_PATCH(&srvsvc_NetSrvInfo1524_Type);
40261 #ifdef PY_NETSRVINFO1525_PATCH
40262 PY_NETSRVINFO1525_PATCH(&srvsvc_NetSrvInfo1525_Type);
40264 #ifdef PY_NETSRVINFO1528_PATCH
40265 PY_NETSRVINFO1528_PATCH(&srvsvc_NetSrvInfo1528_Type);
40267 #ifdef PY_NETSRVINFO1529_PATCH
40268 PY_NETSRVINFO1529_PATCH(&srvsvc_NetSrvInfo1529_Type);
40270 #ifdef PY_NETSRVINFO1530_PATCH
40271 PY_NETSRVINFO1530_PATCH(&srvsvc_NetSrvInfo1530_Type);
40273 #ifdef PY_NETSRVINFO1533_PATCH
40274 PY_NETSRVINFO1533_PATCH(&srvsvc_NetSrvInfo1533_Type);
40276 #ifdef PY_NETSRVINFO1534_PATCH
40277 PY_NETSRVINFO1534_PATCH(&srvsvc_NetSrvInfo1534_Type);
40279 #ifdef PY_NETSRVINFO1535_PATCH
40280 PY_NETSRVINFO1535_PATCH(&srvsvc_NetSrvInfo1535_Type);
40282 #ifdef PY_NETSRVINFO1536_PATCH
40283 PY_NETSRVINFO1536_PATCH(&srvsvc_NetSrvInfo1536_Type);
40285 #ifdef PY_NETSRVINFO1537_PATCH
40286 PY_NETSRVINFO1537_PATCH(&srvsvc_NetSrvInfo1537_Type);
40288 #ifdef PY_NETSRVINFO1538_PATCH
40289 PY_NETSRVINFO1538_PATCH(&srvsvc_NetSrvInfo1538_Type);
40291 #ifdef PY_NETSRVINFO1539_PATCH
40292 PY_NETSRVINFO1539_PATCH(&srvsvc_NetSrvInfo1539_Type);
40294 #ifdef PY_NETSRVINFO1540_PATCH
40295 PY_NETSRVINFO1540_PATCH(&srvsvc_NetSrvInfo1540_Type);
40297 #ifdef PY_NETSRVINFO1541_PATCH
40298 PY_NETSRVINFO1541_PATCH(&srvsvc_NetSrvInfo1541_Type);
40300 #ifdef PY_NETSRVINFO1542_PATCH
40301 PY_NETSRVINFO1542_PATCH(&srvsvc_NetSrvInfo1542_Type);
40303 #ifdef PY_NETSRVINFO1543_PATCH
40304 PY_NETSRVINFO1543_PATCH(&srvsvc_NetSrvInfo1543_Type);
40306 #ifdef PY_NETSRVINFO1544_PATCH
40307 PY_NETSRVINFO1544_PATCH(&srvsvc_NetSrvInfo1544_Type);
40309 #ifdef PY_NETSRVINFO1545_PATCH
40310 PY_NETSRVINFO1545_PATCH(&srvsvc_NetSrvInfo1545_Type);
40312 #ifdef PY_NETSRVINFO1546_PATCH
40313 PY_NETSRVINFO1546_PATCH(&srvsvc_NetSrvInfo1546_Type);
40315 #ifdef PY_NETSRVINFO1547_PATCH
40316 PY_NETSRVINFO1547_PATCH(&srvsvc_NetSrvInfo1547_Type);
40318 #ifdef PY_NETSRVINFO1548_PATCH
40319 PY_NETSRVINFO1548_PATCH(&srvsvc_NetSrvInfo1548_Type);
40321 #ifdef PY_NETSRVINFO1549_PATCH
40322 PY_NETSRVINFO1549_PATCH(&srvsvc_NetSrvInfo1549_Type);
40324 #ifdef PY_NETSRVINFO1550_PATCH
40325 PY_NETSRVINFO1550_PATCH(&srvsvc_NetSrvInfo1550_Type);
40327 #ifdef PY_NETSRVINFO1552_PATCH
40328 PY_NETSRVINFO1552_PATCH(&srvsvc_NetSrvInfo1552_Type);
40330 #ifdef PY_NETSRVINFO1553_PATCH
40331 PY_NETSRVINFO1553_PATCH(&srvsvc_NetSrvInfo1553_Type);
40333 #ifdef PY_NETSRVINFO1554_PATCH
40334 PY_NETSRVINFO1554_PATCH(&srvsvc_NetSrvInfo1554_Type);
40336 #ifdef PY_NETSRVINFO1555_PATCH
40337 PY_NETSRVINFO1555_PATCH(&srvsvc_NetSrvInfo1555_Type);
40339 #ifdef PY_NETSRVINFO1556_PATCH
40340 PY_NETSRVINFO1556_PATCH(&srvsvc_NetSrvInfo1556_Type);
40342 #ifdef PY_NETDISKINFO0_PATCH
40343 PY_NETDISKINFO0_PATCH(&srvsvc_NetDiskInfo0_Type);
40345 #ifdef PY_NETDISKINFO_PATCH
40346 PY_NETDISKINFO_PATCH(&srvsvc_NetDiskInfo_Type);
40348 #ifdef PY_STATISTICS_PATCH
40349 PY_STATISTICS_PATCH(&srvsvc_Statistics_Type);
40351 #ifdef PY_NETTRANSPORTINFO0_PATCH
40352 PY_NETTRANSPORTINFO0_PATCH(&srvsvc_NetTransportInfo0_Type);
40354 #ifdef PY_NETTRANSPORTCTR0_PATCH
40355 PY_NETTRANSPORTCTR0_PATCH(&srvsvc_NetTransportCtr0_Type);
40357 #ifdef PY_NETTRANSPORTINFO1_PATCH
40358 PY_NETTRANSPORTINFO1_PATCH(&srvsvc_NetTransportInfo1_Type);
40360 #ifdef PY_NETTRANSPORTCTR1_PATCH
40361 PY_NETTRANSPORTCTR1_PATCH(&srvsvc_NetTransportCtr1_Type);
40363 #ifdef PY_NETTRANSPORTINFO2_PATCH
40364 PY_NETTRANSPORTINFO2_PATCH(&srvsvc_NetTransportInfo2_Type);
40366 #ifdef PY_NETTRANSPORTCTR2_PATCH
40367 PY_NETTRANSPORTCTR2_PATCH(&srvsvc_NetTransportCtr2_Type);
40369 #ifdef PY_NETTRANSPORTINFO3_PATCH
40370 PY_NETTRANSPORTINFO3_PATCH(&srvsvc_NetTransportInfo3_Type);
40372 #ifdef PY_NETTRANSPORTCTR3_PATCH
40373 PY_NETTRANSPORTCTR3_PATCH(&srvsvc_NetTransportCtr3_Type);
40375 #ifdef PY_NETTRANSPORTINFOCTR_PATCH
40376 PY_NETTRANSPORTINFOCTR_PATCH(&srvsvc_NetTransportInfoCtr_Type);
40378 #ifdef PY_NETREMOTETODINFO_PATCH
40379 PY_NETREMOTETODINFO_PATCH(&srvsvc_NetRemoteTODInfo_Type);
40381 #ifdef PY_SRVSVC_PATCH
40382 PY_SRVSVC_PATCH(&srvsvc_InterfaceType);
40384 #ifdef PY_ABSTRACT_SYNTAX_PATCH
40385 PY_ABSTRACT_SYNTAX_PATCH(&srvsvc_SyntaxType);
40388 m = Py_InitModule3("srvsvc", srvsvc_methods, "srvsvc DCE/RPC");
40392 PyModule_AddObject(m, "STYPE_TEMPORARY", ndr_PyLong_FromUnsignedLongLong(0x40000000));
40393 PyModule_AddObject(m, "STYPE_HIDDEN", ndr_PyLong_FromUnsignedLongLong(0x80000000));
40394 PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_MANUAL_REINT", ndr_PyLong_FromUnsignedLongLong(0x00000000));
40395 PyModule_AddObject(m, "SHARE_1005_CSC_POLICY_MASK", ndr_PyLong_FromUnsignedLongLong(0x00000030));
40396 PyModule_AddObject(m, "SHARE_1005_CSC_POLICY_SHIFT", ndr_PyLong_FromUnsignedLongLong(4));
40397 PyModule_AddObject(m, "STYPE_DISKTREE", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DISKTREE));
40398 PyModule_AddObject(m, "STYPE_DISKTREE_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DISKTREE_TEMPORARY));
40399 PyModule_AddObject(m, "STYPE_DISKTREE_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DISKTREE_HIDDEN));
40400 PyModule_AddObject(m, "STYPE_PRINTQ", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_PRINTQ));
40401 PyModule_AddObject(m, "STYPE_PRINTQ_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_PRINTQ_TEMPORARY));
40402 PyModule_AddObject(m, "STYPE_PRINTQ_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_PRINTQ_HIDDEN));
40403 PyModule_AddObject(m, "STYPE_DEVICE", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DEVICE));
40404 PyModule_AddObject(m, "STYPE_DEVICE_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DEVICE_TEMPORARY));
40405 PyModule_AddObject(m, "STYPE_DEVICE_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_DEVICE_HIDDEN));
40406 PyModule_AddObject(m, "STYPE_IPC", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_IPC));
40407 PyModule_AddObject(m, "STYPE_IPC_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_IPC_TEMPORARY));
40408 PyModule_AddObject(m, "STYPE_IPC_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_IPC_HIDDEN));
40409 PyModule_AddObject(m, "STYPE_CLUSTER_FS", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_FS));
40410 PyModule_AddObject(m, "STYPE_CLUSTER_FS_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_FS_TEMPORARY));
40411 PyModule_AddObject(m, "STYPE_CLUSTER_FS_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_FS_HIDDEN));
40412 PyModule_AddObject(m, "STYPE_CLUSTER_SOFS", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_SOFS));
40413 PyModule_AddObject(m, "STYPE_CLUSTER_SOFS_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_SOFS_TEMPORARY));
40414 PyModule_AddObject(m, "STYPE_CLUSTER_SOFS_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_SOFS_HIDDEN));
40415 PyModule_AddObject(m, "STYPE_CLUSTER_DFS", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_DFS));
40416 PyModule_AddObject(m, "STYPE_CLUSTER_DFS_TEMPORARY", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_DFS_TEMPORARY));
40417 PyModule_AddObject(m, "STYPE_CLUSTER_DFS_HIDDEN", ndr_PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_DFS_HIDDEN));
40418 PyModule_AddObject(m, "SHARE_1005_IN_DFS", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_IN_DFS));
40419 PyModule_AddObject(m, "SHARE_1005_DFS_ROOT", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_DFS_ROOT));
40420 PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_AUTO_REINT", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_CSC_CACHE_AUTO_REINT));
40421 PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_VDO", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_CSC_CACHE_VDO));
40422 PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_NONE", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_CSC_CACHE_NONE));
40423 PyModule_AddObject(m, "SHARE_1005_RESTRICT_EXCLUSIVE_OPENS", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_RESTRICT_EXCLUSIVE_OPENS));
40424 PyModule_AddObject(m, "SHARE_1005_FORCE_SHARED_DELETE", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_FORCE_SHARED_DELETE));
40425 PyModule_AddObject(m, "SHARE_1005_ALLOW_NAMESPACE_CACHING", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ALLOW_NAMESPACE_CACHING));
40426 PyModule_AddObject(m, "SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM));
40427 PyModule_AddObject(m, "SHARE_1005_FORCE_LEVELII_OPLOCK", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_FORCE_LEVELII_OPLOCK));
40428 PyModule_AddObject(m, "SHARE_1005_ENABLE_HASH", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ENABLE_HASH));
40429 PyModule_AddObject(m, "SHARE_1005_ENABLE_CA", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ENABLE_CA));
40430 PyModule_AddObject(m, "SHARE_1005_ENCRYPT_DATA", ndr_PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ENCRYPT_DATA));
40431 PyModule_AddObject(m, "PLATFORM_ID_DOS", ndr_PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_DOS));
40432 PyModule_AddObject(m, "PLATFORM_ID_OS2", ndr_PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_OS2));
40433 PyModule_AddObject(m, "PLATFORM_ID_NT", ndr_PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_NT));
40434 PyModule_AddObject(m, "PLATFORM_ID_OSF", ndr_PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_OSF));
40435 PyModule_AddObject(m, "PLATFORM_ID_VMS", ndr_PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_VMS));
40436 Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfo0_Type);
40437 PyModule_AddObject(m, "NetCharDevInfo0", (PyObject *)(void *)&srvsvc_NetCharDevInfo0_Type);
40438 Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevCtr0_Type);
40439 PyModule_AddObject(m, "NetCharDevCtr0", (PyObject *)(void *)&srvsvc_NetCharDevCtr0_Type);
40440 Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfo1_Type);
40441 PyModule_AddObject(m, "NetCharDevInfo1", (PyObject *)(void *)&srvsvc_NetCharDevInfo1_Type);
40442 Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevCtr1_Type);
40443 PyModule_AddObject(m, "NetCharDevCtr1", (PyObject *)(void *)&srvsvc_NetCharDevCtr1_Type);
40444 Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfoCtr_Type);
40445 PyModule_AddObject(m, "NetCharDevInfoCtr", (PyObject *)(void *)&srvsvc_NetCharDevInfoCtr_Type);
40446 Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfo0_Type);
40447 PyModule_AddObject(m, "NetCharDevQInfo0", (PyObject *)(void *)&srvsvc_NetCharDevQInfo0_Type);
40448 Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQCtr0_Type);
40449 PyModule_AddObject(m, "NetCharDevQCtr0", (PyObject *)(void *)&srvsvc_NetCharDevQCtr0_Type);
40450 Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfo1_Type);
40451 PyModule_AddObject(m, "NetCharDevQInfo1", (PyObject *)(void *)&srvsvc_NetCharDevQInfo1_Type);
40452 Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQCtr1_Type);
40453 PyModule_AddObject(m, "NetCharDevQCtr1", (PyObject *)(void *)&srvsvc_NetCharDevQCtr1_Type);
40454 Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfoCtr_Type);
40455 PyModule_AddObject(m, "NetCharDevQInfoCtr", (PyObject *)(void *)&srvsvc_NetCharDevQInfoCtr_Type);
40456 Py_INCREF((PyObject *)(void *)&srvsvc_NetConnInfo0_Type);
40457 PyModule_AddObject(m, "NetConnInfo0", (PyObject *)(void *)&srvsvc_NetConnInfo0_Type);
40458 Py_INCREF((PyObject *)(void *)&srvsvc_NetConnCtr0_Type);
40459 PyModule_AddObject(m, "NetConnCtr0", (PyObject *)(void *)&srvsvc_NetConnCtr0_Type);
40460 Py_INCREF((PyObject *)(void *)&srvsvc_NetConnInfo1_Type);
40461 PyModule_AddObject(m, "NetConnInfo1", (PyObject *)(void *)&srvsvc_NetConnInfo1_Type);
40462 Py_INCREF((PyObject *)(void *)&srvsvc_NetConnCtr1_Type);
40463 PyModule_AddObject(m, "NetConnCtr1", (PyObject *)(void *)&srvsvc_NetConnCtr1_Type);
40464 Py_INCREF((PyObject *)(void *)&srvsvc_NetConnInfoCtr_Type);
40465 PyModule_AddObject(m, "NetConnInfoCtr", (PyObject *)(void *)&srvsvc_NetConnInfoCtr_Type);
40466 Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfo2_Type);
40467 PyModule_AddObject(m, "NetFileInfo2", (PyObject *)(void *)&srvsvc_NetFileInfo2_Type);
40468 Py_INCREF((PyObject *)(void *)&srvsvc_NetFileCtr2_Type);
40469 PyModule_AddObject(m, "NetFileCtr2", (PyObject *)(void *)&srvsvc_NetFileCtr2_Type);
40470 Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfo3_Type);
40471 PyModule_AddObject(m, "NetFileInfo3", (PyObject *)(void *)&srvsvc_NetFileInfo3_Type);
40472 Py_INCREF((PyObject *)(void *)&srvsvc_NetFileCtr3_Type);
40473 PyModule_AddObject(m, "NetFileCtr3", (PyObject *)(void *)&srvsvc_NetFileCtr3_Type);
40474 Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfoCtr_Type);
40475 PyModule_AddObject(m, "NetFileInfoCtr", (PyObject *)(void *)&srvsvc_NetFileInfoCtr_Type);
40476 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo0_Type);
40477 PyModule_AddObject(m, "NetSessInfo0", (PyObject *)(void *)&srvsvc_NetSessInfo0_Type);
40478 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr0_Type);
40479 PyModule_AddObject(m, "NetSessCtr0", (PyObject *)(void *)&srvsvc_NetSessCtr0_Type);
40480 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo1_Type);
40481 PyModule_AddObject(m, "NetSessInfo1", (PyObject *)(void *)&srvsvc_NetSessInfo1_Type);
40482 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr1_Type);
40483 PyModule_AddObject(m, "NetSessCtr1", (PyObject *)(void *)&srvsvc_NetSessCtr1_Type);
40484 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo2_Type);
40485 PyModule_AddObject(m, "NetSessInfo2", (PyObject *)(void *)&srvsvc_NetSessInfo2_Type);
40486 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr2_Type);
40487 PyModule_AddObject(m, "NetSessCtr2", (PyObject *)(void *)&srvsvc_NetSessCtr2_Type);
40488 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo10_Type);
40489 PyModule_AddObject(m, "NetSessInfo10", (PyObject *)(void *)&srvsvc_NetSessInfo10_Type);
40490 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr10_Type);
40491 PyModule_AddObject(m, "NetSessCtr10", (PyObject *)(void *)&srvsvc_NetSessCtr10_Type);
40492 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo502_Type);
40493 PyModule_AddObject(m, "NetSessInfo502", (PyObject *)(void *)&srvsvc_NetSessInfo502_Type);
40494 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr502_Type);
40495 PyModule_AddObject(m, "NetSessCtr502", (PyObject *)(void *)&srvsvc_NetSessCtr502_Type);
40496 Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfoCtr_Type);
40497 PyModule_AddObject(m, "NetSessInfoCtr", (PyObject *)(void *)&srvsvc_NetSessInfoCtr_Type);
40498 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo0_Type);
40499 PyModule_AddObject(m, "NetShareInfo0", (PyObject *)(void *)&srvsvc_NetShareInfo0_Type);
40500 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr0_Type);
40501 PyModule_AddObject(m, "NetShareCtr0", (PyObject *)(void *)&srvsvc_NetShareCtr0_Type);
40502 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1_Type);
40503 PyModule_AddObject(m, "NetShareInfo1", (PyObject *)(void *)&srvsvc_NetShareInfo1_Type);
40504 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1_Type);
40505 PyModule_AddObject(m, "NetShareCtr1", (PyObject *)(void *)&srvsvc_NetShareCtr1_Type);
40506 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo2_Type);
40507 PyModule_AddObject(m, "NetShareInfo2", (PyObject *)(void *)&srvsvc_NetShareInfo2_Type);
40508 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr2_Type);
40509 PyModule_AddObject(m, "NetShareCtr2", (PyObject *)(void *)&srvsvc_NetShareCtr2_Type);
40510 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo501_Type);
40511 PyModule_AddObject(m, "NetShareInfo501", (PyObject *)(void *)&srvsvc_NetShareInfo501_Type);
40512 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr501_Type);
40513 PyModule_AddObject(m, "NetShareCtr501", (PyObject *)(void *)&srvsvc_NetShareCtr501_Type);
40514 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo502_Type);
40515 PyModule_AddObject(m, "NetShareInfo502", (PyObject *)(void *)&srvsvc_NetShareInfo502_Type);
40516 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr502_Type);
40517 PyModule_AddObject(m, "NetShareCtr502", (PyObject *)(void *)&srvsvc_NetShareCtr502_Type);
40518 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1004_Type);
40519 PyModule_AddObject(m, "NetShareInfo1004", (PyObject *)(void *)&srvsvc_NetShareInfo1004_Type);
40520 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1004_Type);
40521 PyModule_AddObject(m, "NetShareCtr1004", (PyObject *)(void *)&srvsvc_NetShareCtr1004_Type);
40522 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1005_Type);
40523 PyModule_AddObject(m, "NetShareInfo1005", (PyObject *)(void *)&srvsvc_NetShareInfo1005_Type);
40524 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1005_Type);
40525 PyModule_AddObject(m, "NetShareCtr1005", (PyObject *)(void *)&srvsvc_NetShareCtr1005_Type);
40526 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1006_Type);
40527 PyModule_AddObject(m, "NetShareInfo1006", (PyObject *)(void *)&srvsvc_NetShareInfo1006_Type);
40528 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1006_Type);
40529 PyModule_AddObject(m, "NetShareCtr1006", (PyObject *)(void *)&srvsvc_NetShareCtr1006_Type);
40530 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1007_Type);
40531 PyModule_AddObject(m, "NetShareInfo1007", (PyObject *)(void *)&srvsvc_NetShareInfo1007_Type);
40532 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1007_Type);
40533 PyModule_AddObject(m, "NetShareCtr1007", (PyObject *)(void *)&srvsvc_NetShareCtr1007_Type);
40534 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1501_Type);
40535 PyModule_AddObject(m, "NetShareCtr1501", (PyObject *)(void *)&srvsvc_NetShareCtr1501_Type);
40536 Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfoCtr_Type);
40537 PyModule_AddObject(m, "NetShareInfoCtr", (PyObject *)(void *)&srvsvc_NetShareInfoCtr_Type);
40538 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo100_Type);
40539 PyModule_AddObject(m, "NetSrvInfo100", (PyObject *)(void *)&srvsvc_NetSrvInfo100_Type);
40540 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo101_Type);
40541 PyModule_AddObject(m, "NetSrvInfo101", (PyObject *)(void *)&srvsvc_NetSrvInfo101_Type);
40542 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo102_Type);
40543 PyModule_AddObject(m, "NetSrvInfo102", (PyObject *)(void *)&srvsvc_NetSrvInfo102_Type);
40544 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo402_Type);
40545 PyModule_AddObject(m, "NetSrvInfo402", (PyObject *)(void *)&srvsvc_NetSrvInfo402_Type);
40546 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo403_Type);
40547 PyModule_AddObject(m, "NetSrvInfo403", (PyObject *)(void *)&srvsvc_NetSrvInfo403_Type);
40548 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo502_Type);
40549 PyModule_AddObject(m, "NetSrvInfo502", (PyObject *)(void *)&srvsvc_NetSrvInfo502_Type);
40550 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo503_Type);
40551 PyModule_AddObject(m, "NetSrvInfo503", (PyObject *)(void *)&srvsvc_NetSrvInfo503_Type);
40552 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo599_Type);
40553 PyModule_AddObject(m, "NetSrvInfo599", (PyObject *)(void *)&srvsvc_NetSrvInfo599_Type);
40554 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1005_Type);
40555 PyModule_AddObject(m, "NetSrvInfo1005", (PyObject *)(void *)&srvsvc_NetSrvInfo1005_Type);
40556 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1010_Type);
40557 PyModule_AddObject(m, "NetSrvInfo1010", (PyObject *)(void *)&srvsvc_NetSrvInfo1010_Type);
40558 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1016_Type);
40559 PyModule_AddObject(m, "NetSrvInfo1016", (PyObject *)(void *)&srvsvc_NetSrvInfo1016_Type);
40560 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1017_Type);
40561 PyModule_AddObject(m, "NetSrvInfo1017", (PyObject *)(void *)&srvsvc_NetSrvInfo1017_Type);
40562 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1018_Type);
40563 PyModule_AddObject(m, "NetSrvInfo1018", (PyObject *)(void *)&srvsvc_NetSrvInfo1018_Type);
40564 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1107_Type);
40565 PyModule_AddObject(m, "NetSrvInfo1107", (PyObject *)(void *)&srvsvc_NetSrvInfo1107_Type);
40566 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1501_Type);
40567 PyModule_AddObject(m, "NetSrvInfo1501", (PyObject *)(void *)&srvsvc_NetSrvInfo1501_Type);
40568 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1502_Type);
40569 PyModule_AddObject(m, "NetSrvInfo1502", (PyObject *)(void *)&srvsvc_NetSrvInfo1502_Type);
40570 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1503_Type);
40571 PyModule_AddObject(m, "NetSrvInfo1503", (PyObject *)(void *)&srvsvc_NetSrvInfo1503_Type);
40572 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1506_Type);
40573 PyModule_AddObject(m, "NetSrvInfo1506", (PyObject *)(void *)&srvsvc_NetSrvInfo1506_Type);
40574 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1509_Type);
40575 PyModule_AddObject(m, "NetSrvInfo1509", (PyObject *)(void *)&srvsvc_NetSrvInfo1509_Type);
40576 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1510_Type);
40577 PyModule_AddObject(m, "NetSrvInfo1510", (PyObject *)(void *)&srvsvc_NetSrvInfo1510_Type);
40578 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1511_Type);
40579 PyModule_AddObject(m, "NetSrvInfo1511", (PyObject *)(void *)&srvsvc_NetSrvInfo1511_Type);
40580 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1512_Type);
40581 PyModule_AddObject(m, "NetSrvInfo1512", (PyObject *)(void *)&srvsvc_NetSrvInfo1512_Type);
40582 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1513_Type);
40583 PyModule_AddObject(m, "NetSrvInfo1513", (PyObject *)(void *)&srvsvc_NetSrvInfo1513_Type);
40584 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1514_Type);
40585 PyModule_AddObject(m, "NetSrvInfo1514", (PyObject *)(void *)&srvsvc_NetSrvInfo1514_Type);
40586 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1515_Type);
40587 PyModule_AddObject(m, "NetSrvInfo1515", (PyObject *)(void *)&srvsvc_NetSrvInfo1515_Type);
40588 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1516_Type);
40589 PyModule_AddObject(m, "NetSrvInfo1516", (PyObject *)(void *)&srvsvc_NetSrvInfo1516_Type);
40590 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1518_Type);
40591 PyModule_AddObject(m, "NetSrvInfo1518", (PyObject *)(void *)&srvsvc_NetSrvInfo1518_Type);
40592 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1520_Type);
40593 PyModule_AddObject(m, "NetSrvInfo1520", (PyObject *)(void *)&srvsvc_NetSrvInfo1520_Type);
40594 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1521_Type);
40595 PyModule_AddObject(m, "NetSrvInfo1521", (PyObject *)(void *)&srvsvc_NetSrvInfo1521_Type);
40596 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1522_Type);
40597 PyModule_AddObject(m, "NetSrvInfo1522", (PyObject *)(void *)&srvsvc_NetSrvInfo1522_Type);
40598 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1523_Type);
40599 PyModule_AddObject(m, "NetSrvInfo1523", (PyObject *)(void *)&srvsvc_NetSrvInfo1523_Type);
40600 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1524_Type);
40601 PyModule_AddObject(m, "NetSrvInfo1524", (PyObject *)(void *)&srvsvc_NetSrvInfo1524_Type);
40602 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1525_Type);
40603 PyModule_AddObject(m, "NetSrvInfo1525", (PyObject *)(void *)&srvsvc_NetSrvInfo1525_Type);
40604 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1528_Type);
40605 PyModule_AddObject(m, "NetSrvInfo1528", (PyObject *)(void *)&srvsvc_NetSrvInfo1528_Type);
40606 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1529_Type);
40607 PyModule_AddObject(m, "NetSrvInfo1529", (PyObject *)(void *)&srvsvc_NetSrvInfo1529_Type);
40608 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1530_Type);
40609 PyModule_AddObject(m, "NetSrvInfo1530", (PyObject *)(void *)&srvsvc_NetSrvInfo1530_Type);
40610 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1533_Type);
40611 PyModule_AddObject(m, "NetSrvInfo1533", (PyObject *)(void *)&srvsvc_NetSrvInfo1533_Type);
40612 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1534_Type);
40613 PyModule_AddObject(m, "NetSrvInfo1534", (PyObject *)(void *)&srvsvc_NetSrvInfo1534_Type);
40614 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1535_Type);
40615 PyModule_AddObject(m, "NetSrvInfo1535", (PyObject *)(void *)&srvsvc_NetSrvInfo1535_Type);
40616 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1536_Type);
40617 PyModule_AddObject(m, "NetSrvInfo1536", (PyObject *)(void *)&srvsvc_NetSrvInfo1536_Type);
40618 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1537_Type);
40619 PyModule_AddObject(m, "NetSrvInfo1537", (PyObject *)(void *)&srvsvc_NetSrvInfo1537_Type);
40620 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1538_Type);
40621 PyModule_AddObject(m, "NetSrvInfo1538", (PyObject *)(void *)&srvsvc_NetSrvInfo1538_Type);
40622 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1539_Type);
40623 PyModule_AddObject(m, "NetSrvInfo1539", (PyObject *)(void *)&srvsvc_NetSrvInfo1539_Type);
40624 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1540_Type);
40625 PyModule_AddObject(m, "NetSrvInfo1540", (PyObject *)(void *)&srvsvc_NetSrvInfo1540_Type);
40626 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1541_Type);
40627 PyModule_AddObject(m, "NetSrvInfo1541", (PyObject *)(void *)&srvsvc_NetSrvInfo1541_Type);
40628 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1542_Type);
40629 PyModule_AddObject(m, "NetSrvInfo1542", (PyObject *)(void *)&srvsvc_NetSrvInfo1542_Type);
40630 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1543_Type);
40631 PyModule_AddObject(m, "NetSrvInfo1543", (PyObject *)(void *)&srvsvc_NetSrvInfo1543_Type);
40632 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1544_Type);
40633 PyModule_AddObject(m, "NetSrvInfo1544", (PyObject *)(void *)&srvsvc_NetSrvInfo1544_Type);
40634 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1545_Type);
40635 PyModule_AddObject(m, "NetSrvInfo1545", (PyObject *)(void *)&srvsvc_NetSrvInfo1545_Type);
40636 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1546_Type);
40637 PyModule_AddObject(m, "NetSrvInfo1546", (PyObject *)(void *)&srvsvc_NetSrvInfo1546_Type);
40638 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1547_Type);
40639 PyModule_AddObject(m, "NetSrvInfo1547", (PyObject *)(void *)&srvsvc_NetSrvInfo1547_Type);
40640 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1548_Type);
40641 PyModule_AddObject(m, "NetSrvInfo1548", (PyObject *)(void *)&srvsvc_NetSrvInfo1548_Type);
40642 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1549_Type);
40643 PyModule_AddObject(m, "NetSrvInfo1549", (PyObject *)(void *)&srvsvc_NetSrvInfo1549_Type);
40644 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1550_Type);
40645 PyModule_AddObject(m, "NetSrvInfo1550", (PyObject *)(void *)&srvsvc_NetSrvInfo1550_Type);
40646 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1552_Type);
40647 PyModule_AddObject(m, "NetSrvInfo1552", (PyObject *)(void *)&srvsvc_NetSrvInfo1552_Type);
40648 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1553_Type);
40649 PyModule_AddObject(m, "NetSrvInfo1553", (PyObject *)(void *)&srvsvc_NetSrvInfo1553_Type);
40650 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1554_Type);
40651 PyModule_AddObject(m, "NetSrvInfo1554", (PyObject *)(void *)&srvsvc_NetSrvInfo1554_Type);
40652 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1555_Type);
40653 PyModule_AddObject(m, "NetSrvInfo1555", (PyObject *)(void *)&srvsvc_NetSrvInfo1555_Type);
40654 Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1556_Type);
40655 PyModule_AddObject(m, "NetSrvInfo1556", (PyObject *)(void *)&srvsvc_NetSrvInfo1556_Type);
40656 Py_INCREF((PyObject *)(void *)&srvsvc_NetDiskInfo0_Type);
40657 PyModule_AddObject(m, "NetDiskInfo0", (PyObject *)(void *)&srvsvc_NetDiskInfo0_Type);
40658 Py_INCREF((PyObject *)(void *)&srvsvc_NetDiskInfo_Type);
40659 PyModule_AddObject(m, "NetDiskInfo", (PyObject *)(void *)&srvsvc_NetDiskInfo_Type);
40660 Py_INCREF((PyObject *)(void *)&srvsvc_Statistics_Type);
40661 PyModule_AddObject(m, "Statistics", (PyObject *)(void *)&srvsvc_Statistics_Type);
40662 Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo0_Type);
40663 PyModule_AddObject(m, "NetTransportInfo0", (PyObject *)(void *)&srvsvc_NetTransportInfo0_Type);
40664 Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr0_Type);
40665 PyModule_AddObject(m, "NetTransportCtr0", (PyObject *)(void *)&srvsvc_NetTransportCtr0_Type);
40666 Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo1_Type);
40667 PyModule_AddObject(m, "NetTransportInfo1", (PyObject *)(void *)&srvsvc_NetTransportInfo1_Type);
40668 Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr1_Type);
40669 PyModule_AddObject(m, "NetTransportCtr1", (PyObject *)(void *)&srvsvc_NetTransportCtr1_Type);
40670 Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo2_Type);
40671 PyModule_AddObject(m, "NetTransportInfo2", (PyObject *)(void *)&srvsvc_NetTransportInfo2_Type);
40672 Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr2_Type);
40673 PyModule_AddObject(m, "NetTransportCtr2", (PyObject *)(void *)&srvsvc_NetTransportCtr2_Type);
40674 Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo3_Type);
40675 PyModule_AddObject(m, "NetTransportInfo3", (PyObject *)(void *)&srvsvc_NetTransportInfo3_Type);
40676 Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr3_Type);
40677 PyModule_AddObject(m, "NetTransportCtr3", (PyObject *)(void *)&srvsvc_NetTransportCtr3_Type);
40678 Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfoCtr_Type);
40679 PyModule_AddObject(m, "NetTransportInfoCtr", (PyObject *)(void *)&srvsvc_NetTransportInfoCtr_Type);
40680 Py_INCREF((PyObject *)(void *)&srvsvc_NetRemoteTODInfo_Type);
40681 PyModule_AddObject(m, "NetRemoteTODInfo", (PyObject *)(void *)&srvsvc_NetRemoteTODInfo_Type);
40682 Py_INCREF((PyObject *)(void *)&srvsvc_InterfaceType);
40683 PyModule_AddObject(m, "srvsvc", (PyObject *)(void *)&srvsvc_InterfaceType);
40684 Py_INCREF((PyObject *)(void *)&srvsvc_SyntaxType);
40685 PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&srvsvc_SyntaxType);
40686 #ifdef PY_MOD_SRVSVC_PATCH
40687 PY_MOD_SRVSVC_PATCH(m);