mirror of https://github.com/sipwise/sems.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
219 lines
4.6 KiB
219 lines
4.6 KiB
/*
|
|
* Interface wrapper code.
|
|
*
|
|
* Generated by SIP 4.5.2 (4.5.2) on Mon Dec 8 15:20:56 2008
|
|
*/
|
|
|
|
#include "sipAPIpy_sems_lib.h"
|
|
#include "sippy_sems_libAmEvent.h"
|
|
|
|
sipAmEvent::sipAmEvent(int a0): AmEvent(a0), sipPySelf(0)
|
|
{
|
|
sipTrace(SIP_TRACE_CTORS,"sipAmEvent::sipAmEvent(int) (this=0x%08x)\n",this);
|
|
|
|
sipCommonCtor(NULL,0);
|
|
}
|
|
|
|
sipAmEvent::sipAmEvent(const AmEvent& a0): AmEvent(a0), sipPySelf(0)
|
|
{
|
|
sipTrace(SIP_TRACE_CTORS,"sipAmEvent::sipAmEvent(const AmEvent&) (this=0x%08x)\n",this);
|
|
|
|
sipCommonCtor(NULL,0);
|
|
}
|
|
|
|
sipAmEvent::~sipAmEvent()
|
|
{
|
|
sipTrace(SIP_TRACE_DTORS,"sipAmEvent::~sipAmEvent() (this=0x%08x)\n",this);
|
|
|
|
sipCommonDtor(sipPySelf);
|
|
}
|
|
|
|
|
|
/* Cast a pointer to a type somewhere in its superclass hierarchy. */
|
|
extern "C" {static void *cast_AmEvent(void *, sipWrapperType *);}
|
|
static void *cast_AmEvent(void *ptr,sipWrapperType *targetClass)
|
|
{
|
|
if (targetClass == sipClass_AmEvent)
|
|
return ptr;
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* Call the instance's destructor. */
|
|
extern "C" {static void release_AmEvent(void *, int);}
|
|
static void release_AmEvent(void *ptr,int state)
|
|
{
|
|
if (state & SIP_DERIVED_CLASS)
|
|
delete reinterpret_cast<sipAmEvent *>(ptr);
|
|
else
|
|
delete reinterpret_cast<AmEvent *>(ptr);
|
|
}
|
|
|
|
|
|
extern "C" {static void dealloc_AmEvent(sipWrapper *);}
|
|
static void dealloc_AmEvent(sipWrapper *sipSelf)
|
|
{
|
|
sipTrace(SIP_TRACE_DEALLOCS,"dealloc_AmEvent()\n");
|
|
|
|
if (sipIsDerived(sipSelf))
|
|
reinterpret_cast<sipAmEvent *>(sipSelf->u.cppPtr)->sipPySelf = NULL;
|
|
|
|
if (sipIsPyOwned(sipSelf))
|
|
{
|
|
release_AmEvent(sipSelf->u.cppPtr,sipSelf->flags);
|
|
}
|
|
}
|
|
|
|
|
|
extern "C" {static void *init_AmEvent(sipWrapper *, PyObject *, sipWrapper **, int *);}
|
|
static void *init_AmEvent(sipWrapper *sipSelf,PyObject *sipArgs,sipWrapper **,int *sipArgsParsed)
|
|
{
|
|
sipAmEvent *sipCpp = 0;
|
|
|
|
sipTrace(SIP_TRACE_INITS,"init_AmEvent()\n");
|
|
|
|
if (!sipCpp)
|
|
{
|
|
int a0;
|
|
|
|
if (sipParseArgs(sipArgsParsed,sipArgs,"i",&a0))
|
|
{
|
|
sipCpp = new sipAmEvent(a0);
|
|
}
|
|
}
|
|
|
|
if (!sipCpp)
|
|
{
|
|
const AmEvent * a0;
|
|
|
|
if (sipParseArgs(sipArgsParsed,sipArgs,"JA",sipClass_AmEvent,&a0))
|
|
{
|
|
sipCpp = new sipAmEvent(*a0);
|
|
}
|
|
}
|
|
|
|
if (sipCpp)
|
|
sipCpp->sipPySelf = sipSelf;
|
|
|
|
return sipCpp;
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *var_AmEvent_processed(PyObject *, PyObject *);}
|
|
static PyObject *var_AmEvent_processed(PyObject *sipSelf,PyObject *sipPy)
|
|
{
|
|
bool sipVal;
|
|
AmEvent *sipCpp = reinterpret_cast<AmEvent *>(sipGetCppPtr((sipWrapper *)sipSelf,sipClass_AmEvent));
|
|
|
|
if (!sipCpp)
|
|
return NULL;
|
|
|
|
if (sipPy == NULL)
|
|
{
|
|
sipVal = sipCpp->processed;
|
|
|
|
sipPy = PyBool_FromLong(sipVal);
|
|
|
|
return sipPy;
|
|
}
|
|
|
|
sipVal = (bool)PyInt_AsLong(sipPy);
|
|
|
|
if (PyErr_Occurred() != NULL)
|
|
{
|
|
sipBadSetType(sipNm_py_sems_lib_AmEvent,sipNm_py_sems_lib_processed);
|
|
return NULL;
|
|
}
|
|
|
|
sipCpp->processed = sipVal;
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
|
|
|
|
extern "C" {static PyObject *var_AmEvent_event_id(PyObject *, PyObject *);}
|
|
static PyObject *var_AmEvent_event_id(PyObject *sipSelf,PyObject *sipPy)
|
|
{
|
|
int sipVal;
|
|
AmEvent *sipCpp = reinterpret_cast<AmEvent *>(sipGetCppPtr((sipWrapper *)sipSelf,sipClass_AmEvent));
|
|
|
|
if (!sipCpp)
|
|
return NULL;
|
|
|
|
if (sipPy == NULL)
|
|
{
|
|
sipVal = sipCpp->event_id;
|
|
|
|
sipPy = PyInt_FromLong(sipVal);
|
|
|
|
return sipPy;
|
|
}
|
|
|
|
sipVal = (int)PyInt_AsLong(sipPy);
|
|
|
|
if (PyErr_Occurred() != NULL)
|
|
{
|
|
sipBadSetType(sipNm_py_sems_lib_AmEvent,sipNm_py_sems_lib_event_id);
|
|
return NULL;
|
|
}
|
|
|
|
sipCpp->event_id = sipVal;
|
|
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
|
|
PyMethodDef variables_AmEvent[] = {
|
|
{sipNm_py_sems_lib_processed, var_AmEvent_processed, 0, NULL},
|
|
{sipNm_py_sems_lib_event_id, var_AmEvent_event_id, 0, NULL},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
|
|
extern "C" {static void *forceConvertTo_AmEvent(PyObject *, int *);}
|
|
static void *forceConvertTo_AmEvent(PyObject *valobj,int *iserrp)
|
|
{
|
|
if (*iserrp || valobj == NULL)
|
|
return NULL;
|
|
|
|
if (valobj == Py_None || sipIsSubClassInstance(valobj,sipClass_AmEvent))
|
|
return sipConvertToCpp(valobj,sipClass_AmEvent,iserrp);
|
|
|
|
sipBadClass(sipNm_py_sems_lib_AmEvent);
|
|
|
|
*iserrp = 1;
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
sipTypeDef sipType_py_sems_lib_AmEvent = {
|
|
0,
|
|
SIP_TYPE_SCC,
|
|
"py_sems_lib.AmEvent",
|
|
0,
|
|
{0, 0, 1},
|
|
0,
|
|
0,
|
|
0, 0,
|
|
0, 0,
|
|
variables_AmEvent,
|
|
init_AmEvent,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
dealloc_AmEvent,
|
|
cast_AmEvent,
|
|
release_AmEvent,
|
|
forceConvertTo_AmEvent,
|
|
0,
|
|
0,
|
|
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
|
0
|
|
};
|