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

#include "sipAPInepomuk.h"

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

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/term.sip"
#include <nepomuk/term.h>
#line 16 "sipnepomukpart2.cpp"


extern "C" {static void assign_QList_0100Nepomuk_Query_Term(void *, SIP_SSIZE_T, const void *);}
static void assign_QList_0100Nepomuk_Query_Term(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<QList<Nepomuk::Query::Term> *>(sipDst)[sipDstIdx] = *reinterpret_cast<const QList<Nepomuk::Query::Term> *>(sipSrc);
}


extern "C" {static void *array_QList_0100Nepomuk_Query_Term(SIP_SSIZE_T);}
static void *array_QList_0100Nepomuk_Query_Term(SIP_SSIZE_T sipNrElem)
{
    return new QList<Nepomuk::Query::Term>[sipNrElem];
}


extern "C" {static void *copy_QList_0100Nepomuk_Query_Term(const void *, SIP_SSIZE_T);}
static void *copy_QList_0100Nepomuk_Query_Term(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new QList<Nepomuk::Query::Term>(reinterpret_cast<const QList<Nepomuk::Query::Term> *>(sipSrc)[sipSrcIdx]);
}


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



extern "C" {static int convertTo_QList_0100Nepomuk_Query_Term(PyObject *, void **, int *, PyObject *);}
static int convertTo_QList_0100Nepomuk_Query_Term(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    QList<Nepomuk::Query::Term> **sipCppPtr = reinterpret_cast<QList<Nepomuk::Query::Term> **>(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_Nepomuk_Query_Term, SIP_NOT_NONE));

            Py_XDECREF(itm);

            if (!ok)
                return 0;
        }

        return 1;
    }

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

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

            delete ql;
            return 0;
        }

        ql->append(*t);

        sipReleaseType(t, sipType_Nepomuk_Query_Term, state);
    }
 
    *sipCppPtr = ql;
 
    return sipGetState(sipTransferObj);
#line 106 "sipnepomukpart2.cpp"
}


extern "C" {static PyObject *convertFrom_QList_0100Nepomuk_Query_Term(void *, PyObject *);}
static PyObject *convertFrom_QList_0100Nepomuk_Query_Term(void *sipCppV,PyObject *sipTransferObj)
{
   QList<Nepomuk::Query::Term> *sipCpp = reinterpret_cast<QList<Nepomuk::Query::Term> *>(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)
    {
        Nepomuk::Query::Term *t = new Nepomuk::Query::Term(sipCpp->at(i));
        PyObject *tobj;

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

            return NULL;
        }

        PyList_SET_ITEM(l, i, tobj);
    }

    return l;
#line 140 "sipnepomukpart2.cpp"
}


sipMappedTypeDef sipTypeDef_nepomuk_QList_0100Nepomuk_Query_Term = {
    {
        -1,
        0,
        0,
        SIP_TYPE_MAPPED,
        sipNameNr_621,
        {0}
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_QList_0100Nepomuk_Query_Term,
    array_QList_0100Nepomuk_Query_Term,
    copy_QList_0100Nepomuk_Query_Term,
    release_QList_0100Nepomuk_Query_Term,
    convertTo_QList_0100Nepomuk_Query_Term,
    convertFrom_QList_0100Nepomuk_Query_Term
};

#line 38 "/usr/local/share/py-sip/QtCore/qhash.sip"
#include <qhash.h>
#line 171 "sipnepomukpart2.cpp"

#line 83 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 175 "sipnepomukpart2.cpp"
#line 29 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/property.sip"
#include <nepomuk/property.h>
#line 178 "sipnepomukpart2.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 181 "sipnepomukpart2.cpp"


extern "C" {static void assign_QHash_0100QString_0100Nepomuk_Types_Property(void *, SIP_SSIZE_T, const void *);}
static void assign_QHash_0100QString_0100Nepomuk_Types_Property(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<QHash<QString,Nepomuk::Types::Property> *>(sipDst)[sipDstIdx] = *reinterpret_cast<const QHash<QString,Nepomuk::Types::Property> *>(sipSrc);
}


extern "C" {static void *array_QHash_0100QString_0100Nepomuk_Types_Property(SIP_SSIZE_T);}
static void *array_QHash_0100QString_0100Nepomuk_Types_Property(SIP_SSIZE_T sipNrElem)
{
    return new QHash<QString,Nepomuk::Types::Property>[sipNrElem];
}


extern "C" {static void *copy_QHash_0100QString_0100Nepomuk_Types_Property(const void *, SIP_SSIZE_T);}
static void *copy_QHash_0100QString_0100Nepomuk_Types_Property(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new QHash<QString,Nepomuk::Types::Property>(reinterpret_cast<const QHash<QString,Nepomuk::Types::Property> *>(sipSrc)[sipSrcIdx]);
}


/* Call the mapped type's destructor. */
extern "C" {static void release_QHash_0100QString_0100Nepomuk_Types_Property(void *, int);}
static void release_QHash_0100QString_0100Nepomuk_Types_Property(void *ptr, int)
{
    Py_BEGIN_ALLOW_THREADS
    delete reinterpret_cast<QHash<QString,Nepomuk::Types::Property> *>(ptr);
    Py_END_ALLOW_THREADS
}



extern "C" {static int convertTo_QHash_0100QString_0100Nepomuk_Types_Property(PyObject *, void **, int *, PyObject *);}
static int convertTo_QHash_0100QString_0100Nepomuk_Types_Property(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
    QHash<QString,Nepomuk::Types::Property> **sipCppPtr = reinterpret_cast<QHash<QString,Nepomuk::Types::Property> **>(sipCppPtrV);

#line 94 "/usr/local/share/py-sip/QtCore/qhash.sip"
    PyObject *t1obj, *t2obj;
    SIP_SSIZE_T i = 0;

    // Check the type if that is all that is required.
    if (sipIsErr == NULL)
    {
        if (!PyDict_Check(sipPy))
            return 0;

        while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
        {
            if (!sipCanConvertToType(t1obj, sipType_QString, SIP_NOT_NONE))
                return 0;

            if (!sipCanConvertToType(t2obj, sipType_Nepomuk_Types_Property, SIP_NOT_NONE))
                return 0;
        } 

        return 1;
    }

    QHash<QString, Nepomuk::Types::Property> *qm = new QHash<QString, Nepomuk::Types::Property>;
 
    while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
    {
        int state1, state2;

        QString *t1 = reinterpret_cast<QString *>(sipConvertToType(t1obj, sipType_QString, sipTransferObj, SIP_NOT_NONE, &state1, sipIsErr));
        Nepomuk::Types::Property *t2 = reinterpret_cast<Nepomuk::Types::Property *>(sipConvertToType(t2obj, sipType_Nepomuk_Types_Property, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
 
        if (*sipIsErr)
        {
            sipReleaseType(t1, sipType_QString, state1);
            sipReleaseType(t2, sipType_Nepomuk_Types_Property, state2);

            delete qm;
            return 0;
        }

        qm->insert(*t1, *t2);

        sipReleaseType(t1, sipType_QString, state1);
        sipReleaseType(t2, sipType_Nepomuk_Types_Property, state2);
    }
 
    *sipCppPtr = qm;
 
    return sipGetState(sipTransferObj);
#line 270 "sipnepomukpart2.cpp"
}


extern "C" {static PyObject *convertFrom_QHash_0100QString_0100Nepomuk_Types_Property(void *, PyObject *);}
static PyObject *convertFrom_QHash_0100QString_0100Nepomuk_Types_Property(void *sipCppV,PyObject *sipTransferObj)
{
   QHash<QString,Nepomuk::Types::Property> *sipCpp = reinterpret_cast<QHash<QString,Nepomuk::Types::Property> *>(sipCppV);

#line 42 "/usr/local/share/py-sip/QtCore/qhash.sip"
    // Create the dictionary.
    PyObject *d = PyDict_New();

    if (!d)
        return NULL;

    // Set the dictionary elements.
    QHash<QString, Nepomuk::Types::Property>::const_iterator i = sipCpp->constBegin();

    while (i != sipCpp->constEnd())
    {
        QString *t1 = new QString(i.key());
        Nepomuk::Types::Property *t2 = new Nepomuk::Types::Property(i.value());

        PyObject *t1obj = sipConvertFromNewType(t1, sipType_QString, sipTransferObj);
        PyObject *t2obj = sipConvertFromNewType(t2, sipType_Nepomuk_Types_Property, sipTransferObj);

        if (t1obj == NULL || t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
        {
            Py_DECREF(d);

            if (t1obj)
            {
                Py_DECREF(t1obj);
            }
            else
            {
                delete t1;
            }

            if (t2obj)
            {
                Py_DECREF(t2obj);
            }
            else
            {
                delete t2;
            }

            return NULL;
        }

        Py_DECREF(t1obj);
        Py_DECREF(t2obj);

        ++i;
    }

    return d;
#line 329 "sipnepomukpart2.cpp"
}


sipMappedTypeDef sipTypeDef_nepomuk_QHash_0100QString_0100Nepomuk_Types_Property = {
    {
        -1,
        0,
        0,
        SIP_TYPE_MAPPED,
        sipNameNr_135,
        {0}
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_QHash_0100QString_0100Nepomuk_Types_Property,
    array_QHash_0100QString_0100Nepomuk_Types_Property,
    copy_QHash_0100QString_0100Nepomuk_Types_Property,
    release_QHash_0100QString_0100Nepomuk_Types_Property,
    convertTo_QHash_0100QString_0100Nepomuk_Types_Property,
    convertFrom_QHash_0100QString_0100Nepomuk_Types_Property
};

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/result.sip"
#include <nepomuk/result.h>
#line 360 "sipnepomukpart2.cpp"

#line 45 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/resource.sip"
#include <nepomuk/resource.h>
#line 364 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/soprano/node.sip"
#include <soprano/node.h>
#line 367 "sipnepomukpart2.cpp"
#line 29 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/property.sip"
#include <nepomuk/property.h>
#line 370 "sipnepomukpart2.cpp"
#line 38 "/usr/local/share/py-sip/QtCore/qhash.sip"
#include <qhash.h>
#line 373 "sipnepomukpart2.cpp"


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

    {
        Nepomuk::Query::Result *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Nepomuk_Query_Result, &sipCpp))
        {
            double sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->score();
            Py_END_ALLOW_THREADS

            return PyFloat_FromDouble(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        Nepomuk::Query::Result *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Nepomuk_Query_Result, &sipCpp))
        {
            Nepomuk::Resource *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Nepomuk::Resource(sipCpp->resource());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        double a0;
        Nepomuk::Query::Result *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_Nepomuk_Query_Result, &sipCpp, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setScore(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_Result, sipName_setScore, NULL);

    return NULL;
}


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

    {
        const Nepomuk::Types::Property * a0;
        const Soprano::Node * a1;
        Nepomuk::Query::Result *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J9", &sipSelf, sipType_Nepomuk_Query_Result, &sipCpp, sipType_Nepomuk_Types_Property, &a0, sipType_Soprano_Node, &a1))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->addRequestProperty(*a0,*a1);
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        Nepomuk::Query::Result *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Nepomuk_Query_Result, &sipCpp))
        {
            QHash<Nepomuk::Types::Property,Soprano::Node> *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QHash<Nepomuk::Types::Property,Soprano::Node>(sipCpp->requestProperties());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const Nepomuk::Types::Property * a0;
        Nepomuk::Query::Result *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_Nepomuk_Query_Result, &sipCpp, sipType_Nepomuk_Types_Property, &a0))
        {
            Soprano::Node *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Soprano::Node(sipCpp->requestProperty(*a0));
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


extern "C" {static PyObject *slot_Nepomuk_Query_Result___ne__(PyObject *sipSelf,PyObject *sipArg);}
static PyObject *slot_Nepomuk_Query_Result___ne__(PyObject *sipSelf,PyObject *sipArg)
{
    Nepomuk::Query::Result *sipCpp = reinterpret_cast<Nepomuk::Query::Result *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Nepomuk_Query_Result));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

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

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_Nepomuk_Query_Result, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = !sipCpp->Nepomuk::Query::Result::operator==(*a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_nepomuk,ne_slot,sipType_Nepomuk_Query_Result,sipSelf,sipArg);
}


extern "C" {static PyObject *slot_Nepomuk_Query_Result___eq__(PyObject *sipSelf,PyObject *sipArg);}
static PyObject *slot_Nepomuk_Query_Result___eq__(PyObject *sipSelf,PyObject *sipArg)
{
    Nepomuk::Query::Result *sipCpp = reinterpret_cast<Nepomuk::Query::Result *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Nepomuk_Query_Result));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

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

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_Nepomuk_Query_Result, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->Nepomuk::Query::Result::operator==(*a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_nepomuk,eq_slot,sipType_Nepomuk_Query_Result,sipSelf,sipArg);
}


extern "C" {static PyObject *slot_Nepomuk_Query_Result___getitem__(PyObject *sipSelf,PyObject *sipArg);}
static PyObject *slot_Nepomuk_Query_Result___getitem__(PyObject *sipSelf,PyObject *sipArg)
{
    Nepomuk::Query::Result *sipCpp = reinterpret_cast<Nepomuk::Query::Result *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_Nepomuk_Query_Result));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const Nepomuk::Types::Property * a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_Nepomuk_Types_Property, &a0))
        {
            Soprano::Node *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Soprano::Node((*sipCpp)[*a0]);
            Py_END_ALLOW_THREADS

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

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

    return 0;
}


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

    return NULL;
}


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

    delete reinterpret_cast<Nepomuk::Query::Result *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void assign_Nepomuk_Query_Result(void *, SIP_SSIZE_T, const void *);}
static void assign_Nepomuk_Query_Result(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast<Nepomuk::Query::Result *>(sipDst)[sipDstIdx] = *reinterpret_cast<const Nepomuk::Query::Result *>(sipSrc);
}


extern "C" {static void *array_Nepomuk_Query_Result(SIP_SSIZE_T);}
static void *array_Nepomuk_Query_Result(SIP_SSIZE_T sipNrElem)
{
    return new Nepomuk::Query::Result[sipNrElem];
}


extern "C" {static void *copy_Nepomuk_Query_Result(const void *, SIP_SSIZE_T);}
static void *copy_Nepomuk_Query_Result(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new Nepomuk::Query::Result(reinterpret_cast<const Nepomuk::Query::Result *>(sipSrc)[sipSrcIdx]);
}


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


extern "C" {static void *init_Nepomuk_Query_Result(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_Nepomuk_Query_Result(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    Nepomuk::Query::Result *sipCpp = 0;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Nepomuk::Query::Result();
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        const Nepomuk::Resource * a0;
        double a1 = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9|d", sipType_Nepomuk_Resource, &a0, &a1))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Nepomuk::Query::Result(*a0,a1);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_Nepomuk_Query_Result, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Nepomuk::Query::Result(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return NULL;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_Nepomuk_Query_Result[] = {
    {(void *)slot_Nepomuk_Query_Result___ne__, ne_slot},
    {(void *)slot_Nepomuk_Query_Result___eq__, eq_slot},
    {(void *)slot_Nepomuk_Query_Result___getitem__, getitem_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_Nepomuk_Query_Result[] = {
    {SIP_MLNAME_CAST(sipName_addRequestProperty), meth_Nepomuk_Query_Result_addRequestProperty, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_requestProperties), meth_Nepomuk_Query_Result_requestProperties, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_requestProperty), meth_Nepomuk_Query_Result_requestProperty, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_resource), meth_Nepomuk_Query_Result_resource, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_score), meth_Nepomuk_Query_Result_score, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setScore), meth_Nepomuk_Query_Result_setScore, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_nepomuk_Nepomuk_Query_Result = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_Nepomuk__Query__Result,
        {0}
    },
    {
        sipNameNr_Result,
        {6, 255, 0},
        6, methods_Nepomuk_Query_Result,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    slots_Nepomuk_Query_Result,
    init_Nepomuk_Query_Result,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Nepomuk_Query_Result,
    assign_Nepomuk_Query_Result,
    array_Nepomuk_Query_Result,
    copy_Nepomuk_Query_Result,
    release_Nepomuk_Query_Result,
    cast_Nepomuk_Query_Result,
    0,
    0,
    0
},
    0,
    0,
    0
};

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/resourcetypeterm.sip"
#include <nepomuk/resourcetypeterm.h>
#line 817 "sipnepomukpart2.cpp"

#line 29 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/class.sip"
#include <nepomuk/class.h>
#line 821 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/term.sip"
#include <nepomuk/term.h>
#line 824 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/comparisonterm.sip"
#include <nepomuk/comparisonterm.h>
#line 827 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/orterm.sip"
#include <nepomuk/orterm.h>
#line 830 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/andterm.sip"
#include <nepomuk/andterm.h>
#line 833 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/negationterm.sip"
#include <nepomuk/negationterm.h>
#line 836 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/resourceterm.sip"
#include <nepomuk/resourceterm.h>
#line 839 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/literalterm.sip"
#include <nepomuk/literalterm.h>
#line 842 "sipnepomukpart2.cpp"


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

    {
        Nepomuk::Query::ResourceTypeTerm *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Nepomuk_Query_ResourceTypeTerm, &sipCpp))
        {
            Nepomuk::Types::Class *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Nepomuk::Types::Class(sipCpp->type());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const Nepomuk::Types::Class * a0;
        Nepomuk::Query::ResourceTypeTerm *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_Nepomuk_Query_ResourceTypeTerm, &sipCpp, sipType_Nepomuk_Types_Class, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setType(*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_ResourceTypeTerm, sipName_setType, NULL);

    return NULL;
}


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

    if (targetType == sipType_Nepomuk_Query_ResourceTypeTerm)
        return ptr;

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

    return NULL;
}


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

    delete reinterpret_cast<Nepomuk::Query::ResourceTypeTerm *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


extern "C" {static void *init_Nepomuk_Query_ResourceTypeTerm(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_Nepomuk_Query_ResourceTypeTerm(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    Nepomuk::Query::ResourceTypeTerm *sipCpp = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_Nepomuk_Query_ResourceTypeTerm, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Nepomuk::Query::ResourceTypeTerm(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        const Nepomuk::Types::Class& a0def = Nepomuk::Types::Class();
        const Nepomuk::Types::Class * a0 = &a0def;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "|J9", sipType_Nepomuk_Types_Class, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Nepomuk::Query::ResourceTypeTerm(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return NULL;
}


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


static PyMethodDef methods_Nepomuk_Query_ResourceTypeTerm[] = {
    {SIP_MLNAME_CAST(sipName_setType), meth_Nepomuk_Query_ResourceTypeTerm_setType, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_type), meth_Nepomuk_Query_ResourceTypeTerm_type, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_nepomuk_Nepomuk_Query_ResourceTypeTerm = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_Nepomuk__Query__ResourceTypeTerm,
        {0}
    },
    {
        sipNameNr_ResourceTypeTerm,
        {6, 255, 0},
        2, methods_Nepomuk_Query_ResourceTypeTerm,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_Nepomuk_Query_ResourceTypeTerm,
    0,
    init_Nepomuk_Query_ResourceTypeTerm,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Nepomuk_Query_ResourceTypeTerm,
    0,
    0,
    0,
    release_Nepomuk_Query_ResourceTypeTerm,
    cast_Nepomuk_Query_ResourceTypeTerm,
    0,
    0,
    0
},
    0,
    0,
    0
};

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/resourceterm.sip"
#include <nepomuk/resourceterm.h>
#line 1035 "sipnepomukpart2.cpp"

#line 45 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/resource.sip"
#include <nepomuk/resource.h>
#line 1039 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/term.sip"
#include <nepomuk/term.h>
#line 1042 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/resourcetypeterm.sip"
#include <nepomuk/resourcetypeterm.h>
#line 1045 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/comparisonterm.sip"
#include <nepomuk/comparisonterm.h>
#line 1048 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/orterm.sip"
#include <nepomuk/orterm.h>
#line 1051 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/andterm.sip"
#include <nepomuk/andterm.h>
#line 1054 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/negationterm.sip"
#include <nepomuk/negationterm.h>
#line 1057 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/literalterm.sip"
#include <nepomuk/literalterm.h>
#line 1060 "sipnepomukpart2.cpp"


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

    {
        Nepomuk::Query::ResourceTerm *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Nepomuk_Query_ResourceTerm, &sipCpp))
        {
            Nepomuk::Resource *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Nepomuk::Resource(sipCpp->resource());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
        const Nepomuk::Resource * a0;
        Nepomuk::Query::ResourceTerm *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_Nepomuk_Query_ResourceTerm, &sipCpp, sipType_Nepomuk_Resource, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setResource(*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_ResourceTerm, sipName_setResource, NULL);

    return NULL;
}


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

    if (targetType == sipType_Nepomuk_Query_ResourceTerm)
        return ptr;

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

    return NULL;
}


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

    delete reinterpret_cast<Nepomuk::Query::ResourceTerm *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


extern "C" {static void *init_Nepomuk_Query_ResourceTerm(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_Nepomuk_Query_ResourceTerm(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    Nepomuk::Query::ResourceTerm *sipCpp = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_Nepomuk_Query_ResourceTerm, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Nepomuk::Query::ResourceTerm(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        const Nepomuk::Resource& a0def = Nepomuk::Resource();
        const Nepomuk::Resource * a0 = &a0def;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "|J9", sipType_Nepomuk_Resource, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Nepomuk::Query::ResourceTerm(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return NULL;
}


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


static PyMethodDef methods_Nepomuk_Query_ResourceTerm[] = {
    {SIP_MLNAME_CAST(sipName_resource), meth_Nepomuk_Query_ResourceTerm_resource, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setResource), meth_Nepomuk_Query_ResourceTerm_setResource, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_nepomuk_Nepomuk_Query_ResourceTerm = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_Nepomuk__Query__ResourceTerm,
        {0}
    },
    {
        sipNameNr_ResourceTerm,
        {6, 255, 0},
        2, methods_Nepomuk_Query_ResourceTerm,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_Nepomuk_Query_ResourceTerm,
    0,
    init_Nepomuk_Query_ResourceTerm,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Nepomuk_Query_ResourceTerm,
    0,
    0,
    0,
    release_Nepomuk_Query_ResourceTerm,
    cast_Nepomuk_Query_ResourceTerm,
    0,
    0,
    0
},
    0,
    0,
    0
};

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/queryserviceclient.sip"
#include <nepomuk/queryserviceclient.h>
#line 1253 "sipnepomukpart2.cpp"

#line 40 "/usr/local/share/py-sip/QtCore/qobject.sip"
#include <qobject.h>
#line 1257 "sipnepomukpart2.cpp"
#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 1260 "sipnepomukpart2.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qurl.sip"
#include <qurl.h>
#line 1263 "sipnepomukpart2.cpp"
#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 1266 "sipnepomukpart2.cpp"
#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/result.sip"
#include <nepomuk/result.h>
#line 1269 "sipnepomukpart2.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 1272 "sipnepomukpart2.cpp"
#line 38 "/usr/local/share/py-sip/QtCore/qhash.sip"
#include <qhash.h>
#line 1275 "sipnepomukpart2.cpp"
#line 83 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 1278 "sipnepomukpart2.cpp"
#line 29 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/property.sip"
#include <nepomuk/property.h>
#line 1281 "sipnepomukpart2.cpp"
#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/query.sip"
#include <nepomuk/query.h>
#line 44 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/query.sip"
#include <nepomuk/query.h>
#line 1286 "sipnepomukpart2.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 1289 "sipnepomukpart2.cpp"
#line 318 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 1292 "sipnepomukpart2.cpp"
#line 305 "/usr/local/share/py-sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 1295 "sipnepomukpart2.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 1298 "sipnepomukpart2.cpp"
#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 1301 "sipnepomukpart2.cpp"
#line 43 "/usr/local/share/py-sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 1304 "sipnepomukpart2.cpp"
#line 40 "/usr/local/share/py-sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 1307 "sipnepomukpart2.cpp"
#line 125 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 1310 "sipnepomukpart2.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qthread.sip"
#include <qthread.h>
#line 1313 "sipnepomukpart2.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 1316 "sipnepomukpart2.cpp"
#line 37 "/usr/local/share/py-sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 1319 "sipnepomukpart2.cpp"


class sipNepomuk_Query_QueryServiceClient : public Nepomuk::Query::QueryServiceClient
{
public:
    sipNepomuk_Query_QueryServiceClient(QObject *);
    virtual ~sipNepomuk_Query_QueryServiceClient();

    int qt_metacall(QMetaObject::Call,int,void **);
    void *qt_metacast(const char *);
    const QMetaObject *metaObject() const;

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    int sipProtect_receivers(const char *) const;
    void sipProtectVirt_timerEvent(bool,QTimerEvent *);
    void sipProtectVirt_childEvent(bool,QChildEvent *);
    void sipProtectVirt_customEvent(bool,QEvent *);
    void sipProtectVirt_connectNotify(bool,const char *);
    void sipProtectVirt_disconnectNotify(bool,const char *);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool event(QEvent *);
    bool eventFilter(QObject *,QEvent *);
    void timerEvent(QTimerEvent *);
    void childEvent(QChildEvent *);
    void customEvent(QEvent *);
    void connectNotify(const char *);
    void disconnectNotify(const char *);

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipNepomuk_Query_QueryServiceClient(const sipNepomuk_Query_QueryServiceClient &);
    sipNepomuk_Query_QueryServiceClient &operator = (const sipNepomuk_Query_QueryServiceClient &);

    char sipPyMethods[7];
};

sipNepomuk_Query_QueryServiceClient::sipNepomuk_Query_QueryServiceClient(QObject *a0): Nepomuk::Query::QueryServiceClient(a0), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

const QMetaObject *sipNepomuk_Query_QueryServiceClient::metaObject() const
{
    return sip_nepomuk_qt_metaobject(sipPySelf,sipType_Nepomuk_Query_QueryServiceClient);
}

int sipNepomuk_Query_QueryServiceClient::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id = Nepomuk::Query::QueryServiceClient::qt_metacall(_c,_id,_a);

    if (_id >= 0)
        _id = sip_nepomuk_qt_metacall(sipPySelf,sipType_Nepomuk_Query_QueryServiceClient,_c,_id,_a);

    return _id;
}

void *sipNepomuk_Query_QueryServiceClient::qt_metacast(const char *_clname)
{
    return (sip_nepomuk_qt_metacast && sip_nepomuk_qt_metacast(sipPySelf,sipType_Nepomuk_Query_QueryServiceClient,_clname)) ? this : Nepomuk::Query::QueryServiceClient::qt_metacast(_clname);
}

bool sipNepomuk_Query_QueryServiceClient::event(QEvent *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,NULL,sipName_event);

    if (!meth)
        return QObject::event(a0);

    typedef bool (*sipVH_QtCore_5)(sip_gilstate_t,PyObject *,QEvent *);

    return ((sipVH_QtCore_5)(sipModuleAPI_nepomuk_QtCore->em_virthandlers[5]))(sipGILState,meth,a0);
}

bool sipNepomuk_Query_QueryServiceClient::eventFilter(QObject *a0,QEvent *a1)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[1],sipPySelf,NULL,sipName_eventFilter);

    if (!meth)
        return QObject::eventFilter(a0,a1);

    typedef bool (*sipVH_QtCore_18)(sip_gilstate_t,PyObject *,QObject *,QEvent *);

    return ((sipVH_QtCore_18)(sipModuleAPI_nepomuk_QtCore->em_virthandlers[18]))(sipGILState,meth,a0,a1);
}

void sipNepomuk_Query_QueryServiceClient::timerEvent(QTimerEvent *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[2],sipPySelf,NULL,sipName_timerEvent);

    if (!meth)
    {
        QObject::timerEvent(a0);
        return;
    }

    typedef void (*sipVH_QtCore_9)(sip_gilstate_t,PyObject *,QTimerEvent *);

    ((sipVH_QtCore_9)(sipModuleAPI_nepomuk_QtCore->em_virthandlers[9]))(sipGILState,meth,a0);
}

void sipNepomuk_Query_QueryServiceClient::childEvent(QChildEvent *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[3],sipPySelf,NULL,sipName_childEvent);

    if (!meth)
    {
        QObject::childEvent(a0);
        return;
    }

    typedef void (*sipVH_QtCore_25)(sip_gilstate_t,PyObject *,QChildEvent *);

    ((sipVH_QtCore_25)(sipModuleAPI_nepomuk_QtCore->em_virthandlers[25]))(sipGILState,meth,a0);
}

void sipNepomuk_Query_QueryServiceClient::customEvent(QEvent *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[4],sipPySelf,NULL,sipName_customEvent);

    if (!meth)
    {
        QObject::customEvent(a0);
        return;
    }

    typedef void (*sipVH_QtCore_17)(sip_gilstate_t,PyObject *,QEvent *);

    ((sipVH_QtCore_17)(sipModuleAPI_nepomuk_QtCore->em_virthandlers[17]))(sipGILState,meth,a0);
}

void sipNepomuk_Query_QueryServiceClient::connectNotify(const char *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[5],sipPySelf,NULL,sipName_connectNotify);

    if (!meth)
    {
        QObject::connectNotify(a0);
        return;
    }

    typedef void (*sipVH_QtCore_24)(sip_gilstate_t,PyObject *,const char *);

    ((sipVH_QtCore_24)(sipModuleAPI_nepomuk_QtCore->em_virthandlers[24]))(sipGILState,meth,a0);
}

void sipNepomuk_Query_QueryServiceClient::disconnectNotify(const char *a0)
{
    sip_gilstate_t sipGILState;
    PyObject *meth;

    meth = sipIsPyMethod(&sipGILState,&sipPyMethods[6],sipPySelf,NULL,sipName_disconnectNotify);

    if (!meth)
    {
        QObject::disconnectNotify(a0);
        return;
    }

    typedef void (*sipVH_QtCore_24)(sip_gilstate_t,PyObject *,const char *);

    ((sipVH_QtCore_24)(sipModuleAPI_nepomuk_QtCore->em_virthandlers[24]))(sipGILState,meth,a0);
}

int sipNepomuk_Query_QueryServiceClient::sipProtect_receivers(const char *a0) const
{
    return QObject::receivers(a0);
}

void sipNepomuk_Query_QueryServiceClient::sipProtectVirt_timerEvent(bool sipSelfWasArg,QTimerEvent *a0)
{
    (sipSelfWasArg ? QObject::timerEvent(a0) : timerEvent(a0));
}

void sipNepomuk_Query_QueryServiceClient::sipProtectVirt_childEvent(bool sipSelfWasArg,QChildEvent *a0)
{
    (sipSelfWasArg ? QObject::childEvent(a0) : childEvent(a0));
}

void sipNepomuk_Query_QueryServiceClient::sipProtectVirt_customEvent(bool sipSelfWasArg,QEvent *a0)
{
    (sipSelfWasArg ? QObject::customEvent(a0) : customEvent(a0));
}

void sipNepomuk_Query_QueryServiceClient::sipProtectVirt_connectNotify(bool sipSelfWasArg,const char *a0)
{
    (sipSelfWasArg ? QObject::connectNotify(a0) : connectNotify(a0));
}

void sipNepomuk_Query_QueryServiceClient::sipProtectVirt_disconnectNotify(bool sipSelfWasArg,const char *a0)
{
    (sipSelfWasArg ? QObject::disconnectNotify(a0) : disconnectNotify(a0));
}


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

    {
        char * a0;
        sipNepomuk_Query_QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BG", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, &a0))
        {
            int sipRes = 0;

#line 538 "/usr/local/share/py-sip/QtCore/qobject.sip"
        // We need to take into account any proxies for Python signals. Import the
        // helper if it hasn't already been done.
        typedef int (*helper_func)(QObject *, const char *, int);
        
        static helper_func helper = 0;
        
        if (!helper)
            helper = (helper_func)sipImportSymbol("qpycore_qobject_receivers");
        
        if (helper)
        #if defined(SIP_PROTECTED_IS_PUBLIC)
            sipRes = helper(sipCpp, a0, sipCpp->receivers(a0));
        #else
            sipRes = helper(sipCpp, a0, sipCpp->sipProtect_receivers(a0));
        #endif
#line 1576 "sipnepomukpart2.cpp"

            return SIPLong_FromLong(sipRes);
        }
    }

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

    return NULL;
}


extern "C" {static PyObject *meth_Nepomuk_Query_QueryServiceClient_timerEvent(PyObject *, PyObject *);}
static PyObject *meth_Nepomuk_Query_QueryServiceClient_timerEvent(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        QTimerEvent * a0;
        sipNepomuk_Query_QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, sipType_QTimerEvent, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_timerEvent(sipSelfWasArg,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_QueryServiceClient, sipName_timerEvent, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_Nepomuk_Query_QueryServiceClient_childEvent(PyObject *, PyObject *);}
static PyObject *meth_Nepomuk_Query_QueryServiceClient_childEvent(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        QChildEvent * a0;
        sipNepomuk_Query_QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, sipType_QChildEvent, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_childEvent(sipSelfWasArg,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_QueryServiceClient, sipName_childEvent, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_Nepomuk_Query_QueryServiceClient_customEvent(PyObject *, PyObject *);}
static PyObject *meth_Nepomuk_Query_QueryServiceClient_customEvent(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        QEvent * a0;
        sipNepomuk_Query_QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, sipType_QEvent, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_customEvent(sipSelfWasArg,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_QueryServiceClient, sipName_customEvent, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_Nepomuk_Query_QueryServiceClient_connectNotify(PyObject *, PyObject *);}
static PyObject *meth_Nepomuk_Query_QueryServiceClient_connectNotify(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        char * a0;
        sipNepomuk_Query_QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BG", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_connectNotify(sipSelfWasArg,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_QueryServiceClient, sipName_connectNotify, NULL);

    return NULL;
}


extern "C" {static PyObject *meth_Nepomuk_Query_QueryServiceClient_disconnectNotify(PyObject *, PyObject *);}
static PyObject *meth_Nepomuk_Query_QueryServiceClient_disconnectNotify(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;
    bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));

    {
        char * a0;
        sipNepomuk_Query_QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BG", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->sipProtectVirt_disconnectNotify(sipSelfWasArg,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_QueryServiceClient, sipName_disconnectNotify, NULL);

    return NULL;
}


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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = Nepomuk::Query::QueryServiceClient::serviceAvailable();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, sipType_Nepomuk_Query_Query, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->query(*a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const QString * a0;
        int a0State = 0;
        const Nepomuk::Query::RequestPropertyMap& a1def = Nepomuk::Query::RequestPropertyMap();
        const Nepomuk::Query::RequestPropertyMap * a1 = &a1def;
        int a1State = 0;
        Nepomuk::Query::QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1|J1", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, sipType_QString,&a0, &a0State, sipType_QHash_0100QString_0100Nepomuk_Types_Property,&a1, &a1State))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sparqlQuery(*a0,*a1);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);
            sipReleaseType(const_cast<Nepomuk::Query::RequestPropertyMap *>(a1),sipType_QHash_0100QString_0100Nepomuk_Types_Property,a1State);

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const QString * a0;
        int a0State = 0;
        Nepomuk::Query::QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, sipType_QString,&a0, &a0State))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->desktopQuery(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, sipType_Nepomuk_Query_Query, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->blockingQuery(*a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const QString * a0;
        int a0State = 0;
        const Nepomuk::Query::RequestPropertyMap& a1def = Nepomuk::Query::RequestPropertyMap();
        const Nepomuk::Query::RequestPropertyMap * a1 = &a1def;
        int a1State = 0;
        Nepomuk::Query::QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1|J1", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, sipType_QString,&a0, &a0State, sipType_QHash_0100QString_0100Nepomuk_Types_Property,&a1, &a1State))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->blockingSparqlQuery(*a0,*a1);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);
            sipReleaseType(const_cast<Nepomuk::Query::RequestPropertyMap *>(a1),sipType_QHash_0100QString_0100Nepomuk_Types_Property,a1State);

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        const QString * a0;
        int a0State = 0;
        Nepomuk::Query::QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp, sipType_QString,&a0, &a0State))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->blockingDesktopQuery(*a0);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


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

    {
        Nepomuk::Query::QueryServiceClient *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_Nepomuk_Query_QueryServiceClient, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->close();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    if (targetType == sipType_Nepomuk_Query_QueryServiceClient)
        return ptr;

    if ((res = ((const sipClassTypeDef *)sipType_QObject)->ctd_cast((QObject *)(Nepomuk::Query::QueryServiceClient *)ptr,targetType)) != NULL)
        return res;

    return NULL;
}


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

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

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_Nepomuk_Query_QueryServiceClient(sipSimpleWrapper *);}
static void dealloc_Nepomuk_Query_QueryServiceClient(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerived(sipSelf))
        reinterpret_cast<sipNepomuk_Query_QueryServiceClient *>(sipSelf->u.cppPtr)->sipPySelf = NULL;

    if (sipIsPyOwned(sipSelf))
    {
        release_Nepomuk_Query_QueryServiceClient(sipSelf->u.cppPtr,sipSelf->flags);
    }
}


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

    {
        QObject * a0 = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "|JH", sipType_QObject, &a0, sipOwner))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipNepomuk_Query_QueryServiceClient(a0);
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


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


static PyMethodDef methods_Nepomuk_Query_QueryServiceClient[] = {
    {SIP_MLNAME_CAST(sipName_blockingDesktopQuery), meth_Nepomuk_Query_QueryServiceClient_blockingDesktopQuery, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_blockingQuery), meth_Nepomuk_Query_QueryServiceClient_blockingQuery, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_blockingSparqlQuery), meth_Nepomuk_Query_QueryServiceClient_blockingSparqlQuery, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_childEvent), meth_Nepomuk_Query_QueryServiceClient_childEvent, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_close), meth_Nepomuk_Query_QueryServiceClient_close, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_connectNotify), meth_Nepomuk_Query_QueryServiceClient_connectNotify, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_customEvent), meth_Nepomuk_Query_QueryServiceClient_customEvent, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_desktopQuery), meth_Nepomuk_Query_QueryServiceClient_desktopQuery, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_disconnectNotify), meth_Nepomuk_Query_QueryServiceClient_disconnectNotify, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_query), meth_Nepomuk_Query_QueryServiceClient_query, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_receivers), meth_Nepomuk_Query_QueryServiceClient_receivers, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_serviceAvailable), meth_Nepomuk_Query_QueryServiceClient_serviceAvailable, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_sparqlQuery), meth_Nepomuk_Query_QueryServiceClient_sparqlQuery, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_timerEvent), meth_Nepomuk_Query_QueryServiceClient_timerEvent, METH_VARARGS, NULL}
};


/* Define this type's PyQt4 signals. */
static const pyqt4QtSignal pyqt4_signals_Nepomuk_Query_QueryServiceClient[] = {
    {"finishedListing()", 0, 0},
    {"entriesRemoved(const QList<QUrl>&)", 0, 0},
    {"newEntries(const QList<Nepomuk::Query::Result>&)", 0, 0},
    {0, 0, 0}
};


pyqt4ClassTypeDef sipTypeDef_nepomuk_Nepomuk_Query_QueryServiceClient = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_Nepomuk__Query__QueryServiceClient,
        {0}
    },
    {
        sipNameNr_QueryServiceClient,
        {6, 255, 0},
        14, methods_Nepomuk_Query_QueryServiceClient,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_Nepomuk_Query_QueryServiceClient,
    0,
    init_Nepomuk_Query_QueryServiceClient,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Nepomuk_Query_QueryServiceClient,
    0,
    0,
    0,
    release_Nepomuk_Query_QueryServiceClient,
    cast_Nepomuk_Query_QueryServiceClient,
    0,
    0,
    0
},
    &Nepomuk::Query::QueryServiceClient::staticMetaObject,
    0,
    pyqt4_signals_Nepomuk_Query_QueryServiceClient
};

#line 27 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/queryparser.sip"
#include <nepomuk/queryparser.h>
#line 2115 "sipnepomukpart2.cpp"

#line 28 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/query.sip"
#include <nepomuk/query.h>
#line 44 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/query.sip"
#include <nepomuk/query.h>
#line 2121 "sipnepomukpart2.cpp"
#line 41 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 2124 "sipnepomukpart2.cpp"
#line 38 "/usr/local/share/py-sip/QtCore/qlist.sip"
#include <qlist.h>
#line 2127 "sipnepomukpart2.cpp"
#line 29 "/work/a/ports/devel/kdebindings4-python-pykde4/work/kdebindings-4.4.5/python/pykde4/sip/nepomuk/property.sip"
#include <nepomuk/property.h>
#line 2130 "sipnepomukpart2.cpp"


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

    {
        const QString * a0;
        int a0State = 0;
        Nepomuk::Query::QueryParser *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_Nepomuk_Query_QueryParser, &sipCpp, sipType_QString,&a0, &a0State))
        {
            Nepomuk::Query::Query *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Nepomuk::Query::Query(sipCpp->parse(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

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

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

    return NULL;
}


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

    {
        const QString * a0;
        int a0State = 0;
        Nepomuk::Query::QueryParser *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_Nepomuk_Query_QueryParser, &sipCpp, sipType_QString,&a0, &a0State))
        {
            QList<Nepomuk::Types::Property> *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QList<Nepomuk::Types::Property>(sipCpp->matchProperty(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

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

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

    return NULL;
}


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

    {
        const QString * a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString,&a0, &a0State))
        {
            Nepomuk::Query::Query *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new Nepomuk::Query::Query(Nepomuk::Query::QueryParser::parseQuery(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

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

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

    return NULL;
}


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

    return NULL;
}


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

    delete reinterpret_cast<Nepomuk::Query::QueryParser *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


extern "C" {static void *init_Nepomuk_Query_QueryParser(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_Nepomuk_Query_QueryParser(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    Nepomuk::Query::QueryParser *sipCpp = 0;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new Nepomuk::Query::QueryParser();
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_Nepomuk_Query_QueryParser[] = {
    {SIP_MLNAME_CAST(sipName_matchProperty), meth_Nepomuk_Query_QueryParser_matchProperty, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_parse), meth_Nepomuk_Query_QueryParser_parse, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_parseQuery), meth_Nepomuk_Query_QueryParser_parseQuery, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_nepomuk_Nepomuk_Query_QueryParser = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_Nepomuk__Query__QueryParser,
        {0}
    },
    {
        sipNameNr_QueryParser,
        {6, 255, 0},
        3, methods_Nepomuk_Query_QueryParser,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    0,
    init_Nepomuk_Query_QueryParser,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_Nepomuk_Query_QueryParser,
    0,
    0,
    0,
    release_Nepomuk_Query_QueryParser,
    cast_Nepomuk_Query_QueryParser,
    0,
    0,
    0
},
    0,
    0,
    0
};
