
/* Python wrapper functions auto-generated by pidl */
#include <Python.h>
#include "includes.h"
#include <pytalloc.h>
#include "librpc/rpc/pyrpc.h"
#include "librpc/rpc/pyrpc_util.h"
#include "autoconf/librpc/gen_ndr/ndr_audiosrv.h"
#include "autoconf/librpc/gen_ndr/ndr_audiosrv_c.h"

staticforward PyTypeObject audiosrv_InterfaceType;

void initaudiosrv(void);static PyTypeObject *ClientConnection_Type;

const struct PyNdrRpcMethodDef py_ndr_audiosrv_methods[] = {
	{ NULL }
};

static PyObject *interface_audiosrv_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_audiosrv);
}

#define PY_DOC_AUDIOSRV "Audio Server"
static PyTypeObject audiosrv_InterfaceType = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "audiosrv.audiosrv",
	.tp_basicsize = sizeof(dcerpc_InterfaceObject),
	.tp_doc = "audiosrv(binding, lp_ctx=None, credentials=None) -> connection\n"
"\n"
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
"credentials should be a credentials.Credentials object.\n\n"PY_DOC_AUDIOSRV,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = interface_audiosrv_new,
};

static PyMethodDef audiosrv_methods[] = {
	{ NULL, NULL, 0, NULL }
};

void initaudiosrv(void)
{
	PyObject *m;
	PyObject *dep_samba_dcerpc_base;

	dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
	if (dep_samba_dcerpc_base == NULL)
		return;

	ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
	if (ClientConnection_Type == NULL)
		return;

	audiosrv_InterfaceType.tp_base = ClientConnection_Type;

	if (PyType_Ready(&audiosrv_InterfaceType) < 0)
		return;
	if (!PyInterface_AddNdrRpcMethods(&audiosrv_InterfaceType, py_ndr_audiosrv_methods))
		return;

#ifdef PY_AUDIOSRV_PATCH
	PY_AUDIOSRV_PATCH(&audiosrv_InterfaceType);
#endif

	m = Py_InitModule3("audiosrv", audiosrv_methods, "audiosrv DCE/RPC");
	if (m == NULL)
		return;

	Py_INCREF((PyObject *)(void *)&audiosrv_InterfaceType);
	PyModule_AddObject(m, "audiosrv", (PyObject *)(void *)&audiosrv_InterfaceType);
#ifdef PY_MOD_AUDIOSRV_PATCH
	PY_MOD_AUDIOSRV_PATCH(m);
#endif

}
