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

#include "sipAPIphonon.h"

#line 25 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/phonon/mrl.sip"
#include <phonon/mrl.h>
#line 12 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"

#line 102 "/usr/share/python3-sip/PyQt4/QtCore/qurl.sip"
#include <qurl.h>
#line 16 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 31 "/usr/share/python3-sip/PyQt4/QtCore/qstring.sip"
#include <qstring.h>
#line 19 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 32 "/usr/share/python3-sip/PyQt4/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 22 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 102 "/usr/share/python3-sip/PyQt4/QtCore/qurl.sip"
#include <qurl.h>
#line 25 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 28 "/usr/share/python3-sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#line 28 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 196 "/usr/share/python3-sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#include <qpair.h>
#line 32 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 31 "/usr/share/python3-sip/PyQt4/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 35 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 196 "/usr/share/python3-sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#include <qpair.h>
#line 39 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 72 "/usr/share/python3-sip/PyQt4/QtCore/qstring.sip"
#include <qstring.h>
#line 42 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"


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

    {
        QUrl::FormattingOptions a0def = QUrl::None;
        QUrl::FormattingOptions* a0 = &a0def;
        int a0State = 0;
        const Phonon::Mrl *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B|J1", &sipSelf, sipType_Phonon_Mrl, &sipCpp, sipType_QUrl_FormattingOptions, &a0, &a0State))
        {
            QByteArray*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QByteArray(sipCpp->toEncoded(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(a0,sipType_QUrl_FormattingOptions,a0State);

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

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

    return NULL;
}


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

    delete reinterpret_cast<Phonon::Mrl *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


extern "C" {static void *array_Phonon_Mrl(SIP_SSIZE_T);}
static void *array_Phonon_Mrl(SIP_SSIZE_T sipNrElem)
{
    return new Phonon::Mrl[sipNrElem];
}


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


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


extern "C" {static void *init_type_Phonon_Mrl(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_Phonon_Mrl(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    Phonon::Mrl *sipCpp = 0;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Phonon::Mrl();
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        const Phonon::Mrl* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_Phonon_Mrl, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Phonon::Mrl(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        const QUrl* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_QUrl, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Phonon::Mrl(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        const QString* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J1", sipType_QString,&a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Phonon::Mrl(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

            return sipCpp;
        }
    }

    return NULL;
}


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


static PyMethodDef methods_Phonon_Mrl[] = {
    {SIP_MLNAME_CAST(sipName_toEncoded), meth_Phonon_Mrl_toEncoded, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_phonon_Phonon_Mrl = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_Phonon__Mrl,
        {0}
    },
    {
        sipNameNr_Mrl,
        {0, 255, 0},
        1, methods_Phonon_Mrl,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_Phonon_Mrl,
    0,
    init_type_Phonon_Mrl,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Phonon_Mrl,
    assign_Phonon_Mrl,
    array_Phonon_Mrl,
    copy_Phonon_Mrl,
    release_Phonon_Mrl,
    0,
    0,
    0,
    0,
    0,
    0,
    0
},
    0,
    0,
    0
};



static sipEnumMemberDef enummembers_Phonon_Capture[] = {
    {sipName_AudioType, static_cast<int>(Phonon::Capture::AudioType), 13},
    {sipName_VideoType, static_cast<int>(Phonon::Capture::VideoType), 13},
};


pyqt4ClassTypeDef sipTypeDef_phonon_Phonon_Capture = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_NAMESPACE,
        sipNameNr_Phonon__Capture,
        {0}
    },
    {
        sipNameNr_Capture,
        {0, 255, 0},
        0, 0,
        2, enummembers_Phonon_Capture,
        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
};


#line 31 "/usr/share/python3-sip/PyQt4/QtCore/qstring.sip"
#include <qstring.h>
#line 306 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 27 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/phonon/effectparameter.sip"
#include <phonon/effectparameter.h>
#line 309 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 27 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/phonon/mediaobject.sip"
#include <phonon/mediaobject.h>
#line 312 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 27 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/phonon/mediasource.sip"
#include <phonon/mediasource.h>
#line 315 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 27 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/phonon/path.sip"
#include <phonon/path.h>
#line 318 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"
#line 27 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/phonon/medianode.sip"
#include <phonon/medianode.h>
#line 321 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/phonon/sipphononpart7.cpp"


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

    {
        Phonon::MediaNode* a0;
        Phonon::MediaNode* a1;

        if (sipParseArgs(&sipParseErr, sipArgs, "J8J8", sipType_Phonon_MediaNode, &a0, sipType_Phonon_MediaNode, &a1))
        {
            Phonon::Path*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Phonon::Path(Phonon::createPath(a0,a1));
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            Phonon::registerMetaTypes();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        Phonon::Category a0;
        const Phonon::MediaSource& a1def = Phonon::MediaSource();
        const Phonon::MediaSource* a1 = &a1def;

        if (sipParseArgs(&sipParseErr, sipArgs, "E|J9", sipType_Phonon_Category, &a0, sipType_Phonon_MediaSource, &a1))
        {
            Phonon::MediaObject*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = Phonon::createPlayer(a0,*a1);
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_Phonon_MediaObject,NULL);
        }
    }

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

    return NULL;
}


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

    {
        const Phonon::EffectParameter* a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9", sipType_Phonon_EffectParameter, &a0))
        {
            uint sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = Phonon::qHash(*a0);
            Py_END_ALLOW_THREADS

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        Phonon::Category a0;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(Phonon::categoryToString(a0));
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            const char*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = Phonon::phononVersion();
            Py_END_ALLOW_THREADS

            if (sipRes == NULL)
            {
                Py_INCREF(Py_None);
                return Py_None;
            }

            return PyUnicode_DecodeASCII(sipRes, strlen(sipRes), NULL);
        }
    }

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

    return NULL;
}


static PyMethodDef methods_Phonon[] = {
    {SIP_MLNAME_CAST(sipName_categoryToString), meth_Phonon_categoryToString, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_createPath), meth_Phonon_createPath, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_createPlayer), meth_Phonon_createPlayer, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_phononVersion), meth_Phonon_phononVersion, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_qHash), meth_Phonon_qHash, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_registerMetaTypes), meth_Phonon_registerMetaTypes, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_Phonon[] = {
    {sipName_AccessibilityCategory, static_cast<int>(Phonon::AccessibilityCategory), 15},
    {sipName_AlbumMetaData, static_cast<int>(Phonon::AlbumMetaData), 33},
    {sipName_ArtistMetaData, static_cast<int>(Phonon::ArtistMetaData), 33},
    {sipName_AudioCaptureDeviceType, static_cast<int>(Phonon::AudioCaptureDeviceType), 37},
    {sipName_AudioChannelType, static_cast<int>(Phonon::AudioChannelType), 37},
    {sipName_AudioOutputDeviceType, static_cast<int>(Phonon::AudioOutputDeviceType), 37},
    {sipName_BufferingState, static_cast<int>(Phonon::BufferingState), 41},
    {sipName_Cd, static_cast<int>(Phonon::Cd), 16},
    {sipName_CommunicationCaptureCategory, static_cast<int>(Phonon::CommunicationCaptureCategory), 14},
    {sipName_CommunicationCategory, static_cast<int>(Phonon::CommunicationCategory), 15},
    {sipName_ControlCaptureCategory, static_cast<int>(Phonon::ControlCaptureCategory), 14},
    {sipName_DateMetaData, static_cast<int>(Phonon::DateMetaData), 33},
    {sipName_DescriptionMetaData, static_cast<int>(Phonon::DescriptionMetaData), 33},
    {sipName_Dvd, static_cast<int>(Phonon::Dvd), 16},
    {sipName_EffectType, static_cast<int>(Phonon::EffectType), 37},
    {sipName_ErrorState, static_cast<int>(Phonon::ErrorState), 41},
    {sipName_FatalError, static_cast<int>(Phonon::FatalError), 23},
    {sipName_GameCategory, static_cast<int>(Phonon::GameCategory), 15},
    {sipName_GenreMetaData, static_cast<int>(Phonon::GenreMetaData), 33},
    {sipName_LastCategory, static_cast<int>(Phonon::LastCategory), 15},
    {sipName_LoadingState, static_cast<int>(Phonon::LoadingState), 41},
    {sipName_MusicBrainzDiscIdMetaData, static_cast<int>(Phonon::MusicBrainzDiscIdMetaData), 33},
    {sipName_MusicCategory, static_cast<int>(Phonon::MusicCategory), 15},
    {sipName_NoCaptureCategory, static_cast<int>(Phonon::NoCaptureCategory), 14},
    {sipName_NoCategory, static_cast<int>(Phonon::NoCategory), 15},
    {sipName_NoDisc, static_cast<int>(Phonon::NoDisc), 16},
    {sipName_NoError, static_cast<int>(Phonon::NoError), 23},
    {sipName_NormalError, static_cast<int>(Phonon::NormalError), 23},
    {sipName_NotificationCategory, static_cast<int>(Phonon::NotificationCategory), 15},
    {sipName_PausedState, static_cast<int>(Phonon::PausedState), 41},
    {sipName_PlayingState, static_cast<int>(Phonon::PlayingState), 41},
    {sipName_RecordingCaptureCategory, static_cast<int>(Phonon::RecordingCaptureCategory), 14},
    {sipName_StoppedState, static_cast<int>(Phonon::StoppedState), 41},
    {sipName_SubtitleType, static_cast<int>(Phonon::SubtitleType), 37},
    {sipName_TitleMetaData, static_cast<int>(Phonon::TitleMetaData), 33},
    {sipName_TracknumberMetaData, static_cast<int>(Phonon::TracknumberMetaData), 33},
    {sipName_Vcd, static_cast<int>(Phonon::Vcd), 16},
    {sipName_VideoCaptureDeviceType, static_cast<int>(Phonon::VideoCaptureDeviceType), 37},
    {sipName_VideoCategory, static_cast<int>(Phonon::VideoCategory), 15},
};


pyqt4ClassTypeDef sipTypeDef_phonon_Phonon = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_NAMESPACE,
        sipNameNr_Phonon,
        {0}
    },
    {
        sipNameNr_Phonon,
        {0, 0, 1},
        6, methods_Phonon,
        39, enummembers_Phonon,
        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
};
