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

#include "sipAPIphonon.h"

#line 25 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/mrl.sip"
#include <mrl.h>
#line 12 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"

#line 35 "/usr/local/share/py-sip/QtCore/qurl.sip"
#include <qurl.h>
#line 16 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 19 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 22 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 35 "/usr/local/share/py-sip/QtCore/qurl.sip"
#include <qurl.h>
#line 25 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 33 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 201 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#include <qpair.h>
#line 32 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 35 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 201 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#include <qpair.h>
#line 39 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 77 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 42 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/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;
        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;
}


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

    if (targetType == sipType_Phonon_Mrl)
        return ptr;

    if ((res = ((const sipClassTypeDef *)sipType_QUrl)->ctd_cast((QUrl *)(Phonon::Mrl *)ptr,targetType)) != NULL)
        return res;

    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_Phonon_Mrl(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_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[] = {{235, 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_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,
    cast_Phonon_Mrl,
    0,
    0,
    0
},
    0,
    0,
    0
};



static sipEnumMemberDef enummembers_Phonon_Capture[] = {
    {sipName_AudioType, Phonon::Capture::AudioType, 13},
    {sipName_VideoType, 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
};


#line 36 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 316 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/effectparameter.sip"
#include <phonon/effectparameter.h>
#line 319 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/mediaobject.sip"
#include <phonon/mediaobject.h>
#line 322 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/mediasource.sip"
#include <phonon/mediasource.h>
#line 325 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/path.sip"
#include <phonon/path.h>
#line 328 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/sipphononpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/phonon/medianode.sip"
#include <phonon/medianode.h>
#line 331 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/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, Phonon::AccessibilityCategory, 15},
    {sipName_AlbumMetaData, Phonon::AlbumMetaData, 33},
    {sipName_ArtistMetaData, Phonon::ArtistMetaData, 33},
    {sipName_AudioCaptureDeviceType, Phonon::AudioCaptureDeviceType, 37},
    {sipName_AudioChannelType, Phonon::AudioChannelType, 37},
    {sipName_AudioOutputDeviceType, Phonon::AudioOutputDeviceType, 37},
    {sipName_BufferingState, Phonon::BufferingState, 41},
    {sipName_Cd, Phonon::Cd, 16},
    {sipName_CommunicationCaptureCategory, Phonon::CommunicationCaptureCategory, 14},
    {sipName_CommunicationCategory, Phonon::CommunicationCategory, 15},
    {sipName_ControlCaptureCategory, Phonon::ControlCaptureCategory, 14},
    {sipName_DateMetaData, Phonon::DateMetaData, 33},
    {sipName_DescriptionMetaData, Phonon::DescriptionMetaData, 33},
    {sipName_Dvd, Phonon::Dvd, 16},
    {sipName_EffectType, Phonon::EffectType, 37},
    {sipName_ErrorState, Phonon::ErrorState, 41},
    {sipName_FatalError, Phonon::FatalError, 23},
    {sipName_GameCategory, Phonon::GameCategory, 15},
    {sipName_GenreMetaData, Phonon::GenreMetaData, 33},
    {sipName_LastCategory, Phonon::LastCategory, 15},
    {sipName_LoadingState, Phonon::LoadingState, 41},
    {sipName_MusicBrainzDiscIdMetaData, Phonon::MusicBrainzDiscIdMetaData, 33},
    {sipName_MusicCategory, Phonon::MusicCategory, 15},
    {sipName_NoCaptureCategory, Phonon::NoCaptureCategory, 14},
    {sipName_NoCategory, Phonon::NoCategory, 15},
    {sipName_NoDisc, Phonon::NoDisc, 16},
    {sipName_NoError, Phonon::NoError, 23},
    {sipName_NormalError, Phonon::NormalError, 23},
    {sipName_NotificationCategory, Phonon::NotificationCategory, 15},
    {sipName_PausedState, Phonon::PausedState, 41},
    {sipName_PlayingState, Phonon::PlayingState, 41},
    {sipName_RecordingCaptureCategory, Phonon::RecordingCaptureCategory, 14},
    {sipName_StoppedState, Phonon::StoppedState, 41},
    {sipName_SubtitleType, Phonon::SubtitleType, 37},
    {sipName_TitleMetaData, Phonon::TitleMetaData, 33},
    {sipName_TracknumberMetaData, Phonon::TracknumberMetaData, 33},
    {sipName_Vcd, Phonon::Vcd, 16},
    {sipName_VideoCaptureDeviceType, Phonon::VideoCaptureDeviceType, 37},
    {sipName_VideoCategory, 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
};
