2
/* Python wrapper functions auto-generated by pidl */
6
#include "librpc/rpc/pyrpc.h"
7
#include "librpc/rpc/pyrpc_util.h"
8
#include "librpc/gen_ndr/ndr_dfs.h"
9
#include "librpc/gen_ndr/ndr_dfs_c.h"
11
#include "librpc/gen_ndr/misc.h"
12
staticforward PyTypeObject dfs_Info0_Type;
13
staticforward PyTypeObject dfs_Info1_Type;
14
staticforward PyTypeObject dfs_Info2_Type;
15
staticforward PyTypeObject dfs_StorageInfo_Type;
16
staticforward PyTypeObject dfs_Info3_Type;
17
staticforward PyTypeObject dfs_Info4_Type;
18
staticforward PyTypeObject dfs_Info5_Type;
19
staticforward PyTypeObject dfs_Target_Priority_Type;
20
staticforward PyTypeObject dfs_StorageInfo2_Type;
21
staticforward PyTypeObject dfs_Info6_Type;
22
staticforward PyTypeObject dfs_Info7_Type;
23
staticforward PyTypeObject dfs_Info100_Type;
24
staticforward PyTypeObject dfs_Info101_Type;
25
staticforward PyTypeObject dfs_Info102_Type;
26
staticforward PyTypeObject dfs_Info103_Type;
27
staticforward PyTypeObject dfs_Info104_Type;
28
staticforward PyTypeObject dfs_Info105_Type;
29
staticforward PyTypeObject dfs_Info106_Type;
30
staticforward PyTypeObject dfs_Info200_Type;
31
staticforward PyTypeObject dfs_Info300_Type;
32
staticforward PyTypeObject dfs_EnumArray1_Type;
33
staticforward PyTypeObject dfs_EnumArray2_Type;
34
staticforward PyTypeObject dfs_EnumArray3_Type;
35
staticforward PyTypeObject dfs_EnumArray4_Type;
36
staticforward PyTypeObject dfs_EnumArray5_Type;
37
staticforward PyTypeObject dfs_EnumArray6_Type;
38
staticforward PyTypeObject dfs_EnumArray200_Type;
39
staticforward PyTypeObject dfs_EnumArray300_Type;
40
staticforward PyTypeObject dfs_EnumStruct_Type;
41
staticforward PyTypeObject dfs_UnknownStruct_Type;
42
staticforward PyTypeObject netdfs_InterfaceType;
44
void initdfs(void);static PyTypeObject *Object_Type;
45
static PyTypeObject *GUID_Type;
46
static PyTypeObject *ClientConnection_Type;
48
static PyObject *py_dfs_Info0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
50
return py_talloc_new(struct dfs_Info0, type);
54
static PyTypeObject dfs_Info0_Type = {
55
PyObject_HEAD_INIT(NULL) 0,
56
.tp_name = "dfs.Info0",
59
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
60
.tp_basicsize = sizeof(py_talloc_Object),
61
.tp_new = py_dfs_Info0_new,
65
static PyObject *py_dfs_Info1_get_path(PyObject *obj, void *closure)
67
struct dfs_Info1 *object = (struct dfs_Info1 *)py_talloc_get_ptr(obj);
69
if (object->path == NULL) {
73
if (object->path == NULL) {
77
py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
83
static int py_dfs_Info1_set_path(PyObject *py_obj, PyObject *value, void *closure)
85
struct dfs_Info1 *object = (struct dfs_Info1 *)py_talloc_get_ptr(py_obj);
86
if (value == Py_None) {
90
if (PyUnicode_Check(value)) {
91
object->path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
92
} else if (PyString_Check(value)) {
93
object->path = PyString_AS_STRING(value);
95
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
102
static PyGetSetDef py_dfs_Info1_getsetters[] = {
103
{ discard_const_p(char, "path"), py_dfs_Info1_get_path, py_dfs_Info1_set_path },
107
static PyObject *py_dfs_Info1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
109
return py_talloc_new(struct dfs_Info1, type);
113
static PyTypeObject dfs_Info1_Type = {
114
PyObject_HEAD_INIT(NULL) 0,
115
.tp_name = "dfs.Info1",
116
.tp_getset = py_dfs_Info1_getsetters,
118
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
119
.tp_basicsize = sizeof(py_talloc_Object),
120
.tp_new = py_dfs_Info1_new,
124
static PyObject *py_dfs_Info2_get_path(PyObject *obj, void *closure)
126
struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(obj);
128
if (object->path == NULL) {
132
if (object->path == NULL) {
136
py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
142
static int py_dfs_Info2_set_path(PyObject *py_obj, PyObject *value, void *closure)
144
struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(py_obj);
145
if (value == Py_None) {
149
if (PyUnicode_Check(value)) {
150
object->path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
151
} else if (PyString_Check(value)) {
152
object->path = PyString_AS_STRING(value);
154
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
161
static PyObject *py_dfs_Info2_get_comment(PyObject *obj, void *closure)
163
struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(obj);
164
PyObject *py_comment;
165
if (object->comment == NULL) {
166
py_comment = Py_None;
167
Py_INCREF(py_comment);
169
if (object->comment == NULL) {
170
py_comment = Py_None;
171
Py_INCREF(py_comment);
173
py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
179
static int py_dfs_Info2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
181
struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(py_obj);
182
if (value == Py_None) {
183
object->comment = NULL;
185
object->comment = NULL;
186
if (PyUnicode_Check(value)) {
187
object->comment = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
188
} else if (PyString_Check(value)) {
189
object->comment = PyString_AS_STRING(value);
191
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
198
static PyObject *py_dfs_Info2_get_state(PyObject *obj, void *closure)
200
struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(obj);
202
py_state = PyInt_FromLong(object->state);
206
static int py_dfs_Info2_set_state(PyObject *py_obj, PyObject *value, void *closure)
208
struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(py_obj);
209
if (PyLong_Check(value)) {
210
object->state = PyLong_AsLongLong(value);
211
} else if (PyInt_Check(value)) {
212
object->state = PyInt_AsLong(value);
214
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
215
PyInt_Type.tp_name, PyLong_Type.tp_name);
221
static PyObject *py_dfs_Info2_get_num_stores(PyObject *obj, void *closure)
223
struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(obj);
224
PyObject *py_num_stores;
225
py_num_stores = PyInt_FromLong(object->num_stores);
226
return py_num_stores;
229
static int py_dfs_Info2_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
231
struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(py_obj);
232
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
233
object->num_stores = PyInt_AsLong(value);
237
static PyGetSetDef py_dfs_Info2_getsetters[] = {
238
{ discard_const_p(char, "path"), py_dfs_Info2_get_path, py_dfs_Info2_set_path },
239
{ discard_const_p(char, "comment"), py_dfs_Info2_get_comment, py_dfs_Info2_set_comment },
240
{ discard_const_p(char, "state"), py_dfs_Info2_get_state, py_dfs_Info2_set_state },
241
{ discard_const_p(char, "num_stores"), py_dfs_Info2_get_num_stores, py_dfs_Info2_set_num_stores },
245
static PyObject *py_dfs_Info2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
247
return py_talloc_new(struct dfs_Info2, type);
251
static PyTypeObject dfs_Info2_Type = {
252
PyObject_HEAD_INIT(NULL) 0,
253
.tp_name = "dfs.Info2",
254
.tp_getset = py_dfs_Info2_getsetters,
256
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
257
.tp_basicsize = sizeof(py_talloc_Object),
258
.tp_new = py_dfs_Info2_new,
262
static PyObject *py_dfs_StorageInfo_get_state(PyObject *obj, void *closure)
264
struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(obj);
266
py_state = PyInt_FromLong(object->state);
270
static int py_dfs_StorageInfo_set_state(PyObject *py_obj, PyObject *value, void *closure)
272
struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(py_obj);
273
if (PyLong_Check(value)) {
274
object->state = PyLong_AsLongLong(value);
275
} else if (PyInt_Check(value)) {
276
object->state = PyInt_AsLong(value);
278
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
279
PyInt_Type.tp_name, PyLong_Type.tp_name);
285
static PyObject *py_dfs_StorageInfo_get_server(PyObject *obj, void *closure)
287
struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(obj);
289
if (object->server == NULL) {
291
Py_INCREF(py_server);
293
if (object->server == NULL) {
295
Py_INCREF(py_server);
297
py_server = PyUnicode_Decode(object->server, strlen(object->server), "utf-8", "ignore");
303
static int py_dfs_StorageInfo_set_server(PyObject *py_obj, PyObject *value, void *closure)
305
struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(py_obj);
306
if (value == Py_None) {
307
object->server = NULL;
309
object->server = NULL;
310
if (PyUnicode_Check(value)) {
311
object->server = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
312
} else if (PyString_Check(value)) {
313
object->server = PyString_AS_STRING(value);
315
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
322
static PyObject *py_dfs_StorageInfo_get_share(PyObject *obj, void *closure)
324
struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(obj);
326
if (object->share == NULL) {
330
if (object->share == NULL) {
334
py_share = PyUnicode_Decode(object->share, strlen(object->share), "utf-8", "ignore");
340
static int py_dfs_StorageInfo_set_share(PyObject *py_obj, PyObject *value, void *closure)
342
struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(py_obj);
343
if (value == Py_None) {
344
object->share = NULL;
346
object->share = NULL;
347
if (PyUnicode_Check(value)) {
348
object->share = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
349
} else if (PyString_Check(value)) {
350
object->share = PyString_AS_STRING(value);
352
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
359
static PyGetSetDef py_dfs_StorageInfo_getsetters[] = {
360
{ discard_const_p(char, "state"), py_dfs_StorageInfo_get_state, py_dfs_StorageInfo_set_state },
361
{ discard_const_p(char, "server"), py_dfs_StorageInfo_get_server, py_dfs_StorageInfo_set_server },
362
{ discard_const_p(char, "share"), py_dfs_StorageInfo_get_share, py_dfs_StorageInfo_set_share },
366
static PyObject *py_dfs_StorageInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
368
return py_talloc_new(struct dfs_StorageInfo, type);
372
static PyTypeObject dfs_StorageInfo_Type = {
373
PyObject_HEAD_INIT(NULL) 0,
374
.tp_name = "dfs.StorageInfo",
375
.tp_getset = py_dfs_StorageInfo_getsetters,
377
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
378
.tp_basicsize = sizeof(py_talloc_Object),
379
.tp_new = py_dfs_StorageInfo_new,
383
static PyObject *py_dfs_Info3_get_path(PyObject *obj, void *closure)
385
struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(obj);
387
if (object->path == NULL) {
391
if (object->path == NULL) {
395
py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
401
static int py_dfs_Info3_set_path(PyObject *py_obj, PyObject *value, void *closure)
403
struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(py_obj);
404
if (value == Py_None) {
408
if (PyUnicode_Check(value)) {
409
object->path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
410
} else if (PyString_Check(value)) {
411
object->path = PyString_AS_STRING(value);
413
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
420
static PyObject *py_dfs_Info3_get_comment(PyObject *obj, void *closure)
422
struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(obj);
423
PyObject *py_comment;
424
if (object->comment == NULL) {
425
py_comment = Py_None;
426
Py_INCREF(py_comment);
428
if (object->comment == NULL) {
429
py_comment = Py_None;
430
Py_INCREF(py_comment);
432
py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
438
static int py_dfs_Info3_set_comment(PyObject *py_obj, PyObject *value, void *closure)
440
struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(py_obj);
441
if (value == Py_None) {
442
object->comment = NULL;
444
object->comment = NULL;
445
if (PyUnicode_Check(value)) {
446
object->comment = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
447
} else if (PyString_Check(value)) {
448
object->comment = PyString_AS_STRING(value);
450
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
457
static PyObject *py_dfs_Info3_get_state(PyObject *obj, void *closure)
459
struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(obj);
461
py_state = PyInt_FromLong(object->state);
465
static int py_dfs_Info3_set_state(PyObject *py_obj, PyObject *value, void *closure)
467
struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(py_obj);
468
if (PyLong_Check(value)) {
469
object->state = PyLong_AsLongLong(value);
470
} else if (PyInt_Check(value)) {
471
object->state = PyInt_AsLong(value);
473
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
474
PyInt_Type.tp_name, PyLong_Type.tp_name);
480
static PyObject *py_dfs_Info3_get_num_stores(PyObject *obj, void *closure)
482
struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(obj);
483
PyObject *py_num_stores;
484
py_num_stores = PyInt_FromLong(object->num_stores);
485
return py_num_stores;
488
static int py_dfs_Info3_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
490
struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(py_obj);
491
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
492
object->num_stores = PyInt_AsLong(value);
496
static PyObject *py_dfs_Info3_get_stores(PyObject *obj, void *closure)
498
struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(obj);
500
if (object->stores == NULL) {
502
Py_INCREF(py_stores);
504
py_stores = PyList_New(object->num_stores);
505
if (py_stores == NULL) {
510
for (stores_cntr_1 = 0; stores_cntr_1 < object->num_stores; stores_cntr_1++) {
511
PyObject *py_stores_1;
512
py_stores_1 = py_talloc_reference_ex(&dfs_StorageInfo_Type, object->stores, &object->stores[stores_cntr_1]);
513
PyList_SetItem(py_stores, stores_cntr_1, py_stores_1);
520
static int py_dfs_Info3_set_stores(PyObject *py_obj, PyObject *value, void *closure)
522
struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(py_obj);
523
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->stores);
524
if (value == Py_None) {
525
object->stores = NULL;
527
object->stores = NULL;
528
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
531
object->stores = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->stores, PyList_GET_SIZE(value));
532
if (!object->stores) { return -1;; }
533
talloc_set_name_const(object->stores, "ARRAY: object->stores");
534
for (stores_cntr_1 = 0; stores_cntr_1 < PyList_GET_SIZE(value); stores_cntr_1++) {
535
PY_CHECK_TYPE(&dfs_StorageInfo_Type, PyList_GET_ITEM(value, stores_cntr_1), return -1;);
536
if (talloc_reference(object->stores, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, stores_cntr_1))) == NULL) {
540
object->stores[stores_cntr_1] = *(struct dfs_StorageInfo *)py_talloc_get_ptr(PyList_GET_ITEM(value, stores_cntr_1));
547
static PyGetSetDef py_dfs_Info3_getsetters[] = {
548
{ discard_const_p(char, "path"), py_dfs_Info3_get_path, py_dfs_Info3_set_path },
549
{ discard_const_p(char, "comment"), py_dfs_Info3_get_comment, py_dfs_Info3_set_comment },
550
{ discard_const_p(char, "state"), py_dfs_Info3_get_state, py_dfs_Info3_set_state },
551
{ discard_const_p(char, "num_stores"), py_dfs_Info3_get_num_stores, py_dfs_Info3_set_num_stores },
552
{ discard_const_p(char, "stores"), py_dfs_Info3_get_stores, py_dfs_Info3_set_stores },
556
static PyObject *py_dfs_Info3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
558
return py_talloc_new(struct dfs_Info3, type);
562
static PyTypeObject dfs_Info3_Type = {
563
PyObject_HEAD_INIT(NULL) 0,
564
.tp_name = "dfs.Info3",
565
.tp_getset = py_dfs_Info3_getsetters,
567
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
568
.tp_basicsize = sizeof(py_talloc_Object),
569
.tp_new = py_dfs_Info3_new,
573
static PyObject *py_dfs_Info4_get_path(PyObject *obj, void *closure)
575
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
577
if (object->path == NULL) {
581
if (object->path == NULL) {
585
py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
591
static int py_dfs_Info4_set_path(PyObject *py_obj, PyObject *value, void *closure)
593
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(py_obj);
594
if (value == Py_None) {
598
if (PyUnicode_Check(value)) {
599
object->path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
600
} else if (PyString_Check(value)) {
601
object->path = PyString_AS_STRING(value);
603
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
610
static PyObject *py_dfs_Info4_get_comment(PyObject *obj, void *closure)
612
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
613
PyObject *py_comment;
614
if (object->comment == NULL) {
615
py_comment = Py_None;
616
Py_INCREF(py_comment);
618
if (object->comment == NULL) {
619
py_comment = Py_None;
620
Py_INCREF(py_comment);
622
py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
628
static int py_dfs_Info4_set_comment(PyObject *py_obj, PyObject *value, void *closure)
630
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(py_obj);
631
if (value == Py_None) {
632
object->comment = NULL;
634
object->comment = NULL;
635
if (PyUnicode_Check(value)) {
636
object->comment = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
637
} else if (PyString_Check(value)) {
638
object->comment = PyString_AS_STRING(value);
640
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
647
static PyObject *py_dfs_Info4_get_state(PyObject *obj, void *closure)
649
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
651
py_state = PyInt_FromLong(object->state);
655
static int py_dfs_Info4_set_state(PyObject *py_obj, PyObject *value, void *closure)
657
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(py_obj);
658
if (PyLong_Check(value)) {
659
object->state = PyLong_AsLongLong(value);
660
} else if (PyInt_Check(value)) {
661
object->state = PyInt_AsLong(value);
663
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
664
PyInt_Type.tp_name, PyLong_Type.tp_name);
670
static PyObject *py_dfs_Info4_get_timeout(PyObject *obj, void *closure)
672
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
673
PyObject *py_timeout;
674
py_timeout = PyInt_FromLong(object->timeout);
678
static int py_dfs_Info4_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
680
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(py_obj);
681
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
682
object->timeout = PyInt_AsLong(value);
686
static PyObject *py_dfs_Info4_get_guid(PyObject *obj, void *closure)
688
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
690
py_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->guid);
694
static int py_dfs_Info4_set_guid(PyObject *py_obj, PyObject *value, void *closure)
696
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(py_obj);
697
PY_CHECK_TYPE(GUID_Type, value, return -1;);
698
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
702
object->guid = *(struct GUID *)py_talloc_get_ptr(value);
706
static PyObject *py_dfs_Info4_get_num_stores(PyObject *obj, void *closure)
708
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
709
PyObject *py_num_stores;
710
py_num_stores = PyInt_FromLong(object->num_stores);
711
return py_num_stores;
714
static int py_dfs_Info4_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
716
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(py_obj);
717
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
718
object->num_stores = PyInt_AsLong(value);
722
static PyObject *py_dfs_Info4_get_stores(PyObject *obj, void *closure)
724
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
726
if (object->stores == NULL) {
728
Py_INCREF(py_stores);
730
py_stores = PyList_New(object->num_stores);
731
if (py_stores == NULL) {
736
for (stores_cntr_1 = 0; stores_cntr_1 < object->num_stores; stores_cntr_1++) {
737
PyObject *py_stores_1;
738
py_stores_1 = py_talloc_reference_ex(&dfs_StorageInfo_Type, object->stores, &object->stores[stores_cntr_1]);
739
PyList_SetItem(py_stores, stores_cntr_1, py_stores_1);
746
static int py_dfs_Info4_set_stores(PyObject *py_obj, PyObject *value, void *closure)
748
struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(py_obj);
749
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->stores);
750
if (value == Py_None) {
751
object->stores = NULL;
753
object->stores = NULL;
754
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
757
object->stores = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->stores, PyList_GET_SIZE(value));
758
if (!object->stores) { return -1;; }
759
talloc_set_name_const(object->stores, "ARRAY: object->stores");
760
for (stores_cntr_1 = 0; stores_cntr_1 < PyList_GET_SIZE(value); stores_cntr_1++) {
761
PY_CHECK_TYPE(&dfs_StorageInfo_Type, PyList_GET_ITEM(value, stores_cntr_1), return -1;);
762
if (talloc_reference(object->stores, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, stores_cntr_1))) == NULL) {
766
object->stores[stores_cntr_1] = *(struct dfs_StorageInfo *)py_talloc_get_ptr(PyList_GET_ITEM(value, stores_cntr_1));
773
static PyGetSetDef py_dfs_Info4_getsetters[] = {
774
{ discard_const_p(char, "path"), py_dfs_Info4_get_path, py_dfs_Info4_set_path },
775
{ discard_const_p(char, "comment"), py_dfs_Info4_get_comment, py_dfs_Info4_set_comment },
776
{ discard_const_p(char, "state"), py_dfs_Info4_get_state, py_dfs_Info4_set_state },
777
{ discard_const_p(char, "timeout"), py_dfs_Info4_get_timeout, py_dfs_Info4_set_timeout },
778
{ discard_const_p(char, "guid"), py_dfs_Info4_get_guid, py_dfs_Info4_set_guid },
779
{ discard_const_p(char, "num_stores"), py_dfs_Info4_get_num_stores, py_dfs_Info4_set_num_stores },
780
{ discard_const_p(char, "stores"), py_dfs_Info4_get_stores, py_dfs_Info4_set_stores },
784
static PyObject *py_dfs_Info4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
786
return py_talloc_new(struct dfs_Info4, type);
790
static PyTypeObject dfs_Info4_Type = {
791
PyObject_HEAD_INIT(NULL) 0,
792
.tp_name = "dfs.Info4",
793
.tp_getset = py_dfs_Info4_getsetters,
795
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
796
.tp_basicsize = sizeof(py_talloc_Object),
797
.tp_new = py_dfs_Info4_new,
801
static PyObject *py_dfs_Info5_get_path(PyObject *obj, void *closure)
803
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
805
if (object->path == NULL) {
809
if (object->path == NULL) {
813
py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
819
static int py_dfs_Info5_set_path(PyObject *py_obj, PyObject *value, void *closure)
821
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(py_obj);
822
if (value == Py_None) {
826
if (PyUnicode_Check(value)) {
827
object->path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
828
} else if (PyString_Check(value)) {
829
object->path = PyString_AS_STRING(value);
831
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
838
static PyObject *py_dfs_Info5_get_comment(PyObject *obj, void *closure)
840
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
841
PyObject *py_comment;
842
if (object->comment == NULL) {
843
py_comment = Py_None;
844
Py_INCREF(py_comment);
846
if (object->comment == NULL) {
847
py_comment = Py_None;
848
Py_INCREF(py_comment);
850
py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
856
static int py_dfs_Info5_set_comment(PyObject *py_obj, PyObject *value, void *closure)
858
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(py_obj);
859
if (value == Py_None) {
860
object->comment = NULL;
862
object->comment = NULL;
863
if (PyUnicode_Check(value)) {
864
object->comment = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
865
} else if (PyString_Check(value)) {
866
object->comment = PyString_AS_STRING(value);
868
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
875
static PyObject *py_dfs_Info5_get_state(PyObject *obj, void *closure)
877
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
879
py_state = PyInt_FromLong(object->state);
883
static int py_dfs_Info5_set_state(PyObject *py_obj, PyObject *value, void *closure)
885
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(py_obj);
886
if (PyLong_Check(value)) {
887
object->state = PyLong_AsLongLong(value);
888
} else if (PyInt_Check(value)) {
889
object->state = PyInt_AsLong(value);
891
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
892
PyInt_Type.tp_name, PyLong_Type.tp_name);
898
static PyObject *py_dfs_Info5_get_timeout(PyObject *obj, void *closure)
900
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
901
PyObject *py_timeout;
902
py_timeout = PyInt_FromLong(object->timeout);
906
static int py_dfs_Info5_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
908
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(py_obj);
909
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
910
object->timeout = PyInt_AsLong(value);
914
static PyObject *py_dfs_Info5_get_guid(PyObject *obj, void *closure)
916
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
918
py_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->guid);
922
static int py_dfs_Info5_set_guid(PyObject *py_obj, PyObject *value, void *closure)
924
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(py_obj);
925
PY_CHECK_TYPE(GUID_Type, value, return -1;);
926
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
930
object->guid = *(struct GUID *)py_talloc_get_ptr(value);
934
static PyObject *py_dfs_Info5_get_flags(PyObject *obj, void *closure)
936
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
938
py_flags = PyInt_FromLong(object->flags);
942
static int py_dfs_Info5_set_flags(PyObject *py_obj, PyObject *value, void *closure)
944
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(py_obj);
945
if (PyLong_Check(value)) {
946
object->flags = PyLong_AsLongLong(value);
947
} else if (PyInt_Check(value)) {
948
object->flags = PyInt_AsLong(value);
950
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
951
PyInt_Type.tp_name, PyLong_Type.tp_name);
957
static PyObject *py_dfs_Info5_get_pktsize(PyObject *obj, void *closure)
959
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
960
PyObject *py_pktsize;
961
py_pktsize = PyInt_FromLong(object->pktsize);
965
static int py_dfs_Info5_set_pktsize(PyObject *py_obj, PyObject *value, void *closure)
967
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(py_obj);
968
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
969
object->pktsize = PyInt_AsLong(value);
973
static PyObject *py_dfs_Info5_get_num_stores(PyObject *obj, void *closure)
975
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
976
PyObject *py_num_stores;
977
py_num_stores = PyInt_FromLong(object->num_stores);
978
return py_num_stores;
981
static int py_dfs_Info5_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
983
struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(py_obj);
984
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
985
object->num_stores = PyInt_AsLong(value);
989
static PyGetSetDef py_dfs_Info5_getsetters[] = {
990
{ discard_const_p(char, "path"), py_dfs_Info5_get_path, py_dfs_Info5_set_path },
991
{ discard_const_p(char, "comment"), py_dfs_Info5_get_comment, py_dfs_Info5_set_comment },
992
{ discard_const_p(char, "state"), py_dfs_Info5_get_state, py_dfs_Info5_set_state },
993
{ discard_const_p(char, "timeout"), py_dfs_Info5_get_timeout, py_dfs_Info5_set_timeout },
994
{ discard_const_p(char, "guid"), py_dfs_Info5_get_guid, py_dfs_Info5_set_guid },
995
{ discard_const_p(char, "flags"), py_dfs_Info5_get_flags, py_dfs_Info5_set_flags },
996
{ discard_const_p(char, "pktsize"), py_dfs_Info5_get_pktsize, py_dfs_Info5_set_pktsize },
997
{ discard_const_p(char, "num_stores"), py_dfs_Info5_get_num_stores, py_dfs_Info5_set_num_stores },
1001
static PyObject *py_dfs_Info5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1003
return py_talloc_new(struct dfs_Info5, type);
1007
static PyTypeObject dfs_Info5_Type = {
1008
PyObject_HEAD_INIT(NULL) 0,
1009
.tp_name = "dfs.Info5",
1010
.tp_getset = py_dfs_Info5_getsetters,
1012
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1013
.tp_basicsize = sizeof(py_talloc_Object),
1014
.tp_new = py_dfs_Info5_new,
1018
static PyObject *py_dfs_Target_Priority_get_target_priority_class(PyObject *obj, void *closure)
1020
struct dfs_Target_Priority *object = (struct dfs_Target_Priority *)py_talloc_get_ptr(obj);
1021
PyObject *py_target_priority_class;
1022
py_target_priority_class = PyInt_FromLong(object->target_priority_class);
1023
return py_target_priority_class;
1026
static int py_dfs_Target_Priority_set_target_priority_class(PyObject *py_obj, PyObject *value, void *closure)
1028
struct dfs_Target_Priority *object = (struct dfs_Target_Priority *)py_talloc_get_ptr(py_obj);
1029
if (PyLong_Check(value)) {
1030
object->target_priority_class = PyLong_AsLongLong(value);
1031
} else if (PyInt_Check(value)) {
1032
object->target_priority_class = PyInt_AsLong(value);
1034
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1035
PyInt_Type.tp_name, PyLong_Type.tp_name);
1041
static PyObject *py_dfs_Target_Priority_get_target_priority_rank(PyObject *obj, void *closure)
1043
struct dfs_Target_Priority *object = (struct dfs_Target_Priority *)py_talloc_get_ptr(obj);
1044
PyObject *py_target_priority_rank;
1045
py_target_priority_rank = PyInt_FromLong(object->target_priority_rank);
1046
return py_target_priority_rank;
1049
static int py_dfs_Target_Priority_set_target_priority_rank(PyObject *py_obj, PyObject *value, void *closure)
1051
struct dfs_Target_Priority *object = (struct dfs_Target_Priority *)py_talloc_get_ptr(py_obj);
1052
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1053
object->target_priority_rank = PyInt_AsLong(value);
1057
static PyObject *py_dfs_Target_Priority_get_reserved(PyObject *obj, void *closure)
1059
struct dfs_Target_Priority *object = (struct dfs_Target_Priority *)py_talloc_get_ptr(obj);
1060
PyObject *py_reserved;
1061
py_reserved = PyInt_FromLong(object->reserved);
1065
static int py_dfs_Target_Priority_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
1067
struct dfs_Target_Priority *object = (struct dfs_Target_Priority *)py_talloc_get_ptr(py_obj);
1068
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1069
object->reserved = PyInt_AsLong(value);
1073
static PyGetSetDef py_dfs_Target_Priority_getsetters[] = {
1074
{ discard_const_p(char, "target_priority_class"), py_dfs_Target_Priority_get_target_priority_class, py_dfs_Target_Priority_set_target_priority_class },
1075
{ discard_const_p(char, "target_priority_rank"), py_dfs_Target_Priority_get_target_priority_rank, py_dfs_Target_Priority_set_target_priority_rank },
1076
{ discard_const_p(char, "reserved"), py_dfs_Target_Priority_get_reserved, py_dfs_Target_Priority_set_reserved },
1080
static PyObject *py_dfs_Target_Priority_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1082
return py_talloc_new(struct dfs_Target_Priority, type);
1086
static PyTypeObject dfs_Target_Priority_Type = {
1087
PyObject_HEAD_INIT(NULL) 0,
1088
.tp_name = "dfs.Target_Priority",
1089
.tp_getset = py_dfs_Target_Priority_getsetters,
1091
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1092
.tp_basicsize = sizeof(py_talloc_Object),
1093
.tp_new = py_dfs_Target_Priority_new,
1097
static PyObject *py_dfs_StorageInfo2_get_info(PyObject *obj, void *closure)
1099
struct dfs_StorageInfo2 *object = (struct dfs_StorageInfo2 *)py_talloc_get_ptr(obj);
1101
py_info = py_talloc_reference_ex(&dfs_StorageInfo_Type, py_talloc_get_mem_ctx(obj), &object->info);
1105
static int py_dfs_StorageInfo2_set_info(PyObject *py_obj, PyObject *value, void *closure)
1107
struct dfs_StorageInfo2 *object = (struct dfs_StorageInfo2 *)py_talloc_get_ptr(py_obj);
1108
PY_CHECK_TYPE(&dfs_StorageInfo_Type, value, return -1;);
1109
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
1113
object->info = *(struct dfs_StorageInfo *)py_talloc_get_ptr(value);
1117
static PyObject *py_dfs_StorageInfo2_get_target_priority(PyObject *obj, void *closure)
1119
struct dfs_StorageInfo2 *object = (struct dfs_StorageInfo2 *)py_talloc_get_ptr(obj);
1120
PyObject *py_target_priority;
1121
py_target_priority = py_talloc_reference_ex(&dfs_Target_Priority_Type, py_talloc_get_mem_ctx(obj), &object->target_priority);
1122
return py_target_priority;
1125
static int py_dfs_StorageInfo2_set_target_priority(PyObject *py_obj, PyObject *value, void *closure)
1127
struct dfs_StorageInfo2 *object = (struct dfs_StorageInfo2 *)py_talloc_get_ptr(py_obj);
1128
PY_CHECK_TYPE(&dfs_Target_Priority_Type, value, return -1;);
1129
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
1133
object->target_priority = *(struct dfs_Target_Priority *)py_talloc_get_ptr(value);
1137
static PyGetSetDef py_dfs_StorageInfo2_getsetters[] = {
1138
{ discard_const_p(char, "info"), py_dfs_StorageInfo2_get_info, py_dfs_StorageInfo2_set_info },
1139
{ discard_const_p(char, "target_priority"), py_dfs_StorageInfo2_get_target_priority, py_dfs_StorageInfo2_set_target_priority },
1143
static PyObject *py_dfs_StorageInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1145
return py_talloc_new(struct dfs_StorageInfo2, type);
1149
static PyTypeObject dfs_StorageInfo2_Type = {
1150
PyObject_HEAD_INIT(NULL) 0,
1151
.tp_name = "dfs.StorageInfo2",
1152
.tp_getset = py_dfs_StorageInfo2_getsetters,
1154
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1155
.tp_basicsize = sizeof(py_talloc_Object),
1156
.tp_new = py_dfs_StorageInfo2_new,
1160
static PyObject *py_dfs_Info6_get_entry_path(PyObject *obj, void *closure)
1162
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
1163
PyObject *py_entry_path;
1164
if (object->entry_path == NULL) {
1165
py_entry_path = Py_None;
1166
Py_INCREF(py_entry_path);
1168
if (object->entry_path == NULL) {
1169
py_entry_path = Py_None;
1170
Py_INCREF(py_entry_path);
1172
py_entry_path = PyUnicode_Decode(object->entry_path, strlen(object->entry_path), "utf-8", "ignore");
1175
return py_entry_path;
1178
static int py_dfs_Info6_set_entry_path(PyObject *py_obj, PyObject *value, void *closure)
1180
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
1181
if (value == Py_None) {
1182
object->entry_path = NULL;
1184
object->entry_path = NULL;
1185
if (PyUnicode_Check(value)) {
1186
object->entry_path = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
1187
} else if (PyString_Check(value)) {
1188
object->entry_path = PyString_AS_STRING(value);
1190
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
1197
static PyObject *py_dfs_Info6_get_comment(PyObject *obj, void *closure)
1199
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
1200
PyObject *py_comment;
1201
if (object->comment == NULL) {
1202
py_comment = Py_None;
1203
Py_INCREF(py_comment);
1205
if (object->comment == NULL) {
1206
py_comment = Py_None;
1207
Py_INCREF(py_comment);
1209
py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
1215
static int py_dfs_Info6_set_comment(PyObject *py_obj, PyObject *value, void *closure)
1217
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
1218
if (value == Py_None) {
1219
object->comment = NULL;
1221
object->comment = NULL;
1222
if (PyUnicode_Check(value)) {
1223
object->comment = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
1224
} else if (PyString_Check(value)) {
1225
object->comment = PyString_AS_STRING(value);
1227
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
1234
static PyObject *py_dfs_Info6_get_state(PyObject *obj, void *closure)
1236
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
1238
py_state = PyInt_FromLong(object->state);
1242
static int py_dfs_Info6_set_state(PyObject *py_obj, PyObject *value, void *closure)
1244
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
1245
if (PyLong_Check(value)) {
1246
object->state = PyLong_AsLongLong(value);
1247
} else if (PyInt_Check(value)) {
1248
object->state = PyInt_AsLong(value);
1250
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1251
PyInt_Type.tp_name, PyLong_Type.tp_name);
1257
static PyObject *py_dfs_Info6_get_timeout(PyObject *obj, void *closure)
1259
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
1260
PyObject *py_timeout;
1261
py_timeout = PyInt_FromLong(object->timeout);
1265
static int py_dfs_Info6_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
1267
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
1268
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1269
object->timeout = PyInt_AsLong(value);
1273
static PyObject *py_dfs_Info6_get_guid(PyObject *obj, void *closure)
1275
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
1277
py_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->guid);
1281
static int py_dfs_Info6_set_guid(PyObject *py_obj, PyObject *value, void *closure)
1283
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
1284
PY_CHECK_TYPE(GUID_Type, value, return -1;);
1285
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
1289
object->guid = *(struct GUID *)py_talloc_get_ptr(value);
1293
static PyObject *py_dfs_Info6_get_flags(PyObject *obj, void *closure)
1295
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
1297
py_flags = PyInt_FromLong(object->flags);
1301
static int py_dfs_Info6_set_flags(PyObject *py_obj, PyObject *value, void *closure)
1303
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
1304
if (PyLong_Check(value)) {
1305
object->flags = PyLong_AsLongLong(value);
1306
} else if (PyInt_Check(value)) {
1307
object->flags = PyInt_AsLong(value);
1309
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1310
PyInt_Type.tp_name, PyLong_Type.tp_name);
1316
static PyObject *py_dfs_Info6_get_pktsize(PyObject *obj, void *closure)
1318
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
1319
PyObject *py_pktsize;
1320
py_pktsize = PyInt_FromLong(object->pktsize);
1324
static int py_dfs_Info6_set_pktsize(PyObject *py_obj, PyObject *value, void *closure)
1326
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
1327
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1328
object->pktsize = PyInt_AsLong(value);
1332
static PyObject *py_dfs_Info6_get_num_stores(PyObject *obj, void *closure)
1334
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
1335
PyObject *py_num_stores;
1336
py_num_stores = PyInt_FromLong(object->num_stores);
1337
return py_num_stores;
1340
static int py_dfs_Info6_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
1342
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
1343
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1344
object->num_stores = PyInt_AsLong(value);
1348
static PyObject *py_dfs_Info6_get_stores(PyObject *obj, void *closure)
1350
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
1351
PyObject *py_stores;
1352
if (object->stores == NULL) {
1353
py_stores = Py_None;
1354
Py_INCREF(py_stores);
1356
py_stores = PyList_New(object->num_stores);
1357
if (py_stores == NULL) {
1362
for (stores_cntr_1 = 0; stores_cntr_1 < object->num_stores; stores_cntr_1++) {
1363
PyObject *py_stores_1;
1364
py_stores_1 = py_talloc_reference_ex(&dfs_StorageInfo2_Type, object->stores, &object->stores[stores_cntr_1]);
1365
PyList_SetItem(py_stores, stores_cntr_1, py_stores_1);
1372
static int py_dfs_Info6_set_stores(PyObject *py_obj, PyObject *value, void *closure)
1374
struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
1375
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->stores);
1376
if (value == Py_None) {
1377
object->stores = NULL;
1379
object->stores = NULL;
1380
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
1383
object->stores = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->stores, PyList_GET_SIZE(value));
1384
if (!object->stores) { return -1;; }
1385
talloc_set_name_const(object->stores, "ARRAY: object->stores");
1386
for (stores_cntr_1 = 0; stores_cntr_1 < PyList_GET_SIZE(value); stores_cntr_1++) {
1387
PY_CHECK_TYPE(&dfs_StorageInfo2_Type, PyList_GET_ITEM(value, stores_cntr_1), return -1;);
1388
if (talloc_reference(object->stores, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, stores_cntr_1))) == NULL) {
1392
object->stores[stores_cntr_1] = *(struct dfs_StorageInfo2 *)py_talloc_get_ptr(PyList_GET_ITEM(value, stores_cntr_1));
1399
static PyGetSetDef py_dfs_Info6_getsetters[] = {
1400
{ discard_const_p(char, "entry_path"), py_dfs_Info6_get_entry_path, py_dfs_Info6_set_entry_path },
1401
{ discard_const_p(char, "comment"), py_dfs_Info6_get_comment, py_dfs_Info6_set_comment },
1402
{ discard_const_p(char, "state"), py_dfs_Info6_get_state, py_dfs_Info6_set_state },
1403
{ discard_const_p(char, "timeout"), py_dfs_Info6_get_timeout, py_dfs_Info6_set_timeout },
1404
{ discard_const_p(char, "guid"), py_dfs_Info6_get_guid, py_dfs_Info6_set_guid },
1405
{ discard_const_p(char, "flags"), py_dfs_Info6_get_flags, py_dfs_Info6_set_flags },
1406
{ discard_const_p(char, "pktsize"), py_dfs_Info6_get_pktsize, py_dfs_Info6_set_pktsize },
1407
{ discard_const_p(char, "num_stores"), py_dfs_Info6_get_num_stores, py_dfs_Info6_set_num_stores },
1408
{ discard_const_p(char, "stores"), py_dfs_Info6_get_stores, py_dfs_Info6_set_stores },
1412
static PyObject *py_dfs_Info6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1414
return py_talloc_new(struct dfs_Info6, type);
1418
static PyTypeObject dfs_Info6_Type = {
1419
PyObject_HEAD_INIT(NULL) 0,
1420
.tp_name = "dfs.Info6",
1421
.tp_getset = py_dfs_Info6_getsetters,
1423
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1424
.tp_basicsize = sizeof(py_talloc_Object),
1425
.tp_new = py_dfs_Info6_new,
1429
static PyObject *py_dfs_Info7_get_generation_guid(PyObject *obj, void *closure)
1431
struct dfs_Info7 *object = (struct dfs_Info7 *)py_talloc_get_ptr(obj);
1432
PyObject *py_generation_guid;
1433
py_generation_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->generation_guid);
1434
return py_generation_guid;
1437
static int py_dfs_Info7_set_generation_guid(PyObject *py_obj, PyObject *value, void *closure)
1439
struct dfs_Info7 *object = (struct dfs_Info7 *)py_talloc_get_ptr(py_obj);
1440
PY_CHECK_TYPE(GUID_Type, value, return -1;);
1441
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
1445
object->generation_guid = *(struct GUID *)py_talloc_get_ptr(value);
1449
static PyGetSetDef py_dfs_Info7_getsetters[] = {
1450
{ discard_const_p(char, "generation_guid"), py_dfs_Info7_get_generation_guid, py_dfs_Info7_set_generation_guid },
1454
static PyObject *py_dfs_Info7_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1456
return py_talloc_new(struct dfs_Info7, type);
1460
static PyTypeObject dfs_Info7_Type = {
1461
PyObject_HEAD_INIT(NULL) 0,
1462
.tp_name = "dfs.Info7",
1463
.tp_getset = py_dfs_Info7_getsetters,
1465
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1466
.tp_basicsize = sizeof(py_talloc_Object),
1467
.tp_new = py_dfs_Info7_new,
1471
static PyObject *py_dfs_Info100_get_comment(PyObject *obj, void *closure)
1473
struct dfs_Info100 *object = (struct dfs_Info100 *)py_talloc_get_ptr(obj);
1474
PyObject *py_comment;
1475
if (object->comment == NULL) {
1476
py_comment = Py_None;
1477
Py_INCREF(py_comment);
1479
if (object->comment == NULL) {
1480
py_comment = Py_None;
1481
Py_INCREF(py_comment);
1483
py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
1489
static int py_dfs_Info100_set_comment(PyObject *py_obj, PyObject *value, void *closure)
1491
struct dfs_Info100 *object = (struct dfs_Info100 *)py_talloc_get_ptr(py_obj);
1492
if (value == Py_None) {
1493
object->comment = NULL;
1495
object->comment = NULL;
1496
if (PyUnicode_Check(value)) {
1497
object->comment = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
1498
} else if (PyString_Check(value)) {
1499
object->comment = PyString_AS_STRING(value);
1501
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
1508
static PyGetSetDef py_dfs_Info100_getsetters[] = {
1509
{ discard_const_p(char, "comment"), py_dfs_Info100_get_comment, py_dfs_Info100_set_comment },
1513
static PyObject *py_dfs_Info100_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1515
return py_talloc_new(struct dfs_Info100, type);
1519
static PyTypeObject dfs_Info100_Type = {
1520
PyObject_HEAD_INIT(NULL) 0,
1521
.tp_name = "dfs.Info100",
1522
.tp_getset = py_dfs_Info100_getsetters,
1524
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1525
.tp_basicsize = sizeof(py_talloc_Object),
1526
.tp_new = py_dfs_Info100_new,
1530
static PyObject *py_dfs_Info101_get_state(PyObject *obj, void *closure)
1532
struct dfs_Info101 *object = (struct dfs_Info101 *)py_talloc_get_ptr(obj);
1534
py_state = PyInt_FromLong(object->state);
1538
static int py_dfs_Info101_set_state(PyObject *py_obj, PyObject *value, void *closure)
1540
struct dfs_Info101 *object = (struct dfs_Info101 *)py_talloc_get_ptr(py_obj);
1541
if (PyLong_Check(value)) {
1542
object->state = PyLong_AsLongLong(value);
1543
} else if (PyInt_Check(value)) {
1544
object->state = PyInt_AsLong(value);
1546
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1547
PyInt_Type.tp_name, PyLong_Type.tp_name);
1553
static PyGetSetDef py_dfs_Info101_getsetters[] = {
1554
{ discard_const_p(char, "state"), py_dfs_Info101_get_state, py_dfs_Info101_set_state },
1558
static PyObject *py_dfs_Info101_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1560
return py_talloc_new(struct dfs_Info101, type);
1564
static PyTypeObject dfs_Info101_Type = {
1565
PyObject_HEAD_INIT(NULL) 0,
1566
.tp_name = "dfs.Info101",
1567
.tp_getset = py_dfs_Info101_getsetters,
1569
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1570
.tp_basicsize = sizeof(py_talloc_Object),
1571
.tp_new = py_dfs_Info101_new,
1575
static PyObject *py_dfs_Info102_get_timeout(PyObject *obj, void *closure)
1577
struct dfs_Info102 *object = (struct dfs_Info102 *)py_talloc_get_ptr(obj);
1578
PyObject *py_timeout;
1579
py_timeout = PyInt_FromLong(object->timeout);
1583
static int py_dfs_Info102_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
1585
struct dfs_Info102 *object = (struct dfs_Info102 *)py_talloc_get_ptr(py_obj);
1586
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1587
object->timeout = PyInt_AsLong(value);
1591
static PyGetSetDef py_dfs_Info102_getsetters[] = {
1592
{ discard_const_p(char, "timeout"), py_dfs_Info102_get_timeout, py_dfs_Info102_set_timeout },
1596
static PyObject *py_dfs_Info102_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1598
return py_talloc_new(struct dfs_Info102, type);
1602
static PyTypeObject dfs_Info102_Type = {
1603
PyObject_HEAD_INIT(NULL) 0,
1604
.tp_name = "dfs.Info102",
1605
.tp_getset = py_dfs_Info102_getsetters,
1607
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1608
.tp_basicsize = sizeof(py_talloc_Object),
1609
.tp_new = py_dfs_Info102_new,
1613
static PyObject *py_dfs_Info103_get_flags(PyObject *obj, void *closure)
1615
struct dfs_Info103 *object = (struct dfs_Info103 *)py_talloc_get_ptr(obj);
1617
py_flags = PyInt_FromLong(object->flags);
1621
static int py_dfs_Info103_set_flags(PyObject *py_obj, PyObject *value, void *closure)
1623
struct dfs_Info103 *object = (struct dfs_Info103 *)py_talloc_get_ptr(py_obj);
1624
if (PyLong_Check(value)) {
1625
object->flags = PyLong_AsLongLong(value);
1626
} else if (PyInt_Check(value)) {
1627
object->flags = PyInt_AsLong(value);
1629
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1630
PyInt_Type.tp_name, PyLong_Type.tp_name);
1636
static PyGetSetDef py_dfs_Info103_getsetters[] = {
1637
{ discard_const_p(char, "flags"), py_dfs_Info103_get_flags, py_dfs_Info103_set_flags },
1641
static PyObject *py_dfs_Info103_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1643
return py_talloc_new(struct dfs_Info103, type);
1647
static PyTypeObject dfs_Info103_Type = {
1648
PyObject_HEAD_INIT(NULL) 0,
1649
.tp_name = "dfs.Info103",
1650
.tp_getset = py_dfs_Info103_getsetters,
1652
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1653
.tp_basicsize = sizeof(py_talloc_Object),
1654
.tp_new = py_dfs_Info103_new,
1658
static PyObject *py_dfs_Info104_get_priority(PyObject *obj, void *closure)
1660
struct dfs_Info104 *object = (struct dfs_Info104 *)py_talloc_get_ptr(obj);
1661
PyObject *py_priority;
1662
py_priority = py_talloc_reference_ex(&dfs_Target_Priority_Type, py_talloc_get_mem_ctx(obj), &object->priority);
1666
static int py_dfs_Info104_set_priority(PyObject *py_obj, PyObject *value, void *closure)
1668
struct dfs_Info104 *object = (struct dfs_Info104 *)py_talloc_get_ptr(py_obj);
1669
PY_CHECK_TYPE(&dfs_Target_Priority_Type, value, return -1;);
1670
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
1674
object->priority = *(struct dfs_Target_Priority *)py_talloc_get_ptr(value);
1678
static PyGetSetDef py_dfs_Info104_getsetters[] = {
1679
{ discard_const_p(char, "priority"), py_dfs_Info104_get_priority, py_dfs_Info104_set_priority },
1683
static PyObject *py_dfs_Info104_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1685
return py_talloc_new(struct dfs_Info104, type);
1689
static PyTypeObject dfs_Info104_Type = {
1690
PyObject_HEAD_INIT(NULL) 0,
1691
.tp_name = "dfs.Info104",
1692
.tp_getset = py_dfs_Info104_getsetters,
1694
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1695
.tp_basicsize = sizeof(py_talloc_Object),
1696
.tp_new = py_dfs_Info104_new,
1700
static PyObject *py_dfs_Info105_get_comment(PyObject *obj, void *closure)
1702
struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(obj);
1703
PyObject *py_comment;
1704
if (object->comment == NULL) {
1705
py_comment = Py_None;
1706
Py_INCREF(py_comment);
1708
if (object->comment == NULL) {
1709
py_comment = Py_None;
1710
Py_INCREF(py_comment);
1712
py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
1718
static int py_dfs_Info105_set_comment(PyObject *py_obj, PyObject *value, void *closure)
1720
struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(py_obj);
1721
if (value == Py_None) {
1722
object->comment = NULL;
1724
object->comment = NULL;
1725
if (PyUnicode_Check(value)) {
1726
object->comment = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
1727
} else if (PyString_Check(value)) {
1728
object->comment = PyString_AS_STRING(value);
1730
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
1737
static PyObject *py_dfs_Info105_get_state(PyObject *obj, void *closure)
1739
struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(obj);
1741
py_state = PyInt_FromLong(object->state);
1745
static int py_dfs_Info105_set_state(PyObject *py_obj, PyObject *value, void *closure)
1747
struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(py_obj);
1748
if (PyLong_Check(value)) {
1749
object->state = PyLong_AsLongLong(value);
1750
} else if (PyInt_Check(value)) {
1751
object->state = PyInt_AsLong(value);
1753
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1754
PyInt_Type.tp_name, PyLong_Type.tp_name);
1760
static PyObject *py_dfs_Info105_get_timeout(PyObject *obj, void *closure)
1762
struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(obj);
1763
PyObject *py_timeout;
1764
py_timeout = PyInt_FromLong(object->timeout);
1768
static int py_dfs_Info105_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
1770
struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(py_obj);
1771
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1772
object->timeout = PyInt_AsLong(value);
1776
static PyObject *py_dfs_Info105_get_property_flag_mask(PyObject *obj, void *closure)
1778
struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(obj);
1779
PyObject *py_property_flag_mask;
1780
py_property_flag_mask = PyInt_FromLong(object->property_flag_mask);
1781
return py_property_flag_mask;
1784
static int py_dfs_Info105_set_property_flag_mask(PyObject *py_obj, PyObject *value, void *closure)
1786
struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(py_obj);
1787
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1788
object->property_flag_mask = PyInt_AsLong(value);
1792
static PyObject *py_dfs_Info105_get_property_flags(PyObject *obj, void *closure)
1794
struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(obj);
1795
PyObject *py_property_flags;
1796
py_property_flags = PyInt_FromLong(object->property_flags);
1797
return py_property_flags;
1800
static int py_dfs_Info105_set_property_flags(PyObject *py_obj, PyObject *value, void *closure)
1802
struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(py_obj);
1803
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1804
object->property_flags = PyInt_AsLong(value);
1808
static PyGetSetDef py_dfs_Info105_getsetters[] = {
1809
{ discard_const_p(char, "comment"), py_dfs_Info105_get_comment, py_dfs_Info105_set_comment },
1810
{ discard_const_p(char, "state"), py_dfs_Info105_get_state, py_dfs_Info105_set_state },
1811
{ discard_const_p(char, "timeout"), py_dfs_Info105_get_timeout, py_dfs_Info105_set_timeout },
1812
{ discard_const_p(char, "property_flag_mask"), py_dfs_Info105_get_property_flag_mask, py_dfs_Info105_set_property_flag_mask },
1813
{ discard_const_p(char, "property_flags"), py_dfs_Info105_get_property_flags, py_dfs_Info105_set_property_flags },
1817
static PyObject *py_dfs_Info105_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1819
return py_talloc_new(struct dfs_Info105, type);
1823
static PyTypeObject dfs_Info105_Type = {
1824
PyObject_HEAD_INIT(NULL) 0,
1825
.tp_name = "dfs.Info105",
1826
.tp_getset = py_dfs_Info105_getsetters,
1828
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1829
.tp_basicsize = sizeof(py_talloc_Object),
1830
.tp_new = py_dfs_Info105_new,
1834
static PyObject *py_dfs_Info106_get_state(PyObject *obj, void *closure)
1836
struct dfs_Info106 *object = (struct dfs_Info106 *)py_talloc_get_ptr(obj);
1838
py_state = PyInt_FromLong(object->state);
1842
static int py_dfs_Info106_set_state(PyObject *py_obj, PyObject *value, void *closure)
1844
struct dfs_Info106 *object = (struct dfs_Info106 *)py_talloc_get_ptr(py_obj);
1845
if (PyLong_Check(value)) {
1846
object->state = PyLong_AsLongLong(value);
1847
} else if (PyInt_Check(value)) {
1848
object->state = PyInt_AsLong(value);
1850
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1851
PyInt_Type.tp_name, PyLong_Type.tp_name);
1857
static PyObject *py_dfs_Info106_get_priority(PyObject *obj, void *closure)
1859
struct dfs_Info106 *object = (struct dfs_Info106 *)py_talloc_get_ptr(obj);
1860
PyObject *py_priority;
1861
py_priority = py_talloc_reference_ex(&dfs_Target_Priority_Type, py_talloc_get_mem_ctx(obj), &object->priority);
1865
static int py_dfs_Info106_set_priority(PyObject *py_obj, PyObject *value, void *closure)
1867
struct dfs_Info106 *object = (struct dfs_Info106 *)py_talloc_get_ptr(py_obj);
1868
PY_CHECK_TYPE(&dfs_Target_Priority_Type, value, return -1;);
1869
if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
1873
object->priority = *(struct dfs_Target_Priority *)py_talloc_get_ptr(value);
1877
static PyGetSetDef py_dfs_Info106_getsetters[] = {
1878
{ discard_const_p(char, "state"), py_dfs_Info106_get_state, py_dfs_Info106_set_state },
1879
{ discard_const_p(char, "priority"), py_dfs_Info106_get_priority, py_dfs_Info106_set_priority },
1883
static PyObject *py_dfs_Info106_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1885
return py_talloc_new(struct dfs_Info106, type);
1889
static PyTypeObject dfs_Info106_Type = {
1890
PyObject_HEAD_INIT(NULL) 0,
1891
.tp_name = "dfs.Info106",
1892
.tp_getset = py_dfs_Info106_getsetters,
1894
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1895
.tp_basicsize = sizeof(py_talloc_Object),
1896
.tp_new = py_dfs_Info106_new,
1900
static PyObject *py_dfs_Info200_get_dom_root(PyObject *obj, void *closure)
1902
struct dfs_Info200 *object = (struct dfs_Info200 *)py_talloc_get_ptr(obj);
1903
PyObject *py_dom_root;
1904
if (object->dom_root == NULL) {
1905
py_dom_root = Py_None;
1906
Py_INCREF(py_dom_root);
1908
if (object->dom_root == NULL) {
1909
py_dom_root = Py_None;
1910
Py_INCREF(py_dom_root);
1912
py_dom_root = PyUnicode_Decode(object->dom_root, strlen(object->dom_root), "utf-8", "ignore");
1918
static int py_dfs_Info200_set_dom_root(PyObject *py_obj, PyObject *value, void *closure)
1920
struct dfs_Info200 *object = (struct dfs_Info200 *)py_talloc_get_ptr(py_obj);
1921
if (value == Py_None) {
1922
object->dom_root = NULL;
1924
object->dom_root = NULL;
1925
if (PyUnicode_Check(value)) {
1926
object->dom_root = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
1927
} else if (PyString_Check(value)) {
1928
object->dom_root = PyString_AS_STRING(value);
1930
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
1937
static PyGetSetDef py_dfs_Info200_getsetters[] = {
1938
{ discard_const_p(char, "dom_root"), py_dfs_Info200_get_dom_root, py_dfs_Info200_set_dom_root },
1942
static PyObject *py_dfs_Info200_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1944
return py_talloc_new(struct dfs_Info200, type);
1948
static PyTypeObject dfs_Info200_Type = {
1949
PyObject_HEAD_INIT(NULL) 0,
1950
.tp_name = "dfs.Info200",
1951
.tp_getset = py_dfs_Info200_getsetters,
1953
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1954
.tp_basicsize = sizeof(py_talloc_Object),
1955
.tp_new = py_dfs_Info200_new,
1959
static PyObject *py_dfs_Info300_get_flavor(PyObject *obj, void *closure)
1961
struct dfs_Info300 *object = (struct dfs_Info300 *)py_talloc_get_ptr(obj);
1962
PyObject *py_flavor;
1963
py_flavor = PyInt_FromLong(object->flavor);
1967
static int py_dfs_Info300_set_flavor(PyObject *py_obj, PyObject *value, void *closure)
1969
struct dfs_Info300 *object = (struct dfs_Info300 *)py_talloc_get_ptr(py_obj);
1970
if (PyLong_Check(value)) {
1971
object->flavor = PyLong_AsLongLong(value);
1972
} else if (PyInt_Check(value)) {
1973
object->flavor = PyInt_AsLong(value);
1975
PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1976
PyInt_Type.tp_name, PyLong_Type.tp_name);
1982
static PyObject *py_dfs_Info300_get_dom_root(PyObject *obj, void *closure)
1984
struct dfs_Info300 *object = (struct dfs_Info300 *)py_talloc_get_ptr(obj);
1985
PyObject *py_dom_root;
1986
if (object->dom_root == NULL) {
1987
py_dom_root = Py_None;
1988
Py_INCREF(py_dom_root);
1990
if (object->dom_root == NULL) {
1991
py_dom_root = Py_None;
1992
Py_INCREF(py_dom_root);
1994
py_dom_root = PyUnicode_Decode(object->dom_root, strlen(object->dom_root), "utf-8", "ignore");
2000
static int py_dfs_Info300_set_dom_root(PyObject *py_obj, PyObject *value, void *closure)
2002
struct dfs_Info300 *object = (struct dfs_Info300 *)py_talloc_get_ptr(py_obj);
2003
if (value == Py_None) {
2004
object->dom_root = NULL;
2006
object->dom_root = NULL;
2007
if (PyUnicode_Check(value)) {
2008
object->dom_root = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
2009
} else if (PyString_Check(value)) {
2010
object->dom_root = PyString_AS_STRING(value);
2012
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
2019
static PyGetSetDef py_dfs_Info300_getsetters[] = {
2020
{ discard_const_p(char, "flavor"), py_dfs_Info300_get_flavor, py_dfs_Info300_set_flavor },
2021
{ discard_const_p(char, "dom_root"), py_dfs_Info300_get_dom_root, py_dfs_Info300_set_dom_root },
2025
static PyObject *py_dfs_Info300_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2027
return py_talloc_new(struct dfs_Info300, type);
2031
static PyTypeObject dfs_Info300_Type = {
2032
PyObject_HEAD_INIT(NULL) 0,
2033
.tp_name = "dfs.Info300",
2034
.tp_getset = py_dfs_Info300_getsetters,
2036
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2037
.tp_basicsize = sizeof(py_talloc_Object),
2038
.tp_new = py_dfs_Info300_new,
2041
PyObject *py_import_dfs_Info(TALLOC_CTX *mem_ctx, int level, union dfs_Info *in)
2047
if (in->info0 == NULL) {
2051
ret = py_talloc_reference_ex(&dfs_Info0_Type, in->info0, in->info0);
2056
if (in->info1 == NULL) {
2060
ret = py_talloc_reference_ex(&dfs_Info1_Type, in->info1, in->info1);
2065
if (in->info2 == NULL) {
2069
ret = py_talloc_reference_ex(&dfs_Info2_Type, in->info2, in->info2);
2074
if (in->info3 == NULL) {
2078
ret = py_talloc_reference_ex(&dfs_Info3_Type, in->info3, in->info3);
2083
if (in->info4 == NULL) {
2087
ret = py_talloc_reference_ex(&dfs_Info4_Type, in->info4, in->info4);
2092
if (in->info5 == NULL) {
2096
ret = py_talloc_reference_ex(&dfs_Info5_Type, in->info5, in->info5);
2101
if (in->info6 == NULL) {
2105
ret = py_talloc_reference_ex(&dfs_Info6_Type, in->info6, in->info6);
2110
if (in->info7 == NULL) {
2114
ret = py_talloc_reference_ex(&dfs_Info7_Type, in->info7, in->info7);
2119
if (in->info100 == NULL) {
2123
ret = py_talloc_reference_ex(&dfs_Info100_Type, in->info100, in->info100);
2128
if (in->info101 == NULL) {
2132
ret = py_talloc_reference_ex(&dfs_Info101_Type, in->info101, in->info101);
2137
if (in->info102 == NULL) {
2141
ret = py_talloc_reference_ex(&dfs_Info102_Type, in->info102, in->info102);
2146
if (in->info103 == NULL) {
2150
ret = py_talloc_reference_ex(&dfs_Info103_Type, in->info103, in->info103);
2155
if (in->info104 == NULL) {
2159
ret = py_talloc_reference_ex(&dfs_Info104_Type, in->info104, in->info104);
2164
if (in->info105 == NULL) {
2168
ret = py_talloc_reference_ex(&dfs_Info105_Type, in->info105, in->info105);
2173
if (in->info106 == NULL) {
2177
ret = py_talloc_reference_ex(&dfs_Info106_Type, in->info106, in->info106);
2182
PyErr_SetString(PyExc_TypeError, "unknown union level");
2186
union dfs_Info *py_export_dfs_Info(TALLOC_CTX *mem_ctx, int level, PyObject *in)
2188
union dfs_Info *ret = talloc_zero(mem_ctx, union dfs_Info);
2191
if (in == Py_None) {
2195
PY_CHECK_TYPE(&dfs_Info0_Type, in, talloc_free(ret); return NULL;);
2196
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2198
talloc_free(ret); return NULL;
2200
ret->info0 = (struct dfs_Info0 *)py_talloc_get_ptr(in);
2205
if (in == Py_None) {
2209
PY_CHECK_TYPE(&dfs_Info1_Type, in, talloc_free(ret); return NULL;);
2210
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2212
talloc_free(ret); return NULL;
2214
ret->info1 = (struct dfs_Info1 *)py_talloc_get_ptr(in);
2219
if (in == Py_None) {
2223
PY_CHECK_TYPE(&dfs_Info2_Type, in, talloc_free(ret); return NULL;);
2224
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2226
talloc_free(ret); return NULL;
2228
ret->info2 = (struct dfs_Info2 *)py_talloc_get_ptr(in);
2233
if (in == Py_None) {
2237
PY_CHECK_TYPE(&dfs_Info3_Type, in, talloc_free(ret); return NULL;);
2238
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2240
talloc_free(ret); return NULL;
2242
ret->info3 = (struct dfs_Info3 *)py_talloc_get_ptr(in);
2247
if (in == Py_None) {
2251
PY_CHECK_TYPE(&dfs_Info4_Type, in, talloc_free(ret); return NULL;);
2252
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2254
talloc_free(ret); return NULL;
2256
ret->info4 = (struct dfs_Info4 *)py_talloc_get_ptr(in);
2261
if (in == Py_None) {
2265
PY_CHECK_TYPE(&dfs_Info5_Type, in, talloc_free(ret); return NULL;);
2266
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2268
talloc_free(ret); return NULL;
2270
ret->info5 = (struct dfs_Info5 *)py_talloc_get_ptr(in);
2275
if (in == Py_None) {
2279
PY_CHECK_TYPE(&dfs_Info6_Type, in, talloc_free(ret); return NULL;);
2280
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2282
talloc_free(ret); return NULL;
2284
ret->info6 = (struct dfs_Info6 *)py_talloc_get_ptr(in);
2289
if (in == Py_None) {
2293
PY_CHECK_TYPE(&dfs_Info7_Type, in, talloc_free(ret); return NULL;);
2294
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2296
talloc_free(ret); return NULL;
2298
ret->info7 = (struct dfs_Info7 *)py_talloc_get_ptr(in);
2303
if (in == Py_None) {
2304
ret->info100 = NULL;
2306
ret->info100 = NULL;
2307
PY_CHECK_TYPE(&dfs_Info100_Type, in, talloc_free(ret); return NULL;);
2308
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2310
talloc_free(ret); return NULL;
2312
ret->info100 = (struct dfs_Info100 *)py_talloc_get_ptr(in);
2317
if (in == Py_None) {
2318
ret->info101 = NULL;
2320
ret->info101 = NULL;
2321
PY_CHECK_TYPE(&dfs_Info101_Type, in, talloc_free(ret); return NULL;);
2322
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2324
talloc_free(ret); return NULL;
2326
ret->info101 = (struct dfs_Info101 *)py_talloc_get_ptr(in);
2331
if (in == Py_None) {
2332
ret->info102 = NULL;
2334
ret->info102 = NULL;
2335
PY_CHECK_TYPE(&dfs_Info102_Type, in, talloc_free(ret); return NULL;);
2336
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2338
talloc_free(ret); return NULL;
2340
ret->info102 = (struct dfs_Info102 *)py_talloc_get_ptr(in);
2345
if (in == Py_None) {
2346
ret->info103 = NULL;
2348
ret->info103 = NULL;
2349
PY_CHECK_TYPE(&dfs_Info103_Type, in, talloc_free(ret); return NULL;);
2350
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2352
talloc_free(ret); return NULL;
2354
ret->info103 = (struct dfs_Info103 *)py_talloc_get_ptr(in);
2359
if (in == Py_None) {
2360
ret->info104 = NULL;
2362
ret->info104 = NULL;
2363
PY_CHECK_TYPE(&dfs_Info104_Type, in, talloc_free(ret); return NULL;);
2364
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2366
talloc_free(ret); return NULL;
2368
ret->info104 = (struct dfs_Info104 *)py_talloc_get_ptr(in);
2373
if (in == Py_None) {
2374
ret->info105 = NULL;
2376
ret->info105 = NULL;
2377
PY_CHECK_TYPE(&dfs_Info105_Type, in, talloc_free(ret); return NULL;);
2378
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2380
talloc_free(ret); return NULL;
2382
ret->info105 = (struct dfs_Info105 *)py_talloc_get_ptr(in);
2387
if (in == Py_None) {
2388
ret->info106 = NULL;
2390
ret->info106 = NULL;
2391
PY_CHECK_TYPE(&dfs_Info106_Type, in, talloc_free(ret); return NULL;);
2392
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
2394
talloc_free(ret); return NULL;
2396
ret->info106 = (struct dfs_Info106 *)py_talloc_get_ptr(in);
2401
PyErr_SetString(PyExc_TypeError, "invalid union level value");
2410
static PyObject *py_dfs_EnumArray1_get_count(PyObject *obj, void *closure)
2412
struct dfs_EnumArray1 *object = (struct dfs_EnumArray1 *)py_talloc_get_ptr(obj);
2414
py_count = PyInt_FromLong(object->count);
2418
static int py_dfs_EnumArray1_set_count(PyObject *py_obj, PyObject *value, void *closure)
2420
struct dfs_EnumArray1 *object = (struct dfs_EnumArray1 *)py_talloc_get_ptr(py_obj);
2421
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2422
object->count = PyInt_AsLong(value);
2426
static PyObject *py_dfs_EnumArray1_get_s(PyObject *obj, void *closure)
2428
struct dfs_EnumArray1 *object = (struct dfs_EnumArray1 *)py_talloc_get_ptr(obj);
2430
if (object->s == NULL) {
2434
py_s = PyList_New(object->count);
2440
for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
2442
py_s_1 = py_talloc_reference_ex(&dfs_Info1_Type, object->s, &object->s[s_cntr_1]);
2443
PyList_SetItem(py_s, s_cntr_1, py_s_1);
2450
static int py_dfs_EnumArray1_set_s(PyObject *py_obj, PyObject *value, void *closure)
2452
struct dfs_EnumArray1 *object = (struct dfs_EnumArray1 *)py_talloc_get_ptr(py_obj);
2453
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->s);
2454
if (value == Py_None) {
2458
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2461
object->s = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
2462
if (!object->s) { return -1;; }
2463
talloc_set_name_const(object->s, "ARRAY: object->s");
2464
for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
2465
PY_CHECK_TYPE(&dfs_Info1_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
2466
if (talloc_reference(object->s, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
2470
object->s[s_cntr_1] = *(struct dfs_Info1 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
2477
static PyGetSetDef py_dfs_EnumArray1_getsetters[] = {
2478
{ discard_const_p(char, "count"), py_dfs_EnumArray1_get_count, py_dfs_EnumArray1_set_count },
2479
{ discard_const_p(char, "s"), py_dfs_EnumArray1_get_s, py_dfs_EnumArray1_set_s },
2483
static PyObject *py_dfs_EnumArray1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2485
return py_talloc_new(struct dfs_EnumArray1, type);
2489
static PyTypeObject dfs_EnumArray1_Type = {
2490
PyObject_HEAD_INIT(NULL) 0,
2491
.tp_name = "dfs.EnumArray1",
2492
.tp_getset = py_dfs_EnumArray1_getsetters,
2494
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2495
.tp_basicsize = sizeof(py_talloc_Object),
2496
.tp_new = py_dfs_EnumArray1_new,
2500
static PyObject *py_dfs_EnumArray2_get_count(PyObject *obj, void *closure)
2502
struct dfs_EnumArray2 *object = (struct dfs_EnumArray2 *)py_talloc_get_ptr(obj);
2504
py_count = PyInt_FromLong(object->count);
2508
static int py_dfs_EnumArray2_set_count(PyObject *py_obj, PyObject *value, void *closure)
2510
struct dfs_EnumArray2 *object = (struct dfs_EnumArray2 *)py_talloc_get_ptr(py_obj);
2511
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2512
object->count = PyInt_AsLong(value);
2516
static PyObject *py_dfs_EnumArray2_get_s(PyObject *obj, void *closure)
2518
struct dfs_EnumArray2 *object = (struct dfs_EnumArray2 *)py_talloc_get_ptr(obj);
2520
if (object->s == NULL) {
2524
py_s = PyList_New(object->count);
2530
for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
2532
py_s_1 = py_talloc_reference_ex(&dfs_Info2_Type, object->s, &object->s[s_cntr_1]);
2533
PyList_SetItem(py_s, s_cntr_1, py_s_1);
2540
static int py_dfs_EnumArray2_set_s(PyObject *py_obj, PyObject *value, void *closure)
2542
struct dfs_EnumArray2 *object = (struct dfs_EnumArray2 *)py_talloc_get_ptr(py_obj);
2543
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->s);
2544
if (value == Py_None) {
2548
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2551
object->s = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
2552
if (!object->s) { return -1;; }
2553
talloc_set_name_const(object->s, "ARRAY: object->s");
2554
for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
2555
PY_CHECK_TYPE(&dfs_Info2_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
2556
if (talloc_reference(object->s, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
2560
object->s[s_cntr_1] = *(struct dfs_Info2 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
2567
static PyGetSetDef py_dfs_EnumArray2_getsetters[] = {
2568
{ discard_const_p(char, "count"), py_dfs_EnumArray2_get_count, py_dfs_EnumArray2_set_count },
2569
{ discard_const_p(char, "s"), py_dfs_EnumArray2_get_s, py_dfs_EnumArray2_set_s },
2573
static PyObject *py_dfs_EnumArray2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2575
return py_talloc_new(struct dfs_EnumArray2, type);
2579
static PyTypeObject dfs_EnumArray2_Type = {
2580
PyObject_HEAD_INIT(NULL) 0,
2581
.tp_name = "dfs.EnumArray2",
2582
.tp_getset = py_dfs_EnumArray2_getsetters,
2584
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2585
.tp_basicsize = sizeof(py_talloc_Object),
2586
.tp_new = py_dfs_EnumArray2_new,
2590
static PyObject *py_dfs_EnumArray3_get_count(PyObject *obj, void *closure)
2592
struct dfs_EnumArray3 *object = (struct dfs_EnumArray3 *)py_talloc_get_ptr(obj);
2594
py_count = PyInt_FromLong(object->count);
2598
static int py_dfs_EnumArray3_set_count(PyObject *py_obj, PyObject *value, void *closure)
2600
struct dfs_EnumArray3 *object = (struct dfs_EnumArray3 *)py_talloc_get_ptr(py_obj);
2601
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2602
object->count = PyInt_AsLong(value);
2606
static PyObject *py_dfs_EnumArray3_get_s(PyObject *obj, void *closure)
2608
struct dfs_EnumArray3 *object = (struct dfs_EnumArray3 *)py_talloc_get_ptr(obj);
2610
if (object->s == NULL) {
2614
py_s = PyList_New(object->count);
2620
for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
2622
py_s_1 = py_talloc_reference_ex(&dfs_Info3_Type, object->s, &object->s[s_cntr_1]);
2623
PyList_SetItem(py_s, s_cntr_1, py_s_1);
2630
static int py_dfs_EnumArray3_set_s(PyObject *py_obj, PyObject *value, void *closure)
2632
struct dfs_EnumArray3 *object = (struct dfs_EnumArray3 *)py_talloc_get_ptr(py_obj);
2633
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->s);
2634
if (value == Py_None) {
2638
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2641
object->s = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
2642
if (!object->s) { return -1;; }
2643
talloc_set_name_const(object->s, "ARRAY: object->s");
2644
for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
2645
PY_CHECK_TYPE(&dfs_Info3_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
2646
if (talloc_reference(object->s, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
2650
object->s[s_cntr_1] = *(struct dfs_Info3 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
2657
static PyGetSetDef py_dfs_EnumArray3_getsetters[] = {
2658
{ discard_const_p(char, "count"), py_dfs_EnumArray3_get_count, py_dfs_EnumArray3_set_count },
2659
{ discard_const_p(char, "s"), py_dfs_EnumArray3_get_s, py_dfs_EnumArray3_set_s },
2663
static PyObject *py_dfs_EnumArray3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2665
return py_talloc_new(struct dfs_EnumArray3, type);
2669
static PyTypeObject dfs_EnumArray3_Type = {
2670
PyObject_HEAD_INIT(NULL) 0,
2671
.tp_name = "dfs.EnumArray3",
2672
.tp_getset = py_dfs_EnumArray3_getsetters,
2674
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2675
.tp_basicsize = sizeof(py_talloc_Object),
2676
.tp_new = py_dfs_EnumArray3_new,
2680
static PyObject *py_dfs_EnumArray4_get_count(PyObject *obj, void *closure)
2682
struct dfs_EnumArray4 *object = (struct dfs_EnumArray4 *)py_talloc_get_ptr(obj);
2684
py_count = PyInt_FromLong(object->count);
2688
static int py_dfs_EnumArray4_set_count(PyObject *py_obj, PyObject *value, void *closure)
2690
struct dfs_EnumArray4 *object = (struct dfs_EnumArray4 *)py_talloc_get_ptr(py_obj);
2691
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2692
object->count = PyInt_AsLong(value);
2696
static PyObject *py_dfs_EnumArray4_get_s(PyObject *obj, void *closure)
2698
struct dfs_EnumArray4 *object = (struct dfs_EnumArray4 *)py_talloc_get_ptr(obj);
2700
if (object->s == NULL) {
2704
py_s = PyList_New(object->count);
2710
for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
2712
py_s_1 = py_talloc_reference_ex(&dfs_Info4_Type, object->s, &object->s[s_cntr_1]);
2713
PyList_SetItem(py_s, s_cntr_1, py_s_1);
2720
static int py_dfs_EnumArray4_set_s(PyObject *py_obj, PyObject *value, void *closure)
2722
struct dfs_EnumArray4 *object = (struct dfs_EnumArray4 *)py_talloc_get_ptr(py_obj);
2723
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->s);
2724
if (value == Py_None) {
2728
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2731
object->s = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
2732
if (!object->s) { return -1;; }
2733
talloc_set_name_const(object->s, "ARRAY: object->s");
2734
for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
2735
PY_CHECK_TYPE(&dfs_Info4_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
2736
if (talloc_reference(object->s, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
2740
object->s[s_cntr_1] = *(struct dfs_Info4 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
2747
static PyGetSetDef py_dfs_EnumArray4_getsetters[] = {
2748
{ discard_const_p(char, "count"), py_dfs_EnumArray4_get_count, py_dfs_EnumArray4_set_count },
2749
{ discard_const_p(char, "s"), py_dfs_EnumArray4_get_s, py_dfs_EnumArray4_set_s },
2753
static PyObject *py_dfs_EnumArray4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2755
return py_talloc_new(struct dfs_EnumArray4, type);
2759
static PyTypeObject dfs_EnumArray4_Type = {
2760
PyObject_HEAD_INIT(NULL) 0,
2761
.tp_name = "dfs.EnumArray4",
2762
.tp_getset = py_dfs_EnumArray4_getsetters,
2764
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2765
.tp_basicsize = sizeof(py_talloc_Object),
2766
.tp_new = py_dfs_EnumArray4_new,
2770
static PyObject *py_dfs_EnumArray5_get_count(PyObject *obj, void *closure)
2772
struct dfs_EnumArray5 *object = (struct dfs_EnumArray5 *)py_talloc_get_ptr(obj);
2774
py_count = PyInt_FromLong(object->count);
2778
static int py_dfs_EnumArray5_set_count(PyObject *py_obj, PyObject *value, void *closure)
2780
struct dfs_EnumArray5 *object = (struct dfs_EnumArray5 *)py_talloc_get_ptr(py_obj);
2781
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2782
object->count = PyInt_AsLong(value);
2786
static PyObject *py_dfs_EnumArray5_get_s(PyObject *obj, void *closure)
2788
struct dfs_EnumArray5 *object = (struct dfs_EnumArray5 *)py_talloc_get_ptr(obj);
2790
if (object->s == NULL) {
2794
py_s = PyList_New(object->count);
2800
for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
2802
py_s_1 = py_talloc_reference_ex(&dfs_Info5_Type, object->s, &object->s[s_cntr_1]);
2803
PyList_SetItem(py_s, s_cntr_1, py_s_1);
2810
static int py_dfs_EnumArray5_set_s(PyObject *py_obj, PyObject *value, void *closure)
2812
struct dfs_EnumArray5 *object = (struct dfs_EnumArray5 *)py_talloc_get_ptr(py_obj);
2813
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->s);
2814
if (value == Py_None) {
2818
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2821
object->s = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
2822
if (!object->s) { return -1;; }
2823
talloc_set_name_const(object->s, "ARRAY: object->s");
2824
for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
2825
PY_CHECK_TYPE(&dfs_Info5_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
2826
if (talloc_reference(object->s, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
2830
object->s[s_cntr_1] = *(struct dfs_Info5 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
2837
static PyGetSetDef py_dfs_EnumArray5_getsetters[] = {
2838
{ discard_const_p(char, "count"), py_dfs_EnumArray5_get_count, py_dfs_EnumArray5_set_count },
2839
{ discard_const_p(char, "s"), py_dfs_EnumArray5_get_s, py_dfs_EnumArray5_set_s },
2843
static PyObject *py_dfs_EnumArray5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2845
return py_talloc_new(struct dfs_EnumArray5, type);
2849
static PyTypeObject dfs_EnumArray5_Type = {
2850
PyObject_HEAD_INIT(NULL) 0,
2851
.tp_name = "dfs.EnumArray5",
2852
.tp_getset = py_dfs_EnumArray5_getsetters,
2854
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2855
.tp_basicsize = sizeof(py_talloc_Object),
2856
.tp_new = py_dfs_EnumArray5_new,
2860
static PyObject *py_dfs_EnumArray6_get_count(PyObject *obj, void *closure)
2862
struct dfs_EnumArray6 *object = (struct dfs_EnumArray6 *)py_talloc_get_ptr(obj);
2864
py_count = PyInt_FromLong(object->count);
2868
static int py_dfs_EnumArray6_set_count(PyObject *py_obj, PyObject *value, void *closure)
2870
struct dfs_EnumArray6 *object = (struct dfs_EnumArray6 *)py_talloc_get_ptr(py_obj);
2871
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2872
object->count = PyInt_AsLong(value);
2876
static PyObject *py_dfs_EnumArray6_get_s(PyObject *obj, void *closure)
2878
struct dfs_EnumArray6 *object = (struct dfs_EnumArray6 *)py_talloc_get_ptr(obj);
2880
if (object->s == NULL) {
2884
py_s = PyList_New(object->count);
2890
for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
2892
py_s_1 = py_talloc_reference_ex(&dfs_Info6_Type, object->s, &object->s[s_cntr_1]);
2893
PyList_SetItem(py_s, s_cntr_1, py_s_1);
2900
static int py_dfs_EnumArray6_set_s(PyObject *py_obj, PyObject *value, void *closure)
2902
struct dfs_EnumArray6 *object = (struct dfs_EnumArray6 *)py_talloc_get_ptr(py_obj);
2903
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->s);
2904
if (value == Py_None) {
2908
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2911
object->s = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
2912
if (!object->s) { return -1;; }
2913
talloc_set_name_const(object->s, "ARRAY: object->s");
2914
for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
2915
PY_CHECK_TYPE(&dfs_Info6_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
2916
if (talloc_reference(object->s, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
2920
object->s[s_cntr_1] = *(struct dfs_Info6 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
2927
static PyGetSetDef py_dfs_EnumArray6_getsetters[] = {
2928
{ discard_const_p(char, "count"), py_dfs_EnumArray6_get_count, py_dfs_EnumArray6_set_count },
2929
{ discard_const_p(char, "s"), py_dfs_EnumArray6_get_s, py_dfs_EnumArray6_set_s },
2933
static PyObject *py_dfs_EnumArray6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2935
return py_talloc_new(struct dfs_EnumArray6, type);
2939
static PyTypeObject dfs_EnumArray6_Type = {
2940
PyObject_HEAD_INIT(NULL) 0,
2941
.tp_name = "dfs.EnumArray6",
2942
.tp_getset = py_dfs_EnumArray6_getsetters,
2944
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2945
.tp_basicsize = sizeof(py_talloc_Object),
2946
.tp_new = py_dfs_EnumArray6_new,
2950
static PyObject *py_dfs_EnumArray200_get_count(PyObject *obj, void *closure)
2952
struct dfs_EnumArray200 *object = (struct dfs_EnumArray200 *)py_talloc_get_ptr(obj);
2954
py_count = PyInt_FromLong(object->count);
2958
static int py_dfs_EnumArray200_set_count(PyObject *py_obj, PyObject *value, void *closure)
2960
struct dfs_EnumArray200 *object = (struct dfs_EnumArray200 *)py_talloc_get_ptr(py_obj);
2961
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2962
object->count = PyInt_AsLong(value);
2966
static PyObject *py_dfs_EnumArray200_get_s(PyObject *obj, void *closure)
2968
struct dfs_EnumArray200 *object = (struct dfs_EnumArray200 *)py_talloc_get_ptr(obj);
2970
if (object->s == NULL) {
2974
py_s = PyList_New(object->count);
2980
for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
2982
py_s_1 = py_talloc_reference_ex(&dfs_Info200_Type, object->s, &object->s[s_cntr_1]);
2983
PyList_SetItem(py_s, s_cntr_1, py_s_1);
2990
static int py_dfs_EnumArray200_set_s(PyObject *py_obj, PyObject *value, void *closure)
2992
struct dfs_EnumArray200 *object = (struct dfs_EnumArray200 *)py_talloc_get_ptr(py_obj);
2993
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->s);
2994
if (value == Py_None) {
2998
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
3001
object->s = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
3002
if (!object->s) { return -1;; }
3003
talloc_set_name_const(object->s, "ARRAY: object->s");
3004
for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
3005
PY_CHECK_TYPE(&dfs_Info200_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
3006
if (talloc_reference(object->s, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
3010
object->s[s_cntr_1] = *(struct dfs_Info200 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
3017
static PyGetSetDef py_dfs_EnumArray200_getsetters[] = {
3018
{ discard_const_p(char, "count"), py_dfs_EnumArray200_get_count, py_dfs_EnumArray200_set_count },
3019
{ discard_const_p(char, "s"), py_dfs_EnumArray200_get_s, py_dfs_EnumArray200_set_s },
3023
static PyObject *py_dfs_EnumArray200_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3025
return py_talloc_new(struct dfs_EnumArray200, type);
3029
static PyTypeObject dfs_EnumArray200_Type = {
3030
PyObject_HEAD_INIT(NULL) 0,
3031
.tp_name = "dfs.EnumArray200",
3032
.tp_getset = py_dfs_EnumArray200_getsetters,
3034
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3035
.tp_basicsize = sizeof(py_talloc_Object),
3036
.tp_new = py_dfs_EnumArray200_new,
3040
static PyObject *py_dfs_EnumArray300_get_count(PyObject *obj, void *closure)
3042
struct dfs_EnumArray300 *object = (struct dfs_EnumArray300 *)py_talloc_get_ptr(obj);
3044
py_count = PyInt_FromLong(object->count);
3048
static int py_dfs_EnumArray300_set_count(PyObject *py_obj, PyObject *value, void *closure)
3050
struct dfs_EnumArray300 *object = (struct dfs_EnumArray300 *)py_talloc_get_ptr(py_obj);
3051
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3052
object->count = PyInt_AsLong(value);
3056
static PyObject *py_dfs_EnumArray300_get_s(PyObject *obj, void *closure)
3058
struct dfs_EnumArray300 *object = (struct dfs_EnumArray300 *)py_talloc_get_ptr(obj);
3060
if (object->s == NULL) {
3064
py_s = PyList_New(object->count);
3070
for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
3072
py_s_1 = py_talloc_reference_ex(&dfs_Info300_Type, object->s, &object->s[s_cntr_1]);
3073
PyList_SetItem(py_s, s_cntr_1, py_s_1);
3080
static int py_dfs_EnumArray300_set_s(PyObject *py_obj, PyObject *value, void *closure)
3082
struct dfs_EnumArray300 *object = (struct dfs_EnumArray300 *)py_talloc_get_ptr(py_obj);
3083
talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->s);
3084
if (value == Py_None) {
3088
PY_CHECK_TYPE(&PyList_Type, value, return -1;);
3091
object->s = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->s, PyList_GET_SIZE(value));
3092
if (!object->s) { return -1;; }
3093
talloc_set_name_const(object->s, "ARRAY: object->s");
3094
for (s_cntr_1 = 0; s_cntr_1 < PyList_GET_SIZE(value); s_cntr_1++) {
3095
PY_CHECK_TYPE(&dfs_Info300_Type, PyList_GET_ITEM(value, s_cntr_1), return -1;);
3096
if (talloc_reference(object->s, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, s_cntr_1))) == NULL) {
3100
object->s[s_cntr_1] = *(struct dfs_Info300 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
3107
static PyGetSetDef py_dfs_EnumArray300_getsetters[] = {
3108
{ discard_const_p(char, "count"), py_dfs_EnumArray300_get_count, py_dfs_EnumArray300_set_count },
3109
{ discard_const_p(char, "s"), py_dfs_EnumArray300_get_s, py_dfs_EnumArray300_set_s },
3113
static PyObject *py_dfs_EnumArray300_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3115
return py_talloc_new(struct dfs_EnumArray300, type);
3119
static PyTypeObject dfs_EnumArray300_Type = {
3120
PyObject_HEAD_INIT(NULL) 0,
3121
.tp_name = "dfs.EnumArray300",
3122
.tp_getset = py_dfs_EnumArray300_getsetters,
3124
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3125
.tp_basicsize = sizeof(py_talloc_Object),
3126
.tp_new = py_dfs_EnumArray300_new,
3129
PyObject *py_import_dfs_EnumInfo(TALLOC_CTX *mem_ctx, int level, union dfs_EnumInfo *in)
3135
if (in->info1 == NULL) {
3139
ret = py_talloc_reference_ex(&dfs_EnumArray1_Type, in->info1, in->info1);
3144
if (in->info2 == NULL) {
3148
ret = py_talloc_reference_ex(&dfs_EnumArray2_Type, in->info2, in->info2);
3153
if (in->info3 == NULL) {
3157
ret = py_talloc_reference_ex(&dfs_EnumArray3_Type, in->info3, in->info3);
3162
if (in->info4 == NULL) {
3166
ret = py_talloc_reference_ex(&dfs_EnumArray4_Type, in->info4, in->info4);
3171
if (in->info5 == NULL) {
3175
ret = py_talloc_reference_ex(&dfs_EnumArray5_Type, in->info5, in->info5);
3180
if (in->info6 == NULL) {
3184
ret = py_talloc_reference_ex(&dfs_EnumArray6_Type, in->info6, in->info6);
3189
if (in->info200 == NULL) {
3193
ret = py_talloc_reference_ex(&dfs_EnumArray200_Type, in->info200, in->info200);
3198
if (in->info300 == NULL) {
3202
ret = py_talloc_reference_ex(&dfs_EnumArray300_Type, in->info300, in->info300);
3207
PyErr_SetString(PyExc_TypeError, "unknown union level");
3211
union dfs_EnumInfo *py_export_dfs_EnumInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
3213
union dfs_EnumInfo *ret = talloc_zero(mem_ctx, union dfs_EnumInfo);
3216
if (in == Py_None) {
3220
PY_CHECK_TYPE(&dfs_EnumArray1_Type, in, talloc_free(ret); return NULL;);
3221
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
3223
talloc_free(ret); return NULL;
3225
ret->info1 = (struct dfs_EnumArray1 *)py_talloc_get_ptr(in);
3230
if (in == Py_None) {
3234
PY_CHECK_TYPE(&dfs_EnumArray2_Type, in, talloc_free(ret); return NULL;);
3235
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
3237
talloc_free(ret); return NULL;
3239
ret->info2 = (struct dfs_EnumArray2 *)py_talloc_get_ptr(in);
3244
if (in == Py_None) {
3248
PY_CHECK_TYPE(&dfs_EnumArray3_Type, in, talloc_free(ret); return NULL;);
3249
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
3251
talloc_free(ret); return NULL;
3253
ret->info3 = (struct dfs_EnumArray3 *)py_talloc_get_ptr(in);
3258
if (in == Py_None) {
3262
PY_CHECK_TYPE(&dfs_EnumArray4_Type, in, talloc_free(ret); return NULL;);
3263
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
3265
talloc_free(ret); return NULL;
3267
ret->info4 = (struct dfs_EnumArray4 *)py_talloc_get_ptr(in);
3272
if (in == Py_None) {
3276
PY_CHECK_TYPE(&dfs_EnumArray5_Type, in, talloc_free(ret); return NULL;);
3277
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
3279
talloc_free(ret); return NULL;
3281
ret->info5 = (struct dfs_EnumArray5 *)py_talloc_get_ptr(in);
3286
if (in == Py_None) {
3290
PY_CHECK_TYPE(&dfs_EnumArray6_Type, in, talloc_free(ret); return NULL;);
3291
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
3293
talloc_free(ret); return NULL;
3295
ret->info6 = (struct dfs_EnumArray6 *)py_talloc_get_ptr(in);
3300
if (in == Py_None) {
3301
ret->info200 = NULL;
3303
ret->info200 = NULL;
3304
PY_CHECK_TYPE(&dfs_EnumArray200_Type, in, talloc_free(ret); return NULL;);
3305
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
3307
talloc_free(ret); return NULL;
3309
ret->info200 = (struct dfs_EnumArray200 *)py_talloc_get_ptr(in);
3314
if (in == Py_None) {
3315
ret->info300 = NULL;
3317
ret->info300 = NULL;
3318
PY_CHECK_TYPE(&dfs_EnumArray300_Type, in, talloc_free(ret); return NULL;);
3319
if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
3321
talloc_free(ret); return NULL;
3323
ret->info300 = (struct dfs_EnumArray300 *)py_talloc_get_ptr(in);
3328
PyErr_SetString(PyExc_TypeError, "invalid union level value");
3337
static PyObject *py_dfs_EnumStruct_get_level(PyObject *obj, void *closure)
3339
struct dfs_EnumStruct *object = (struct dfs_EnumStruct *)py_talloc_get_ptr(obj);
3341
py_level = PyInt_FromLong(object->level);
3345
static int py_dfs_EnumStruct_set_level(PyObject *py_obj, PyObject *value, void *closure)
3347
struct dfs_EnumStruct *object = (struct dfs_EnumStruct *)py_talloc_get_ptr(py_obj);
3348
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3349
object->level = PyInt_AsLong(value);
3353
static PyObject *py_dfs_EnumStruct_get_e(PyObject *obj, void *closure)
3355
struct dfs_EnumStruct *object = (struct dfs_EnumStruct *)py_talloc_get_ptr(obj);
3357
py_e = py_import_dfs_EnumInfo(py_talloc_get_mem_ctx(obj), object->level, &object->e);
3364
static int py_dfs_EnumStruct_set_e(PyObject *py_obj, PyObject *value, void *closure)
3366
struct dfs_EnumStruct *object = (struct dfs_EnumStruct *)py_talloc_get_ptr(py_obj);
3368
union dfs_EnumInfo *e_switch_0;
3369
e_switch_0 = py_export_dfs_EnumInfo(py_talloc_get_mem_ctx(py_obj), object->level, value);
3370
if (e_switch_0 == NULL) {
3373
object->e = *e_switch_0;
3378
static PyGetSetDef py_dfs_EnumStruct_getsetters[] = {
3379
{ discard_const_p(char, "level"), py_dfs_EnumStruct_get_level, py_dfs_EnumStruct_set_level },
3380
{ discard_const_p(char, "e"), py_dfs_EnumStruct_get_e, py_dfs_EnumStruct_set_e },
3384
static PyObject *py_dfs_EnumStruct_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3386
return py_talloc_new(struct dfs_EnumStruct, type);
3390
static PyTypeObject dfs_EnumStruct_Type = {
3391
PyObject_HEAD_INIT(NULL) 0,
3392
.tp_name = "dfs.EnumStruct",
3393
.tp_getset = py_dfs_EnumStruct_getsetters,
3395
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3396
.tp_basicsize = sizeof(py_talloc_Object),
3397
.tp_new = py_dfs_EnumStruct_new,
3401
static PyObject *py_dfs_UnknownStruct_get_unknown1(PyObject *obj, void *closure)
3403
struct dfs_UnknownStruct *object = (struct dfs_UnknownStruct *)py_talloc_get_ptr(obj);
3404
PyObject *py_unknown1;
3405
py_unknown1 = PyInt_FromLong(object->unknown1);
3409
static int py_dfs_UnknownStruct_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
3411
struct dfs_UnknownStruct *object = (struct dfs_UnknownStruct *)py_talloc_get_ptr(py_obj);
3412
PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3413
object->unknown1 = PyInt_AsLong(value);
3417
static PyObject *py_dfs_UnknownStruct_get_unknown2(PyObject *obj, void *closure)
3419
struct dfs_UnknownStruct *object = (struct dfs_UnknownStruct *)py_talloc_get_ptr(obj);
3420
PyObject *py_unknown2;
3421
if (object->unknown2 == NULL) {
3422
py_unknown2 = Py_None;
3423
Py_INCREF(py_unknown2);
3425
if (object->unknown2 == NULL) {
3426
py_unknown2 = Py_None;
3427
Py_INCREF(py_unknown2);
3429
py_unknown2 = PyUnicode_Decode(object->unknown2, strlen(object->unknown2), "utf-8", "ignore");
3435
static int py_dfs_UnknownStruct_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
3437
struct dfs_UnknownStruct *object = (struct dfs_UnknownStruct *)py_talloc_get_ptr(py_obj);
3438
if (value == Py_None) {
3439
object->unknown2 = NULL;
3441
object->unknown2 = NULL;
3442
if (PyUnicode_Check(value)) {
3443
object->unknown2 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
3444
} else if (PyString_Check(value)) {
3445
object->unknown2 = PyString_AS_STRING(value);
3447
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3454
static PyGetSetDef py_dfs_UnknownStruct_getsetters[] = {
3455
{ discard_const_p(char, "unknown1"), py_dfs_UnknownStruct_get_unknown1, py_dfs_UnknownStruct_set_unknown1 },
3456
{ discard_const_p(char, "unknown2"), py_dfs_UnknownStruct_get_unknown2, py_dfs_UnknownStruct_set_unknown2 },
3460
static PyObject *py_dfs_UnknownStruct_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3462
return py_talloc_new(struct dfs_UnknownStruct, type);
3466
static PyTypeObject dfs_UnknownStruct_Type = {
3467
PyObject_HEAD_INIT(NULL) 0,
3468
.tp_name = "dfs.UnknownStruct",
3469
.tp_getset = py_dfs_UnknownStruct_getsetters,
3471
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3472
.tp_basicsize = sizeof(py_talloc_Object),
3473
.tp_new = py_dfs_UnknownStruct_new,
3477
static bool pack_py_dfs_GetManagerVersion_args_in(PyObject *args, PyObject *kwargs, struct dfs_GetManagerVersion *r)
3479
const char *kwnames[] = {
3483
if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":dfs_GetManagerVersion", discard_const_p(char *, kwnames))) {
3490
static PyObject *unpack_py_dfs_GetManagerVersion_args_out(struct dfs_GetManagerVersion *r)
3493
PyObject *py_version;
3494
py_version = PyInt_FromLong(*r->out.version);
3495
result = py_version;
3499
static bool pack_py_dfs_Add_args_in(PyObject *args, PyObject *kwargs, struct dfs_Add *r)
3502
PyObject *py_server;
3504
PyObject *py_comment;
3506
const char *kwnames[] = {
3507
"path", "server", "share", "comment", "flags", NULL
3510
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:dfs_Add", discard_const_p(char *, kwnames), &py_path, &py_server, &py_share, &py_comment, &py_flags)) {
3514
r->in.path = talloc_ptrtype(r, r->in.path);
3515
if (PyUnicode_Check(py_path)) {
3516
r->in.path = PyString_AS_STRING(PyUnicode_AsEncodedString(py_path, "utf-8", "ignore"));
3517
} else if (PyString_Check(py_path)) {
3518
r->in.path = PyString_AS_STRING(py_path);
3520
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
3523
r->in.server = talloc_ptrtype(r, r->in.server);
3524
if (PyUnicode_Check(py_server)) {
3525
r->in.server = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server, "utf-8", "ignore"));
3526
} else if (PyString_Check(py_server)) {
3527
r->in.server = PyString_AS_STRING(py_server);
3529
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
3532
if (py_share == Py_None) {
3536
if (PyUnicode_Check(py_share)) {
3537
r->in.share = PyString_AS_STRING(PyUnicode_AsEncodedString(py_share, "utf-8", "ignore"));
3538
} else if (PyString_Check(py_share)) {
3539
r->in.share = PyString_AS_STRING(py_share);
3541
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
3545
if (py_comment == Py_None) {
3546
r->in.comment = NULL;
3548
r->in.comment = NULL;
3549
if (PyUnicode_Check(py_comment)) {
3550
r->in.comment = PyString_AS_STRING(PyUnicode_AsEncodedString(py_comment, "utf-8", "ignore"));
3551
} else if (PyString_Check(py_comment)) {
3552
r->in.comment = PyString_AS_STRING(py_comment);
3554
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
3558
PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
3559
r->in.flags = PyInt_AsLong(py_flags);
3563
static PyObject *unpack_py_dfs_Add_args_out(struct dfs_Add *r)
3568
if (!W_ERROR_IS_OK(r->out.result)) {
3569
PyErr_SetWERROR(r->out.result);
3576
static bool pack_py_dfs_Remove_args_in(PyObject *args, PyObject *kwargs, struct dfs_Remove *r)
3578
PyObject *py_dfs_entry_path;
3579
PyObject *py_servername;
3580
PyObject *py_sharename;
3581
const char *kwnames[] = {
3582
"dfs_entry_path", "servername", "sharename", NULL
3585
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:dfs_Remove", discard_const_p(char *, kwnames), &py_dfs_entry_path, &py_servername, &py_sharename)) {
3589
r->in.dfs_entry_path = talloc_ptrtype(r, r->in.dfs_entry_path);
3590
if (PyUnicode_Check(py_dfs_entry_path)) {
3591
r->in.dfs_entry_path = PyString_AS_STRING(PyUnicode_AsEncodedString(py_dfs_entry_path, "utf-8", "ignore"));
3592
} else if (PyString_Check(py_dfs_entry_path)) {
3593
r->in.dfs_entry_path = PyString_AS_STRING(py_dfs_entry_path);
3595
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_entry_path)->tp_name);
3598
if (py_servername == Py_None) {
3599
r->in.servername = NULL;
3601
r->in.servername = NULL;
3602
if (PyUnicode_Check(py_servername)) {
3603
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
3604
} else if (PyString_Check(py_servername)) {
3605
r->in.servername = PyString_AS_STRING(py_servername);
3607
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
3611
if (py_sharename == Py_None) {
3612
r->in.sharename = NULL;
3614
r->in.sharename = NULL;
3615
if (PyUnicode_Check(py_sharename)) {
3616
r->in.sharename = PyString_AS_STRING(PyUnicode_AsEncodedString(py_sharename, "utf-8", "ignore"));
3617
} else if (PyString_Check(py_sharename)) {
3618
r->in.sharename = PyString_AS_STRING(py_sharename);
3620
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_sharename)->tp_name);
3627
static PyObject *unpack_py_dfs_Remove_args_out(struct dfs_Remove *r)
3632
if (!W_ERROR_IS_OK(r->out.result)) {
3633
PyErr_SetWERROR(r->out.result);
3640
static bool pack_py_dfs_SetInfo_args_in(PyObject *args, PyObject *kwargs, struct dfs_SetInfo *r)
3642
PyObject *py_dfs_entry_path;
3643
PyObject *py_servername;
3644
PyObject *py_sharename;
3647
const char *kwnames[] = {
3648
"dfs_entry_path", "servername", "sharename", "level", "info", NULL
3651
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:dfs_SetInfo", discard_const_p(char *, kwnames), &py_dfs_entry_path, &py_servername, &py_sharename, &py_level, &py_info)) {
3655
if (PyUnicode_Check(py_dfs_entry_path)) {
3656
r->in.dfs_entry_path = PyString_AS_STRING(PyUnicode_AsEncodedString(py_dfs_entry_path, "utf-8", "ignore"));
3657
} else if (PyString_Check(py_dfs_entry_path)) {
3658
r->in.dfs_entry_path = PyString_AS_STRING(py_dfs_entry_path);
3660
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_entry_path)->tp_name);
3663
if (py_servername == Py_None) {
3664
r->in.servername = NULL;
3666
r->in.servername = NULL;
3667
if (PyUnicode_Check(py_servername)) {
3668
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
3669
} else if (PyString_Check(py_servername)) {
3670
r->in.servername = PyString_AS_STRING(py_servername);
3672
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
3676
if (py_sharename == Py_None) {
3677
r->in.sharename = NULL;
3679
r->in.sharename = NULL;
3680
if (PyUnicode_Check(py_sharename)) {
3681
r->in.sharename = PyString_AS_STRING(PyUnicode_AsEncodedString(py_sharename, "utf-8", "ignore"));
3682
} else if (PyString_Check(py_sharename)) {
3683
r->in.sharename = PyString_AS_STRING(py_sharename);
3685
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_sharename)->tp_name);
3689
PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
3690
r->in.level = PyInt_AsLong(py_level);
3691
r->in.info = talloc_ptrtype(r, r->in.info);
3693
union dfs_Info *info_switch_1;
3694
info_switch_1 = py_export_dfs_Info(r, r->in.level, py_info);
3695
if (info_switch_1 == NULL) {
3698
r->in.info = info_switch_1;
3703
static PyObject *unpack_py_dfs_SetInfo_args_out(struct dfs_SetInfo *r)
3708
if (!W_ERROR_IS_OK(r->out.result)) {
3709
PyErr_SetWERROR(r->out.result);
3716
static bool pack_py_dfs_GetInfo_args_in(PyObject *args, PyObject *kwargs, struct dfs_GetInfo *r)
3718
PyObject *py_dfs_entry_path;
3719
PyObject *py_servername;
3720
PyObject *py_sharename;
3722
const char *kwnames[] = {
3723
"dfs_entry_path", "servername", "sharename", "level", NULL
3726
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_GetInfo", discard_const_p(char *, kwnames), &py_dfs_entry_path, &py_servername, &py_sharename, &py_level)) {
3730
if (PyUnicode_Check(py_dfs_entry_path)) {
3731
r->in.dfs_entry_path = PyString_AS_STRING(PyUnicode_AsEncodedString(py_dfs_entry_path, "utf-8", "ignore"));
3732
} else if (PyString_Check(py_dfs_entry_path)) {
3733
r->in.dfs_entry_path = PyString_AS_STRING(py_dfs_entry_path);
3735
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_entry_path)->tp_name);
3738
if (py_servername == Py_None) {
3739
r->in.servername = NULL;
3741
r->in.servername = NULL;
3742
if (PyUnicode_Check(py_servername)) {
3743
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
3744
} else if (PyString_Check(py_servername)) {
3745
r->in.servername = PyString_AS_STRING(py_servername);
3747
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
3751
if (py_sharename == Py_None) {
3752
r->in.sharename = NULL;
3754
r->in.sharename = NULL;
3755
if (PyUnicode_Check(py_sharename)) {
3756
r->in.sharename = PyString_AS_STRING(PyUnicode_AsEncodedString(py_sharename, "utf-8", "ignore"));
3757
} else if (PyString_Check(py_sharename)) {
3758
r->in.sharename = PyString_AS_STRING(py_sharename);
3760
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_sharename)->tp_name);
3764
PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
3765
r->in.level = PyInt_AsLong(py_level);
3769
static PyObject *unpack_py_dfs_GetInfo_args_out(struct dfs_GetInfo *r)
3773
py_info = py_import_dfs_Info(r->out.info, r->in.level, r->out.info);
3774
if (py_info == NULL) {
3778
if (!W_ERROR_IS_OK(r->out.result)) {
3779
PyErr_SetWERROR(r->out.result);
3786
static bool pack_py_dfs_Enum_args_in(PyObject *args, PyObject *kwargs, struct dfs_Enum *r)
3789
PyObject *py_bufsize;
3792
const char *kwnames[] = {
3793
"level", "bufsize", "info", "total", NULL
3796
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_Enum", discard_const_p(char *, kwnames), &py_level, &py_bufsize, &py_info, &py_total)) {
3800
PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
3801
r->in.level = PyInt_AsLong(py_level);
3802
PY_CHECK_TYPE(&PyInt_Type, py_bufsize, return false;);
3803
r->in.bufsize = PyInt_AsLong(py_bufsize);
3804
if (py_info == Py_None) {
3808
PY_CHECK_TYPE(&dfs_EnumStruct_Type, py_info, return false;);
3809
if (talloc_reference(r, py_talloc_get_mem_ctx(py_info)) == NULL) {
3813
r->in.info = (struct dfs_EnumStruct *)py_talloc_get_ptr(py_info);
3815
if (py_total == Py_None) {
3818
r->in.total = talloc_ptrtype(r, r->in.total);
3819
PY_CHECK_TYPE(&PyInt_Type, py_total, return false;);
3820
*r->in.total = PyInt_AsLong(py_total);
3825
static PyObject *unpack_py_dfs_Enum_args_out(struct dfs_Enum *r)
3830
result = PyTuple_New(2);
3831
if (r->out.info == NULL) {
3835
py_info = py_talloc_reference_ex(&dfs_EnumStruct_Type, r->out.info, r->out.info);
3837
PyTuple_SetItem(result, 0, py_info);
3838
if (r->out.total == NULL) {
3840
Py_INCREF(py_total);
3842
py_total = PyInt_FromLong(*r->out.total);
3844
PyTuple_SetItem(result, 1, py_total);
3845
if (!W_ERROR_IS_OK(r->out.result)) {
3846
PyErr_SetWERROR(r->out.result);
3853
static bool pack_py_dfs_AddFtRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_AddFtRoot *r)
3855
PyObject *py_servername;
3856
PyObject *py_dns_servername;
3857
PyObject *py_dfsname;
3858
PyObject *py_rootshare;
3859
PyObject *py_comment;
3860
PyObject *py_dfs_config_dn;
3861
PyObject *py_unknown1;
3863
PyObject *py_unknown2;
3864
const char *kwnames[] = {
3865
"servername", "dns_servername", "dfsname", "rootshare", "comment", "dfs_config_dn", "unknown1", "flags", "unknown2", NULL
3868
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO:dfs_AddFtRoot", discard_const_p(char *, kwnames), &py_servername, &py_dns_servername, &py_dfsname, &py_rootshare, &py_comment, &py_dfs_config_dn, &py_unknown1, &py_flags, &py_unknown2)) {
3872
if (PyUnicode_Check(py_servername)) {
3873
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
3874
} else if (PyString_Check(py_servername)) {
3875
r->in.servername = PyString_AS_STRING(py_servername);
3877
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
3880
if (PyUnicode_Check(py_dns_servername)) {
3881
r->in.dns_servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_dns_servername, "utf-8", "ignore"));
3882
} else if (PyString_Check(py_dns_servername)) {
3883
r->in.dns_servername = PyString_AS_STRING(py_dns_servername);
3885
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dns_servername)->tp_name);
3888
if (PyUnicode_Check(py_dfsname)) {
3889
r->in.dfsname = PyString_AS_STRING(PyUnicode_AsEncodedString(py_dfsname, "utf-8", "ignore"));
3890
} else if (PyString_Check(py_dfsname)) {
3891
r->in.dfsname = PyString_AS_STRING(py_dfsname);
3893
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfsname)->tp_name);
3896
if (PyUnicode_Check(py_rootshare)) {
3897
r->in.rootshare = PyString_AS_STRING(PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore"));
3898
} else if (PyString_Check(py_rootshare)) {
3899
r->in.rootshare = PyString_AS_STRING(py_rootshare);
3901
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
3904
if (PyUnicode_Check(py_comment)) {
3905
r->in.comment = PyString_AS_STRING(PyUnicode_AsEncodedString(py_comment, "utf-8", "ignore"));
3906
} else if (PyString_Check(py_comment)) {
3907
r->in.comment = PyString_AS_STRING(py_comment);
3909
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
3912
if (PyUnicode_Check(py_dfs_config_dn)) {
3913
r->in.dfs_config_dn = PyString_AS_STRING(PyUnicode_AsEncodedString(py_dfs_config_dn, "utf-8", "ignore"));
3914
} else if (PyString_Check(py_dfs_config_dn)) {
3915
r->in.dfs_config_dn = PyString_AS_STRING(py_dfs_config_dn);
3917
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_config_dn)->tp_name);
3920
PY_CHECK_TYPE(&PyInt_Type, py_unknown1, return false;);
3921
r->in.unknown1 = PyInt_AsLong(py_unknown1);
3922
PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
3923
r->in.flags = PyInt_AsLong(py_flags);
3924
if (py_unknown2 == Py_None) {
3925
r->in.unknown2 = NULL;
3927
r->in.unknown2 = NULL;
3928
if (py_unknown2 == Py_None) {
3929
*r->in.unknown2 = NULL;
3931
*r->in.unknown2 = NULL;
3932
PY_CHECK_TYPE(&dfs_UnknownStruct_Type, py_unknown2, return false;);
3933
if (talloc_reference(r, py_talloc_get_mem_ctx(py_unknown2)) == NULL) {
3937
*r->in.unknown2 = (struct dfs_UnknownStruct *)py_talloc_get_ptr(py_unknown2);
3943
static PyObject *unpack_py_dfs_AddFtRoot_args_out(struct dfs_AddFtRoot *r)
3946
PyObject *py_unknown2;
3947
if (r->out.unknown2 == NULL) {
3948
py_unknown2 = Py_None;
3949
Py_INCREF(py_unknown2);
3951
if (*r->out.unknown2 == NULL) {
3952
py_unknown2 = Py_None;
3953
Py_INCREF(py_unknown2);
3955
py_unknown2 = py_talloc_reference_ex(&dfs_UnknownStruct_Type, *r->out.unknown2, *r->out.unknown2);
3958
result = py_unknown2;
3959
if (!W_ERROR_IS_OK(r->out.result)) {
3960
PyErr_SetWERROR(r->out.result);
3967
static bool pack_py_dfs_RemoveFtRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_RemoveFtRoot *r)
3969
PyObject *py_servername;
3970
PyObject *py_dns_servername;
3971
PyObject *py_dfsname;
3972
PyObject *py_rootshare;
3974
PyObject *py_unknown;
3975
const char *kwnames[] = {
3976
"servername", "dns_servername", "dfsname", "rootshare", "flags", "unknown", NULL
3979
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:dfs_RemoveFtRoot", discard_const_p(char *, kwnames), &py_servername, &py_dns_servername, &py_dfsname, &py_rootshare, &py_flags, &py_unknown)) {
3983
if (PyUnicode_Check(py_servername)) {
3984
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
3985
} else if (PyString_Check(py_servername)) {
3986
r->in.servername = PyString_AS_STRING(py_servername);
3988
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
3991
if (PyUnicode_Check(py_dns_servername)) {
3992
r->in.dns_servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_dns_servername, "utf-8", "ignore"));
3993
} else if (PyString_Check(py_dns_servername)) {
3994
r->in.dns_servername = PyString_AS_STRING(py_dns_servername);
3996
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dns_servername)->tp_name);
3999
if (PyUnicode_Check(py_dfsname)) {
4000
r->in.dfsname = PyString_AS_STRING(PyUnicode_AsEncodedString(py_dfsname, "utf-8", "ignore"));
4001
} else if (PyString_Check(py_dfsname)) {
4002
r->in.dfsname = PyString_AS_STRING(py_dfsname);
4004
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfsname)->tp_name);
4007
if (PyUnicode_Check(py_rootshare)) {
4008
r->in.rootshare = PyString_AS_STRING(PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore"));
4009
} else if (PyString_Check(py_rootshare)) {
4010
r->in.rootshare = PyString_AS_STRING(py_rootshare);
4012
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
4015
PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
4016
r->in.flags = PyInt_AsLong(py_flags);
4017
if (py_unknown == Py_None) {
4018
r->in.unknown = NULL;
4020
r->in.unknown = NULL;
4021
if (py_unknown == Py_None) {
4022
*r->in.unknown = NULL;
4024
*r->in.unknown = NULL;
4025
PY_CHECK_TYPE(&dfs_UnknownStruct_Type, py_unknown, return false;);
4026
if (talloc_reference(r, py_talloc_get_mem_ctx(py_unknown)) == NULL) {
4030
*r->in.unknown = (struct dfs_UnknownStruct *)py_talloc_get_ptr(py_unknown);
4036
static PyObject *unpack_py_dfs_RemoveFtRoot_args_out(struct dfs_RemoveFtRoot *r)
4039
PyObject *py_unknown;
4040
if (r->out.unknown == NULL) {
4041
py_unknown = Py_None;
4042
Py_INCREF(py_unknown);
4044
if (*r->out.unknown == NULL) {
4045
py_unknown = Py_None;
4046
Py_INCREF(py_unknown);
4048
py_unknown = py_talloc_reference_ex(&dfs_UnknownStruct_Type, *r->out.unknown, *r->out.unknown);
4051
result = py_unknown;
4052
if (!W_ERROR_IS_OK(r->out.result)) {
4053
PyErr_SetWERROR(r->out.result);
4060
static bool pack_py_dfs_AddStdRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_AddStdRoot *r)
4062
PyObject *py_servername;
4063
PyObject *py_rootshare;
4064
PyObject *py_comment;
4066
const char *kwnames[] = {
4067
"servername", "rootshare", "comment", "flags", NULL
4070
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_AddStdRoot", discard_const_p(char *, kwnames), &py_servername, &py_rootshare, &py_comment, &py_flags)) {
4074
if (PyUnicode_Check(py_servername)) {
4075
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
4076
} else if (PyString_Check(py_servername)) {
4077
r->in.servername = PyString_AS_STRING(py_servername);
4079
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
4082
if (PyUnicode_Check(py_rootshare)) {
4083
r->in.rootshare = PyString_AS_STRING(PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore"));
4084
} else if (PyString_Check(py_rootshare)) {
4085
r->in.rootshare = PyString_AS_STRING(py_rootshare);
4087
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
4090
if (PyUnicode_Check(py_comment)) {
4091
r->in.comment = PyString_AS_STRING(PyUnicode_AsEncodedString(py_comment, "utf-8", "ignore"));
4092
} else if (PyString_Check(py_comment)) {
4093
r->in.comment = PyString_AS_STRING(py_comment);
4095
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
4098
PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
4099
r->in.flags = PyInt_AsLong(py_flags);
4103
static PyObject *unpack_py_dfs_AddStdRoot_args_out(struct dfs_AddStdRoot *r)
4108
if (!W_ERROR_IS_OK(r->out.result)) {
4109
PyErr_SetWERROR(r->out.result);
4116
static bool pack_py_dfs_RemoveStdRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_RemoveStdRoot *r)
4118
PyObject *py_servername;
4119
PyObject *py_rootshare;
4121
const char *kwnames[] = {
4122
"servername", "rootshare", "flags", NULL
4125
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:dfs_RemoveStdRoot", discard_const_p(char *, kwnames), &py_servername, &py_rootshare, &py_flags)) {
4129
if (PyUnicode_Check(py_servername)) {
4130
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
4131
} else if (PyString_Check(py_servername)) {
4132
r->in.servername = PyString_AS_STRING(py_servername);
4134
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
4137
if (PyUnicode_Check(py_rootshare)) {
4138
r->in.rootshare = PyString_AS_STRING(PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore"));
4139
} else if (PyString_Check(py_rootshare)) {
4140
r->in.rootshare = PyString_AS_STRING(py_rootshare);
4142
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
4145
PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
4146
r->in.flags = PyInt_AsLong(py_flags);
4150
static PyObject *unpack_py_dfs_RemoveStdRoot_args_out(struct dfs_RemoveStdRoot *r)
4155
if (!W_ERROR_IS_OK(r->out.result)) {
4156
PyErr_SetWERROR(r->out.result);
4163
static bool pack_py_dfs_ManagerInitialize_args_in(PyObject *args, PyObject *kwargs, struct dfs_ManagerInitialize *r)
4165
PyObject *py_servername;
4167
const char *kwnames[] = {
4168
"servername", "flags", NULL
4171
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:dfs_ManagerInitialize", discard_const_p(char *, kwnames), &py_servername, &py_flags)) {
4175
r->in.servername = talloc_ptrtype(r, r->in.servername);
4176
if (PyUnicode_Check(py_servername)) {
4177
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
4178
} else if (PyString_Check(py_servername)) {
4179
r->in.servername = PyString_AS_STRING(py_servername);
4181
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
4184
PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
4185
r->in.flags = PyInt_AsLong(py_flags);
4189
static PyObject *unpack_py_dfs_ManagerInitialize_args_out(struct dfs_ManagerInitialize *r)
4194
if (!W_ERROR_IS_OK(r->out.result)) {
4195
PyErr_SetWERROR(r->out.result);
4202
static bool pack_py_dfs_AddStdRootForced_args_in(PyObject *args, PyObject *kwargs, struct dfs_AddStdRootForced *r)
4204
PyObject *py_servername;
4205
PyObject *py_rootshare;
4206
PyObject *py_comment;
4208
const char *kwnames[] = {
4209
"servername", "rootshare", "comment", "store", NULL
4212
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_AddStdRootForced", discard_const_p(char *, kwnames), &py_servername, &py_rootshare, &py_comment, &py_store)) {
4216
if (PyUnicode_Check(py_servername)) {
4217
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
4218
} else if (PyString_Check(py_servername)) {
4219
r->in.servername = PyString_AS_STRING(py_servername);
4221
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
4224
if (PyUnicode_Check(py_rootshare)) {
4225
r->in.rootshare = PyString_AS_STRING(PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore"));
4226
} else if (PyString_Check(py_rootshare)) {
4227
r->in.rootshare = PyString_AS_STRING(py_rootshare);
4229
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
4232
if (PyUnicode_Check(py_comment)) {
4233
r->in.comment = PyString_AS_STRING(PyUnicode_AsEncodedString(py_comment, "utf-8", "ignore"));
4234
} else if (PyString_Check(py_comment)) {
4235
r->in.comment = PyString_AS_STRING(py_comment);
4237
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
4240
if (PyUnicode_Check(py_store)) {
4241
r->in.store = PyString_AS_STRING(PyUnicode_AsEncodedString(py_store, "utf-8", "ignore"));
4242
} else if (PyString_Check(py_store)) {
4243
r->in.store = PyString_AS_STRING(py_store);
4245
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_store)->tp_name);
4251
static PyObject *unpack_py_dfs_AddStdRootForced_args_out(struct dfs_AddStdRootForced *r)
4256
if (!W_ERROR_IS_OK(r->out.result)) {
4257
PyErr_SetWERROR(r->out.result);
4264
static bool pack_py_dfs_GetDcAddress_args_in(PyObject *args, PyObject *kwargs, struct dfs_GetDcAddress *r)
4266
PyObject *py_servername;
4267
PyObject *py_server_fullname;
4268
PyObject *py_is_root;
4270
const char *kwnames[] = {
4271
"servername", "server_fullname", "is_root", "ttl", NULL
4274
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_GetDcAddress", discard_const_p(char *, kwnames), &py_servername, &py_server_fullname, &py_is_root, &py_ttl)) {
4278
if (PyUnicode_Check(py_servername)) {
4279
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
4280
} else if (PyString_Check(py_servername)) {
4281
r->in.servername = PyString_AS_STRING(py_servername);
4283
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
4286
r->in.server_fullname = talloc_ptrtype(r, r->in.server_fullname);
4287
if (py_server_fullname == Py_None) {
4288
*r->in.server_fullname = NULL;
4290
*r->in.server_fullname = NULL;
4291
if (PyUnicode_Check(py_server_fullname)) {
4292
*r->in.server_fullname = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server_fullname, "utf-8", "ignore"));
4293
} else if (PyString_Check(py_server_fullname)) {
4294
*r->in.server_fullname = PyString_AS_STRING(py_server_fullname);
4296
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_fullname)->tp_name);
4300
r->in.is_root = talloc_ptrtype(r, r->in.is_root);
4301
PY_CHECK_TYPE(&PyInt_Type, py_is_root, return false;);
4302
*r->in.is_root = PyInt_AsLong(py_is_root);
4303
r->in.ttl = talloc_ptrtype(r, r->in.ttl);
4304
PY_CHECK_TYPE(&PyInt_Type, py_ttl, return false;);
4305
*r->in.ttl = PyInt_AsLong(py_ttl);
4309
static PyObject *unpack_py_dfs_GetDcAddress_args_out(struct dfs_GetDcAddress *r)
4312
PyObject *py_server_fullname;
4313
PyObject *py_is_root;
4315
result = PyTuple_New(3);
4316
if (*r->out.server_fullname == NULL) {
4317
py_server_fullname = Py_None;
4318
Py_INCREF(py_server_fullname);
4320
if (*r->out.server_fullname == NULL) {
4321
py_server_fullname = Py_None;
4322
Py_INCREF(py_server_fullname);
4324
py_server_fullname = PyUnicode_Decode(*r->out.server_fullname, strlen(*r->out.server_fullname), "utf-8", "ignore");
4327
PyTuple_SetItem(result, 0, py_server_fullname);
4328
py_is_root = PyInt_FromLong(*r->out.is_root);
4329
PyTuple_SetItem(result, 1, py_is_root);
4330
py_ttl = PyInt_FromLong(*r->out.ttl);
4331
PyTuple_SetItem(result, 2, py_ttl);
4332
if (!W_ERROR_IS_OK(r->out.result)) {
4333
PyErr_SetWERROR(r->out.result);
4340
static bool pack_py_dfs_SetDcAddress_args_in(PyObject *args, PyObject *kwargs, struct dfs_SetDcAddress *r)
4342
PyObject *py_servername;
4343
PyObject *py_server_fullname;
4346
const char *kwnames[] = {
4347
"servername", "server_fullname", "flags", "ttl", NULL
4350
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_SetDcAddress", discard_const_p(char *, kwnames), &py_servername, &py_server_fullname, &py_flags, &py_ttl)) {
4354
if (PyUnicode_Check(py_servername)) {
4355
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
4356
} else if (PyString_Check(py_servername)) {
4357
r->in.servername = PyString_AS_STRING(py_servername);
4359
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
4362
if (PyUnicode_Check(py_server_fullname)) {
4363
r->in.server_fullname = PyString_AS_STRING(PyUnicode_AsEncodedString(py_server_fullname, "utf-8", "ignore"));
4364
} else if (PyString_Check(py_server_fullname)) {
4365
r->in.server_fullname = PyString_AS_STRING(py_server_fullname);
4367
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_fullname)->tp_name);
4370
PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
4371
r->in.flags = PyInt_AsLong(py_flags);
4372
PY_CHECK_TYPE(&PyInt_Type, py_ttl, return false;);
4373
r->in.ttl = PyInt_AsLong(py_ttl);
4377
static PyObject *unpack_py_dfs_SetDcAddress_args_out(struct dfs_SetDcAddress *r)
4382
if (!W_ERROR_IS_OK(r->out.result)) {
4383
PyErr_SetWERROR(r->out.result);
4390
static bool pack_py_dfs_FlushFtTable_args_in(PyObject *args, PyObject *kwargs, struct dfs_FlushFtTable *r)
4392
PyObject *py_servername;
4393
PyObject *py_rootshare;
4394
const char *kwnames[] = {
4395
"servername", "rootshare", NULL
4398
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:dfs_FlushFtTable", discard_const_p(char *, kwnames), &py_servername, &py_rootshare)) {
4402
if (PyUnicode_Check(py_servername)) {
4403
r->in.servername = PyString_AS_STRING(PyUnicode_AsEncodedString(py_servername, "utf-8", "ignore"));
4404
} else if (PyString_Check(py_servername)) {
4405
r->in.servername = PyString_AS_STRING(py_servername);
4407
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
4410
if (PyUnicode_Check(py_rootshare)) {
4411
r->in.rootshare = PyString_AS_STRING(PyUnicode_AsEncodedString(py_rootshare, "utf-8", "ignore"));
4412
} else if (PyString_Check(py_rootshare)) {
4413
r->in.rootshare = PyString_AS_STRING(py_rootshare);
4415
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
4421
static PyObject *unpack_py_dfs_FlushFtTable_args_out(struct dfs_FlushFtTable *r)
4426
if (!W_ERROR_IS_OK(r->out.result)) {
4427
PyErr_SetWERROR(r->out.result);
4434
static bool pack_py_dfs_EnumEx_args_in(PyObject *args, PyObject *kwargs, struct dfs_EnumEx *r)
4436
PyObject *py_dfs_name;
4438
PyObject *py_bufsize;
4441
const char *kwnames[] = {
4442
"dfs_name", "level", "bufsize", "info", "total", NULL
4445
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:dfs_EnumEx", discard_const_p(char *, kwnames), &py_dfs_name, &py_level, &py_bufsize, &py_info, &py_total)) {
4449
if (PyUnicode_Check(py_dfs_name)) {
4450
r->in.dfs_name = PyString_AS_STRING(PyUnicode_AsEncodedString(py_dfs_name, "utf-8", "ignore"));
4451
} else if (PyString_Check(py_dfs_name)) {
4452
r->in.dfs_name = PyString_AS_STRING(py_dfs_name);
4454
PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_name)->tp_name);
4457
PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
4458
r->in.level = PyInt_AsLong(py_level);
4459
PY_CHECK_TYPE(&PyInt_Type, py_bufsize, return false;);
4460
r->in.bufsize = PyInt_AsLong(py_bufsize);
4461
if (py_info == Py_None) {
4465
PY_CHECK_TYPE(&dfs_EnumStruct_Type, py_info, return false;);
4466
if (talloc_reference(r, py_talloc_get_mem_ctx(py_info)) == NULL) {
4470
r->in.info = (struct dfs_EnumStruct *)py_talloc_get_ptr(py_info);
4472
if (py_total == Py_None) {
4475
r->in.total = talloc_ptrtype(r, r->in.total);
4476
PY_CHECK_TYPE(&PyInt_Type, py_total, return false;);
4477
*r->in.total = PyInt_AsLong(py_total);
4482
static PyObject *unpack_py_dfs_EnumEx_args_out(struct dfs_EnumEx *r)
4487
result = PyTuple_New(2);
4488
if (r->out.info == NULL) {
4492
py_info = py_talloc_reference_ex(&dfs_EnumStruct_Type, r->out.info, r->out.info);
4494
PyTuple_SetItem(result, 0, py_info);
4495
if (r->out.total == NULL) {
4497
Py_INCREF(py_total);
4499
py_total = PyInt_FromLong(*r->out.total);
4501
PyTuple_SetItem(result, 1, py_total);
4502
if (!W_ERROR_IS_OK(r->out.result)) {
4503
PyErr_SetWERROR(r->out.result);
4510
const struct PyNdrRpcMethodDef py_ndr_netdfs_methods[] = {
4511
{ "GetManagerVersion", "S.GetManagerVersion() -> version", (py_dcerpc_call_fn)dcerpc_dfs_GetManagerVersion_r, (py_data_pack_fn)pack_py_dfs_GetManagerVersion_args_in, (py_data_unpack_fn)unpack_py_dfs_GetManagerVersion_args_out, 0, &ndr_table_netdfs },
4512
{ "Add", "S.Add(path, server, share, comment, flags) -> None", (py_dcerpc_call_fn)dcerpc_dfs_Add_r, (py_data_pack_fn)pack_py_dfs_Add_args_in, (py_data_unpack_fn)unpack_py_dfs_Add_args_out, 1, &ndr_table_netdfs },
4513
{ "Remove", "S.Remove(dfs_entry_path, servername, sharename) -> None", (py_dcerpc_call_fn)dcerpc_dfs_Remove_r, (py_data_pack_fn)pack_py_dfs_Remove_args_in, (py_data_unpack_fn)unpack_py_dfs_Remove_args_out, 2, &ndr_table_netdfs },
4514
{ "SetInfo", "S.SetInfo(dfs_entry_path, servername, sharename, level, info) -> None", (py_dcerpc_call_fn)dcerpc_dfs_SetInfo_r, (py_data_pack_fn)pack_py_dfs_SetInfo_args_in, (py_data_unpack_fn)unpack_py_dfs_SetInfo_args_out, 3, &ndr_table_netdfs },
4515
{ "GetInfo", "S.GetInfo(dfs_entry_path, servername, sharename, level) -> info", (py_dcerpc_call_fn)dcerpc_dfs_GetInfo_r, (py_data_pack_fn)pack_py_dfs_GetInfo_args_in, (py_data_unpack_fn)unpack_py_dfs_GetInfo_args_out, 4, &ndr_table_netdfs },
4516
{ "Enum", "S.Enum(level, bufsize, info, total) -> (info, total)", (py_dcerpc_call_fn)dcerpc_dfs_Enum_r, (py_data_pack_fn)pack_py_dfs_Enum_args_in, (py_data_unpack_fn)unpack_py_dfs_Enum_args_out, 5, &ndr_table_netdfs },
4517
{ "AddFtRoot", "S.AddFtRoot(servername, dns_servername, dfsname, rootshare, comment, dfs_config_dn, unknown1, flags, unknown2) -> unknown2", (py_dcerpc_call_fn)dcerpc_dfs_AddFtRoot_r, (py_data_pack_fn)pack_py_dfs_AddFtRoot_args_in, (py_data_unpack_fn)unpack_py_dfs_AddFtRoot_args_out, 10, &ndr_table_netdfs },
4518
{ "RemoveFtRoot", "S.RemoveFtRoot(servername, dns_servername, dfsname, rootshare, flags, unknown) -> unknown", (py_dcerpc_call_fn)dcerpc_dfs_RemoveFtRoot_r, (py_data_pack_fn)pack_py_dfs_RemoveFtRoot_args_in, (py_data_unpack_fn)unpack_py_dfs_RemoveFtRoot_args_out, 11, &ndr_table_netdfs },
4519
{ "AddStdRoot", "S.AddStdRoot(servername, rootshare, comment, flags) -> None", (py_dcerpc_call_fn)dcerpc_dfs_AddStdRoot_r, (py_data_pack_fn)pack_py_dfs_AddStdRoot_args_in, (py_data_unpack_fn)unpack_py_dfs_AddStdRoot_args_out, 12, &ndr_table_netdfs },
4520
{ "RemoveStdRoot", "S.RemoveStdRoot(servername, rootshare, flags) -> None", (py_dcerpc_call_fn)dcerpc_dfs_RemoveStdRoot_r, (py_data_pack_fn)pack_py_dfs_RemoveStdRoot_args_in, (py_data_unpack_fn)unpack_py_dfs_RemoveStdRoot_args_out, 13, &ndr_table_netdfs },
4521
{ "ManagerInitialize", "S.ManagerInitialize(servername, flags) -> None", (py_dcerpc_call_fn)dcerpc_dfs_ManagerInitialize_r, (py_data_pack_fn)pack_py_dfs_ManagerInitialize_args_in, (py_data_unpack_fn)unpack_py_dfs_ManagerInitialize_args_out, 14, &ndr_table_netdfs },
4522
{ "AddStdRootForced", "S.AddStdRootForced(servername, rootshare, comment, store) -> None", (py_dcerpc_call_fn)dcerpc_dfs_AddStdRootForced_r, (py_data_pack_fn)pack_py_dfs_AddStdRootForced_args_in, (py_data_unpack_fn)unpack_py_dfs_AddStdRootForced_args_out, 15, &ndr_table_netdfs },
4523
{ "GetDcAddress", "S.GetDcAddress(servername, server_fullname, is_root, ttl) -> (server_fullname, is_root, ttl)", (py_dcerpc_call_fn)dcerpc_dfs_GetDcAddress_r, (py_data_pack_fn)pack_py_dfs_GetDcAddress_args_in, (py_data_unpack_fn)unpack_py_dfs_GetDcAddress_args_out, 16, &ndr_table_netdfs },
4524
{ "SetDcAddress", "S.SetDcAddress(servername, server_fullname, flags, ttl) -> None", (py_dcerpc_call_fn)dcerpc_dfs_SetDcAddress_r, (py_data_pack_fn)pack_py_dfs_SetDcAddress_args_in, (py_data_unpack_fn)unpack_py_dfs_SetDcAddress_args_out, 17, &ndr_table_netdfs },
4525
{ "FlushFtTable", "S.FlushFtTable(servername, rootshare) -> None", (py_dcerpc_call_fn)dcerpc_dfs_FlushFtTable_r, (py_data_pack_fn)pack_py_dfs_FlushFtTable_args_in, (py_data_unpack_fn)unpack_py_dfs_FlushFtTable_args_out, 18, &ndr_table_netdfs },
4526
{ "EnumEx", "S.EnumEx(dfs_name, level, bufsize, info, total) -> (info, total)", (py_dcerpc_call_fn)dcerpc_dfs_EnumEx_r, (py_data_pack_fn)pack_py_dfs_EnumEx_args_in, (py_data_unpack_fn)unpack_py_dfs_EnumEx_args_out, 21, &ndr_table_netdfs },
4530
static PyObject *interface_netdfs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4532
return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_netdfs);
4535
#define PY_DOC_NETDFS "Settings for Microsoft Distributed File System"
4536
static PyTypeObject netdfs_InterfaceType = {
4537
PyObject_HEAD_INIT(NULL) 0,
4538
.tp_name = "dfs.netdfs",
4539
.tp_basicsize = sizeof(dcerpc_InterfaceObject),
4540
.tp_doc = "netdfs(binding, lp_ctx=None, credentials=None) -> connection\n"
4542
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
4543
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
4544
"credentials should be a credentials.Credentials object.\n\n"PY_DOC_NETDFS,
4545
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4546
.tp_new = interface_netdfs_new,
4549
static PyMethodDef dfs_methods[] = {
4550
{ NULL, NULL, 0, NULL }
4556
PyObject *dep_talloc;
4557
PyObject *dep_samba_dcerpc_misc;
4558
PyObject *dep_samba_dcerpc_base;
4560
dep_talloc = PyImport_ImportModule("talloc");
4561
if (dep_talloc == NULL)
4564
dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
4565
if (dep_samba_dcerpc_misc == NULL)
4568
dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
4569
if (dep_samba_dcerpc_base == NULL)
4572
Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
4573
if (Object_Type == NULL)
4576
GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
4577
if (GUID_Type == NULL)
4580
ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
4581
if (ClientConnection_Type == NULL)
4584
dfs_Info0_Type.tp_base = Object_Type;
4586
dfs_Info1_Type.tp_base = Object_Type;
4588
dfs_Info2_Type.tp_base = Object_Type;
4590
dfs_StorageInfo_Type.tp_base = Object_Type;
4592
dfs_Info3_Type.tp_base = Object_Type;
4594
dfs_Info4_Type.tp_base = Object_Type;
4596
dfs_Info5_Type.tp_base = Object_Type;
4598
dfs_Target_Priority_Type.tp_base = Object_Type;
4600
dfs_StorageInfo2_Type.tp_base = Object_Type;
4602
dfs_Info6_Type.tp_base = Object_Type;
4604
dfs_Info7_Type.tp_base = Object_Type;
4606
dfs_Info100_Type.tp_base = Object_Type;
4608
dfs_Info101_Type.tp_base = Object_Type;
4610
dfs_Info102_Type.tp_base = Object_Type;
4612
dfs_Info103_Type.tp_base = Object_Type;
4614
dfs_Info104_Type.tp_base = Object_Type;
4616
dfs_Info105_Type.tp_base = Object_Type;
4618
dfs_Info106_Type.tp_base = Object_Type;
4620
dfs_Info200_Type.tp_base = Object_Type;
4622
dfs_Info300_Type.tp_base = Object_Type;
4624
dfs_EnumArray1_Type.tp_base = Object_Type;
4626
dfs_EnumArray2_Type.tp_base = Object_Type;
4628
dfs_EnumArray3_Type.tp_base = Object_Type;
4630
dfs_EnumArray4_Type.tp_base = Object_Type;
4632
dfs_EnumArray5_Type.tp_base = Object_Type;
4634
dfs_EnumArray6_Type.tp_base = Object_Type;
4636
dfs_EnumArray200_Type.tp_base = Object_Type;
4638
dfs_EnumArray300_Type.tp_base = Object_Type;
4640
dfs_EnumStruct_Type.tp_base = Object_Type;
4642
dfs_UnknownStruct_Type.tp_base = Object_Type;
4644
netdfs_InterfaceType.tp_base = ClientConnection_Type;
4646
if (PyType_Ready(&dfs_Info0_Type) < 0)
4648
if (PyType_Ready(&dfs_Info1_Type) < 0)
4650
if (PyType_Ready(&dfs_Info2_Type) < 0)
4652
if (PyType_Ready(&dfs_StorageInfo_Type) < 0)
4654
if (PyType_Ready(&dfs_Info3_Type) < 0)
4656
if (PyType_Ready(&dfs_Info4_Type) < 0)
4658
if (PyType_Ready(&dfs_Info5_Type) < 0)
4660
if (PyType_Ready(&dfs_Target_Priority_Type) < 0)
4662
if (PyType_Ready(&dfs_StorageInfo2_Type) < 0)
4664
if (PyType_Ready(&dfs_Info6_Type) < 0)
4666
if (PyType_Ready(&dfs_Info7_Type) < 0)
4668
if (PyType_Ready(&dfs_Info100_Type) < 0)
4670
if (PyType_Ready(&dfs_Info101_Type) < 0)
4672
if (PyType_Ready(&dfs_Info102_Type) < 0)
4674
if (PyType_Ready(&dfs_Info103_Type) < 0)
4676
if (PyType_Ready(&dfs_Info104_Type) < 0)
4678
if (PyType_Ready(&dfs_Info105_Type) < 0)
4680
if (PyType_Ready(&dfs_Info106_Type) < 0)
4682
if (PyType_Ready(&dfs_Info200_Type) < 0)
4684
if (PyType_Ready(&dfs_Info300_Type) < 0)
4686
if (PyType_Ready(&dfs_EnumArray1_Type) < 0)
4688
if (PyType_Ready(&dfs_EnumArray2_Type) < 0)
4690
if (PyType_Ready(&dfs_EnumArray3_Type) < 0)
4692
if (PyType_Ready(&dfs_EnumArray4_Type) < 0)
4694
if (PyType_Ready(&dfs_EnumArray5_Type) < 0)
4696
if (PyType_Ready(&dfs_EnumArray6_Type) < 0)
4698
if (PyType_Ready(&dfs_EnumArray200_Type) < 0)
4700
if (PyType_Ready(&dfs_EnumArray300_Type) < 0)
4702
if (PyType_Ready(&dfs_EnumStruct_Type) < 0)
4704
if (PyType_Ready(&dfs_UnknownStruct_Type) < 0)
4706
if (PyType_Ready(&netdfs_InterfaceType) < 0)
4708
if (!PyInterface_AddNdrRpcMethods(&netdfs_InterfaceType, py_ndr_netdfs_methods))
4711
#ifdef PY_INFO0_PATCH
4712
PY_INFO0_PATCH(&dfs_Info0_Type);
4714
#ifdef PY_INFO1_PATCH
4715
PY_INFO1_PATCH(&dfs_Info1_Type);
4717
#ifdef PY_INFO2_PATCH
4718
PY_INFO2_PATCH(&dfs_Info2_Type);
4720
#ifdef PY_STORAGEINFO_PATCH
4721
PY_STORAGEINFO_PATCH(&dfs_StorageInfo_Type);
4723
#ifdef PY_INFO3_PATCH
4724
PY_INFO3_PATCH(&dfs_Info3_Type);
4726
#ifdef PY_INFO4_PATCH
4727
PY_INFO4_PATCH(&dfs_Info4_Type);
4729
#ifdef PY_INFO5_PATCH
4730
PY_INFO5_PATCH(&dfs_Info5_Type);
4732
#ifdef PY_TARGET_PRIORITY_PATCH
4733
PY_TARGET_PRIORITY_PATCH(&dfs_Target_Priority_Type);
4735
#ifdef PY_STORAGEINFO2_PATCH
4736
PY_STORAGEINFO2_PATCH(&dfs_StorageInfo2_Type);
4738
#ifdef PY_INFO6_PATCH
4739
PY_INFO6_PATCH(&dfs_Info6_Type);
4741
#ifdef PY_INFO7_PATCH
4742
PY_INFO7_PATCH(&dfs_Info7_Type);
4744
#ifdef PY_INFO100_PATCH
4745
PY_INFO100_PATCH(&dfs_Info100_Type);
4747
#ifdef PY_INFO101_PATCH
4748
PY_INFO101_PATCH(&dfs_Info101_Type);
4750
#ifdef PY_INFO102_PATCH
4751
PY_INFO102_PATCH(&dfs_Info102_Type);
4753
#ifdef PY_INFO103_PATCH
4754
PY_INFO103_PATCH(&dfs_Info103_Type);
4756
#ifdef PY_INFO104_PATCH
4757
PY_INFO104_PATCH(&dfs_Info104_Type);
4759
#ifdef PY_INFO105_PATCH
4760
PY_INFO105_PATCH(&dfs_Info105_Type);
4762
#ifdef PY_INFO106_PATCH
4763
PY_INFO106_PATCH(&dfs_Info106_Type);
4765
#ifdef PY_INFO200_PATCH
4766
PY_INFO200_PATCH(&dfs_Info200_Type);
4768
#ifdef PY_INFO300_PATCH
4769
PY_INFO300_PATCH(&dfs_Info300_Type);
4771
#ifdef PY_ENUMARRAY1_PATCH
4772
PY_ENUMARRAY1_PATCH(&dfs_EnumArray1_Type);
4774
#ifdef PY_ENUMARRAY2_PATCH
4775
PY_ENUMARRAY2_PATCH(&dfs_EnumArray2_Type);
4777
#ifdef PY_ENUMARRAY3_PATCH
4778
PY_ENUMARRAY3_PATCH(&dfs_EnumArray3_Type);
4780
#ifdef PY_ENUMARRAY4_PATCH
4781
PY_ENUMARRAY4_PATCH(&dfs_EnumArray4_Type);
4783
#ifdef PY_ENUMARRAY5_PATCH
4784
PY_ENUMARRAY5_PATCH(&dfs_EnumArray5_Type);
4786
#ifdef PY_ENUMARRAY6_PATCH
4787
PY_ENUMARRAY6_PATCH(&dfs_EnumArray6_Type);
4789
#ifdef PY_ENUMARRAY200_PATCH
4790
PY_ENUMARRAY200_PATCH(&dfs_EnumArray200_Type);
4792
#ifdef PY_ENUMARRAY300_PATCH
4793
PY_ENUMARRAY300_PATCH(&dfs_EnumArray300_Type);
4795
#ifdef PY_ENUMSTRUCT_PATCH
4796
PY_ENUMSTRUCT_PATCH(&dfs_EnumStruct_Type);
4798
#ifdef PY_UNKNOWNSTRUCT_PATCH
4799
PY_UNKNOWNSTRUCT_PATCH(&dfs_UnknownStruct_Type);
4801
#ifdef PY_NETDFS_PATCH
4802
PY_NETDFS_PATCH(&netdfs_InterfaceType);
4805
m = Py_InitModule3("dfs", dfs_methods, "dfs DCE/RPC");
4809
PyModule_AddObject(m, "DFS_PROPERTY_FLAG_INSITE_REFERRALS", PyInt_FromLong(DFS_PROPERTY_FLAG_INSITE_REFERRALS));
4810
PyModule_AddObject(m, "DFS_SITE_COST_NORMAL_PRIORITY_CLASS", PyInt_FromLong(DFS_SITE_COST_NORMAL_PRIORITY_CLASS));
4811
PyModule_AddObject(m, "DFS_VOLUME_STATE_STANDALONE", PyInt_FromLong(DFS_VOLUME_STATE_STANDALONE));
4812
PyModule_AddObject(m, "DFS_VOLUME_STATE_OFFLINE", PyInt_FromLong(DFS_VOLUME_STATE_OFFLINE));
4813
PyModule_AddObject(m, "DFS_MANAGER_VERSION_W2K3", PyInt_FromLong(DFS_MANAGER_VERSION_W2K3));
4814
PyModule_AddObject(m, "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", PyInt_FromLong(DFS_PROPERTY_FLAG_ROOT_SCALABILITY));
4815
PyModule_AddObject(m, "DFS_VOLUME_FLAVOR_STANDALONE", PyInt_FromLong(DFS_VOLUME_FLAVOR_STANDALONE));
4816
PyModule_AddObject(m, "DFS_PROPERTY_FLAG_SITE_COSTING", PyInt_FromLong(DFS_PROPERTY_FLAG_SITE_COSTING));
4817
PyModule_AddObject(m, "DFS_VOLUME_FLAVOR_AD_BLOB", PyInt_FromLong(DFS_VOLUME_FLAVOR_AD_BLOB));
4818
PyModule_AddObject(m, "DFS_STORAGE_STATE_OFFLINE", PyInt_FromLong(DFS_STORAGE_STATE_OFFLINE));
4819
PyModule_AddObject(m, "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", PyInt_FromLong(DFS_PROPERTY_FLAG_CLUSTER_ENABLED));
4820
PyModule_AddObject(m, "DFS_MANAGER_VERSION_NT4", PyInt_FromLong(DFS_MANAGER_VERSION_NT4));
4821
PyModule_AddObject(m, "DFS_VOLUME_STATE_OK", PyInt_FromLong(DFS_VOLUME_STATE_OK));
4822
PyModule_AddObject(m, "DFS_STORAGE_STATE_ACTIVE", PyInt_FromLong(DFS_STORAGE_STATE_ACTIVE));
4823
PyModule_AddObject(m, "DFS_SITE_COST_LOW_PRIORITY_CLASS", PyInt_FromLong(DFS_SITE_COST_LOW_PRIORITY_CLASS));
4824
PyModule_AddObject(m, "DFS_MANAGER_VERSION_W2K8", PyInt_FromLong(DFS_MANAGER_VERSION_W2K8));
4825
PyModule_AddObject(m, "DFS_INVALID_PRIORITY_CLASS", PyInt_FromLong(DFS_INVALID_PRIORITY_CLASS));
4826
PyModule_AddObject(m, "DFS_VOLUME_STATE_AD_BLOB", PyInt_FromLong(DFS_VOLUME_STATE_AD_BLOB));
4827
PyModule_AddObject(m, "DFS_STORAGE_STATES", PyInt_FromLong(0xf));
4828
PyModule_AddObject(m, "DFS_PROPERTY_FLAG_TARGET_FAILBACK", PyInt_FromLong(DFS_PROPERTY_FLAG_TARGET_FAILBACK));
4829
PyModule_AddObject(m, "DFS_VOLUME_STATE_ONLINE", PyInt_FromLong(DFS_VOLUME_STATE_ONLINE));
4830
PyModule_AddObject(m, "DFS_GLOBAL_LOW_PRIORITY_CLASS", PyInt_FromLong(DFS_GLOBAL_LOW_PRIORITY_CLASS));
4831
PyModule_AddObject(m, "DFS_MANAGER_VERSION_W2K", PyInt_FromLong(DFS_MANAGER_VERSION_W2K));
4832
PyModule_AddObject(m, "DFS_GLOBAL_HIGH_PRIORITY_CLASS", PyInt_FromLong(DFS_GLOBAL_HIGH_PRIORITY_CLASS));
4833
PyModule_AddObject(m, "DFS_VOLUME_STATE_INCONSISTENT", PyInt_FromLong(DFS_VOLUME_STATE_INCONSISTENT));
4834
PyModule_AddObject(m, "DFS_STORAGE_STATE_ONLINE", PyInt_FromLong(DFS_STORAGE_STATE_ONLINE));
4835
PyModule_AddObject(m, "DFS_SITE_COST_HIGH_PRIORITY_CLASS", PyInt_FromLong(DFS_SITE_COST_HIGH_PRIORITY_CLASS));
4836
Py_INCREF((PyObject *)(void *)&dfs_Info0_Type);
4837
PyModule_AddObject(m, "Info0", (PyObject *)(void *)&dfs_Info0_Type);
4838
Py_INCREF((PyObject *)(void *)&dfs_Info1_Type);
4839
PyModule_AddObject(m, "Info1", (PyObject *)(void *)&dfs_Info1_Type);
4840
Py_INCREF((PyObject *)(void *)&dfs_Info2_Type);
4841
PyModule_AddObject(m, "Info2", (PyObject *)(void *)&dfs_Info2_Type);
4842
Py_INCREF((PyObject *)(void *)&dfs_StorageInfo_Type);
4843
PyModule_AddObject(m, "StorageInfo", (PyObject *)(void *)&dfs_StorageInfo_Type);
4844
Py_INCREF((PyObject *)(void *)&dfs_Info3_Type);
4845
PyModule_AddObject(m, "Info3", (PyObject *)(void *)&dfs_Info3_Type);
4846
Py_INCREF((PyObject *)(void *)&dfs_Info4_Type);
4847
PyModule_AddObject(m, "Info4", (PyObject *)(void *)&dfs_Info4_Type);
4848
Py_INCREF((PyObject *)(void *)&dfs_Info5_Type);
4849
PyModule_AddObject(m, "Info5", (PyObject *)(void *)&dfs_Info5_Type);
4850
Py_INCREF((PyObject *)(void *)&dfs_Target_Priority_Type);
4851
PyModule_AddObject(m, "Target_Priority", (PyObject *)(void *)&dfs_Target_Priority_Type);
4852
Py_INCREF((PyObject *)(void *)&dfs_StorageInfo2_Type);
4853
PyModule_AddObject(m, "StorageInfo2", (PyObject *)(void *)&dfs_StorageInfo2_Type);
4854
Py_INCREF((PyObject *)(void *)&dfs_Info6_Type);
4855
PyModule_AddObject(m, "Info6", (PyObject *)(void *)&dfs_Info6_Type);
4856
Py_INCREF((PyObject *)(void *)&dfs_Info7_Type);
4857
PyModule_AddObject(m, "Info7", (PyObject *)(void *)&dfs_Info7_Type);
4858
Py_INCREF((PyObject *)(void *)&dfs_Info100_Type);
4859
PyModule_AddObject(m, "Info100", (PyObject *)(void *)&dfs_Info100_Type);
4860
Py_INCREF((PyObject *)(void *)&dfs_Info101_Type);
4861
PyModule_AddObject(m, "Info101", (PyObject *)(void *)&dfs_Info101_Type);
4862
Py_INCREF((PyObject *)(void *)&dfs_Info102_Type);
4863
PyModule_AddObject(m, "Info102", (PyObject *)(void *)&dfs_Info102_Type);
4864
Py_INCREF((PyObject *)(void *)&dfs_Info103_Type);
4865
PyModule_AddObject(m, "Info103", (PyObject *)(void *)&dfs_Info103_Type);
4866
Py_INCREF((PyObject *)(void *)&dfs_Info104_Type);
4867
PyModule_AddObject(m, "Info104", (PyObject *)(void *)&dfs_Info104_Type);
4868
Py_INCREF((PyObject *)(void *)&dfs_Info105_Type);
4869
PyModule_AddObject(m, "Info105", (PyObject *)(void *)&dfs_Info105_Type);
4870
Py_INCREF((PyObject *)(void *)&dfs_Info106_Type);
4871
PyModule_AddObject(m, "Info106", (PyObject *)(void *)&dfs_Info106_Type);
4872
Py_INCREF((PyObject *)(void *)&dfs_Info200_Type);
4873
PyModule_AddObject(m, "Info200", (PyObject *)(void *)&dfs_Info200_Type);
4874
Py_INCREF((PyObject *)(void *)&dfs_Info300_Type);
4875
PyModule_AddObject(m, "Info300", (PyObject *)(void *)&dfs_Info300_Type);
4876
Py_INCREF((PyObject *)(void *)&dfs_EnumArray1_Type);
4877
PyModule_AddObject(m, "EnumArray1", (PyObject *)(void *)&dfs_EnumArray1_Type);
4878
Py_INCREF((PyObject *)(void *)&dfs_EnumArray2_Type);
4879
PyModule_AddObject(m, "EnumArray2", (PyObject *)(void *)&dfs_EnumArray2_Type);
4880
Py_INCREF((PyObject *)(void *)&dfs_EnumArray3_Type);
4881
PyModule_AddObject(m, "EnumArray3", (PyObject *)(void *)&dfs_EnumArray3_Type);
4882
Py_INCREF((PyObject *)(void *)&dfs_EnumArray4_Type);
4883
PyModule_AddObject(m, "EnumArray4", (PyObject *)(void *)&dfs_EnumArray4_Type);
4884
Py_INCREF((PyObject *)(void *)&dfs_EnumArray5_Type);
4885
PyModule_AddObject(m, "EnumArray5", (PyObject *)(void *)&dfs_EnumArray5_Type);
4886
Py_INCREF((PyObject *)(void *)&dfs_EnumArray6_Type);
4887
PyModule_AddObject(m, "EnumArray6", (PyObject *)(void *)&dfs_EnumArray6_Type);
4888
Py_INCREF((PyObject *)(void *)&dfs_EnumArray200_Type);
4889
PyModule_AddObject(m, "EnumArray200", (PyObject *)(void *)&dfs_EnumArray200_Type);
4890
Py_INCREF((PyObject *)(void *)&dfs_EnumArray300_Type);
4891
PyModule_AddObject(m, "EnumArray300", (PyObject *)(void *)&dfs_EnumArray300_Type);
4892
Py_INCREF((PyObject *)(void *)&dfs_EnumStruct_Type);
4893
PyModule_AddObject(m, "EnumStruct", (PyObject *)(void *)&dfs_EnumStruct_Type);
4894
Py_INCREF((PyObject *)(void *)&dfs_UnknownStruct_Type);
4895
PyModule_AddObject(m, "UnknownStruct", (PyObject *)(void *)&dfs_UnknownStruct_Type);
4896
Py_INCREF((PyObject *)(void *)&netdfs_InterfaceType);
4897
PyModule_AddObject(m, "netdfs", (PyObject *)(void *)&netdfs_InterfaceType);
4898
#ifdef PY_MOD_DFS_PATCH
4899
PY_MOD_DFS_PATCH(m);