2 /* Python wrapper functions auto-generated by pidl */
6 #include "librpc/rpc/pyrpc.h"
7 #include "librpc/rpc/pyrpc_util.h"
8 #include "bin/default/librpc/gen_ndr/ndr_dssetup.h"
9 #include "bin/default/librpc/gen_ndr/ndr_dssetup_c.h"
11 #include "librpc/gen_ndr/misc.h"
12 staticforward PyTypeObject dssetup_DsRolePrimaryDomInfoBasic_Type;
13 staticforward PyTypeObject dssetup_DsRoleUpgradeStatus_Type;
14 staticforward PyTypeObject dssetup_DsRoleOpStatus_Type;
15 staticforward PyTypeObject dssetup_InterfaceType;
17 void initdssetup(void);static PyTypeObject *Object_Type;
18 static PyTypeObject *GUID_Type;
19 static PyTypeObject *ClientConnection_Type;
21 static PyObject *py_dssetup_DsRolePrimaryDomInfoBasic_get_role(PyObject *obj, void *closure)
23 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(obj);
25 py_role = PyInt_FromLong(object->role);
29 static int py_dssetup_DsRolePrimaryDomInfoBasic_set_role(PyObject *py_obj, PyObject *value, void *closure)
31 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(py_obj);
32 if (PyLong_Check(value)) {
33 object->role = PyLong_AsLongLong(value);
34 } else if (PyInt_Check(value)) {
35 object->role = PyInt_AsLong(value);
37 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
38 PyInt_Type.tp_name, PyLong_Type.tp_name);
44 static PyObject *py_dssetup_DsRolePrimaryDomInfoBasic_get_flags(PyObject *obj, void *closure)
46 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(obj);
48 py_flags = PyInt_FromLong(object->flags);
52 static int py_dssetup_DsRolePrimaryDomInfoBasic_set_flags(PyObject *py_obj, PyObject *value, void *closure)
54 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(py_obj);
55 if (PyLong_Check(value)) {
56 object->flags = PyLong_AsLongLong(value);
57 } else if (PyInt_Check(value)) {
58 object->flags = PyInt_AsLong(value);
60 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
61 PyInt_Type.tp_name, PyLong_Type.tp_name);
67 static PyObject *py_dssetup_DsRolePrimaryDomInfoBasic_get_domain(PyObject *obj, void *closure)
69 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(obj);
71 if (object->domain == NULL) {
75 if (object->domain == NULL) {
79 py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
85 static int py_dssetup_DsRolePrimaryDomInfoBasic_set_domain(PyObject *py_obj, PyObject *value, void *closure)
87 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(py_obj);
88 if (value == Py_None) {
89 object->domain = NULL;
91 object->domain = NULL;
92 if (PyUnicode_Check(value)) {
93 object->domain = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
94 } else if (PyString_Check(value)) {
95 object->domain = PyString_AS_STRING(value);
97 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
104 static PyObject *py_dssetup_DsRolePrimaryDomInfoBasic_get_dns_domain(PyObject *obj, void *closure)
106 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(obj);
107 PyObject *py_dns_domain;
108 if (object->dns_domain == NULL) {
109 py_dns_domain = Py_None;
110 Py_INCREF(py_dns_domain);
112 if (object->dns_domain == NULL) {
113 py_dns_domain = Py_None;
114 Py_INCREF(py_dns_domain);
116 py_dns_domain = PyUnicode_Decode(object->dns_domain, strlen(object->dns_domain), "utf-8", "ignore");
119 return py_dns_domain;
122 static int py_dssetup_DsRolePrimaryDomInfoBasic_set_dns_domain(PyObject *py_obj, PyObject *value, void *closure)
124 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(py_obj);
125 if (value == Py_None) {
126 object->dns_domain = NULL;
128 object->dns_domain = NULL;
129 if (PyUnicode_Check(value)) {
130 object->dns_domain = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
131 } else if (PyString_Check(value)) {
132 object->dns_domain = PyString_AS_STRING(value);
134 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
141 static PyObject *py_dssetup_DsRolePrimaryDomInfoBasic_get_forest(PyObject *obj, void *closure)
143 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(obj);
145 if (object->forest == NULL) {
147 Py_INCREF(py_forest);
149 if (object->forest == NULL) {
151 Py_INCREF(py_forest);
153 py_forest = PyUnicode_Decode(object->forest, strlen(object->forest), "utf-8", "ignore");
159 static int py_dssetup_DsRolePrimaryDomInfoBasic_set_forest(PyObject *py_obj, PyObject *value, void *closure)
161 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(py_obj);
162 if (value == Py_None) {
163 object->forest = NULL;
165 object->forest = NULL;
166 if (PyUnicode_Check(value)) {
167 object->forest = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
168 } else if (PyString_Check(value)) {
169 object->forest = PyString_AS_STRING(value);
171 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
178 static PyObject *py_dssetup_DsRolePrimaryDomInfoBasic_get_domain_guid(PyObject *obj, void *closure)
180 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(obj);
181 PyObject *py_domain_guid;
182 py_domain_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->domain_guid);
183 return py_domain_guid;
186 static int py_dssetup_DsRolePrimaryDomInfoBasic_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
188 struct dssetup_DsRolePrimaryDomInfoBasic *object = (struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(py_obj);
189 PY_CHECK_TYPE(GUID_Type, value, return -1;);
190 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
194 object->domain_guid = *(struct GUID *)pytalloc_get_ptr(value);
198 static PyGetSetDef py_dssetup_DsRolePrimaryDomInfoBasic_getsetters[] = {
199 { discard_const_p(char, "role"), py_dssetup_DsRolePrimaryDomInfoBasic_get_role, py_dssetup_DsRolePrimaryDomInfoBasic_set_role },
200 { discard_const_p(char, "flags"), py_dssetup_DsRolePrimaryDomInfoBasic_get_flags, py_dssetup_DsRolePrimaryDomInfoBasic_set_flags },
201 { discard_const_p(char, "domain"), py_dssetup_DsRolePrimaryDomInfoBasic_get_domain, py_dssetup_DsRolePrimaryDomInfoBasic_set_domain },
202 { discard_const_p(char, "dns_domain"), py_dssetup_DsRolePrimaryDomInfoBasic_get_dns_domain, py_dssetup_DsRolePrimaryDomInfoBasic_set_dns_domain },
203 { discard_const_p(char, "forest"), py_dssetup_DsRolePrimaryDomInfoBasic_get_forest, py_dssetup_DsRolePrimaryDomInfoBasic_set_forest },
204 { discard_const_p(char, "domain_guid"), py_dssetup_DsRolePrimaryDomInfoBasic_get_domain_guid, py_dssetup_DsRolePrimaryDomInfoBasic_set_domain_guid },
208 static PyObject *py_dssetup_DsRolePrimaryDomInfoBasic_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
210 return pytalloc_new(struct dssetup_DsRolePrimaryDomInfoBasic, type);
214 static PyTypeObject dssetup_DsRolePrimaryDomInfoBasic_Type = {
215 PyObject_HEAD_INIT(NULL) 0,
216 .tp_name = "dssetup.DsRolePrimaryDomInfoBasic",
217 .tp_getset = py_dssetup_DsRolePrimaryDomInfoBasic_getsetters,
219 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
220 .tp_basicsize = sizeof(pytalloc_Object),
221 .tp_new = py_dssetup_DsRolePrimaryDomInfoBasic_new,
225 static PyObject *py_dssetup_DsRoleUpgradeStatus_get_upgrading(PyObject *obj, void *closure)
227 struct dssetup_DsRoleUpgradeStatus *object = (struct dssetup_DsRoleUpgradeStatus *)pytalloc_get_ptr(obj);
228 PyObject *py_upgrading;
229 py_upgrading = PyInt_FromLong(object->upgrading);
233 static int py_dssetup_DsRoleUpgradeStatus_set_upgrading(PyObject *py_obj, PyObject *value, void *closure)
235 struct dssetup_DsRoleUpgradeStatus *object = (struct dssetup_DsRoleUpgradeStatus *)pytalloc_get_ptr(py_obj);
236 if (PyLong_Check(value)) {
237 object->upgrading = PyLong_AsLongLong(value);
238 } else if (PyInt_Check(value)) {
239 object->upgrading = PyInt_AsLong(value);
241 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
242 PyInt_Type.tp_name, PyLong_Type.tp_name);
248 static PyObject *py_dssetup_DsRoleUpgradeStatus_get_previous_role(PyObject *obj, void *closure)
250 struct dssetup_DsRoleUpgradeStatus *object = (struct dssetup_DsRoleUpgradeStatus *)pytalloc_get_ptr(obj);
251 PyObject *py_previous_role;
252 py_previous_role = PyInt_FromLong(object->previous_role);
253 return py_previous_role;
256 static int py_dssetup_DsRoleUpgradeStatus_set_previous_role(PyObject *py_obj, PyObject *value, void *closure)
258 struct dssetup_DsRoleUpgradeStatus *object = (struct dssetup_DsRoleUpgradeStatus *)pytalloc_get_ptr(py_obj);
259 if (PyLong_Check(value)) {
260 object->previous_role = PyLong_AsLongLong(value);
261 } else if (PyInt_Check(value)) {
262 object->previous_role = PyInt_AsLong(value);
264 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
265 PyInt_Type.tp_name, PyLong_Type.tp_name);
271 static PyGetSetDef py_dssetup_DsRoleUpgradeStatus_getsetters[] = {
272 { discard_const_p(char, "upgrading"), py_dssetup_DsRoleUpgradeStatus_get_upgrading, py_dssetup_DsRoleUpgradeStatus_set_upgrading },
273 { discard_const_p(char, "previous_role"), py_dssetup_DsRoleUpgradeStatus_get_previous_role, py_dssetup_DsRoleUpgradeStatus_set_previous_role },
277 static PyObject *py_dssetup_DsRoleUpgradeStatus_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
279 return pytalloc_new(struct dssetup_DsRoleUpgradeStatus, type);
283 static PyTypeObject dssetup_DsRoleUpgradeStatus_Type = {
284 PyObject_HEAD_INIT(NULL) 0,
285 .tp_name = "dssetup.DsRoleUpgradeStatus",
286 .tp_getset = py_dssetup_DsRoleUpgradeStatus_getsetters,
288 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
289 .tp_basicsize = sizeof(pytalloc_Object),
290 .tp_new = py_dssetup_DsRoleUpgradeStatus_new,
294 static PyObject *py_dssetup_DsRoleOpStatus_get_status(PyObject *obj, void *closure)
296 struct dssetup_DsRoleOpStatus *object = (struct dssetup_DsRoleOpStatus *)pytalloc_get_ptr(obj);
298 py_status = PyInt_FromLong(object->status);
302 static int py_dssetup_DsRoleOpStatus_set_status(PyObject *py_obj, PyObject *value, void *closure)
304 struct dssetup_DsRoleOpStatus *object = (struct dssetup_DsRoleOpStatus *)pytalloc_get_ptr(py_obj);
305 if (PyLong_Check(value)) {
306 object->status = PyLong_AsLongLong(value);
307 } else if (PyInt_Check(value)) {
308 object->status = PyInt_AsLong(value);
310 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
311 PyInt_Type.tp_name, PyLong_Type.tp_name);
317 static PyGetSetDef py_dssetup_DsRoleOpStatus_getsetters[] = {
318 { discard_const_p(char, "status"), py_dssetup_DsRoleOpStatus_get_status, py_dssetup_DsRoleOpStatus_set_status },
322 static PyObject *py_dssetup_DsRoleOpStatus_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
324 return pytalloc_new(struct dssetup_DsRoleOpStatus, type);
328 static PyTypeObject dssetup_DsRoleOpStatus_Type = {
329 PyObject_HEAD_INIT(NULL) 0,
330 .tp_name = "dssetup.DsRoleOpStatus",
331 .tp_getset = py_dssetup_DsRoleOpStatus_getsetters,
333 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
334 .tp_basicsize = sizeof(pytalloc_Object),
335 .tp_new = py_dssetup_DsRoleOpStatus_new,
338 PyObject *py_import_dssetup_DsRoleInfo(TALLOC_CTX *mem_ctx, int level, union dssetup_DsRoleInfo *in)
343 case DS_ROLE_BASIC_INFORMATION:
344 ret = pytalloc_reference_ex(&dssetup_DsRolePrimaryDomInfoBasic_Type, mem_ctx, &in->basic);
347 case DS_ROLE_UPGRADE_STATUS:
348 ret = pytalloc_reference_ex(&dssetup_DsRoleUpgradeStatus_Type, mem_ctx, &in->upgrade);
351 case DS_ROLE_OP_STATUS:
352 ret = pytalloc_reference_ex(&dssetup_DsRoleOpStatus_Type, mem_ctx, &in->opstatus);
356 PyErr_SetString(PyExc_TypeError, "unknown union level");
360 union dssetup_DsRoleInfo *py_export_dssetup_DsRoleInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
362 union dssetup_DsRoleInfo *ret = talloc_zero(mem_ctx, union dssetup_DsRoleInfo);
364 case DS_ROLE_BASIC_INFORMATION:
365 PY_CHECK_TYPE(&dssetup_DsRolePrimaryDomInfoBasic_Type, in, talloc_free(ret); return NULL;);
366 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
368 talloc_free(ret); return NULL;
370 ret->basic = *(struct dssetup_DsRolePrimaryDomInfoBasic *)pytalloc_get_ptr(in);
373 case DS_ROLE_UPGRADE_STATUS:
374 PY_CHECK_TYPE(&dssetup_DsRoleUpgradeStatus_Type, in, talloc_free(ret); return NULL;);
375 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
377 talloc_free(ret); return NULL;
379 ret->upgrade = *(struct dssetup_DsRoleUpgradeStatus *)pytalloc_get_ptr(in);
382 case DS_ROLE_OP_STATUS:
383 PY_CHECK_TYPE(&dssetup_DsRoleOpStatus_Type, in, talloc_free(ret); return NULL;);
384 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
386 talloc_free(ret); return NULL;
388 ret->opstatus = *(struct dssetup_DsRoleOpStatus *)pytalloc_get_ptr(in);
392 PyErr_SetString(PyExc_TypeError, "invalid union level value");
401 static bool pack_py_dssetup_DsRoleGetPrimaryDomainInformation_args_in(PyObject *args, PyObject *kwargs, struct dssetup_DsRoleGetPrimaryDomainInformation *r)
404 const char *kwnames[] = {
408 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:dssetup_DsRoleGetPrimaryDomainInformation", discard_const_p(char *, kwnames), &py_level)) {
412 if (PyLong_Check(py_level)) {
413 r->in.level = PyLong_AsLongLong(py_level);
414 } else if (PyInt_Check(py_level)) {
415 r->in.level = PyInt_AsLong(py_level);
417 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
418 PyInt_Type.tp_name, PyLong_Type.tp_name);
424 static PyObject *unpack_py_dssetup_DsRoleGetPrimaryDomainInformation_args_out(struct dssetup_DsRoleGetPrimaryDomainInformation *r)
428 if (r->out.info == NULL) {
432 py_info = py_import_dssetup_DsRoleInfo(r->out.info, r->in.level, r->out.info);
433 if (py_info == NULL) {
438 if (!W_ERROR_IS_OK(r->out.result)) {
439 PyErr_SetWERROR(r->out.result);
446 const struct PyNdrRpcMethodDef py_ndr_dssetup_methods[] = {
447 { "DsRoleGetPrimaryDomainInformation", "S.DsRoleGetPrimaryDomainInformation(level) -> info", (py_dcerpc_call_fn)dcerpc_dssetup_DsRoleGetPrimaryDomainInformation_r, (py_data_pack_fn)pack_py_dssetup_DsRoleGetPrimaryDomainInformation_args_in, (py_data_unpack_fn)unpack_py_dssetup_DsRoleGetPrimaryDomainInformation_args_out, 0, &ndr_table_dssetup },
451 static PyObject *interface_dssetup_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
453 return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_dssetup);
456 #define PY_DOC_DSSETUP "Active Directory Setup"
457 static PyTypeObject dssetup_InterfaceType = {
458 PyObject_HEAD_INIT(NULL) 0,
459 .tp_name = "dssetup.dssetup",
460 .tp_basicsize = sizeof(dcerpc_InterfaceObject),
461 .tp_doc = "dssetup(binding, lp_ctx=None, credentials=None) -> connection\n"
463 "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
464 "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
465 "credentials should be a credentials.Credentials object.\n\n"PY_DOC_DSSETUP,
466 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
467 .tp_new = interface_dssetup_new,
470 static PyMethodDef dssetup_methods[] = {
471 { NULL, NULL, 0, NULL }
474 void initdssetup(void)
477 PyObject *dep_talloc;
478 PyObject *dep_samba_dcerpc_misc;
479 PyObject *dep_samba_dcerpc_base;
481 dep_talloc = PyImport_ImportModule("talloc");
482 if (dep_talloc == NULL)
485 dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
486 if (dep_samba_dcerpc_misc == NULL)
489 dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
490 if (dep_samba_dcerpc_base == NULL)
493 Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
494 if (Object_Type == NULL)
497 GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
498 if (GUID_Type == NULL)
501 ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
502 if (ClientConnection_Type == NULL)
505 dssetup_DsRolePrimaryDomInfoBasic_Type.tp_base = Object_Type;
507 dssetup_DsRoleUpgradeStatus_Type.tp_base = Object_Type;
509 dssetup_DsRoleOpStatus_Type.tp_base = Object_Type;
511 dssetup_InterfaceType.tp_base = ClientConnection_Type;
513 if (PyType_Ready(&dssetup_DsRolePrimaryDomInfoBasic_Type) < 0)
515 if (PyType_Ready(&dssetup_DsRoleUpgradeStatus_Type) < 0)
517 if (PyType_Ready(&dssetup_DsRoleOpStatus_Type) < 0)
519 if (PyType_Ready(&dssetup_InterfaceType) < 0)
521 if (!PyInterface_AddNdrRpcMethods(&dssetup_InterfaceType, py_ndr_dssetup_methods))
524 #ifdef PY_DSROLEPRIMARYDOMINFOBASIC_PATCH
525 PY_DSROLEPRIMARYDOMINFOBASIC_PATCH(&dssetup_DsRolePrimaryDomInfoBasic_Type);
527 #ifdef PY_DSROLEUPGRADESTATUS_PATCH
528 PY_DSROLEUPGRADESTATUS_PATCH(&dssetup_DsRoleUpgradeStatus_Type);
530 #ifdef PY_DSROLEOPSTATUS_PATCH
531 PY_DSROLEOPSTATUS_PATCH(&dssetup_DsRoleOpStatus_Type);
533 #ifdef PY_DSSETUP_PATCH
534 PY_DSSETUP_PATCH(&dssetup_InterfaceType);
537 m = Py_InitModule3("dssetup", dssetup_methods, "dssetup DCE/RPC");
541 PyModule_AddObject(m, "DS_ROLE_NOT_UPGRADING", PyInt_FromLong(DS_ROLE_NOT_UPGRADING));
542 PyModule_AddObject(m, "DS_ROLE_PRIMARY_DC", PyInt_FromLong(DS_ROLE_PRIMARY_DC));
543 PyModule_AddObject(m, "DS_ROLE_OP_STATUS", PyInt_FromLong(DS_ROLE_OP_STATUS));
544 PyModule_AddObject(m, "DS_ROLE_PRIMARY_DS_MIXED_MODE", PyInt_FromLong(DS_ROLE_PRIMARY_DS_MIXED_MODE));
545 PyModule_AddObject(m, "DS_ROLE_OP_NEEDS_REBOOT", PyInt_FromLong(DS_ROLE_OP_NEEDS_REBOOT));
546 PyModule_AddObject(m, "DS_ROLE_UPGRADE_IN_PROGRESS", PyInt_FromLong(DS_ROLE_UPGRADE_IN_PROGRESS));
547 PyModule_AddObject(m, "DS_ROLE_BASIC_INFORMATION", PyInt_FromLong(DS_ROLE_BASIC_INFORMATION));
548 PyModule_AddObject(m, "DS_ROLE_UPGRADING", PyInt_FromLong(DS_ROLE_UPGRADING));
549 PyModule_AddObject(m, "DS_ROLE_PREVIOUS_BACKUP", PyInt_FromLong(DS_ROLE_PREVIOUS_BACKUP));
550 PyModule_AddObject(m, "DS_ROLE_OP_IDLE", PyInt_FromLong(DS_ROLE_OP_IDLE));
551 PyModule_AddObject(m, "DS_ROLE_OP_ACTIVE", PyInt_FromLong(DS_ROLE_OP_ACTIVE));
552 PyModule_AddObject(m, "DS_ROLE_BACKUP_DC", PyInt_FromLong(DS_ROLE_BACKUP_DC));
553 PyModule_AddObject(m, "DS_ROLE_MEMBER_WORKSTATION", PyInt_FromLong(DS_ROLE_MEMBER_WORKSTATION));
554 PyModule_AddObject(m, "DS_ROLE_UPGRADE_STATUS", PyInt_FromLong(DS_ROLE_UPGRADE_STATUS));
555 PyModule_AddObject(m, "DS_ROLE_PRIMARY_DS_RUNNING", PyInt_FromLong(DS_ROLE_PRIMARY_DS_RUNNING));
556 PyModule_AddObject(m, "DS_ROLE_STANDALONE_WORKSTATION", PyInt_FromLong(DS_ROLE_STANDALONE_WORKSTATION));
557 PyModule_AddObject(m, "DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT", PyInt_FromLong(DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT));
558 PyModule_AddObject(m, "DS_ROLE_PREVIOUS_UNKNOWN", PyInt_FromLong(DS_ROLE_PREVIOUS_UNKNOWN));
559 PyModule_AddObject(m, "DS_ROLE_STANDALONE_SERVER", PyInt_FromLong(DS_ROLE_STANDALONE_SERVER));
560 PyModule_AddObject(m, "DS_ROLE_PREVIOUS_PRIMARY", PyInt_FromLong(DS_ROLE_PREVIOUS_PRIMARY));
561 PyModule_AddObject(m, "DS_ROLE_MEMBER_SERVER", PyInt_FromLong(DS_ROLE_MEMBER_SERVER));
562 Py_INCREF((PyObject *)(void *)&dssetup_DsRolePrimaryDomInfoBasic_Type);
563 PyModule_AddObject(m, "DsRolePrimaryDomInfoBasic", (PyObject *)(void *)&dssetup_DsRolePrimaryDomInfoBasic_Type);
564 Py_INCREF((PyObject *)(void *)&dssetup_DsRoleUpgradeStatus_Type);
565 PyModule_AddObject(m, "DsRoleUpgradeStatus", (PyObject *)(void *)&dssetup_DsRoleUpgradeStatus_Type);
566 Py_INCREF((PyObject *)(void *)&dssetup_DsRoleOpStatus_Type);
567 PyModule_AddObject(m, "DsRoleOpStatus", (PyObject *)(void *)&dssetup_DsRoleOpStatus_Type);
568 Py_INCREF((PyObject *)(void *)&dssetup_InterfaceType);
569 PyModule_AddObject(m, "dssetup", (PyObject *)(void *)&dssetup_InterfaceType);
570 #ifdef PY_MOD_DSSETUP_PATCH
571 PY_MOD_DSSETUP_PATCH(m);