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

#include "sipAPIknewstuff.h"

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/knewstuff/category.sip"
#include <knewstuff2/core/category.h>
#line 12 "sipknewstuffpart6.cpp"

#line 33 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/kdecore/kurl.sip"
#include <kurl.h>
#line 16 "sipknewstuffpart6.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/knewstuff/ktranslatable.sip"
#include <knewstuff2/core/ktranslatable.h>
#line 19 "sipknewstuffpart6.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 22 "sipknewstuffpart6.cpp"


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

    {
        const QString * a0;
        int a0State = 0;
        KNS::Category *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KNS_Category, &sipCpp, sipType_QString,&a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setId(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        KNS::Category *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(sipCpp->id());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const KNS::KTranslatable * a0;
        KNS::Category *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KNS_Category, &sipCpp, sipType_KNS_KTranslatable, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setName(*a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        KNS::Category *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KNS_Category, &sipCpp))
        {
            KNS::KTranslatable *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KNS::KTranslatable(sipCpp->name());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const KNS::KTranslatable * a0;
        KNS::Category *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KNS_Category, &sipCpp, sipType_KNS_KTranslatable, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setDescription(*a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        KNS::Category *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KNS_Category, &sipCpp))
        {
            KNS::KTranslatable *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KNS::KTranslatable(sipCpp->description());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const KUrl * a0;
        KNS::Category *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_KNS_Category, &sipCpp, sipType_KUrl, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setIcon(*a0);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        KNS::Category *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new KUrl(sipCpp->icon());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    return NULL;
}


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

    delete reinterpret_cast<KNS::Category *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_KNS_Category(sipSimpleWrapper *);}
static void dealloc_KNS_Category(sipSimpleWrapper *sipSelf)
{
    if (sipIsPyOwned(sipSelf))
    {
        release_KNS_Category(sipSelf->u.cppPtr,0);
    }
}


extern "C" {static void *init_KNS_Category(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_KNS_Category(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    KNS::Category *sipCpp = 0;

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

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KNS_Category[] = {
    {SIP_MLNAME_CAST(sipName_description), meth_KNS_Category_description, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_icon), meth_KNS_Category_icon, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_id), meth_KNS_Category_id, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_name), meth_KNS_Category_name, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setDescription), meth_KNS_Category_setDescription, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setIcon), meth_KNS_Category_setIcon, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setId), meth_KNS_Category_setId, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setName), meth_KNS_Category_setName, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_knewstuff_KNS_Category = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_KNS__Category,
        {0}
    },
    {
        sipNameNr_Category,
        {0, 255, 0},
        8, methods_KNS_Category,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    0,
    init_KNS_Category,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KNS_Category,
    0,
    0,
    0,
    release_KNS_Category,
    cast_KNS_Category,
    0,
    0,
    0
},
    0,
    0,
    0
};

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/knewstuff/author.sip"
#include <knewstuff2/core/author.h>
#line 360 "sipknewstuffpart6.cpp"

#line 41 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 364 "sipknewstuffpart6.cpp"


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

    {
        const QString * a0;
        int a0State = 0;
        KNS::Author *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KNS_Author, &sipCpp, sipType_QString,&a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setName(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        KNS::Author *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(sipCpp->name());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const QString * a0;
        int a0State = 0;
        KNS::Author *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KNS_Author, &sipCpp, sipType_QString,&a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setEmail(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        KNS::Author *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(sipCpp->email());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const QString * a0;
        int a0State = 0;
        KNS::Author *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KNS_Author, &sipCpp, sipType_QString,&a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setJabber(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        KNS::Author *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(sipCpp->jabber());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const QString * a0;
        int a0State = 0;
        KNS::Author *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KNS_Author, &sipCpp, sipType_QString,&a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setHomepage(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        KNS::Author *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(sipCpp->homepage());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    return NULL;
}


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

    delete reinterpret_cast<KNS::Author *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


extern "C" {static void *array_KNS_Author(SIP_SSIZE_T);}
static void *array_KNS_Author(SIP_SSIZE_T sipNrElem)
{
    return new KNS::Author[sipNrElem];
}


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


extern "C" {static void dealloc_KNS_Author(sipSimpleWrapper *);}
static void dealloc_KNS_Author(sipSimpleWrapper *sipSelf)
{
    if (sipIsPyOwned(sipSelf))
    {
        release_KNS_Author(sipSelf->u.cppPtr,0);
    }
}


extern "C" {static void *init_KNS_Author(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_KNS_Author(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    KNS::Author *sipCpp = 0;

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

            return sipCpp;
        }
    }

    {
        const KNS::Author * a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_KNS_Author, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new KNS::Author(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KNS_Author[] = {
    {SIP_MLNAME_CAST(sipName_email), meth_KNS_Author_email, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_homepage), meth_KNS_Author_homepage, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_jabber), meth_KNS_Author_jabber, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_name), meth_KNS_Author_name, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setEmail), meth_KNS_Author_setEmail, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setHomepage), meth_KNS_Author_setHomepage, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setJabber), meth_KNS_Author_setJabber, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setName), meth_KNS_Author_setName, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_knewstuff_KNS_Author = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_KNS__Author,
        {0}
    },
    {
        sipNameNr_Author,
        {0, 255, 0},
        8, methods_KNS_Author,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    0,
    init_KNS_Author,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KNS_Author,
    assign_KNS_Author,
    array_KNS_Author,
    copy_KNS_Author,
    release_KNS_Author,
    cast_KNS_Author,
    0,
    0,
    0
},
    0,
    0,
    0
};
