/*
 * Module code.
 *
 * Generated by SIP 4.10.2 on Sun Jul 11 10:11:30 2010
 */

#include "sipAPIphonon.h"

#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 12 "sipphononpart1.cpp"



extern "C" {static void assign_QList_0100Phonon_AudioChannelDescription(void *, SIP_SSIZE_T, const void *);}
static void assign_QList_0100Phonon_AudioChannelDescription(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<QList<Phonon::AudioChannelDescription> *>(sipDst)[sipDstIdx] = *reinterpret_cast<const QList<Phonon::AudioChannelDescription> *>(sipSrc);
}


extern "C" {static void *array_QList_0100Phonon_AudioChannelDescription(SIP_SSIZE_T);}
static void *array_QList_0100Phonon_AudioChannelDescription(SIP_SSIZE_T sipNrElem)
{
    return new QList<Phonon::AudioChannelDescription>[sipNrElem];
}


extern "C" {static void *copy_QList_0100Phonon_AudioChannelDescription(const void *, SIP_SSIZE_T);}
static void *copy_QList_0100Phonon_AudioChannelDescription(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new QList<Phonon::AudioChannelDescription>(reinterpret_cast<const QList<Phonon::AudioChannelDescription> *>(sipSrc)[sipSrcIdx]);
}


/* Call the mapped type's destructor. */
extern "C" {static void release_QList_0100Phonon_AudioChannelDescription(void *, int);}
static void release_QList_0100Phonon_AudioChannelDescription(void *ptr, int)
{
    Py_BEGIN_ALLOW_THREADS
    delete reinterpret_cast<QList<Phonon::AudioChannelDescription> *>(ptr);
    Py_END_ALLOW_THREADS
}



extern "C" {static int convertTo_QList_0100Phonon_AudioChannelDescription(PyObject *, void **, int *, PyObject *);}
static int convertTo_QList_0100Phonon_AudioChannelDescription(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    QList<Phonon::AudioChannelDescription> **sipCppPtr = reinterpret_cast<QList<Phonon::AudioChannelDescription> **>(sipCppPtrV);

#line 69 "/usr/local/share/py-sip/QtCore/qlist.sip"
    SIP_SSIZE_T len;

    // Check the type if that is all that is required.
    if (sipIsErr == NULL)
    {
        if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
            return 0;

        for (SIP_SSIZE_T i = 0; i < len; ++i)
        {
            PyObject *itm = PySequence_ITEM(sipPy, i);
            bool ok = (itm && sipCanConvertToType(itm, sipType_Phonon_AudioChannelDescription, SIP_NOT_NONE));

            Py_XDECREF(itm);

            if (!ok)
                return 0;
        }

        return 1;
    }

    QList<Phonon::AudioChannelDescription> *ql = new QList<Phonon::AudioChannelDescription>;
    len = PySequence_Size(sipPy);
 
    for (SIP_SSIZE_T i = 0; i < len; ++i)
    {
        PyObject *itm = PySequence_ITEM(sipPy, i);
        int state;
        Phonon::AudioChannelDescription *t = reinterpret_cast<Phonon::AudioChannelDescription *>(sipConvertToType(itm, sipType_Phonon_AudioChannelDescription, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

        Py_DECREF(itm);
 
        if (*sipIsErr)
        {
            sipReleaseType(t, sipType_Phonon_AudioChannelDescription, state);

            delete ql;
            return 0;
        }

        ql->append(*t);

        sipReleaseType(t, sipType_Phonon_AudioChannelDescription, state);
    }
 
    *sipCppPtr = ql;
 
    return sipGetState(sipTransferObj);
#line 103 "sipphononpart1.cpp"
}


extern "C" {static PyObject *convertFrom_QList_0100Phonon_AudioChannelDescription(void *, PyObject *);}
static PyObject *convertFrom_QList_0100Phonon_AudioChannelDescription(void *sipCppV,PyObject *sipTransferObj)
{
   QList<Phonon::AudioChannelDescription> *sipCpp = reinterpret_cast<QList<Phonon::AudioChannelDescription> *>(sipCppV);

#line 42 "/usr/local/share/py-sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

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

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        Phonon::AudioChannelDescription *t = new Phonon::AudioChannelDescription(sipCpp->at(i));
        PyObject *tobj;

        if ((tobj = sipConvertFromNewType(t, sipType_Phonon_AudioChannelDescription, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            delete t;

            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 137 "sipphononpart1.cpp"
}


sipMappedTypeDef sipTypeDef_phonon_QList_0100Phonon_AudioChannelDescription = {
    {
        -1,
        0,
        0,
        SIP_TYPE_MAPPED,
        sipNameNr_40,
        {0}
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_QList_0100Phonon_AudioChannelDescription,
    array_QList_0100Phonon_AudioChannelDescription,
    copy_QList_0100Phonon_AudioChannelDescription,
    release_QList_0100Phonon_AudioChannelDescription,
    convertTo_QList_0100Phonon_AudioChannelDescription,
    convertFrom_QList_0100Phonon_AudioChannelDescription
};

#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 168 "sipphononpart1.cpp"

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/phonon/effectparameter.sip"
#include <phonon/effectparameter.h>
#line 172 "sipphononpart1.cpp"


extern "C" {static void assign_QList_0100Phonon_EffectParameter(void *, SIP_SSIZE_T, const void *);}
static void assign_QList_0100Phonon_EffectParameter(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<QList<Phonon::EffectParameter> *>(sipDst)[sipDstIdx] = *reinterpret_cast<const QList<Phonon::EffectParameter> *>(sipSrc);
}


extern "C" {static void *array_QList_0100Phonon_EffectParameter(SIP_SSIZE_T);}
static void *array_QList_0100Phonon_EffectParameter(SIP_SSIZE_T sipNrElem)
{
    return new QList<Phonon::EffectParameter>[sipNrElem];
}


extern "C" {static void *copy_QList_0100Phonon_EffectParameter(const void *, SIP_SSIZE_T);}
static void *copy_QList_0100Phonon_EffectParameter(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new QList<Phonon::EffectParameter>(reinterpret_cast<const QList<Phonon::EffectParameter> *>(sipSrc)[sipSrcIdx]);
}


/* Call the mapped type's destructor. */
extern "C" {static void release_QList_0100Phonon_EffectParameter(void *, int);}
static void release_QList_0100Phonon_EffectParameter(void *ptr, int)
{
    Py_BEGIN_ALLOW_THREADS
    delete reinterpret_cast<QList<Phonon::EffectParameter> *>(ptr);
    Py_END_ALLOW_THREADS
}



extern "C" {static int convertTo_QList_0100Phonon_EffectParameter(PyObject *, void **, int *, PyObject *);}
static int convertTo_QList_0100Phonon_EffectParameter(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    QList<Phonon::EffectParameter> **sipCppPtr = reinterpret_cast<QList<Phonon::EffectParameter> **>(sipCppPtrV);

#line 69 "/usr/local/share/py-sip/QtCore/qlist.sip"
    SIP_SSIZE_T len;

    // Check the type if that is all that is required.
    if (sipIsErr == NULL)
    {
        if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
            return 0;

        for (SIP_SSIZE_T i = 0; i < len; ++i)
        {
            PyObject *itm = PySequence_ITEM(sipPy, i);
            bool ok = (itm && sipCanConvertToType(itm, sipType_Phonon_EffectParameter, SIP_NOT_NONE));

            Py_XDECREF(itm);

            if (!ok)
                return 0;
        }

        return 1;
    }

    QList<Phonon::EffectParameter> *ql = new QList<Phonon::EffectParameter>;
    len = PySequence_Size(sipPy);
 
    for (SIP_SSIZE_T i = 0; i < len; ++i)
    {
        PyObject *itm = PySequence_ITEM(sipPy, i);
        int state;
        Phonon::EffectParameter *t = reinterpret_cast<Phonon::EffectParameter *>(sipConvertToType(itm, sipType_Phonon_EffectParameter, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

        Py_DECREF(itm);
 
        if (*sipIsErr)
        {
            sipReleaseType(t, sipType_Phonon_EffectParameter, state);

            delete ql;
            return 0;
        }

        ql->append(*t);

        sipReleaseType(t, sipType_Phonon_EffectParameter, state);
    }
 
    *sipCppPtr = ql;
 
    return sipGetState(sipTransferObj);
#line 262 "sipphononpart1.cpp"
}


extern "C" {static PyObject *convertFrom_QList_0100Phonon_EffectParameter(void *, PyObject *);}
static PyObject *convertFrom_QList_0100Phonon_EffectParameter(void *sipCppV,PyObject *sipTransferObj)
{
   QList<Phonon::EffectParameter> *sipCpp = reinterpret_cast<QList<Phonon::EffectParameter> *>(sipCppV);

#line 42 "/usr/local/share/py-sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

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

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        Phonon::EffectParameter *t = new Phonon::EffectParameter(sipCpp->at(i));
        PyObject *tobj;

        if ((tobj = sipConvertFromNewType(t, sipType_Phonon_EffectParameter, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            delete t;

            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 296 "sipphononpart1.cpp"
}


sipMappedTypeDef sipTypeDef_phonon_QList_0100Phonon_EffectParameter = {
    {
        -1,
        0,
        0,
        SIP_TYPE_MAPPED,
        sipNameNr_560,
        {0}
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_QList_0100Phonon_EffectParameter,
    array_QList_0100Phonon_EffectParameter,
    copy_QList_0100Phonon_EffectParameter,
    release_QList_0100Phonon_EffectParameter,
    convertTo_QList_0100Phonon_EffectParameter,
    convertFrom_QList_0100Phonon_EffectParameter
};

#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 327 "sipphononpart1.cpp"



extern "C" {static void assign_QList_0100Phonon_EffectDescription(void *, SIP_SSIZE_T, const void *);}
static void assign_QList_0100Phonon_EffectDescription(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<QList<Phonon::EffectDescription> *>(sipDst)[sipDstIdx] = *reinterpret_cast<const QList<Phonon::EffectDescription> *>(sipSrc);
}


extern "C" {static void *array_QList_0100Phonon_EffectDescription(SIP_SSIZE_T);}
static void *array_QList_0100Phonon_EffectDescription(SIP_SSIZE_T sipNrElem)
{
    return new QList<Phonon::EffectDescription>[sipNrElem];
}


extern "C" {static void *copy_QList_0100Phonon_EffectDescription(const void *, SIP_SSIZE_T);}
static void *copy_QList_0100Phonon_EffectDescription(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new QList<Phonon::EffectDescription>(reinterpret_cast<const QList<Phonon::EffectDescription> *>(sipSrc)[sipSrcIdx]);
}


/* Call the mapped type's destructor. */
extern "C" {static void release_QList_0100Phonon_EffectDescription(void *, int);}
static void release_QList_0100Phonon_EffectDescription(void *ptr, int)
{
    Py_BEGIN_ALLOW_THREADS
    delete reinterpret_cast<QList<Phonon::EffectDescription> *>(ptr);
    Py_END_ALLOW_THREADS
}



extern "C" {static int convertTo_QList_0100Phonon_EffectDescription(PyObject *, void **, int *, PyObject *);}
static int convertTo_QList_0100Phonon_EffectDescription(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    QList<Phonon::EffectDescription> **sipCppPtr = reinterpret_cast<QList<Phonon::EffectDescription> **>(sipCppPtrV);

#line 69 "/usr/local/share/py-sip/QtCore/qlist.sip"
    SIP_SSIZE_T len;

    // Check the type if that is all that is required.
    if (sipIsErr == NULL)
    {
        if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
            return 0;

        for (SIP_SSIZE_T i = 0; i < len; ++i)
        {
            PyObject *itm = PySequence_ITEM(sipPy, i);
            bool ok = (itm && sipCanConvertToType(itm, sipType_Phonon_EffectDescription, SIP_NOT_NONE));

            Py_XDECREF(itm);

            if (!ok)
                return 0;
        }

        return 1;
    }

    QList<Phonon::EffectDescription> *ql = new QList<Phonon::EffectDescription>;
    len = PySequence_Size(sipPy);
 
    for (SIP_SSIZE_T i = 0; i < len; ++i)
    {
        PyObject *itm = PySequence_ITEM(sipPy, i);
        int state;
        Phonon::EffectDescription *t = reinterpret_cast<Phonon::EffectDescription *>(sipConvertToType(itm, sipType_Phonon_EffectDescription, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

        Py_DECREF(itm);
 
        if (*sipIsErr)
        {
            sipReleaseType(t, sipType_Phonon_EffectDescription, state);

            delete ql;
            return 0;
        }

        ql->append(*t);

        sipReleaseType(t, sipType_Phonon_EffectDescription, state);
    }
 
    *sipCppPtr = ql;
 
    return sipGetState(sipTransferObj);
#line 418 "sipphononpart1.cpp"
}


extern "C" {static PyObject *convertFrom_QList_0100Phonon_EffectDescription(void *, PyObject *);}
static PyObject *convertFrom_QList_0100Phonon_EffectDescription(void *sipCppV,PyObject *sipTransferObj)
{
   QList<Phonon::EffectDescription> *sipCpp = reinterpret_cast<QList<Phonon::EffectDescription> *>(sipCppV);

#line 42 "/usr/local/share/py-sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

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

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        Phonon::EffectDescription *t = new Phonon::EffectDescription(sipCpp->at(i));
        PyObject *tobj;

        if ((tobj = sipConvertFromNewType(t, sipType_Phonon_EffectDescription, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            delete t;

            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 452 "sipphononpart1.cpp"
}


sipMappedTypeDef sipTypeDef_phonon_QList_0100Phonon_EffectDescription = {
    {
        -1,
        0,
        0,
        SIP_TYPE_MAPPED,
        sipNameNr_363,
        {0}
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_QList_0100Phonon_EffectDescription,
    array_QList_0100Phonon_EffectDescription,
    copy_QList_0100Phonon_EffectDescription,
    release_QList_0100Phonon_EffectDescription,
    convertTo_QList_0100Phonon_EffectDescription,
    convertFrom_QList_0100Phonon_EffectDescription
};

#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 483 "sipphononpart1.cpp"



extern "C" {static void assign_QList_0100Phonon_AudioCaptureDevice(void *, SIP_SSIZE_T, const void *);}
static void assign_QList_0100Phonon_AudioCaptureDevice(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<QList<Phonon::AudioCaptureDevice> *>(sipDst)[sipDstIdx] = *reinterpret_cast<const QList<Phonon::AudioCaptureDevice> *>(sipSrc);
}


extern "C" {static void *array_QList_0100Phonon_AudioCaptureDevice(SIP_SSIZE_T);}
static void *array_QList_0100Phonon_AudioCaptureDevice(SIP_SSIZE_T sipNrElem)
{
    return new QList<Phonon::AudioCaptureDevice>[sipNrElem];
}


extern "C" {static void *copy_QList_0100Phonon_AudioCaptureDevice(const void *, SIP_SSIZE_T);}
static void *copy_QList_0100Phonon_AudioCaptureDevice(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new QList<Phonon::AudioCaptureDevice>(reinterpret_cast<const QList<Phonon::AudioCaptureDevice> *>(sipSrc)[sipSrcIdx]);
}


/* Call the mapped type's destructor. */
extern "C" {static void release_QList_0100Phonon_AudioCaptureDevice(void *, int);}
static void release_QList_0100Phonon_AudioCaptureDevice(void *ptr, int)
{
    Py_BEGIN_ALLOW_THREADS
    delete reinterpret_cast<QList<Phonon::AudioCaptureDevice> *>(ptr);
    Py_END_ALLOW_THREADS
}



extern "C" {static int convertTo_QList_0100Phonon_AudioCaptureDevice(PyObject *, void **, int *, PyObject *);}
static int convertTo_QList_0100Phonon_AudioCaptureDevice(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    QList<Phonon::AudioCaptureDevice> **sipCppPtr = reinterpret_cast<QList<Phonon::AudioCaptureDevice> **>(sipCppPtrV);

#line 69 "/usr/local/share/py-sip/QtCore/qlist.sip"
    SIP_SSIZE_T len;

    // Check the type if that is all that is required.
    if (sipIsErr == NULL)
    {
        if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
            return 0;

        for (SIP_SSIZE_T i = 0; i < len; ++i)
        {
            PyObject *itm = PySequence_ITEM(sipPy, i);
            bool ok = (itm && sipCanConvertToType(itm, sipType_Phonon_AudioCaptureDevice, SIP_NOT_NONE));

            Py_XDECREF(itm);

            if (!ok)
                return 0;
        }

        return 1;
    }

    QList<Phonon::AudioCaptureDevice> *ql = new QList<Phonon::AudioCaptureDevice>;
    len = PySequence_Size(sipPy);
 
    for (SIP_SSIZE_T i = 0; i < len; ++i)
    {
        PyObject *itm = PySequence_ITEM(sipPy, i);
        int state;
        Phonon::AudioCaptureDevice *t = reinterpret_cast<Phonon::AudioCaptureDevice *>(sipConvertToType(itm, sipType_Phonon_AudioCaptureDevice, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

        Py_DECREF(itm);
 
        if (*sipIsErr)
        {
            sipReleaseType(t, sipType_Phonon_AudioCaptureDevice, state);

            delete ql;
            return 0;
        }

        ql->append(*t);

        sipReleaseType(t, sipType_Phonon_AudioCaptureDevice, state);
    }
 
    *sipCppPtr = ql;
 
    return sipGetState(sipTransferObj);
#line 574 "sipphononpart1.cpp"
}


extern "C" {static PyObject *convertFrom_QList_0100Phonon_AudioCaptureDevice(void *, PyObject *);}
static PyObject *convertFrom_QList_0100Phonon_AudioCaptureDevice(void *sipCppV,PyObject *sipTransferObj)
{
   QList<Phonon::AudioCaptureDevice> *sipCpp = reinterpret_cast<QList<Phonon::AudioCaptureDevice> *>(sipCppV);

#line 42 "/usr/local/share/py-sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

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

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        Phonon::AudioCaptureDevice *t = new Phonon::AudioCaptureDevice(sipCpp->at(i));
        PyObject *tobj;

        if ((tobj = sipConvertFromNewType(t, sipType_Phonon_AudioCaptureDevice, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            delete t;

            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 608 "sipphononpart1.cpp"
}


sipMappedTypeDef sipTypeDef_phonon_QList_0100Phonon_AudioCaptureDevice = {
    {
        -1,
        0,
        0,
        SIP_TYPE_MAPPED,
        sipNameNr_295,
        {0}
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_QList_0100Phonon_AudioCaptureDevice,
    array_QList_0100Phonon_AudioCaptureDevice,
    copy_QList_0100Phonon_AudioCaptureDevice,
    release_QList_0100Phonon_AudioCaptureDevice,
    convertTo_QList_0100Phonon_AudioCaptureDevice,
    convertFrom_QList_0100Phonon_AudioCaptureDevice
};

#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 639 "sipphononpart1.cpp"



extern "C" {static void assign_QList_0100Phonon_AudioOutputDevice(void *, SIP_SSIZE_T, const void *);}
static void assign_QList_0100Phonon_AudioOutputDevice(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<QList<Phonon::AudioOutputDevice> *>(sipDst)[sipDstIdx] = *reinterpret_cast<const QList<Phonon::AudioOutputDevice> *>(sipSrc);
}


extern "C" {static void *array_QList_0100Phonon_AudioOutputDevice(SIP_SSIZE_T);}
static void *array_QList_0100Phonon_AudioOutputDevice(SIP_SSIZE_T sipNrElem)
{
    return new QList<Phonon::AudioOutputDevice>[sipNrElem];
}


extern "C" {static void *copy_QList_0100Phonon_AudioOutputDevice(const void *, SIP_SSIZE_T);}
static void *copy_QList_0100Phonon_AudioOutputDevice(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new QList<Phonon::AudioOutputDevice>(reinterpret_cast<const QList<Phonon::AudioOutputDevice> *>(sipSrc)[sipSrcIdx]);
}


/* Call the mapped type's destructor. */
extern "C" {static void release_QList_0100Phonon_AudioOutputDevice(void *, int);}
static void release_QList_0100Phonon_AudioOutputDevice(void *ptr, int)
{
    Py_BEGIN_ALLOW_THREADS
    delete reinterpret_cast<QList<Phonon::AudioOutputDevice> *>(ptr);
    Py_END_ALLOW_THREADS
}



extern "C" {static int convertTo_QList_0100Phonon_AudioOutputDevice(PyObject *, void **, int *, PyObject *);}
static int convertTo_QList_0100Phonon_AudioOutputDevice(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    QList<Phonon::AudioOutputDevice> **sipCppPtr = reinterpret_cast<QList<Phonon::AudioOutputDevice> **>(sipCppPtrV);

#line 69 "/usr/local/share/py-sip/QtCore/qlist.sip"
    SIP_SSIZE_T len;

    // Check the type if that is all that is required.
    if (sipIsErr == NULL)
    {
        if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
            return 0;

        for (SIP_SSIZE_T i = 0; i < len; ++i)
        {
            PyObject *itm = PySequence_ITEM(sipPy, i);
            bool ok = (itm && sipCanConvertToType(itm, sipType_Phonon_AudioOutputDevice, SIP_NOT_NONE));

            Py_XDECREF(itm);

            if (!ok)
                return 0;
        }

        return 1;
    }

    QList<Phonon::AudioOutputDevice> *ql = new QList<Phonon::AudioOutputDevice>;
    len = PySequence_Size(sipPy);
 
    for (SIP_SSIZE_T i = 0; i < len; ++i)
    {
        PyObject *itm = PySequence_ITEM(sipPy, i);
        int state;
        Phonon::AudioOutputDevice *t = reinterpret_cast<Phonon::AudioOutputDevice *>(sipConvertToType(itm, sipType_Phonon_AudioOutputDevice, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

        Py_DECREF(itm);
 
        if (*sipIsErr)
        {
            sipReleaseType(t, sipType_Phonon_AudioOutputDevice, state);

            delete ql;
            return 0;
        }

        ql->append(*t);

        sipReleaseType(t, sipType_Phonon_AudioOutputDevice, state);
    }
 
    *sipCppPtr = ql;
 
    return sipGetState(sipTransferObj);
#line 730 "sipphononpart1.cpp"
}


extern "C" {static PyObject *convertFrom_QList_0100Phonon_AudioOutputDevice(void *, PyObject *);}
static PyObject *convertFrom_QList_0100Phonon_AudioOutputDevice(void *sipCppV,PyObject *sipTransferObj)
{
   QList<Phonon::AudioOutputDevice> *sipCpp = reinterpret_cast<QList<Phonon::AudioOutputDevice> *>(sipCppV);

#line 42 "/usr/local/share/py-sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

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

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        Phonon::AudioOutputDevice *t = new Phonon::AudioOutputDevice(sipCpp->at(i));
        PyObject *tobj;

        if ((tobj = sipConvertFromNewType(t, sipType_Phonon_AudioOutputDevice, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            delete t;

            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 764 "sipphononpart1.cpp"
}


sipMappedTypeDef sipTypeDef_phonon_QList_0100Phonon_AudioOutputDevice = {
    {
        -1,
        0,
        0,
        SIP_TYPE_MAPPED,
        sipNameNr_396,
        {0}
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_QList_0100Phonon_AudioOutputDevice,
    array_QList_0100Phonon_AudioOutputDevice,
    copy_QList_0100Phonon_AudioOutputDevice,
    release_QList_0100Phonon_AudioOutputDevice,
    convertTo_QList_0100Phonon_AudioOutputDevice,
    convertFrom_QList_0100Phonon_AudioOutputDevice
};

#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 795 "sipphononpart1.cpp"

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/phonon/path.sip"
#include <phonon/path.h>
#line 799 "sipphononpart1.cpp"


extern "C" {static void assign_QList_0100Phonon_Path(void *, SIP_SSIZE_T, const void *);}
static void assign_QList_0100Phonon_Path(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<QList<Phonon::Path> *>(sipDst)[sipDstIdx] = *reinterpret_cast<const QList<Phonon::Path> *>(sipSrc);
}


extern "C" {static void *array_QList_0100Phonon_Path(SIP_SSIZE_T);}
static void *array_QList_0100Phonon_Path(SIP_SSIZE_T sipNrElem)
{
    return new QList<Phonon::Path>[sipNrElem];
}


extern "C" {static void *copy_QList_0100Phonon_Path(const void *, SIP_SSIZE_T);}
static void *copy_QList_0100Phonon_Path(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new QList<Phonon::Path>(reinterpret_cast<const QList<Phonon::Path> *>(sipSrc)[sipSrcIdx]);
}


/* Call the mapped type's destructor. */
extern "C" {static void release_QList_0100Phonon_Path(void *, int);}
static void release_QList_0100Phonon_Path(void *ptr, int)
{
    Py_BEGIN_ALLOW_THREADS
    delete reinterpret_cast<QList<Phonon::Path> *>(ptr);
    Py_END_ALLOW_THREADS
}



extern "C" {static int convertTo_QList_0100Phonon_Path(PyObject *, void **, int *, PyObject *);}
static int convertTo_QList_0100Phonon_Path(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    QList<Phonon::Path> **sipCppPtr = reinterpret_cast<QList<Phonon::Path> **>(sipCppPtrV);

#line 69 "/usr/local/share/py-sip/QtCore/qlist.sip"
    SIP_SSIZE_T len;

    // Check the type if that is all that is required.
    if (sipIsErr == NULL)
    {
        if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
            return 0;

        for (SIP_SSIZE_T i = 0; i < len; ++i)
        {
            PyObject *itm = PySequence_ITEM(sipPy, i);
            bool ok = (itm && sipCanConvertToType(itm, sipType_Phonon_Path, SIP_NOT_NONE));

            Py_XDECREF(itm);

            if (!ok)
                return 0;
        }

        return 1;
    }

    QList<Phonon::Path> *ql = new QList<Phonon::Path>;
    len = PySequence_Size(sipPy);
 
    for (SIP_SSIZE_T i = 0; i < len; ++i)
    {
        PyObject *itm = PySequence_ITEM(sipPy, i);
        int state;
        Phonon::Path *t = reinterpret_cast<Phonon::Path *>(sipConvertToType(itm, sipType_Phonon_Path, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

        Py_DECREF(itm);
 
        if (*sipIsErr)
        {
            sipReleaseType(t, sipType_Phonon_Path, state);

            delete ql;
            return 0;
        }

        ql->append(*t);

        sipReleaseType(t, sipType_Phonon_Path, state);
    }
 
    *sipCppPtr = ql;
 
    return sipGetState(sipTransferObj);
#line 889 "sipphononpart1.cpp"
}


extern "C" {static PyObject *convertFrom_QList_0100Phonon_Path(void *, PyObject *);}
static PyObject *convertFrom_QList_0100Phonon_Path(void *sipCppV,PyObject *sipTransferObj)
{
   QList<Phonon::Path> *sipCpp = reinterpret_cast<QList<Phonon::Path> *>(sipCppV);

#line 42 "/usr/local/share/py-sip/QtCore/qlist.sip"
    // Create the list.
    PyObject *l;

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

    // Set the list elements.
    for (int i = 0; i < sipCpp->size(); ++i)
    {
        Phonon::Path *t = new Phonon::Path(sipCpp->at(i));
        PyObject *tobj;

        if ((tobj = sipConvertFromNewType(t, sipType_Phonon_Path, sipTransferObj)) == NULL)
        {
            Py_DECREF(l);
            delete t;

            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 923 "sipphononpart1.cpp"
}


sipMappedTypeDef sipTypeDef_phonon_QList_0100Phonon_Path = {
    {
        -1,
        0,
        0,
        SIP_TYPE_MAPPED,
        sipNameNr_2173,
        {0}
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_QList_0100Phonon_Path,
    array_QList_0100Phonon_Path,
    copy_QList_0100Phonon_Path,
    release_QList_0100Phonon_Path,
    convertTo_QList_0100Phonon_Path,
    convertFrom_QList_0100Phonon_Path
};
