~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

Viewing changes to source3/librpc/gen_ndr/py_wmi.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_wmi.h"
 
9
#include "librpc/gen_ndr/ndr_wmi_c.h"
 
10
 
 
11
#include "librpc/gen_ndr/orpc.h"
 
12
#include "librpc/gen_ndr/dcom.h"
 
13
#include "librpc/gen_ndr/misc.h"
 
14
staticforward PyTypeObject BSTR_Type;
 
15
staticforward PyTypeObject IWbemClassObject_InterfaceType;
 
16
 
 
17
staticforward PyTypeObject CIMSTRINGS_Type;
 
18
staticforward PyTypeObject IWbemServices_InterfaceType;
 
19
 
 
20
staticforward PyTypeObject IEnumWbemClassObject_InterfaceType;
 
21
 
 
22
staticforward PyTypeObject IWbemContext_InterfaceType;
 
23
 
 
24
staticforward PyTypeObject IWbemLevel1Login_InterfaceType;
 
25
 
 
26
staticforward PyTypeObject WBEMDATA_Type;
 
27
staticforward PyTypeObject WBEMDATA4_Type;
 
28
staticforward PyTypeObject WBEMDATA3_Type;
 
29
staticforward PyTypeObject WBEMDATA2_Type;
 
30
staticforward PyTypeObject WBEMDATA1_Type;
 
31
staticforward PyTypeObject WBEMDATA0_Type;
 
32
staticforward PyTypeObject IWbemWCOSmartEnum_InterfaceType;
 
33
 
 
34
staticforward PyTypeObject IWbemFetchSmartEnum_InterfaceType;
 
35
 
 
36
staticforward PyTypeObject IWbemCallResult_InterfaceType;
 
37
 
 
38
staticforward PyTypeObject IWbemObjectSink_InterfaceType;
 
39
 
 
40
void initwmi(void);static PyTypeObject *MInterfacePointer_Type;
 
41
static PyTypeObject *ORPCTHAT_Type;
 
42
static PyTypeObject *Object_Type;
 
43
static PyTypeObject *GUID_Type;
 
44
static PyTypeObject *ClientConnection_Type;
 
45
static PyTypeObject *ORPCTHIS_Type;
 
46
 
 
47
static PyObject *py_BSTR_get_flags(PyObject *obj, void *closure)
 
48
{
 
49
        struct BSTR *object = (struct BSTR *)py_talloc_get_ptr(obj);
 
50
        PyObject *py_flags;
 
51
        py_flags = PyInt_FromLong(object->flags);
 
52
        return py_flags;
 
53
}
 
54
 
 
55
static int py_BSTR_set_flags(PyObject *py_obj, PyObject *value, void *closure)
 
56
{
 
57
        struct BSTR *object = (struct BSTR *)py_talloc_get_ptr(py_obj);
 
58
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
59
        object->flags = PyInt_AsLong(value);
 
60
        return 0;
 
61
}
 
62
 
 
63
static PyObject *py_BSTR_get_data(PyObject *obj, void *closure)
 
64
{
 
65
        struct BSTR *object = (struct BSTR *)py_talloc_get_ptr(obj);
 
66
        PyObject *py_data;
 
67
        if (object->data == NULL) {
 
68
                py_data = Py_None;
 
69
                Py_INCREF(py_data);
 
70
        } else {
 
71
                py_data = PyUnicode_Decode(object->data, strlen(object->data), "utf-8", "ignore");
 
72
        }
 
73
        return py_data;
 
74
}
 
75
 
 
76
static int py_BSTR_set_data(PyObject *py_obj, PyObject *value, void *closure)
 
77
{
 
78
        struct BSTR *object = (struct BSTR *)py_talloc_get_ptr(py_obj);
 
79
        if (PyUnicode_Check(value)) {
 
80
                object->data = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
 
81
        } else if (PyString_Check(value)) {
 
82
                object->data = PyString_AS_STRING(value);
 
83
        } else {
 
84
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
 
85
                return -1;
 
86
        }
 
87
        return 0;
 
88
}
 
89
 
 
90
static PyGetSetDef py_BSTR_getsetters[] = {
 
91
        { discard_const_p(char, "flags"), py_BSTR_get_flags, py_BSTR_set_flags },
 
92
        { discard_const_p(char, "data"), py_BSTR_get_data, py_BSTR_set_data },
 
93
        { NULL }
 
94
};
 
95
 
 
96
static PyObject *py_BSTR_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
97
{
 
98
        return py_talloc_new(struct BSTR, type);
 
99
}
 
100
 
 
101
 
 
102
static PyTypeObject BSTR_Type = {
 
103
        PyObject_HEAD_INIT(NULL) 0,
 
104
        .tp_name = "wmi.BSTR",
 
105
        .tp_getset = py_BSTR_getsetters,
 
106
        .tp_methods = NULL,
 
107
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
108
        .tp_basicsize = sizeof(py_talloc_Object),
 
109
        .tp_new = py_BSTR_new,
 
110
};
 
111
 
 
112
 
 
113
static bool pack_py_Delete_args_in(PyObject *args, PyObject *kwargs, struct Delete *r)
 
114
{
 
115
        PyObject *py_ORPCthis;
 
116
        PyObject *py_wszName;
 
117
        const char *kwnames[] = {
 
118
                "ORPCthis", "wszName", NULL
 
119
        };
 
120
 
 
121
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:Delete", discard_const_p(char *, kwnames), &py_ORPCthis, &py_wszName)) {
 
122
                return false;
 
123
        }
 
124
 
 
125
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
126
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
127
                PyErr_NoMemory();
 
128
                return false;
 
129
        }
 
130
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
131
        r->in.wszName = talloc_ptrtype(r, r->in.wszName);
 
132
        if (PyUnicode_Check(py_wszName)) {
 
133
                r->in.wszName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszName, "utf-8", "ignore"));
 
134
        } else if (PyString_Check(py_wszName)) {
 
135
                r->in.wszName = PyString_AS_STRING(py_wszName);
 
136
        } else {
 
137
                PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszName)->tp_name);
 
138
                return false;
 
139
        }
 
140
        return true;
 
141
}
 
142
 
 
143
static PyObject *unpack_py_Delete_args_out(struct Delete *r)
 
144
{
 
145
        PyObject *result;
 
146
        PyObject *py_ORPCthat;
 
147
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
148
        result = py_ORPCthat;
 
149
        if (!W_ERROR_IS_OK(r->out.result)) {
 
150
                PyErr_SetWERROR(r->out.result);
 
151
                return NULL;
 
152
        }
 
153
 
 
154
        return result;
 
155
}
 
156
 
 
157
const struct PyNdrRpcMethodDef py_ndr_IWbemClassObject_methods[] = {
 
158
        { "Delete", "S.Delete(ORPCthis, wszName) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_Delete_r, (py_data_pack_fn)pack_py_Delete_args_in, (py_data_unpack_fn)unpack_py_Delete_args_out, 0, &ndr_table_IWbemClassObject },
 
159
        { NULL }
 
160
};
 
161
 
 
162
static PyObject *interface_IWbemClassObject_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
163
{
 
164
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemClassObject);
 
165
}
 
166
 
 
167
static PyTypeObject IWbemClassObject_InterfaceType = {
 
168
        PyObject_HEAD_INIT(NULL) 0,
 
169
        .tp_name = "wmi.IWbemClassObject",
 
170
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
171
        .tp_doc = "IWbemClassObject(binding, lp_ctx=None, credentials=None) -> connection\n"
 
172
"\n"
 
173
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
174
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
175
"credentials should be a credentials.Credentials object.\n\n",
 
176
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
177
        .tp_new = interface_IWbemClassObject_new,
 
178
};
 
179
 
 
180
 
 
181
static PyObject *py_CIMSTRINGS_get_count(PyObject *obj, void *closure)
 
182
{
 
183
        struct CIMSTRINGS *object = (struct CIMSTRINGS *)py_talloc_get_ptr(obj);
 
184
        PyObject *py_count;
 
185
        py_count = PyInt_FromLong(object->count);
 
186
        return py_count;
 
187
}
 
188
 
 
189
static int py_CIMSTRINGS_set_count(PyObject *py_obj, PyObject *value, void *closure)
 
190
{
 
191
        struct CIMSTRINGS *object = (struct CIMSTRINGS *)py_talloc_get_ptr(py_obj);
 
192
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
193
        object->count = PyInt_AsLong(value);
 
194
        return 0;
 
195
}
 
196
 
 
197
static PyObject *py_CIMSTRINGS_get_item(PyObject *obj, void *closure)
 
198
{
 
199
        struct CIMSTRINGS *object = (struct CIMSTRINGS *)py_talloc_get_ptr(obj);
 
200
        PyObject *py_item;
 
201
        py_item = PyList_New(object->count);
 
202
        if (py_item == NULL) {
 
203
                return NULL;
 
204
        }
 
205
        {
 
206
                int item_cntr_0;
 
207
                for (item_cntr_0 = 0; item_cntr_0 < object->count; item_cntr_0++) {
 
208
                        PyObject *py_item_0;
 
209
                        py_item_0 = PyInt_FromLong(*object->item[item_cntr_0]);
 
210
                        PyList_SetItem(py_item, item_cntr_0, py_item_0);
 
211
                }
 
212
        }
 
213
        return py_item;
 
214
}
 
215
 
 
216
static int py_CIMSTRINGS_set_item(PyObject *py_obj, PyObject *value, void *closure)
 
217
{
 
218
        struct CIMSTRINGS *object = (struct CIMSTRINGS *)py_talloc_get_ptr(py_obj);
 
219
        PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
220
        {
 
221
                int item_cntr_0;
 
222
                object->item = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->item, PyList_GET_SIZE(value));
 
223
                if (!object->item) { return -1;; }
 
224
                talloc_set_name_const(object->item, "ARRAY: object->item");
 
225
                for (item_cntr_0 = 0; item_cntr_0 < PyList_GET_SIZE(value); item_cntr_0++) {
 
226
                        object->item[item_cntr_0] = talloc_ptrtype(object->item, object->item[item_cntr_0]);
 
227
                        PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, item_cntr_0), return -1;);
 
228
                        *object->item[item_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, item_cntr_0));
 
229
                }
 
230
        }
 
231
        return 0;
 
232
}
 
233
 
 
234
static PyGetSetDef py_CIMSTRINGS_getsetters[] = {
 
235
        { discard_const_p(char, "count"), py_CIMSTRINGS_get_count, py_CIMSTRINGS_set_count },
 
236
        { discard_const_p(char, "item"), py_CIMSTRINGS_get_item, py_CIMSTRINGS_set_item },
 
237
        { NULL }
 
238
};
 
239
 
 
240
static PyObject *py_CIMSTRINGS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
241
{
 
242
        return py_talloc_new(struct CIMSTRINGS, type);
 
243
}
 
244
 
 
245
 
 
246
static PyTypeObject CIMSTRINGS_Type = {
 
247
        PyObject_HEAD_INIT(NULL) 0,
 
248
        .tp_name = "wmi.CIMSTRINGS",
 
249
        .tp_getset = py_CIMSTRINGS_getsetters,
 
250
        .tp_methods = NULL,
 
251
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
252
        .tp_basicsize = sizeof(py_talloc_Object),
 
253
        .tp_new = py_CIMSTRINGS_new,
 
254
};
 
255
 
 
256
 
 
257
static bool pack_py_OpenNamespace_args_in(PyObject *args, PyObject *kwargs, struct OpenNamespace *r)
 
258
{
 
259
        PyObject *py_ORPCthis;
 
260
        PyObject *py_strNamespace;
 
261
        PyObject *py_lFlags;
 
262
        PyObject *py_pCtx;
 
263
        PyObject *py_ppWorkingNamespace;
 
264
        PyObject *py_ppResult;
 
265
        const char *kwnames[] = {
 
266
                "ORPCthis", "strNamespace", "lFlags", "pCtx", "ppWorkingNamespace", "ppResult", NULL
 
267
        };
 
268
 
 
269
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:OpenNamespace", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strNamespace, &py_lFlags, &py_pCtx, &py_ppWorkingNamespace, &py_ppResult)) {
 
270
                return false;
 
271
        }
 
272
 
 
273
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
274
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
275
                PyErr_NoMemory();
 
276
                return false;
 
277
        }
 
278
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
279
        PY_CHECK_TYPE(&BSTR_Type, py_strNamespace, return false;);
 
280
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strNamespace)) == NULL) {
 
281
                PyErr_NoMemory();
 
282
                return false;
 
283
        }
 
284
        r->in.strNamespace = *(struct BSTR *)py_talloc_get_ptr(py_strNamespace);
 
285
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
286
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
287
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
288
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
289
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
290
                PyErr_NoMemory();
 
291
                return false;
 
292
        }
 
293
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
294
        if (py_ppWorkingNamespace == Py_None) {
 
295
                r->in.ppWorkingNamespace = NULL;
 
296
        } else {
 
297
                r->in.ppWorkingNamespace = NULL;
 
298
                if (py_ppWorkingNamespace == Py_None) {
 
299
                        *r->in.ppWorkingNamespace = NULL;
 
300
                } else {
 
301
                        *r->in.ppWorkingNamespace = NULL;
 
302
                        PY_CHECK_TYPE(MInterfacePointer_Type, py_ppWorkingNamespace, return false;);
 
303
                        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppWorkingNamespace)) == NULL) {
 
304
                                PyErr_NoMemory();
 
305
                                return false;
 
306
                        }
 
307
                        *r->in.ppWorkingNamespace = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppWorkingNamespace);
 
308
                }
 
309
        }
 
310
        if (py_ppResult == Py_None) {
 
311
                r->in.ppResult = NULL;
 
312
        } else {
 
313
                r->in.ppResult = NULL;
 
314
                if (py_ppResult == Py_None) {
 
315
                        *r->in.ppResult = NULL;
 
316
                } else {
 
317
                        *r->in.ppResult = NULL;
 
318
                        PY_CHECK_TYPE(MInterfacePointer_Type, py_ppResult, return false;);
 
319
                        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppResult)) == NULL) {
 
320
                                PyErr_NoMemory();
 
321
                                return false;
 
322
                        }
 
323
                        *r->in.ppResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppResult);
 
324
                }
 
325
        }
 
326
        return true;
 
327
}
 
328
 
 
329
static PyObject *unpack_py_OpenNamespace_args_out(struct OpenNamespace *r)
 
330
{
 
331
        PyObject *result;
 
332
        PyObject *py_ORPCthat;
 
333
        PyObject *py_ppWorkingNamespace;
 
334
        PyObject *py_ppResult;
 
335
        result = PyTuple_New(3);
 
336
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
337
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
338
        if (r->out.ppWorkingNamespace == NULL) {
 
339
                py_ppWorkingNamespace = Py_None;
 
340
                Py_INCREF(py_ppWorkingNamespace);
 
341
        } else {
 
342
                if (*r->out.ppWorkingNamespace == NULL) {
 
343
                        py_ppWorkingNamespace = Py_None;
 
344
                        Py_INCREF(py_ppWorkingNamespace);
 
345
                } else {
 
346
                        py_ppWorkingNamespace = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppWorkingNamespace, *r->out.ppWorkingNamespace);
 
347
                }
 
348
        }
 
349
        PyTuple_SetItem(result, 1, py_ppWorkingNamespace);
 
350
        if (r->out.ppResult == NULL) {
 
351
                py_ppResult = Py_None;
 
352
                Py_INCREF(py_ppResult);
 
353
        } else {
 
354
                if (*r->out.ppResult == NULL) {
 
355
                        py_ppResult = Py_None;
 
356
                        Py_INCREF(py_ppResult);
 
357
                } else {
 
358
                        py_ppResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppResult, *r->out.ppResult);
 
359
                }
 
360
        }
 
361
        PyTuple_SetItem(result, 2, py_ppResult);
 
362
        if (!W_ERROR_IS_OK(r->out.result)) {
 
363
                PyErr_SetWERROR(r->out.result);
 
364
                return NULL;
 
365
        }
 
366
 
 
367
        return result;
 
368
}
 
369
 
 
370
static bool pack_py_CancelAsyncCall_args_in(PyObject *args, PyObject *kwargs, struct CancelAsyncCall *r)
 
371
{
 
372
        PyObject *py_ORPCthis;
 
373
        PyObject *py_pSink;
 
374
        const char *kwnames[] = {
 
375
                "ORPCthis", "pSink", NULL
 
376
        };
 
377
 
 
378
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:CancelAsyncCall", discard_const_p(char *, kwnames), &py_ORPCthis, &py_pSink)) {
 
379
                return false;
 
380
        }
 
381
 
 
382
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
383
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
384
                PyErr_NoMemory();
 
385
                return false;
 
386
        }
 
387
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
388
        r->in.pSink = talloc_ptrtype(r, r->in.pSink);
 
389
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pSink, return false;);
 
390
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pSink)) == NULL) {
 
391
                PyErr_NoMemory();
 
392
                return false;
 
393
        }
 
394
        r->in.pSink = (struct MInterfacePointer *)py_talloc_get_ptr(py_pSink);
 
395
        return true;
 
396
}
 
397
 
 
398
static PyObject *unpack_py_CancelAsyncCall_args_out(struct CancelAsyncCall *r)
 
399
{
 
400
        PyObject *result;
 
401
        PyObject *py_ORPCthat;
 
402
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
403
        result = py_ORPCthat;
 
404
        if (!W_ERROR_IS_OK(r->out.result)) {
 
405
                PyErr_SetWERROR(r->out.result);
 
406
                return NULL;
 
407
        }
 
408
 
 
409
        return result;
 
410
}
 
411
 
 
412
static bool pack_py_QueryObjectSink_args_in(PyObject *args, PyObject *kwargs, struct QueryObjectSink *r)
 
413
{
 
414
        PyObject *py_ORPCthis;
 
415
        PyObject *py_lFlags;
 
416
        const char *kwnames[] = {
 
417
                "ORPCthis", "lFlags", NULL
 
418
        };
 
419
 
 
420
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:QueryObjectSink", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lFlags)) {
 
421
                return false;
 
422
        }
 
423
 
 
424
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
425
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
426
                PyErr_NoMemory();
 
427
                return false;
 
428
        }
 
429
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
430
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
431
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
432
        return true;
 
433
}
 
434
 
 
435
static PyObject *unpack_py_QueryObjectSink_args_out(struct QueryObjectSink *r)
 
436
{
 
437
        PyObject *result;
 
438
        PyObject *py_ORPCthat;
 
439
        PyObject *py_ppResponseHandler;
 
440
        result = PyTuple_New(2);
 
441
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
442
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
443
        if (*r->out.ppResponseHandler == NULL) {
 
444
                py_ppResponseHandler = Py_None;
 
445
                Py_INCREF(py_ppResponseHandler);
 
446
        } else {
 
447
                py_ppResponseHandler = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppResponseHandler, *r->out.ppResponseHandler);
 
448
        }
 
449
        PyTuple_SetItem(result, 1, py_ppResponseHandler);
 
450
        if (!W_ERROR_IS_OK(r->out.result)) {
 
451
                PyErr_SetWERROR(r->out.result);
 
452
                return NULL;
 
453
        }
 
454
 
 
455
        return result;
 
456
}
 
457
 
 
458
static bool pack_py_GetObject_args_in(PyObject *args, PyObject *kwargs, struct GetObject *r)
 
459
{
 
460
        PyObject *py_ORPCthis;
 
461
        PyObject *py_strObjectPath;
 
462
        PyObject *py_lFlags;
 
463
        PyObject *py_pCtx;
 
464
        PyObject *py_ppObject;
 
465
        PyObject *py_ppCallResult;
 
466
        const char *kwnames[] = {
 
467
                "ORPCthis", "strObjectPath", "lFlags", "pCtx", "ppObject", "ppCallResult", NULL
 
468
        };
 
469
 
 
470
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:GetObject", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_lFlags, &py_pCtx, &py_ppObject, &py_ppCallResult)) {
 
471
                return false;
 
472
        }
 
473
 
 
474
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
475
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
476
                PyErr_NoMemory();
 
477
                return false;
 
478
        }
 
479
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
480
        PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
 
481
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
 
482
                PyErr_NoMemory();
 
483
                return false;
 
484
        }
 
485
        r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
 
486
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
487
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
488
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
489
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
490
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
491
                PyErr_NoMemory();
 
492
                return false;
 
493
        }
 
494
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
495
        if (py_ppObject == Py_None) {
 
496
                r->in.ppObject = NULL;
 
497
        } else {
 
498
                r->in.ppObject = NULL;
 
499
                if (py_ppObject == Py_None) {
 
500
                        *r->in.ppObject = NULL;
 
501
                } else {
 
502
                        *r->in.ppObject = NULL;
 
503
                        PY_CHECK_TYPE(MInterfacePointer_Type, py_ppObject, return false;);
 
504
                        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppObject)) == NULL) {
 
505
                                PyErr_NoMemory();
 
506
                                return false;
 
507
                        }
 
508
                        *r->in.ppObject = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppObject);
 
509
                }
 
510
        }
 
511
        if (py_ppCallResult == Py_None) {
 
512
                r->in.ppCallResult = NULL;
 
513
        } else {
 
514
                r->in.ppCallResult = NULL;
 
515
                if (py_ppCallResult == Py_None) {
 
516
                        *r->in.ppCallResult = NULL;
 
517
                } else {
 
518
                        *r->in.ppCallResult = NULL;
 
519
                        PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
 
520
                        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
 
521
                                PyErr_NoMemory();
 
522
                                return false;
 
523
                        }
 
524
                        *r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
 
525
                }
 
526
        }
 
527
        return true;
 
528
}
 
529
 
 
530
static PyObject *unpack_py_GetObject_args_out(struct GetObject *r)
 
531
{
 
532
        PyObject *result;
 
533
        PyObject *py_ORPCthat;
 
534
        PyObject *py_ppObject;
 
535
        PyObject *py_ppCallResult;
 
536
        result = PyTuple_New(3);
 
537
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
538
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
539
        if (r->out.ppObject == NULL) {
 
540
                py_ppObject = Py_None;
 
541
                Py_INCREF(py_ppObject);
 
542
        } else {
 
543
                if (*r->out.ppObject == NULL) {
 
544
                        py_ppObject = Py_None;
 
545
                        Py_INCREF(py_ppObject);
 
546
                } else {
 
547
                        py_ppObject = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppObject, *r->out.ppObject);
 
548
                }
 
549
        }
 
550
        PyTuple_SetItem(result, 1, py_ppObject);
 
551
        if (r->out.ppCallResult == NULL) {
 
552
                py_ppCallResult = Py_None;
 
553
                Py_INCREF(py_ppCallResult);
 
554
        } else {
 
555
                if (*r->out.ppCallResult == NULL) {
 
556
                        py_ppCallResult = Py_None;
 
557
                        Py_INCREF(py_ppCallResult);
 
558
                } else {
 
559
                        py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
 
560
                }
 
561
        }
 
562
        PyTuple_SetItem(result, 2, py_ppCallResult);
 
563
        if (!W_ERROR_IS_OK(r->out.result)) {
 
564
                PyErr_SetWERROR(r->out.result);
 
565
                return NULL;
 
566
        }
 
567
 
 
568
        return result;
 
569
}
 
570
 
 
571
static bool pack_py_GetObjectAsync_args_in(PyObject *args, PyObject *kwargs, struct GetObjectAsync *r)
 
572
{
 
573
        PyObject *py_ORPCthis;
 
574
        PyObject *py_strObjectPath;
 
575
        PyObject *py_lFlags;
 
576
        PyObject *py_pCtx;
 
577
        PyObject *py_pResponseHandler;
 
578
        const char *kwnames[] = {
 
579
                "ORPCthis", "strObjectPath", "lFlags", "pCtx", "pResponseHandler", NULL
 
580
        };
 
581
 
 
582
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:GetObjectAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
 
583
                return false;
 
584
        }
 
585
 
 
586
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
587
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
588
                PyErr_NoMemory();
 
589
                return false;
 
590
        }
 
591
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
592
        PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
 
593
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
 
594
                PyErr_NoMemory();
 
595
                return false;
 
596
        }
 
597
        r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
 
598
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
599
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
600
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
601
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
602
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
603
                PyErr_NoMemory();
 
604
                return false;
 
605
        }
 
606
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
607
        r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
 
608
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
 
609
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
 
610
                PyErr_NoMemory();
 
611
                return false;
 
612
        }
 
613
        r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
 
614
        return true;
 
615
}
 
616
 
 
617
static PyObject *unpack_py_GetObjectAsync_args_out(struct GetObjectAsync *r)
 
618
{
 
619
        PyObject *result;
 
620
        PyObject *py_ORPCthat;
 
621
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
622
        result = py_ORPCthat;
 
623
        if (!W_ERROR_IS_OK(r->out.result)) {
 
624
                PyErr_SetWERROR(r->out.result);
 
625
                return NULL;
 
626
        }
 
627
 
 
628
        return result;
 
629
}
 
630
 
 
631
static bool pack_py_PutClass_args_in(PyObject *args, PyObject *kwargs, struct PutClass *r)
 
632
{
 
633
        PyObject *py_ORPCthis;
 
634
        PyObject *py_pObject;
 
635
        PyObject *py_lFlags;
 
636
        PyObject *py_pCtx;
 
637
        PyObject *py_ppCallResult;
 
638
        const char *kwnames[] = {
 
639
                "ORPCthis", "pObject", "lFlags", "pCtx", "ppCallResult", NULL
 
640
        };
 
641
 
 
642
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:PutClass", discard_const_p(char *, kwnames), &py_ORPCthis, &py_pObject, &py_lFlags, &py_pCtx, &py_ppCallResult)) {
 
643
                return false;
 
644
        }
 
645
 
 
646
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
647
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
648
                PyErr_NoMemory();
 
649
                return false;
 
650
        }
 
651
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
652
        r->in.pObject = talloc_ptrtype(r, r->in.pObject);
 
653
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pObject, return false;);
 
654
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pObject)) == NULL) {
 
655
                PyErr_NoMemory();
 
656
                return false;
 
657
        }
 
658
        r->in.pObject = (struct MInterfacePointer *)py_talloc_get_ptr(py_pObject);
 
659
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
660
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
661
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
662
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
663
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
664
                PyErr_NoMemory();
 
665
                return false;
 
666
        }
 
667
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
668
        if (py_ppCallResult == Py_None) {
 
669
                r->in.ppCallResult = NULL;
 
670
        } else {
 
671
                r->in.ppCallResult = NULL;
 
672
                if (py_ppCallResult == Py_None) {
 
673
                        *r->in.ppCallResult = NULL;
 
674
                } else {
 
675
                        *r->in.ppCallResult = NULL;
 
676
                        PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
 
677
                        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
 
678
                                PyErr_NoMemory();
 
679
                                return false;
 
680
                        }
 
681
                        *r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
 
682
                }
 
683
        }
 
684
        return true;
 
685
}
 
686
 
 
687
static PyObject *unpack_py_PutClass_args_out(struct PutClass *r)
 
688
{
 
689
        PyObject *result;
 
690
        PyObject *py_ORPCthat;
 
691
        PyObject *py_ppCallResult;
 
692
        result = PyTuple_New(2);
 
693
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
694
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
695
        if (r->out.ppCallResult == NULL) {
 
696
                py_ppCallResult = Py_None;
 
697
                Py_INCREF(py_ppCallResult);
 
698
        } else {
 
699
                if (*r->out.ppCallResult == NULL) {
 
700
                        py_ppCallResult = Py_None;
 
701
                        Py_INCREF(py_ppCallResult);
 
702
                } else {
 
703
                        py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
 
704
                }
 
705
        }
 
706
        PyTuple_SetItem(result, 1, py_ppCallResult);
 
707
        if (!W_ERROR_IS_OK(r->out.result)) {
 
708
                PyErr_SetWERROR(r->out.result);
 
709
                return NULL;
 
710
        }
 
711
 
 
712
        return result;
 
713
}
 
714
 
 
715
static bool pack_py_PutClassAsync_args_in(PyObject *args, PyObject *kwargs, struct PutClassAsync *r)
 
716
{
 
717
        PyObject *py_ORPCthis;
 
718
        PyObject *py_pObject;
 
719
        PyObject *py_lFlags;
 
720
        PyObject *py_pCtx;
 
721
        PyObject *py_pResponseHandler;
 
722
        const char *kwnames[] = {
 
723
                "ORPCthis", "pObject", "lFlags", "pCtx", "pResponseHandler", NULL
 
724
        };
 
725
 
 
726
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:PutClassAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_pObject, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
 
727
                return false;
 
728
        }
 
729
 
 
730
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
731
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
732
                PyErr_NoMemory();
 
733
                return false;
 
734
        }
 
735
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
736
        r->in.pObject = talloc_ptrtype(r, r->in.pObject);
 
737
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pObject, return false;);
 
738
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pObject)) == NULL) {
 
739
                PyErr_NoMemory();
 
740
                return false;
 
741
        }
 
742
        r->in.pObject = (struct MInterfacePointer *)py_talloc_get_ptr(py_pObject);
 
743
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
744
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
745
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
746
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
747
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
748
                PyErr_NoMemory();
 
749
                return false;
 
750
        }
 
751
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
752
        r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
 
753
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
 
754
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
 
755
                PyErr_NoMemory();
 
756
                return false;
 
757
        }
 
758
        r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
 
759
        return true;
 
760
}
 
761
 
 
762
static PyObject *unpack_py_PutClassAsync_args_out(struct PutClassAsync *r)
 
763
{
 
764
        PyObject *result;
 
765
        PyObject *py_ORPCthat;
 
766
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
767
        result = py_ORPCthat;
 
768
        if (!W_ERROR_IS_OK(r->out.result)) {
 
769
                PyErr_SetWERROR(r->out.result);
 
770
                return NULL;
 
771
        }
 
772
 
 
773
        return result;
 
774
}
 
775
 
 
776
static bool pack_py_DeleteClass_args_in(PyObject *args, PyObject *kwargs, struct DeleteClass *r)
 
777
{
 
778
        PyObject *py_ORPCthis;
 
779
        PyObject *py_strClass;
 
780
        PyObject *py_lFlags;
 
781
        PyObject *py_pCtx;
 
782
        PyObject *py_ppCallResult;
 
783
        const char *kwnames[] = {
 
784
                "ORPCthis", "strClass", "lFlags", "pCtx", "ppCallResult", NULL
 
785
        };
 
786
 
 
787
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DeleteClass", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strClass, &py_lFlags, &py_pCtx, &py_ppCallResult)) {
 
788
                return false;
 
789
        }
 
790
 
 
791
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
792
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
793
                PyErr_NoMemory();
 
794
                return false;
 
795
        }
 
796
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
797
        PY_CHECK_TYPE(&BSTR_Type, py_strClass, return false;);
 
798
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strClass)) == NULL) {
 
799
                PyErr_NoMemory();
 
800
                return false;
 
801
        }
 
802
        r->in.strClass = *(struct BSTR *)py_talloc_get_ptr(py_strClass);
 
803
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
804
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
805
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
806
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
807
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
808
                PyErr_NoMemory();
 
809
                return false;
 
810
        }
 
811
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
812
        if (py_ppCallResult == Py_None) {
 
813
                r->in.ppCallResult = NULL;
 
814
        } else {
 
815
                r->in.ppCallResult = NULL;
 
816
                if (py_ppCallResult == Py_None) {
 
817
                        *r->in.ppCallResult = NULL;
 
818
                } else {
 
819
                        *r->in.ppCallResult = NULL;
 
820
                        PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
 
821
                        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
 
822
                                PyErr_NoMemory();
 
823
                                return false;
 
824
                        }
 
825
                        *r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
 
826
                }
 
827
        }
 
828
        return true;
 
829
}
 
830
 
 
831
static PyObject *unpack_py_DeleteClass_args_out(struct DeleteClass *r)
 
832
{
 
833
        PyObject *result;
 
834
        PyObject *py_ORPCthat;
 
835
        PyObject *py_ppCallResult;
 
836
        result = PyTuple_New(2);
 
837
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
838
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
839
        if (r->out.ppCallResult == NULL) {
 
840
                py_ppCallResult = Py_None;
 
841
                Py_INCREF(py_ppCallResult);
 
842
        } else {
 
843
                if (*r->out.ppCallResult == NULL) {
 
844
                        py_ppCallResult = Py_None;
 
845
                        Py_INCREF(py_ppCallResult);
 
846
                } else {
 
847
                        py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
 
848
                }
 
849
        }
 
850
        PyTuple_SetItem(result, 1, py_ppCallResult);
 
851
        if (!W_ERROR_IS_OK(r->out.result)) {
 
852
                PyErr_SetWERROR(r->out.result);
 
853
                return NULL;
 
854
        }
 
855
 
 
856
        return result;
 
857
}
 
858
 
 
859
static bool pack_py_DeleteClassAsync_args_in(PyObject *args, PyObject *kwargs, struct DeleteClassAsync *r)
 
860
{
 
861
        PyObject *py_ORPCthis;
 
862
        PyObject *py_strClass;
 
863
        PyObject *py_lFlags;
 
864
        PyObject *py_pCtx;
 
865
        PyObject *py_pResponseHandler;
 
866
        const char *kwnames[] = {
 
867
                "ORPCthis", "strClass", "lFlags", "pCtx", "pResponseHandler", NULL
 
868
        };
 
869
 
 
870
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DeleteClassAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strClass, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
 
871
                return false;
 
872
        }
 
873
 
 
874
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
875
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
876
                PyErr_NoMemory();
 
877
                return false;
 
878
        }
 
879
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
880
        PY_CHECK_TYPE(&BSTR_Type, py_strClass, return false;);
 
881
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strClass)) == NULL) {
 
882
                PyErr_NoMemory();
 
883
                return false;
 
884
        }
 
885
        r->in.strClass = *(struct BSTR *)py_talloc_get_ptr(py_strClass);
 
886
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
887
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
888
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
889
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
890
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
891
                PyErr_NoMemory();
 
892
                return false;
 
893
        }
 
894
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
895
        r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
 
896
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
 
897
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
 
898
                PyErr_NoMemory();
 
899
                return false;
 
900
        }
 
901
        r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
 
902
        return true;
 
903
}
 
904
 
 
905
static PyObject *unpack_py_DeleteClassAsync_args_out(struct DeleteClassAsync *r)
 
906
{
 
907
        PyObject *result;
 
908
        PyObject *py_ORPCthat;
 
909
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
910
        result = py_ORPCthat;
 
911
        if (!W_ERROR_IS_OK(r->out.result)) {
 
912
                PyErr_SetWERROR(r->out.result);
 
913
                return NULL;
 
914
        }
 
915
 
 
916
        return result;
 
917
}
 
918
 
 
919
static bool pack_py_CreateClassEnum_args_in(PyObject *args, PyObject *kwargs, struct CreateClassEnum *r)
 
920
{
 
921
        PyObject *py_ORPCthis;
 
922
        PyObject *py_strSuperclass;
 
923
        PyObject *py_lFlags;
 
924
        PyObject *py_pCtx;
 
925
        const char *kwnames[] = {
 
926
                "ORPCthis", "strSuperclass", "lFlags", "pCtx", NULL
 
927
        };
 
928
 
 
929
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:CreateClassEnum", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strSuperclass, &py_lFlags, &py_pCtx)) {
 
930
                return false;
 
931
        }
 
932
 
 
933
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
934
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
935
                PyErr_NoMemory();
 
936
                return false;
 
937
        }
 
938
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
939
        PY_CHECK_TYPE(&BSTR_Type, py_strSuperclass, return false;);
 
940
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strSuperclass)) == NULL) {
 
941
                PyErr_NoMemory();
 
942
                return false;
 
943
        }
 
944
        r->in.strSuperclass = *(struct BSTR *)py_talloc_get_ptr(py_strSuperclass);
 
945
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
946
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
947
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
948
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
949
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
950
                PyErr_NoMemory();
 
951
                return false;
 
952
        }
 
953
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
954
        return true;
 
955
}
 
956
 
 
957
static PyObject *unpack_py_CreateClassEnum_args_out(struct CreateClassEnum *r)
 
958
{
 
959
        PyObject *result;
 
960
        PyObject *py_ORPCthat;
 
961
        PyObject *py_ppEnum;
 
962
        result = PyTuple_New(2);
 
963
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
964
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
965
        if (*r->out.ppEnum == NULL) {
 
966
                py_ppEnum = Py_None;
 
967
                Py_INCREF(py_ppEnum);
 
968
        } else {
 
969
                py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
 
970
        }
 
971
        PyTuple_SetItem(result, 1, py_ppEnum);
 
972
        if (!W_ERROR_IS_OK(r->out.result)) {
 
973
                PyErr_SetWERROR(r->out.result);
 
974
                return NULL;
 
975
        }
 
976
 
 
977
        return result;
 
978
}
 
979
 
 
980
static bool pack_py_CreateClassEnumAsync_args_in(PyObject *args, PyObject *kwargs, struct CreateClassEnumAsync *r)
 
981
{
 
982
        PyObject *py_ORPCthis;
 
983
        PyObject *py_strSuperclass;
 
984
        PyObject *py_lFlags;
 
985
        PyObject *py_pCtx;
 
986
        PyObject *py_pResponseHandler;
 
987
        const char *kwnames[] = {
 
988
                "ORPCthis", "strSuperclass", "lFlags", "pCtx", "pResponseHandler", NULL
 
989
        };
 
990
 
 
991
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:CreateClassEnumAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strSuperclass, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
 
992
                return false;
 
993
        }
 
994
 
 
995
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
996
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
997
                PyErr_NoMemory();
 
998
                return false;
 
999
        }
 
1000
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1001
        PY_CHECK_TYPE(&BSTR_Type, py_strSuperclass, return false;);
 
1002
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strSuperclass)) == NULL) {
 
1003
                PyErr_NoMemory();
 
1004
                return false;
 
1005
        }
 
1006
        r->in.strSuperclass = *(struct BSTR *)py_talloc_get_ptr(py_strSuperclass);
 
1007
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1008
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1009
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
1010
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1011
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1012
                PyErr_NoMemory();
 
1013
                return false;
 
1014
        }
 
1015
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1016
        r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
 
1017
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
 
1018
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
 
1019
                PyErr_NoMemory();
 
1020
                return false;
 
1021
        }
 
1022
        r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
 
1023
        return true;
 
1024
}
 
1025
 
 
1026
static PyObject *unpack_py_CreateClassEnumAsync_args_out(struct CreateClassEnumAsync *r)
 
1027
{
 
1028
        PyObject *result;
 
1029
        PyObject *py_ORPCthat;
 
1030
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1031
        result = py_ORPCthat;
 
1032
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1033
                PyErr_SetWERROR(r->out.result);
 
1034
                return NULL;
 
1035
        }
 
1036
 
 
1037
        return result;
 
1038
}
 
1039
 
 
1040
static bool pack_py_PutInstance_args_in(PyObject *args, PyObject *kwargs, struct PutInstance *r)
 
1041
{
 
1042
        PyObject *py_ORPCthis;
 
1043
        PyObject *py_pInst;
 
1044
        PyObject *py_lFlags;
 
1045
        PyObject *py_pCtx;
 
1046
        PyObject *py_ppCallResult;
 
1047
        const char *kwnames[] = {
 
1048
                "ORPCthis", "pInst", "lFlags", "pCtx", "ppCallResult", NULL
 
1049
        };
 
1050
 
 
1051
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:PutInstance", discard_const_p(char *, kwnames), &py_ORPCthis, &py_pInst, &py_lFlags, &py_pCtx, &py_ppCallResult)) {
 
1052
                return false;
 
1053
        }
 
1054
 
 
1055
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1056
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1057
                PyErr_NoMemory();
 
1058
                return false;
 
1059
        }
 
1060
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1061
        r->in.pInst = talloc_ptrtype(r, r->in.pInst);
 
1062
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pInst, return false;);
 
1063
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pInst)) == NULL) {
 
1064
                PyErr_NoMemory();
 
1065
                return false;
 
1066
        }
 
1067
        r->in.pInst = (struct MInterfacePointer *)py_talloc_get_ptr(py_pInst);
 
1068
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1069
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1070
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
1071
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1072
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1073
                PyErr_NoMemory();
 
1074
                return false;
 
1075
        }
 
1076
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1077
        if (py_ppCallResult == Py_None) {
 
1078
                r->in.ppCallResult = NULL;
 
1079
        } else {
 
1080
                r->in.ppCallResult = NULL;
 
1081
                if (py_ppCallResult == Py_None) {
 
1082
                        *r->in.ppCallResult = NULL;
 
1083
                } else {
 
1084
                        *r->in.ppCallResult = NULL;
 
1085
                        PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
 
1086
                        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
 
1087
                                PyErr_NoMemory();
 
1088
                                return false;
 
1089
                        }
 
1090
                        *r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
 
1091
                }
 
1092
        }
 
1093
        return true;
 
1094
}
 
1095
 
 
1096
static PyObject *unpack_py_PutInstance_args_out(struct PutInstance *r)
 
1097
{
 
1098
        PyObject *result;
 
1099
        PyObject *py_ORPCthat;
 
1100
        PyObject *py_ppCallResult;
 
1101
        result = PyTuple_New(2);
 
1102
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1103
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
1104
        if (r->out.ppCallResult == NULL) {
 
1105
                py_ppCallResult = Py_None;
 
1106
                Py_INCREF(py_ppCallResult);
 
1107
        } else {
 
1108
                if (*r->out.ppCallResult == NULL) {
 
1109
                        py_ppCallResult = Py_None;
 
1110
                        Py_INCREF(py_ppCallResult);
 
1111
                } else {
 
1112
                        py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
 
1113
                }
 
1114
        }
 
1115
        PyTuple_SetItem(result, 1, py_ppCallResult);
 
1116
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1117
                PyErr_SetWERROR(r->out.result);
 
1118
                return NULL;
 
1119
        }
 
1120
 
 
1121
        return result;
 
1122
}
 
1123
 
 
1124
static bool pack_py_PutInstanceAsync_args_in(PyObject *args, PyObject *kwargs, struct PutInstanceAsync *r)
 
1125
{
 
1126
        PyObject *py_ORPCthis;
 
1127
        PyObject *py_pInst;
 
1128
        PyObject *py_lFlags;
 
1129
        PyObject *py_pCtx;
 
1130
        PyObject *py_pResponseHandler;
 
1131
        const char *kwnames[] = {
 
1132
                "ORPCthis", "pInst", "lFlags", "pCtx", "pResponseHandler", NULL
 
1133
        };
 
1134
 
 
1135
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:PutInstanceAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_pInst, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
 
1136
                return false;
 
1137
        }
 
1138
 
 
1139
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1140
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1141
                PyErr_NoMemory();
 
1142
                return false;
 
1143
        }
 
1144
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1145
        r->in.pInst = talloc_ptrtype(r, r->in.pInst);
 
1146
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pInst, return false;);
 
1147
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pInst)) == NULL) {
 
1148
                PyErr_NoMemory();
 
1149
                return false;
 
1150
        }
 
1151
        r->in.pInst = (struct MInterfacePointer *)py_talloc_get_ptr(py_pInst);
 
1152
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1153
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1154
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
1155
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1156
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1157
                PyErr_NoMemory();
 
1158
                return false;
 
1159
        }
 
1160
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1161
        r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
 
1162
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
 
1163
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
 
1164
                PyErr_NoMemory();
 
1165
                return false;
 
1166
        }
 
1167
        r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
 
1168
        return true;
 
1169
}
 
1170
 
 
1171
static PyObject *unpack_py_PutInstanceAsync_args_out(struct PutInstanceAsync *r)
 
1172
{
 
1173
        PyObject *result;
 
1174
        PyObject *py_ORPCthat;
 
1175
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1176
        result = py_ORPCthat;
 
1177
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1178
                PyErr_SetWERROR(r->out.result);
 
1179
                return NULL;
 
1180
        }
 
1181
 
 
1182
        return result;
 
1183
}
 
1184
 
 
1185
static bool pack_py_DeleteInstance_args_in(PyObject *args, PyObject *kwargs, struct DeleteInstance *r)
 
1186
{
 
1187
        PyObject *py_ORPCthis;
 
1188
        PyObject *py_strObjectPath;
 
1189
        PyObject *py_lFlags;
 
1190
        PyObject *py_pCtx;
 
1191
        PyObject *py_ppCallResult;
 
1192
        const char *kwnames[] = {
 
1193
                "ORPCthis", "strObjectPath", "lFlags", "pCtx", "ppCallResult", NULL
 
1194
        };
 
1195
 
 
1196
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DeleteInstance", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_lFlags, &py_pCtx, &py_ppCallResult)) {
 
1197
                return false;
 
1198
        }
 
1199
 
 
1200
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1201
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1202
                PyErr_NoMemory();
 
1203
                return false;
 
1204
        }
 
1205
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1206
        PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
 
1207
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
 
1208
                PyErr_NoMemory();
 
1209
                return false;
 
1210
        }
 
1211
        r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
 
1212
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1213
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1214
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
1215
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1216
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1217
                PyErr_NoMemory();
 
1218
                return false;
 
1219
        }
 
1220
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1221
        if (py_ppCallResult == Py_None) {
 
1222
                r->in.ppCallResult = NULL;
 
1223
        } else {
 
1224
                r->in.ppCallResult = NULL;
 
1225
                if (py_ppCallResult == Py_None) {
 
1226
                        *r->in.ppCallResult = NULL;
 
1227
                } else {
 
1228
                        *r->in.ppCallResult = NULL;
 
1229
                        PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
 
1230
                        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
 
1231
                                PyErr_NoMemory();
 
1232
                                return false;
 
1233
                        }
 
1234
                        *r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
 
1235
                }
 
1236
        }
 
1237
        return true;
 
1238
}
 
1239
 
 
1240
static PyObject *unpack_py_DeleteInstance_args_out(struct DeleteInstance *r)
 
1241
{
 
1242
        PyObject *result;
 
1243
        PyObject *py_ORPCthat;
 
1244
        PyObject *py_ppCallResult;
 
1245
        result = PyTuple_New(2);
 
1246
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1247
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
1248
        if (r->out.ppCallResult == NULL) {
 
1249
                py_ppCallResult = Py_None;
 
1250
                Py_INCREF(py_ppCallResult);
 
1251
        } else {
 
1252
                if (*r->out.ppCallResult == NULL) {
 
1253
                        py_ppCallResult = Py_None;
 
1254
                        Py_INCREF(py_ppCallResult);
 
1255
                } else {
 
1256
                        py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
 
1257
                }
 
1258
        }
 
1259
        PyTuple_SetItem(result, 1, py_ppCallResult);
 
1260
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1261
                PyErr_SetWERROR(r->out.result);
 
1262
                return NULL;
 
1263
        }
 
1264
 
 
1265
        return result;
 
1266
}
 
1267
 
 
1268
static bool pack_py_DeleteInstanceAsync_args_in(PyObject *args, PyObject *kwargs, struct DeleteInstanceAsync *r)
 
1269
{
 
1270
        PyObject *py_ORPCthis;
 
1271
        PyObject *py_strObjectPath;
 
1272
        PyObject *py_lFlags;
 
1273
        PyObject *py_pCtx;
 
1274
        PyObject *py_pResponseHandler;
 
1275
        const char *kwnames[] = {
 
1276
                "ORPCthis", "strObjectPath", "lFlags", "pCtx", "pResponseHandler", NULL
 
1277
        };
 
1278
 
 
1279
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DeleteInstanceAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
 
1280
                return false;
 
1281
        }
 
1282
 
 
1283
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1284
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1285
                PyErr_NoMemory();
 
1286
                return false;
 
1287
        }
 
1288
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1289
        PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
 
1290
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
 
1291
                PyErr_NoMemory();
 
1292
                return false;
 
1293
        }
 
1294
        r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
 
1295
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1296
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1297
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
1298
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1299
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1300
                PyErr_NoMemory();
 
1301
                return false;
 
1302
        }
 
1303
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1304
        r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
 
1305
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
 
1306
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
 
1307
                PyErr_NoMemory();
 
1308
                return false;
 
1309
        }
 
1310
        r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
 
1311
        return true;
 
1312
}
 
1313
 
 
1314
static PyObject *unpack_py_DeleteInstanceAsync_args_out(struct DeleteInstanceAsync *r)
 
1315
{
 
1316
        PyObject *result;
 
1317
        PyObject *py_ORPCthat;
 
1318
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1319
        result = py_ORPCthat;
 
1320
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1321
                PyErr_SetWERROR(r->out.result);
 
1322
                return NULL;
 
1323
        }
 
1324
 
 
1325
        return result;
 
1326
}
 
1327
 
 
1328
static bool pack_py_CreateInstanceEnum_args_in(PyObject *args, PyObject *kwargs, struct CreateInstanceEnum *r)
 
1329
{
 
1330
        PyObject *py_ORPCthis;
 
1331
        PyObject *py_strFilter;
 
1332
        PyObject *py_lFlags;
 
1333
        PyObject *py_pCtx;
 
1334
        const char *kwnames[] = {
 
1335
                "ORPCthis", "strFilter", "lFlags", "pCtx", NULL
 
1336
        };
 
1337
 
 
1338
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:CreateInstanceEnum", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strFilter, &py_lFlags, &py_pCtx)) {
 
1339
                return false;
 
1340
        }
 
1341
 
 
1342
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1343
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1344
                PyErr_NoMemory();
 
1345
                return false;
 
1346
        }
 
1347
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1348
        PY_CHECK_TYPE(&BSTR_Type, py_strFilter, return false;);
 
1349
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strFilter)) == NULL) {
 
1350
                PyErr_NoMemory();
 
1351
                return false;
 
1352
        }
 
1353
        r->in.strFilter = *(struct BSTR *)py_talloc_get_ptr(py_strFilter);
 
1354
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1355
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1356
        if (py_pCtx == Py_None) {
 
1357
                r->in.pCtx = NULL;
 
1358
        } else {
 
1359
                r->in.pCtx = NULL;
 
1360
                PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1361
                if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1362
                        PyErr_NoMemory();
 
1363
                        return false;
 
1364
                }
 
1365
                r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1366
        }
 
1367
        return true;
 
1368
}
 
1369
 
 
1370
static PyObject *unpack_py_CreateInstanceEnum_args_out(struct CreateInstanceEnum *r)
 
1371
{
 
1372
        PyObject *result;
 
1373
        PyObject *py_ORPCthat;
 
1374
        PyObject *py_ppEnum;
 
1375
        result = PyTuple_New(2);
 
1376
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1377
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
1378
        if (*r->out.ppEnum == NULL) {
 
1379
                py_ppEnum = Py_None;
 
1380
                Py_INCREF(py_ppEnum);
 
1381
        } else {
 
1382
                py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
 
1383
        }
 
1384
        PyTuple_SetItem(result, 1, py_ppEnum);
 
1385
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1386
                PyErr_SetWERROR(r->out.result);
 
1387
                return NULL;
 
1388
        }
 
1389
 
 
1390
        return result;
 
1391
}
 
1392
 
 
1393
static bool pack_py_CreateInstanceEnumAsync_args_in(PyObject *args, PyObject *kwargs, struct CreateInstanceEnumAsync *r)
 
1394
{
 
1395
        PyObject *py_ORPCthis;
 
1396
        PyObject *py_strSuperClass;
 
1397
        PyObject *py_lFlags;
 
1398
        PyObject *py_pCtx;
 
1399
        PyObject *py_pResponseHandler;
 
1400
        const char *kwnames[] = {
 
1401
                "ORPCthis", "strSuperClass", "lFlags", "pCtx", "pResponseHandler", NULL
 
1402
        };
 
1403
 
 
1404
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:CreateInstanceEnumAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strSuperClass, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
 
1405
                return false;
 
1406
        }
 
1407
 
 
1408
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1409
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1410
                PyErr_NoMemory();
 
1411
                return false;
 
1412
        }
 
1413
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1414
        PY_CHECK_TYPE(&BSTR_Type, py_strSuperClass, return false;);
 
1415
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strSuperClass)) == NULL) {
 
1416
                PyErr_NoMemory();
 
1417
                return false;
 
1418
        }
 
1419
        r->in.strSuperClass = *(struct BSTR *)py_talloc_get_ptr(py_strSuperClass);
 
1420
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1421
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1422
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
1423
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1424
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1425
                PyErr_NoMemory();
 
1426
                return false;
 
1427
        }
 
1428
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1429
        r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
 
1430
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
 
1431
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
 
1432
                PyErr_NoMemory();
 
1433
                return false;
 
1434
        }
 
1435
        r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
 
1436
        return true;
 
1437
}
 
1438
 
 
1439
static PyObject *unpack_py_CreateInstanceEnumAsync_args_out(struct CreateInstanceEnumAsync *r)
 
1440
{
 
1441
        PyObject *result;
 
1442
        PyObject *py_ORPCthat;
 
1443
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1444
        result = py_ORPCthat;
 
1445
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1446
                PyErr_SetWERROR(r->out.result);
 
1447
                return NULL;
 
1448
        }
 
1449
 
 
1450
        return result;
 
1451
}
 
1452
 
 
1453
static bool pack_py_ExecQuery_args_in(PyObject *args, PyObject *kwargs, struct ExecQuery *r)
 
1454
{
 
1455
        PyObject *py_ORPCthis;
 
1456
        PyObject *py_strQueryLanguage;
 
1457
        PyObject *py_strQuery;
 
1458
        PyObject *py_lFlags;
 
1459
        PyObject *py_pCtx;
 
1460
        const char *kwnames[] = {
 
1461
                "ORPCthis", "strQueryLanguage", "strQuery", "lFlags", "pCtx", NULL
 
1462
        };
 
1463
 
 
1464
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:ExecQuery", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strQueryLanguage, &py_strQuery, &py_lFlags, &py_pCtx)) {
 
1465
                return false;
 
1466
        }
 
1467
 
 
1468
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1469
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1470
                PyErr_NoMemory();
 
1471
                return false;
 
1472
        }
 
1473
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1474
        PY_CHECK_TYPE(&BSTR_Type, py_strQueryLanguage, return false;);
 
1475
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQueryLanguage)) == NULL) {
 
1476
                PyErr_NoMemory();
 
1477
                return false;
 
1478
        }
 
1479
        r->in.strQueryLanguage = *(struct BSTR *)py_talloc_get_ptr(py_strQueryLanguage);
 
1480
        PY_CHECK_TYPE(&BSTR_Type, py_strQuery, return false;);
 
1481
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQuery)) == NULL) {
 
1482
                PyErr_NoMemory();
 
1483
                return false;
 
1484
        }
 
1485
        r->in.strQuery = *(struct BSTR *)py_talloc_get_ptr(py_strQuery);
 
1486
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1487
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1488
        if (py_pCtx == Py_None) {
 
1489
                r->in.pCtx = NULL;
 
1490
        } else {
 
1491
                r->in.pCtx = NULL;
 
1492
                PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1493
                if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1494
                        PyErr_NoMemory();
 
1495
                        return false;
 
1496
                }
 
1497
                r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1498
        }
 
1499
        return true;
 
1500
}
 
1501
 
 
1502
static PyObject *unpack_py_ExecQuery_args_out(struct ExecQuery *r)
 
1503
{
 
1504
        PyObject *result;
 
1505
        PyObject *py_ORPCthat;
 
1506
        PyObject *py_ppEnum;
 
1507
        result = PyTuple_New(2);
 
1508
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1509
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
1510
        if (*r->out.ppEnum == NULL) {
 
1511
                py_ppEnum = Py_None;
 
1512
                Py_INCREF(py_ppEnum);
 
1513
        } else {
 
1514
                py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
 
1515
        }
 
1516
        PyTuple_SetItem(result, 1, py_ppEnum);
 
1517
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1518
                PyErr_SetWERROR(r->out.result);
 
1519
                return NULL;
 
1520
        }
 
1521
 
 
1522
        return result;
 
1523
}
 
1524
 
 
1525
static bool pack_py_ExecQueryAsync_args_in(PyObject *args, PyObject *kwargs, struct ExecQueryAsync *r)
 
1526
{
 
1527
        PyObject *py_ORPCthis;
 
1528
        PyObject *py_strQueryLanguage;
 
1529
        PyObject *py_strQuery;
 
1530
        PyObject *py_lFlags;
 
1531
        PyObject *py_pCtx;
 
1532
        PyObject *py_pResponseHandler;
 
1533
        const char *kwnames[] = {
 
1534
                "ORPCthis", "strQueryLanguage", "strQuery", "lFlags", "pCtx", "pResponseHandler", NULL
 
1535
        };
 
1536
 
 
1537
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:ExecQueryAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strQueryLanguage, &py_strQuery, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
 
1538
                return false;
 
1539
        }
 
1540
 
 
1541
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1542
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1543
                PyErr_NoMemory();
 
1544
                return false;
 
1545
        }
 
1546
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1547
        PY_CHECK_TYPE(&BSTR_Type, py_strQueryLanguage, return false;);
 
1548
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQueryLanguage)) == NULL) {
 
1549
                PyErr_NoMemory();
 
1550
                return false;
 
1551
        }
 
1552
        r->in.strQueryLanguage = *(struct BSTR *)py_talloc_get_ptr(py_strQueryLanguage);
 
1553
        PY_CHECK_TYPE(&BSTR_Type, py_strQuery, return false;);
 
1554
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQuery)) == NULL) {
 
1555
                PyErr_NoMemory();
 
1556
                return false;
 
1557
        }
 
1558
        r->in.strQuery = *(struct BSTR *)py_talloc_get_ptr(py_strQuery);
 
1559
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1560
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1561
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
1562
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1563
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1564
                PyErr_NoMemory();
 
1565
                return false;
 
1566
        }
 
1567
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1568
        r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
 
1569
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
 
1570
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
 
1571
                PyErr_NoMemory();
 
1572
                return false;
 
1573
        }
 
1574
        r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
 
1575
        return true;
 
1576
}
 
1577
 
 
1578
static PyObject *unpack_py_ExecQueryAsync_args_out(struct ExecQueryAsync *r)
 
1579
{
 
1580
        PyObject *result;
 
1581
        PyObject *py_ORPCthat;
 
1582
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1583
        result = py_ORPCthat;
 
1584
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1585
                PyErr_SetWERROR(r->out.result);
 
1586
                return NULL;
 
1587
        }
 
1588
 
 
1589
        return result;
 
1590
}
 
1591
 
 
1592
static bool pack_py_ExecNotificationQuery_args_in(PyObject *args, PyObject *kwargs, struct ExecNotificationQuery *r)
 
1593
{
 
1594
        PyObject *py_ORPCthis;
 
1595
        PyObject *py_strQueryLanguage;
 
1596
        PyObject *py_strQuery;
 
1597
        PyObject *py_lFlags;
 
1598
        PyObject *py_pCtx;
 
1599
        const char *kwnames[] = {
 
1600
                "ORPCthis", "strQueryLanguage", "strQuery", "lFlags", "pCtx", NULL
 
1601
        };
 
1602
 
 
1603
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:ExecNotificationQuery", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strQueryLanguage, &py_strQuery, &py_lFlags, &py_pCtx)) {
 
1604
                return false;
 
1605
        }
 
1606
 
 
1607
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1608
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1609
                PyErr_NoMemory();
 
1610
                return false;
 
1611
        }
 
1612
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1613
        PY_CHECK_TYPE(&BSTR_Type, py_strQueryLanguage, return false;);
 
1614
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQueryLanguage)) == NULL) {
 
1615
                PyErr_NoMemory();
 
1616
                return false;
 
1617
        }
 
1618
        r->in.strQueryLanguage = *(struct BSTR *)py_talloc_get_ptr(py_strQueryLanguage);
 
1619
        PY_CHECK_TYPE(&BSTR_Type, py_strQuery, return false;);
 
1620
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQuery)) == NULL) {
 
1621
                PyErr_NoMemory();
 
1622
                return false;
 
1623
        }
 
1624
        r->in.strQuery = *(struct BSTR *)py_talloc_get_ptr(py_strQuery);
 
1625
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1626
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1627
        if (py_pCtx == Py_None) {
 
1628
                r->in.pCtx = NULL;
 
1629
        } else {
 
1630
                r->in.pCtx = NULL;
 
1631
                PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1632
                if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1633
                        PyErr_NoMemory();
 
1634
                        return false;
 
1635
                }
 
1636
                r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1637
        }
 
1638
        return true;
 
1639
}
 
1640
 
 
1641
static PyObject *unpack_py_ExecNotificationQuery_args_out(struct ExecNotificationQuery *r)
 
1642
{
 
1643
        PyObject *result;
 
1644
        PyObject *py_ORPCthat;
 
1645
        PyObject *py_ppEnum;
 
1646
        result = PyTuple_New(2);
 
1647
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1648
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
1649
        if (*r->out.ppEnum == NULL) {
 
1650
                py_ppEnum = Py_None;
 
1651
                Py_INCREF(py_ppEnum);
 
1652
        } else {
 
1653
                py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
 
1654
        }
 
1655
        PyTuple_SetItem(result, 1, py_ppEnum);
 
1656
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1657
                PyErr_SetWERROR(r->out.result);
 
1658
                return NULL;
 
1659
        }
 
1660
 
 
1661
        return result;
 
1662
}
 
1663
 
 
1664
static bool pack_py_ExecNotificationQueryAsync_args_in(PyObject *args, PyObject *kwargs, struct ExecNotificationQueryAsync *r)
 
1665
{
 
1666
        PyObject *py_ORPCthis;
 
1667
        PyObject *py_strQueryLanguage;
 
1668
        PyObject *py_strQuery;
 
1669
        PyObject *py_lFlags;
 
1670
        PyObject *py_pCtx;
 
1671
        PyObject *py_pResponseHandler;
 
1672
        const char *kwnames[] = {
 
1673
                "ORPCthis", "strQueryLanguage", "strQuery", "lFlags", "pCtx", "pResponseHandler", NULL
 
1674
        };
 
1675
 
 
1676
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:ExecNotificationQueryAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strQueryLanguage, &py_strQuery, &py_lFlags, &py_pCtx, &py_pResponseHandler)) {
 
1677
                return false;
 
1678
        }
 
1679
 
 
1680
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1681
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1682
                PyErr_NoMemory();
 
1683
                return false;
 
1684
        }
 
1685
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1686
        PY_CHECK_TYPE(&BSTR_Type, py_strQueryLanguage, return false;);
 
1687
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQueryLanguage)) == NULL) {
 
1688
                PyErr_NoMemory();
 
1689
                return false;
 
1690
        }
 
1691
        r->in.strQueryLanguage = *(struct BSTR *)py_talloc_get_ptr(py_strQueryLanguage);
 
1692
        PY_CHECK_TYPE(&BSTR_Type, py_strQuery, return false;);
 
1693
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strQuery)) == NULL) {
 
1694
                PyErr_NoMemory();
 
1695
                return false;
 
1696
        }
 
1697
        r->in.strQuery = *(struct BSTR *)py_talloc_get_ptr(py_strQuery);
 
1698
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1699
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1700
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
1701
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1702
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1703
                PyErr_NoMemory();
 
1704
                return false;
 
1705
        }
 
1706
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1707
        r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
 
1708
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
 
1709
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
 
1710
                PyErr_NoMemory();
 
1711
                return false;
 
1712
        }
 
1713
        r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
 
1714
        return true;
 
1715
}
 
1716
 
 
1717
static PyObject *unpack_py_ExecNotificationQueryAsync_args_out(struct ExecNotificationQueryAsync *r)
 
1718
{
 
1719
        PyObject *result;
 
1720
        PyObject *py_ORPCthat;
 
1721
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1722
        result = py_ORPCthat;
 
1723
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1724
                PyErr_SetWERROR(r->out.result);
 
1725
                return NULL;
 
1726
        }
 
1727
 
 
1728
        return result;
 
1729
}
 
1730
 
 
1731
static bool pack_py_ExecMethod_args_in(PyObject *args, PyObject *kwargs, struct ExecMethod *r)
 
1732
{
 
1733
        PyObject *py_ORPCthis;
 
1734
        PyObject *py_strObjectPath;
 
1735
        PyObject *py_strMethodName;
 
1736
        PyObject *py_lFlags;
 
1737
        PyObject *py_pCtx;
 
1738
        PyObject *py_pInParams;
 
1739
        PyObject *py_ppOutParams;
 
1740
        PyObject *py_ppCallResult;
 
1741
        const char *kwnames[] = {
 
1742
                "ORPCthis", "strObjectPath", "strMethodName", "lFlags", "pCtx", "pInParams", "ppOutParams", "ppCallResult", NULL
 
1743
        };
 
1744
 
 
1745
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:ExecMethod", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_strMethodName, &py_lFlags, &py_pCtx, &py_pInParams, &py_ppOutParams, &py_ppCallResult)) {
 
1746
                return false;
 
1747
        }
 
1748
 
 
1749
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1750
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1751
                PyErr_NoMemory();
 
1752
                return false;
 
1753
        }
 
1754
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1755
        PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
 
1756
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
 
1757
                PyErr_NoMemory();
 
1758
                return false;
 
1759
        }
 
1760
        r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
 
1761
        PY_CHECK_TYPE(&BSTR_Type, py_strMethodName, return false;);
 
1762
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strMethodName)) == NULL) {
 
1763
                PyErr_NoMemory();
 
1764
                return false;
 
1765
        }
 
1766
        r->in.strMethodName = *(struct BSTR *)py_talloc_get_ptr(py_strMethodName);
 
1767
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1768
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1769
        if (py_pCtx == Py_None) {
 
1770
                r->in.pCtx = NULL;
 
1771
        } else {
 
1772
                r->in.pCtx = NULL;
 
1773
                PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1774
                if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1775
                        PyErr_NoMemory();
 
1776
                        return false;
 
1777
                }
 
1778
                r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1779
        }
 
1780
        if (py_pInParams == Py_None) {
 
1781
                r->in.pInParams = NULL;
 
1782
        } else {
 
1783
                r->in.pInParams = NULL;
 
1784
                PY_CHECK_TYPE(MInterfacePointer_Type, py_pInParams, return false;);
 
1785
                if (talloc_reference(r, py_talloc_get_mem_ctx(py_pInParams)) == NULL) {
 
1786
                        PyErr_NoMemory();
 
1787
                        return false;
 
1788
                }
 
1789
                r->in.pInParams = (struct MInterfacePointer *)py_talloc_get_ptr(py_pInParams);
 
1790
        }
 
1791
        if (py_ppOutParams == Py_None) {
 
1792
                r->in.ppOutParams = NULL;
 
1793
        } else {
 
1794
                r->in.ppOutParams = NULL;
 
1795
                if (py_ppOutParams == Py_None) {
 
1796
                        *r->in.ppOutParams = NULL;
 
1797
                } else {
 
1798
                        *r->in.ppOutParams = NULL;
 
1799
                        PY_CHECK_TYPE(MInterfacePointer_Type, py_ppOutParams, return false;);
 
1800
                        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppOutParams)) == NULL) {
 
1801
                                PyErr_NoMemory();
 
1802
                                return false;
 
1803
                        }
 
1804
                        *r->in.ppOutParams = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppOutParams);
 
1805
                }
 
1806
        }
 
1807
        if (py_ppCallResult == Py_None) {
 
1808
                r->in.ppCallResult = NULL;
 
1809
        } else {
 
1810
                r->in.ppCallResult = NULL;
 
1811
                if (py_ppCallResult == Py_None) {
 
1812
                        *r->in.ppCallResult = NULL;
 
1813
                } else {
 
1814
                        *r->in.ppCallResult = NULL;
 
1815
                        PY_CHECK_TYPE(MInterfacePointer_Type, py_ppCallResult, return false;);
 
1816
                        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ppCallResult)) == NULL) {
 
1817
                                PyErr_NoMemory();
 
1818
                                return false;
 
1819
                        }
 
1820
                        *r->in.ppCallResult = (struct MInterfacePointer *)py_talloc_get_ptr(py_ppCallResult);
 
1821
                }
 
1822
        }
 
1823
        return true;
 
1824
}
 
1825
 
 
1826
static PyObject *unpack_py_ExecMethod_args_out(struct ExecMethod *r)
 
1827
{
 
1828
        PyObject *result;
 
1829
        PyObject *py_ORPCthat;
 
1830
        PyObject *py_ppOutParams;
 
1831
        PyObject *py_ppCallResult;
 
1832
        result = PyTuple_New(3);
 
1833
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1834
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
1835
        if (r->out.ppOutParams == NULL) {
 
1836
                py_ppOutParams = Py_None;
 
1837
                Py_INCREF(py_ppOutParams);
 
1838
        } else {
 
1839
                if (*r->out.ppOutParams == NULL) {
 
1840
                        py_ppOutParams = Py_None;
 
1841
                        Py_INCREF(py_ppOutParams);
 
1842
                } else {
 
1843
                        py_ppOutParams = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppOutParams, *r->out.ppOutParams);
 
1844
                }
 
1845
        }
 
1846
        PyTuple_SetItem(result, 1, py_ppOutParams);
 
1847
        if (r->out.ppCallResult == NULL) {
 
1848
                py_ppCallResult = Py_None;
 
1849
                Py_INCREF(py_ppCallResult);
 
1850
        } else {
 
1851
                if (*r->out.ppCallResult == NULL) {
 
1852
                        py_ppCallResult = Py_None;
 
1853
                        Py_INCREF(py_ppCallResult);
 
1854
                } else {
 
1855
                        py_ppCallResult = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppCallResult, *r->out.ppCallResult);
 
1856
                }
 
1857
        }
 
1858
        PyTuple_SetItem(result, 2, py_ppCallResult);
 
1859
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1860
                PyErr_SetWERROR(r->out.result);
 
1861
                return NULL;
 
1862
        }
 
1863
 
 
1864
        return result;
 
1865
}
 
1866
 
 
1867
static bool pack_py_ExecMethodAsync_args_in(PyObject *args, PyObject *kwargs, struct ExecMethodAsync *r)
 
1868
{
 
1869
        PyObject *py_ORPCthis;
 
1870
        PyObject *py_strObjectPath;
 
1871
        PyObject *py_strMethodName;
 
1872
        PyObject *py_lFlags;
 
1873
        PyObject *py_pCtx;
 
1874
        PyObject *py_pInParams;
 
1875
        PyObject *py_pResponseHandler;
 
1876
        const char *kwnames[] = {
 
1877
                "ORPCthis", "strObjectPath", "strMethodName", "lFlags", "pCtx", "pInParams", "pResponseHandler", NULL
 
1878
        };
 
1879
 
 
1880
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:ExecMethodAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_strObjectPath, &py_strMethodName, &py_lFlags, &py_pCtx, &py_pInParams, &py_pResponseHandler)) {
 
1881
                return false;
 
1882
        }
 
1883
 
 
1884
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
1885
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
1886
                PyErr_NoMemory();
 
1887
                return false;
 
1888
        }
 
1889
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
1890
        PY_CHECK_TYPE(&BSTR_Type, py_strObjectPath, return false;);
 
1891
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strObjectPath)) == NULL) {
 
1892
                PyErr_NoMemory();
 
1893
                return false;
 
1894
        }
 
1895
        r->in.strObjectPath = *(struct BSTR *)py_talloc_get_ptr(py_strObjectPath);
 
1896
        PY_CHECK_TYPE(&BSTR_Type, py_strMethodName, return false;);
 
1897
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strMethodName)) == NULL) {
 
1898
                PyErr_NoMemory();
 
1899
                return false;
 
1900
        }
 
1901
        r->in.strMethodName = *(struct BSTR *)py_talloc_get_ptr(py_strMethodName);
 
1902
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
1903
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
1904
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
1905
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
1906
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
1907
                PyErr_NoMemory();
 
1908
                return false;
 
1909
        }
 
1910
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
1911
        r->in.pInParams = talloc_ptrtype(r, r->in.pInParams);
 
1912
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pInParams, return false;);
 
1913
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pInParams)) == NULL) {
 
1914
                PyErr_NoMemory();
 
1915
                return false;
 
1916
        }
 
1917
        r->in.pInParams = (struct MInterfacePointer *)py_talloc_get_ptr(py_pInParams);
 
1918
        r->in.pResponseHandler = talloc_ptrtype(r, r->in.pResponseHandler);
 
1919
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pResponseHandler, return false;);
 
1920
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pResponseHandler)) == NULL) {
 
1921
                PyErr_NoMemory();
 
1922
                return false;
 
1923
        }
 
1924
        r->in.pResponseHandler = (struct MInterfacePointer *)py_talloc_get_ptr(py_pResponseHandler);
 
1925
        return true;
 
1926
}
 
1927
 
 
1928
static PyObject *unpack_py_ExecMethodAsync_args_out(struct ExecMethodAsync *r)
 
1929
{
 
1930
        PyObject *result;
 
1931
        PyObject *py_ORPCthat;
 
1932
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
1933
        result = py_ORPCthat;
 
1934
        if (!W_ERROR_IS_OK(r->out.result)) {
 
1935
                PyErr_SetWERROR(r->out.result);
 
1936
                return NULL;
 
1937
        }
 
1938
 
 
1939
        return result;
 
1940
}
 
1941
 
 
1942
const struct PyNdrRpcMethodDef py_ndr_IWbemServices_methods[] = {
 
1943
        { "OpenNamespace", "S.OpenNamespace(ORPCthis, strNamespace, lFlags, pCtx, ppWorkingNamespace, ppResult) -> (ORPCthat, ppWorkingNamespace, ppResult)", (py_dcerpc_call_fn)dcerpc_OpenNamespace_r, (py_data_pack_fn)pack_py_OpenNamespace_args_in, (py_data_unpack_fn)unpack_py_OpenNamespace_args_out, 0, &ndr_table_IWbemServices },
 
1944
        { "CancelAsyncCall", "S.CancelAsyncCall(ORPCthis, pSink) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_CancelAsyncCall_r, (py_data_pack_fn)pack_py_CancelAsyncCall_args_in, (py_data_unpack_fn)unpack_py_CancelAsyncCall_args_out, 1, &ndr_table_IWbemServices },
 
1945
        { "QueryObjectSink", "S.QueryObjectSink(ORPCthis, lFlags) -> (ORPCthat, ppResponseHandler)", (py_dcerpc_call_fn)dcerpc_QueryObjectSink_r, (py_data_pack_fn)pack_py_QueryObjectSink_args_in, (py_data_unpack_fn)unpack_py_QueryObjectSink_args_out, 2, &ndr_table_IWbemServices },
 
1946
        { "GetObject", "S.GetObject(ORPCthis, strObjectPath, lFlags, pCtx, ppObject, ppCallResult) -> (ORPCthat, ppObject, ppCallResult)", (py_dcerpc_call_fn)dcerpc_GetObject_r, (py_data_pack_fn)pack_py_GetObject_args_in, (py_data_unpack_fn)unpack_py_GetObject_args_out, 3, &ndr_table_IWbemServices },
 
1947
        { "GetObjectAsync", "S.GetObjectAsync(ORPCthis, strObjectPath, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_GetObjectAsync_r, (py_data_pack_fn)pack_py_GetObjectAsync_args_in, (py_data_unpack_fn)unpack_py_GetObjectAsync_args_out, 4, &ndr_table_IWbemServices },
 
1948
        { "PutClass", "S.PutClass(ORPCthis, pObject, lFlags, pCtx, ppCallResult) -> (ORPCthat, ppCallResult)", (py_dcerpc_call_fn)dcerpc_PutClass_r, (py_data_pack_fn)pack_py_PutClass_args_in, (py_data_unpack_fn)unpack_py_PutClass_args_out, 5, &ndr_table_IWbemServices },
 
1949
        { "PutClassAsync", "S.PutClassAsync(ORPCthis, pObject, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_PutClassAsync_r, (py_data_pack_fn)pack_py_PutClassAsync_args_in, (py_data_unpack_fn)unpack_py_PutClassAsync_args_out, 6, &ndr_table_IWbemServices },
 
1950
        { "DeleteClass", "S.DeleteClass(ORPCthis, strClass, lFlags, pCtx, ppCallResult) -> (ORPCthat, ppCallResult)", (py_dcerpc_call_fn)dcerpc_DeleteClass_r, (py_data_pack_fn)pack_py_DeleteClass_args_in, (py_data_unpack_fn)unpack_py_DeleteClass_args_out, 7, &ndr_table_IWbemServices },
 
1951
        { "DeleteClassAsync", "S.DeleteClassAsync(ORPCthis, strClass, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_DeleteClassAsync_r, (py_data_pack_fn)pack_py_DeleteClassAsync_args_in, (py_data_unpack_fn)unpack_py_DeleteClassAsync_args_out, 8, &ndr_table_IWbemServices },
 
1952
        { "CreateClassEnum", "S.CreateClassEnum(ORPCthis, strSuperclass, lFlags, pCtx) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_CreateClassEnum_r, (py_data_pack_fn)pack_py_CreateClassEnum_args_in, (py_data_unpack_fn)unpack_py_CreateClassEnum_args_out, 9, &ndr_table_IWbemServices },
 
1953
        { "CreateClassEnumAsync", "S.CreateClassEnumAsync(ORPCthis, strSuperclass, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_CreateClassEnumAsync_r, (py_data_pack_fn)pack_py_CreateClassEnumAsync_args_in, (py_data_unpack_fn)unpack_py_CreateClassEnumAsync_args_out, 10, &ndr_table_IWbemServices },
 
1954
        { "PutInstance", "S.PutInstance(ORPCthis, pInst, lFlags, pCtx, ppCallResult) -> (ORPCthat, ppCallResult)", (py_dcerpc_call_fn)dcerpc_PutInstance_r, (py_data_pack_fn)pack_py_PutInstance_args_in, (py_data_unpack_fn)unpack_py_PutInstance_args_out, 11, &ndr_table_IWbemServices },
 
1955
        { "PutInstanceAsync", "S.PutInstanceAsync(ORPCthis, pInst, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_PutInstanceAsync_r, (py_data_pack_fn)pack_py_PutInstanceAsync_args_in, (py_data_unpack_fn)unpack_py_PutInstanceAsync_args_out, 12, &ndr_table_IWbemServices },
 
1956
        { "DeleteInstance", "S.DeleteInstance(ORPCthis, strObjectPath, lFlags, pCtx, ppCallResult) -> (ORPCthat, ppCallResult)", (py_dcerpc_call_fn)dcerpc_DeleteInstance_r, (py_data_pack_fn)pack_py_DeleteInstance_args_in, (py_data_unpack_fn)unpack_py_DeleteInstance_args_out, 13, &ndr_table_IWbemServices },
 
1957
        { "DeleteInstanceAsync", "S.DeleteInstanceAsync(ORPCthis, strObjectPath, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_DeleteInstanceAsync_r, (py_data_pack_fn)pack_py_DeleteInstanceAsync_args_in, (py_data_unpack_fn)unpack_py_DeleteInstanceAsync_args_out, 14, &ndr_table_IWbemServices },
 
1958
        { "CreateInstanceEnum", "S.CreateInstanceEnum(ORPCthis, strFilter, lFlags, pCtx) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_CreateInstanceEnum_r, (py_data_pack_fn)pack_py_CreateInstanceEnum_args_in, (py_data_unpack_fn)unpack_py_CreateInstanceEnum_args_out, 15, &ndr_table_IWbemServices },
 
1959
        { "CreateInstanceEnumAsync", "S.CreateInstanceEnumAsync(ORPCthis, strSuperClass, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_CreateInstanceEnumAsync_r, (py_data_pack_fn)pack_py_CreateInstanceEnumAsync_args_in, (py_data_unpack_fn)unpack_py_CreateInstanceEnumAsync_args_out, 16, &ndr_table_IWbemServices },
 
1960
        { "ExecQuery", "S.ExecQuery(ORPCthis, strQueryLanguage, strQuery, lFlags, pCtx) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_ExecQuery_r, (py_data_pack_fn)pack_py_ExecQuery_args_in, (py_data_unpack_fn)unpack_py_ExecQuery_args_out, 17, &ndr_table_IWbemServices },
 
1961
        { "ExecQueryAsync", "S.ExecQueryAsync(ORPCthis, strQueryLanguage, strQuery, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_ExecQueryAsync_r, (py_data_pack_fn)pack_py_ExecQueryAsync_args_in, (py_data_unpack_fn)unpack_py_ExecQueryAsync_args_out, 18, &ndr_table_IWbemServices },
 
1962
        { "ExecNotificationQuery", "S.ExecNotificationQuery(ORPCthis, strQueryLanguage, strQuery, lFlags, pCtx) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_ExecNotificationQuery_r, (py_data_pack_fn)pack_py_ExecNotificationQuery_args_in, (py_data_unpack_fn)unpack_py_ExecNotificationQuery_args_out, 19, &ndr_table_IWbemServices },
 
1963
        { "ExecNotificationQueryAsync", "S.ExecNotificationQueryAsync(ORPCthis, strQueryLanguage, strQuery, lFlags, pCtx, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_ExecNotificationQueryAsync_r, (py_data_pack_fn)pack_py_ExecNotificationQueryAsync_args_in, (py_data_unpack_fn)unpack_py_ExecNotificationQueryAsync_args_out, 20, &ndr_table_IWbemServices },
 
1964
        { "ExecMethod", "S.ExecMethod(ORPCthis, strObjectPath, strMethodName, lFlags, pCtx, pInParams, ppOutParams, ppCallResult) -> (ORPCthat, ppOutParams, ppCallResult)", (py_dcerpc_call_fn)dcerpc_ExecMethod_r, (py_data_pack_fn)pack_py_ExecMethod_args_in, (py_data_unpack_fn)unpack_py_ExecMethod_args_out, 21, &ndr_table_IWbemServices },
 
1965
        { "ExecMethodAsync", "S.ExecMethodAsync(ORPCthis, strObjectPath, strMethodName, lFlags, pCtx, pInParams, pResponseHandler) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_ExecMethodAsync_r, (py_data_pack_fn)pack_py_ExecMethodAsync_args_in, (py_data_unpack_fn)unpack_py_ExecMethodAsync_args_out, 22, &ndr_table_IWbemServices },
 
1966
        { NULL }
 
1967
};
 
1968
 
 
1969
static PyObject *interface_IWbemServices_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
1970
{
 
1971
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemServices);
 
1972
}
 
1973
 
 
1974
static PyTypeObject IWbemServices_InterfaceType = {
 
1975
        PyObject_HEAD_INIT(NULL) 0,
 
1976
        .tp_name = "wmi.IWbemServices",
 
1977
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
1978
        .tp_doc = "IWbemServices(binding, lp_ctx=None, credentials=None) -> connection\n"
 
1979
"\n"
 
1980
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
1981
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
1982
"credentials should be a credentials.Credentials object.\n\n",
 
1983
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
1984
        .tp_new = interface_IWbemServices_new,
 
1985
};
 
1986
 
 
1987
 
 
1988
static bool pack_py_Reset_args_in(PyObject *args, PyObject *kwargs, struct Reset *r)
 
1989
{
 
1990
        PyObject *py_ORPCthis;
 
1991
        const char *kwnames[] = {
 
1992
                "ORPCthis", NULL
 
1993
        };
 
1994
 
 
1995
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:Reset", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
1996
                return false;
 
1997
        }
 
1998
 
 
1999
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2000
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2001
                PyErr_NoMemory();
 
2002
                return false;
 
2003
        }
 
2004
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2005
        return true;
 
2006
}
 
2007
 
 
2008
static PyObject *unpack_py_Reset_args_out(struct Reset *r)
 
2009
{
 
2010
        PyObject *result;
 
2011
        PyObject *py_ORPCthat;
 
2012
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2013
        result = py_ORPCthat;
 
2014
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2015
                PyErr_SetWERROR(r->out.result);
 
2016
                return NULL;
 
2017
        }
 
2018
 
 
2019
        return result;
 
2020
}
 
2021
 
 
2022
static bool pack_py_IEnumWbemClassObject_Next_args_in(PyObject *args, PyObject *kwargs, struct IEnumWbemClassObject_Next *r)
 
2023
{
 
2024
        PyObject *py_ORPCthis;
 
2025
        PyObject *py_lTimeout;
 
2026
        PyObject *py_uCount;
 
2027
        const char *kwnames[] = {
 
2028
                "ORPCthis", "lTimeout", "uCount", NULL
 
2029
        };
 
2030
 
 
2031
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:IEnumWbemClassObject_Next", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout, &py_uCount)) {
 
2032
                return false;
 
2033
        }
 
2034
 
 
2035
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2036
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2037
                PyErr_NoMemory();
 
2038
                return false;
 
2039
        }
 
2040
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2041
        PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
 
2042
        r->in.lTimeout = PyInt_AsLong(py_lTimeout);
 
2043
        PY_CHECK_TYPE(&PyInt_Type, py_uCount, return false;);
 
2044
        r->in.uCount = PyInt_AsLong(py_uCount);
 
2045
        return true;
 
2046
}
 
2047
 
 
2048
static PyObject *unpack_py_IEnumWbemClassObject_Next_args_out(struct IEnumWbemClassObject_Next *r)
 
2049
{
 
2050
        PyObject *result;
 
2051
        PyObject *py_ORPCthat;
 
2052
        PyObject *py_apObjects;
 
2053
        result = PyTuple_New(2);
 
2054
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2055
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
2056
        py_apObjects = PyList_New(*r->out.puReturned);
 
2057
        if (py_apObjects == NULL) {
 
2058
                return NULL;
 
2059
        }
 
2060
        {
 
2061
                int apObjects_cntr_1;
 
2062
                for (apObjects_cntr_1 = 0; apObjects_cntr_1 < *r->out.puReturned; apObjects_cntr_1++) {
 
2063
                        PyObject *py_apObjects_1;
 
2064
                        if (r->out.apObjects[apObjects_cntr_1] == NULL) {
 
2065
                                py_apObjects_1 = Py_None;
 
2066
                                Py_INCREF(py_apObjects_1);
 
2067
                        } else {
 
2068
                                py_apObjects_1 = py_talloc_reference_ex(MInterfacePointer_Type, r->out.apObjects[apObjects_cntr_1], r->out.apObjects[apObjects_cntr_1]);
 
2069
                        }
 
2070
                        PyList_SetItem(py_apObjects, apObjects_cntr_1, py_apObjects_1);
 
2071
                }
 
2072
        }
 
2073
        PyTuple_SetItem(result, 1, py_apObjects);
 
2074
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2075
                PyErr_SetWERROR(r->out.result);
 
2076
                return NULL;
 
2077
        }
 
2078
 
 
2079
        return result;
 
2080
}
 
2081
 
 
2082
static bool pack_py_NextAsync_args_in(PyObject *args, PyObject *kwargs, struct NextAsync *r)
 
2083
{
 
2084
        PyObject *py_ORPCthis;
 
2085
        PyObject *py_uCount;
 
2086
        PyObject *py_pSink;
 
2087
        const char *kwnames[] = {
 
2088
                "ORPCthis", "uCount", "pSink", NULL
 
2089
        };
 
2090
 
 
2091
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:NextAsync", discard_const_p(char *, kwnames), &py_ORPCthis, &py_uCount, &py_pSink)) {
 
2092
                return false;
 
2093
        }
 
2094
 
 
2095
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2096
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2097
                PyErr_NoMemory();
 
2098
                return false;
 
2099
        }
 
2100
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2101
        PY_CHECK_TYPE(&PyInt_Type, py_uCount, return false;);
 
2102
        r->in.uCount = PyInt_AsLong(py_uCount);
 
2103
        r->in.pSink = talloc_ptrtype(r, r->in.pSink);
 
2104
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pSink, return false;);
 
2105
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pSink)) == NULL) {
 
2106
                PyErr_NoMemory();
 
2107
                return false;
 
2108
        }
 
2109
        r->in.pSink = (struct MInterfacePointer *)py_talloc_get_ptr(py_pSink);
 
2110
        return true;
 
2111
}
 
2112
 
 
2113
static PyObject *unpack_py_NextAsync_args_out(struct NextAsync *r)
 
2114
{
 
2115
        PyObject *result;
 
2116
        PyObject *py_ORPCthat;
 
2117
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2118
        result = py_ORPCthat;
 
2119
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2120
                PyErr_SetWERROR(r->out.result);
 
2121
                return NULL;
 
2122
        }
 
2123
 
 
2124
        return result;
 
2125
}
 
2126
 
 
2127
static bool pack_py_IEnumWbemClassObject_Clone_args_in(PyObject *args, PyObject *kwargs, struct IEnumWbemClassObject_Clone *r)
 
2128
{
 
2129
        PyObject *py_ORPCthis;
 
2130
        const char *kwnames[] = {
 
2131
                "ORPCthis", NULL
 
2132
        };
 
2133
 
 
2134
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:IEnumWbemClassObject_Clone", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
2135
                return false;
 
2136
        }
 
2137
 
 
2138
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2139
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2140
                PyErr_NoMemory();
 
2141
                return false;
 
2142
        }
 
2143
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2144
        return true;
 
2145
}
 
2146
 
 
2147
static PyObject *unpack_py_IEnumWbemClassObject_Clone_args_out(struct IEnumWbemClassObject_Clone *r)
 
2148
{
 
2149
        PyObject *result;
 
2150
        PyObject *py_ORPCthat;
 
2151
        PyObject *py_ppEnum;
 
2152
        result = PyTuple_New(2);
 
2153
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2154
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
2155
        if (*r->out.ppEnum == NULL) {
 
2156
                py_ppEnum = Py_None;
 
2157
                Py_INCREF(py_ppEnum);
 
2158
        } else {
 
2159
                py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
 
2160
        }
 
2161
        PyTuple_SetItem(result, 1, py_ppEnum);
 
2162
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2163
                PyErr_SetWERROR(r->out.result);
 
2164
                return NULL;
 
2165
        }
 
2166
 
 
2167
        return result;
 
2168
}
 
2169
 
 
2170
static bool pack_py_Skip_args_in(PyObject *args, PyObject *kwargs, struct Skip *r)
 
2171
{
 
2172
        PyObject *py_ORPCthis;
 
2173
        PyObject *py_lTimeout;
 
2174
        PyObject *py_nCount;
 
2175
        const char *kwnames[] = {
 
2176
                "ORPCthis", "lTimeout", "nCount", NULL
 
2177
        };
 
2178
 
 
2179
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:Skip", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout, &py_nCount)) {
 
2180
                return false;
 
2181
        }
 
2182
 
 
2183
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2184
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2185
                PyErr_NoMemory();
 
2186
                return false;
 
2187
        }
 
2188
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2189
        PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
 
2190
        r->in.lTimeout = PyInt_AsLong(py_lTimeout);
 
2191
        PY_CHECK_TYPE(&PyInt_Type, py_nCount, return false;);
 
2192
        r->in.nCount = PyInt_AsLong(py_nCount);
 
2193
        return true;
 
2194
}
 
2195
 
 
2196
static PyObject *unpack_py_Skip_args_out(struct Skip *r)
 
2197
{
 
2198
        PyObject *result;
 
2199
        PyObject *py_ORPCthat;
 
2200
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2201
        result = py_ORPCthat;
 
2202
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2203
                PyErr_SetWERROR(r->out.result);
 
2204
                return NULL;
 
2205
        }
 
2206
 
 
2207
        return result;
 
2208
}
 
2209
 
 
2210
const struct PyNdrRpcMethodDef py_ndr_IEnumWbemClassObject_methods[] = {
 
2211
        { "Reset", "S.Reset(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_Reset_r, (py_data_pack_fn)pack_py_Reset_args_in, (py_data_unpack_fn)unpack_py_Reset_args_out, 0, &ndr_table_IEnumWbemClassObject },
 
2212
        { "Next", "S.Next(ORPCthis, lTimeout, uCount) -> (ORPCthat, apObjects)", (py_dcerpc_call_fn)dcerpc_IEnumWbemClassObject_Next_r, (py_data_pack_fn)pack_py_IEnumWbemClassObject_Next_args_in, (py_data_unpack_fn)unpack_py_IEnumWbemClassObject_Next_args_out, 1, &ndr_table_IEnumWbemClassObject },
 
2213
        { "NextAsync", "S.NextAsync(ORPCthis, uCount, pSink) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_NextAsync_r, (py_data_pack_fn)pack_py_NextAsync_args_in, (py_data_unpack_fn)unpack_py_NextAsync_args_out, 2, &ndr_table_IEnumWbemClassObject },
 
2214
        { "Clone", "S.Clone(ORPCthis) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_IEnumWbemClassObject_Clone_r, (py_data_pack_fn)pack_py_IEnumWbemClassObject_Clone_args_in, (py_data_unpack_fn)unpack_py_IEnumWbemClassObject_Clone_args_out, 3, &ndr_table_IEnumWbemClassObject },
 
2215
        { "Skip", "S.Skip(ORPCthis, lTimeout, nCount) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_Skip_r, (py_data_pack_fn)pack_py_Skip_args_in, (py_data_unpack_fn)unpack_py_Skip_args_out, 4, &ndr_table_IEnumWbemClassObject },
 
2216
        { NULL }
 
2217
};
 
2218
 
 
2219
static PyObject *interface_IEnumWbemClassObject_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2220
{
 
2221
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IEnumWbemClassObject);
 
2222
}
 
2223
 
 
2224
static PyTypeObject IEnumWbemClassObject_InterfaceType = {
 
2225
        PyObject_HEAD_INIT(NULL) 0,
 
2226
        .tp_name = "wmi.IEnumWbemClassObject",
 
2227
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
2228
        .tp_doc = "IEnumWbemClassObject(binding, lp_ctx=None, credentials=None) -> connection\n"
 
2229
"\n"
 
2230
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
2231
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
2232
"credentials should be a credentials.Credentials object.\n\n",
 
2233
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2234
        .tp_new = interface_IEnumWbemClassObject_new,
 
2235
};
 
2236
 
 
2237
 
 
2238
static bool pack_py_Clone_args_in(PyObject *args, PyObject *kwargs, struct Clone *r)
 
2239
{
 
2240
        PyObject *py_ORPCthis;
 
2241
        const char *kwnames[] = {
 
2242
                "ORPCthis", NULL
 
2243
        };
 
2244
 
 
2245
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:Clone", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
2246
                return false;
 
2247
        }
 
2248
 
 
2249
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2250
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2251
                PyErr_NoMemory();
 
2252
                return false;
 
2253
        }
 
2254
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2255
        return true;
 
2256
}
 
2257
 
 
2258
static PyObject *unpack_py_Clone_args_out(struct Clone *r)
 
2259
{
 
2260
        PyObject *result;
 
2261
        PyObject *py_ORPCthat;
 
2262
        PyObject *py_ppNewCopy;
 
2263
        result = PyTuple_New(2);
 
2264
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2265
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
2266
        if (*r->out.ppNewCopy == NULL) {
 
2267
                py_ppNewCopy = Py_None;
 
2268
                Py_INCREF(py_ppNewCopy);
 
2269
        } else {
 
2270
                py_ppNewCopy = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppNewCopy, *r->out.ppNewCopy);
 
2271
        }
 
2272
        PyTuple_SetItem(result, 1, py_ppNewCopy);
 
2273
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2274
                PyErr_SetWERROR(r->out.result);
 
2275
                return NULL;
 
2276
        }
 
2277
 
 
2278
        return result;
 
2279
}
 
2280
 
 
2281
static bool pack_py_GetNames_args_in(PyObject *args, PyObject *kwargs, struct GetNames *r)
 
2282
{
 
2283
        PyObject *py_ORPCthis;
 
2284
        const char *kwnames[] = {
 
2285
                "ORPCthis", NULL
 
2286
        };
 
2287
 
 
2288
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GetNames", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
2289
                return false;
 
2290
        }
 
2291
 
 
2292
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2293
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2294
                PyErr_NoMemory();
 
2295
                return false;
 
2296
        }
 
2297
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2298
        return true;
 
2299
}
 
2300
 
 
2301
static PyObject *unpack_py_GetNames_args_out(struct GetNames *r)
 
2302
{
 
2303
        PyObject *result;
 
2304
        PyObject *py_ORPCthat;
 
2305
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2306
        result = py_ORPCthat;
 
2307
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2308
                PyErr_SetWERROR(r->out.result);
 
2309
                return NULL;
 
2310
        }
 
2311
 
 
2312
        return result;
 
2313
}
 
2314
 
 
2315
static bool pack_py_BeginEnumeration_args_in(PyObject *args, PyObject *kwargs, struct BeginEnumeration *r)
 
2316
{
 
2317
        PyObject *py_ORPCthis;
 
2318
        PyObject *py_lFlags;
 
2319
        const char *kwnames[] = {
 
2320
                "ORPCthis", "lFlags", NULL
 
2321
        };
 
2322
 
 
2323
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:BeginEnumeration", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lFlags)) {
 
2324
                return false;
 
2325
        }
 
2326
 
 
2327
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2328
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2329
                PyErr_NoMemory();
 
2330
                return false;
 
2331
        }
 
2332
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2333
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
2334
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
2335
        return true;
 
2336
}
 
2337
 
 
2338
static PyObject *unpack_py_BeginEnumeration_args_out(struct BeginEnumeration *r)
 
2339
{
 
2340
        PyObject *result;
 
2341
        PyObject *py_ORPCthat;
 
2342
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2343
        result = py_ORPCthat;
 
2344
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2345
                PyErr_SetWERROR(r->out.result);
 
2346
                return NULL;
 
2347
        }
 
2348
 
 
2349
        return result;
 
2350
}
 
2351
 
 
2352
static bool pack_py_Next_args_in(PyObject *args, PyObject *kwargs, struct Next *r)
 
2353
{
 
2354
        PyObject *py_ORPCthis;
 
2355
        const char *kwnames[] = {
 
2356
                "ORPCthis", NULL
 
2357
        };
 
2358
 
 
2359
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:Next", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
2360
                return false;
 
2361
        }
 
2362
 
 
2363
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2364
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2365
                PyErr_NoMemory();
 
2366
                return false;
 
2367
        }
 
2368
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2369
        return true;
 
2370
}
 
2371
 
 
2372
static PyObject *unpack_py_Next_args_out(struct Next *r)
 
2373
{
 
2374
        PyObject *result;
 
2375
        PyObject *py_ORPCthat;
 
2376
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2377
        result = py_ORPCthat;
 
2378
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2379
                PyErr_SetWERROR(r->out.result);
 
2380
                return NULL;
 
2381
        }
 
2382
 
 
2383
        return result;
 
2384
}
 
2385
 
 
2386
static bool pack_py_EndEnumeration_args_in(PyObject *args, PyObject *kwargs, struct EndEnumeration *r)
 
2387
{
 
2388
        PyObject *py_ORPCthis;
 
2389
        const char *kwnames[] = {
 
2390
                "ORPCthis", NULL
 
2391
        };
 
2392
 
 
2393
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:EndEnumeration", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
2394
                return false;
 
2395
        }
 
2396
 
 
2397
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2398
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2399
                PyErr_NoMemory();
 
2400
                return false;
 
2401
        }
 
2402
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2403
        return true;
 
2404
}
 
2405
 
 
2406
static PyObject *unpack_py_EndEnumeration_args_out(struct EndEnumeration *r)
 
2407
{
 
2408
        PyObject *result;
 
2409
        PyObject *py_ORPCthat;
 
2410
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2411
        result = py_ORPCthat;
 
2412
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2413
                PyErr_SetWERROR(r->out.result);
 
2414
                return NULL;
 
2415
        }
 
2416
 
 
2417
        return result;
 
2418
}
 
2419
 
 
2420
static bool pack_py_SetValue_args_in(PyObject *args, PyObject *kwargs, struct SetValue *r)
 
2421
{
 
2422
        PyObject *py_ORPCthis;
 
2423
        const char *kwnames[] = {
 
2424
                "ORPCthis", NULL
 
2425
        };
 
2426
 
 
2427
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:SetValue", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
2428
                return false;
 
2429
        }
 
2430
 
 
2431
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2432
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2433
                PyErr_NoMemory();
 
2434
                return false;
 
2435
        }
 
2436
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2437
        return true;
 
2438
}
 
2439
 
 
2440
static PyObject *unpack_py_SetValue_args_out(struct SetValue *r)
 
2441
{
 
2442
        PyObject *result;
 
2443
        PyObject *py_ORPCthat;
 
2444
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2445
        result = py_ORPCthat;
 
2446
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2447
                PyErr_SetWERROR(r->out.result);
 
2448
                return NULL;
 
2449
        }
 
2450
 
 
2451
        return result;
 
2452
}
 
2453
 
 
2454
static bool pack_py_GetValue_args_in(PyObject *args, PyObject *kwargs, struct GetValue *r)
 
2455
{
 
2456
        PyObject *py_ORPCthis;
 
2457
        const char *kwnames[] = {
 
2458
                "ORPCthis", NULL
 
2459
        };
 
2460
 
 
2461
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GetValue", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
2462
                return false;
 
2463
        }
 
2464
 
 
2465
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2466
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2467
                PyErr_NoMemory();
 
2468
                return false;
 
2469
        }
 
2470
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2471
        return true;
 
2472
}
 
2473
 
 
2474
static PyObject *unpack_py_GetValue_args_out(struct GetValue *r)
 
2475
{
 
2476
        PyObject *result;
 
2477
        PyObject *py_ORPCthat;
 
2478
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2479
        result = py_ORPCthat;
 
2480
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2481
                PyErr_SetWERROR(r->out.result);
 
2482
                return NULL;
 
2483
        }
 
2484
 
 
2485
        return result;
 
2486
}
 
2487
 
 
2488
static bool pack_py_DeleteValue_args_in(PyObject *args, PyObject *kwargs, struct DeleteValue *r)
 
2489
{
 
2490
        PyObject *py_ORPCthis;
 
2491
        const char *kwnames[] = {
 
2492
                "ORPCthis", NULL
 
2493
        };
 
2494
 
 
2495
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:DeleteValue", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
2496
                return false;
 
2497
        }
 
2498
 
 
2499
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2500
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2501
                PyErr_NoMemory();
 
2502
                return false;
 
2503
        }
 
2504
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2505
        return true;
 
2506
}
 
2507
 
 
2508
static PyObject *unpack_py_DeleteValue_args_out(struct DeleteValue *r)
 
2509
{
 
2510
        PyObject *result;
 
2511
        PyObject *py_ORPCthat;
 
2512
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2513
        result = py_ORPCthat;
 
2514
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2515
                PyErr_SetWERROR(r->out.result);
 
2516
                return NULL;
 
2517
        }
 
2518
 
 
2519
        return result;
 
2520
}
 
2521
 
 
2522
static bool pack_py_DeleteAll_args_in(PyObject *args, PyObject *kwargs, struct DeleteAll *r)
 
2523
{
 
2524
        PyObject *py_ORPCthis;
 
2525
        const char *kwnames[] = {
 
2526
                "ORPCthis", NULL
 
2527
        };
 
2528
 
 
2529
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:DeleteAll", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
2530
                return false;
 
2531
        }
 
2532
 
 
2533
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2534
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2535
                PyErr_NoMemory();
 
2536
                return false;
 
2537
        }
 
2538
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2539
        return true;
 
2540
}
 
2541
 
 
2542
static PyObject *unpack_py_DeleteAll_args_out(struct DeleteAll *r)
 
2543
{
 
2544
        PyObject *result;
 
2545
        PyObject *py_ORPCthat;
 
2546
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2547
        result = py_ORPCthat;
 
2548
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2549
                PyErr_SetWERROR(r->out.result);
 
2550
                return NULL;
 
2551
        }
 
2552
 
 
2553
        return result;
 
2554
}
 
2555
 
 
2556
const struct PyNdrRpcMethodDef py_ndr_IWbemContext_methods[] = {
 
2557
        { "Clone", "S.Clone(ORPCthis) -> (ORPCthat, ppNewCopy)", (py_dcerpc_call_fn)dcerpc_Clone_r, (py_data_pack_fn)pack_py_Clone_args_in, (py_data_unpack_fn)unpack_py_Clone_args_out, 0, &ndr_table_IWbemContext },
 
2558
        { "GetNames", "S.GetNames(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_GetNames_r, (py_data_pack_fn)pack_py_GetNames_args_in, (py_data_unpack_fn)unpack_py_GetNames_args_out, 1, &ndr_table_IWbemContext },
 
2559
        { "BeginEnumeration", "S.BeginEnumeration(ORPCthis, lFlags) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_BeginEnumeration_r, (py_data_pack_fn)pack_py_BeginEnumeration_args_in, (py_data_unpack_fn)unpack_py_BeginEnumeration_args_out, 2, &ndr_table_IWbemContext },
 
2560
        { "Next", "S.Next(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_Next_r, (py_data_pack_fn)pack_py_Next_args_in, (py_data_unpack_fn)unpack_py_Next_args_out, 3, &ndr_table_IWbemContext },
 
2561
        { "EndEnumeration", "S.EndEnumeration(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_EndEnumeration_r, (py_data_pack_fn)pack_py_EndEnumeration_args_in, (py_data_unpack_fn)unpack_py_EndEnumeration_args_out, 4, &ndr_table_IWbemContext },
 
2562
        { "SetValue", "S.SetValue(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_SetValue_r, (py_data_pack_fn)pack_py_SetValue_args_in, (py_data_unpack_fn)unpack_py_SetValue_args_out, 5, &ndr_table_IWbemContext },
 
2563
        { "GetValue", "S.GetValue(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_GetValue_r, (py_data_pack_fn)pack_py_GetValue_args_in, (py_data_unpack_fn)unpack_py_GetValue_args_out, 6, &ndr_table_IWbemContext },
 
2564
        { "DeleteValue", "S.DeleteValue(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_DeleteValue_r, (py_data_pack_fn)pack_py_DeleteValue_args_in, (py_data_unpack_fn)unpack_py_DeleteValue_args_out, 7, &ndr_table_IWbemContext },
 
2565
        { "DeleteAll", "S.DeleteAll(ORPCthis) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_DeleteAll_r, (py_data_pack_fn)pack_py_DeleteAll_args_in, (py_data_unpack_fn)unpack_py_DeleteAll_args_out, 8, &ndr_table_IWbemContext },
 
2566
        { NULL }
 
2567
};
 
2568
 
 
2569
static PyObject *interface_IWbemContext_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2570
{
 
2571
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemContext);
 
2572
}
 
2573
 
 
2574
static PyTypeObject IWbemContext_InterfaceType = {
 
2575
        PyObject_HEAD_INIT(NULL) 0,
 
2576
        .tp_name = "wmi.IWbemContext",
 
2577
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
2578
        .tp_doc = "IWbemContext(binding, lp_ctx=None, credentials=None) -> connection\n"
 
2579
"\n"
 
2580
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
2581
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
2582
"credentials should be a credentials.Credentials object.\n\n",
 
2583
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2584
        .tp_new = interface_IWbemContext_new,
 
2585
};
 
2586
 
 
2587
 
 
2588
static bool pack_py_EstablishPosition_args_in(PyObject *args, PyObject *kwargs, struct EstablishPosition *r)
 
2589
{
 
2590
        PyObject *py_ORPCthis;
 
2591
        PyObject *py_wszLocaleList;
 
2592
        PyObject *py_dwNumLocales;
 
2593
        const char *kwnames[] = {
 
2594
                "ORPCthis", "wszLocaleList", "dwNumLocales", NULL
 
2595
        };
 
2596
 
 
2597
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:EstablishPosition", discard_const_p(char *, kwnames), &py_ORPCthis, &py_wszLocaleList, &py_dwNumLocales)) {
 
2598
                return false;
 
2599
        }
 
2600
 
 
2601
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2602
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2603
                PyErr_NoMemory();
 
2604
                return false;
 
2605
        }
 
2606
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2607
        if (py_wszLocaleList == Py_None) {
 
2608
                r->in.wszLocaleList = NULL;
 
2609
        } else {
 
2610
                r->in.wszLocaleList = NULL;
 
2611
                if (PyUnicode_Check(py_wszLocaleList)) {
 
2612
                        r->in.wszLocaleList = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszLocaleList, "utf-8", "ignore"));
 
2613
                } else if (PyString_Check(py_wszLocaleList)) {
 
2614
                        r->in.wszLocaleList = PyString_AS_STRING(py_wszLocaleList);
 
2615
                } else {
 
2616
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszLocaleList)->tp_name);
 
2617
                        return false;
 
2618
                }
 
2619
        }
 
2620
        PY_CHECK_TYPE(&PyInt_Type, py_dwNumLocales, return false;);
 
2621
        r->in.dwNumLocales = PyInt_AsLong(py_dwNumLocales);
 
2622
        return true;
 
2623
}
 
2624
 
 
2625
static PyObject *unpack_py_EstablishPosition_args_out(struct EstablishPosition *r)
 
2626
{
 
2627
        PyObject *result;
 
2628
        PyObject *py_ORPCthat;
 
2629
        PyObject *py_reserved;
 
2630
        result = PyTuple_New(2);
 
2631
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2632
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
2633
        py_reserved = PyInt_FromLong(*r->out.reserved);
 
2634
        PyTuple_SetItem(result, 1, py_reserved);
 
2635
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2636
                PyErr_SetWERROR(r->out.result);
 
2637
                return NULL;
 
2638
        }
 
2639
 
 
2640
        return result;
 
2641
}
 
2642
 
 
2643
static bool pack_py_RequestChallenge_args_in(PyObject *args, PyObject *kwargs, struct RequestChallenge *r)
 
2644
{
 
2645
        PyObject *py_ORPCthis;
 
2646
        PyObject *py_wszNetworkResource;
 
2647
        PyObject *py_wszUser;
 
2648
        const char *kwnames[] = {
 
2649
                "ORPCthis", "wszNetworkResource", "wszUser", NULL
 
2650
        };
 
2651
 
 
2652
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:RequestChallenge", discard_const_p(char *, kwnames), &py_ORPCthis, &py_wszNetworkResource, &py_wszUser)) {
 
2653
                return false;
 
2654
        }
 
2655
 
 
2656
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2657
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2658
                PyErr_NoMemory();
 
2659
                return false;
 
2660
        }
 
2661
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2662
        if (py_wszNetworkResource == Py_None) {
 
2663
                r->in.wszNetworkResource = NULL;
 
2664
        } else {
 
2665
                r->in.wszNetworkResource = NULL;
 
2666
                if (PyUnicode_Check(py_wszNetworkResource)) {
 
2667
                        r->in.wszNetworkResource = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszNetworkResource, "utf-8", "ignore"));
 
2668
                } else if (PyString_Check(py_wszNetworkResource)) {
 
2669
                        r->in.wszNetworkResource = PyString_AS_STRING(py_wszNetworkResource);
 
2670
                } else {
 
2671
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszNetworkResource)->tp_name);
 
2672
                        return false;
 
2673
                }
 
2674
        }
 
2675
        if (py_wszUser == Py_None) {
 
2676
                r->in.wszUser = NULL;
 
2677
        } else {
 
2678
                r->in.wszUser = NULL;
 
2679
                if (PyUnicode_Check(py_wszUser)) {
 
2680
                        r->in.wszUser = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszUser, "utf-8", "ignore"));
 
2681
                } else if (PyString_Check(py_wszUser)) {
 
2682
                        r->in.wszUser = PyString_AS_STRING(py_wszUser);
 
2683
                } else {
 
2684
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszUser)->tp_name);
 
2685
                        return false;
 
2686
                }
 
2687
        }
 
2688
        return true;
 
2689
}
 
2690
 
 
2691
static PyObject *unpack_py_RequestChallenge_args_out(struct RequestChallenge *r)
 
2692
{
 
2693
        PyObject *result;
 
2694
        PyObject *py_ORPCthat;
 
2695
        PyObject *py_Nonce;
 
2696
        result = PyTuple_New(2);
 
2697
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2698
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
2699
        py_Nonce = PyList_New(16);
 
2700
        if (py_Nonce == NULL) {
 
2701
                return NULL;
 
2702
        }
 
2703
        {
 
2704
                int Nonce_cntr_1;
 
2705
                for (Nonce_cntr_1 = 0; Nonce_cntr_1 < 16; Nonce_cntr_1++) {
 
2706
                        PyObject *py_Nonce_1;
 
2707
                        py_Nonce_1 = PyInt_FromLong(r->out.Nonce[Nonce_cntr_1]);
 
2708
                        PyList_SetItem(py_Nonce, Nonce_cntr_1, py_Nonce_1);
 
2709
                }
 
2710
        }
 
2711
        PyTuple_SetItem(result, 1, py_Nonce);
 
2712
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2713
                PyErr_SetWERROR(r->out.result);
 
2714
                return NULL;
 
2715
        }
 
2716
 
 
2717
        return result;
 
2718
}
 
2719
 
 
2720
static bool pack_py_WBEMLogin_args_in(PyObject *args, PyObject *kwargs, struct WBEMLogin *r)
 
2721
{
 
2722
        PyObject *py_ORPCthis;
 
2723
        PyObject *py_wszPreferredLocale;
 
2724
        PyObject *py_AccessToken;
 
2725
        PyObject *py_lFlags;
 
2726
        PyObject *py_pCtx;
 
2727
        const char *kwnames[] = {
 
2728
                "ORPCthis", "wszPreferredLocale", "AccessToken", "lFlags", "pCtx", NULL
 
2729
        };
 
2730
 
 
2731
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:WBEMLogin", discard_const_p(char *, kwnames), &py_ORPCthis, &py_wszPreferredLocale, &py_AccessToken, &py_lFlags, &py_pCtx)) {
 
2732
                return false;
 
2733
        }
 
2734
 
 
2735
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2736
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2737
                PyErr_NoMemory();
 
2738
                return false;
 
2739
        }
 
2740
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2741
        if (py_wszPreferredLocale == Py_None) {
 
2742
                r->in.wszPreferredLocale = NULL;
 
2743
        } else {
 
2744
                r->in.wszPreferredLocale = NULL;
 
2745
                if (PyUnicode_Check(py_wszPreferredLocale)) {
 
2746
                        r->in.wszPreferredLocale = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszPreferredLocale, "utf-8", "ignore"));
 
2747
                } else if (PyString_Check(py_wszPreferredLocale)) {
 
2748
                        r->in.wszPreferredLocale = PyString_AS_STRING(py_wszPreferredLocale);
 
2749
                } else {
 
2750
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszPreferredLocale)->tp_name);
 
2751
                        return false;
 
2752
                }
 
2753
        }
 
2754
        if (py_AccessToken == Py_None) {
 
2755
                r->in.AccessToken = NULL;
 
2756
        } else {
 
2757
                r->in.AccessToken = NULL;
 
2758
                PY_CHECK_TYPE(&PyList_Type, py_AccessToken, return false;);
 
2759
                {
 
2760
                        int AccessToken_cntr_1;
 
2761
                        r->in.AccessToken = talloc_array_ptrtype(r, r->in.AccessToken, PyList_GET_SIZE(py_AccessToken));
 
2762
                        if (!r->in.AccessToken) { return false;; }
 
2763
                        talloc_set_name_const(r->in.AccessToken, "ARRAY: r->in.AccessToken");
 
2764
                        for (AccessToken_cntr_1 = 0; AccessToken_cntr_1 < PyList_GET_SIZE(py_AccessToken); AccessToken_cntr_1++) {
 
2765
                                PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(py_AccessToken, AccessToken_cntr_1), return false;);
 
2766
                                r->in.AccessToken[AccessToken_cntr_1] = PyInt_AsLong(PyList_GET_ITEM(py_AccessToken, AccessToken_cntr_1));
 
2767
                        }
 
2768
                }
 
2769
        }
 
2770
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
2771
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
2772
        r->in.pCtx = talloc_ptrtype(r, r->in.pCtx);
 
2773
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
2774
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
2775
                PyErr_NoMemory();
 
2776
                return false;
 
2777
        }
 
2778
        r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
2779
        return true;
 
2780
}
 
2781
 
 
2782
static PyObject *unpack_py_WBEMLogin_args_out(struct WBEMLogin *r)
 
2783
{
 
2784
        PyObject *result;
 
2785
        PyObject *py_ORPCthat;
 
2786
        PyObject *py_ppNamespace;
 
2787
        result = PyTuple_New(2);
 
2788
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2789
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
2790
        if (*r->out.ppNamespace == NULL) {
 
2791
                py_ppNamespace = Py_None;
 
2792
                Py_INCREF(py_ppNamespace);
 
2793
        } else {
 
2794
                py_ppNamespace = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppNamespace, *r->out.ppNamespace);
 
2795
        }
 
2796
        PyTuple_SetItem(result, 1, py_ppNamespace);
 
2797
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2798
                PyErr_SetWERROR(r->out.result);
 
2799
                return NULL;
 
2800
        }
 
2801
 
 
2802
        return result;
 
2803
}
 
2804
 
 
2805
static bool pack_py_NTLMLogin_args_in(PyObject *args, PyObject *kwargs, struct NTLMLogin *r)
 
2806
{
 
2807
        PyObject *py_ORPCthis;
 
2808
        PyObject *py_wszNetworkResource;
 
2809
        PyObject *py_wszPreferredLocale;
 
2810
        PyObject *py_lFlags;
 
2811
        PyObject *py_pCtx;
 
2812
        const char *kwnames[] = {
 
2813
                "ORPCthis", "wszNetworkResource", "wszPreferredLocale", "lFlags", "pCtx", NULL
 
2814
        };
 
2815
 
 
2816
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:NTLMLogin", discard_const_p(char *, kwnames), &py_ORPCthis, &py_wszNetworkResource, &py_wszPreferredLocale, &py_lFlags, &py_pCtx)) {
 
2817
                return false;
 
2818
        }
 
2819
 
 
2820
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
2821
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
2822
                PyErr_NoMemory();
 
2823
                return false;
 
2824
        }
 
2825
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
2826
        if (py_wszNetworkResource == Py_None) {
 
2827
                r->in.wszNetworkResource = NULL;
 
2828
        } else {
 
2829
                r->in.wszNetworkResource = NULL;
 
2830
                if (PyUnicode_Check(py_wszNetworkResource)) {
 
2831
                        r->in.wszNetworkResource = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszNetworkResource, "utf-8", "ignore"));
 
2832
                } else if (PyString_Check(py_wszNetworkResource)) {
 
2833
                        r->in.wszNetworkResource = PyString_AS_STRING(py_wszNetworkResource);
 
2834
                } else {
 
2835
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszNetworkResource)->tp_name);
 
2836
                        return false;
 
2837
                }
 
2838
        }
 
2839
        if (py_wszPreferredLocale == Py_None) {
 
2840
                r->in.wszPreferredLocale = NULL;
 
2841
        } else {
 
2842
                r->in.wszPreferredLocale = NULL;
 
2843
                if (PyUnicode_Check(py_wszPreferredLocale)) {
 
2844
                        r->in.wszPreferredLocale = PyString_AS_STRING(PyUnicode_AsEncodedString(py_wszPreferredLocale, "utf-8", "ignore"));
 
2845
                } else if (PyString_Check(py_wszPreferredLocale)) {
 
2846
                        r->in.wszPreferredLocale = PyString_AS_STRING(py_wszPreferredLocale);
 
2847
                } else {
 
2848
                        PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_wszPreferredLocale)->tp_name);
 
2849
                        return false;
 
2850
                }
 
2851
        }
 
2852
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
2853
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
2854
        if (py_pCtx == Py_None) {
 
2855
                r->in.pCtx = NULL;
 
2856
        } else {
 
2857
                r->in.pCtx = NULL;
 
2858
                PY_CHECK_TYPE(MInterfacePointer_Type, py_pCtx, return false;);
 
2859
                if (talloc_reference(r, py_talloc_get_mem_ctx(py_pCtx)) == NULL) {
 
2860
                        PyErr_NoMemory();
 
2861
                        return false;
 
2862
                }
 
2863
                r->in.pCtx = (struct MInterfacePointer *)py_talloc_get_ptr(py_pCtx);
 
2864
        }
 
2865
        return true;
 
2866
}
 
2867
 
 
2868
static PyObject *unpack_py_NTLMLogin_args_out(struct NTLMLogin *r)
 
2869
{
 
2870
        PyObject *result;
 
2871
        PyObject *py_ORPCthat;
 
2872
        PyObject *py_ppNamespace;
 
2873
        result = PyTuple_New(2);
 
2874
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
2875
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
2876
        if (*r->out.ppNamespace == NULL) {
 
2877
                py_ppNamespace = Py_None;
 
2878
                Py_INCREF(py_ppNamespace);
 
2879
        } else {
 
2880
                py_ppNamespace = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppNamespace, *r->out.ppNamespace);
 
2881
        }
 
2882
        PyTuple_SetItem(result, 1, py_ppNamespace);
 
2883
        if (!W_ERROR_IS_OK(r->out.result)) {
 
2884
                PyErr_SetWERROR(r->out.result);
 
2885
                return NULL;
 
2886
        }
 
2887
 
 
2888
        return result;
 
2889
}
 
2890
 
 
2891
const struct PyNdrRpcMethodDef py_ndr_IWbemLevel1Login_methods[] = {
 
2892
        { "EstablishPosition", "S.EstablishPosition(ORPCthis, wszLocaleList, dwNumLocales) -> (ORPCthat, reserved)", (py_dcerpc_call_fn)dcerpc_EstablishPosition_r, (py_data_pack_fn)pack_py_EstablishPosition_args_in, (py_data_unpack_fn)unpack_py_EstablishPosition_args_out, 0, &ndr_table_IWbemLevel1Login },
 
2893
        { "RequestChallenge", "S.RequestChallenge(ORPCthis, wszNetworkResource, wszUser) -> (ORPCthat, Nonce)", (py_dcerpc_call_fn)dcerpc_RequestChallenge_r, (py_data_pack_fn)pack_py_RequestChallenge_args_in, (py_data_unpack_fn)unpack_py_RequestChallenge_args_out, 1, &ndr_table_IWbemLevel1Login },
 
2894
        { "WBEMLogin", "S.WBEMLogin(ORPCthis, wszPreferredLocale, AccessToken, lFlags, pCtx) -> (ORPCthat, ppNamespace)", (py_dcerpc_call_fn)dcerpc_WBEMLogin_r, (py_data_pack_fn)pack_py_WBEMLogin_args_in, (py_data_unpack_fn)unpack_py_WBEMLogin_args_out, 2, &ndr_table_IWbemLevel1Login },
 
2895
        { "NTLMLogin", "S.NTLMLogin(ORPCthis, wszNetworkResource, wszPreferredLocale, lFlags, pCtx) -> (ORPCthat, ppNamespace)", (py_dcerpc_call_fn)dcerpc_NTLMLogin_r, (py_data_pack_fn)pack_py_NTLMLogin_args_in, (py_data_unpack_fn)unpack_py_NTLMLogin_args_out, 3, &ndr_table_IWbemLevel1Login },
 
2896
        { NULL }
 
2897
};
 
2898
 
 
2899
static PyObject *interface_IWbemLevel1Login_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2900
{
 
2901
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemLevel1Login);
 
2902
}
 
2903
 
 
2904
static PyTypeObject IWbemLevel1Login_InterfaceType = {
 
2905
        PyObject_HEAD_INIT(NULL) 0,
 
2906
        .tp_name = "wmi.IWbemLevel1Login",
 
2907
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
2908
        .tp_doc = "IWbemLevel1Login(binding, lp_ctx=None, credentials=None) -> connection\n"
 
2909
"\n"
 
2910
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
2911
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
2912
"credentials should be a credentials.Credentials object.\n\n",
 
2913
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2914
        .tp_new = interface_IWbemLevel1Login_new,
 
2915
};
 
2916
 
 
2917
 
 
2918
static PyObject *py_WBEMDATA_get_size(PyObject *obj, void *closure)
 
2919
{
 
2920
        struct WBEMDATA *object = (struct WBEMDATA *)py_talloc_get_ptr(obj);
 
2921
        PyObject *py_size;
 
2922
        py_size = PyInt_FromLong(object->size);
 
2923
        return py_size;
 
2924
}
 
2925
 
 
2926
static int py_WBEMDATA_set_size(PyObject *py_obj, PyObject *value, void *closure)
 
2927
{
 
2928
        struct WBEMDATA *object = (struct WBEMDATA *)py_talloc_get_ptr(py_obj);
 
2929
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
2930
        object->size = PyInt_AsLong(value);
 
2931
        return 0;
 
2932
}
 
2933
 
 
2934
static PyObject *py_WBEMDATA_get_data(PyObject *obj, void *closure)
 
2935
{
 
2936
        struct WBEMDATA *object = (struct WBEMDATA *)py_talloc_get_ptr(obj);
 
2937
        PyObject *py_data;
 
2938
        py_data = PyList_New(object->size);
 
2939
        if (py_data == NULL) {
 
2940
                return NULL;
 
2941
        }
 
2942
        {
 
2943
                int data_cntr_0;
 
2944
                for (data_cntr_0 = 0; data_cntr_0 < object->size; data_cntr_0++) {
 
2945
                        PyObject *py_data_0;
 
2946
                        py_data_0 = PyInt_FromLong(object->data[data_cntr_0]);
 
2947
                        PyList_SetItem(py_data, data_cntr_0, py_data_0);
 
2948
                }
 
2949
        }
 
2950
        return py_data;
 
2951
}
 
2952
 
 
2953
static int py_WBEMDATA_set_data(PyObject *py_obj, PyObject *value, void *closure)
 
2954
{
 
2955
        struct WBEMDATA *object = (struct WBEMDATA *)py_talloc_get_ptr(py_obj);
 
2956
        PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
2957
        {
 
2958
                int data_cntr_0;
 
2959
                object->data = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
 
2960
                if (!object->data) { return -1;; }
 
2961
                talloc_set_name_const(object->data, "ARRAY: object->data");
 
2962
                for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
 
2963
                        PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, data_cntr_0), return -1;);
 
2964
                        object->data[data_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, data_cntr_0));
 
2965
                }
 
2966
        }
 
2967
        return 0;
 
2968
}
 
2969
 
 
2970
static PyGetSetDef py_WBEMDATA_getsetters[] = {
 
2971
        { discard_const_p(char, "size"), py_WBEMDATA_get_size, py_WBEMDATA_set_size },
 
2972
        { discard_const_p(char, "data"), py_WBEMDATA_get_data, py_WBEMDATA_set_data },
 
2973
        { NULL }
 
2974
};
 
2975
 
 
2976
static PyObject *py_WBEMDATA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
2977
{
 
2978
        return py_talloc_new(struct WBEMDATA, type);
 
2979
}
 
2980
 
 
2981
 
 
2982
static PyTypeObject WBEMDATA_Type = {
 
2983
        PyObject_HEAD_INIT(NULL) 0,
 
2984
        .tp_name = "wmi.WBEMDATA",
 
2985
        .tp_getset = py_WBEMDATA_getsetters,
 
2986
        .tp_methods = NULL,
 
2987
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
2988
        .tp_basicsize = sizeof(py_talloc_Object),
 
2989
        .tp_new = py_WBEMDATA_new,
 
2990
};
 
2991
 
 
2992
 
 
2993
static PyObject *py_WBEMDATA4_get_data_size(PyObject *obj, void *closure)
 
2994
{
 
2995
        struct WBEMDATA4 *object = (struct WBEMDATA4 *)py_talloc_get_ptr(obj);
 
2996
        PyObject *py_data_size;
 
2997
        py_data_size = PyInt_FromLong(object->data_size);
 
2998
        return py_data_size;
 
2999
}
 
3000
 
 
3001
static int py_WBEMDATA4_set_data_size(PyObject *py_obj, PyObject *value, void *closure)
 
3002
{
 
3003
        struct WBEMDATA4 *object = (struct WBEMDATA4 *)py_talloc_get_ptr(py_obj);
 
3004
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3005
        object->data_size = PyInt_AsLong(value);
 
3006
        return 0;
 
3007
}
 
3008
 
 
3009
static PyObject *py_WBEMDATA4_get_wtype(PyObject *obj, void *closure)
 
3010
{
 
3011
        struct WBEMDATA4 *object = (struct WBEMDATA4 *)py_talloc_get_ptr(obj);
 
3012
        PyObject *py_wtype;
 
3013
        py_wtype = PyInt_FromLong(object->wtype);
 
3014
        return py_wtype;
 
3015
}
 
3016
 
 
3017
static int py_WBEMDATA4_set_wtype(PyObject *py_obj, PyObject *value, void *closure)
 
3018
{
 
3019
        struct WBEMDATA4 *object = (struct WBEMDATA4 *)py_talloc_get_ptr(py_obj);
 
3020
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3021
        object->wtype = PyInt_AsLong(value);
 
3022
        return 0;
 
3023
}
 
3024
 
 
3025
static PyGetSetDef py_WBEMDATA4_getsetters[] = {
 
3026
        { discard_const_p(char, "data_size"), py_WBEMDATA4_get_data_size, py_WBEMDATA4_set_data_size },
 
3027
        { discard_const_p(char, "wtype"), py_WBEMDATA4_get_wtype, py_WBEMDATA4_set_wtype },
 
3028
        { NULL }
 
3029
};
 
3030
 
 
3031
static PyObject *py_WBEMDATA4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3032
{
 
3033
        return py_talloc_new(struct WBEMDATA4, type);
 
3034
}
 
3035
 
 
3036
 
 
3037
static PyTypeObject WBEMDATA4_Type = {
 
3038
        PyObject_HEAD_INIT(NULL) 0,
 
3039
        .tp_name = "wmi.WBEMDATA4",
 
3040
        .tp_getset = py_WBEMDATA4_getsetters,
 
3041
        .tp_methods = NULL,
 
3042
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3043
        .tp_basicsize = sizeof(py_talloc_Object),
 
3044
        .tp_new = py_WBEMDATA4_new,
 
3045
};
 
3046
 
 
3047
 
 
3048
static PyObject *py_WBEMDATA3_get_data(PyObject *obj, void *closure)
 
3049
{
 
3050
        struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(obj);
 
3051
        PyObject *py_data;
 
3052
        if (object->data == NULL) {
 
3053
                py_data = Py_None;
 
3054
                Py_INCREF(py_data);
 
3055
        } else {
 
3056
                py_data = py_talloc_reference_ex(&WBEMDATA4_Type, object->data, object->data);
 
3057
        }
 
3058
        return py_data;
 
3059
}
 
3060
 
 
3061
static int py_WBEMDATA3_set_data(PyObject *py_obj, PyObject *value, void *closure)
 
3062
{
 
3063
        struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(py_obj);
 
3064
        talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->data);
 
3065
        if (value == Py_None) {
 
3066
                object->data = NULL;
 
3067
        } else {
 
3068
                object->data = NULL;
 
3069
                PY_CHECK_TYPE(&WBEMDATA4_Type, value, return -1;);
 
3070
                if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
 
3071
                        PyErr_NoMemory();
 
3072
                        return -1;
 
3073
                }
 
3074
                object->data = (struct WBEMDATA4 *)py_talloc_get_ptr(value);
 
3075
        }
 
3076
        return 0;
 
3077
}
 
3078
 
 
3079
static PyObject *py_WBEMDATA3_get_data_size(PyObject *obj, void *closure)
 
3080
{
 
3081
        struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(obj);
 
3082
        PyObject *py_data_size;
 
3083
        py_data_size = PyInt_FromLong(object->data_size);
 
3084
        return py_data_size;
 
3085
}
 
3086
 
 
3087
static int py_WBEMDATA3_set_data_size(PyObject *py_obj, PyObject *value, void *closure)
 
3088
{
 
3089
        struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(py_obj);
 
3090
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3091
        object->data_size = PyInt_AsLong(value);
 
3092
        return 0;
 
3093
}
 
3094
 
 
3095
static PyObject *py_WBEMDATA3_get_wtype(PyObject *obj, void *closure)
 
3096
{
 
3097
        struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(obj);
 
3098
        PyObject *py_wtype;
 
3099
        py_wtype = PyInt_FromLong(object->wtype);
 
3100
        return py_wtype;
 
3101
}
 
3102
 
 
3103
static int py_WBEMDATA3_set_wtype(PyObject *py_obj, PyObject *value, void *closure)
 
3104
{
 
3105
        struct WBEMDATA3 *object = (struct WBEMDATA3 *)py_talloc_get_ptr(py_obj);
 
3106
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3107
        object->wtype = PyInt_AsLong(value);
 
3108
        return 0;
 
3109
}
 
3110
 
 
3111
static PyGetSetDef py_WBEMDATA3_getsetters[] = {
 
3112
        { discard_const_p(char, "data"), py_WBEMDATA3_get_data, py_WBEMDATA3_set_data },
 
3113
        { discard_const_p(char, "data_size"), py_WBEMDATA3_get_data_size, py_WBEMDATA3_set_data_size },
 
3114
        { discard_const_p(char, "wtype"), py_WBEMDATA3_get_wtype, py_WBEMDATA3_set_wtype },
 
3115
        { NULL }
 
3116
};
 
3117
 
 
3118
static PyObject *py_WBEMDATA3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3119
{
 
3120
        return py_talloc_new(struct WBEMDATA3, type);
 
3121
}
 
3122
 
 
3123
 
 
3124
static PyTypeObject WBEMDATA3_Type = {
 
3125
        PyObject_HEAD_INIT(NULL) 0,
 
3126
        .tp_name = "wmi.WBEMDATA3",
 
3127
        .tp_getset = py_WBEMDATA3_getsetters,
 
3128
        .tp_methods = NULL,
 
3129
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3130
        .tp_basicsize = sizeof(py_talloc_Object),
 
3131
        .tp_new = py_WBEMDATA3_new,
 
3132
};
 
3133
 
 
3134
 
 
3135
static PyObject *py_WBEMDATA2_get_data(PyObject *obj, void *closure)
 
3136
{
 
3137
        struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(obj);
 
3138
        PyObject *py_data;
 
3139
        if (object->data == NULL) {
 
3140
                py_data = Py_None;
 
3141
                Py_INCREF(py_data);
 
3142
        } else {
 
3143
                py_data = PyList_New(object->obj_num);
 
3144
                if (py_data == NULL) {
 
3145
                        return NULL;
 
3146
                }
 
3147
                {
 
3148
                        int data_cntr_1;
 
3149
                        for (data_cntr_1 = 0; data_cntr_1 < object->obj_num; data_cntr_1++) {
 
3150
                                PyObject *py_data_1;
 
3151
                                py_data_1 = py_talloc_reference_ex(&WBEMDATA3_Type, object->data, &object->data[data_cntr_1]);
 
3152
                                PyList_SetItem(py_data, data_cntr_1, py_data_1);
 
3153
                        }
 
3154
                }
 
3155
        }
 
3156
        return py_data;
 
3157
}
 
3158
 
 
3159
static int py_WBEMDATA2_set_data(PyObject *py_obj, PyObject *value, void *closure)
 
3160
{
 
3161
        struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(py_obj);
 
3162
        talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->data);
 
3163
        if (value == Py_None) {
 
3164
                object->data = NULL;
 
3165
        } else {
 
3166
                object->data = NULL;
 
3167
                PY_CHECK_TYPE(&PyList_Type, value, return -1;);
 
3168
                {
 
3169
                        int data_cntr_1;
 
3170
                        object->data = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
 
3171
                        if (!object->data) { return -1;; }
 
3172
                        talloc_set_name_const(object->data, "ARRAY: object->data");
 
3173
                        for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
 
3174
                                PY_CHECK_TYPE(&WBEMDATA3_Type, PyList_GET_ITEM(value, data_cntr_1), return -1;);
 
3175
                                if (talloc_reference(object->data, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, data_cntr_1))) == NULL) {
 
3176
                                        PyErr_NoMemory();
 
3177
                                        return -1;
 
3178
                                }
 
3179
                                object->data[data_cntr_1] = *(struct WBEMDATA3 *)py_talloc_get_ptr(PyList_GET_ITEM(value, data_cntr_1));
 
3180
                        }
 
3181
                }
 
3182
        }
 
3183
        return 0;
 
3184
}
 
3185
 
 
3186
static PyObject *py_WBEMDATA2_get_data_size(PyObject *obj, void *closure)
 
3187
{
 
3188
        struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(obj);
 
3189
        PyObject *py_data_size;
 
3190
        py_data_size = PyInt_FromLong(object->data_size);
 
3191
        return py_data_size;
 
3192
}
 
3193
 
 
3194
static int py_WBEMDATA2_set_data_size(PyObject *py_obj, PyObject *value, void *closure)
 
3195
{
 
3196
        struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(py_obj);
 
3197
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3198
        object->data_size = PyInt_AsLong(value);
 
3199
        return 0;
 
3200
}
 
3201
 
 
3202
static PyObject *py_WBEMDATA2_get_obj_num(PyObject *obj, void *closure)
 
3203
{
 
3204
        struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(obj);
 
3205
        PyObject *py_obj_num;
 
3206
        py_obj_num = PyInt_FromLong(object->obj_num);
 
3207
        return py_obj_num;
 
3208
}
 
3209
 
 
3210
static int py_WBEMDATA2_set_obj_num(PyObject *py_obj, PyObject *value, void *closure)
 
3211
{
 
3212
        struct WBEMDATA2 *object = (struct WBEMDATA2 *)py_talloc_get_ptr(py_obj);
 
3213
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3214
        object->obj_num = PyInt_AsLong(value);
 
3215
        return 0;
 
3216
}
 
3217
 
 
3218
static PyGetSetDef py_WBEMDATA2_getsetters[] = {
 
3219
        { discard_const_p(char, "data"), py_WBEMDATA2_get_data, py_WBEMDATA2_set_data },
 
3220
        { discard_const_p(char, "data_size"), py_WBEMDATA2_get_data_size, py_WBEMDATA2_set_data_size },
 
3221
        { discard_const_p(char, "obj_num"), py_WBEMDATA2_get_obj_num, py_WBEMDATA2_set_obj_num },
 
3222
        { NULL }
 
3223
};
 
3224
 
 
3225
static PyObject *py_WBEMDATA2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3226
{
 
3227
        return py_talloc_new(struct WBEMDATA2, type);
 
3228
}
 
3229
 
 
3230
 
 
3231
static PyTypeObject WBEMDATA2_Type = {
 
3232
        PyObject_HEAD_INIT(NULL) 0,
 
3233
        .tp_name = "wmi.WBEMDATA2",
 
3234
        .tp_getset = py_WBEMDATA2_getsetters,
 
3235
        .tp_methods = NULL,
 
3236
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3237
        .tp_basicsize = sizeof(py_talloc_Object),
 
3238
        .tp_new = py_WBEMDATA2_new,
 
3239
};
 
3240
 
 
3241
 
 
3242
static PyObject *py_WBEMDATA1_get_data(PyObject *obj, void *closure)
 
3243
{
 
3244
        struct WBEMDATA1 *object = (struct WBEMDATA1 *)py_talloc_get_ptr(obj);
 
3245
        PyObject *py_data;
 
3246
        if (object->data == NULL) {
 
3247
                py_data = Py_None;
 
3248
                Py_INCREF(py_data);
 
3249
        } else {
 
3250
                py_data = py_talloc_reference_ex(&WBEMDATA2_Type, object->data, object->data);
 
3251
        }
 
3252
        return py_data;
 
3253
}
 
3254
 
 
3255
static int py_WBEMDATA1_set_data(PyObject *py_obj, PyObject *value, void *closure)
 
3256
{
 
3257
        struct WBEMDATA1 *object = (struct WBEMDATA1 *)py_talloc_get_ptr(py_obj);
 
3258
        talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->data);
 
3259
        if (value == Py_None) {
 
3260
                object->data = NULL;
 
3261
        } else {
 
3262
                object->data = NULL;
 
3263
                PY_CHECK_TYPE(&WBEMDATA2_Type, value, return -1;);
 
3264
                if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
 
3265
                        PyErr_NoMemory();
 
3266
                        return -1;
 
3267
                }
 
3268
                object->data = (struct WBEMDATA2 *)py_talloc_get_ptr(value);
 
3269
        }
 
3270
        return 0;
 
3271
}
 
3272
 
 
3273
static PyObject *py_WBEMDATA1_get_data_size(PyObject *obj, void *closure)
 
3274
{
 
3275
        struct WBEMDATA1 *object = (struct WBEMDATA1 *)py_talloc_get_ptr(obj);
 
3276
        PyObject *py_data_size;
 
3277
        py_data_size = PyInt_FromLong(object->data_size);
 
3278
        return py_data_size;
 
3279
}
 
3280
 
 
3281
static int py_WBEMDATA1_set_data_size(PyObject *py_obj, PyObject *value, void *closure)
 
3282
{
 
3283
        struct WBEMDATA1 *object = (struct WBEMDATA1 *)py_talloc_get_ptr(py_obj);
 
3284
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3285
        object->data_size = PyInt_AsLong(value);
 
3286
        return 0;
 
3287
}
 
3288
 
 
3289
static PyGetSetDef py_WBEMDATA1_getsetters[] = {
 
3290
        { discard_const_p(char, "data"), py_WBEMDATA1_get_data, py_WBEMDATA1_set_data },
 
3291
        { discard_const_p(char, "data_size"), py_WBEMDATA1_get_data_size, py_WBEMDATA1_set_data_size },
 
3292
        { NULL }
 
3293
};
 
3294
 
 
3295
static PyObject *py_WBEMDATA1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3296
{
 
3297
        return py_talloc_new(struct WBEMDATA1, type);
 
3298
}
 
3299
 
 
3300
 
 
3301
static PyTypeObject WBEMDATA1_Type = {
 
3302
        PyObject_HEAD_INIT(NULL) 0,
 
3303
        .tp_name = "wmi.WBEMDATA1",
 
3304
        .tp_getset = py_WBEMDATA1_getsetters,
 
3305
        .tp_methods = NULL,
 
3306
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3307
        .tp_basicsize = sizeof(py_talloc_Object),
 
3308
        .tp_new = py_WBEMDATA1_new,
 
3309
};
 
3310
 
 
3311
 
 
3312
static PyObject *py_WBEMDATA0_get_u1_0(PyObject *obj, void *closure)
 
3313
{
 
3314
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
 
3315
        PyObject *py_u1_0;
 
3316
        py_u1_0 = PyInt_FromLong(object->u1_0);
 
3317
        return py_u1_0;
 
3318
}
 
3319
 
 
3320
static int py_WBEMDATA0_set_u1_0(PyObject *py_obj, PyObject *value, void *closure)
 
3321
{
 
3322
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
 
3323
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3324
        object->u1_0 = PyInt_AsLong(value);
 
3325
        return 0;
 
3326
}
 
3327
 
 
3328
static PyObject *py_WBEMDATA0_get_signature(PyObject *obj, void *closure)
 
3329
{
 
3330
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
 
3331
        PyObject *py_signature;
 
3332
        py_signature = PyLong_FromLongLong(object->signature);
 
3333
        return py_signature;
 
3334
}
 
3335
 
 
3336
static int py_WBEMDATA0_set_signature(PyObject *py_obj, PyObject *value, void *closure)
 
3337
{
 
3338
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
 
3339
        if (PyLong_Check(value)) {
 
3340
                object->signature = PyLong_AsLongLong(value);
 
3341
        } else if (PyInt_Check(value)) {
 
3342
                object->signature = PyInt_AsLong(value);
 
3343
        } else {
 
3344
                PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
 
3345
                  PyInt_Type.tp_name, PyLong_Type.tp_name);
 
3346
                return -1;
 
3347
        }
 
3348
        return 0;
 
3349
}
 
3350
 
 
3351
static PyObject *py_WBEMDATA0_get_data(PyObject *obj, void *closure)
 
3352
{
 
3353
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
 
3354
        PyObject *py_data;
 
3355
        if (object->data == NULL) {
 
3356
                py_data = Py_None;
 
3357
                Py_INCREF(py_data);
 
3358
        } else {
 
3359
                py_data = py_talloc_reference_ex(&WBEMDATA1_Type, object->data, object->data);
 
3360
        }
 
3361
        return py_data;
 
3362
}
 
3363
 
 
3364
static int py_WBEMDATA0_set_data(PyObject *py_obj, PyObject *value, void *closure)
 
3365
{
 
3366
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
 
3367
        talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->data);
 
3368
        if (value == Py_None) {
 
3369
                object->data = NULL;
 
3370
        } else {
 
3371
                object->data = NULL;
 
3372
                PY_CHECK_TYPE(&WBEMDATA1_Type, value, return -1;);
 
3373
                if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
 
3374
                        PyErr_NoMemory();
 
3375
                        return -1;
 
3376
                }
 
3377
                object->data = (struct WBEMDATA1 *)py_talloc_get_ptr(value);
 
3378
        }
 
3379
        return 0;
 
3380
}
 
3381
 
 
3382
static PyObject *py_WBEMDATA0_get_data_size(PyObject *obj, void *closure)
 
3383
{
 
3384
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
 
3385
        PyObject *py_data_size;
 
3386
        py_data_size = PyInt_FromLong(object->data_size);
 
3387
        return py_data_size;
 
3388
}
 
3389
 
 
3390
static int py_WBEMDATA0_set_data_size(PyObject *py_obj, PyObject *value, void *closure)
 
3391
{
 
3392
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
 
3393
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3394
        object->data_size = PyInt_AsLong(value);
 
3395
        return 0;
 
3396
}
 
3397
 
 
3398
static PyObject *py_WBEMDATA0_get_u2_0(PyObject *obj, void *closure)
 
3399
{
 
3400
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
 
3401
        PyObject *py_u2_0;
 
3402
        py_u2_0 = PyInt_FromLong(object->u2_0);
 
3403
        return py_u2_0;
 
3404
}
 
3405
 
 
3406
static int py_WBEMDATA0_set_u2_0(PyObject *py_obj, PyObject *value, void *closure)
 
3407
{
 
3408
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
 
3409
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3410
        object->u2_0 = PyInt_AsLong(value);
 
3411
        return 0;
 
3412
}
 
3413
 
 
3414
static PyObject *py_WBEMDATA0_get_ver_major(PyObject *obj, void *closure)
 
3415
{
 
3416
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
 
3417
        PyObject *py_ver_major;
 
3418
        py_ver_major = PyInt_FromLong(object->ver_major);
 
3419
        return py_ver_major;
 
3420
}
 
3421
 
 
3422
static int py_WBEMDATA0_set_ver_major(PyObject *py_obj, PyObject *value, void *closure)
 
3423
{
 
3424
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
 
3425
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3426
        object->ver_major = PyInt_AsLong(value);
 
3427
        return 0;
 
3428
}
 
3429
 
 
3430
static PyObject *py_WBEMDATA0_get_ver_minor(PyObject *obj, void *closure)
 
3431
{
 
3432
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(obj);
 
3433
        PyObject *py_ver_minor;
 
3434
        py_ver_minor = PyInt_FromLong(object->ver_minor);
 
3435
        return py_ver_minor;
 
3436
}
 
3437
 
 
3438
static int py_WBEMDATA0_set_ver_minor(PyObject *py_obj, PyObject *value, void *closure)
 
3439
{
 
3440
        struct WBEMDATA0 *object = (struct WBEMDATA0 *)py_talloc_get_ptr(py_obj);
 
3441
        PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
 
3442
        object->ver_minor = PyInt_AsLong(value);
 
3443
        return 0;
 
3444
}
 
3445
 
 
3446
static PyGetSetDef py_WBEMDATA0_getsetters[] = {
 
3447
        { discard_const_p(char, "u1_0"), py_WBEMDATA0_get_u1_0, py_WBEMDATA0_set_u1_0 },
 
3448
        { discard_const_p(char, "signature"), py_WBEMDATA0_get_signature, py_WBEMDATA0_set_signature },
 
3449
        { discard_const_p(char, "data"), py_WBEMDATA0_get_data, py_WBEMDATA0_set_data },
 
3450
        { discard_const_p(char, "data_size"), py_WBEMDATA0_get_data_size, py_WBEMDATA0_set_data_size },
 
3451
        { discard_const_p(char, "u2_0"), py_WBEMDATA0_get_u2_0, py_WBEMDATA0_set_u2_0 },
 
3452
        { discard_const_p(char, "ver_major"), py_WBEMDATA0_get_ver_major, py_WBEMDATA0_set_ver_major },
 
3453
        { discard_const_p(char, "ver_minor"), py_WBEMDATA0_get_ver_minor, py_WBEMDATA0_set_ver_minor },
 
3454
        { NULL }
 
3455
};
 
3456
 
 
3457
static PyObject *py_WBEMDATA0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3458
{
 
3459
        return py_talloc_new(struct WBEMDATA0, type);
 
3460
}
 
3461
 
 
3462
 
 
3463
static PyTypeObject WBEMDATA0_Type = {
 
3464
        PyObject_HEAD_INIT(NULL) 0,
 
3465
        .tp_name = "wmi.WBEMDATA0",
 
3466
        .tp_getset = py_WBEMDATA0_getsetters,
 
3467
        .tp_methods = NULL,
 
3468
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3469
        .tp_basicsize = sizeof(py_talloc_Object),
 
3470
        .tp_new = py_WBEMDATA0_new,
 
3471
};
 
3472
 
 
3473
 
 
3474
static bool pack_py_IWbemWCOSmartEnum_Next_args_in(PyObject *args, PyObject *kwargs, struct IWbemWCOSmartEnum_Next *r)
 
3475
{
 
3476
        PyObject *py_ORPCthis;
 
3477
        PyObject *py_gEWCO;
 
3478
        PyObject *py_lTimeOut;
 
3479
        PyObject *py_uCount;
 
3480
        PyObject *py_unknown;
 
3481
        PyObject *py_gWCO;
 
3482
        const char *kwnames[] = {
 
3483
                "ORPCthis", "gEWCO", "lTimeOut", "uCount", "unknown", "gWCO", NULL
 
3484
        };
 
3485
 
 
3486
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:IWbemWCOSmartEnum_Next", discard_const_p(char *, kwnames), &py_ORPCthis, &py_gEWCO, &py_lTimeOut, &py_uCount, &py_unknown, &py_gWCO)) {
 
3487
                return false;
 
3488
        }
 
3489
 
 
3490
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
3491
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
3492
                PyErr_NoMemory();
 
3493
                return false;
 
3494
        }
 
3495
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
3496
        r->in.gEWCO = talloc_ptrtype(r, r->in.gEWCO);
 
3497
        PY_CHECK_TYPE(GUID_Type, py_gEWCO, return false;);
 
3498
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_gEWCO)) == NULL) {
 
3499
                PyErr_NoMemory();
 
3500
                return false;
 
3501
        }
 
3502
        r->in.gEWCO = (struct GUID *)py_talloc_get_ptr(py_gEWCO);
 
3503
        PY_CHECK_TYPE(&PyInt_Type, py_lTimeOut, return false;);
 
3504
        r->in.lTimeOut = PyInt_AsLong(py_lTimeOut);
 
3505
        PY_CHECK_TYPE(&PyInt_Type, py_uCount, return false;);
 
3506
        r->in.uCount = PyInt_AsLong(py_uCount);
 
3507
        PY_CHECK_TYPE(&PyInt_Type, py_unknown, return false;);
 
3508
        r->in.unknown = PyInt_AsLong(py_unknown);
 
3509
        r->in.gWCO = talloc_ptrtype(r, r->in.gWCO);
 
3510
        PY_CHECK_TYPE(GUID_Type, py_gWCO, return false;);
 
3511
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_gWCO)) == NULL) {
 
3512
                PyErr_NoMemory();
 
3513
                return false;
 
3514
        }
 
3515
        r->in.gWCO = (struct GUID *)py_talloc_get_ptr(py_gWCO);
 
3516
        return true;
 
3517
}
 
3518
 
 
3519
static PyObject *unpack_py_IWbemWCOSmartEnum_Next_args_out(struct IWbemWCOSmartEnum_Next *r)
 
3520
{
 
3521
        PyObject *result;
 
3522
        PyObject *py_ORPCthat;
 
3523
        PyObject *py_puReturned;
 
3524
        PyObject *py_pSize;
 
3525
        PyObject *py_pData;
 
3526
        result = PyTuple_New(4);
 
3527
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
3528
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
3529
        py_puReturned = PyInt_FromLong(*r->out.puReturned);
 
3530
        PyTuple_SetItem(result, 1, py_puReturned);
 
3531
        py_pSize = PyInt_FromLong(*r->out.pSize);
 
3532
        PyTuple_SetItem(result, 2, py_pSize);
 
3533
        if (*r->out.pData == NULL) {
 
3534
                py_pData = Py_None;
 
3535
                Py_INCREF(py_pData);
 
3536
        } else {
 
3537
                py_pData = PyList_New(*r->out.pSize);
 
3538
                if (py_pData == NULL) {
 
3539
                        return NULL;
 
3540
                }
 
3541
                {
 
3542
                        int pData_cntr_2;
 
3543
                        for (pData_cntr_2 = 0; pData_cntr_2 < *r->out.pSize; pData_cntr_2++) {
 
3544
                                PyObject *py_pData_2;
 
3545
                                py_pData_2 = PyInt_FromLong(*r->out.pData[pData_cntr_2]);
 
3546
                                PyList_SetItem(py_pData, pData_cntr_2, py_pData_2);
 
3547
                        }
 
3548
                }
 
3549
        }
 
3550
        PyTuple_SetItem(result, 3, py_pData);
 
3551
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3552
                PyErr_SetWERROR(r->out.result);
 
3553
                return NULL;
 
3554
        }
 
3555
 
 
3556
        return result;
 
3557
}
 
3558
 
 
3559
const struct PyNdrRpcMethodDef py_ndr_IWbemWCOSmartEnum_methods[] = {
 
3560
        { "Next", "S.Next(ORPCthis, gEWCO, lTimeOut, uCount, unknown, gWCO) -> (ORPCthat, puReturned, pSize, pData)", (py_dcerpc_call_fn)dcerpc_IWbemWCOSmartEnum_Next_r, (py_data_pack_fn)pack_py_IWbemWCOSmartEnum_Next_args_in, (py_data_unpack_fn)unpack_py_IWbemWCOSmartEnum_Next_args_out, 0, &ndr_table_IWbemWCOSmartEnum },
 
3561
        { NULL }
 
3562
};
 
3563
 
 
3564
static PyObject *interface_IWbemWCOSmartEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3565
{
 
3566
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemWCOSmartEnum);
 
3567
}
 
3568
 
 
3569
static PyTypeObject IWbemWCOSmartEnum_InterfaceType = {
 
3570
        PyObject_HEAD_INIT(NULL) 0,
 
3571
        .tp_name = "wmi.IWbemWCOSmartEnum",
 
3572
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
3573
        .tp_doc = "IWbemWCOSmartEnum(binding, lp_ctx=None, credentials=None) -> connection\n"
 
3574
"\n"
 
3575
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
3576
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
3577
"credentials should be a credentials.Credentials object.\n\n",
 
3578
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3579
        .tp_new = interface_IWbemWCOSmartEnum_new,
 
3580
};
 
3581
 
 
3582
 
 
3583
static bool pack_py_Fetch_args_in(PyObject *args, PyObject *kwargs, struct Fetch *r)
 
3584
{
 
3585
        PyObject *py_ORPCthis;
 
3586
        const char *kwnames[] = {
 
3587
                "ORPCthis", NULL
 
3588
        };
 
3589
 
 
3590
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:Fetch", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
3591
                return false;
 
3592
        }
 
3593
 
 
3594
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
3595
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
3596
                PyErr_NoMemory();
 
3597
                return false;
 
3598
        }
 
3599
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
3600
        return true;
 
3601
}
 
3602
 
 
3603
static PyObject *unpack_py_Fetch_args_out(struct Fetch *r)
 
3604
{
 
3605
        PyObject *result;
 
3606
        PyObject *py_ORPCthat;
 
3607
        PyObject *py_ppEnum;
 
3608
        result = PyTuple_New(2);
 
3609
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
3610
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
3611
        if (*r->out.ppEnum == NULL) {
 
3612
                py_ppEnum = Py_None;
 
3613
                Py_INCREF(py_ppEnum);
 
3614
        } else {
 
3615
                py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
 
3616
        }
 
3617
        PyTuple_SetItem(result, 1, py_ppEnum);
 
3618
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3619
                PyErr_SetWERROR(r->out.result);
 
3620
                return NULL;
 
3621
        }
 
3622
 
 
3623
        return result;
 
3624
}
 
3625
 
 
3626
static bool pack_py_Test_args_in(PyObject *args, PyObject *kwargs, struct Test *r)
 
3627
{
 
3628
        PyObject *py_ORPCthis;
 
3629
        const char *kwnames[] = {
 
3630
                "ORPCthis", NULL
 
3631
        };
 
3632
 
 
3633
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:Test", discard_const_p(char *, kwnames), &py_ORPCthis)) {
 
3634
                return false;
 
3635
        }
 
3636
 
 
3637
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
3638
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
3639
                PyErr_NoMemory();
 
3640
                return false;
 
3641
        }
 
3642
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
3643
        return true;
 
3644
}
 
3645
 
 
3646
static PyObject *unpack_py_Test_args_out(struct Test *r)
 
3647
{
 
3648
        PyObject *result;
 
3649
        PyObject *py_ORPCthat;
 
3650
        PyObject *py_ppEnum;
 
3651
        result = PyTuple_New(2);
 
3652
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
3653
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
3654
        if (*r->out.ppEnum == NULL) {
 
3655
                py_ppEnum = Py_None;
 
3656
                Py_INCREF(py_ppEnum);
 
3657
        } else {
 
3658
                py_ppEnum = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppEnum, *r->out.ppEnum);
 
3659
        }
 
3660
        PyTuple_SetItem(result, 1, py_ppEnum);
 
3661
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3662
                PyErr_SetWERROR(r->out.result);
 
3663
                return NULL;
 
3664
        }
 
3665
 
 
3666
        return result;
 
3667
}
 
3668
 
 
3669
const struct PyNdrRpcMethodDef py_ndr_IWbemFetchSmartEnum_methods[] = {
 
3670
        { "Fetch", "S.Fetch(ORPCthis) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_Fetch_r, (py_data_pack_fn)pack_py_Fetch_args_in, (py_data_unpack_fn)unpack_py_Fetch_args_out, 0, &ndr_table_IWbemFetchSmartEnum },
 
3671
        { "Test", "S.Test(ORPCthis) -> (ORPCthat, ppEnum)", (py_dcerpc_call_fn)dcerpc_Test_r, (py_data_pack_fn)pack_py_Test_args_in, (py_data_unpack_fn)unpack_py_Test_args_out, 1, &ndr_table_IWbemFetchSmartEnum },
 
3672
        { NULL }
 
3673
};
 
3674
 
 
3675
static PyObject *interface_IWbemFetchSmartEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3676
{
 
3677
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemFetchSmartEnum);
 
3678
}
 
3679
 
 
3680
static PyTypeObject IWbemFetchSmartEnum_InterfaceType = {
 
3681
        PyObject_HEAD_INIT(NULL) 0,
 
3682
        .tp_name = "wmi.IWbemFetchSmartEnum",
 
3683
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
3684
        .tp_doc = "IWbemFetchSmartEnum(binding, lp_ctx=None, credentials=None) -> connection\n"
 
3685
"\n"
 
3686
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
3687
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
3688
"credentials should be a credentials.Credentials object.\n\n",
 
3689
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3690
        .tp_new = interface_IWbemFetchSmartEnum_new,
 
3691
};
 
3692
 
 
3693
 
 
3694
static bool pack_py_GetResultObject_args_in(PyObject *args, PyObject *kwargs, struct GetResultObject *r)
 
3695
{
 
3696
        PyObject *py_ORPCthis;
 
3697
        PyObject *py_lTimeout;
 
3698
        const char *kwnames[] = {
 
3699
                "ORPCthis", "lTimeout", NULL
 
3700
        };
 
3701
 
 
3702
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:GetResultObject", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout)) {
 
3703
                return false;
 
3704
        }
 
3705
 
 
3706
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
3707
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
3708
                PyErr_NoMemory();
 
3709
                return false;
 
3710
        }
 
3711
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
3712
        PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
 
3713
        r->in.lTimeout = PyInt_AsLong(py_lTimeout);
 
3714
        return true;
 
3715
}
 
3716
 
 
3717
static PyObject *unpack_py_GetResultObject_args_out(struct GetResultObject *r)
 
3718
{
 
3719
        PyObject *result;
 
3720
        PyObject *py_ORPCthat;
 
3721
        PyObject *py_ppResultObject;
 
3722
        result = PyTuple_New(2);
 
3723
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
3724
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
3725
        if (*r->out.ppResultObject == NULL) {
 
3726
                py_ppResultObject = Py_None;
 
3727
                Py_INCREF(py_ppResultObject);
 
3728
        } else {
 
3729
                py_ppResultObject = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppResultObject, *r->out.ppResultObject);
 
3730
        }
 
3731
        PyTuple_SetItem(result, 1, py_ppResultObject);
 
3732
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3733
                PyErr_SetWERROR(r->out.result);
 
3734
                return NULL;
 
3735
        }
 
3736
 
 
3737
        return result;
 
3738
}
 
3739
 
 
3740
static bool pack_py_GetResultString_args_in(PyObject *args, PyObject *kwargs, struct GetResultString *r)
 
3741
{
 
3742
        PyObject *py_ORPCthis;
 
3743
        PyObject *py_lTimeout;
 
3744
        const char *kwnames[] = {
 
3745
                "ORPCthis", "lTimeout", NULL
 
3746
        };
 
3747
 
 
3748
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:GetResultString", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout)) {
 
3749
                return false;
 
3750
        }
 
3751
 
 
3752
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
3753
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
3754
                PyErr_NoMemory();
 
3755
                return false;
 
3756
        }
 
3757
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
3758
        PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
 
3759
        r->in.lTimeout = PyInt_AsLong(py_lTimeout);
 
3760
        return true;
 
3761
}
 
3762
 
 
3763
static PyObject *unpack_py_GetResultString_args_out(struct GetResultString *r)
 
3764
{
 
3765
        PyObject *result;
 
3766
        PyObject *py_ORPCthat;
 
3767
        PyObject *py_pstrResultString;
 
3768
        result = PyTuple_New(2);
 
3769
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
3770
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
3771
        py_pstrResultString = py_talloc_reference_ex(&BSTR_Type, r->out.pstrResultString, r->out.pstrResultString);
 
3772
        PyTuple_SetItem(result, 1, py_pstrResultString);
 
3773
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3774
                PyErr_SetWERROR(r->out.result);
 
3775
                return NULL;
 
3776
        }
 
3777
 
 
3778
        return result;
 
3779
}
 
3780
 
 
3781
static bool pack_py_GetResultServices_args_in(PyObject *args, PyObject *kwargs, struct GetResultServices *r)
 
3782
{
 
3783
        PyObject *py_ORPCthis;
 
3784
        PyObject *py_lTimeout;
 
3785
        const char *kwnames[] = {
 
3786
                "ORPCthis", "lTimeout", NULL
 
3787
        };
 
3788
 
 
3789
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:GetResultServices", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout)) {
 
3790
                return false;
 
3791
        }
 
3792
 
 
3793
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
3794
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
3795
                PyErr_NoMemory();
 
3796
                return false;
 
3797
        }
 
3798
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
3799
        PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
 
3800
        r->in.lTimeout = PyInt_AsLong(py_lTimeout);
 
3801
        return true;
 
3802
}
 
3803
 
 
3804
static PyObject *unpack_py_GetResultServices_args_out(struct GetResultServices *r)
 
3805
{
 
3806
        PyObject *result;
 
3807
        PyObject *py_ORPCthat;
 
3808
        PyObject *py_ppServices;
 
3809
        result = PyTuple_New(2);
 
3810
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
3811
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
3812
        if (*r->out.ppServices == NULL) {
 
3813
                py_ppServices = Py_None;
 
3814
                Py_INCREF(py_ppServices);
 
3815
        } else {
 
3816
                py_ppServices = py_talloc_reference_ex(MInterfacePointer_Type, *r->out.ppServices, *r->out.ppServices);
 
3817
        }
 
3818
        PyTuple_SetItem(result, 1, py_ppServices);
 
3819
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3820
                PyErr_SetWERROR(r->out.result);
 
3821
                return NULL;
 
3822
        }
 
3823
 
 
3824
        return result;
 
3825
}
 
3826
 
 
3827
static bool pack_py_GetCallStatus_args_in(PyObject *args, PyObject *kwargs, struct GetCallStatus *r)
 
3828
{
 
3829
        PyObject *py_ORPCthis;
 
3830
        PyObject *py_lTimeout;
 
3831
        const char *kwnames[] = {
 
3832
                "ORPCthis", "lTimeout", NULL
 
3833
        };
 
3834
 
 
3835
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:GetCallStatus", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lTimeout)) {
 
3836
                return false;
 
3837
        }
 
3838
 
 
3839
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
3840
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
3841
                PyErr_NoMemory();
 
3842
                return false;
 
3843
        }
 
3844
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
3845
        PY_CHECK_TYPE(&PyInt_Type, py_lTimeout, return false;);
 
3846
        r->in.lTimeout = PyInt_AsLong(py_lTimeout);
 
3847
        return true;
 
3848
}
 
3849
 
 
3850
static PyObject *unpack_py_GetCallStatus_args_out(struct GetCallStatus *r)
 
3851
{
 
3852
        PyObject *result;
 
3853
        PyObject *py_ORPCthat;
 
3854
        PyObject *py_plStatus;
 
3855
        result = PyTuple_New(2);
 
3856
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
3857
        PyTuple_SetItem(result, 0, py_ORPCthat);
 
3858
        py_plStatus = PyInt_FromLong(*r->out.plStatus);
 
3859
        PyTuple_SetItem(result, 1, py_plStatus);
 
3860
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3861
                PyErr_SetWERROR(r->out.result);
 
3862
                return NULL;
 
3863
        }
 
3864
 
 
3865
        return result;
 
3866
}
 
3867
 
 
3868
const struct PyNdrRpcMethodDef py_ndr_IWbemCallResult_methods[] = {
 
3869
        { "GetResultObject", "S.GetResultObject(ORPCthis, lTimeout) -> (ORPCthat, ppResultObject)", (py_dcerpc_call_fn)dcerpc_GetResultObject_r, (py_data_pack_fn)pack_py_GetResultObject_args_in, (py_data_unpack_fn)unpack_py_GetResultObject_args_out, 0, &ndr_table_IWbemCallResult },
 
3870
        { "GetResultString", "S.GetResultString(ORPCthis, lTimeout) -> (ORPCthat, pstrResultString)", (py_dcerpc_call_fn)dcerpc_GetResultString_r, (py_data_pack_fn)pack_py_GetResultString_args_in, (py_data_unpack_fn)unpack_py_GetResultString_args_out, 1, &ndr_table_IWbemCallResult },
 
3871
        { "GetResultServices", "S.GetResultServices(ORPCthis, lTimeout) -> (ORPCthat, ppServices)", (py_dcerpc_call_fn)dcerpc_GetResultServices_r, (py_data_pack_fn)pack_py_GetResultServices_args_in, (py_data_unpack_fn)unpack_py_GetResultServices_args_out, 2, &ndr_table_IWbemCallResult },
 
3872
        { "GetCallStatus", "S.GetCallStatus(ORPCthis, lTimeout) -> (ORPCthat, plStatus)", (py_dcerpc_call_fn)dcerpc_GetCallStatus_r, (py_data_pack_fn)pack_py_GetCallStatus_args_in, (py_data_unpack_fn)unpack_py_GetCallStatus_args_out, 3, &ndr_table_IWbemCallResult },
 
3873
        { NULL }
 
3874
};
 
3875
 
 
3876
static PyObject *interface_IWbemCallResult_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
3877
{
 
3878
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemCallResult);
 
3879
}
 
3880
 
 
3881
static PyTypeObject IWbemCallResult_InterfaceType = {
 
3882
        PyObject_HEAD_INIT(NULL) 0,
 
3883
        .tp_name = "wmi.IWbemCallResult",
 
3884
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
3885
        .tp_doc = "IWbemCallResult(binding, lp_ctx=None, credentials=None) -> connection\n"
 
3886
"\n"
 
3887
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
3888
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
3889
"credentials should be a credentials.Credentials object.\n\n",
 
3890
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
3891
        .tp_new = interface_IWbemCallResult_new,
 
3892
};
 
3893
 
 
3894
 
 
3895
static bool pack_py_SetStatus_args_in(PyObject *args, PyObject *kwargs, struct SetStatus *r)
 
3896
{
 
3897
        PyObject *py_ORPCthis;
 
3898
        PyObject *py_lFlags;
 
3899
        PyObject *py_hResult;
 
3900
        PyObject *py_strParam;
 
3901
        PyObject *py_pObjParam;
 
3902
        const char *kwnames[] = {
 
3903
                "ORPCthis", "lFlags", "hResult", "strParam", "pObjParam", NULL
 
3904
        };
 
3905
 
 
3906
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SetStatus", discard_const_p(char *, kwnames), &py_ORPCthis, &py_lFlags, &py_hResult, &py_strParam, &py_pObjParam)) {
 
3907
                return false;
 
3908
        }
 
3909
 
 
3910
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
3911
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
3912
                PyErr_NoMemory();
 
3913
                return false;
 
3914
        }
 
3915
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
3916
        PY_CHECK_TYPE(&PyInt_Type, py_lFlags, return false;);
 
3917
        r->in.lFlags = PyInt_AsLong(py_lFlags);
 
3918
        r->in.hResult = W_ERROR(PyInt_AsLong(py_hResult));
 
3919
        PY_CHECK_TYPE(&BSTR_Type, py_strParam, return false;);
 
3920
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_strParam)) == NULL) {
 
3921
                PyErr_NoMemory();
 
3922
                return false;
 
3923
        }
 
3924
        r->in.strParam = *(struct BSTR *)py_talloc_get_ptr(py_strParam);
 
3925
        r->in.pObjParam = talloc_ptrtype(r, r->in.pObjParam);
 
3926
        PY_CHECK_TYPE(MInterfacePointer_Type, py_pObjParam, return false;);
 
3927
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_pObjParam)) == NULL) {
 
3928
                PyErr_NoMemory();
 
3929
                return false;
 
3930
        }
 
3931
        r->in.pObjParam = (struct MInterfacePointer *)py_talloc_get_ptr(py_pObjParam);
 
3932
        return true;
 
3933
}
 
3934
 
 
3935
static PyObject *unpack_py_SetStatus_args_out(struct SetStatus *r)
 
3936
{
 
3937
        PyObject *result;
 
3938
        PyObject *py_ORPCthat;
 
3939
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
3940
        result = py_ORPCthat;
 
3941
        if (!W_ERROR_IS_OK(r->out.result)) {
 
3942
                PyErr_SetWERROR(r->out.result);
 
3943
                return NULL;
 
3944
        }
 
3945
 
 
3946
        return result;
 
3947
}
 
3948
 
 
3949
static bool pack_py_Indicate_args_in(PyObject *args, PyObject *kwargs, struct Indicate *r)
 
3950
{
 
3951
        PyObject *py_ORPCthis;
 
3952
        PyObject *py_apObjArray;
 
3953
        const char *kwnames[] = {
 
3954
                "ORPCthis", "apObjArray", NULL
 
3955
        };
 
3956
 
 
3957
        if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:Indicate", discard_const_p(char *, kwnames), &py_ORPCthis, &py_apObjArray)) {
 
3958
                return false;
 
3959
        }
 
3960
 
 
3961
        PY_CHECK_TYPE(ORPCTHIS_Type, py_ORPCthis, return false;);
 
3962
        if (talloc_reference(r, py_talloc_get_mem_ctx(py_ORPCthis)) == NULL) {
 
3963
                PyErr_NoMemory();
 
3964
                return false;
 
3965
        }
 
3966
        r->in.ORPCthis = *(struct ORPCTHIS *)py_talloc_get_ptr(py_ORPCthis);
 
3967
        PY_CHECK_TYPE(&PyList_Type, py_apObjArray, return false;);
 
3968
        r->in.lObjectCount = PyList_GET_SIZE(py_apObjArray);
 
3969
        r->in.apObjArray = talloc_ptrtype(r, r->in.apObjArray);
 
3970
        PY_CHECK_TYPE(&PyList_Type, py_apObjArray, return false;);
 
3971
        {
 
3972
                int apObjArray_cntr_1;
 
3973
                r->in.apObjArray = talloc_array_ptrtype(r, r->in.apObjArray, PyList_GET_SIZE(py_apObjArray));
 
3974
                if (!r->in.apObjArray) { return false;; }
 
3975
                talloc_set_name_const(r->in.apObjArray, "ARRAY: r->in.apObjArray");
 
3976
                for (apObjArray_cntr_1 = 0; apObjArray_cntr_1 < PyList_GET_SIZE(py_apObjArray); apObjArray_cntr_1++) {
 
3977
                        if (PyList_GET_ITEM(py_apObjArray, apObjArray_cntr_1) == Py_None) {
 
3978
                                r->in.apObjArray[apObjArray_cntr_1] = NULL;
 
3979
                        } else {
 
3980
                                r->in.apObjArray[apObjArray_cntr_1] = NULL;
 
3981
                                PY_CHECK_TYPE(MInterfacePointer_Type, PyList_GET_ITEM(py_apObjArray, apObjArray_cntr_1), return false;);
 
3982
                                if (talloc_reference(r->in.apObjArray, py_talloc_get_mem_ctx(PyList_GET_ITEM(py_apObjArray, apObjArray_cntr_1))) == NULL) {
 
3983
                                        PyErr_NoMemory();
 
3984
                                        return false;
 
3985
                                }
 
3986
                                r->in.apObjArray[apObjArray_cntr_1] = (struct MInterfacePointer *)py_talloc_get_ptr(PyList_GET_ITEM(py_apObjArray, apObjArray_cntr_1));
 
3987
                        }
 
3988
                }
 
3989
        }
 
3990
        return true;
 
3991
}
 
3992
 
 
3993
static PyObject *unpack_py_Indicate_args_out(struct Indicate *r)
 
3994
{
 
3995
        PyObject *result;
 
3996
        PyObject *py_ORPCthat;
 
3997
        py_ORPCthat = py_talloc_reference_ex(ORPCTHAT_Type, r->out.ORPCthat, r->out.ORPCthat);
 
3998
        result = py_ORPCthat;
 
3999
        if (!W_ERROR_IS_OK(r->out.result)) {
 
4000
                PyErr_SetWERROR(r->out.result);
 
4001
                return NULL;
 
4002
        }
 
4003
 
 
4004
        return result;
 
4005
}
 
4006
 
 
4007
const struct PyNdrRpcMethodDef py_ndr_IWbemObjectSink_methods[] = {
 
4008
        { "SetStatus", "S.SetStatus(ORPCthis, lFlags, hResult, strParam, pObjParam) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_SetStatus_r, (py_data_pack_fn)pack_py_SetStatus_args_in, (py_data_unpack_fn)unpack_py_SetStatus_args_out, 0, &ndr_table_IWbemObjectSink },
 
4009
        { "Indicate", "S.Indicate(ORPCthis, apObjArray) -> ORPCthat", (py_dcerpc_call_fn)dcerpc_Indicate_r, (py_data_pack_fn)pack_py_Indicate_args_in, (py_data_unpack_fn)unpack_py_Indicate_args_out, 1, &ndr_table_IWbemObjectSink },
 
4010
        { NULL }
 
4011
};
 
4012
 
 
4013
static PyObject *interface_IWbemObjectSink_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 
4014
{
 
4015
        return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_IWbemObjectSink);
 
4016
}
 
4017
 
 
4018
static PyTypeObject IWbemObjectSink_InterfaceType = {
 
4019
        PyObject_HEAD_INIT(NULL) 0,
 
4020
        .tp_name = "wmi.IWbemObjectSink",
 
4021
        .tp_basicsize = sizeof(dcerpc_InterfaceObject),
 
4022
        .tp_doc = "IWbemObjectSink(binding, lp_ctx=None, credentials=None) -> connection\n"
 
4023
"\n"
 
4024
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
 
4025
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
 
4026
"credentials should be a credentials.Credentials object.\n\n",
 
4027
        .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
 
4028
        .tp_new = interface_IWbemObjectSink_new,
 
4029
};
 
4030
 
 
4031
static PyMethodDef wmi_methods[] = {
 
4032
        { NULL, NULL, 0, NULL }
 
4033
};
 
4034
 
 
4035
void initwmi(void)
 
4036
{
 
4037
        PyObject *m;
 
4038
        PyObject *dep_talloc;
 
4039
        PyObject *dep_samba_dcerpc_misc;
 
4040
        PyObject *dep_samba_dcerpc_base;
 
4041
        PyObject *dep_samba_dcerpc_dcom;
 
4042
        PyObject *dep_samba_dcerpc_orpc;
 
4043
 
 
4044
        dep_talloc = PyImport_ImportModule("talloc");
 
4045
        if (dep_talloc == NULL)
 
4046
                return;
 
4047
 
 
4048
        dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
 
4049
        if (dep_samba_dcerpc_misc == NULL)
 
4050
                return;
 
4051
 
 
4052
        dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
 
4053
        if (dep_samba_dcerpc_base == NULL)
 
4054
                return;
 
4055
 
 
4056
        dep_samba_dcerpc_dcom = PyImport_ImportModule("samba.dcerpc.dcom");
 
4057
        if (dep_samba_dcerpc_dcom == NULL)
 
4058
                return;
 
4059
 
 
4060
        dep_samba_dcerpc_orpc = PyImport_ImportModule("samba.dcerpc.orpc");
 
4061
        if (dep_samba_dcerpc_orpc == NULL)
 
4062
                return;
 
4063
 
 
4064
        MInterfacePointer_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_orpc, "MInterfacePointer");
 
4065
        if (MInterfacePointer_Type == NULL)
 
4066
                return;
 
4067
 
 
4068
        ORPCTHAT_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_orpc, "ORPCTHAT");
 
4069
        if (ORPCTHAT_Type == NULL)
 
4070
                return;
 
4071
 
 
4072
        Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
 
4073
        if (Object_Type == NULL)
 
4074
                return;
 
4075
 
 
4076
        GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
 
4077
        if (GUID_Type == NULL)
 
4078
                return;
 
4079
 
 
4080
        ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
 
4081
        if (ClientConnection_Type == NULL)
 
4082
                return;
 
4083
 
 
4084
        ORPCTHIS_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_orpc, "ORPCTHIS");
 
4085
        if (ORPCTHIS_Type == NULL)
 
4086
                return;
 
4087
 
 
4088
        BSTR_Type.tp_base = Object_Type;
 
4089
 
 
4090
        IWbemClassObject_InterfaceType.tp_base = ClientConnection_Type;
 
4091
 
 
4092
        CIMSTRINGS_Type.tp_base = Object_Type;
 
4093
 
 
4094
        IWbemServices_InterfaceType.tp_base = ClientConnection_Type;
 
4095
 
 
4096
        IEnumWbemClassObject_InterfaceType.tp_base = ClientConnection_Type;
 
4097
 
 
4098
        IWbemContext_InterfaceType.tp_base = ClientConnection_Type;
 
4099
 
 
4100
        IWbemLevel1Login_InterfaceType.tp_base = ClientConnection_Type;
 
4101
 
 
4102
        WBEMDATA_Type.tp_base = Object_Type;
 
4103
 
 
4104
        WBEMDATA4_Type.tp_base = Object_Type;
 
4105
 
 
4106
        WBEMDATA3_Type.tp_base = Object_Type;
 
4107
 
 
4108
        WBEMDATA2_Type.tp_base = Object_Type;
 
4109
 
 
4110
        WBEMDATA1_Type.tp_base = Object_Type;
 
4111
 
 
4112
        WBEMDATA0_Type.tp_base = Object_Type;
 
4113
 
 
4114
        IWbemWCOSmartEnum_InterfaceType.tp_base = ClientConnection_Type;
 
4115
 
 
4116
        IWbemFetchSmartEnum_InterfaceType.tp_base = ClientConnection_Type;
 
4117
 
 
4118
        IWbemCallResult_InterfaceType.tp_base = ClientConnection_Type;
 
4119
 
 
4120
        IWbemObjectSink_InterfaceType.tp_base = ClientConnection_Type;
 
4121
 
 
4122
        if (PyType_Ready(&BSTR_Type) < 0)
 
4123
                return;
 
4124
        if (PyType_Ready(&IWbemClassObject_InterfaceType) < 0)
 
4125
                return;
 
4126
        if (PyType_Ready(&CIMSTRINGS_Type) < 0)
 
4127
                return;
 
4128
        if (PyType_Ready(&IWbemServices_InterfaceType) < 0)
 
4129
                return;
 
4130
        if (PyType_Ready(&IEnumWbemClassObject_InterfaceType) < 0)
 
4131
                return;
 
4132
        if (PyType_Ready(&IWbemContext_InterfaceType) < 0)
 
4133
                return;
 
4134
        if (PyType_Ready(&IWbemLevel1Login_InterfaceType) < 0)
 
4135
                return;
 
4136
        if (PyType_Ready(&WBEMDATA_Type) < 0)
 
4137
                return;
 
4138
        if (PyType_Ready(&WBEMDATA4_Type) < 0)
 
4139
                return;
 
4140
        if (PyType_Ready(&WBEMDATA3_Type) < 0)
 
4141
                return;
 
4142
        if (PyType_Ready(&WBEMDATA2_Type) < 0)
 
4143
                return;
 
4144
        if (PyType_Ready(&WBEMDATA1_Type) < 0)
 
4145
                return;
 
4146
        if (PyType_Ready(&WBEMDATA0_Type) < 0)
 
4147
                return;
 
4148
        if (PyType_Ready(&IWbemWCOSmartEnum_InterfaceType) < 0)
 
4149
                return;
 
4150
        if (PyType_Ready(&IWbemFetchSmartEnum_InterfaceType) < 0)
 
4151
                return;
 
4152
        if (PyType_Ready(&IWbemCallResult_InterfaceType) < 0)
 
4153
                return;
 
4154
        if (PyType_Ready(&IWbemObjectSink_InterfaceType) < 0)
 
4155
                return;
 
4156
        if (!PyInterface_AddNdrRpcMethods(&IWbemClassObject_InterfaceType, py_ndr_IWbemClassObject_methods))
 
4157
                return;
 
4158
 
 
4159
        if (!PyInterface_AddNdrRpcMethods(&IWbemServices_InterfaceType, py_ndr_IWbemServices_methods))
 
4160
                return;
 
4161
 
 
4162
        if (!PyInterface_AddNdrRpcMethods(&IEnumWbemClassObject_InterfaceType, py_ndr_IEnumWbemClassObject_methods))
 
4163
                return;
 
4164
 
 
4165
        if (!PyInterface_AddNdrRpcMethods(&IWbemContext_InterfaceType, py_ndr_IWbemContext_methods))
 
4166
                return;
 
4167
 
 
4168
        if (!PyInterface_AddNdrRpcMethods(&IWbemLevel1Login_InterfaceType, py_ndr_IWbemLevel1Login_methods))
 
4169
                return;
 
4170
 
 
4171
        if (!PyInterface_AddNdrRpcMethods(&IWbemWCOSmartEnum_InterfaceType, py_ndr_IWbemWCOSmartEnum_methods))
 
4172
                return;
 
4173
 
 
4174
        if (!PyInterface_AddNdrRpcMethods(&IWbemFetchSmartEnum_InterfaceType, py_ndr_IWbemFetchSmartEnum_methods))
 
4175
                return;
 
4176
 
 
4177
        if (!PyInterface_AddNdrRpcMethods(&IWbemCallResult_InterfaceType, py_ndr_IWbemCallResult_methods))
 
4178
                return;
 
4179
 
 
4180
        if (!PyInterface_AddNdrRpcMethods(&IWbemObjectSink_InterfaceType, py_ndr_IWbemObjectSink_methods))
 
4181
                return;
 
4182
 
 
4183
#ifdef PY_BSTR_PATCH
 
4184
        PY_BSTR_PATCH(&BSTR_Type);
 
4185
#endif
 
4186
#ifdef PY_IWBEMCLASSOBJECT_PATCH
 
4187
        PY_IWBEMCLASSOBJECT_PATCH(&IWbemClassObject_InterfaceType);
 
4188
#endif
 
4189
#ifdef PY_CIMSTRINGS_PATCH
 
4190
        PY_CIMSTRINGS_PATCH(&CIMSTRINGS_Type);
 
4191
#endif
 
4192
#ifdef PY_IWBEMSERVICES_PATCH
 
4193
        PY_IWBEMSERVICES_PATCH(&IWbemServices_InterfaceType);
 
4194
#endif
 
4195
#ifdef PY_IENUMWBEMCLASSOBJECT_PATCH
 
4196
        PY_IENUMWBEMCLASSOBJECT_PATCH(&IEnumWbemClassObject_InterfaceType);
 
4197
#endif
 
4198
#ifdef PY_IWBEMCONTEXT_PATCH
 
4199
        PY_IWBEMCONTEXT_PATCH(&IWbemContext_InterfaceType);
 
4200
#endif
 
4201
#ifdef PY_IWBEMLEVEL1LOGIN_PATCH
 
4202
        PY_IWBEMLEVEL1LOGIN_PATCH(&IWbemLevel1Login_InterfaceType);
 
4203
#endif
 
4204
#ifdef PY_WBEMDATA_PATCH
 
4205
        PY_WBEMDATA_PATCH(&WBEMDATA_Type);
 
4206
#endif
 
4207
#ifdef PY_WBEMDATA4_PATCH
 
4208
        PY_WBEMDATA4_PATCH(&WBEMDATA4_Type);
 
4209
#endif
 
4210
#ifdef PY_WBEMDATA3_PATCH
 
4211
        PY_WBEMDATA3_PATCH(&WBEMDATA3_Type);
 
4212
#endif
 
4213
#ifdef PY_WBEMDATA2_PATCH
 
4214
        PY_WBEMDATA2_PATCH(&WBEMDATA2_Type);
 
4215
#endif
 
4216
#ifdef PY_WBEMDATA1_PATCH
 
4217
        PY_WBEMDATA1_PATCH(&WBEMDATA1_Type);
 
4218
#endif
 
4219
#ifdef PY_WBEMDATA0_PATCH
 
4220
        PY_WBEMDATA0_PATCH(&WBEMDATA0_Type);
 
4221
#endif
 
4222
#ifdef PY_IWBEMWCOSMARTENUM_PATCH
 
4223
        PY_IWBEMWCOSMARTENUM_PATCH(&IWbemWCOSmartEnum_InterfaceType);
 
4224
#endif
 
4225
#ifdef PY_IWBEMFETCHSMARTENUM_PATCH
 
4226
        PY_IWBEMFETCHSMARTENUM_PATCH(&IWbemFetchSmartEnum_InterfaceType);
 
4227
#endif
 
4228
#ifdef PY_IWBEMCALLRESULT_PATCH
 
4229
        PY_IWBEMCALLRESULT_PATCH(&IWbemCallResult_InterfaceType);
 
4230
#endif
 
4231
#ifdef PY_IWBEMOBJECTSINK_PATCH
 
4232
        PY_IWBEMOBJECTSINK_PATCH(&IWbemObjectSink_InterfaceType);
 
4233
#endif
 
4234
 
 
4235
        m = Py_InitModule3("wmi", wmi_methods, "wmi DCE/RPC");
 
4236
        if (m == NULL)
 
4237
                return;
 
4238
 
 
4239
        PyModule_AddObject(m, "WBEM_E_PROVIDER_LOAD_FAILURE", PyInt_FromLong(WBEM_E_PROVIDER_LOAD_FAILURE));
 
4240
        PyModule_AddObject(m, "WBEM_S_PENDING", PyInt_FromLong(WBEM_S_PENDING));
 
4241
        PyModule_AddObject(m, "CIM_ARR_UINT16", PyInt_FromLong(CIM_ARR_UINT16));
 
4242
        PyModule_AddObject(m, "WBEM_E_NONDECORATED_OBJECT", PyInt_FromLong(WBEM_E_NONDECORATED_OBJECT));
 
4243
        PyModule_AddObject(m, "WBEM_E_RESERVED_001", PyInt_FromLong(WBEM_E_RESERVED_001));
 
4244
        PyModule_AddObject(m, "WBEM_E_SERVER_TOO_BUSY", PyInt_FromLong(WBEM_E_SERVER_TOO_BUSY));
 
4245
        PyModule_AddObject(m, "WBEM_E_FAILED", PyInt_FromLong(WBEM_E_FAILED));
 
4246
        PyModule_AddObject(m, "WBEM_S_POSTHOOK_WITH_NEW", PyInt_FromLong(WBEM_S_POSTHOOK_WITH_NEW));
 
4247
        PyModule_AddObject(m, "WBEM_FLAVOR_ORIGIN_PROPAGATED", PyInt_FromLong(WBEM_FLAVOR_ORIGIN_PROPAGATED));
 
4248
        PyModule_AddObject(m, "WBEM_E_MISSING_AGGREGATION_LIST", PyInt_FromLong(WBEM_E_MISSING_AGGREGATION_LIST));
 
4249
        PyModule_AddObject(m, "WBEM_NO_ERROR", PyInt_FromLong(WBEM_NO_ERROR));
 
4250
        PyModule_AddObject(m, "WBEM_E_UNSUPPORTED_LOCALE", PyInt_FromLong(WBEM_E_UNSUPPORTED_LOCALE));
 
4251
        PyModule_AddObject(m, "WBEM_S_ACCESS_DENIED", PyInt_FromLong(WBEM_S_ACCESS_DENIED));
 
4252
        PyModule_AddObject(m, "CIM_ARR_UINT32", PyInt_FromLong(CIM_ARR_UINT32));
 
4253
        PyModule_AddObject(m, "CIM_UINT16", PyInt_FromLong(CIM_UINT16));
 
4254
        PyModule_AddObject(m, "WBEM_E_INVALID_OBJECT", PyInt_FromLong(WBEM_E_INVALID_OBJECT));
 
4255
        PyModule_AddObject(m, "WBEM_E_CANNOT_BE_SINGLETON", PyInt_FromLong(WBEM_E_CANNOT_BE_SINGLETON));
 
4256
        PyModule_AddObject(m, "WBEM_S_DIFFERENT", PyInt_FromLong(WBEM_S_DIFFERENT));
 
4257
        PyModule_AddObject(m, "WBEM_E_NO_KEY", PyInt_FromLong(WBEM_E_NO_KEY));
 
4258
        PyModule_AddObject(m, "WBEM_E_UNKNOWN_PACKET_TYPE", PyInt_FromLong(WBEM_E_UNKNOWN_PACKET_TYPE));
 
4259
        PyModule_AddObject(m, "WBEM_E_OUT_OF_DISK_SPACE", PyInt_FromLong(WBEM_E_OUT_OF_DISK_SPACE));
 
4260
        PyModule_AddObject(m, "WBEM_E_SHUTTING_DOWN", PyInt_FromLong(WBEM_E_SHUTTING_DOWN));
 
4261
        PyModule_AddObject(m, "WTYPE_SCHEMA", PyInt_FromLong(WTYPE_SCHEMA));
 
4262
        PyModule_AddObject(m, "WBEM_E_RERUN_COMMAND", PyInt_FromLong(WBEM_E_RERUN_COMMAND));
 
4263
        PyModule_AddObject(m, "CIM_SINT16", PyInt_FromLong(CIM_SINT16));
 
4264
        PyModule_AddObject(m, "CIM_FLAG_ARRAY", PyInt_FromLong(CIM_FLAG_ARRAY));
 
4265
        PyModule_AddObject(m, "CIM_REAL32", PyInt_FromLong(CIM_REAL32));
 
4266
        PyModule_AddObject(m, "WBEM_E_UNEXPECTED", PyInt_FromLong(WBEM_E_UNEXPECTED));
 
4267
        PyModule_AddObject(m, "WBEM_E_INVALID_OPERATION", PyInt_FromLong(WBEM_E_INVALID_OPERATION));
 
4268
        PyModule_AddObject(m, "WBEM_E_PROPERTY_NOT_AN_OBJECT", PyInt_FromLong(WBEM_E_PROPERTY_NOT_AN_OBJECT));
 
4269
        PyModule_AddObject(m, "WBEM_S_DUPLICATE_OBJECTS", PyInt_FromLong(WBEM_S_DUPLICATE_OBJECTS));
 
4270
        PyModule_AddObject(m, "WBEM_MASK_RESERVED_FLAGS", PyInt_FromLong(WBEM_MASK_RESERVED_FLAGS));
 
4271
        PyModule_AddObject(m, "WBEM_E_PROVIDER_TIMED_OUT", PyInt_FromLong(WBEM_E_PROVIDER_TIMED_OUT));
 
4272
        PyModule_AddObject(m, "CIM_ARR_SINT16", PyInt_FromLong(CIM_ARR_SINT16));
 
4273
        PyModule_AddObject(m, "WBEM_E_PROVIDER_NOT_FOUND", PyInt_FromLong(WBEM_E_PROVIDER_NOT_FOUND));
 
4274
        PyModule_AddObject(m, "RPC_S_CALL_FAILED", PyInt_FromLong(RPC_S_CALL_FAILED));
 
4275
        PyModule_AddObject(m, "WBEM_E_INVALID_HANDLE_REQUEST", PyInt_FromLong(WBEM_E_INVALID_HANDLE_REQUEST));
 
4276
        PyModule_AddObject(m, "WBEM_E_NONCONSECUTIVE_PARAMETER_IDS", PyInt_FromLong(WBEM_E_NONCONSECUTIVE_PARAMETER_IDS));
 
4277
        PyModule_AddObject(m, "CIM_ARR_BOOLEAN", PyInt_FromLong(CIM_ARR_BOOLEAN));
 
4278
        PyModule_AddObject(m, "CIM_SINT8", PyInt_FromLong(CIM_SINT8));
 
4279
        PyModule_AddObject(m, "CIM_ILLEGAL", PyInt_FromLong(CIM_ILLEGAL));
 
4280
        PyModule_AddObject(m, "WBEM_E_INVALID_CONTEXT", PyInt_FromLong(WBEM_E_INVALID_CONTEXT));
 
4281
        PyModule_AddObject(m, "WBEM_E_ENCRYPTED_CONNECTION_REQUIRED", PyInt_FromLong(WBEM_E_ENCRYPTED_CONNECTION_REQUIRED));
 
4282
        PyModule_AddObject(m, "WBEM_E_QUOTA_VIOLATION", PyInt_FromLong(WBEM_E_QUOTA_VIOLATION));
 
4283
        PyModule_AddObject(m, "CIM_REAL64", PyInt_FromLong(CIM_REAL64));
 
4284
        PyModule_AddObject(m, "WTYPE_CLASS", PyInt_FromLong(WTYPE_CLASS));
 
4285
        PyModule_AddObject(m, "WBEM_S_RESET_TO_DEFAULT", PyInt_FromLong(WBEM_S_RESET_TO_DEFAULT));
 
4286
        PyModule_AddObject(m, "WBEM_FLAG_ENSURE_LOCATABLE", PyInt_FromLong(WBEM_FLAG_ENSURE_LOCATABLE));
 
4287
        PyModule_AddObject(m, "CIM_ARR_UINT8", PyInt_FromLong(CIM_ARR_UINT8));
 
4288
        PyModule_AddObject(m, "CIM_REFERENCE", PyInt_FromLong(CIM_REFERENCE));
 
4289
        PyModule_AddObject(m, "WBEM_E_VETO_DELETE", PyInt_FromLong(WBEM_E_VETO_DELETE));
 
4290
        PyModule_AddObject(m, "WBEM_E_REFRESHER_BUSY", PyInt_FromLong(WBEM_E_REFRESHER_BUSY));
 
4291
        PyModule_AddObject(m, "WBEM_E_AMBIGUOUS_OPERATION", PyInt_FromLong(WBEM_E_AMBIGUOUS_OPERATION));
 
4292
        PyModule_AddObject(m, "WBEM_E_INVALID_PARAMETER", PyInt_FromLong(WBEM_E_INVALID_PARAMETER));
 
4293
        PyModule_AddObject(m, "WBEM_E_PROPERTY_NAME_TOO_WIDE", PyInt_FromLong(WBEM_E_PROPERTY_NAME_TOO_WIDE));
 
4294
        PyModule_AddObject(m, "WBEM_E_CONNECTION_FAILED", PyInt_FromLong(WBEM_E_CONNECTION_FAILED));
 
4295
        PyModule_AddObject(m, "CIM_EMPTY", PyInt_FromLong(CIM_EMPTY));
 
4296
        PyModule_AddObject(m, "WBEM_E_INVALID_QUALIFIER_TYPE", PyInt_FromLong(WBEM_E_INVALID_QUALIFIER_TYPE));
 
4297
        PyModule_AddObject(m, "WBEM_NO_WAIT", NULL);
 
4298
        PyModule_AddObject(m, "WBEM_E_QUERY_NOT_IMPLEMENTED", PyInt_FromLong(WBEM_E_QUERY_NOT_IMPLEMENTED));
 
4299
        PyModule_AddObject(m, "WBEM_E_INCOMPLETE_CLASS", PyInt_FromLong(WBEM_E_INCOMPLETE_CLASS));
 
4300
        PyModule_AddObject(m, "WBEM_E_OUT_OF_MEMORY", PyInt_FromLong(WBEM_E_OUT_OF_MEMORY));
 
4301
        PyModule_AddObject(m, "WBEM_E_INVALID_ASSOCIATION", PyInt_FromLong(WBEM_E_INVALID_ASSOCIATION));
 
4302
        PyModule_AddObject(m, "WBEM_E_AMENDED_OBJECT", PyInt_FromLong(WBEM_E_AMENDED_OBJECT));
 
4303
        PyModule_AddObject(m, "WBEM_E_PROVIDER_FAILURE", PyInt_FromLong(WBEM_E_PROVIDER_FAILURE));
 
4304
        PyModule_AddObject(m, "WBEM_E_OVERRIDE_NOT_ALLOWED", PyInt_FromLong(WBEM_E_OVERRIDE_NOT_ALLOWED));
 
4305
        PyModule_AddObject(m, "WBEM_E_UPDATE_PROPAGATED_METHOD", PyInt_FromLong(WBEM_E_UPDATE_PROPAGATED_METHOD));
 
4306
        PyModule_AddObject(m, "WBEM_FLAG_RETURN_ERROR_OBJECT", PyInt_FromLong(WBEM_FLAG_RETURN_ERROR_OBJECT));
 
4307
        PyModule_AddObject(m, "WBEM_E_MISSING_PARAMETER_ID", PyInt_FromLong(WBEM_E_MISSING_PARAMETER_ID));
 
4308
        PyModule_AddObject(m, "WBEM_E_NOT_SUPPORTED", PyInt_FromLong(WBEM_E_NOT_SUPPORTED));
 
4309
        PyModule_AddObject(m, "WBEM_E_LOCAL_CREDENTIALS", PyInt_FromLong(WBEM_E_LOCAL_CREDENTIALS));
 
4310
        PyModule_AddObject(m, "CIM_ARR_REAL32", PyInt_FromLong(CIM_ARR_REAL32));
 
4311
        PyModule_AddObject(m, "WBEM_S_NO_MORE_DATA", PyInt_FromLong(WBEM_S_NO_MORE_DATA));
 
4312
        PyModule_AddObject(m, "WBEM_S_NO_POSTHOOK", PyInt_FromLong(WBEM_S_NO_POSTHOOK));
 
4313
        PyModule_AddObject(m, "WBEM_E_INVALID_OPERATOR", PyInt_FromLong(WBEM_E_INVALID_OPERATOR));
 
4314
        PyModule_AddObject(m, "WBEM_E_PRIVILEGE_NOT_HELD", PyInt_FromLong(WBEM_E_PRIVILEGE_NOT_HELD));
 
4315
        PyModule_AddObject(m, "WBEM_E_INVALID_PROPERTY", PyInt_FromLong(WBEM_E_INVALID_PROPERTY));
 
4316
        PyModule_AddObject(m, "WBEM_E_UNKNOWN_OBJECT_TYPE", PyInt_FromLong(WBEM_E_UNKNOWN_OBJECT_TYPE));
 
4317
        PyModule_AddObject(m, "CIM_SINT64", PyInt_FromLong(CIM_SINT64));
 
4318
        PyModule_AddObject(m, "WBEM_FLAG_RETURN_WBEM_COMPLETE", PyInt_FromLong(WBEM_FLAG_RETURN_WBEM_COMPLETE));
 
4319
        PyModule_AddObject(m, "WBEM_E_INVALID_SYNTAX", PyInt_FromLong(WBEM_E_INVALID_SYNTAX));
 
4320
        PyModule_AddObject(m, "WBEM_E_DATABASE_VER_MISMATCH", PyInt_FromLong(WBEM_E_DATABASE_VER_MISMATCH));
 
4321
        PyModule_AddObject(m, "WBEM_E_TIMED_OUT", PyInt_FromLong(WBEM_E_TIMED_OUT));
 
4322
        PyModule_AddObject(m, "WBEM_E_INVALID_QUERY", PyInt_FromLong(WBEM_E_INVALID_QUERY));
 
4323
        PyModule_AddObject(m, "WBEM_FLAVOR_AMENDED", PyInt_FromLong(WBEM_FLAVOR_AMENDED));
 
4324
        PyModule_AddObject(m, "WBEM_E_INVALID_CLASS", PyInt_FromLong(WBEM_E_INVALID_CLASS));
 
4325
        PyModule_AddObject(m, "WBEM_E_CLIENT_TOO_SLOW", PyInt_FromLong(WBEM_E_CLIENT_TOO_SLOW));
 
4326
        PyModule_AddObject(m, "WCF_CLASS_PART_INTERNAL", PyInt_FromLong(WCF_CLASS_PART_INTERNAL));
 
4327
        PyModule_AddObject(m, "WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE", PyInt_FromLong(WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE));
 
4328
        PyModule_AddObject(m, "WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE", PyInt_FromLong(WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE));
 
4329
        PyModule_AddObject(m, "WBEM_S_POSTHOOK_WITH_OLD", PyInt_FromLong(WBEM_S_POSTHOOK_WITH_OLD));
 
4330
        PyModule_AddObject(m, "WBEM_E_READ_ONLY", PyInt_FromLong(WBEM_E_READ_ONLY));
 
4331
        PyModule_AddObject(m, "WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED", PyInt_FromLong(WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED));
 
4332
        PyModule_AddObject(m, "WBEM_E_MARSHAL_INVALID_SIGNATURE", PyInt_FromLong(WBEM_E_MARSHAL_INVALID_SIGNATURE));
 
4333
        PyModule_AddObject(m, "WBEM_E_INVALID_PROVIDER_REGISTRATION", PyInt_FromLong(WBEM_E_INVALID_PROVIDER_REGISTRATION));
 
4334
        PyModule_AddObject(m, "WBEM_FLAG_SEND_ONLY_SELECTED", PyInt_FromLong(WBEM_FLAG_SEND_ONLY_SELECTED));
 
4335
        PyModule_AddObject(m, "WBEM_FLAG_DIRECT_READ", PyInt_FromLong(WBEM_FLAG_DIRECT_READ));
 
4336
        PyModule_AddObject(m, "WBEM_E_FATAL_TRANSPORT_ERROR", PyInt_FromLong(WBEM_E_FATAL_TRANSPORT_ERROR));
 
4337
        PyModule_AddObject(m, "CIM_STRING", PyInt_FromLong(CIM_STRING));
 
4338
        PyModule_AddObject(m, "WBEM_E_INVALID_CIM_TYPE", PyInt_FromLong(WBEM_E_INVALID_CIM_TYPE));
 
4339
        PyModule_AddObject(m, "CIM_UINT64", PyInt_FromLong(CIM_UINT64));
 
4340
        PyModule_AddObject(m, "WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS", PyInt_FromLong(WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS));
 
4341
        PyModule_AddObject(m, "WBEM_FLAG_DONT_SEND_STATUS", PyInt_FromLong(WBEM_FLAG_DONT_SEND_STATUS));
 
4342
        PyModule_AddObject(m, "WBEM_FLAG_USE_AMENDED_QUALIFIERS", PyInt_FromLong(WBEM_FLAG_USE_AMENDED_QUALIFIERS));
 
4343
        PyModule_AddObject(m, "WBEM_E_INVALID_METHOD", PyInt_FromLong(WBEM_E_INVALID_METHOD));
 
4344
        PyModule_AddObject(m, "WBEM_RETURN_WHEN_COMPLETE", PyInt_FromLong(WBEM_RETURN_WHEN_COMPLETE));
 
4345
        PyModule_AddObject(m, "WBEM_E_NO_SCHEMA", PyInt_FromLong(WBEM_E_NO_SCHEMA));
 
4346
        PyModule_AddObject(m, "WBEM_E_INVALID_NAMESPACE", PyInt_FromLong(WBEM_E_INVALID_NAMESPACE));
 
4347
        PyModule_AddObject(m, "CIM_ARR_SINT64", PyInt_FromLong(CIM_ARR_SINT64));
 
4348
        PyModule_AddObject(m, "CIM_ARR_REFERENCE", PyInt_FromLong(CIM_ARR_REFERENCE));
 
4349
        PyModule_AddObject(m, "WBEM_E_HANDLE_OUT_OF_DATE", PyInt_FromLong(WBEM_E_HANDLE_OUT_OF_DATE));
 
4350
        PyModule_AddObject(m, "WBEM_E_PROVIDER_DISABLED", PyInt_FromLong(WBEM_E_PROVIDER_DISABLED));
 
4351
        PyModule_AddObject(m, "WBEM_S_PARTIAL_RESULTS", PyInt_FromLong(WBEM_S_PARTIAL_RESULTS));
 
4352
        PyModule_AddObject(m, "WBEM_E_QUEUE_OVERFLOW", PyInt_FromLong(WBEM_E_QUEUE_OVERFLOW));
 
4353
        PyModule_AddObject(m, "WBEM_E_PROVIDER_SUSPENDED", PyInt_FromLong(WBEM_E_PROVIDER_SUSPENDED));
 
4354
        PyModule_AddObject(m, "WBEM_E_CIRCULAR_REFERENCE", PyInt_FromLong(WBEM_E_CIRCULAR_REFERENCE));
 
4355
        PyModule_AddObject(m, "WCF_CLASS", PyInt_FromLong(WCF_CLASS));
 
4356
        PyModule_AddObject(m, "WBEM_S_OPERATION_CANCELLED", PyInt_FromLong(WBEM_S_OPERATION_CANCELLED));
 
4357
        PyModule_AddObject(m, "WBEM_FLAG_FORWARD_ONLY", PyInt_FromLong(WBEM_FLAG_FORWARD_ONLY));
 
4358
        PyModule_AddObject(m, "WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY", PyInt_FromLong(WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY));
 
4359
        PyModule_AddObject(m, "WBEM_E_ALREADY_EXISTS", PyInt_FromLong(WBEM_E_ALREADY_EXISTS));
 
4360
        PyModule_AddObject(m, "WBEM_E_INVALID_QUALIFIER", PyInt_FromLong(WBEM_E_INVALID_QUALIFIER));
 
4361
        PyModule_AddObject(m, "CIM_ARR_SINT32", PyInt_FromLong(CIM_ARR_SINT32));
 
4362
        PyModule_AddObject(m, "WBEM_E_TOO_MUCH_DATA", PyInt_FromLong(WBEM_E_TOO_MUCH_DATA));
 
4363
        PyModule_AddObject(m, "WBEM_RETURN_IMMEDIATELY", PyInt_FromLong(WBEM_RETURN_IMMEDIATELY));
 
4364
        PyModule_AddObject(m, "WBEM_E_INVALID_PARAMETER_ID", PyInt_FromLong(WBEM_E_INVALID_PARAMETER_ID));
 
4365
        PyModule_AddObject(m, "WBEM_FLAG_STRONG_VALIDATION", PyInt_FromLong(WBEM_FLAG_STRONG_VALIDATION));
 
4366
        PyModule_AddObject(m, "WBEM_E_VALUE_OUT_OF_RANGE", PyInt_FromLong(WBEM_E_VALUE_OUT_OF_RANGE));
 
4367
        PyModule_AddObject(m, "CIM_UINT8", PyInt_FromLong(CIM_UINT8));
 
4368
        PyModule_AddObject(m, "WBEM_E_MISSING_GROUP_WITHIN", PyInt_FromLong(WBEM_E_MISSING_GROUP_WITHIN));
 
4369
        PyModule_AddObject(m, "WBEM_E_PROVIDER_NOT_REGISTERED", PyInt_FromLong(WBEM_E_PROVIDER_NOT_REGISTERED));
 
4370
        PyModule_AddObject(m, "CIM_CHAR16", PyInt_FromLong(CIM_CHAR16));
 
4371
        PyModule_AddObject(m, "WBEM_E_ILLEGAL_NULL", PyInt_FromLong(WBEM_E_ILLEGAL_NULL));
 
4372
        PyModule_AddObject(m, "WBEM_E_TOO_MANY_PROPERTIES", PyInt_FromLong(WBEM_E_TOO_MANY_PROPERTIES));
 
4373
        PyModule_AddObject(m, "WBEM_S_SOURCE_NOT_AVAILABLE", PyInt_FromLong(WBEM_S_SOURCE_NOT_AVAILABLE));
 
4374
        PyModule_AddObject(m, "WBEM_E_NOT_FOUND", PyInt_FromLong(WBEM_E_NOT_FOUND));
 
4375
        PyModule_AddObject(m, "CIM_ARR_SINT8", PyInt_FromLong(CIM_ARR_SINT8));
 
4376
        PyModule_AddObject(m, "WBEM_E_PROPAGATED_QUALIFIER", PyInt_FromLong(WBEM_E_PROPAGATED_QUALIFIER));
 
4377
        PyModule_AddObject(m, "WBEM_E_ILLEGAL_OPERATION", PyInt_FromLong(WBEM_E_ILLEGAL_OPERATION));
 
4378
        PyModule_AddObject(m, "CIM_ARR_CHAR16", PyInt_FromLong(CIM_ARR_CHAR16));
 
4379
        PyModule_AddObject(m, "WBEM_E_UNSUPPORTED_PUT_EXTENSION", PyInt_FromLong(WBEM_E_UNSUPPORTED_PUT_EXTENSION));
 
4380
        PyModule_AddObject(m, "DEFAULT_FLAG_EMPTY", PyInt_FromLong(DEFAULT_FLAG_EMPTY));
 
4381
        PyModule_AddObject(m, "WBEM_FLAG_BIDIRECTIONAL", PyInt_FromLong(WBEM_FLAG_BIDIRECTIONAL));
 
4382
        PyModule_AddObject(m, "WBEM_S_POSTHOOK_WITH_BOTH", PyInt_FromLong(WBEM_S_POSTHOOK_WITH_BOTH));
 
4383
        PyModule_AddObject(m, "WBEM_E_TRANSPORT_FAILURE", PyInt_FromLong(WBEM_E_TRANSPORT_FAILURE));
 
4384
        PyModule_AddObject(m, "WBEM_E_AGGREGATING_BY_OBJECT", PyInt_FromLong(WBEM_E_AGGREGATING_BY_OBJECT));
 
4385
        PyModule_AddObject(m, "WBEM_E_MARSHAL_VERSION_MISMATCH", PyInt_FromLong(WBEM_E_MARSHAL_VERSION_MISMATCH));
 
4386
        PyModule_AddObject(m, "WBEM_S_POSTHOOK_WITH_STATUS", PyInt_FromLong(WBEM_S_POSTHOOK_WITH_STATUS));
 
4387
        PyModule_AddObject(m, "WBEM_S_SAME", PyInt_FromLong(WBEM_S_SAME));
 
4388
        PyModule_AddObject(m, "WBEM_E_BUFFER_TOO_SMALL", PyInt_FromLong(WBEM_E_BUFFER_TOO_SMALL));
 
4389
        PyModule_AddObject(m, "WBEM_E_SYNCHRONIZATION_REQUIRED", PyInt_FromLong(WBEM_E_SYNCHRONIZATION_REQUIRED));
 
4390
        PyModule_AddObject(m, "WBEM_FLAG_RETURN_IMMEDIATELY", PyInt_FromLong(WBEM_FLAG_RETURN_IMMEDIATELY));
 
4391
        PyModule_AddObject(m, "WBEM_E_UNPARSABLE_QUERY", PyInt_FromLong(WBEM_E_UNPARSABLE_QUERY));
 
4392
        PyModule_AddObject(m, "CIM_BOOLEAN", PyInt_FromLong(CIM_BOOLEAN));
 
4393
        PyModule_AddObject(m, "WTYPE_OBJECT", PyInt_FromLong(WTYPE_OBJECT));
 
4394
        PyModule_AddObject(m, "WBEM_E_QUALIFIER_NAME_TOO_WIDE", PyInt_FromLong(WBEM_E_QUALIFIER_NAME_TOO_WIDE));
 
4395
        PyModule_AddObject(m, "WBEM_S_REDO_PREHOOK_WITH_ORIGINAL_OBJECT", PyInt_FromLong(WBEM_S_REDO_PREHOOK_WITH_ORIGINAL_OBJECT));
 
4396
        PyModule_AddObject(m, "WBEM_S_ALREADY_EXISTS", PyInt_FromLong(WBEM_S_ALREADY_EXISTS));
 
4397
        PyModule_AddObject(m, "CIM_ARR_UINT64", PyInt_FromLong(CIM_ARR_UINT64));
 
4398
        PyModule_AddObject(m, "WBEM_E_INVALID_LOCALE", PyInt_FromLong(WBEM_E_INVALID_LOCALE));
 
4399
        PyModule_AddObject(m, "WBEM_E_NOT_AVAILABLE", PyInt_FromLong(WBEM_E_NOT_AVAILABLE));
 
4400
        PyModule_AddObject(m, "WBEM_S_NO_ERROR", PyInt_FromLong(WBEM_S_NO_ERROR));
 
4401
        PyModule_AddObject(m, "WBEM_E_INITIALIZATION_FAILURE", PyInt_FromLong(WBEM_E_INITIALIZATION_FAILURE));
 
4402
        PyModule_AddObject(m, "WBEM_E_CLASS_HAS_INSTANCES", PyInt_FromLong(WBEM_E_CLASS_HAS_INSTANCES));
 
4403
        PyModule_AddObject(m, "WBEM_E_INVALID_DUPLICATE_PARAMETER", PyInt_FromLong(WBEM_E_INVALID_DUPLICATE_PARAMETER));
 
4404
        PyModule_AddObject(m, "WBEM_E_PROPAGATED_PROPERTY", PyInt_FromLong(WBEM_E_PROPAGATED_PROPERTY));
 
4405
        PyModule_AddObject(m, "WBEM_FLAG_NO_ERROR_OBJECT", PyInt_FromLong(WBEM_FLAG_NO_ERROR_OBJECT));
 
4406
        PyModule_AddObject(m, "WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING", PyInt_FromLong(WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING));
 
4407
        PyModule_AddObject(m, "WBEM_E_UNSUPPORTED_PARAMETER", PyInt_FromLong(WBEM_E_UNSUPPORTED_PARAMETER));
 
4408
        PyModule_AddObject(m, "WBEM_E_METHOD_NAME_TOO_WIDE", PyInt_FromLong(WBEM_E_METHOD_NAME_TOO_WIDE));
 
4409
        PyModule_AddObject(m, "CIM_OBJECT", PyInt_FromLong(CIM_OBJECT));
 
4410
        PyModule_AddObject(m, "WBEM_E_INVALID_PROPERTY_TYPE", PyInt_FromLong(WBEM_E_INVALID_PROPERTY_TYPE));
 
4411
        PyModule_AddObject(m, "CIM_TYPEMASK", PyInt_FromLong(CIM_TYPEMASK));
 
4412
        PyModule_AddObject(m, "WBEM_INFINITE", NULL);
 
4413
        PyModule_AddObject(m, "WBEM_E_INVALID_METHOD_PARAMETERS", PyInt_FromLong(WBEM_E_INVALID_METHOD_PARAMETERS));
 
4414
        PyModule_AddObject(m, "WBEM_E_CANNOT_BE_ABSTRACT", PyInt_FromLong(WBEM_E_CANNOT_BE_ABSTRACT));
 
4415
        PyModule_AddObject(m, "WBEM_E_NULL_SECURITY_DESCRIPTOR", PyInt_FromLong(WBEM_E_NULL_SECURITY_DESCRIPTOR));
 
4416
        PyModule_AddObject(m, "WBEM_E_CLASS_NAME_TOO_WIDE", PyInt_FromLong(WBEM_E_CLASS_NAME_TOO_WIDE));
 
4417
        PyModule_AddObject(m, "WBEM_E_CRITICAL_ERROR", PyInt_FromLong(WBEM_E_CRITICAL_ERROR));
 
4418
        PyModule_AddObject(m, "WBEM_E_INVALID_FLAVOR", PyInt_FromLong(WBEM_E_INVALID_FLAVOR));
 
4419
        PyModule_AddObject(m, "WBEM_E_RESERVED_002", PyInt_FromLong(WBEM_E_RESERVED_002));
 
4420
        PyModule_AddObject(m, "WBEM_E_TYPE_MISMATCH", PyInt_FromLong(WBEM_E_TYPE_MISMATCH));
 
4421
        PyModule_AddObject(m, "WBEM_E_INVALID_SUPERCLASS", PyInt_FromLong(WBEM_E_INVALID_SUPERCLASS));
 
4422
        PyModule_AddObject(m, "WBEM_E_PROPAGATED_METHOD", PyInt_FromLong(WBEM_E_PROPAGATED_METHOD));
 
4423
        PyModule_AddObject(m, "WBEM_S_FALSE", PyInt_FromLong(WBEM_S_FALSE));
 
4424
        PyModule_AddObject(m, "WBEM_E_SYSTEM_PROPERTY", PyInt_FromLong(WBEM_E_SYSTEM_PROPERTY));
 
4425
        PyModule_AddObject(m, "WBEM_E_ACCESS_DENIED", PyInt_FromLong(WBEM_E_ACCESS_DENIED));
 
4426
        PyModule_AddObject(m, "CIM_DATETIME", PyInt_FromLong(CIM_DATETIME));
 
4427
        PyModule_AddObject(m, "CIM_SINT32", PyInt_FromLong(CIM_SINT32));
 
4428
        PyModule_AddObject(m, "WBEM_FLAVOR_ORIGIN_SYSTEM", PyInt_FromLong(WBEM_FLAVOR_ORIGIN_SYSTEM));
 
4429
        PyModule_AddObject(m, "WBEM_E_METHOD_DISABLED", PyInt_FromLong(WBEM_E_METHOD_DISABLED));
 
4430
        PyModule_AddObject(m, "CIM_ARR_DATETIME", PyInt_FromLong(CIM_ARR_DATETIME));
 
4431
        PyModule_AddObject(m, "CIM_UINT32", PyInt_FromLong(CIM_UINT32));
 
4432
        PyModule_AddObject(m, "WBEM_E_CLASS_HAS_CHILDREN", PyInt_FromLong(WBEM_E_CLASS_HAS_CHILDREN));
 
4433
        PyModule_AddObject(m, "WBEM_E_NOT_EVENT_CLASS", PyInt_FromLong(WBEM_E_NOT_EVENT_CLASS));
 
4434
        PyModule_AddObject(m, "WBEM_E_UPDATE_TYPE_MISMATCH", PyInt_FromLong(WBEM_E_UPDATE_TYPE_MISMATCH));
 
4435
        PyModule_AddObject(m, "CIM_ARR_OBJECT", PyInt_FromLong(CIM_ARR_OBJECT));
 
4436
        PyModule_AddObject(m, "WBEM_E_VETO_PUT", PyInt_FromLong(WBEM_E_VETO_PUT));
 
4437
        PyModule_AddObject(m, "DEFAULT_FLAG_INHERITED", PyInt_FromLong(DEFAULT_FLAG_INHERITED));
 
4438
        PyModule_AddObject(m, "WBEM_E_CANNOT_BE_KEY", PyInt_FromLong(WBEM_E_CANNOT_BE_KEY));
 
4439
        PyModule_AddObject(m, "WBEM_E_CALL_CANCELLED", PyInt_FromLong(WBEM_E_CALL_CANCELLED));
 
4440
        PyModule_AddObject(m, "WBEM_E_INVALID_OBJECT_PATH", PyInt_FromLong(WBEM_E_INVALID_OBJECT_PATH));
 
4441
        PyModule_AddObject(m, "WBEM_E_INVALID_STREAM", PyInt_FromLong(WBEM_E_INVALID_STREAM));
 
4442
        PyModule_AddObject(m, "CIM_ARR_STRING", PyInt_FromLong(CIM_ARR_STRING));
 
4443
        PyModule_AddObject(m, "CIM_ARR_REAL64", PyInt_FromLong(CIM_ARR_REAL64));
 
4444
        PyModule_AddObject(m, "WBEM_E_INVALID_QUERY_TYPE", PyInt_FromLong(WBEM_E_INVALID_QUERY_TYPE));
 
4445
        PyModule_AddObject(m, "WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE", PyInt_FromLong(WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE));
 
4446
        PyModule_AddObject(m, "WCF_DECORATIONS", PyInt_FromLong(WCF_DECORATIONS));
 
4447
        PyModule_AddObject(m, "WBEM_FLAVOR_NOT_OVERRIDABLE", PyInt_FromLong(WBEM_FLAVOR_NOT_OVERRIDABLE));
 
4448
        PyModule_AddObject(m, "WCF_INSTANCE", PyInt_FromLong(WCF_INSTANCE));
 
4449
        PyModule_AddObject(m, "WBEM_S_TIMEDOUT", PyInt_FromLong(WBEM_S_TIMEDOUT));
 
4450
        PyModule_AddObject(m, "WBEM_E_PARAMETER_ID_ON_RETVAL", PyInt_FromLong(WBEM_E_PARAMETER_ID_ON_RETVAL));
 
4451
        PyModule_AddObject(m, "WBEM_E_PROVIDER_NOT_CAPABLE", PyInt_FromLong(WBEM_E_PROVIDER_NOT_CAPABLE));
 
4452
        PyModule_AddObject(m, "WBEM_E_UNSUPPORTED_CLASS_UPDATE", PyInt_FromLong(WBEM_E_UNSUPPORTED_CLASS_UPDATE));
 
4453
        PyModule_AddObject(m, "WBEM_E_PROVIDER_ALREADY_REGISTERED", PyInt_FromLong(WBEM_E_PROVIDER_ALREADY_REGISTERED));
 
4454
        PyModule_AddObject(m, "WBEM_E_METHOD_NOT_IMPLEMENTED", PyInt_FromLong(WBEM_E_METHOD_NOT_IMPLEMENTED));
 
4455
        PyModule_AddObject(m, "WBEM_FLAG_SEND_STATUS", PyInt_FromLong(WBEM_FLAG_SEND_STATUS));
 
4456
        Py_INCREF((PyObject *)(void *)&BSTR_Type);
 
4457
        PyModule_AddObject(m, "BSTR", (PyObject *)(void *)&BSTR_Type);
 
4458
        Py_INCREF((PyObject *)(void *)&IWbemClassObject_InterfaceType);
 
4459
        PyModule_AddObject(m, "IWbemClassObject", (PyObject *)(void *)&IWbemClassObject_InterfaceType);
 
4460
        Py_INCREF((PyObject *)(void *)&CIMSTRINGS_Type);
 
4461
        PyModule_AddObject(m, "CIMSTRINGS", (PyObject *)(void *)&CIMSTRINGS_Type);
 
4462
        Py_INCREF((PyObject *)(void *)&IWbemServices_InterfaceType);
 
4463
        PyModule_AddObject(m, "IWbemServices", (PyObject *)(void *)&IWbemServices_InterfaceType);
 
4464
        Py_INCREF((PyObject *)(void *)&IEnumWbemClassObject_InterfaceType);
 
4465
        PyModule_AddObject(m, "IEnumWbemClassObject", (PyObject *)(void *)&IEnumWbemClassObject_InterfaceType);
 
4466
        Py_INCREF((PyObject *)(void *)&IWbemContext_InterfaceType);
 
4467
        PyModule_AddObject(m, "IWbemContext", (PyObject *)(void *)&IWbemContext_InterfaceType);
 
4468
        Py_INCREF((PyObject *)(void *)&IWbemLevel1Login_InterfaceType);
 
4469
        PyModule_AddObject(m, "IWbemLevel1Login", (PyObject *)(void *)&IWbemLevel1Login_InterfaceType);
 
4470
        Py_INCREF((PyObject *)(void *)&WBEMDATA_Type);
 
4471
        PyModule_AddObject(m, "WBEMDATA", (PyObject *)(void *)&WBEMDATA_Type);
 
4472
        Py_INCREF((PyObject *)(void *)&WBEMDATA4_Type);
 
4473
        PyModule_AddObject(m, "WBEMDATA4", (PyObject *)(void *)&WBEMDATA4_Type);
 
4474
        Py_INCREF((PyObject *)(void *)&WBEMDATA3_Type);
 
4475
        PyModule_AddObject(m, "WBEMDATA3", (PyObject *)(void *)&WBEMDATA3_Type);
 
4476
        Py_INCREF((PyObject *)(void *)&WBEMDATA2_Type);
 
4477
        PyModule_AddObject(m, "WBEMDATA2", (PyObject *)(void *)&WBEMDATA2_Type);
 
4478
        Py_INCREF((PyObject *)(void *)&WBEMDATA1_Type);
 
4479
        PyModule_AddObject(m, "WBEMDATA1", (PyObject *)(void *)&WBEMDATA1_Type);
 
4480
        Py_INCREF((PyObject *)(void *)&WBEMDATA0_Type);
 
4481
        PyModule_AddObject(m, "WBEMDATA0", (PyObject *)(void *)&WBEMDATA0_Type);
 
4482
        Py_INCREF((PyObject *)(void *)&IWbemWCOSmartEnum_InterfaceType);
 
4483
        PyModule_AddObject(m, "IWbemWCOSmartEnum", (PyObject *)(void *)&IWbemWCOSmartEnum_InterfaceType);
 
4484
        Py_INCREF((PyObject *)(void *)&IWbemFetchSmartEnum_InterfaceType);
 
4485
        PyModule_AddObject(m, "IWbemFetchSmartEnum", (PyObject *)(void *)&IWbemFetchSmartEnum_InterfaceType);
 
4486
        Py_INCREF((PyObject *)(void *)&IWbemCallResult_InterfaceType);
 
4487
        PyModule_AddObject(m, "IWbemCallResult", (PyObject *)(void *)&IWbemCallResult_InterfaceType);
 
4488
        Py_INCREF((PyObject *)(void *)&IWbemObjectSink_InterfaceType);
 
4489
        PyModule_AddObject(m, "IWbemObjectSink", (PyObject *)(void *)&IWbemObjectSink_InterfaceType);
 
4490
#ifdef PY_MOD_WMI_PATCH
 
4491
        PY_MOD_WMI_PATCH(m);
 
4492
#endif
 
4493
 
 
4494
}