/*
 * Module code.
 *
 * Generated by SIP 4.11.2 on Wed Feb  9 17:29:52 2011
 */

#include "sipAPInepomuk.h"

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/groupterm.sip"
#include <nepomuk/groupterm.h>
#line 12 "sipnepomukpart7.cpp"

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/term.sip"
#include <nepomuk/term.h>
#line 16 "sipnepomukpart7.cpp"
#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 19 "sipnepomukpart7.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 22 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/optionalterm.sip"
#include <nepomuk/optionalterm.h>
#line 25 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/resourcetypeterm.sip"
#include <nepomuk/resourcetypeterm.h>
#line 28 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/comparisonterm.sip"
#include <nepomuk/comparisonterm.h>
#line 31 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/orterm.sip"
#include <nepomuk/orterm.h>
#line 34 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/andterm.sip"
#include <nepomuk/andterm.h>
#line 37 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/negationterm.sip"
#include <nepomuk/negationterm.h>
#line 40 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/resourceterm.sip"
#include <nepomuk/resourceterm.h>
#line 43 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/literalterm.sip"
#include <nepomuk/literalterm.h>
#line 46 "sipnepomukpart7.cpp"


class sipNepomuk_Query_GroupTerm : public Nepomuk::Query::GroupTerm
{
public:
    sipNepomuk_Query_GroupTerm(const Nepomuk::Query::Term&);
    sipNepomuk_Query_GroupTerm(const Nepomuk::Query::GroupTerm&);
    ~sipNepomuk_Query_GroupTerm();

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipNepomuk_Query_GroupTerm(const sipNepomuk_Query_GroupTerm &);
    sipNepomuk_Query_GroupTerm &operator = (const sipNepomuk_Query_GroupTerm &);
};

sipNepomuk_Query_GroupTerm::sipNepomuk_Query_GroupTerm(const Nepomuk::Query::Term& a0): Nepomuk::Query::GroupTerm(a0), sipPySelf(0)
{
}

sipNepomuk_Query_GroupTerm::sipNepomuk_Query_GroupTerm(const Nepomuk::Query::GroupTerm& a0): Nepomuk::Query::GroupTerm(a0), sipPySelf(0)
{
}

sipNepomuk_Query_GroupTerm::~sipNepomuk_Query_GroupTerm()
{
    sipCommonDtor(sipPySelf);
}


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

    {
        Nepomuk::Query::GroupTerm *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Nepomuk_Query_GroupTerm, &sipCpp))
        {
            QList<Nepomuk::Query::Term> *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<Nepomuk::Query::Term>(sipCpp->subTerms());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const QList<Nepomuk::Query::Term> * a0;
        int a0State = 0;
        Nepomuk::Query::GroupTerm *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_Nepomuk_Query_GroupTerm, &sipCpp, sipType_QList_0100Nepomuk_Query_Term,&a0, &a0State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setSubTerms(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QList<Nepomuk::Query::Term> *>(a0),sipType_QList_0100Nepomuk_Query_Term,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const Nepomuk::Query::Term * a0;
        Nepomuk::Query::GroupTerm *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_Nepomuk_Query_GroupTerm, &sipCpp, sipType_Nepomuk_Query_Term, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->addSubTerm(*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_GroupTerm, sipName_addSubTerm, NULL);

    return NULL;
}


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

    if (targetType == sipType_Nepomuk_Query_GroupTerm)
        return ptr;

    if ((res = ((const sipClassTypeDef *)sipType_Nepomuk_Query_Term)->ctd_cast((Nepomuk::Query::Term *)(Nepomuk::Query::GroupTerm *)ptr,targetType)) != NULL)
        return res;

    return NULL;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipNepomuk_Query_GroupTerm *>(sipCppV);
    else
        delete reinterpret_cast<Nepomuk::Query::GroupTerm *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_Nepomuk_Query_GroupTerm(sipSimpleWrapper *);}
static void dealloc_Nepomuk_Query_GroupTerm(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerived(sipSelf))
        reinterpret_cast<sipNepomuk_Query_GroupTerm *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

    if (sipIsPyOwned(sipSelf))
    {
        release_Nepomuk_Query_GroupTerm(sipGetAddress(sipSelf),sipSelf->flags);
    }
}


extern "C" {static void *init_Nepomuk_Query_GroupTerm(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_Nepomuk_Query_GroupTerm(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipNepomuk_Query_GroupTerm *sipCpp = 0;

    {
        const Nepomuk::Query::Term * a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_Nepomuk_Query_Term, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipNepomuk_Query_GroupTerm(*a0);
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const Nepomuk::Query::GroupTerm * a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_Nepomuk_Query_GroupTerm, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipNepomuk_Query_GroupTerm(*a0);
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


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


static PyMethodDef methods_Nepomuk_Query_GroupTerm[] = {
    {SIP_MLNAME_CAST(sipName_addSubTerm), meth_Nepomuk_Query_GroupTerm_addSubTerm, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setSubTerms), meth_Nepomuk_Query_GroupTerm_setSubTerms, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_subTerms), meth_Nepomuk_Query_GroupTerm_subTerms, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_nepomuk_Nepomuk_Query_GroupTerm = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_Nepomuk__Query__GroupTerm,
        {0}
    },
    {
        sipNameNr_GroupTerm,
        {7, 255, 0},
        3, methods_Nepomuk_Query_GroupTerm,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_Nepomuk_Query_GroupTerm,
    0,
    init_Nepomuk_Query_GroupTerm,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Nepomuk_Query_GroupTerm,
    0,
    0,
    0,
    release_Nepomuk_Query_GroupTerm,
    cast_Nepomuk_Query_GroupTerm,
    0,
    0,
    0
},
    0,
    0,
    0
};


#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/query.sip"
#include <nepomuk/query.h>
#line 44 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/query.sip"
#include <nepomuk/query.h>
#line 310 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/term.sip"
#include <nepomuk/term.h>
#line 313 "sipnepomukpart7.cpp"


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

    {
        const Nepomuk::Query::Query * a0;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = Nepomuk::Query::qHash(*a0);
            Py_END_ALLOW_THREADS

            return PyLong_FromUnsignedLong(sipRes);
        }
    }

    {
        const Nepomuk::Query::Term * a0;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = Nepomuk::Query::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;
}


static PyMethodDef methods_Nepomuk_Query[] = {
    {SIP_MLNAME_CAST(sipName_qHash), meth_Nepomuk_Query_qHash, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_nepomuk_Nepomuk_Query = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_NAMESPACE,
        sipNameNr_Nepomuk__Query,
        {0}
    },
    {
        sipNameNr_Query,
        {4, 255, 0},
        1, methods_Nepomuk_Query,
        0, 0,
        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 40 "/usr/local/share/py-sip/QtCore/qurl.sip"
#include <qurl.h>
#line 416 "sipnepomukpart7.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 419 "sipnepomukpart7.cpp"
#line 45 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/resource.sip"
#include <nepomuk/resource.h>
#line 422 "sipnepomukpart7.cpp"
#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 425 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/soprano/node.sip"
#include <soprano/node.h>
#line 428 "sipnepomukpart7.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.5.5/python/pykde4/sip/nepomuk/variant.sip"
#include <nepomuk/variant.h>
#line 431 "sipnepomukpart7.cpp"


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

    {
        const Soprano::Node * a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9", sipType_Soprano_Node, &a0))
        {
            Nepomuk::Variant *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Nepomuk::Variant(Nepomuk::RDFLiteralToValue(*a0));
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const Nepomuk::Variant * a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9", sipType_Nepomuk_Variant, &a0))
        {
            Soprano::Node *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Soprano::Node(Nepomuk::valueToRDFNode(*a0));
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const Nepomuk::Variant * a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9", sipType_Nepomuk_Variant, &a0))
        {
            QList<Soprano::Node> *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<Soprano::Node>(Nepomuk::valuesToRDFNodes(*a0));
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const Nepomuk::Resource * a0;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = Nepomuk::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_Nepomuk_errorString(PyObject *, PyObject *);}
static PyObject *meth_Nepomuk_errorString(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        Nepomuk::ErrorCode a0;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(Nepomuk::errorString(a0));
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const QUrl * a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9", sipType_QUrl, &a0))
        {
            QUrl *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QUrl(Nepomuk::extractNamespace(*a0));
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


static PyMethodDef methods_Nepomuk[] = {
    {SIP_MLNAME_CAST(sipName_RDFLiteralToValue), meth_Nepomuk_RDFLiteralToValue, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_errorString), meth_Nepomuk_errorString, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_extractNamespace), meth_Nepomuk_extractNamespace, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_qHash), meth_Nepomuk_qHash, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_valueToRDFNode), meth_Nepomuk_valueToRDFNode, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_valuesToRDFNodes), meth_Nepomuk_valuesToRDFNodes, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_Nepomuk[] = {
    {sipName_CommunicationError, Nepomuk::CommunicationError, 5},
    {sipName_InvalidType, Nepomuk::InvalidType, 5},
    {sipName_NoError, Nepomuk::NoError, 5},
    {sipName_UnknownError, Nepomuk::UnknownError, 5},
};


pyqt4ClassTypeDef sipTypeDef_nepomuk_Nepomuk = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_NAMESPACE,
        sipNameNr_Nepomuk,
        {0}
    },
    {
        sipNameNr_Nepomuk,
        {0, 0, 1},
        6, methods_Nepomuk,
        4, enummembers_Nepomuk,
        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
};
