mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
s4:pyrpc: add base.bind_time_features_syntax(features)
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
parent
e1498ac674
commit
8c9612e114
@ -398,6 +398,45 @@ static PyTypeObject py_transfer_syntax_ndr64_SyntaxType = {
|
||||
.tp_new = py_transfer_syntax_ndr64_new,
|
||||
};
|
||||
|
||||
static PyObject *py_bind_time_features_syntax_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||
{
|
||||
const char *kwnames[] = {
|
||||
"features", NULL
|
||||
};
|
||||
unsigned long long features = 0;
|
||||
struct ndr_syntax_id syntax;
|
||||
PyObject *args2 = Py_None;
|
||||
PyObject *kwargs2 = Py_None;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "K:features", discard_const_p(char *, kwnames), &features)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
args2 = Py_BuildValue("()");
|
||||
if (args2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
kwargs2 = Py_BuildValue("{}");
|
||||
if (kwargs2 == NULL) {
|
||||
Py_DECREF(args2);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
syntax = dcerpc_construct_bind_time_features(features);
|
||||
|
||||
return py_dcerpc_syntax_init_helper(type, args2, kwargs2, &syntax);
|
||||
}
|
||||
|
||||
static PyTypeObject py_bind_time_features_syntax_SyntaxType = {
|
||||
PyObject_HEAD_INIT(NULL) 0,
|
||||
.tp_name = "base.bind_time_features_syntax",
|
||||
.tp_basicsize = sizeof(pytalloc_Object),
|
||||
.tp_doc = "bind_time_features_syntax(features)\n",
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
|
||||
.tp_new = py_bind_time_features_syntax_new,
|
||||
};
|
||||
|
||||
void initbase(void)
|
||||
{
|
||||
PyObject *m;
|
||||
@ -413,6 +452,7 @@ void initbase(void)
|
||||
|
||||
py_transfer_syntax_ndr_SyntaxType.tp_base = ndr_syntax_id_Type;
|
||||
py_transfer_syntax_ndr64_SyntaxType.tp_base = ndr_syntax_id_Type;
|
||||
py_bind_time_features_syntax_SyntaxType.tp_base = ndr_syntax_id_Type;
|
||||
|
||||
if (PyType_Ready(&dcerpc_InterfaceType) < 0)
|
||||
return;
|
||||
@ -421,6 +461,8 @@ void initbase(void)
|
||||
return;
|
||||
if (PyType_Ready(&py_transfer_syntax_ndr64_SyntaxType) < 0)
|
||||
return;
|
||||
if (PyType_Ready(&py_bind_time_features_syntax_SyntaxType) < 0)
|
||||
return;
|
||||
|
||||
m = Py_InitModule3("base", NULL, "DCE/RPC protocol implementation");
|
||||
if (m == NULL)
|
||||
@ -433,4 +475,6 @@ void initbase(void)
|
||||
PyModule_AddObject(m, "transfer_syntax_ndr", (PyObject *)(void *)&py_transfer_syntax_ndr_SyntaxType);
|
||||
Py_INCREF((PyObject *)(void *)&py_transfer_syntax_ndr64_SyntaxType);
|
||||
PyModule_AddObject(m, "transfer_syntax_ndr64", (PyObject *)(void *)&py_transfer_syntax_ndr64_SyntaxType);
|
||||
Py_INCREF((PyObject *)(void *)&py_bind_time_features_syntax_SyntaxType);
|
||||
PyModule_AddObject(m, "bind_time_features_syntax", (PyObject *)(void *)&py_bind_time_features_syntax_SyntaxType);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user