/*
 * Module code.
 *
 * Generated by SIP 4.12.4 on Fri Dec 30 00:41:20 2011
 */

#include "sipAPIsolid.h"

#line 58 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/deviceinterface.sip"
#include <deviceinterface.h>
#line 12 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"

#line 36 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 16 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 19 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 310 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 22 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 298 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 25 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 34 "/usr/local/share/py-sip/QtCore/qobject.sip"
#include <qobject.h>
#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 238 "/usr/local/share/py-sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 31 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 33 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 34 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 37 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 35 "/usr/local/share/py-sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 40 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 120 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 43 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qthread.sip"
#include <qthread.h>
#line 46 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 35 "/usr/local/share/py-sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 49 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 52 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart7.cpp"


extern "C" {static PyObject *meth_Solid_DeviceInterface_isValid(PyObject *, PyObject *);}
static PyObject *meth_Solid_DeviceInterface_isValid(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        Solid::DeviceInterface *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Solid_DeviceInterface, &sipCpp))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->isValid();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_DeviceInterface, sipName_isValid, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_Solid_DeviceInterface_typeToString(PyObject *, PyObject *);}
static PyObject *meth_Solid_DeviceInterface_typeToString(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        Solid::DeviceInterface::Type a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "E", sipType_Solid_DeviceInterface_Type, &a0))
        {
            QString *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(Solid::DeviceInterface::typeToString(a0));
            Py_END_ALLOW_THREADS

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_DeviceInterface, sipName_typeToString, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_Solid_DeviceInterface_stringToType(PyObject *, PyObject *);}
static PyObject *meth_Solid_DeviceInterface_stringToType(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const QString * a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString,&a0, &a0State))
        {
            Solid::DeviceInterface::Type sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = Solid::DeviceInterface::stringToType(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

            return sipConvertFromEnum(sipRes,sipType_Solid_DeviceInterface_Type);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_DeviceInterface, sipName_stringToType, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_Solid_DeviceInterface_typeDescription(PyObject *, PyObject *);}
static PyObject *meth_Solid_DeviceInterface_typeDescription(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        Solid::DeviceInterface::Type a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "E", sipType_Solid_DeviceInterface_Type, &a0))
        {
            QString *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(Solid::DeviceInterface::typeDescription(a0));
            Py_END_ALLOW_THREADS

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_DeviceInterface, sipName_typeDescription, NULL);

    return NULL;
}


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

    if (targetType == sipType_Solid_DeviceInterface)
        return ptr;

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

    return NULL;
}


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

    delete reinterpret_cast<Solid::DeviceInterface *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_Solid_DeviceInterface(sipSimpleWrapper *);}
static void dealloc_Solid_DeviceInterface(sipSimpleWrapper *sipSelf)
{
    if (sipIsPyOwned(sipSelf))
    {
        release_Solid_DeviceInterface(sipGetAddress(sipSelf),0);
    }
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_Solid_DeviceInterface[] = {{134, 0, 1}};


static PyMethodDef methods_Solid_DeviceInterface[] = {
    {SIP_MLNAME_CAST(sipName_isValid), meth_Solid_DeviceInterface_isValid, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_stringToType), meth_Solid_DeviceInterface_stringToType, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_typeDescription), meth_Solid_DeviceInterface_typeDescription, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_typeToString), meth_Solid_DeviceInterface_typeToString, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_Solid_DeviceInterface[] = {
    {sipName_AcAdapter, Solid::DeviceInterface::AcAdapter, 19},
    {sipName_AudioInterface, Solid::DeviceInterface::AudioInterface, 19},
    {sipName_Battery, Solid::DeviceInterface::Battery, 19},
    {sipName_Block, Solid::DeviceInterface::Block, 19},
    {sipName_Button, Solid::DeviceInterface::Button, 19},
    {sipName_Camera, Solid::DeviceInterface::Camera, 19},
    {sipName_DvbInterface, Solid::DeviceInterface::DvbInterface, 19},
    {sipName_GenericInterface, Solid::DeviceInterface::GenericInterface, 19},
    {sipName_InternetGateway, Solid::DeviceInterface::InternetGateway, 19},
    {sipName_Last, Solid::DeviceInterface::Last, 19},
    {sipName_NetworkInterface, Solid::DeviceInterface::NetworkInterface, 19},
    {sipName_NetworkShare, Solid::DeviceInterface::NetworkShare, 19},
    {sipName_OpticalDisc, Solid::DeviceInterface::OpticalDisc, 19},
    {sipName_OpticalDrive, Solid::DeviceInterface::OpticalDrive, 19},
    {sipName_PortableMediaPlayer, Solid::DeviceInterface::PortableMediaPlayer, 19},
    {sipName_Processor, Solid::DeviceInterface::Processor, 19},
    {sipName_SerialInterface, Solid::DeviceInterface::SerialInterface, 19},
    {sipName_SmartCardReader, Solid::DeviceInterface::SmartCardReader, 19},
    {sipName_StorageAccess, Solid::DeviceInterface::StorageAccess, 19},
    {sipName_StorageDrive, Solid::DeviceInterface::StorageDrive, 19},
    {sipName_StorageVolume, Solid::DeviceInterface::StorageVolume, 19},
    {sipName_Unknown, Solid::DeviceInterface::Unknown, 19},
    {sipName_Video, Solid::DeviceInterface::Video, 19},
};


pyqt4ClassTypeDef sipTypeDef_solid_Solid_DeviceInterface = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_Solid__DeviceInterface,
        {0}
    },
    {
        sipNameNr_DeviceInterface,
        {3, 255, 0},
        4, methods_Solid_DeviceInterface,
        23, enummembers_Solid_DeviceInterface,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_Solid_DeviceInterface,
    0,
    0,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Solid_DeviceInterface,
    0,
    0,
    0,
    release_Solid_DeviceInterface,
    cast_Solid_DeviceInterface,
    0,
    0,
    0
},
    &Solid::DeviceInterface::staticMetaObject,
    0,
    0
};



static sipEnumMemberDef enummembers_Solid[] = {
    {sipName_DeviceBusy, Solid::DeviceBusy, 23},
    {sipName_InvalidOption, Solid::InvalidOption, 23},
    {sipName_MissingDriver, Solid::MissingDriver, 23},
    {sipName_NoError, Solid::NoError, 23},
    {sipName_OperationFailed, Solid::OperationFailed, 23},
    {sipName_UnauthorizedOperation, Solid::UnauthorizedOperation, 23},
    {sipName_UserCanceled, Solid::UserCanceled, 23},
};


pyqt4ClassTypeDef sipTypeDef_solid_Solid = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_NAMESPACE,
        sipNameNr_Solid,
        {0}
    },
    {
        sipNameNr_Solid,
        {0, 0, 1},
        0, 0,
        7, enummembers_Solid,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    0,
    0,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0
},
    0,
    0,
    0
};
