/*
 * Module code.
 *
 * Generated by SIP 4.18.1
 */

#include "sipAPIsolid.h"

#line 58 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/solid/deviceinterface.sip"
#include <deviceinterface.h>
#line 12 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"

#line 31 "/usr/share/python3-sip/PyQt4/QtCore/qstring.sip"
#include <qstring.h>
#line 16 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 26 "/usr/share/python3-sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 19 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 368 "/usr/share/python3-sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 22 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 351 "/usr/share/python3-sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 25 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 29 "/usr/share/python3-sip/PyQt4/QtCore/qobject.sip"
#include <qobject.h>
#line 28 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 269 "/usr/share/python3-sip/PyQt4/QtCore/qvariant.sip"
#include <qvariant.h>
#line 31 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 28 "/usr/share/python3-sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#line 34 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 32 "/usr/share/python3-sip/PyQt4/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 37 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 30 "/usr/share/python3-sip/PyQt4/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 40 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 115 "/usr/share/python3-sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#line 43 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 26 "/usr/share/python3-sip/PyQt4/QtCore/qthread.sip"
#include <qthread.h>
#line 46 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 30 "/usr/share/python3-sip/PyQt4/QtCore/qregexp.sip"
#include <qregexp.h>
#line 49 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/solid/sipsolidpart7.cpp"
#line 26 "/usr/share/python3-sip/PyQt4/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 52 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/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;

    {
        const 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;
}


/* Call the instance's destructor. */
extern "C" {static void release_Solid_DeviceInterface(void *, int);}
static void release_Solid_DeviceInterface(void *sipCppV,int)
{
    Solid::DeviceInterface *sipCpp = reinterpret_cast<Solid::DeviceInterface *>(sipCppV);

    Py_BEGIN_ALLOW_THREADS

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();

    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[] = {{141, 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, static_cast<int>(Solid::DeviceInterface::AcAdapter), 19},
    {sipName_AudioInterface, static_cast<int>(Solid::DeviceInterface::AudioInterface), 19},
    {sipName_Battery, static_cast<int>(Solid::DeviceInterface::Battery), 19},
    {sipName_Block, static_cast<int>(Solid::DeviceInterface::Block), 19},
    {sipName_Button, static_cast<int>(Solid::DeviceInterface::Button), 19},
    {sipName_Camera, static_cast<int>(Solid::DeviceInterface::Camera), 19},
    {sipName_DvbInterface, static_cast<int>(Solid::DeviceInterface::DvbInterface), 19},
    {sipName_GenericInterface, static_cast<int>(Solid::DeviceInterface::GenericInterface), 19},
    {sipName_InternetGateway, static_cast<int>(Solid::DeviceInterface::InternetGateway), 19},
    {sipName_Last, static_cast<int>(Solid::DeviceInterface::Last), 19},
    {sipName_NetworkInterface, static_cast<int>(Solid::DeviceInterface::NetworkInterface), 19},
    {sipName_NetworkShare, static_cast<int>(Solid::DeviceInterface::NetworkShare), 19},
    {sipName_OpticalDisc, static_cast<int>(Solid::DeviceInterface::OpticalDisc), 19},
    {sipName_OpticalDrive, static_cast<int>(Solid::DeviceInterface::OpticalDrive), 19},
    {sipName_PortableMediaPlayer, static_cast<int>(Solid::DeviceInterface::PortableMediaPlayer), 19},
    {sipName_Processor, static_cast<int>(Solid::DeviceInterface::Processor), 19},
    {sipName_SerialInterface, static_cast<int>(Solid::DeviceInterface::SerialInterface), 19},
    {sipName_SmartCardReader, static_cast<int>(Solid::DeviceInterface::SmartCardReader), 19},
    {sipName_StorageAccess, static_cast<int>(Solid::DeviceInterface::StorageAccess), 19},
    {sipName_StorageDrive, static_cast<int>(Solid::DeviceInterface::StorageDrive), 19},
    {sipName_StorageVolume, static_cast<int>(Solid::DeviceInterface::StorageVolume), 19},
    {sipName_Unknown, static_cast<int>(Solid::DeviceInterface::Unknown), 19},
    {sipName_Video, static_cast<int>(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,
    0,
    0,
    0,
    0,
    0,
    0,
    0
},
    &Solid::DeviceInterface::staticMetaObject,
    0,
    0
};



static sipEnumMemberDef enummembers_Solid[] = {
    {sipName_DeviceBusy, static_cast<int>(Solid::DeviceBusy), 23},
    {sipName_InvalidOption, static_cast<int>(Solid::InvalidOption), 23},
    {sipName_MissingDriver, static_cast<int>(Solid::MissingDriver), 23},
    {sipName_NoError, static_cast<int>(Solid::NoError), 23},
    {sipName_OperationFailed, static_cast<int>(Solid::OperationFailed), 23},
    {sipName_UnauthorizedOperation, static_cast<int>(Solid::UnauthorizedOperation), 23},
    {sipName_UserCanceled, static_cast<int>(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
},
    0,
    0,
    0
};
