~lefteris-nikoltsios/+junk/samba-lp1016895

« back to all changes in this revision

Viewing changes to source3/librpc/gen_ndr/py_dfs.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/* Python wrapper functions auto-generated by pidl */
 
3
#include <Python.h>
 
4
#include "includes.h"
 
5
#include <pytalloc.h>
 
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"
 
10
 
 
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;
 
43
 
 
44
void initdfs(void);static PyTypeObject *Object_Type;
 
45
static PyTypeObject *GUID_Type;
 
46
static PyTypeObject *ClientConnection_Type;
 
47
 
 
48
static PyObject *py_dfs_Info0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
49
{
 
50
        return py_talloc_new(struct dfs_Info0, type);
 
51
}
 
52
 
 
53
 
 
54
static PyTypeObject dfs_Info0_Type = {
 
55
        PyObject_HEAD_INIT(NULL) 0,
 
56
        .tp_name = "dfs.Info0",
 
57
        .tp_getset = NULL,
 
58
        .tp_methods = NULL,
 
59
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
60
        .tp_basicsize = sizeof(py_talloc_Object),
 
61
        .tp_new = py_dfs_Info0_new,
 
62
};
 
63
 
 
64
 
 
65
static PyObject *py_dfs_Info1_get_path(PyObject *obj, void *closure)
 
66
{
 
67
        struct dfs_Info1 *object = (struct dfs_Info1 *)py_talloc_get_ptr(obj);
 
68
        PyObject *py_path;
 
69
        if (object->path == NULL) {
 
70
                py_path = Py_None;
 
71
                Py_INCREF(py_path);
 
72
        } else {
 
73
                if (object->path == NULL) {
 
74
                        py_path = Py_None;
 
75
                        Py_INCREF(py_path);
 
76
                } else {
 
77
                        py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
 
78
                }
 
79
        }
 
80
        return py_path;
 
81
}
 
82
 
 
83
static int py_dfs_Info1_set_path(PyObject *py_obj, PyObject *value, void *closure)
 
84
{
 
85
        struct dfs_Info1 *object = (struct dfs_Info1 *)py_talloc_get_ptr(py_obj);
 
86
        if (value == Py_None) {
 
87
                object->path = NULL;
 
88
        } else {
 
89
                object->path = NULL;
 
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);
 
94
                } else {
 
95
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
96
                        return -1;
 
97
                }
 
98
        }
 
99
        return 0;
 
100
}
 
101
 
 
102
static PyGetSetDef py_dfs_Info1_getsetters[] = {
 
103
        { discard_const_p(char, "path"), py_dfs_Info1_get_path, py_dfs_Info1_set_path },
 
104
        { NULL }
 
105
};
 
106
 
 
107
static PyObject *py_dfs_Info1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
108
{
 
109
        return py_talloc_new(struct dfs_Info1, type);
 
110
}
 
111
 
 
112
 
 
113
static PyTypeObject dfs_Info1_Type = {
 
114
        PyObject_HEAD_INIT(NULL) 0,
 
115
        .tp_name = "dfs.Info1",
 
116
        .tp_getset = py_dfs_Info1_getsetters,
 
117
        .tp_methods = NULL,
 
118
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
119
        .tp_basicsize = sizeof(py_talloc_Object),
 
120
        .tp_new = py_dfs_Info1_new,
 
121
};
 
122
 
 
123
 
 
124
static PyObject *py_dfs_Info2_get_path(PyObject *obj, void *closure)
 
125
{
 
126
        struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(obj);
 
127
        PyObject *py_path;
 
128
        if (object->path == NULL) {
 
129
                py_path = Py_None;
 
130
                Py_INCREF(py_path);
 
131
        } else {
 
132
                if (object->path == NULL) {
 
133
                        py_path = Py_None;
 
134
                        Py_INCREF(py_path);
 
135
                } else {
 
136
                        py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
 
137
                }
 
138
        }
 
139
        return py_path;
 
140
}
 
141
 
 
142
static int py_dfs_Info2_set_path(PyObject *py_obj, PyObject *value, void *closure)
 
143
{
 
144
        struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(py_obj);
 
145
        if (value == Py_None) {
 
146
                object->path = NULL;
 
147
        } else {
 
148
                object->path = NULL;
 
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);
 
153
                } else {
 
154
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
155
                        return -1;
 
156
                }
 
157
        }
 
158
        return 0;
 
159
}
 
160
 
 
161
static PyObject *py_dfs_Info2_get_comment(PyObject *obj, void *closure)
 
162
{
 
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);
 
168
        } else {
 
169
                if (object->comment == NULL) {
 
170
                        py_comment = Py_None;
 
171
                        Py_INCREF(py_comment);
 
172
                } else {
 
173
                        py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
 
174
                }
 
175
        }
 
176
        return py_comment;
 
177
}
 
178
 
 
179
static int py_dfs_Info2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
 
180
{
 
181
        struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(py_obj);
 
182
        if (value == Py_None) {
 
183
                object->comment = NULL;
 
184
        } else {
 
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);
 
190
                } else {
 
191
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
192
                        return -1;
 
193
                }
 
194
        }
 
195
        return 0;
 
196
}
 
197
 
 
198
static PyObject *py_dfs_Info2_get_state(PyObject *obj, void *closure)
 
199
{
 
200
        struct dfs_Info2 *object = (struct dfs_Info2 *)py_talloc_get_ptr(obj);
 
201
        PyObject *py_state;
 
202
        py_state = PyInt_FromLong(object->state);
 
203
        return py_state;
 
204
}
 
205
 
 
206
static int py_dfs_Info2_set_state(PyObject *py_obj, PyObject *value, void *closure)
 
207
{
 
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);
 
213
        } else {
 
214
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
215
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
216
                return -1;
 
217
        }
 
218
        return 0;
 
219
}
 
220
 
 
221
static PyObject *py_dfs_Info2_get_num_stores(PyObject *obj, void *closure)
 
222
{
 
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;
 
227
}
 
228
 
 
229
static int py_dfs_Info2_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
 
230
{
 
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);
 
234
        return 0;
 
235
}
 
236
 
 
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 },
 
242
        { NULL }
 
243
};
 
244
 
 
245
static PyObject *py_dfs_Info2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
246
{
 
247
        return py_talloc_new(struct dfs_Info2, type);
 
248
}
 
249
 
 
250
 
 
251
static PyTypeObject dfs_Info2_Type = {
 
252
        PyObject_HEAD_INIT(NULL) 0,
 
253
        .tp_name = "dfs.Info2",
 
254
        .tp_getset = py_dfs_Info2_getsetters,
 
255
        .tp_methods = NULL,
 
256
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
257
        .tp_basicsize = sizeof(py_talloc_Object),
 
258
        .tp_new = py_dfs_Info2_new,
 
259
};
 
260
 
 
261
 
 
262
static PyObject *py_dfs_StorageInfo_get_state(PyObject *obj, void *closure)
 
263
{
 
264
        struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(obj);
 
265
        PyObject *py_state;
 
266
        py_state = PyInt_FromLong(object->state);
 
267
        return py_state;
 
268
}
 
269
 
 
270
static int py_dfs_StorageInfo_set_state(PyObject *py_obj, PyObject *value, void *closure)
 
271
{
 
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);
 
277
        } else {
 
278
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
279
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
280
                return -1;
 
281
        }
 
282
        return 0;
 
283
}
 
284
 
 
285
static PyObject *py_dfs_StorageInfo_get_server(PyObject *obj, void *closure)
 
286
{
 
287
        struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(obj);
 
288
        PyObject *py_server;
 
289
        if (object->server == NULL) {
 
290
                py_server = Py_None;
 
291
                Py_INCREF(py_server);
 
292
        } else {
 
293
                if (object->server == NULL) {
 
294
                        py_server = Py_None;
 
295
                        Py_INCREF(py_server);
 
296
                } else {
 
297
                        py_server = PyUnicode_Decode(object->server, strlen(object->server), "utf-8", "ignore");
 
298
                }
 
299
        }
 
300
        return py_server;
 
301
}
 
302
 
 
303
static int py_dfs_StorageInfo_set_server(PyObject *py_obj, PyObject *value, void *closure)
 
304
{
 
305
        struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(py_obj);
 
306
        if (value == Py_None) {
 
307
                object->server = NULL;
 
308
        } else {
 
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);
 
314
                } else {
 
315
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
316
                        return -1;
 
317
                }
 
318
        }
 
319
        return 0;
 
320
}
 
321
 
 
322
static PyObject *py_dfs_StorageInfo_get_share(PyObject *obj, void *closure)
 
323
{
 
324
        struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(obj);
 
325
        PyObject *py_share;
 
326
        if (object->share == NULL) {
 
327
                py_share = Py_None;
 
328
                Py_INCREF(py_share);
 
329
        } else {
 
330
                if (object->share == NULL) {
 
331
                        py_share = Py_None;
 
332
                        Py_INCREF(py_share);
 
333
                } else {
 
334
                        py_share = PyUnicode_Decode(object->share, strlen(object->share), "utf-8", "ignore");
 
335
                }
 
336
        }
 
337
        return py_share;
 
338
}
 
339
 
 
340
static int py_dfs_StorageInfo_set_share(PyObject *py_obj, PyObject *value, void *closure)
 
341
{
 
342
        struct dfs_StorageInfo *object = (struct dfs_StorageInfo *)py_talloc_get_ptr(py_obj);
 
343
        if (value == Py_None) {
 
344
                object->share = NULL;
 
345
        } else {
 
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);
 
351
                } else {
 
352
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
353
                        return -1;
 
354
                }
 
355
        }
 
356
        return 0;
 
357
}
 
358
 
 
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 },
 
363
        { NULL }
 
364
};
 
365
 
 
366
static PyObject *py_dfs_StorageInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
367
{
 
368
        return py_talloc_new(struct dfs_StorageInfo, type);
 
369
}
 
370
 
 
371
 
 
372
static PyTypeObject dfs_StorageInfo_Type = {
 
373
        PyObject_HEAD_INIT(NULL) 0,
 
374
        .tp_name = "dfs.StorageInfo",
 
375
        .tp_getset = py_dfs_StorageInfo_getsetters,
 
376
        .tp_methods = NULL,
 
377
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
378
        .tp_basicsize = sizeof(py_talloc_Object),
 
379
        .tp_new = py_dfs_StorageInfo_new,
 
380
};
 
381
 
 
382
 
 
383
static PyObject *py_dfs_Info3_get_path(PyObject *obj, void *closure)
 
384
{
 
385
        struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(obj);
 
386
        PyObject *py_path;
 
387
        if (object->path == NULL) {
 
388
                py_path = Py_None;
 
389
                Py_INCREF(py_path);
 
390
        } else {
 
391
                if (object->path == NULL) {
 
392
                        py_path = Py_None;
 
393
                        Py_INCREF(py_path);
 
394
                } else {
 
395
                        py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
 
396
                }
 
397
        }
 
398
        return py_path;
 
399
}
 
400
 
 
401
static int py_dfs_Info3_set_path(PyObject *py_obj, PyObject *value, void *closure)
 
402
{
 
403
        struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(py_obj);
 
404
        if (value == Py_None) {
 
405
                object->path = NULL;
 
406
        } else {
 
407
                object->path = NULL;
 
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);
 
412
                } else {
 
413
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
414
                        return -1;
 
415
                }
 
416
        }
 
417
        return 0;
 
418
}
 
419
 
 
420
static PyObject *py_dfs_Info3_get_comment(PyObject *obj, void *closure)
 
421
{
 
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);
 
427
        } else {
 
428
                if (object->comment == NULL) {
 
429
                        py_comment = Py_None;
 
430
                        Py_INCREF(py_comment);
 
431
                } else {
 
432
                        py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
 
433
                }
 
434
        }
 
435
        return py_comment;
 
436
}
 
437
 
 
438
static int py_dfs_Info3_set_comment(PyObject *py_obj, PyObject *value, void *closure)
 
439
{
 
440
        struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(py_obj);
 
441
        if (value == Py_None) {
 
442
                object->comment = NULL;
 
443
        } else {
 
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);
 
449
                } else {
 
450
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
451
                        return -1;
 
452
                }
 
453
        }
 
454
        return 0;
 
455
}
 
456
 
 
457
static PyObject *py_dfs_Info3_get_state(PyObject *obj, void *closure)
 
458
{
 
459
        struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(obj);
 
460
        PyObject *py_state;
 
461
        py_state = PyInt_FromLong(object->state);
 
462
        return py_state;
 
463
}
 
464
 
 
465
static int py_dfs_Info3_set_state(PyObject *py_obj, PyObject *value, void *closure)
 
466
{
 
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);
 
472
        } else {
 
473
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
474
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
475
                return -1;
 
476
        }
 
477
        return 0;
 
478
}
 
479
 
 
480
static PyObject *py_dfs_Info3_get_num_stores(PyObject *obj, void *closure)
 
481
{
 
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;
 
486
}
 
487
 
 
488
static int py_dfs_Info3_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
 
489
{
 
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);
 
493
        return 0;
 
494
}
 
495
 
 
496
static PyObject *py_dfs_Info3_get_stores(PyObject *obj, void *closure)
 
497
{
 
498
        struct dfs_Info3 *object = (struct dfs_Info3 *)py_talloc_get_ptr(obj);
 
499
        PyObject *py_stores;
 
500
        if (object->stores == NULL) {
 
501
                py_stores = Py_None;
 
502
                Py_INCREF(py_stores);
 
503
        } else {
 
504
                py_stores = PyList_New(object->num_stores);
 
505
                if (py_stores == NULL) {
 
506
                        return NULL;
 
507
                }
 
508
                {
 
509
                        int stores_cntr_1;
 
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);
 
514
                        }
 
515
                }
 
516
        }
 
517
        return py_stores;
 
518
}
 
519
 
 
520
static int py_dfs_Info3_set_stores(PyObject *py_obj, PyObject *value, void *closure)
 
521
{
 
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;
 
526
        } else {
 
527
                object->stores = NULL;
 
528
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
529
                {
 
530
                        int stores_cntr_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) {
 
537
                                        PyErr_NoMemory();
 
538
                                        return -1;
 
539
                                }
 
540
                                object->stores[stores_cntr_1] = *(struct dfs_StorageInfo *)py_talloc_get_ptr(PyList_GET_ITEM(value, stores_cntr_1));
 
541
                        }
 
542
                }
 
543
        }
 
544
        return 0;
 
545
}
 
546
 
 
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 },
 
553
        { NULL }
 
554
};
 
555
 
 
556
static PyObject *py_dfs_Info3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
557
{
 
558
        return py_talloc_new(struct dfs_Info3, type);
 
559
}
 
560
 
 
561
 
 
562
static PyTypeObject dfs_Info3_Type = {
 
563
        PyObject_HEAD_INIT(NULL) 0,
 
564
        .tp_name = "dfs.Info3",
 
565
        .tp_getset = py_dfs_Info3_getsetters,
 
566
        .tp_methods = NULL,
 
567
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
568
        .tp_basicsize = sizeof(py_talloc_Object),
 
569
        .tp_new = py_dfs_Info3_new,
 
570
};
 
571
 
 
572
 
 
573
static PyObject *py_dfs_Info4_get_path(PyObject *obj, void *closure)
 
574
{
 
575
        struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
 
576
        PyObject *py_path;
 
577
        if (object->path == NULL) {
 
578
                py_path = Py_None;
 
579
                Py_INCREF(py_path);
 
580
        } else {
 
581
                if (object->path == NULL) {
 
582
                        py_path = Py_None;
 
583
                        Py_INCREF(py_path);
 
584
                } else {
 
585
                        py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
 
586
                }
 
587
        }
 
588
        return py_path;
 
589
}
 
590
 
 
591
static int py_dfs_Info4_set_path(PyObject *py_obj, PyObject *value, void *closure)
 
592
{
 
593
        struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(py_obj);
 
594
        if (value == Py_None) {
 
595
                object->path = NULL;
 
596
        } else {
 
597
                object->path = NULL;
 
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);
 
602
                } else {
 
603
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
604
                        return -1;
 
605
                }
 
606
        }
 
607
        return 0;
 
608
}
 
609
 
 
610
static PyObject *py_dfs_Info4_get_comment(PyObject *obj, void *closure)
 
611
{
 
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);
 
617
        } else {
 
618
                if (object->comment == NULL) {
 
619
                        py_comment = Py_None;
 
620
                        Py_INCREF(py_comment);
 
621
                } else {
 
622
                        py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
 
623
                }
 
624
        }
 
625
        return py_comment;
 
626
}
 
627
 
 
628
static int py_dfs_Info4_set_comment(PyObject *py_obj, PyObject *value, void *closure)
 
629
{
 
630
        struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(py_obj);
 
631
        if (value == Py_None) {
 
632
                object->comment = NULL;
 
633
        } else {
 
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);
 
639
                } else {
 
640
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
641
                        return -1;
 
642
                }
 
643
        }
 
644
        return 0;
 
645
}
 
646
 
 
647
static PyObject *py_dfs_Info4_get_state(PyObject *obj, void *closure)
 
648
{
 
649
        struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
 
650
        PyObject *py_state;
 
651
        py_state = PyInt_FromLong(object->state);
 
652
        return py_state;
 
653
}
 
654
 
 
655
static int py_dfs_Info4_set_state(PyObject *py_obj, PyObject *value, void *closure)
 
656
{
 
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);
 
662
        } else {
 
663
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
664
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
665
                return -1;
 
666
        }
 
667
        return 0;
 
668
}
 
669
 
 
670
static PyObject *py_dfs_Info4_get_timeout(PyObject *obj, void *closure)
 
671
{
 
672
        struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
 
673
        PyObject *py_timeout;
 
674
        py_timeout = PyInt_FromLong(object->timeout);
 
675
        return py_timeout;
 
676
}
 
677
 
 
678
static int py_dfs_Info4_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
 
679
{
 
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);
 
683
        return 0;
 
684
}
 
685
 
 
686
static PyObject *py_dfs_Info4_get_guid(PyObject *obj, void *closure)
 
687
{
 
688
        struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
 
689
        PyObject *py_guid;
 
690
        py_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->guid);
 
691
        return py_guid;
 
692
}
 
693
 
 
694
static int py_dfs_Info4_set_guid(PyObject *py_obj, PyObject *value, void *closure)
 
695
{
 
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) {
 
699
                PyErr_NoMemory();
 
700
                return -1;
 
701
        }
 
702
        object->guid = *(struct GUID *)py_talloc_get_ptr(value);
 
703
        return 0;
 
704
}
 
705
 
 
706
static PyObject *py_dfs_Info4_get_num_stores(PyObject *obj, void *closure)
 
707
{
 
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;
 
712
}
 
713
 
 
714
static int py_dfs_Info4_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
 
715
{
 
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);
 
719
        return 0;
 
720
}
 
721
 
 
722
static PyObject *py_dfs_Info4_get_stores(PyObject *obj, void *closure)
 
723
{
 
724
        struct dfs_Info4 *object = (struct dfs_Info4 *)py_talloc_get_ptr(obj);
 
725
        PyObject *py_stores;
 
726
        if (object->stores == NULL) {
 
727
                py_stores = Py_None;
 
728
                Py_INCREF(py_stores);
 
729
        } else {
 
730
                py_stores = PyList_New(object->num_stores);
 
731
                if (py_stores == NULL) {
 
732
                        return NULL;
 
733
                }
 
734
                {
 
735
                        int stores_cntr_1;
 
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);
 
740
                        }
 
741
                }
 
742
        }
 
743
        return py_stores;
 
744
}
 
745
 
 
746
static int py_dfs_Info4_set_stores(PyObject *py_obj, PyObject *value, void *closure)
 
747
{
 
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;
 
752
        } else {
 
753
                object->stores = NULL;
 
754
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
755
                {
 
756
                        int stores_cntr_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) {
 
763
                                        PyErr_NoMemory();
 
764
                                        return -1;
 
765
                                }
 
766
                                object->stores[stores_cntr_1] = *(struct dfs_StorageInfo *)py_talloc_get_ptr(PyList_GET_ITEM(value, stores_cntr_1));
 
767
                        }
 
768
                }
 
769
        }
 
770
        return 0;
 
771
}
 
772
 
 
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 },
 
781
        { NULL }
 
782
};
 
783
 
 
784
static PyObject *py_dfs_Info4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
785
{
 
786
        return py_talloc_new(struct dfs_Info4, type);
 
787
}
 
788
 
 
789
 
 
790
static PyTypeObject dfs_Info4_Type = {
 
791
        PyObject_HEAD_INIT(NULL) 0,
 
792
        .tp_name = "dfs.Info4",
 
793
        .tp_getset = py_dfs_Info4_getsetters,
 
794
        .tp_methods = NULL,
 
795
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
796
        .tp_basicsize = sizeof(py_talloc_Object),
 
797
        .tp_new = py_dfs_Info4_new,
 
798
};
 
799
 
 
800
 
 
801
static PyObject *py_dfs_Info5_get_path(PyObject *obj, void *closure)
 
802
{
 
803
        struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
 
804
        PyObject *py_path;
 
805
        if (object->path == NULL) {
 
806
                py_path = Py_None;
 
807
                Py_INCREF(py_path);
 
808
        } else {
 
809
                if (object->path == NULL) {
 
810
                        py_path = Py_None;
 
811
                        Py_INCREF(py_path);
 
812
                } else {
 
813
                        py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
 
814
                }
 
815
        }
 
816
        return py_path;
 
817
}
 
818
 
 
819
static int py_dfs_Info5_set_path(PyObject *py_obj, PyObject *value, void *closure)
 
820
{
 
821
        struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(py_obj);
 
822
        if (value == Py_None) {
 
823
                object->path = NULL;
 
824
        } else {
 
825
                object->path = NULL;
 
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);
 
830
                } else {
 
831
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
832
                        return -1;
 
833
                }
 
834
        }
 
835
        return 0;
 
836
}
 
837
 
 
838
static PyObject *py_dfs_Info5_get_comment(PyObject *obj, void *closure)
 
839
{
 
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);
 
845
        } else {
 
846
                if (object->comment == NULL) {
 
847
                        py_comment = Py_None;
 
848
                        Py_INCREF(py_comment);
 
849
                } else {
 
850
                        py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
 
851
                }
 
852
        }
 
853
        return py_comment;
 
854
}
 
855
 
 
856
static int py_dfs_Info5_set_comment(PyObject *py_obj, PyObject *value, void *closure)
 
857
{
 
858
        struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(py_obj);
 
859
        if (value == Py_None) {
 
860
                object->comment = NULL;
 
861
        } else {
 
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);
 
867
                } else {
 
868
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
869
                        return -1;
 
870
                }
 
871
        }
 
872
        return 0;
 
873
}
 
874
 
 
875
static PyObject *py_dfs_Info5_get_state(PyObject *obj, void *closure)
 
876
{
 
877
        struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
 
878
        PyObject *py_state;
 
879
        py_state = PyInt_FromLong(object->state);
 
880
        return py_state;
 
881
}
 
882
 
 
883
static int py_dfs_Info5_set_state(PyObject *py_obj, PyObject *value, void *closure)
 
884
{
 
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);
 
890
        } else {
 
891
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
892
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
893
                return -1;
 
894
        }
 
895
        return 0;
 
896
}
 
897
 
 
898
static PyObject *py_dfs_Info5_get_timeout(PyObject *obj, void *closure)
 
899
{
 
900
        struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
 
901
        PyObject *py_timeout;
 
902
        py_timeout = PyInt_FromLong(object->timeout);
 
903
        return py_timeout;
 
904
}
 
905
 
 
906
static int py_dfs_Info5_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
 
907
{
 
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);
 
911
        return 0;
 
912
}
 
913
 
 
914
static PyObject *py_dfs_Info5_get_guid(PyObject *obj, void *closure)
 
915
{
 
916
        struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
 
917
        PyObject *py_guid;
 
918
        py_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->guid);
 
919
        return py_guid;
 
920
}
 
921
 
 
922
static int py_dfs_Info5_set_guid(PyObject *py_obj, PyObject *value, void *closure)
 
923
{
 
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) {
 
927
                PyErr_NoMemory();
 
928
                return -1;
 
929
        }
 
930
        object->guid = *(struct GUID *)py_talloc_get_ptr(value);
 
931
        return 0;
 
932
}
 
933
 
 
934
static PyObject *py_dfs_Info5_get_flags(PyObject *obj, void *closure)
 
935
{
 
936
        struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
 
937
        PyObject *py_flags;
 
938
        py_flags = PyInt_FromLong(object->flags);
 
939
        return py_flags;
 
940
}
 
941
 
 
942
static int py_dfs_Info5_set_flags(PyObject *py_obj, PyObject *value, void *closure)
 
943
{
 
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);
 
949
        } else {
 
950
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
951
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
952
                return -1;
 
953
        }
 
954
        return 0;
 
955
}
 
956
 
 
957
static PyObject *py_dfs_Info5_get_pktsize(PyObject *obj, void *closure)
 
958
{
 
959
        struct dfs_Info5 *object = (struct dfs_Info5 *)py_talloc_get_ptr(obj);
 
960
        PyObject *py_pktsize;
 
961
        py_pktsize = PyInt_FromLong(object->pktsize);
 
962
        return py_pktsize;
 
963
}
 
964
 
 
965
static int py_dfs_Info5_set_pktsize(PyObject *py_obj, PyObject *value, void *closure)
 
966
{
 
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);
 
970
        return 0;
 
971
}
 
972
 
 
973
static PyObject *py_dfs_Info5_get_num_stores(PyObject *obj, void *closure)
 
974
{
 
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;
 
979
}
 
980
 
 
981
static int py_dfs_Info5_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
 
982
{
 
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);
 
986
        return 0;
 
987
}
 
988
 
 
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 },
 
998
        { NULL }
 
999
};
 
1000
 
 
1001
static PyObject *py_dfs_Info5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1002
{
 
1003
        return py_talloc_new(struct dfs_Info5, type);
 
1004
}
 
1005
 
 
1006
 
 
1007
static PyTypeObject dfs_Info5_Type = {
 
1008
        PyObject_HEAD_INIT(NULL) 0,
 
1009
        .tp_name = "dfs.Info5",
 
1010
        .tp_getset = py_dfs_Info5_getsetters,
 
1011
        .tp_methods = NULL,
 
1012
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1013
        .tp_basicsize = sizeof(py_talloc_Object),
 
1014
        .tp_new = py_dfs_Info5_new,
 
1015
};
 
1016
 
 
1017
 
 
1018
static PyObject *py_dfs_Target_Priority_get_target_priority_class(PyObject *obj, void *closure)
 
1019
{
 
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;
 
1024
}
 
1025
 
 
1026
static int py_dfs_Target_Priority_set_target_priority_class(PyObject *py_obj, PyObject *value, void *closure)
 
1027
{
 
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);
 
1033
        } else {
 
1034
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
1035
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
1036
                return -1;
 
1037
        }
 
1038
        return 0;
 
1039
}
 
1040
 
 
1041
static PyObject *py_dfs_Target_Priority_get_target_priority_rank(PyObject *obj, void *closure)
 
1042
{
 
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;
 
1047
}
 
1048
 
 
1049
static int py_dfs_Target_Priority_set_target_priority_rank(PyObject *py_obj, PyObject *value, void *closure)
 
1050
{
 
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);
 
1054
        return 0;
 
1055
}
 
1056
 
 
1057
static PyObject *py_dfs_Target_Priority_get_reserved(PyObject *obj, void *closure)
 
1058
{
 
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);
 
1062
        return py_reserved;
 
1063
}
 
1064
 
 
1065
static int py_dfs_Target_Priority_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
 
1066
{
 
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);
 
1070
        return 0;
 
1071
}
 
1072
 
 
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 },
 
1077
        { NULL }
 
1078
};
 
1079
 
 
1080
static PyObject *py_dfs_Target_Priority_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1081
{
 
1082
        return py_talloc_new(struct dfs_Target_Priority, type);
 
1083
}
 
1084
 
 
1085
 
 
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,
 
1090
        .tp_methods = NULL,
 
1091
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1092
        .tp_basicsize = sizeof(py_talloc_Object),
 
1093
        .tp_new = py_dfs_Target_Priority_new,
 
1094
};
 
1095
 
 
1096
 
 
1097
static PyObject *py_dfs_StorageInfo2_get_info(PyObject *obj, void *closure)
 
1098
{
 
1099
        struct dfs_StorageInfo2 *object = (struct dfs_StorageInfo2 *)py_talloc_get_ptr(obj);
 
1100
        PyObject *py_info;
 
1101
        py_info = py_talloc_reference_ex(&dfs_StorageInfo_Type, py_talloc_get_mem_ctx(obj), &object->info);
 
1102
        return py_info;
 
1103
}
 
1104
 
 
1105
static int py_dfs_StorageInfo2_set_info(PyObject *py_obj, PyObject *value, void *closure)
 
1106
{
 
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) {
 
1110
                PyErr_NoMemory();
 
1111
                return -1;
 
1112
        }
 
1113
        object->info = *(struct dfs_StorageInfo *)py_talloc_get_ptr(value);
 
1114
        return 0;
 
1115
}
 
1116
 
 
1117
static PyObject *py_dfs_StorageInfo2_get_target_priority(PyObject *obj, void *closure)
 
1118
{
 
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;
 
1123
}
 
1124
 
 
1125
static int py_dfs_StorageInfo2_set_target_priority(PyObject *py_obj, PyObject *value, void *closure)
 
1126
{
 
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) {
 
1130
                PyErr_NoMemory();
 
1131
                return -1;
 
1132
        }
 
1133
        object->target_priority = *(struct dfs_Target_Priority *)py_talloc_get_ptr(value);
 
1134
        return 0;
 
1135
}
 
1136
 
 
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 },
 
1140
        { NULL }
 
1141
};
 
1142
 
 
1143
static PyObject *py_dfs_StorageInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1144
{
 
1145
        return py_talloc_new(struct dfs_StorageInfo2, type);
 
1146
}
 
1147
 
 
1148
 
 
1149
static PyTypeObject dfs_StorageInfo2_Type = {
 
1150
        PyObject_HEAD_INIT(NULL) 0,
 
1151
        .tp_name = "dfs.StorageInfo2",
 
1152
        .tp_getset = py_dfs_StorageInfo2_getsetters,
 
1153
        .tp_methods = NULL,
 
1154
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1155
        .tp_basicsize = sizeof(py_talloc_Object),
 
1156
        .tp_new = py_dfs_StorageInfo2_new,
 
1157
};
 
1158
 
 
1159
 
 
1160
static PyObject *py_dfs_Info6_get_entry_path(PyObject *obj, void *closure)
 
1161
{
 
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);
 
1167
        } else {
 
1168
                if (object->entry_path == NULL) {
 
1169
                        py_entry_path = Py_None;
 
1170
                        Py_INCREF(py_entry_path);
 
1171
                } else {
 
1172
                        py_entry_path = PyUnicode_Decode(object->entry_path, strlen(object->entry_path), "utf-8", "ignore");
 
1173
                }
 
1174
        }
 
1175
        return py_entry_path;
 
1176
}
 
1177
 
 
1178
static int py_dfs_Info6_set_entry_path(PyObject *py_obj, PyObject *value, void *closure)
 
1179
{
 
1180
        struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
 
1181
        if (value == Py_None) {
 
1182
                object->entry_path = NULL;
 
1183
        } else {
 
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);
 
1189
                } else {
 
1190
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
1191
                        return -1;
 
1192
                }
 
1193
        }
 
1194
        return 0;
 
1195
}
 
1196
 
 
1197
static PyObject *py_dfs_Info6_get_comment(PyObject *obj, void *closure)
 
1198
{
 
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);
 
1204
        } else {
 
1205
                if (object->comment == NULL) {
 
1206
                        py_comment = Py_None;
 
1207
                        Py_INCREF(py_comment);
 
1208
                } else {
 
1209
                        py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
 
1210
                }
 
1211
        }
 
1212
        return py_comment;
 
1213
}
 
1214
 
 
1215
static int py_dfs_Info6_set_comment(PyObject *py_obj, PyObject *value, void *closure)
 
1216
{
 
1217
        struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(py_obj);
 
1218
        if (value == Py_None) {
 
1219
                object->comment = NULL;
 
1220
        } else {
 
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);
 
1226
                } else {
 
1227
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
1228
                        return -1;
 
1229
                }
 
1230
        }
 
1231
        return 0;
 
1232
}
 
1233
 
 
1234
static PyObject *py_dfs_Info6_get_state(PyObject *obj, void *closure)
 
1235
{
 
1236
        struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
 
1237
        PyObject *py_state;
 
1238
        py_state = PyInt_FromLong(object->state);
 
1239
        return py_state;
 
1240
}
 
1241
 
 
1242
static int py_dfs_Info6_set_state(PyObject *py_obj, PyObject *value, void *closure)
 
1243
{
 
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);
 
1249
        } else {
 
1250
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
1251
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
1252
                return -1;
 
1253
        }
 
1254
        return 0;
 
1255
}
 
1256
 
 
1257
static PyObject *py_dfs_Info6_get_timeout(PyObject *obj, void *closure)
 
1258
{
 
1259
        struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
 
1260
        PyObject *py_timeout;
 
1261
        py_timeout = PyInt_FromLong(object->timeout);
 
1262
        return py_timeout;
 
1263
}
 
1264
 
 
1265
static int py_dfs_Info6_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
 
1266
{
 
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);
 
1270
        return 0;
 
1271
}
 
1272
 
 
1273
static PyObject *py_dfs_Info6_get_guid(PyObject *obj, void *closure)
 
1274
{
 
1275
        struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
 
1276
        PyObject *py_guid;
 
1277
        py_guid = py_talloc_reference_ex(GUID_Type, py_talloc_get_mem_ctx(obj), &object->guid);
 
1278
        return py_guid;
 
1279
}
 
1280
 
 
1281
static int py_dfs_Info6_set_guid(PyObject *py_obj, PyObject *value, void *closure)
 
1282
{
 
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) {
 
1286
                PyErr_NoMemory();
 
1287
                return -1;
 
1288
        }
 
1289
        object->guid = *(struct GUID *)py_talloc_get_ptr(value);
 
1290
        return 0;
 
1291
}
 
1292
 
 
1293
static PyObject *py_dfs_Info6_get_flags(PyObject *obj, void *closure)
 
1294
{
 
1295
        struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
 
1296
        PyObject *py_flags;
 
1297
        py_flags = PyInt_FromLong(object->flags);
 
1298
        return py_flags;
 
1299
}
 
1300
 
 
1301
static int py_dfs_Info6_set_flags(PyObject *py_obj, PyObject *value, void *closure)
 
1302
{
 
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);
 
1308
        } else {
 
1309
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
1310
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
1311
                return -1;
 
1312
        }
 
1313
        return 0;
 
1314
}
 
1315
 
 
1316
static PyObject *py_dfs_Info6_get_pktsize(PyObject *obj, void *closure)
 
1317
{
 
1318
        struct dfs_Info6 *object = (struct dfs_Info6 *)py_talloc_get_ptr(obj);
 
1319
        PyObject *py_pktsize;
 
1320
        py_pktsize = PyInt_FromLong(object->pktsize);
 
1321
        return py_pktsize;
 
1322
}
 
1323
 
 
1324
static int py_dfs_Info6_set_pktsize(PyObject *py_obj, PyObject *value, void *closure)
 
1325
{
 
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);
 
1329
        return 0;
 
1330
}
 
1331
 
 
1332
static PyObject *py_dfs_Info6_get_num_stores(PyObject *obj, void *closure)
 
1333
{
 
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;
 
1338
}
 
1339
 
 
1340
static int py_dfs_Info6_set_num_stores(PyObject *py_obj, PyObject *value, void *closure)
 
1341
{
 
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);
 
1345
        return 0;
 
1346
}
 
1347
 
 
1348
static PyObject *py_dfs_Info6_get_stores(PyObject *obj, void *closure)
 
1349
{
 
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);
 
1355
        } else {
 
1356
                py_stores = PyList_New(object->num_stores);
 
1357
                if (py_stores == NULL) {
 
1358
                        return NULL;
 
1359
                }
 
1360
                {
 
1361
                        int stores_cntr_1;
 
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);
 
1366
                        }
 
1367
                }
 
1368
        }
 
1369
        return py_stores;
 
1370
}
 
1371
 
 
1372
static int py_dfs_Info6_set_stores(PyObject *py_obj, PyObject *value, void *closure)
 
1373
{
 
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;
 
1378
        } else {
 
1379
                object->stores = NULL;
 
1380
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
1381
                {
 
1382
                        int stores_cntr_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) {
 
1389
                                        PyErr_NoMemory();
 
1390
                                        return -1;
 
1391
                                }
 
1392
                                object->stores[stores_cntr_1] = *(struct dfs_StorageInfo2 *)py_talloc_get_ptr(PyList_GET_ITEM(value, stores_cntr_1));
 
1393
                        }
 
1394
                }
 
1395
        }
 
1396
        return 0;
 
1397
}
 
1398
 
 
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 },
 
1409
        { NULL }
 
1410
};
 
1411
 
 
1412
static PyObject *py_dfs_Info6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1413
{
 
1414
        return py_talloc_new(struct dfs_Info6, type);
 
1415
}
 
1416
 
 
1417
 
 
1418
static PyTypeObject dfs_Info6_Type = {
 
1419
        PyObject_HEAD_INIT(NULL) 0,
 
1420
        .tp_name = "dfs.Info6",
 
1421
        .tp_getset = py_dfs_Info6_getsetters,
 
1422
        .tp_methods = NULL,
 
1423
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1424
        .tp_basicsize = sizeof(py_talloc_Object),
 
1425
        .tp_new = py_dfs_Info6_new,
 
1426
};
 
1427
 
 
1428
 
 
1429
static PyObject *py_dfs_Info7_get_generation_guid(PyObject *obj, void *closure)
 
1430
{
 
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;
 
1435
}
 
1436
 
 
1437
static int py_dfs_Info7_set_generation_guid(PyObject *py_obj, PyObject *value, void *closure)
 
1438
{
 
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) {
 
1442
                PyErr_NoMemory();
 
1443
                return -1;
 
1444
        }
 
1445
        object->generation_guid = *(struct GUID *)py_talloc_get_ptr(value);
 
1446
        return 0;
 
1447
}
 
1448
 
 
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 },
 
1451
        { NULL }
 
1452
};
 
1453
 
 
1454
static PyObject *py_dfs_Info7_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1455
{
 
1456
        return py_talloc_new(struct dfs_Info7, type);
 
1457
}
 
1458
 
 
1459
 
 
1460
static PyTypeObject dfs_Info7_Type = {
 
1461
        PyObject_HEAD_INIT(NULL) 0,
 
1462
        .tp_name = "dfs.Info7",
 
1463
        .tp_getset = py_dfs_Info7_getsetters,
 
1464
        .tp_methods = NULL,
 
1465
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1466
        .tp_basicsize = sizeof(py_talloc_Object),
 
1467
        .tp_new = py_dfs_Info7_new,
 
1468
};
 
1469
 
 
1470
 
 
1471
static PyObject *py_dfs_Info100_get_comment(PyObject *obj, void *closure)
 
1472
{
 
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);
 
1478
        } else {
 
1479
                if (object->comment == NULL) {
 
1480
                        py_comment = Py_None;
 
1481
                        Py_INCREF(py_comment);
 
1482
                } else {
 
1483
                        py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
 
1484
                }
 
1485
        }
 
1486
        return py_comment;
 
1487
}
 
1488
 
 
1489
static int py_dfs_Info100_set_comment(PyObject *py_obj, PyObject *value, void *closure)
 
1490
{
 
1491
        struct dfs_Info100 *object = (struct dfs_Info100 *)py_talloc_get_ptr(py_obj);
 
1492
        if (value == Py_None) {
 
1493
                object->comment = NULL;
 
1494
        } else {
 
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);
 
1500
                } else {
 
1501
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
1502
                        return -1;
 
1503
                }
 
1504
        }
 
1505
        return 0;
 
1506
}
 
1507
 
 
1508
static PyGetSetDef py_dfs_Info100_getsetters[] = {
 
1509
        { discard_const_p(char, "comment"), py_dfs_Info100_get_comment, py_dfs_Info100_set_comment },
 
1510
        { NULL }
 
1511
};
 
1512
 
 
1513
static PyObject *py_dfs_Info100_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1514
{
 
1515
        return py_talloc_new(struct dfs_Info100, type);
 
1516
}
 
1517
 
 
1518
 
 
1519
static PyTypeObject dfs_Info100_Type = {
 
1520
        PyObject_HEAD_INIT(NULL) 0,
 
1521
        .tp_name = "dfs.Info100",
 
1522
        .tp_getset = py_dfs_Info100_getsetters,
 
1523
        .tp_methods = NULL,
 
1524
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1525
        .tp_basicsize = sizeof(py_talloc_Object),
 
1526
        .tp_new = py_dfs_Info100_new,
 
1527
};
 
1528
 
 
1529
 
 
1530
static PyObject *py_dfs_Info101_get_state(PyObject *obj, void *closure)
 
1531
{
 
1532
        struct dfs_Info101 *object = (struct dfs_Info101 *)py_talloc_get_ptr(obj);
 
1533
        PyObject *py_state;
 
1534
        py_state = PyInt_FromLong(object->state);
 
1535
        return py_state;
 
1536
}
 
1537
 
 
1538
static int py_dfs_Info101_set_state(PyObject *py_obj, PyObject *value, void *closure)
 
1539
{
 
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);
 
1545
        } else {
 
1546
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
1547
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
1548
                return -1;
 
1549
        }
 
1550
        return 0;
 
1551
}
 
1552
 
 
1553
static PyGetSetDef py_dfs_Info101_getsetters[] = {
 
1554
        { discard_const_p(char, "state"), py_dfs_Info101_get_state, py_dfs_Info101_set_state },
 
1555
        { NULL }
 
1556
};
 
1557
 
 
1558
static PyObject *py_dfs_Info101_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1559
{
 
1560
        return py_talloc_new(struct dfs_Info101, type);
 
1561
}
 
1562
 
 
1563
 
 
1564
static PyTypeObject dfs_Info101_Type = {
 
1565
        PyObject_HEAD_INIT(NULL) 0,
 
1566
        .tp_name = "dfs.Info101",
 
1567
        .tp_getset = py_dfs_Info101_getsetters,
 
1568
        .tp_methods = NULL,
 
1569
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1570
        .tp_basicsize = sizeof(py_talloc_Object),
 
1571
        .tp_new = py_dfs_Info101_new,
 
1572
};
 
1573
 
 
1574
 
 
1575
static PyObject *py_dfs_Info102_get_timeout(PyObject *obj, void *closure)
 
1576
{
 
1577
        struct dfs_Info102 *object = (struct dfs_Info102 *)py_talloc_get_ptr(obj);
 
1578
        PyObject *py_timeout;
 
1579
        py_timeout = PyInt_FromLong(object->timeout);
 
1580
        return py_timeout;
 
1581
}
 
1582
 
 
1583
static int py_dfs_Info102_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
 
1584
{
 
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);
 
1588
        return 0;
 
1589
}
 
1590
 
 
1591
static PyGetSetDef py_dfs_Info102_getsetters[] = {
 
1592
        { discard_const_p(char, "timeout"), py_dfs_Info102_get_timeout, py_dfs_Info102_set_timeout },
 
1593
        { NULL }
 
1594
};
 
1595
 
 
1596
static PyObject *py_dfs_Info102_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1597
{
 
1598
        return py_talloc_new(struct dfs_Info102, type);
 
1599
}
 
1600
 
 
1601
 
 
1602
static PyTypeObject dfs_Info102_Type = {
 
1603
        PyObject_HEAD_INIT(NULL) 0,
 
1604
        .tp_name = "dfs.Info102",
 
1605
        .tp_getset = py_dfs_Info102_getsetters,
 
1606
        .tp_methods = NULL,
 
1607
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1608
        .tp_basicsize = sizeof(py_talloc_Object),
 
1609
        .tp_new = py_dfs_Info102_new,
 
1610
};
 
1611
 
 
1612
 
 
1613
static PyObject *py_dfs_Info103_get_flags(PyObject *obj, void *closure)
 
1614
{
 
1615
        struct dfs_Info103 *object = (struct dfs_Info103 *)py_talloc_get_ptr(obj);
 
1616
        PyObject *py_flags;
 
1617
        py_flags = PyInt_FromLong(object->flags);
 
1618
        return py_flags;
 
1619
}
 
1620
 
 
1621
static int py_dfs_Info103_set_flags(PyObject *py_obj, PyObject *value, void *closure)
 
1622
{
 
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);
 
1628
        } else {
 
1629
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
1630
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
1631
                return -1;
 
1632
        }
 
1633
        return 0;
 
1634
}
 
1635
 
 
1636
static PyGetSetDef py_dfs_Info103_getsetters[] = {
 
1637
        { discard_const_p(char, "flags"), py_dfs_Info103_get_flags, py_dfs_Info103_set_flags },
 
1638
        { NULL }
 
1639
};
 
1640
 
 
1641
static PyObject *py_dfs_Info103_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1642
{
 
1643
        return py_talloc_new(struct dfs_Info103, type);
 
1644
}
 
1645
 
 
1646
 
 
1647
static PyTypeObject dfs_Info103_Type = {
 
1648
        PyObject_HEAD_INIT(NULL) 0,
 
1649
        .tp_name = "dfs.Info103",
 
1650
        .tp_getset = py_dfs_Info103_getsetters,
 
1651
        .tp_methods = NULL,
 
1652
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1653
        .tp_basicsize = sizeof(py_talloc_Object),
 
1654
        .tp_new = py_dfs_Info103_new,
 
1655
};
 
1656
 
 
1657
 
 
1658
static PyObject *py_dfs_Info104_get_priority(PyObject *obj, void *closure)
 
1659
{
 
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);
 
1663
        return py_priority;
 
1664
}
 
1665
 
 
1666
static int py_dfs_Info104_set_priority(PyObject *py_obj, PyObject *value, void *closure)
 
1667
{
 
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) {
 
1671
                PyErr_NoMemory();
 
1672
                return -1;
 
1673
        }
 
1674
        object->priority = *(struct dfs_Target_Priority *)py_talloc_get_ptr(value);
 
1675
        return 0;
 
1676
}
 
1677
 
 
1678
static PyGetSetDef py_dfs_Info104_getsetters[] = {
 
1679
        { discard_const_p(char, "priority"), py_dfs_Info104_get_priority, py_dfs_Info104_set_priority },
 
1680
        { NULL }
 
1681
};
 
1682
 
 
1683
static PyObject *py_dfs_Info104_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1684
{
 
1685
        return py_talloc_new(struct dfs_Info104, type);
 
1686
}
 
1687
 
 
1688
 
 
1689
static PyTypeObject dfs_Info104_Type = {
 
1690
        PyObject_HEAD_INIT(NULL) 0,
 
1691
        .tp_name = "dfs.Info104",
 
1692
        .tp_getset = py_dfs_Info104_getsetters,
 
1693
        .tp_methods = NULL,
 
1694
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1695
        .tp_basicsize = sizeof(py_talloc_Object),
 
1696
        .tp_new = py_dfs_Info104_new,
 
1697
};
 
1698
 
 
1699
 
 
1700
static PyObject *py_dfs_Info105_get_comment(PyObject *obj, void *closure)
 
1701
{
 
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);
 
1707
        } else {
 
1708
                if (object->comment == NULL) {
 
1709
                        py_comment = Py_None;
 
1710
                        Py_INCREF(py_comment);
 
1711
                } else {
 
1712
                        py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
 
1713
                }
 
1714
        }
 
1715
        return py_comment;
 
1716
}
 
1717
 
 
1718
static int py_dfs_Info105_set_comment(PyObject *py_obj, PyObject *value, void *closure)
 
1719
{
 
1720
        struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(py_obj);
 
1721
        if (value == Py_None) {
 
1722
                object->comment = NULL;
 
1723
        } else {
 
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);
 
1729
                } else {
 
1730
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
1731
                        return -1;
 
1732
                }
 
1733
        }
 
1734
        return 0;
 
1735
}
 
1736
 
 
1737
static PyObject *py_dfs_Info105_get_state(PyObject *obj, void *closure)
 
1738
{
 
1739
        struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(obj);
 
1740
        PyObject *py_state;
 
1741
        py_state = PyInt_FromLong(object->state);
 
1742
        return py_state;
 
1743
}
 
1744
 
 
1745
static int py_dfs_Info105_set_state(PyObject *py_obj, PyObject *value, void *closure)
 
1746
{
 
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);
 
1752
        } else {
 
1753
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
1754
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
1755
                return -1;
 
1756
        }
 
1757
        return 0;
 
1758
}
 
1759
 
 
1760
static PyObject *py_dfs_Info105_get_timeout(PyObject *obj, void *closure)
 
1761
{
 
1762
        struct dfs_Info105 *object = (struct dfs_Info105 *)py_talloc_get_ptr(obj);
 
1763
        PyObject *py_timeout;
 
1764
        py_timeout = PyInt_FromLong(object->timeout);
 
1765
        return py_timeout;
 
1766
}
 
1767
 
 
1768
static int py_dfs_Info105_set_timeout(PyObject *py_obj, PyObject *value, void *closure)
 
1769
{
 
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);
 
1773
        return 0;
 
1774
}
 
1775
 
 
1776
static PyObject *py_dfs_Info105_get_property_flag_mask(PyObject *obj, void *closure)
 
1777
{
 
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;
 
1782
}
 
1783
 
 
1784
static int py_dfs_Info105_set_property_flag_mask(PyObject *py_obj, PyObject *value, void *closure)
 
1785
{
 
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);
 
1789
        return 0;
 
1790
}
 
1791
 
 
1792
static PyObject *py_dfs_Info105_get_property_flags(PyObject *obj, void *closure)
 
1793
{
 
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;
 
1798
}
 
1799
 
 
1800
static int py_dfs_Info105_set_property_flags(PyObject *py_obj, PyObject *value, void *closure)
 
1801
{
 
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);
 
1805
        return 0;
 
1806
}
 
1807
 
 
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 },
 
1814
        { NULL }
 
1815
};
 
1816
 
 
1817
static PyObject *py_dfs_Info105_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1818
{
 
1819
        return py_talloc_new(struct dfs_Info105, type);
 
1820
}
 
1821
 
 
1822
 
 
1823
static PyTypeObject dfs_Info105_Type = {
 
1824
        PyObject_HEAD_INIT(NULL) 0,
 
1825
        .tp_name = "dfs.Info105",
 
1826
        .tp_getset = py_dfs_Info105_getsetters,
 
1827
        .tp_methods = NULL,
 
1828
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1829
        .tp_basicsize = sizeof(py_talloc_Object),
 
1830
        .tp_new = py_dfs_Info105_new,
 
1831
};
 
1832
 
 
1833
 
 
1834
static PyObject *py_dfs_Info106_get_state(PyObject *obj, void *closure)
 
1835
{
 
1836
        struct dfs_Info106 *object = (struct dfs_Info106 *)py_talloc_get_ptr(obj);
 
1837
        PyObject *py_state;
 
1838
        py_state = PyInt_FromLong(object->state);
 
1839
        return py_state;
 
1840
}
 
1841
 
 
1842
static int py_dfs_Info106_set_state(PyObject *py_obj, PyObject *value, void *closure)
 
1843
{
 
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);
 
1849
        } else {
 
1850
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
1851
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
1852
                return -1;
 
1853
        }
 
1854
        return 0;
 
1855
}
 
1856
 
 
1857
static PyObject *py_dfs_Info106_get_priority(PyObject *obj, void *closure)
 
1858
{
 
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);
 
1862
        return py_priority;
 
1863
}
 
1864
 
 
1865
static int py_dfs_Info106_set_priority(PyObject *py_obj, PyObject *value, void *closure)
 
1866
{
 
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) {
 
1870
                PyErr_NoMemory();
 
1871
                return -1;
 
1872
        }
 
1873
        object->priority = *(struct dfs_Target_Priority *)py_talloc_get_ptr(value);
 
1874
        return 0;
 
1875
}
 
1876
 
 
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 },
 
1880
        { NULL }
 
1881
};
 
1882
 
 
1883
static PyObject *py_dfs_Info106_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1884
{
 
1885
        return py_talloc_new(struct dfs_Info106, type);
 
1886
}
 
1887
 
 
1888
 
 
1889
static PyTypeObject dfs_Info106_Type = {
 
1890
        PyObject_HEAD_INIT(NULL) 0,
 
1891
        .tp_name = "dfs.Info106",
 
1892
        .tp_getset = py_dfs_Info106_getsetters,
 
1893
        .tp_methods = NULL,
 
1894
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1895
        .tp_basicsize = sizeof(py_talloc_Object),
 
1896
        .tp_new = py_dfs_Info106_new,
 
1897
};
 
1898
 
 
1899
 
 
1900
static PyObject *py_dfs_Info200_get_dom_root(PyObject *obj, void *closure)
 
1901
{
 
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);
 
1907
        } else {
 
1908
                if (object->dom_root == NULL) {
 
1909
                        py_dom_root = Py_None;
 
1910
                        Py_INCREF(py_dom_root);
 
1911
                } else {
 
1912
                        py_dom_root = PyUnicode_Decode(object->dom_root, strlen(object->dom_root), "utf-8", "ignore");
 
1913
                }
 
1914
        }
 
1915
        return py_dom_root;
 
1916
}
 
1917
 
 
1918
static int py_dfs_Info200_set_dom_root(PyObject *py_obj, PyObject *value, void *closure)
 
1919
{
 
1920
        struct dfs_Info200 *object = (struct dfs_Info200 *)py_talloc_get_ptr(py_obj);
 
1921
        if (value == Py_None) {
 
1922
                object->dom_root = NULL;
 
1923
        } else {
 
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);
 
1929
                } else {
 
1930
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
1931
                        return -1;
 
1932
                }
 
1933
        }
 
1934
        return 0;
 
1935
}
 
1936
 
 
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 },
 
1939
        { NULL }
 
1940
};
 
1941
 
 
1942
static PyObject *py_dfs_Info200_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1943
{
 
1944
        return py_talloc_new(struct dfs_Info200, type);
 
1945
}
 
1946
 
 
1947
 
 
1948
static PyTypeObject dfs_Info200_Type = {
 
1949
        PyObject_HEAD_INIT(NULL) 0,
 
1950
        .tp_name = "dfs.Info200",
 
1951
        .tp_getset = py_dfs_Info200_getsetters,
 
1952
        .tp_methods = NULL,
 
1953
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1954
        .tp_basicsize = sizeof(py_talloc_Object),
 
1955
        .tp_new = py_dfs_Info200_new,
 
1956
};
 
1957
 
 
1958
 
 
1959
static PyObject *py_dfs_Info300_get_flavor(PyObject *obj, void *closure)
 
1960
{
 
1961
        struct dfs_Info300 *object = (struct dfs_Info300 *)py_talloc_get_ptr(obj);
 
1962
        PyObject *py_flavor;
 
1963
        py_flavor = PyInt_FromLong(object->flavor);
 
1964
        return py_flavor;
 
1965
}
 
1966
 
 
1967
static int py_dfs_Info300_set_flavor(PyObject *py_obj, PyObject *value, void *closure)
 
1968
{
 
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);
 
1974
        } else {
 
1975
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
1976
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
1977
                return -1;
 
1978
        }
 
1979
        return 0;
 
1980
}
 
1981
 
 
1982
static PyObject *py_dfs_Info300_get_dom_root(PyObject *obj, void *closure)
 
1983
{
 
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);
 
1989
        } else {
 
1990
                if (object->dom_root == NULL) {
 
1991
                        py_dom_root = Py_None;
 
1992
                        Py_INCREF(py_dom_root);
 
1993
                } else {
 
1994
                        py_dom_root = PyUnicode_Decode(object->dom_root, strlen(object->dom_root), "utf-8", "ignore");
 
1995
                }
 
1996
        }
 
1997
        return py_dom_root;
 
1998
}
 
1999
 
 
2000
static int py_dfs_Info300_set_dom_root(PyObject *py_obj, PyObject *value, void *closure)
 
2001
{
 
2002
        struct dfs_Info300 *object = (struct dfs_Info300 *)py_talloc_get_ptr(py_obj);
 
2003
        if (value == Py_None) {
 
2004
                object->dom_root = NULL;
 
2005
        } else {
 
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);
 
2011
                } else {
 
2012
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
2013
                        return -1;
 
2014
                }
 
2015
        }
 
2016
        return 0;
 
2017
}
 
2018
 
 
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 },
 
2022
        { NULL }
 
2023
};
 
2024
 
 
2025
static PyObject *py_dfs_Info300_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2026
{
 
2027
        return py_talloc_new(struct dfs_Info300, type);
 
2028
}
 
2029
 
 
2030
 
 
2031
static PyTypeObject dfs_Info300_Type = {
 
2032
        PyObject_HEAD_INIT(NULL) 0,
 
2033
        .tp_name = "dfs.Info300",
 
2034
        .tp_getset = py_dfs_Info300_getsetters,
 
2035
        .tp_methods = NULL,
 
2036
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2037
        .tp_basicsize = sizeof(py_talloc_Object),
 
2038
        .tp_new = py_dfs_Info300_new,
 
2039
};
 
2040
 
 
2041
PyObject *py_import_dfs_Info(TALLOC_CTX *mem_ctx, int level, union dfs_Info *in)
 
2042
{
 
2043
        PyObject *ret;
 
2044
 
 
2045
        switch (level) {
 
2046
                case 0:
 
2047
                        if (in->info0 == NULL) {
 
2048
                                ret = Py_None;
 
2049
                                Py_INCREF(ret);
 
2050
                        } else {
 
2051
                                ret = py_talloc_reference_ex(&dfs_Info0_Type, in->info0, in->info0);
 
2052
                        }
 
2053
                        return ret;
 
2054
 
 
2055
                case 1:
 
2056
                        if (in->info1 == NULL) {
 
2057
                                ret = Py_None;
 
2058
                                Py_INCREF(ret);
 
2059
                        } else {
 
2060
                                ret = py_talloc_reference_ex(&dfs_Info1_Type, in->info1, in->info1);
 
2061
                        }
 
2062
                        return ret;
 
2063
 
 
2064
                case 2:
 
2065
                        if (in->info2 == NULL) {
 
2066
                                ret = Py_None;
 
2067
                                Py_INCREF(ret);
 
2068
                        } else {
 
2069
                                ret = py_talloc_reference_ex(&dfs_Info2_Type, in->info2, in->info2);
 
2070
                        }
 
2071
                        return ret;
 
2072
 
 
2073
                case 3:
 
2074
                        if (in->info3 == NULL) {
 
2075
                                ret = Py_None;
 
2076
                                Py_INCREF(ret);
 
2077
                        } else {
 
2078
                                ret = py_talloc_reference_ex(&dfs_Info3_Type, in->info3, in->info3);
 
2079
                        }
 
2080
                        return ret;
 
2081
 
 
2082
                case 4:
 
2083
                        if (in->info4 == NULL) {
 
2084
                                ret = Py_None;
 
2085
                                Py_INCREF(ret);
 
2086
                        } else {
 
2087
                                ret = py_talloc_reference_ex(&dfs_Info4_Type, in->info4, in->info4);
 
2088
                        }
 
2089
                        return ret;
 
2090
 
 
2091
                case 5:
 
2092
                        if (in->info5 == NULL) {
 
2093
                                ret = Py_None;
 
2094
                                Py_INCREF(ret);
 
2095
                        } else {
 
2096
                                ret = py_talloc_reference_ex(&dfs_Info5_Type, in->info5, in->info5);
 
2097
                        }
 
2098
                        return ret;
 
2099
 
 
2100
                case 6:
 
2101
                        if (in->info6 == NULL) {
 
2102
                                ret = Py_None;
 
2103
                                Py_INCREF(ret);
 
2104
                        } else {
 
2105
                                ret = py_talloc_reference_ex(&dfs_Info6_Type, in->info6, in->info6);
 
2106
                        }
 
2107
                        return ret;
 
2108
 
 
2109
                case 7:
 
2110
                        if (in->info7 == NULL) {
 
2111
                                ret = Py_None;
 
2112
                                Py_INCREF(ret);
 
2113
                        } else {
 
2114
                                ret = py_talloc_reference_ex(&dfs_Info7_Type, in->info7, in->info7);
 
2115
                        }
 
2116
                        return ret;
 
2117
 
 
2118
                case 100:
 
2119
                        if (in->info100 == NULL) {
 
2120
                                ret = Py_None;
 
2121
                                Py_INCREF(ret);
 
2122
                        } else {
 
2123
                                ret = py_talloc_reference_ex(&dfs_Info100_Type, in->info100, in->info100);
 
2124
                        }
 
2125
                        return ret;
 
2126
 
 
2127
                case 101:
 
2128
                        if (in->info101 == NULL) {
 
2129
                                ret = Py_None;
 
2130
                                Py_INCREF(ret);
 
2131
                        } else {
 
2132
                                ret = py_talloc_reference_ex(&dfs_Info101_Type, in->info101, in->info101);
 
2133
                        }
 
2134
                        return ret;
 
2135
 
 
2136
                case 102:
 
2137
                        if (in->info102 == NULL) {
 
2138
                                ret = Py_None;
 
2139
                                Py_INCREF(ret);
 
2140
                        } else {
 
2141
                                ret = py_talloc_reference_ex(&dfs_Info102_Type, in->info102, in->info102);
 
2142
                        }
 
2143
                        return ret;
 
2144
 
 
2145
                case 103:
 
2146
                        if (in->info103 == NULL) {
 
2147
                                ret = Py_None;
 
2148
                                Py_INCREF(ret);
 
2149
                        } else {
 
2150
                                ret = py_talloc_reference_ex(&dfs_Info103_Type, in->info103, in->info103);
 
2151
                        }
 
2152
                        return ret;
 
2153
 
 
2154
                case 104:
 
2155
                        if (in->info104 == NULL) {
 
2156
                                ret = Py_None;
 
2157
                                Py_INCREF(ret);
 
2158
                        } else {
 
2159
                                ret = py_talloc_reference_ex(&dfs_Info104_Type, in->info104, in->info104);
 
2160
                        }
 
2161
                        return ret;
 
2162
 
 
2163
                case 105:
 
2164
                        if (in->info105 == NULL) {
 
2165
                                ret = Py_None;
 
2166
                                Py_INCREF(ret);
 
2167
                        } else {
 
2168
                                ret = py_talloc_reference_ex(&dfs_Info105_Type, in->info105, in->info105);
 
2169
                        }
 
2170
                        return ret;
 
2171
 
 
2172
                case 106:
 
2173
                        if (in->info106 == NULL) {
 
2174
                                ret = Py_None;
 
2175
                                Py_INCREF(ret);
 
2176
                        } else {
 
2177
                                ret = py_talloc_reference_ex(&dfs_Info106_Type, in->info106, in->info106);
 
2178
                        }
 
2179
                        return ret;
 
2180
 
 
2181
        }
 
2182
        PyErr_SetString(PyExc_TypeError, "unknown union level");
 
2183
        return NULL;
 
2184
}
 
2185
 
 
2186
union dfs_Info *py_export_dfs_Info(TALLOC_CTX *mem_ctx, int level, PyObject *in)
 
2187
{
 
2188
        union dfs_Info *ret = talloc_zero(mem_ctx, union dfs_Info);
 
2189
        switch (level) {
 
2190
                case 0:
 
2191
                        if (in == Py_None) {
 
2192
                                ret->info0 = NULL;
 
2193
                        } else {
 
2194
                                ret->info0 = NULL;
 
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) {
 
2197
                                        PyErr_NoMemory();
 
2198
                                        talloc_free(ret); return NULL;
 
2199
                                }
 
2200
                                ret->info0 = (struct dfs_Info0 *)py_talloc_get_ptr(in);
 
2201
                        }
 
2202
                        break;
 
2203
 
 
2204
                case 1:
 
2205
                        if (in == Py_None) {
 
2206
                                ret->info1 = NULL;
 
2207
                        } else {
 
2208
                                ret->info1 = NULL;
 
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) {
 
2211
                                        PyErr_NoMemory();
 
2212
                                        talloc_free(ret); return NULL;
 
2213
                                }
 
2214
                                ret->info1 = (struct dfs_Info1 *)py_talloc_get_ptr(in);
 
2215
                        }
 
2216
                        break;
 
2217
 
 
2218
                case 2:
 
2219
                        if (in == Py_None) {
 
2220
                                ret->info2 = NULL;
 
2221
                        } else {
 
2222
                                ret->info2 = NULL;
 
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) {
 
2225
                                        PyErr_NoMemory();
 
2226
                                        talloc_free(ret); return NULL;
 
2227
                                }
 
2228
                                ret->info2 = (struct dfs_Info2 *)py_talloc_get_ptr(in);
 
2229
                        }
 
2230
                        break;
 
2231
 
 
2232
                case 3:
 
2233
                        if (in == Py_None) {
 
2234
                                ret->info3 = NULL;
 
2235
                        } else {
 
2236
                                ret->info3 = NULL;
 
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) {
 
2239
                                        PyErr_NoMemory();
 
2240
                                        talloc_free(ret); return NULL;
 
2241
                                }
 
2242
                                ret->info3 = (struct dfs_Info3 *)py_talloc_get_ptr(in);
 
2243
                        }
 
2244
                        break;
 
2245
 
 
2246
                case 4:
 
2247
                        if (in == Py_None) {
 
2248
                                ret->info4 = NULL;
 
2249
                        } else {
 
2250
                                ret->info4 = NULL;
 
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) {
 
2253
                                        PyErr_NoMemory();
 
2254
                                        talloc_free(ret); return NULL;
 
2255
                                }
 
2256
                                ret->info4 = (struct dfs_Info4 *)py_talloc_get_ptr(in);
 
2257
                        }
 
2258
                        break;
 
2259
 
 
2260
                case 5:
 
2261
                        if (in == Py_None) {
 
2262
                                ret->info5 = NULL;
 
2263
                        } else {
 
2264
                                ret->info5 = NULL;
 
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) {
 
2267
                                        PyErr_NoMemory();
 
2268
                                        talloc_free(ret); return NULL;
 
2269
                                }
 
2270
                                ret->info5 = (struct dfs_Info5 *)py_talloc_get_ptr(in);
 
2271
                        }
 
2272
                        break;
 
2273
 
 
2274
                case 6:
 
2275
                        if (in == Py_None) {
 
2276
                                ret->info6 = NULL;
 
2277
                        } else {
 
2278
                                ret->info6 = NULL;
 
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) {
 
2281
                                        PyErr_NoMemory();
 
2282
                                        talloc_free(ret); return NULL;
 
2283
                                }
 
2284
                                ret->info6 = (struct dfs_Info6 *)py_talloc_get_ptr(in);
 
2285
                        }
 
2286
                        break;
 
2287
 
 
2288
                case 7:
 
2289
                        if (in == Py_None) {
 
2290
                                ret->info7 = NULL;
 
2291
                        } else {
 
2292
                                ret->info7 = NULL;
 
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) {
 
2295
                                        PyErr_NoMemory();
 
2296
                                        talloc_free(ret); return NULL;
 
2297
                                }
 
2298
                                ret->info7 = (struct dfs_Info7 *)py_talloc_get_ptr(in);
 
2299
                        }
 
2300
                        break;
 
2301
 
 
2302
                case 100:
 
2303
                        if (in == Py_None) {
 
2304
                                ret->info100 = NULL;
 
2305
                        } else {
 
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) {
 
2309
                                        PyErr_NoMemory();
 
2310
                                        talloc_free(ret); return NULL;
 
2311
                                }
 
2312
                                ret->info100 = (struct dfs_Info100 *)py_talloc_get_ptr(in);
 
2313
                        }
 
2314
                        break;
 
2315
 
 
2316
                case 101:
 
2317
                        if (in == Py_None) {
 
2318
                                ret->info101 = NULL;
 
2319
                        } else {
 
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) {
 
2323
                                        PyErr_NoMemory();
 
2324
                                        talloc_free(ret); return NULL;
 
2325
                                }
 
2326
                                ret->info101 = (struct dfs_Info101 *)py_talloc_get_ptr(in);
 
2327
                        }
 
2328
                        break;
 
2329
 
 
2330
                case 102:
 
2331
                        if (in == Py_None) {
 
2332
                                ret->info102 = NULL;
 
2333
                        } else {
 
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) {
 
2337
                                        PyErr_NoMemory();
 
2338
                                        talloc_free(ret); return NULL;
 
2339
                                }
 
2340
                                ret->info102 = (struct dfs_Info102 *)py_talloc_get_ptr(in);
 
2341
                        }
 
2342
                        break;
 
2343
 
 
2344
                case 103:
 
2345
                        if (in == Py_None) {
 
2346
                                ret->info103 = NULL;
 
2347
                        } else {
 
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) {
 
2351
                                        PyErr_NoMemory();
 
2352
                                        talloc_free(ret); return NULL;
 
2353
                                }
 
2354
                                ret->info103 = (struct dfs_Info103 *)py_talloc_get_ptr(in);
 
2355
                        }
 
2356
                        break;
 
2357
 
 
2358
                case 104:
 
2359
                        if (in == Py_None) {
 
2360
                                ret->info104 = NULL;
 
2361
                        } else {
 
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) {
 
2365
                                        PyErr_NoMemory();
 
2366
                                        talloc_free(ret); return NULL;
 
2367
                                }
 
2368
                                ret->info104 = (struct dfs_Info104 *)py_talloc_get_ptr(in);
 
2369
                        }
 
2370
                        break;
 
2371
 
 
2372
                case 105:
 
2373
                        if (in == Py_None) {
 
2374
                                ret->info105 = NULL;
 
2375
                        } else {
 
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) {
 
2379
                                        PyErr_NoMemory();
 
2380
                                        talloc_free(ret); return NULL;
 
2381
                                }
 
2382
                                ret->info105 = (struct dfs_Info105 *)py_talloc_get_ptr(in);
 
2383
                        }
 
2384
                        break;
 
2385
 
 
2386
                case 106:
 
2387
                        if (in == Py_None) {
 
2388
                                ret->info106 = NULL;
 
2389
                        } else {
 
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) {
 
2393
                                        PyErr_NoMemory();
 
2394
                                        talloc_free(ret); return NULL;
 
2395
                                }
 
2396
                                ret->info106 = (struct dfs_Info106 *)py_talloc_get_ptr(in);
 
2397
                        }
 
2398
                        break;
 
2399
 
 
2400
                default:
 
2401
                        PyErr_SetString(PyExc_TypeError, "invalid union level value");
 
2402
                        talloc_free(ret);
 
2403
                        ret = NULL;
 
2404
        }
 
2405
 
 
2406
        return ret;
 
2407
}
 
2408
 
 
2409
 
 
2410
static PyObject *py_dfs_EnumArray1_get_count(PyObject *obj, void *closure)
 
2411
{
 
2412
        struct dfs_EnumArray1 *object = (struct dfs_EnumArray1 *)py_talloc_get_ptr(obj);
 
2413
        PyObject *py_count;
 
2414
        py_count = PyInt_FromLong(object->count);
 
2415
        return py_count;
 
2416
}
 
2417
 
 
2418
static int py_dfs_EnumArray1_set_count(PyObject *py_obj, PyObject *value, void *closure)
 
2419
{
 
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);
 
2423
        return 0;
 
2424
}
 
2425
 
 
2426
static PyObject *py_dfs_EnumArray1_get_s(PyObject *obj, void *closure)
 
2427
{
 
2428
        struct dfs_EnumArray1 *object = (struct dfs_EnumArray1 *)py_talloc_get_ptr(obj);
 
2429
        PyObject *py_s;
 
2430
        if (object->s == NULL) {
 
2431
                py_s = Py_None;
 
2432
                Py_INCREF(py_s);
 
2433
        } else {
 
2434
                py_s = PyList_New(object->count);
 
2435
                if (py_s == NULL) {
 
2436
                        return NULL;
 
2437
                }
 
2438
                {
 
2439
                        int s_cntr_1;
 
2440
                        for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
 
2441
                                PyObject *py_s_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);
 
2444
                        }
 
2445
                }
 
2446
        }
 
2447
        return py_s;
 
2448
}
 
2449
 
 
2450
static int py_dfs_EnumArray1_set_s(PyObject *py_obj, PyObject *value, void *closure)
 
2451
{
 
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) {
 
2455
                object->s = NULL;
 
2456
        } else {
 
2457
                object->s = NULL;
 
2458
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
2459
                {
 
2460
                        int s_cntr_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) {
 
2467
                                        PyErr_NoMemory();
 
2468
                                        return -1;
 
2469
                                }
 
2470
                                object->s[s_cntr_1] = *(struct dfs_Info1 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
 
2471
                        }
 
2472
                }
 
2473
        }
 
2474
        return 0;
 
2475
}
 
2476
 
 
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 },
 
2480
        { NULL }
 
2481
};
 
2482
 
 
2483
static PyObject *py_dfs_EnumArray1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2484
{
 
2485
        return py_talloc_new(struct dfs_EnumArray1, type);
 
2486
}
 
2487
 
 
2488
 
 
2489
static PyTypeObject dfs_EnumArray1_Type = {
 
2490
        PyObject_HEAD_INIT(NULL) 0,
 
2491
        .tp_name = "dfs.EnumArray1",
 
2492
        .tp_getset = py_dfs_EnumArray1_getsetters,
 
2493
        .tp_methods = NULL,
 
2494
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2495
        .tp_basicsize = sizeof(py_talloc_Object),
 
2496
        .tp_new = py_dfs_EnumArray1_new,
 
2497
};
 
2498
 
 
2499
 
 
2500
static PyObject *py_dfs_EnumArray2_get_count(PyObject *obj, void *closure)
 
2501
{
 
2502
        struct dfs_EnumArray2 *object = (struct dfs_EnumArray2 *)py_talloc_get_ptr(obj);
 
2503
        PyObject *py_count;
 
2504
        py_count = PyInt_FromLong(object->count);
 
2505
        return py_count;
 
2506
}
 
2507
 
 
2508
static int py_dfs_EnumArray2_set_count(PyObject *py_obj, PyObject *value, void *closure)
 
2509
{
 
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);
 
2513
        return 0;
 
2514
}
 
2515
 
 
2516
static PyObject *py_dfs_EnumArray2_get_s(PyObject *obj, void *closure)
 
2517
{
 
2518
        struct dfs_EnumArray2 *object = (struct dfs_EnumArray2 *)py_talloc_get_ptr(obj);
 
2519
        PyObject *py_s;
 
2520
        if (object->s == NULL) {
 
2521
                py_s = Py_None;
 
2522
                Py_INCREF(py_s);
 
2523
        } else {
 
2524
                py_s = PyList_New(object->count);
 
2525
                if (py_s == NULL) {
 
2526
                        return NULL;
 
2527
                }
 
2528
                {
 
2529
                        int s_cntr_1;
 
2530
                        for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
 
2531
                                PyObject *py_s_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);
 
2534
                        }
 
2535
                }
 
2536
        }
 
2537
        return py_s;
 
2538
}
 
2539
 
 
2540
static int py_dfs_EnumArray2_set_s(PyObject *py_obj, PyObject *value, void *closure)
 
2541
{
 
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) {
 
2545
                object->s = NULL;
 
2546
        } else {
 
2547
                object->s = NULL;
 
2548
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
2549
                {
 
2550
                        int s_cntr_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) {
 
2557
                                        PyErr_NoMemory();
 
2558
                                        return -1;
 
2559
                                }
 
2560
                                object->s[s_cntr_1] = *(struct dfs_Info2 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
 
2561
                        }
 
2562
                }
 
2563
        }
 
2564
        return 0;
 
2565
}
 
2566
 
 
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 },
 
2570
        { NULL }
 
2571
};
 
2572
 
 
2573
static PyObject *py_dfs_EnumArray2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2574
{
 
2575
        return py_talloc_new(struct dfs_EnumArray2, type);
 
2576
}
 
2577
 
 
2578
 
 
2579
static PyTypeObject dfs_EnumArray2_Type = {
 
2580
        PyObject_HEAD_INIT(NULL) 0,
 
2581
        .tp_name = "dfs.EnumArray2",
 
2582
        .tp_getset = py_dfs_EnumArray2_getsetters,
 
2583
        .tp_methods = NULL,
 
2584
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2585
        .tp_basicsize = sizeof(py_talloc_Object),
 
2586
        .tp_new = py_dfs_EnumArray2_new,
 
2587
};
 
2588
 
 
2589
 
 
2590
static PyObject *py_dfs_EnumArray3_get_count(PyObject *obj, void *closure)
 
2591
{
 
2592
        struct dfs_EnumArray3 *object = (struct dfs_EnumArray3 *)py_talloc_get_ptr(obj);
 
2593
        PyObject *py_count;
 
2594
        py_count = PyInt_FromLong(object->count);
 
2595
        return py_count;
 
2596
}
 
2597
 
 
2598
static int py_dfs_EnumArray3_set_count(PyObject *py_obj, PyObject *value, void *closure)
 
2599
{
 
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);
 
2603
        return 0;
 
2604
}
 
2605
 
 
2606
static PyObject *py_dfs_EnumArray3_get_s(PyObject *obj, void *closure)
 
2607
{
 
2608
        struct dfs_EnumArray3 *object = (struct dfs_EnumArray3 *)py_talloc_get_ptr(obj);
 
2609
        PyObject *py_s;
 
2610
        if (object->s == NULL) {
 
2611
                py_s = Py_None;
 
2612
                Py_INCREF(py_s);
 
2613
        } else {
 
2614
                py_s = PyList_New(object->count);
 
2615
                if (py_s == NULL) {
 
2616
                        return NULL;
 
2617
                }
 
2618
                {
 
2619
                        int s_cntr_1;
 
2620
                        for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
 
2621
                                PyObject *py_s_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);
 
2624
                        }
 
2625
                }
 
2626
        }
 
2627
        return py_s;
 
2628
}
 
2629
 
 
2630
static int py_dfs_EnumArray3_set_s(PyObject *py_obj, PyObject *value, void *closure)
 
2631
{
 
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) {
 
2635
                object->s = NULL;
 
2636
        } else {
 
2637
                object->s = NULL;
 
2638
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
2639
                {
 
2640
                        int s_cntr_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) {
 
2647
                                        PyErr_NoMemory();
 
2648
                                        return -1;
 
2649
                                }
 
2650
                                object->s[s_cntr_1] = *(struct dfs_Info3 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
 
2651
                        }
 
2652
                }
 
2653
        }
 
2654
        return 0;
 
2655
}
 
2656
 
 
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 },
 
2660
        { NULL }
 
2661
};
 
2662
 
 
2663
static PyObject *py_dfs_EnumArray3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2664
{
 
2665
        return py_talloc_new(struct dfs_EnumArray3, type);
 
2666
}
 
2667
 
 
2668
 
 
2669
static PyTypeObject dfs_EnumArray3_Type = {
 
2670
        PyObject_HEAD_INIT(NULL) 0,
 
2671
        .tp_name = "dfs.EnumArray3",
 
2672
        .tp_getset = py_dfs_EnumArray3_getsetters,
 
2673
        .tp_methods = NULL,
 
2674
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2675
        .tp_basicsize = sizeof(py_talloc_Object),
 
2676
        .tp_new = py_dfs_EnumArray3_new,
 
2677
};
 
2678
 
 
2679
 
 
2680
static PyObject *py_dfs_EnumArray4_get_count(PyObject *obj, void *closure)
 
2681
{
 
2682
        struct dfs_EnumArray4 *object = (struct dfs_EnumArray4 *)py_talloc_get_ptr(obj);
 
2683
        PyObject *py_count;
 
2684
        py_count = PyInt_FromLong(object->count);
 
2685
        return py_count;
 
2686
}
 
2687
 
 
2688
static int py_dfs_EnumArray4_set_count(PyObject *py_obj, PyObject *value, void *closure)
 
2689
{
 
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);
 
2693
        return 0;
 
2694
}
 
2695
 
 
2696
static PyObject *py_dfs_EnumArray4_get_s(PyObject *obj, void *closure)
 
2697
{
 
2698
        struct dfs_EnumArray4 *object = (struct dfs_EnumArray4 *)py_talloc_get_ptr(obj);
 
2699
        PyObject *py_s;
 
2700
        if (object->s == NULL) {
 
2701
                py_s = Py_None;
 
2702
                Py_INCREF(py_s);
 
2703
        } else {
 
2704
                py_s = PyList_New(object->count);
 
2705
                if (py_s == NULL) {
 
2706
                        return NULL;
 
2707
                }
 
2708
                {
 
2709
                        int s_cntr_1;
 
2710
                        for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
 
2711
                                PyObject *py_s_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);
 
2714
                        }
 
2715
                }
 
2716
        }
 
2717
        return py_s;
 
2718
}
 
2719
 
 
2720
static int py_dfs_EnumArray4_set_s(PyObject *py_obj, PyObject *value, void *closure)
 
2721
{
 
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) {
 
2725
                object->s = NULL;
 
2726
        } else {
 
2727
                object->s = NULL;
 
2728
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
2729
                {
 
2730
                        int s_cntr_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) {
 
2737
                                        PyErr_NoMemory();
 
2738
                                        return -1;
 
2739
                                }
 
2740
                                object->s[s_cntr_1] = *(struct dfs_Info4 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
 
2741
                        }
 
2742
                }
 
2743
        }
 
2744
        return 0;
 
2745
}
 
2746
 
 
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 },
 
2750
        { NULL }
 
2751
};
 
2752
 
 
2753
static PyObject *py_dfs_EnumArray4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2754
{
 
2755
        return py_talloc_new(struct dfs_EnumArray4, type);
 
2756
}
 
2757
 
 
2758
 
 
2759
static PyTypeObject dfs_EnumArray4_Type = {
 
2760
        PyObject_HEAD_INIT(NULL) 0,
 
2761
        .tp_name = "dfs.EnumArray4",
 
2762
        .tp_getset = py_dfs_EnumArray4_getsetters,
 
2763
        .tp_methods = NULL,
 
2764
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2765
        .tp_basicsize = sizeof(py_talloc_Object),
 
2766
        .tp_new = py_dfs_EnumArray4_new,
 
2767
};
 
2768
 
 
2769
 
 
2770
static PyObject *py_dfs_EnumArray5_get_count(PyObject *obj, void *closure)
 
2771
{
 
2772
        struct dfs_EnumArray5 *object = (struct dfs_EnumArray5 *)py_talloc_get_ptr(obj);
 
2773
        PyObject *py_count;
 
2774
        py_count = PyInt_FromLong(object->count);
 
2775
        return py_count;
 
2776
}
 
2777
 
 
2778
static int py_dfs_EnumArray5_set_count(PyObject *py_obj, PyObject *value, void *closure)
 
2779
{
 
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);
 
2783
        return 0;
 
2784
}
 
2785
 
 
2786
static PyObject *py_dfs_EnumArray5_get_s(PyObject *obj, void *closure)
 
2787
{
 
2788
        struct dfs_EnumArray5 *object = (struct dfs_EnumArray5 *)py_talloc_get_ptr(obj);
 
2789
        PyObject *py_s;
 
2790
        if (object->s == NULL) {
 
2791
                py_s = Py_None;
 
2792
                Py_INCREF(py_s);
 
2793
        } else {
 
2794
                py_s = PyList_New(object->count);
 
2795
                if (py_s == NULL) {
 
2796
                        return NULL;
 
2797
                }
 
2798
                {
 
2799
                        int s_cntr_1;
 
2800
                        for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
 
2801
                                PyObject *py_s_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);
 
2804
                        }
 
2805
                }
 
2806
        }
 
2807
        return py_s;
 
2808
}
 
2809
 
 
2810
static int py_dfs_EnumArray5_set_s(PyObject *py_obj, PyObject *value, void *closure)
 
2811
{
 
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) {
 
2815
                object->s = NULL;
 
2816
        } else {
 
2817
                object->s = NULL;
 
2818
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
2819
                {
 
2820
                        int s_cntr_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) {
 
2827
                                        PyErr_NoMemory();
 
2828
                                        return -1;
 
2829
                                }
 
2830
                                object->s[s_cntr_1] = *(struct dfs_Info5 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
 
2831
                        }
 
2832
                }
 
2833
        }
 
2834
        return 0;
 
2835
}
 
2836
 
 
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 },
 
2840
        { NULL }
 
2841
};
 
2842
 
 
2843
static PyObject *py_dfs_EnumArray5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2844
{
 
2845
        return py_talloc_new(struct dfs_EnumArray5, type);
 
2846
}
 
2847
 
 
2848
 
 
2849
static PyTypeObject dfs_EnumArray5_Type = {
 
2850
        PyObject_HEAD_INIT(NULL) 0,
 
2851
        .tp_name = "dfs.EnumArray5",
 
2852
        .tp_getset = py_dfs_EnumArray5_getsetters,
 
2853
        .tp_methods = NULL,
 
2854
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2855
        .tp_basicsize = sizeof(py_talloc_Object),
 
2856
        .tp_new = py_dfs_EnumArray5_new,
 
2857
};
 
2858
 
 
2859
 
 
2860
static PyObject *py_dfs_EnumArray6_get_count(PyObject *obj, void *closure)
 
2861
{
 
2862
        struct dfs_EnumArray6 *object = (struct dfs_EnumArray6 *)py_talloc_get_ptr(obj);
 
2863
        PyObject *py_count;
 
2864
        py_count = PyInt_FromLong(object->count);
 
2865
        return py_count;
 
2866
}
 
2867
 
 
2868
static int py_dfs_EnumArray6_set_count(PyObject *py_obj, PyObject *value, void *closure)
 
2869
{
 
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);
 
2873
        return 0;
 
2874
}
 
2875
 
 
2876
static PyObject *py_dfs_EnumArray6_get_s(PyObject *obj, void *closure)
 
2877
{
 
2878
        struct dfs_EnumArray6 *object = (struct dfs_EnumArray6 *)py_talloc_get_ptr(obj);
 
2879
        PyObject *py_s;
 
2880
        if (object->s == NULL) {
 
2881
                py_s = Py_None;
 
2882
                Py_INCREF(py_s);
 
2883
        } else {
 
2884
                py_s = PyList_New(object->count);
 
2885
                if (py_s == NULL) {
 
2886
                        return NULL;
 
2887
                }
 
2888
                {
 
2889
                        int s_cntr_1;
 
2890
                        for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
 
2891
                                PyObject *py_s_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);
 
2894
                        }
 
2895
                }
 
2896
        }
 
2897
        return py_s;
 
2898
}
 
2899
 
 
2900
static int py_dfs_EnumArray6_set_s(PyObject *py_obj, PyObject *value, void *closure)
 
2901
{
 
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) {
 
2905
                object->s = NULL;
 
2906
        } else {
 
2907
                object->s = NULL;
 
2908
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
2909
                {
 
2910
                        int s_cntr_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) {
 
2917
                                        PyErr_NoMemory();
 
2918
                                        return -1;
 
2919
                                }
 
2920
                                object->s[s_cntr_1] = *(struct dfs_Info6 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
 
2921
                        }
 
2922
                }
 
2923
        }
 
2924
        return 0;
 
2925
}
 
2926
 
 
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 },
 
2930
        { NULL }
 
2931
};
 
2932
 
 
2933
static PyObject *py_dfs_EnumArray6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2934
{
 
2935
        return py_talloc_new(struct dfs_EnumArray6, type);
 
2936
}
 
2937
 
 
2938
 
 
2939
static PyTypeObject dfs_EnumArray6_Type = {
 
2940
        PyObject_HEAD_INIT(NULL) 0,
 
2941
        .tp_name = "dfs.EnumArray6",
 
2942
        .tp_getset = py_dfs_EnumArray6_getsetters,
 
2943
        .tp_methods = NULL,
 
2944
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2945
        .tp_basicsize = sizeof(py_talloc_Object),
 
2946
        .tp_new = py_dfs_EnumArray6_new,
 
2947
};
 
2948
 
 
2949
 
 
2950
static PyObject *py_dfs_EnumArray200_get_count(PyObject *obj, void *closure)
 
2951
{
 
2952
        struct dfs_EnumArray200 *object = (struct dfs_EnumArray200 *)py_talloc_get_ptr(obj);
 
2953
        PyObject *py_count;
 
2954
        py_count = PyInt_FromLong(object->count);
 
2955
        return py_count;
 
2956
}
 
2957
 
 
2958
static int py_dfs_EnumArray200_set_count(PyObject *py_obj, PyObject *value, void *closure)
 
2959
{
 
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);
 
2963
        return 0;
 
2964
}
 
2965
 
 
2966
static PyObject *py_dfs_EnumArray200_get_s(PyObject *obj, void *closure)
 
2967
{
 
2968
        struct dfs_EnumArray200 *object = (struct dfs_EnumArray200 *)py_talloc_get_ptr(obj);
 
2969
        PyObject *py_s;
 
2970
        if (object->s == NULL) {
 
2971
                py_s = Py_None;
 
2972
                Py_INCREF(py_s);
 
2973
        } else {
 
2974
                py_s = PyList_New(object->count);
 
2975
                if (py_s == NULL) {
 
2976
                        return NULL;
 
2977
                }
 
2978
                {
 
2979
                        int s_cntr_1;
 
2980
                        for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
 
2981
                                PyObject *py_s_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);
 
2984
                        }
 
2985
                }
 
2986
        }
 
2987
        return py_s;
 
2988
}
 
2989
 
 
2990
static int py_dfs_EnumArray200_set_s(PyObject *py_obj, PyObject *value, void *closure)
 
2991
{
 
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) {
 
2995
                object->s = NULL;
 
2996
        } else {
 
2997
                object->s = NULL;
 
2998
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
2999
                {
 
3000
                        int s_cntr_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) {
 
3007
                                        PyErr_NoMemory();
 
3008
                                        return -1;
 
3009
                                }
 
3010
                                object->s[s_cntr_1] = *(struct dfs_Info200 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
 
3011
                        }
 
3012
                }
 
3013
        }
 
3014
        return 0;
 
3015
}
 
3016
 
 
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 },
 
3020
        { NULL }
 
3021
};
 
3022
 
 
3023
static PyObject *py_dfs_EnumArray200_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3024
{
 
3025
        return py_talloc_new(struct dfs_EnumArray200, type);
 
3026
}
 
3027
 
 
3028
 
 
3029
static PyTypeObject dfs_EnumArray200_Type = {
 
3030
        PyObject_HEAD_INIT(NULL) 0,
 
3031
        .tp_name = "dfs.EnumArray200",
 
3032
        .tp_getset = py_dfs_EnumArray200_getsetters,
 
3033
        .tp_methods = NULL,
 
3034
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3035
        .tp_basicsize = sizeof(py_talloc_Object),
 
3036
        .tp_new = py_dfs_EnumArray200_new,
 
3037
};
 
3038
 
 
3039
 
 
3040
static PyObject *py_dfs_EnumArray300_get_count(PyObject *obj, void *closure)
 
3041
{
 
3042
        struct dfs_EnumArray300 *object = (struct dfs_EnumArray300 *)py_talloc_get_ptr(obj);
 
3043
        PyObject *py_count;
 
3044
        py_count = PyInt_FromLong(object->count);
 
3045
        return py_count;
 
3046
}
 
3047
 
 
3048
static int py_dfs_EnumArray300_set_count(PyObject *py_obj, PyObject *value, void *closure)
 
3049
{
 
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);
 
3053
        return 0;
 
3054
}
 
3055
 
 
3056
static PyObject *py_dfs_EnumArray300_get_s(PyObject *obj, void *closure)
 
3057
{
 
3058
        struct dfs_EnumArray300 *object = (struct dfs_EnumArray300 *)py_talloc_get_ptr(obj);
 
3059
        PyObject *py_s;
 
3060
        if (object->s == NULL) {
 
3061
                py_s = Py_None;
 
3062
                Py_INCREF(py_s);
 
3063
        } else {
 
3064
                py_s = PyList_New(object->count);
 
3065
                if (py_s == NULL) {
 
3066
                        return NULL;
 
3067
                }
 
3068
                {
 
3069
                        int s_cntr_1;
 
3070
                        for (s_cntr_1 = 0; s_cntr_1 < object->count; s_cntr_1++) {
 
3071
                                PyObject *py_s_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);
 
3074
                        }
 
3075
                }
 
3076
        }
 
3077
        return py_s;
 
3078
}
 
3079
 
 
3080
static int py_dfs_EnumArray300_set_s(PyObject *py_obj, PyObject *value, void *closure)
 
3081
{
 
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) {
 
3085
                object->s = NULL;
 
3086
        } else {
 
3087
                object->s = NULL;
 
3088
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
3089
                {
 
3090
                        int s_cntr_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) {
 
3097
                                        PyErr_NoMemory();
 
3098
                                        return -1;
 
3099
                                }
 
3100
                                object->s[s_cntr_1] = *(struct dfs_Info300 *)py_talloc_get_ptr(PyList_GET_ITEM(value, s_cntr_1));
 
3101
                        }
 
3102
                }
 
3103
        }
 
3104
        return 0;
 
3105
}
 
3106
 
 
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 },
 
3110
        { NULL }
 
3111
};
 
3112
 
 
3113
static PyObject *py_dfs_EnumArray300_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3114
{
 
3115
        return py_talloc_new(struct dfs_EnumArray300, type);
 
3116
}
 
3117
 
 
3118
 
 
3119
static PyTypeObject dfs_EnumArray300_Type = {
 
3120
        PyObject_HEAD_INIT(NULL) 0,
 
3121
        .tp_name = "dfs.EnumArray300",
 
3122
        .tp_getset = py_dfs_EnumArray300_getsetters,
 
3123
        .tp_methods = NULL,
 
3124
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3125
        .tp_basicsize = sizeof(py_talloc_Object),
 
3126
        .tp_new = py_dfs_EnumArray300_new,
 
3127
};
 
3128
 
 
3129
PyObject *py_import_dfs_EnumInfo(TALLOC_CTX *mem_ctx, int level, union dfs_EnumInfo *in)
 
3130
{
 
3131
        PyObject *ret;
 
3132
 
 
3133
        switch (level) {
 
3134
                case 1:
 
3135
                        if (in->info1 == NULL) {
 
3136
                                ret = Py_None;
 
3137
                                Py_INCREF(ret);
 
3138
                        } else {
 
3139
                                ret = py_talloc_reference_ex(&dfs_EnumArray1_Type, in->info1, in->info1);
 
3140
                        }
 
3141
                        return ret;
 
3142
 
 
3143
                case 2:
 
3144
                        if (in->info2 == NULL) {
 
3145
                                ret = Py_None;
 
3146
                                Py_INCREF(ret);
 
3147
                        } else {
 
3148
                                ret = py_talloc_reference_ex(&dfs_EnumArray2_Type, in->info2, in->info2);
 
3149
                        }
 
3150
                        return ret;
 
3151
 
 
3152
                case 3:
 
3153
                        if (in->info3 == NULL) {
 
3154
                                ret = Py_None;
 
3155
                                Py_INCREF(ret);
 
3156
                        } else {
 
3157
                                ret = py_talloc_reference_ex(&dfs_EnumArray3_Type, in->info3, in->info3);
 
3158
                        }
 
3159
                        return ret;
 
3160
 
 
3161
                case 4:
 
3162
                        if (in->info4 == NULL) {
 
3163
                                ret = Py_None;
 
3164
                                Py_INCREF(ret);
 
3165
                        } else {
 
3166
                                ret = py_talloc_reference_ex(&dfs_EnumArray4_Type, in->info4, in->info4);
 
3167
                        }
 
3168
                        return ret;
 
3169
 
 
3170
                case 5:
 
3171
                        if (in->info5 == NULL) {
 
3172
                                ret = Py_None;
 
3173
                                Py_INCREF(ret);
 
3174
                        } else {
 
3175
                                ret = py_talloc_reference_ex(&dfs_EnumArray5_Type, in->info5, in->info5);
 
3176
                        }
 
3177
                        return ret;
 
3178
 
 
3179
                case 6:
 
3180
                        if (in->info6 == NULL) {
 
3181
                                ret = Py_None;
 
3182
                                Py_INCREF(ret);
 
3183
                        } else {
 
3184
                                ret = py_talloc_reference_ex(&dfs_EnumArray6_Type, in->info6, in->info6);
 
3185
                        }
 
3186
                        return ret;
 
3187
 
 
3188
                case 200:
 
3189
                        if (in->info200 == NULL) {
 
3190
                                ret = Py_None;
 
3191
                                Py_INCREF(ret);
 
3192
                        } else {
 
3193
                                ret = py_talloc_reference_ex(&dfs_EnumArray200_Type, in->info200, in->info200);
 
3194
                        }
 
3195
                        return ret;
 
3196
 
 
3197
                case 300:
 
3198
                        if (in->info300 == NULL) {
 
3199
                                ret = Py_None;
 
3200
                                Py_INCREF(ret);
 
3201
                        } else {
 
3202
                                ret = py_talloc_reference_ex(&dfs_EnumArray300_Type, in->info300, in->info300);
 
3203
                        }
 
3204
                        return ret;
 
3205
 
 
3206
        }
 
3207
        PyErr_SetString(PyExc_TypeError, "unknown union level");
 
3208
        return NULL;
 
3209
}
 
3210
 
 
3211
union dfs_EnumInfo *py_export_dfs_EnumInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
 
3212
{
 
3213
        union dfs_EnumInfo *ret = talloc_zero(mem_ctx, union dfs_EnumInfo);
 
3214
        switch (level) {
 
3215
                case 1:
 
3216
                        if (in == Py_None) {
 
3217
                                ret->info1 = NULL;
 
3218
                        } else {
 
3219
                                ret->info1 = NULL;
 
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) {
 
3222
                                        PyErr_NoMemory();
 
3223
                                        talloc_free(ret); return NULL;
 
3224
                                }
 
3225
                                ret->info1 = (struct dfs_EnumArray1 *)py_talloc_get_ptr(in);
 
3226
                        }
 
3227
                        break;
 
3228
 
 
3229
                case 2:
 
3230
                        if (in == Py_None) {
 
3231
                                ret->info2 = NULL;
 
3232
                        } else {
 
3233
                                ret->info2 = NULL;
 
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) {
 
3236
                                        PyErr_NoMemory();
 
3237
                                        talloc_free(ret); return NULL;
 
3238
                                }
 
3239
                                ret->info2 = (struct dfs_EnumArray2 *)py_talloc_get_ptr(in);
 
3240
                        }
 
3241
                        break;
 
3242
 
 
3243
                case 3:
 
3244
                        if (in == Py_None) {
 
3245
                                ret->info3 = NULL;
 
3246
                        } else {
 
3247
                                ret->info3 = NULL;
 
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) {
 
3250
                                        PyErr_NoMemory();
 
3251
                                        talloc_free(ret); return NULL;
 
3252
                                }
 
3253
                                ret->info3 = (struct dfs_EnumArray3 *)py_talloc_get_ptr(in);
 
3254
                        }
 
3255
                        break;
 
3256
 
 
3257
                case 4:
 
3258
                        if (in == Py_None) {
 
3259
                                ret->info4 = NULL;
 
3260
                        } else {
 
3261
                                ret->info4 = NULL;
 
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) {
 
3264
                                        PyErr_NoMemory();
 
3265
                                        talloc_free(ret); return NULL;
 
3266
                                }
 
3267
                                ret->info4 = (struct dfs_EnumArray4 *)py_talloc_get_ptr(in);
 
3268
                        }
 
3269
                        break;
 
3270
 
 
3271
                case 5:
 
3272
                        if (in == Py_None) {
 
3273
                                ret->info5 = NULL;
 
3274
                        } else {
 
3275
                                ret->info5 = NULL;
 
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) {
 
3278
                                        PyErr_NoMemory();
 
3279
                                        talloc_free(ret); return NULL;
 
3280
                                }
 
3281
                                ret->info5 = (struct dfs_EnumArray5 *)py_talloc_get_ptr(in);
 
3282
                        }
 
3283
                        break;
 
3284
 
 
3285
                case 6:
 
3286
                        if (in == Py_None) {
 
3287
                                ret->info6 = NULL;
 
3288
                        } else {
 
3289
                                ret->info6 = NULL;
 
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) {
 
3292
                                        PyErr_NoMemory();
 
3293
                                        talloc_free(ret); return NULL;
 
3294
                                }
 
3295
                                ret->info6 = (struct dfs_EnumArray6 *)py_talloc_get_ptr(in);
 
3296
                        }
 
3297
                        break;
 
3298
 
 
3299
                case 200:
 
3300
                        if (in == Py_None) {
 
3301
                                ret->info200 = NULL;
 
3302
                        } else {
 
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) {
 
3306
                                        PyErr_NoMemory();
 
3307
                                        talloc_free(ret); return NULL;
 
3308
                                }
 
3309
                                ret->info200 = (struct dfs_EnumArray200 *)py_talloc_get_ptr(in);
 
3310
                        }
 
3311
                        break;
 
3312
 
 
3313
                case 300:
 
3314
                        if (in == Py_None) {
 
3315
                                ret->info300 = NULL;
 
3316
                        } else {
 
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) {
 
3320
                                        PyErr_NoMemory();
 
3321
                                        talloc_free(ret); return NULL;
 
3322
                                }
 
3323
                                ret->info300 = (struct dfs_EnumArray300 *)py_talloc_get_ptr(in);
 
3324
                        }
 
3325
                        break;
 
3326
 
 
3327
                default:
 
3328
                        PyErr_SetString(PyExc_TypeError, "invalid union level value");
 
3329
                        talloc_free(ret);
 
3330
                        ret = NULL;
 
3331
        }
 
3332
 
 
3333
        return ret;
 
3334
}
 
3335
 
 
3336
 
 
3337
static PyObject *py_dfs_EnumStruct_get_level(PyObject *obj, void *closure)
 
3338
{
 
3339
        struct dfs_EnumStruct *object = (struct dfs_EnumStruct *)py_talloc_get_ptr(obj);
 
3340
        PyObject *py_level;
 
3341
        py_level = PyInt_FromLong(object->level);
 
3342
        return py_level;
 
3343
}
 
3344
 
 
3345
static int py_dfs_EnumStruct_set_level(PyObject *py_obj, PyObject *value, void *closure)
 
3346
{
 
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);
 
3350
        return 0;
 
3351
}
 
3352
 
 
3353
static PyObject *py_dfs_EnumStruct_get_e(PyObject *obj, void *closure)
 
3354
{
 
3355
        struct dfs_EnumStruct *object = (struct dfs_EnumStruct *)py_talloc_get_ptr(obj);
 
3356
        PyObject *py_e;
 
3357
        py_e = py_import_dfs_EnumInfo(py_talloc_get_mem_ctx(obj), object->level, &object->e);
 
3358
        if (py_e == NULL) {
 
3359
                return NULL;
 
3360
        }
 
3361
        return py_e;
 
3362
}
 
3363
 
 
3364
static int py_dfs_EnumStruct_set_e(PyObject *py_obj, PyObject *value, void *closure)
 
3365
{
 
3366
        struct dfs_EnumStruct *object = (struct dfs_EnumStruct *)py_talloc_get_ptr(py_obj);
 
3367
        {
 
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) {
 
3371
                        return -1;
 
3372
                }
 
3373
                object->e = *e_switch_0;
 
3374
        }
 
3375
        return 0;
 
3376
}
 
3377
 
 
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 },
 
3381
        { NULL }
 
3382
};
 
3383
 
 
3384
static PyObject *py_dfs_EnumStruct_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3385
{
 
3386
        return py_talloc_new(struct dfs_EnumStruct, type);
 
3387
}
 
3388
 
 
3389
 
 
3390
static PyTypeObject dfs_EnumStruct_Type = {
 
3391
        PyObject_HEAD_INIT(NULL) 0,
 
3392
        .tp_name = "dfs.EnumStruct",
 
3393
        .tp_getset = py_dfs_EnumStruct_getsetters,
 
3394
        .tp_methods = NULL,
 
3395
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3396
        .tp_basicsize = sizeof(py_talloc_Object),
 
3397
        .tp_new = py_dfs_EnumStruct_new,
 
3398
};
 
3399
 
 
3400
 
 
3401
static PyObject *py_dfs_UnknownStruct_get_unknown1(PyObject *obj, void *closure)
 
3402
{
 
3403
        struct dfs_UnknownStruct *object = (struct dfs_UnknownStruct *)py_talloc_get_ptr(obj);
 
3404
        PyObject *py_unknown1;
 
3405
        py_unknown1 = PyInt_FromLong(object->unknown1);
 
3406
        return py_unknown1;
 
3407
}
 
3408
 
 
3409
static int py_dfs_UnknownStruct_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
 
3410
{
 
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);
 
3414
        return 0;
 
3415
}
 
3416
 
 
3417
static PyObject *py_dfs_UnknownStruct_get_unknown2(PyObject *obj, void *closure)
 
3418
{
 
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);
 
3424
        } else {
 
3425
                if (object->unknown2 == NULL) {
 
3426
                        py_unknown2 = Py_None;
 
3427
                        Py_INCREF(py_unknown2);
 
3428
                } else {
 
3429
                        py_unknown2 = PyUnicode_Decode(object->unknown2, strlen(object->unknown2), "utf-8", "ignore");
 
3430
                }
 
3431
        }
 
3432
        return py_unknown2;
 
3433
}
 
3434
 
 
3435
static int py_dfs_UnknownStruct_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
 
3436
{
 
3437
        struct dfs_UnknownStruct *object = (struct dfs_UnknownStruct *)py_talloc_get_ptr(py_obj);
 
3438
        if (value == Py_None) {
 
3439
                object->unknown2 = NULL;
 
3440
        } else {
 
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);
 
3446
                } else {
 
3447
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
3448
                        return -1;
 
3449
                }
 
3450
        }
 
3451
        return 0;
 
3452
}
 
3453
 
 
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 },
 
3457
        { NULL }
 
3458
};
 
3459
 
 
3460
static PyObject *py_dfs_UnknownStruct_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3461
{
 
3462
        return py_talloc_new(struct dfs_UnknownStruct, type);
 
3463
}
 
3464
 
 
3465
 
 
3466
static PyTypeObject dfs_UnknownStruct_Type = {
 
3467
        PyObject_HEAD_INIT(NULL) 0,
 
3468
        .tp_name = "dfs.UnknownStruct",
 
3469
        .tp_getset = py_dfs_UnknownStruct_getsetters,
 
3470
        .tp_methods = NULL,
 
3471
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3472
        .tp_basicsize = sizeof(py_talloc_Object),
 
3473
        .tp_new = py_dfs_UnknownStruct_new,
 
3474
};
 
3475
 
 
3476
 
 
3477
static bool pack_py_dfs_GetManagerVersion_args_in(PyObject *args, PyObject *kwargs, struct dfs_GetManagerVersion *r)
 
3478
{
 
3479
        const char *kwnames[] = {
 
3480
                NULL
 
3481
        };
 
3482
 
 
3483
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":dfs_GetManagerVersion", discard_const_p(char *, kwnames))) {
 
3484
                return false;
 
3485
        }
 
3486
 
 
3487
        return true;
 
3488
}
 
3489
 
 
3490
static PyObject *unpack_py_dfs_GetManagerVersion_args_out(struct dfs_GetManagerVersion *r)
 
3491
{
 
3492
        PyObject *result;
 
3493
        PyObject *py_version;
 
3494
        py_version = PyInt_FromLong(*r->out.version);
 
3495
        result = py_version;
 
3496
        return result;
 
3497
}
 
3498
 
 
3499
static bool pack_py_dfs_Add_args_in(PyObject *args, PyObject *kwargs, struct dfs_Add *r)
 
3500
{
 
3501
        PyObject *py_path;
 
3502
        PyObject *py_server;
 
3503
        PyObject *py_share;
 
3504
        PyObject *py_comment;
 
3505
        PyObject *py_flags;
 
3506
        const char *kwnames[] = {
 
3507
                "path", "server", "share", "comment", "flags", NULL
 
3508
        };
 
3509
 
 
3510
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:dfs_Add", discard_const_p(char *, kwnames), &py_path, &py_server, &py_share, &py_comment, &py_flags)) {
 
3511
                return false;
 
3512
        }
 
3513
 
 
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);
 
3519
        } else {
 
3520
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
 
3521
                return false;
 
3522
        }
 
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);
 
3528
        } else {
 
3529
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server)->tp_name);
 
3530
                return false;
 
3531
        }
 
3532
        if (py_share == Py_None) {
 
3533
                r->in.share = NULL;
 
3534
        } else {
 
3535
                r->in.share = NULL;
 
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);
 
3540
                } else {
 
3541
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
 
3542
                        return false;
 
3543
                }
 
3544
        }
 
3545
        if (py_comment == Py_None) {
 
3546
                r->in.comment = NULL;
 
3547
        } else {
 
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);
 
3553
                } else {
 
3554
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
 
3555
                        return false;
 
3556
                }
 
3557
        }
 
3558
        PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
 
3559
        r->in.flags = PyInt_AsLong(py_flags);
 
3560
        return true;
 
3561
}
 
3562
 
 
3563
static PyObject *unpack_py_dfs_Add_args_out(struct dfs_Add *r)
 
3564
{
 
3565
        PyObject *result;
 
3566
        result = Py_None;
 
3567
        Py_INCREF(result);
 
3568
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3569
                PyErr_SetWERROR(r->out.result);
 
3570
                return NULL;
 
3571
        }
 
3572
 
 
3573
        return result;
 
3574
}
 
3575
 
 
3576
static bool pack_py_dfs_Remove_args_in(PyObject *args, PyObject *kwargs, struct dfs_Remove *r)
 
3577
{
 
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
 
3583
        };
 
3584
 
 
3585
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:dfs_Remove", discard_const_p(char *, kwnames), &py_dfs_entry_path, &py_servername, &py_sharename)) {
 
3586
                return false;
 
3587
        }
 
3588
 
 
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);
 
3594
        } else {
 
3595
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_entry_path)->tp_name);
 
3596
                return false;
 
3597
        }
 
3598
        if (py_servername == Py_None) {
 
3599
                r->in.servername = NULL;
 
3600
        } else {
 
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);
 
3606
                } else {
 
3607
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
3608
                        return false;
 
3609
                }
 
3610
        }
 
3611
        if (py_sharename == Py_None) {
 
3612
                r->in.sharename = NULL;
 
3613
        } else {
 
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);
 
3619
                } else {
 
3620
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_sharename)->tp_name);
 
3621
                        return false;
 
3622
                }
 
3623
        }
 
3624
        return true;
 
3625
}
 
3626
 
 
3627
static PyObject *unpack_py_dfs_Remove_args_out(struct dfs_Remove *r)
 
3628
{
 
3629
        PyObject *result;
 
3630
        result = Py_None;
 
3631
        Py_INCREF(result);
 
3632
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3633
                PyErr_SetWERROR(r->out.result);
 
3634
                return NULL;
 
3635
        }
 
3636
 
 
3637
        return result;
 
3638
}
 
3639
 
 
3640
static bool pack_py_dfs_SetInfo_args_in(PyObject *args, PyObject *kwargs, struct dfs_SetInfo *r)
 
3641
{
 
3642
        PyObject *py_dfs_entry_path;
 
3643
        PyObject *py_servername;
 
3644
        PyObject *py_sharename;
 
3645
        PyObject *py_level;
 
3646
        PyObject *py_info;
 
3647
        const char *kwnames[] = {
 
3648
                "dfs_entry_path", "servername", "sharename", "level", "info", NULL
 
3649
        };
 
3650
 
 
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)) {
 
3652
                return false;
 
3653
        }
 
3654
 
 
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);
 
3659
        } else {
 
3660
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_entry_path)->tp_name);
 
3661
                return false;
 
3662
        }
 
3663
        if (py_servername == Py_None) {
 
3664
                r->in.servername = NULL;
 
3665
        } else {
 
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);
 
3671
                } else {
 
3672
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
3673
                        return false;
 
3674
                }
 
3675
        }
 
3676
        if (py_sharename == Py_None) {
 
3677
                r->in.sharename = NULL;
 
3678
        } else {
 
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);
 
3684
                } else {
 
3685
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_sharename)->tp_name);
 
3686
                        return false;
 
3687
                }
 
3688
        }
 
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);
 
3692
        {
 
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) {
 
3696
                        return false;
 
3697
                }
 
3698
                r->in.info = info_switch_1;
 
3699
        }
 
3700
        return true;
 
3701
}
 
3702
 
 
3703
static PyObject *unpack_py_dfs_SetInfo_args_out(struct dfs_SetInfo *r)
 
3704
{
 
3705
        PyObject *result;
 
3706
        result = Py_None;
 
3707
        Py_INCREF(result);
 
3708
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3709
                PyErr_SetWERROR(r->out.result);
 
3710
                return NULL;
 
3711
        }
 
3712
 
 
3713
        return result;
 
3714
}
 
3715
 
 
3716
static bool pack_py_dfs_GetInfo_args_in(PyObject *args, PyObject *kwargs, struct dfs_GetInfo *r)
 
3717
{
 
3718
        PyObject *py_dfs_entry_path;
 
3719
        PyObject *py_servername;
 
3720
        PyObject *py_sharename;
 
3721
        PyObject *py_level;
 
3722
        const char *kwnames[] = {
 
3723
                "dfs_entry_path", "servername", "sharename", "level", NULL
 
3724
        };
 
3725
 
 
3726
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_GetInfo", discard_const_p(char *, kwnames), &py_dfs_entry_path, &py_servername, &py_sharename, &py_level)) {
 
3727
                return false;
 
3728
        }
 
3729
 
 
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);
 
3734
        } else {
 
3735
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_entry_path)->tp_name);
 
3736
                return false;
 
3737
        }
 
3738
        if (py_servername == Py_None) {
 
3739
                r->in.servername = NULL;
 
3740
        } else {
 
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);
 
3746
                } else {
 
3747
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
3748
                        return false;
 
3749
                }
 
3750
        }
 
3751
        if (py_sharename == Py_None) {
 
3752
                r->in.sharename = NULL;
 
3753
        } else {
 
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);
 
3759
                } else {
 
3760
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_sharename)->tp_name);
 
3761
                        return false;
 
3762
                }
 
3763
        }
 
3764
        PY_CHECK_TYPE(&PyInt_Type, py_level, return false;);
 
3765
        r->in.level = PyInt_AsLong(py_level);
 
3766
        return true;
 
3767
}
 
3768
 
 
3769
static PyObject *unpack_py_dfs_GetInfo_args_out(struct dfs_GetInfo *r)
 
3770
{
 
3771
        PyObject *result;
 
3772
        PyObject *py_info;
 
3773
        py_info = py_import_dfs_Info(r->out.info, r->in.level, r->out.info);
 
3774
        if (py_info == NULL) {
 
3775
                return NULL;
 
3776
        }
 
3777
        result = py_info;
 
3778
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3779
                PyErr_SetWERROR(r->out.result);
 
3780
                return NULL;
 
3781
        }
 
3782
 
 
3783
        return result;
 
3784
}
 
3785
 
 
3786
static bool pack_py_dfs_Enum_args_in(PyObject *args, PyObject *kwargs, struct dfs_Enum *r)
 
3787
{
 
3788
        PyObject *py_level;
 
3789
        PyObject *py_bufsize;
 
3790
        PyObject *py_info;
 
3791
        PyObject *py_total;
 
3792
        const char *kwnames[] = {
 
3793
                "level", "bufsize", "info", "total", NULL
 
3794
        };
 
3795
 
 
3796
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_Enum", discard_const_p(char *, kwnames), &py_level, &py_bufsize, &py_info, &py_total)) {
 
3797
                return false;
 
3798
        }
 
3799
 
 
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) {
 
3805
                r->in.info = NULL;
 
3806
        } else {
 
3807
                r->in.info = NULL;
 
3808
                PY_CHECK_TYPE(&dfs_EnumStruct_Type, py_info, return false;);
 
3809
                if (talloc_reference(r, py_talloc_get_mem_ctx(py_info)) == NULL) {
 
3810
                        PyErr_NoMemory();
 
3811
                        return false;
 
3812
                }
 
3813
                r->in.info = (struct dfs_EnumStruct *)py_talloc_get_ptr(py_info);
 
3814
        }
 
3815
        if (py_total == Py_None) {
 
3816
                r->in.total = NULL;
 
3817
        } else {
 
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);
 
3821
        }
 
3822
        return true;
 
3823
}
 
3824
 
 
3825
static PyObject *unpack_py_dfs_Enum_args_out(struct dfs_Enum *r)
 
3826
{
 
3827
        PyObject *result;
 
3828
        PyObject *py_info;
 
3829
        PyObject *py_total;
 
3830
        result = PyTuple_New(2);
 
3831
        if (r->out.info == NULL) {
 
3832
                py_info = Py_None;
 
3833
                Py_INCREF(py_info);
 
3834
        } else {
 
3835
                py_info = py_talloc_reference_ex(&dfs_EnumStruct_Type, r->out.info, r->out.info);
 
3836
        }
 
3837
        PyTuple_SetItem(result, 0, py_info);
 
3838
        if (r->out.total == NULL) {
 
3839
                py_total = Py_None;
 
3840
                Py_INCREF(py_total);
 
3841
        } else {
 
3842
                py_total = PyInt_FromLong(*r->out.total);
 
3843
        }
 
3844
        PyTuple_SetItem(result, 1, py_total);
 
3845
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3846
                PyErr_SetWERROR(r->out.result);
 
3847
                return NULL;
 
3848
        }
 
3849
 
 
3850
        return result;
 
3851
}
 
3852
 
 
3853
static bool pack_py_dfs_AddFtRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_AddFtRoot *r)
 
3854
{
 
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;
 
3862
        PyObject *py_flags;
 
3863
        PyObject *py_unknown2;
 
3864
        const char *kwnames[] = {
 
3865
                "servername", "dns_servername", "dfsname", "rootshare", "comment", "dfs_config_dn", "unknown1", "flags", "unknown2", NULL
 
3866
        };
 
3867
 
 
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)) {
 
3869
                return false;
 
3870
        }
 
3871
 
 
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);
 
3876
        } else {
 
3877
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
3878
                return false;
 
3879
        }
 
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);
 
3884
        } else {
 
3885
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dns_servername)->tp_name);
 
3886
                return false;
 
3887
        }
 
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);
 
3892
        } else {
 
3893
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfsname)->tp_name);
 
3894
                return false;
 
3895
        }
 
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);
 
3900
        } else {
 
3901
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
 
3902
                return false;
 
3903
        }
 
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);
 
3908
        } else {
 
3909
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
 
3910
                return false;
 
3911
        }
 
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);
 
3916
        } else {
 
3917
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_config_dn)->tp_name);
 
3918
                return false;
 
3919
        }
 
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;
 
3926
        } else {
 
3927
                r->in.unknown2 = NULL;
 
3928
                if (py_unknown2 == Py_None) {
 
3929
                        *r->in.unknown2 = NULL;
 
3930
                } else {
 
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) {
 
3934
                                PyErr_NoMemory();
 
3935
                                return false;
 
3936
                        }
 
3937
                        *r->in.unknown2 = (struct dfs_UnknownStruct *)py_talloc_get_ptr(py_unknown2);
 
3938
                }
 
3939
        }
 
3940
        return true;
 
3941
}
 
3942
 
 
3943
static PyObject *unpack_py_dfs_AddFtRoot_args_out(struct dfs_AddFtRoot *r)
 
3944
{
 
3945
        PyObject *result;
 
3946
        PyObject *py_unknown2;
 
3947
        if (r->out.unknown2 == NULL) {
 
3948
                py_unknown2 = Py_None;
 
3949
                Py_INCREF(py_unknown2);
 
3950
        } else {
 
3951
                if (*r->out.unknown2 == NULL) {
 
3952
                        py_unknown2 = Py_None;
 
3953
                        Py_INCREF(py_unknown2);
 
3954
                } else {
 
3955
                        py_unknown2 = py_talloc_reference_ex(&dfs_UnknownStruct_Type, *r->out.unknown2, *r->out.unknown2);
 
3956
                }
 
3957
        }
 
3958
        result = py_unknown2;
 
3959
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3960
                PyErr_SetWERROR(r->out.result);
 
3961
                return NULL;
 
3962
        }
 
3963
 
 
3964
        return result;
 
3965
}
 
3966
 
 
3967
static bool pack_py_dfs_RemoveFtRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_RemoveFtRoot *r)
 
3968
{
 
3969
        PyObject *py_servername;
 
3970
        PyObject *py_dns_servername;
 
3971
        PyObject *py_dfsname;
 
3972
        PyObject *py_rootshare;
 
3973
        PyObject *py_flags;
 
3974
        PyObject *py_unknown;
 
3975
        const char *kwnames[] = {
 
3976
                "servername", "dns_servername", "dfsname", "rootshare", "flags", "unknown", NULL
 
3977
        };
 
3978
 
 
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)) {
 
3980
                return false;
 
3981
        }
 
3982
 
 
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);
 
3987
        } else {
 
3988
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
3989
                return false;
 
3990
        }
 
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);
 
3995
        } else {
 
3996
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dns_servername)->tp_name);
 
3997
                return false;
 
3998
        }
 
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);
 
4003
        } else {
 
4004
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfsname)->tp_name);
 
4005
                return false;
 
4006
        }
 
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);
 
4011
        } else {
 
4012
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
 
4013
                return false;
 
4014
        }
 
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;
 
4019
        } else {
 
4020
                r->in.unknown = NULL;
 
4021
                if (py_unknown == Py_None) {
 
4022
                        *r->in.unknown = NULL;
 
4023
                } else {
 
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) {
 
4027
                                PyErr_NoMemory();
 
4028
                                return false;
 
4029
                        }
 
4030
                        *r->in.unknown = (struct dfs_UnknownStruct *)py_talloc_get_ptr(py_unknown);
 
4031
                }
 
4032
        }
 
4033
        return true;
 
4034
}
 
4035
 
 
4036
static PyObject *unpack_py_dfs_RemoveFtRoot_args_out(struct dfs_RemoveFtRoot *r)
 
4037
{
 
4038
        PyObject *result;
 
4039
        PyObject *py_unknown;
 
4040
        if (r->out.unknown == NULL) {
 
4041
                py_unknown = Py_None;
 
4042
                Py_INCREF(py_unknown);
 
4043
        } else {
 
4044
                if (*r->out.unknown == NULL) {
 
4045
                        py_unknown = Py_None;
 
4046
                        Py_INCREF(py_unknown);
 
4047
                } else {
 
4048
                        py_unknown = py_talloc_reference_ex(&dfs_UnknownStruct_Type, *r->out.unknown, *r->out.unknown);
 
4049
                }
 
4050
        }
 
4051
        result = py_unknown;
 
4052
        if (!W_ERROR_IS_OK(r->out.result)) {
 
4053
                PyErr_SetWERROR(r->out.result);
 
4054
                return NULL;
 
4055
        }
 
4056
 
 
4057
        return result;
 
4058
}
 
4059
 
 
4060
static bool pack_py_dfs_AddStdRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_AddStdRoot *r)
 
4061
{
 
4062
        PyObject *py_servername;
 
4063
        PyObject *py_rootshare;
 
4064
        PyObject *py_comment;
 
4065
        PyObject *py_flags;
 
4066
        const char *kwnames[] = {
 
4067
                "servername", "rootshare", "comment", "flags", NULL
 
4068
        };
 
4069
 
 
4070
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_AddStdRoot", discard_const_p(char *, kwnames), &py_servername, &py_rootshare, &py_comment, &py_flags)) {
 
4071
                return false;
 
4072
        }
 
4073
 
 
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);
 
4078
        } else {
 
4079
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
4080
                return false;
 
4081
        }
 
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);
 
4086
        } else {
 
4087
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
 
4088
                return false;
 
4089
        }
 
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);
 
4094
        } else {
 
4095
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
 
4096
                return false;
 
4097
        }
 
4098
        PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
 
4099
        r->in.flags = PyInt_AsLong(py_flags);
 
4100
        return true;
 
4101
}
 
4102
 
 
4103
static PyObject *unpack_py_dfs_AddStdRoot_args_out(struct dfs_AddStdRoot *r)
 
4104
{
 
4105
        PyObject *result;
 
4106
        result = Py_None;
 
4107
        Py_INCREF(result);
 
4108
        if (!W_ERROR_IS_OK(r->out.result)) {
 
4109
                PyErr_SetWERROR(r->out.result);
 
4110
                return NULL;
 
4111
        }
 
4112
 
 
4113
        return result;
 
4114
}
 
4115
 
 
4116
static bool pack_py_dfs_RemoveStdRoot_args_in(PyObject *args, PyObject *kwargs, struct dfs_RemoveStdRoot *r)
 
4117
{
 
4118
        PyObject *py_servername;
 
4119
        PyObject *py_rootshare;
 
4120
        PyObject *py_flags;
 
4121
        const char *kwnames[] = {
 
4122
                "servername", "rootshare", "flags", NULL
 
4123
        };
 
4124
 
 
4125
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:dfs_RemoveStdRoot", discard_const_p(char *, kwnames), &py_servername, &py_rootshare, &py_flags)) {
 
4126
                return false;
 
4127
        }
 
4128
 
 
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);
 
4133
        } else {
 
4134
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
4135
                return false;
 
4136
        }
 
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);
 
4141
        } else {
 
4142
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
 
4143
                return false;
 
4144
        }
 
4145
        PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
 
4146
        r->in.flags = PyInt_AsLong(py_flags);
 
4147
        return true;
 
4148
}
 
4149
 
 
4150
static PyObject *unpack_py_dfs_RemoveStdRoot_args_out(struct dfs_RemoveStdRoot *r)
 
4151
{
 
4152
        PyObject *result;
 
4153
        result = Py_None;
 
4154
        Py_INCREF(result);
 
4155
        if (!W_ERROR_IS_OK(r->out.result)) {
 
4156
                PyErr_SetWERROR(r->out.result);
 
4157
                return NULL;
 
4158
        }
 
4159
 
 
4160
        return result;
 
4161
}
 
4162
 
 
4163
static bool pack_py_dfs_ManagerInitialize_args_in(PyObject *args, PyObject *kwargs, struct dfs_ManagerInitialize *r)
 
4164
{
 
4165
        PyObject *py_servername;
 
4166
        PyObject *py_flags;
 
4167
        const char *kwnames[] = {
 
4168
                "servername", "flags", NULL
 
4169
        };
 
4170
 
 
4171
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:dfs_ManagerInitialize", discard_const_p(char *, kwnames), &py_servername, &py_flags)) {
 
4172
                return false;
 
4173
        }
 
4174
 
 
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);
 
4180
        } else {
 
4181
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
4182
                return false;
 
4183
        }
 
4184
        PY_CHECK_TYPE(&PyInt_Type, py_flags, return false;);
 
4185
        r->in.flags = PyInt_AsLong(py_flags);
 
4186
        return true;
 
4187
}
 
4188
 
 
4189
static PyObject *unpack_py_dfs_ManagerInitialize_args_out(struct dfs_ManagerInitialize *r)
 
4190
{
 
4191
        PyObject *result;
 
4192
        result = Py_None;
 
4193
        Py_INCREF(result);
 
4194
        if (!W_ERROR_IS_OK(r->out.result)) {
 
4195
                PyErr_SetWERROR(r->out.result);
 
4196
                return NULL;
 
4197
        }
 
4198
 
 
4199
        return result;
 
4200
}
 
4201
 
 
4202
static bool pack_py_dfs_AddStdRootForced_args_in(PyObject *args, PyObject *kwargs, struct dfs_AddStdRootForced *r)
 
4203
{
 
4204
        PyObject *py_servername;
 
4205
        PyObject *py_rootshare;
 
4206
        PyObject *py_comment;
 
4207
        PyObject *py_store;
 
4208
        const char *kwnames[] = {
 
4209
                "servername", "rootshare", "comment", "store", NULL
 
4210
        };
 
4211
 
 
4212
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_AddStdRootForced", discard_const_p(char *, kwnames), &py_servername, &py_rootshare, &py_comment, &py_store)) {
 
4213
                return false;
 
4214
        }
 
4215
 
 
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);
 
4220
        } else {
 
4221
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
4222
                return false;
 
4223
        }
 
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);
 
4228
        } else {
 
4229
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
 
4230
                return false;
 
4231
        }
 
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);
 
4236
        } else {
 
4237
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_comment)->tp_name);
 
4238
                return false;
 
4239
        }
 
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);
 
4244
        } else {
 
4245
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_store)->tp_name);
 
4246
                return false;
 
4247
        }
 
4248
        return true;
 
4249
}
 
4250
 
 
4251
static PyObject *unpack_py_dfs_AddStdRootForced_args_out(struct dfs_AddStdRootForced *r)
 
4252
{
 
4253
        PyObject *result;
 
4254
        result = Py_None;
 
4255
        Py_INCREF(result);
 
4256
        if (!W_ERROR_IS_OK(r->out.result)) {
 
4257
                PyErr_SetWERROR(r->out.result);
 
4258
                return NULL;
 
4259
        }
 
4260
 
 
4261
        return result;
 
4262
}
 
4263
 
 
4264
static bool pack_py_dfs_GetDcAddress_args_in(PyObject *args, PyObject *kwargs, struct dfs_GetDcAddress *r)
 
4265
{
 
4266
        PyObject *py_servername;
 
4267
        PyObject *py_server_fullname;
 
4268
        PyObject *py_is_root;
 
4269
        PyObject *py_ttl;
 
4270
        const char *kwnames[] = {
 
4271
                "servername", "server_fullname", "is_root", "ttl", NULL
 
4272
        };
 
4273
 
 
4274
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_GetDcAddress", discard_const_p(char *, kwnames), &py_servername, &py_server_fullname, &py_is_root, &py_ttl)) {
 
4275
                return false;
 
4276
        }
 
4277
 
 
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);
 
4282
        } else {
 
4283
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
4284
                return false;
 
4285
        }
 
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;
 
4289
        } else {
 
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);
 
4295
                } else {
 
4296
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_fullname)->tp_name);
 
4297
                        return false;
 
4298
                }
 
4299
        }
 
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);
 
4306
        return true;
 
4307
}
 
4308
 
 
4309
static PyObject *unpack_py_dfs_GetDcAddress_args_out(struct dfs_GetDcAddress *r)
 
4310
{
 
4311
        PyObject *result;
 
4312
        PyObject *py_server_fullname;
 
4313
        PyObject *py_is_root;
 
4314
        PyObject *py_ttl;
 
4315
        result = PyTuple_New(3);
 
4316
        if (*r->out.server_fullname == NULL) {
 
4317
                py_server_fullname = Py_None;
 
4318
                Py_INCREF(py_server_fullname);
 
4319
        } else {
 
4320
                if (*r->out.server_fullname == NULL) {
 
4321
                        py_server_fullname = Py_None;
 
4322
                        Py_INCREF(py_server_fullname);
 
4323
                } else {
 
4324
                        py_server_fullname = PyUnicode_Decode(*r->out.server_fullname, strlen(*r->out.server_fullname), "utf-8", "ignore");
 
4325
                }
 
4326
        }
 
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);
 
4334
                return NULL;
 
4335
        }
 
4336
 
 
4337
        return result;
 
4338
}
 
4339
 
 
4340
static bool pack_py_dfs_SetDcAddress_args_in(PyObject *args, PyObject *kwargs, struct dfs_SetDcAddress *r)
 
4341
{
 
4342
        PyObject *py_servername;
 
4343
        PyObject *py_server_fullname;
 
4344
        PyObject *py_flags;
 
4345
        PyObject *py_ttl;
 
4346
        const char *kwnames[] = {
 
4347
                "servername", "server_fullname", "flags", "ttl", NULL
 
4348
        };
 
4349
 
 
4350
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:dfs_SetDcAddress", discard_const_p(char *, kwnames), &py_servername, &py_server_fullname, &py_flags, &py_ttl)) {
 
4351
                return false;
 
4352
        }
 
4353
 
 
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);
 
4358
        } else {
 
4359
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
4360
                return false;
 
4361
        }
 
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);
 
4366
        } else {
 
4367
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_fullname)->tp_name);
 
4368
                return false;
 
4369
        }
 
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);
 
4374
        return true;
 
4375
}
 
4376
 
 
4377
static PyObject *unpack_py_dfs_SetDcAddress_args_out(struct dfs_SetDcAddress *r)
 
4378
{
 
4379
        PyObject *result;
 
4380
        result = Py_None;
 
4381
        Py_INCREF(result);
 
4382
        if (!W_ERROR_IS_OK(r->out.result)) {
 
4383
                PyErr_SetWERROR(r->out.result);
 
4384
                return NULL;
 
4385
        }
 
4386
 
 
4387
        return result;
 
4388
}
 
4389
 
 
4390
static bool pack_py_dfs_FlushFtTable_args_in(PyObject *args, PyObject *kwargs, struct dfs_FlushFtTable *r)
 
4391
{
 
4392
        PyObject *py_servername;
 
4393
        PyObject *py_rootshare;
 
4394
        const char *kwnames[] = {
 
4395
                "servername", "rootshare", NULL
 
4396
        };
 
4397
 
 
4398
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:dfs_FlushFtTable", discard_const_p(char *, kwnames), &py_servername, &py_rootshare)) {
 
4399
                return false;
 
4400
        }
 
4401
 
 
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);
 
4406
        } else {
 
4407
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_servername)->tp_name);
 
4408
                return false;
 
4409
        }
 
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);
 
4414
        } else {
 
4415
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_rootshare)->tp_name);
 
4416
                return false;
 
4417
        }
 
4418
        return true;
 
4419
}
 
4420
 
 
4421
static PyObject *unpack_py_dfs_FlushFtTable_args_out(struct dfs_FlushFtTable *r)
 
4422
{
 
4423
        PyObject *result;
 
4424
        result = Py_None;
 
4425
        Py_INCREF(result);
 
4426
        if (!W_ERROR_IS_OK(r->out.result)) {
 
4427
                PyErr_SetWERROR(r->out.result);
 
4428
                return NULL;
 
4429
        }
 
4430
 
 
4431
        return result;
 
4432
}
 
4433
 
 
4434
static bool pack_py_dfs_EnumEx_args_in(PyObject *args, PyObject *kwargs, struct dfs_EnumEx *r)
 
4435
{
 
4436
        PyObject *py_dfs_name;
 
4437
        PyObject *py_level;
 
4438
        PyObject *py_bufsize;
 
4439
        PyObject *py_info;
 
4440
        PyObject *py_total;
 
4441
        const char *kwnames[] = {
 
4442
                "dfs_name", "level", "bufsize", "info", "total", NULL
 
4443
        };
 
4444
 
 
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)) {
 
4446
                return false;
 
4447
        }
 
4448
 
 
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);
 
4453
        } else {
 
4454
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dfs_name)->tp_name);
 
4455
                return false;
 
4456
        }
 
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) {
 
4462
                r->in.info = NULL;
 
4463
        } else {
 
4464
                r->in.info = NULL;
 
4465
                PY_CHECK_TYPE(&dfs_EnumStruct_Type, py_info, return false;);
 
4466
                if (talloc_reference(r, py_talloc_get_mem_ctx(py_info)) == NULL) {
 
4467
                        PyErr_NoMemory();
 
4468
                        return false;
 
4469
                }
 
4470
                r->in.info = (struct dfs_EnumStruct *)py_talloc_get_ptr(py_info);
 
4471
        }
 
4472
        if (py_total == Py_None) {
 
4473
                r->in.total = NULL;
 
4474
        } else {
 
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);
 
4478
        }
 
4479
        return true;
 
4480
}
 
4481
 
 
4482
static PyObject *unpack_py_dfs_EnumEx_args_out(struct dfs_EnumEx *r)
 
4483
{
 
4484
        PyObject *result;
 
4485
        PyObject *py_info;
 
4486
        PyObject *py_total;
 
4487
        result = PyTuple_New(2);
 
4488
        if (r->out.info == NULL) {
 
4489
                py_info = Py_None;
 
4490
                Py_INCREF(py_info);
 
4491
        } else {
 
4492
                py_info = py_talloc_reference_ex(&dfs_EnumStruct_Type, r->out.info, r->out.info);
 
4493
        }
 
4494
        PyTuple_SetItem(result, 0, py_info);
 
4495
        if (r->out.total == NULL) {
 
4496
                py_total = Py_None;
 
4497
                Py_INCREF(py_total);
 
4498
        } else {
 
4499
                py_total = PyInt_FromLong(*r->out.total);
 
4500
        }
 
4501
        PyTuple_SetItem(result, 1, py_total);
 
4502
        if (!W_ERROR_IS_OK(r->out.result)) {
 
4503
                PyErr_SetWERROR(r->out.result);
 
4504
                return NULL;
 
4505
        }
 
4506
 
 
4507
        return result;
 
4508
}
 
4509
 
 
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 },
 
4527
        { NULL }
 
4528
};
 
4529
 
 
4530
static PyObject *interface_netdfs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
4531
{
 
4532
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_netdfs);
 
4533
}
 
4534
 
 
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"
 
4541
"\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,
 
4547
};
 
4548
 
 
4549
static PyMethodDef dfs_methods[] = {
 
4550
        { NULL, NULL, 0, NULL }
 
4551
};
 
4552
 
 
4553
void initdfs(void)
 
4554
{
 
4555
        PyObject *m;
 
4556
        PyObject *dep_talloc;
 
4557
        PyObject *dep_samba_dcerpc_misc;
 
4558
        PyObject *dep_samba_dcerpc_base;
 
4559
 
 
4560
        dep_talloc = PyImport_ImportModule("talloc");
 
4561
        if (dep_talloc == NULL)
 
4562
                return;
 
4563
 
 
4564
        dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
 
4565
        if (dep_samba_dcerpc_misc == NULL)
 
4566
                return;
 
4567
 
 
4568
        dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
 
4569
        if (dep_samba_dcerpc_base == NULL)
 
4570
                return;
 
4571
 
 
4572
        Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
 
4573
        if (Object_Type == NULL)
 
4574
                return;
 
4575
 
 
4576
        GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
 
4577
        if (GUID_Type == NULL)
 
4578
                return;
 
4579
 
 
4580
        ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
 
4581
        if (ClientConnection_Type == NULL)
 
4582
                return;
 
4583
 
 
4584
        dfs_Info0_Type.tp_base = Object_Type;
 
4585
 
 
4586
        dfs_Info1_Type.tp_base = Object_Type;
 
4587
 
 
4588
        dfs_Info2_Type.tp_base = Object_Type;
 
4589
 
 
4590
        dfs_StorageInfo_Type.tp_base = Object_Type;
 
4591
 
 
4592
        dfs_Info3_Type.tp_base = Object_Type;
 
4593
 
 
4594
        dfs_Info4_Type.tp_base = Object_Type;
 
4595
 
 
4596
        dfs_Info5_Type.tp_base = Object_Type;
 
4597
 
 
4598
        dfs_Target_Priority_Type.tp_base = Object_Type;
 
4599
 
 
4600
        dfs_StorageInfo2_Type.tp_base = Object_Type;
 
4601
 
 
4602
        dfs_Info6_Type.tp_base = Object_Type;
 
4603
 
 
4604
        dfs_Info7_Type.tp_base = Object_Type;
 
4605
 
 
4606
        dfs_Info100_Type.tp_base = Object_Type;
 
4607
 
 
4608
        dfs_Info101_Type.tp_base = Object_Type;
 
4609
 
 
4610
        dfs_Info102_Type.tp_base = Object_Type;
 
4611
 
 
4612
        dfs_Info103_Type.tp_base = Object_Type;
 
4613
 
 
4614
        dfs_Info104_Type.tp_base = Object_Type;
 
4615
 
 
4616
        dfs_Info105_Type.tp_base = Object_Type;
 
4617
 
 
4618
        dfs_Info106_Type.tp_base = Object_Type;
 
4619
 
 
4620
        dfs_Info200_Type.tp_base = Object_Type;
 
4621
 
 
4622
        dfs_Info300_Type.tp_base = Object_Type;
 
4623
 
 
4624
        dfs_EnumArray1_Type.tp_base = Object_Type;
 
4625
 
 
4626
        dfs_EnumArray2_Type.tp_base = Object_Type;
 
4627
 
 
4628
        dfs_EnumArray3_Type.tp_base = Object_Type;
 
4629
 
 
4630
        dfs_EnumArray4_Type.tp_base = Object_Type;
 
4631
 
 
4632
        dfs_EnumArray5_Type.tp_base = Object_Type;
 
4633
 
 
4634
        dfs_EnumArray6_Type.tp_base = Object_Type;
 
4635
 
 
4636
        dfs_EnumArray200_Type.tp_base = Object_Type;
 
4637
 
 
4638
        dfs_EnumArray300_Type.tp_base = Object_Type;
 
4639
 
 
4640
        dfs_EnumStruct_Type.tp_base = Object_Type;
 
4641
 
 
4642
        dfs_UnknownStruct_Type.tp_base = Object_Type;
 
4643
 
 
4644
        netdfs_InterfaceType.tp_base = ClientConnection_Type;
 
4645
 
 
4646
        if (PyType_Ready(&dfs_Info0_Type) < 0)
 
4647
                return;
 
4648
        if (PyType_Ready(&dfs_Info1_Type) < 0)
 
4649
                return;
 
4650
        if (PyType_Ready(&dfs_Info2_Type) < 0)
 
4651
                return;
 
4652
        if (PyType_Ready(&dfs_StorageInfo_Type) < 0)
 
4653
                return;
 
4654
        if (PyType_Ready(&dfs_Info3_Type) < 0)
 
4655
                return;
 
4656
        if (PyType_Ready(&dfs_Info4_Type) < 0)
 
4657
                return;
 
4658
        if (PyType_Ready(&dfs_Info5_Type) < 0)
 
4659
                return;
 
4660
        if (PyType_Ready(&dfs_Target_Priority_Type) < 0)
 
4661
                return;
 
4662
        if (PyType_Ready(&dfs_StorageInfo2_Type) < 0)
 
4663
                return;
 
4664
        if (PyType_Ready(&dfs_Info6_Type) < 0)
 
4665
                return;
 
4666
        if (PyType_Ready(&dfs_Info7_Type) < 0)
 
4667
                return;
 
4668
        if (PyType_Ready(&dfs_Info100_Type) < 0)
 
4669
                return;
 
4670
        if (PyType_Ready(&dfs_Info101_Type) < 0)
 
4671
                return;
 
4672
        if (PyType_Ready(&dfs_Info102_Type) < 0)
 
4673
                return;
 
4674
        if (PyType_Ready(&dfs_Info103_Type) < 0)
 
4675
                return;
 
4676
        if (PyType_Ready(&dfs_Info104_Type) < 0)
 
4677
                return;
 
4678
        if (PyType_Ready(&dfs_Info105_Type) < 0)
 
4679
                return;
 
4680
        if (PyType_Ready(&dfs_Info106_Type) < 0)
 
4681
                return;
 
4682
        if (PyType_Ready(&dfs_Info200_Type) < 0)
 
4683
                return;
 
4684
        if (PyType_Ready(&dfs_Info300_Type) < 0)
 
4685
                return;
 
4686
        if (PyType_Ready(&dfs_EnumArray1_Type) < 0)
 
4687
                return;
 
4688
        if (PyType_Ready(&dfs_EnumArray2_Type) < 0)
 
4689
                return;
 
4690
        if (PyType_Ready(&dfs_EnumArray3_Type) < 0)
 
4691
                return;
 
4692
        if (PyType_Ready(&dfs_EnumArray4_Type) < 0)
 
4693
                return;
 
4694
        if (PyType_Ready(&dfs_EnumArray5_Type) < 0)
 
4695
                return;
 
4696
        if (PyType_Ready(&dfs_EnumArray6_Type) < 0)
 
4697
                return;
 
4698
        if (PyType_Ready(&dfs_EnumArray200_Type) < 0)
 
4699
                return;
 
4700
        if (PyType_Ready(&dfs_EnumArray300_Type) < 0)
 
4701
                return;
 
4702
        if (PyType_Ready(&dfs_EnumStruct_Type) < 0)
 
4703
                return;
 
4704
        if (PyType_Ready(&dfs_UnknownStruct_Type) < 0)
 
4705
                return;
 
4706
        if (PyType_Ready(&netdfs_InterfaceType) < 0)
 
4707
                return;
 
4708
        if (!PyInterface_AddNdrRpcMethods(&netdfs_InterfaceType, py_ndr_netdfs_methods))
 
4709
                return;
 
4710
 
 
4711
#ifdef PY_INFO0_PATCH
 
4712
        PY_INFO0_PATCH(&dfs_Info0_Type);
 
4713
#endif
 
4714
#ifdef PY_INFO1_PATCH
 
4715
        PY_INFO1_PATCH(&dfs_Info1_Type);
 
4716
#endif
 
4717
#ifdef PY_INFO2_PATCH
 
4718
        PY_INFO2_PATCH(&dfs_Info2_Type);
 
4719
#endif
 
4720
#ifdef PY_STORAGEINFO_PATCH
 
4721
        PY_STORAGEINFO_PATCH(&dfs_StorageInfo_Type);
 
4722
#endif
 
4723
#ifdef PY_INFO3_PATCH
 
4724
        PY_INFO3_PATCH(&dfs_Info3_Type);
 
4725
#endif
 
4726
#ifdef PY_INFO4_PATCH
 
4727
        PY_INFO4_PATCH(&dfs_Info4_Type);
 
4728
#endif
 
4729
#ifdef PY_INFO5_PATCH
 
4730
        PY_INFO5_PATCH(&dfs_Info5_Type);
 
4731
#endif
 
4732
#ifdef PY_TARGET_PRIORITY_PATCH
 
4733
        PY_TARGET_PRIORITY_PATCH(&dfs_Target_Priority_Type);
 
4734
#endif
 
4735
#ifdef PY_STORAGEINFO2_PATCH
 
4736
        PY_STORAGEINFO2_PATCH(&dfs_StorageInfo2_Type);
 
4737
#endif
 
4738
#ifdef PY_INFO6_PATCH
 
4739
        PY_INFO6_PATCH(&dfs_Info6_Type);
 
4740
#endif
 
4741
#ifdef PY_INFO7_PATCH
 
4742
        PY_INFO7_PATCH(&dfs_Info7_Type);
 
4743
#endif
 
4744
#ifdef PY_INFO100_PATCH
 
4745
        PY_INFO100_PATCH(&dfs_Info100_Type);
 
4746
#endif
 
4747
#ifdef PY_INFO101_PATCH
 
4748
        PY_INFO101_PATCH(&dfs_Info101_Type);
 
4749
#endif
 
4750
#ifdef PY_INFO102_PATCH
 
4751
        PY_INFO102_PATCH(&dfs_Info102_Type);
 
4752
#endif
 
4753
#ifdef PY_INFO103_PATCH
 
4754
        PY_INFO103_PATCH(&dfs_Info103_Type);
 
4755
#endif
 
4756
#ifdef PY_INFO104_PATCH
 
4757
        PY_INFO104_PATCH(&dfs_Info104_Type);
 
4758
#endif
 
4759
#ifdef PY_INFO105_PATCH
 
4760
        PY_INFO105_PATCH(&dfs_Info105_Type);
 
4761
#endif
 
4762
#ifdef PY_INFO106_PATCH
 
4763
        PY_INFO106_PATCH(&dfs_Info106_Type);
 
4764
#endif
 
4765
#ifdef PY_INFO200_PATCH
 
4766
        PY_INFO200_PATCH(&dfs_Info200_Type);
 
4767
#endif
 
4768
#ifdef PY_INFO300_PATCH
 
4769
        PY_INFO300_PATCH(&dfs_Info300_Type);
 
4770
#endif
 
4771
#ifdef PY_ENUMARRAY1_PATCH
 
4772
        PY_ENUMARRAY1_PATCH(&dfs_EnumArray1_Type);
 
4773
#endif
 
4774
#ifdef PY_ENUMARRAY2_PATCH
 
4775
        PY_ENUMARRAY2_PATCH(&dfs_EnumArray2_Type);
 
4776
#endif
 
4777
#ifdef PY_ENUMARRAY3_PATCH
 
4778
        PY_ENUMARRAY3_PATCH(&dfs_EnumArray3_Type);
 
4779
#endif
 
4780
#ifdef PY_ENUMARRAY4_PATCH
 
4781
        PY_ENUMARRAY4_PATCH(&dfs_EnumArray4_Type);
 
4782
#endif
 
4783
#ifdef PY_ENUMARRAY5_PATCH
 
4784
        PY_ENUMARRAY5_PATCH(&dfs_EnumArray5_Type);
 
4785
#endif
 
4786
#ifdef PY_ENUMARRAY6_PATCH
 
4787
        PY_ENUMARRAY6_PATCH(&dfs_EnumArray6_Type);
 
4788
#endif
 
4789
#ifdef PY_ENUMARRAY200_PATCH
 
4790
        PY_ENUMARRAY200_PATCH(&dfs_EnumArray200_Type);
 
4791
#endif
 
4792
#ifdef PY_ENUMARRAY300_PATCH
 
4793
        PY_ENUMARRAY300_PATCH(&dfs_EnumArray300_Type);
 
4794
#endif
 
4795
#ifdef PY_ENUMSTRUCT_PATCH
 
4796
        PY_ENUMSTRUCT_PATCH(&dfs_EnumStruct_Type);
 
4797
#endif
 
4798
#ifdef PY_UNKNOWNSTRUCT_PATCH
 
4799
        PY_UNKNOWNSTRUCT_PATCH(&dfs_UnknownStruct_Type);
 
4800
#endif
 
4801
#ifdef PY_NETDFS_PATCH
 
4802
        PY_NETDFS_PATCH(&netdfs_InterfaceType);
 
4803
#endif
 
4804
 
 
4805
        m = Py_InitModule3("dfs", dfs_methods, "dfs DCE/RPC");
 
4806
        if (m == NULL)
 
4807
                return;
 
4808
 
 
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);
 
4900
#endif
 
4901
 
 
4902
}