/*
 * Module code.
 *
 * Generated by SIP 4.8.2 on Sun Oct 11 20:27:58 2009
 */

#include "sipAPIpolkitqt.h"

#line 31 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.3.1/python/pykde4/sip/polkitqt/context.sip"
#include <PolicyKit/polkit-qt/context.h>
#line 12 "sippolkitqtpart1.cpp"

#line 46 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 16 "sippolkitqtpart1.cpp"
#line 42 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 19 "sippolkitqtpart1.cpp"
#line 297 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 22 "sippolkitqtpart1.cpp"
#line 284 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 25 "sippolkitqtpart1.cpp"
#line 45 "/usr/local/share/py-sip/QtCore/qobject.sip"
#include <qobject.h>
#line 28 "sippolkitqtpart1.cpp"
#line 46 "/usr/local/share/py-sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 31 "sippolkitqtpart1.cpp"
#line 328 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#include <qpair.h>
#line 424 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#include <qpair.h>
#line 637 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 699 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 721 "/usr/local/share/py-sip/QtCore/qlocale.sip"
#include <qlocale.h>
#line 43 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 43 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 130 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 43 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 43 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 43 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 210 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#include <qpair.h>
#line 210 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#include <qpair.h>
#line 62 "sippolkitqtpart1.cpp"
#line 42 "/usr/local/share/py-sip/QtCore/qfileinfo.sip"
#include <qfileinfo.h>
#line 65 "sippolkitqtpart1.cpp"
#line 42 "/usr/local/share/py-sip/QtCore/qabstractitemmodel.sip"
#include <qabstractitemmodel.h>
#line 68 "sippolkitqtpart1.cpp"
#line 48 "/usr/local/share/py-sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 71 "sippolkitqtpart1.cpp"
#line 46 "/usr/local/share/py-sip/QtCore/qurl.sip"
#include <qurl.h>
#line 74 "sippolkitqtpart1.cpp"
#line 46 "/usr/local/share/py-sip/QtCore/qlocale.sip"
#include <qlocale.h>
#line 77 "sippolkitqtpart1.cpp"
#line 45 "/usr/local/share/py-sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 80 "sippolkitqtpart1.cpp"
#line 42 "/usr/local/share/py-sip/QtCore/qthread.sip"
#include <qthread.h>
#line 83 "sippolkitqtpart1.cpp"
#line 46 "/usr/local/share/py-sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 86 "sippolkitqtpart1.cpp"
#line 42 "/usr/local/share/py-sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 89 "sippolkitqtpart1.cpp"


extern "C" {static PyObject *meth_PolkitQt_Context_hasError(PyObject *, PyObject *);}
static PyObject *meth_PolkitQt_Context_hasError(PyObject *sipSelf,PyObject *sipArgs)
{
    int sipArgsParsed = 0;

    {
        PolkitQt::Context *sipCpp;

        if (sipParseArgs(&sipArgsParsed,sipArgs,"B",&sipSelf,sipType_PolkitQt_Context,&sipCpp))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->hasError();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipArgsParsed,sipName_Context,sipName_hasError);

    return NULL;
}


extern "C" {static PyObject *meth_PolkitQt_Context_lastError(PyObject *, PyObject *);}
static PyObject *meth_PolkitQt_Context_lastError(PyObject *sipSelf,PyObject *sipArgs)
{
    int sipArgsParsed = 0;

    {
        PolkitQt::Context *sipCpp;

        if (sipParseArgs(&sipArgsParsed,sipArgs,"B",&sipSelf,sipType_PolkitQt_Context,&sipCpp))
        {
            QString *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(sipCpp->lastError());
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QString,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipArgsParsed,sipName_Context,sipName_lastError);

    return NULL;
}


/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_PolkitQt_Context(void *, const sipTypeDef *);}
static void *cast_PolkitQt_Context(void *ptr,const sipTypeDef *targetType)
{
    void *res;

    if (targetType == sipType_PolkitQt_Context)
        return ptr;

    if ((res = ((const sipClassTypeDef *)sipType_QObject)->ctd_cast((QObject *)(PolkitQt::Context *)ptr,targetType)) != NULL)
        return res;

    return NULL;
}


/* Call the instance's destructor. */
extern "C" {static void release_PolkitQt_Context(void *, int);}
static void release_PolkitQt_Context(void *sipCppV,int)
{
    Py_BEGIN_ALLOW_THREADS

    delete reinterpret_cast<PolkitQt::Context *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_PolkitQt_Context(sipSimpleWrapper *);}
static void dealloc_PolkitQt_Context(sipSimpleWrapper *sipSelf)
{
    if (sipIsPyOwned(sipSelf))
    {
        release_PolkitQt_Context(sipSelf->u.cppPtr,0);
    }
}


/* Define this type's super-types. */
static sipEncodedClassDef supers_PolkitQt_Context[] = {{111, 0, 1}};


static PyMethodDef methods_PolkitQt_Context[] = {
    {SIP_MLNAME_CAST(sipName_hasError), meth_PolkitQt_Context_hasError, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_lastError), meth_PolkitQt_Context_lastError, METH_VARARGS, NULL}
};


/* Define this type's PyQt4 signals. */
static const pyqt4QtSignal pyqt4_signals_PolkitQt_Context[] = {
    {"consoleKitDBChanged()", 0},
    {"configChanged()", 0},
    {0, 0}
};


pyqt4ClassTypeDef pyqt4Type_polkitqt_PolkitQt_Context = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_PolkitQt__Context,
        {0}
    },
    sipNameNr_Context,
    -1,
    -1,
    {0, 255, 0},
    supers_PolkitQt_Context,
    0,
    2, methods_PolkitQt_Context,
    0, 0,
    0, 0,
    0,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_PolkitQt_Context,
    release_PolkitQt_Context,
    cast_PolkitQt_Context,
    0,
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    0,
    0
},
    0,
    &PolkitQt::Context::staticMetaObject,
    0,
    pyqt4_signals_PolkitQt_Context
};
