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

#include "sipAPIsolid.h"

#line 65 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/powermanagement.sip"
#include <qset.h>
#include <powermanagement.h>
#line 13 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"



extern "C" {static void assign_QSet_0100Solid_PowerManagement_SleepState(void *, SIP_SSIZE_T, const void *);}
static void assign_QSet_0100Solid_PowerManagement_SleepState(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<QSet<Solid::PowerManagement::SleepState> *>(sipDst)[sipDstIdx] = *reinterpret_cast<const QSet<Solid::PowerManagement::SleepState> *>(sipSrc);
}


extern "C" {static void *array_QSet_0100Solid_PowerManagement_SleepState(SIP_SSIZE_T);}
static void *array_QSet_0100Solid_PowerManagement_SleepState(SIP_SSIZE_T sipNrElem)
{
    return new QSet<Solid::PowerManagement::SleepState>[sipNrElem];
}


extern "C" {static void *copy_QSet_0100Solid_PowerManagement_SleepState(const void *, SIP_SSIZE_T);}
static void *copy_QSet_0100Solid_PowerManagement_SleepState(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new QSet<Solid::PowerManagement::SleepState>(reinterpret_cast<const QSet<Solid::PowerManagement::SleepState> *>(sipSrc)[sipSrcIdx]);
}


/* Call the mapped type's destructor. */
extern "C" {static void release_QSet_0100Solid_PowerManagement_SleepState(void *, int);}
static void release_QSet_0100Solid_PowerManagement_SleepState(void *ptr, int)
{
    Py_BEGIN_ALLOW_THREADS
    delete reinterpret_cast<QSet<Solid::PowerManagement::SleepState> *>(ptr);
    Py_END_ALLOW_THREADS
}



extern "C" {static int convertTo_QSet_0100Solid_PowerManagement_SleepState(PyObject *, void **, int *, PyObject *);}
static int convertTo_QSet_0100Solid_PowerManagement_SleepState(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    QSet<Solid::PowerManagement::SleepState> **sipCppPtr = reinterpret_cast<QSet<Solid::PowerManagement::SleepState> **>(sipCppPtrV);

#line 104 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/powermanagement.sip"
    // Check the type if that is all that is required.
    if (sipIsErr == NULL)
    {
        if (!PyList_Check(sipPy))
            return 0;
    }

    // Check the type if that is all that is required.
    if (sipIsErr == NULL)
    {
        if (!PyList_Check(sipPy))
            return 0;
    }

    QSet<Solid::PowerManagement::SleepState> *qs = new QSet<Solid::PowerManagement::SleepState>;
 
    for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
    {
#if PY_MAJOR_VERSION >= 3
        Solid::PowerManagement::SleepState t = (Solid::PowerManagement::SleepState)PyLong_AsLong (PyList_GET_ITEM (sipPy, i));
#else
        Solid::PowerManagement::SleepState t = (Solid::PowerManagement::SleepState)PyInt_AS_LONG (PyList_GET_ITEM (sipPy, i));
#endif
        *qs << t;

    }
 
    *sipCppPtr = qs;
 
    return sipGetState(sipTransferObj);
#line 85 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
}


extern "C" {static PyObject *convertFrom_QSet_0100Solid_PowerManagement_SleepState(void *, PyObject *);}
static PyObject *convertFrom_QSet_0100Solid_PowerManagement_SleepState(void *sipCppV,PyObject *)
{
   QSet<Solid::PowerManagement::SleepState> *sipCpp = reinterpret_cast<QSet<Solid::PowerManagement::SleepState> *>(sipCppV);

#line 70 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/powermanagement.sip"
    // Create the list.
    PyObject *l;

    if ((l = PyList_New(sipCpp->size())) == NULL)
        return NULL;

    // Set the list elements.
    QSet<Solid::PowerManagement::SleepState> set = *sipCpp;
    int i = 0;
    foreach (Solid::PowerManagement::SleepState value, set)
    {
#if PY_MAJOR_VERSION >= 3
        PyObject *obj = PyLong_FromLong ((long) value);
#else
        PyObject *obj = PyInt_FromLong ((long) value);
#endif
        if (obj == NULL || PyList_SET_ITEM (l, i, obj) < 0)
        {
            Py_DECREF(l);

            if (obj)
                Py_DECREF(obj);

            return NULL;
        }

        Py_DECREF(obj);
        i++;
    }
   
    return l;
#line 126 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
}


sipMappedTypeDef sipTypeDef_solid_QSet_0100Solid_PowerManagement_SleepState = {
    {
        -1,
        0,
        0,
        SIP_TYPE_MAPPED,
        sipNameNr_85,
        {0}
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_QSet_0100Solid_PowerManagement_SleepState,
    array_QSet_0100Solid_PowerManagement_SleepState,
    copy_QSet_0100Solid_PowerManagement_SleepState,
    release_QSet_0100Solid_PowerManagement_SleepState,
    convertTo_QSet_0100Solid_PowerManagement_SleepState,
    convertFrom_QSet_0100Solid_PowerManagement_SleepState
};


#line 65 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/powermanagement.sip"
#include <qset.h>
#include <powermanagement.h>
#line 159 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 34 "/usr/local/share/py-sip/QtCore/qobject.sip"
#include <qobject.h>
#line 162 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 165 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"


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

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "i", &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = Solid::PowerManagement::stopSuppressingScreenPowerManagement(a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const QString& a0def = QString();
        const QString * a0 = &a0def;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "|J1", sipType_QString,&a0, &a0State))
        {
            int sipRes;

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

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "i", &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = Solid::PowerManagement::stopSuppressingSleep(a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const QString& a0def = QString();
        const QString * a0 = &a0def;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "|J1", sipType_QString,&a0, &a0State))
        {
            int sipRes;

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

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        Solid::PowerManagement::SleepState a0;
        QObject * a1;
        const char * a2;
        PyObject *a2Keep;

        if (sipParseArgs(&sipParseErr, sipArgs, "EJ8AA", sipType_Solid_PowerManagement_SleepState, &a0, sipType_QObject, &a1, &a2Keep, &a2))
        {
            Py_BEGIN_ALLOW_THREADS
            Solid::PowerManagement::requestSleep(a0,a1,a2);
            Py_END_ALLOW_THREADS
            Py_DECREF(a2Keep);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            QSet<Solid::PowerManagement::SleepState> *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QSet<Solid::PowerManagement::SleepState>(Solid::PowerManagement::supportedSleepStates());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = Solid::PowerManagement::appShouldConserveResources();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


static PyMethodDef methods_Solid_PowerManagement[] = {
    {SIP_MLNAME_CAST(sipName_appShouldConserveResources), meth_Solid_PowerManagement_appShouldConserveResources, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_beginSuppressingScreenPowerManagement), meth_Solid_PowerManagement_beginSuppressingScreenPowerManagement, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_beginSuppressingSleep), meth_Solid_PowerManagement_beginSuppressingSleep, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_requestSleep), meth_Solid_PowerManagement_requestSleep, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_stopSuppressingScreenPowerManagement), meth_Solid_PowerManagement_stopSuppressingScreenPowerManagement, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_stopSuppressingSleep), meth_Solid_PowerManagement_stopSuppressingSleep, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_supportedSleepStates), meth_Solid_PowerManagement_supportedSleepStates, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_Solid_PowerManagement[] = {
    {sipName_HibernateState, Solid::PowerManagement::HibernateState, 45},
    {sipName_StandbyState, Solid::PowerManagement::StandbyState, 45},
    {sipName_SuspendState, Solid::PowerManagement::SuspendState, 45},
};


pyqt4ClassTypeDef sipTypeDef_solid_Solid_PowerManagement = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_NAMESPACE,
        sipNameNr_Solid__PowerManagement,
        {0}
    },
    {
        sipNameNr_PowerManagement,
        {3, 255, 0},
        7, methods_Solid_PowerManagement,
        3, enummembers_Solid_PowerManagement,
        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
};

#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/portablemediaplayer.sip"
#include <portablemediaplayer.h>
#line 431 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"

#line 34 "/usr/local/share/py-sip/QtCore/qobject.sip"
#include <qobject.h>
#line 435 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 238 "/usr/local/share/py-sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 438 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 441 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 444 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 58 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/deviceinterface.sip"
#include <deviceinterface.h>
#line 447 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 450 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 310 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 453 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 298 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 456 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 33 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 459 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 462 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 35 "/usr/local/share/py-sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 465 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 120 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 468 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qthread.sip"
#include <qthread.h>
#line 471 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 35 "/usr/local/share/py-sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 474 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 477 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"


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

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = Solid::PortableMediaPlayer::deviceInterfaceType();
            Py_END_ALLOW_THREADS

            return sipConvertFromEnum(sipRes,sipType_Solid_DeviceInterface_Type);
        }
    }

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

    return NULL;
}


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

    {
        Solid::PortableMediaPlayer *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Solid_PortableMediaPlayer, &sipCpp))
        {
            QStringList *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QStringList(sipCpp->supportedProtocols());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        QString a0def = QString();
        QString * a0 = &a0def;
        int a0State = 0;
        Solid::PortableMediaPlayer *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B|J1", &sipSelf, sipType_Solid_PortableMediaPlayer, &sipCpp, sipType_QString,&a0, &a0State))
        {
            QStringList *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QStringList(sipCpp->supportedDrivers(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_QString,a0State);

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

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

    return NULL;
}


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

    {
        const QString * a0;
        int a0State = 0;
        Solid::PortableMediaPlayer *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_Solid_PortableMediaPlayer, &sipCpp, sipType_QString,&a0, &a0State))
        {
            QVariant *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QVariant(sipCpp->driverHandle(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

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

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

    return NULL;
}


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

    if (targetType == sipType_Solid_PortableMediaPlayer)
        return ptr;

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

    return NULL;
}


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

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

    Py_END_ALLOW_THREADS
}


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


/* Define this type's super-types. */
static sipEncodedTypeDef supers_Solid_PortableMediaPlayer[] = {{18, 255, 1}};


static PyMethodDef methods_Solid_PortableMediaPlayer[] = {
    {SIP_MLNAME_CAST(sipName_deviceInterfaceType), meth_Solid_PortableMediaPlayer_deviceInterfaceType, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_driverHandle), meth_Solid_PortableMediaPlayer_driverHandle, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_supportedDrivers), meth_Solid_PortableMediaPlayer_supportedDrivers, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_supportedProtocols), meth_Solid_PortableMediaPlayer_supportedProtocols, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_solid_Solid_PortableMediaPlayer = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_Solid__PortableMediaPlayer,
        {0}
    },
    {
        sipNameNr_PortableMediaPlayer,
        {3, 255, 0},
        4, methods_Solid_PortableMediaPlayer,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_Solid_PortableMediaPlayer,
    0,
    0,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Solid_PortableMediaPlayer,
    0,
    0,
    0,
    release_Solid_PortableMediaPlayer,
    cast_Solid_PortableMediaPlayer,
    0,
    0,
    0
},
    &Solid::PortableMediaPlayer::staticMetaObject,
    0,
    0
};

#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/opticaldrive.sip"
#include <opticaldrive.h>
#line 695 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"

#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/opticaldrive.sip"
#include <opticaldrive.h>
#line 699 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"


extern "C" {static int slot_Solid_OpticalDrive_MediumTypes___bool__(PyObject *);}
static int slot_Solid_OpticalDrive_MediumTypes___bool__(PyObject *sipSelf)
{
    Solid::OpticalDrive::MediumTypes *sipCpp = reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Solid_OpticalDrive_MediumTypes));

    if (!sipCpp)
        return -1;


    {
        {
            int sipRes = 0;

#line 331 "/usr/local/share/py-sip/QtCore/qglobal.sip"
        sipRes = (sipCpp->operator int() != 0);
#line 717 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_Solid_OpticalDrive_MediumTypes___ne__(PyObject *,PyObject *);}
static PyObject *slot_Solid_OpticalDrive_MediumTypes___ne__(PyObject *sipSelf,PyObject *sipArg)
{
    Solid::OpticalDrive::MediumTypes *sipCpp = reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Solid_OpticalDrive_MediumTypes));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const Solid::OpticalDrive::MediumTypes * a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_Solid_OpticalDrive_MediumTypes, &a0, &a0State))
        {
            bool sipRes = 0;

#line 326 "/usr/local/share/py-sip/QtCore/qglobal.sip"
        sipRes = (sipCpp->operator int() != a0->operator int());
#line 747 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
            sipReleaseType(const_cast<Solid::OpticalDrive::MediumTypes *>(a0),sipType_Solid_OpticalDrive_MediumTypes,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_solid,ne_slot,sipType_Solid_OpticalDrive_MediumTypes,sipSelf,sipArg);
}


extern "C" {static PyObject *slot_Solid_OpticalDrive_MediumTypes___eq__(PyObject *,PyObject *);}
static PyObject *slot_Solid_OpticalDrive_MediumTypes___eq__(PyObject *sipSelf,PyObject *sipArg)
{
    Solid::OpticalDrive::MediumTypes *sipCpp = reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Solid_OpticalDrive_MediumTypes));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const Solid::OpticalDrive::MediumTypes * a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_Solid_OpticalDrive_MediumTypes, &a0, &a0State))
        {
            bool sipRes = 0;

#line 321 "/usr/local/share/py-sip/QtCore/qglobal.sip"
        sipRes = (sipCpp->operator int() == a0->operator int());
#line 783 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
            sipReleaseType(const_cast<Solid::OpticalDrive::MediumTypes *>(a0),sipType_Solid_OpticalDrive_MediumTypes,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_solid,eq_slot,sipType_Solid_OpticalDrive_MediumTypes,sipSelf,sipArg);
}


extern "C" {static PyObject *slot_Solid_OpticalDrive_MediumTypes___invert__(PyObject *);}
static PyObject *slot_Solid_OpticalDrive_MediumTypes___invert__(PyObject *sipSelf)
{
    Solid::OpticalDrive::MediumTypes *sipCpp = reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Solid_OpticalDrive_MediumTypes));

    if (!sipCpp)
        return 0;


    {
        {
            Solid::OpticalDrive::MediumTypes *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Solid::OpticalDrive::MediumTypes(~(*sipCpp));
            Py_END_ALLOW_THREADS

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

    return 0;
}


extern "C" {static PyObject *slot_Solid_OpticalDrive_MediumTypes___and__(PyObject *,PyObject *);}
static PyObject *slot_Solid_OpticalDrive_MediumTypes___and__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
        Solid::OpticalDrive::MediumTypes * a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_Solid_OpticalDrive_MediumTypes, &a0, &a0State, &a1))
        {
            Solid::OpticalDrive::MediumTypes *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Solid::OpticalDrive::MediumTypes((*a0 & a1));
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_Solid_OpticalDrive_MediumTypes,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_solid,and_slot,NULL,sipArg0,sipArg1);
}


extern "C" {static PyObject *slot_Solid_OpticalDrive_MediumTypes___xor__(PyObject *,PyObject *);}
static PyObject *slot_Solid_OpticalDrive_MediumTypes___xor__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
        Solid::OpticalDrive::MediumTypes * a0;
        int a0State = 0;
        Solid::OpticalDrive::MediumTypes * a1;
        int a1State = 0;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1J1", sipType_Solid_OpticalDrive_MediumTypes, &a0, &a0State, sipType_Solid_OpticalDrive_MediumTypes, &a1, &a1State))
        {
            Solid::OpticalDrive::MediumTypes *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Solid::OpticalDrive::MediumTypes((*a0 ^ *a1));
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_Solid_OpticalDrive_MediumTypes,a0State);
            sipReleaseType(a1,sipType_Solid_OpticalDrive_MediumTypes,a1State);

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

    {
        Solid::OpticalDrive::MediumTypes * a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_Solid_OpticalDrive_MediumTypes, &a0, &a0State, &a1))
        {
            Solid::OpticalDrive::MediumTypes *sipRes = 0;

#line 315 "/usr/local/share/py-sip/QtCore/qglobal.sip"
        sipRes = new Solid::OpticalDrive::MediumTypes(*a0 ^ a1);
#line 892 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
            sipReleaseType(a0,sipType_Solid_OpticalDrive_MediumTypes,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_solid,xor_slot,NULL,sipArg0,sipArg1);
}


extern "C" {static PyObject *slot_Solid_OpticalDrive_MediumTypes___or__(PyObject *,PyObject *);}
static PyObject *slot_Solid_OpticalDrive_MediumTypes___or__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
        Solid::OpticalDrive::MediumTypes * a0;
        int a0State = 0;
        Solid::OpticalDrive::MediumTypes * a1;
        int a1State = 0;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1J1", sipType_Solid_OpticalDrive_MediumTypes, &a0, &a0State, sipType_Solid_OpticalDrive_MediumTypes, &a1, &a1State))
        {
            Solid::OpticalDrive::MediumTypes *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Solid::OpticalDrive::MediumTypes((*a0 | *a1));
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_Solid_OpticalDrive_MediumTypes,a0State);
            sipReleaseType(a1,sipType_Solid_OpticalDrive_MediumTypes,a1State);

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

    {
        Solid::OpticalDrive::MediumTypes * a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_Solid_OpticalDrive_MediumTypes, &a0, &a0State, &a1))
        {
            Solid::OpticalDrive::MediumTypes *sipRes = 0;

#line 310 "/usr/local/share/py-sip/QtCore/qglobal.sip"
        sipRes = new Solid::OpticalDrive::MediumTypes(*a0 | a1);
#line 944 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
            sipReleaseType(a0,sipType_Solid_OpticalDrive_MediumTypes,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_solid,or_slot,NULL,sipArg0,sipArg1);
}


extern "C" {static PyObject *slot_Solid_OpticalDrive_MediumTypes___int__(PyObject *);}
static PyObject *slot_Solid_OpticalDrive_MediumTypes___int__(PyObject *sipSelf)
{
    Solid::OpticalDrive::MediumTypes *sipCpp = reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Solid_OpticalDrive_MediumTypes));

    if (!sipCpp)
        return 0;


    {
        {
            int sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = *sipCpp;
            Py_END_ALLOW_THREADS

            return SIPLong_FromLong(sipRes);
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_Solid_OpticalDrive_MediumTypes___ixor__(PyObject *,PyObject *);}
static PyObject *slot_Solid_OpticalDrive_MediumTypes___ixor__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_Solid_OpticalDrive_MediumTypes)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

    Solid::OpticalDrive::MediumTypes *sipCpp = reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Solid_OpticalDrive_MediumTypes));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        Solid::OpticalDrive::MediumTypes * a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_Solid_OpticalDrive_MediumTypes, &a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->Solid::OpticalDrive::MediumTypes::operator^=(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_Solid_OpticalDrive_MediumTypes,a0State);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_Solid_OpticalDrive_MediumTypes___ior__(PyObject *,PyObject *);}
static PyObject *slot_Solid_OpticalDrive_MediumTypes___ior__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_Solid_OpticalDrive_MediumTypes)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

    Solid::OpticalDrive::MediumTypes *sipCpp = reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Solid_OpticalDrive_MediumTypes));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        Solid::OpticalDrive::MediumTypes * a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_Solid_OpticalDrive_MediumTypes, &a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->Solid::OpticalDrive::MediumTypes::operator|=(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_Solid_OpticalDrive_MediumTypes,a0State);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_Solid_OpticalDrive_MediumTypes___iand__(PyObject *,PyObject *);}
static PyObject *slot_Solid_OpticalDrive_MediumTypes___iand__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_Solid_OpticalDrive_MediumTypes)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

    Solid::OpticalDrive::MediumTypes *sipCpp = reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Solid_OpticalDrive_MediumTypes));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->Solid::OpticalDrive::MediumTypes::operator&=(a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


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

    return NULL;
}


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

    delete reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void assign_Solid_OpticalDrive_MediumTypes(void *, SIP_SSIZE_T, const void *);}
static void assign_Solid_OpticalDrive_MediumTypes(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipDst)[sipDstIdx] = *reinterpret_cast<const Solid::OpticalDrive::MediumTypes *>(sipSrc);
}


extern "C" {static void *array_Solid_OpticalDrive_MediumTypes(SIP_SSIZE_T);}
static void *array_Solid_OpticalDrive_MediumTypes(SIP_SSIZE_T sipNrElem)
{
    return new Solid::OpticalDrive::MediumTypes[sipNrElem];
}


extern "C" {static void *copy_Solid_OpticalDrive_MediumTypes(const void *, SIP_SSIZE_T);}
static void *copy_Solid_OpticalDrive_MediumTypes(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new Solid::OpticalDrive::MediumTypes(reinterpret_cast<const Solid::OpticalDrive::MediumTypes *>(sipSrc)[sipSrcIdx]);
}


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


extern "C" {static void *init_Solid_OpticalDrive_MediumTypes(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_Solid_OpticalDrive_MediumTypes(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    Solid::OpticalDrive::MediumTypes *sipCpp = 0;

    {
        const Solid::OpticalDrive::MediumTypes * a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J1", sipType_Solid_OpticalDrive_MediumTypes, &a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Solid::OpticalDrive::MediumTypes(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<Solid::OpticalDrive::MediumTypes *>(a0),sipType_Solid_OpticalDrive_MediumTypes,a0State);

            return sipCpp;
        }
    }

    {
        int a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "i", &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Solid::OpticalDrive::MediumTypes(a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Solid::OpticalDrive::MediumTypes();
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return NULL;
}


extern "C" {static int convertTo_Solid_OpticalDrive_MediumTypes(PyObject *, void **, int *, PyObject *);}
static int convertTo_Solid_OpticalDrive_MediumTypes(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    Solid::OpticalDrive::MediumTypes **sipCppPtr = reinterpret_cast<Solid::OpticalDrive::MediumTypes **>(sipCppPtrV);

#line 336 "/usr/local/share/py-sip/QtCore/qglobal.sip"
// Allow an instance of the base enum whenever a Solid::OpticalDrive::MediumTypes is expected.

if (sipIsErr == NULL)
    return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_Solid_OpticalDrive_MediumType)) ||
            sipCanConvertToType(sipPy, sipType_Solid_OpticalDrive_MediumTypes, SIP_NO_CONVERTORS));

if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_Solid_OpticalDrive_MediumType)))
{
    *sipCppPtr = new Solid::OpticalDrive::MediumTypes(SIPLong_AsLong(sipPy));

    return sipGetState(sipTransferObj);
}

*sipCppPtr = reinterpret_cast<Solid::OpticalDrive::MediumTypes *>(sipConvertToType(sipPy, sipType_Solid_OpticalDrive_MediumTypes, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));

return 0;
#line 1239 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
}


/* Define this type's Python slots. */
static sipPySlotDef slots_Solid_OpticalDrive_MediumTypes[] = {
    {(void *)slot_Solid_OpticalDrive_MediumTypes___bool__, bool_slot},
    {(void *)slot_Solid_OpticalDrive_MediumTypes___ne__, ne_slot},
    {(void *)slot_Solid_OpticalDrive_MediumTypes___eq__, eq_slot},
    {(void *)slot_Solid_OpticalDrive_MediumTypes___invert__, invert_slot},
    {(void *)slot_Solid_OpticalDrive_MediumTypes___and__, and_slot},
    {(void *)slot_Solid_OpticalDrive_MediumTypes___xor__, xor_slot},
    {(void *)slot_Solid_OpticalDrive_MediumTypes___or__, or_slot},
    {(void *)slot_Solid_OpticalDrive_MediumTypes___int__, int_slot},
    {(void *)slot_Solid_OpticalDrive_MediumTypes___ixor__, ixor_slot},
    {(void *)slot_Solid_OpticalDrive_MediumTypes___ior__, ior_slot},
    {(void *)slot_Solid_OpticalDrive_MediumTypes___iand__, iand_slot},
    {0, (sipPySlotType)0}
};


pyqt4ClassTypeDef sipTypeDef_solid_Solid_OpticalDrive_MediumTypes = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_Solid__OpticalDrive__MediumTypes,
        {0}
    },
    {
        sipNameNr_MediumTypes,
        {40, 255, 0},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    slots_Solid_OpticalDrive_MediumTypes,
    init_Solid_OpticalDrive_MediumTypes,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Solid_OpticalDrive_MediumTypes,
    assign_Solid_OpticalDrive_MediumTypes,
    array_Solid_OpticalDrive_MediumTypes,
    copy_Solid_OpticalDrive_MediumTypes,
    release_Solid_OpticalDrive_MediumTypes,
    cast_Solid_OpticalDrive_MediumTypes,
    convertTo_Solid_OpticalDrive_MediumTypes,
    0,
    0
},
    0,
    1,
    0
};

#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/opticaldrive.sip"
#include <opticaldrive.h>
#line 1312 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"

#line 34 "/usr/local/share/py-sip/QtCore/qobject.sip"
#include <qobject.h>
#line 1316 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 1319 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 238 "/usr/local/share/py-sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 1322 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 628 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 1325 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/opticaldrive.sip"
#include <opticaldrive.h>
#line 1328 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 58 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/deviceinterface.sip"
#include <deviceinterface.h>
#line 1331 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/storagedrive.sip"
#include <storagedrive.h>
#line 1334 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 1337 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 310 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 1340 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 298 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 1343 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 33 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 1346 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 1349 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 35 "/usr/local/share/py-sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 1352 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 120 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 1355 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qthread.sip"
#include <qthread.h>
#line 1358 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 35 "/usr/local/share/py-sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 1361 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"
#line 31 "/usr/local/share/py-sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 1364 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/solid/sipsolidpart2.cpp"


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

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = Solid::OpticalDrive::deviceInterfaceType();
            Py_END_ALLOW_THREADS

            return sipConvertFromEnum(sipRes,sipType_Solid_DeviceInterface_Type);
        }
    }

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

    return NULL;
}


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

    {
        Solid::OpticalDrive *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Solid_OpticalDrive, &sipCpp))
        {
            Solid::OpticalDrive::MediumTypes *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Solid::OpticalDrive::MediumTypes(sipCpp->supportedMedia());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        Solid::OpticalDrive *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Solid_OpticalDrive, &sipCpp))
        {
            int sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->readSpeed();
            Py_END_ALLOW_THREADS

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        Solid::OpticalDrive *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Solid_OpticalDrive, &sipCpp))
        {
            int sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->writeSpeed();
            Py_END_ALLOW_THREADS

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        Solid::OpticalDrive *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Solid_OpticalDrive, &sipCpp))
        {
            QList<int> *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<int>(sipCpp->writeSpeeds());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        Solid::OpticalDrive *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->eject();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    if (targetType == sipType_Solid_OpticalDrive)
        return ptr;

    if ((res = ((const sipClassTypeDef *)sipType_Solid_StorageDrive)->ctd_cast((Solid::StorageDrive *)(Solid::OpticalDrive *)ptr,targetType)) != NULL)
        return res;

    return NULL;
}


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

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

    Py_END_ALLOW_THREADS
}


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


/* Define this type's super-types. */
static sipEncodedTypeDef supers_Solid_OpticalDrive[] = {{57, 255, 1}};


static PyMethodDef methods_Solid_OpticalDrive[] = {
    {SIP_MLNAME_CAST(sipName_deviceInterfaceType), meth_Solid_OpticalDrive_deviceInterfaceType, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_eject), meth_Solid_OpticalDrive_eject, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_readSpeed), meth_Solid_OpticalDrive_readSpeed, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_supportedMedia), meth_Solid_OpticalDrive_supportedMedia, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_writeSpeed), meth_Solid_OpticalDrive_writeSpeed, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_writeSpeeds), meth_Solid_OpticalDrive_writeSpeeds, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_Solid_OpticalDrive[] = {
    {sipName_Bd, Solid::OpticalDrive::Bd, 41},
    {sipName_Bdr, Solid::OpticalDrive::Bdr, 41},
    {sipName_Bdre, Solid::OpticalDrive::Bdre, 41},
    {sipName_Cdr, Solid::OpticalDrive::Cdr, 41},
    {sipName_Cdrw, Solid::OpticalDrive::Cdrw, 41},
    {sipName_Dvd, Solid::OpticalDrive::Dvd, 41},
    {sipName_Dvdplusdl, Solid::OpticalDrive::Dvdplusdl, 41},
    {sipName_Dvdplusdlrw, Solid::OpticalDrive::Dvdplusdlrw, 41},
    {sipName_Dvdplusr, Solid::OpticalDrive::Dvdplusr, 41},
    {sipName_Dvdplusrw, Solid::OpticalDrive::Dvdplusrw, 41},
    {sipName_Dvdr, Solid::OpticalDrive::Dvdr, 41},
    {sipName_Dvdram, Solid::OpticalDrive::Dvdram, 41},
    {sipName_Dvdrw, Solid::OpticalDrive::Dvdrw, 41},
    {sipName_HdDvd, Solid::OpticalDrive::HdDvd, 41},
    {sipName_HdDvdr, Solid::OpticalDrive::HdDvdr, 41},
    {sipName_HdDvdrw, Solid::OpticalDrive::HdDvdrw, 41},
};


/* Define this type's PyQt4 signals. */
static const pyqt4QtSignal pyqt4_signals_Solid_OpticalDrive[] = {
    {"ejectRequested(QString)", 0, 0},
    {"ejectDone(Solid::ErrorType,QVariant,QString)", 0, 0},
    {"ejectPressed(QString)", 0, 0},
    {0, 0, 0}
};


pyqt4ClassTypeDef sipTypeDef_solid_Solid_OpticalDrive = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_Solid__OpticalDrive,
        {0}
    },
    {
        sipNameNr_OpticalDrive,
        {3, 255, 0},
        6, methods_Solid_OpticalDrive,
        16, enummembers_Solid_OpticalDrive,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_Solid_OpticalDrive,
    0,
    0,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Solid_OpticalDrive,
    0,
    0,
    0,
    release_Solid_OpticalDrive,
    cast_Solid_OpticalDrive,
    0,
    0,
    0
},
    &Solid::OpticalDrive::staticMetaObject,
    0,
    pyqt4_signals_Solid_OpticalDrive
};
