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

#include "sipAPIdnssd.h"

#line 41 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/src/pykde4-4.14.3/sip/dnssd/domainbrowser.sip"
#include <dnssd/domainbrowser.h>
#line 12 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"

#line 29 "/usr/share/sip/PyQt4/QtCore/qobject.sip"
#include <qobject.h>
#line 16 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 27 "/usr/share/sip/PyQt4/QtCore/qstring.sip"
#include <qstring.h>
#line 19 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 27 "/usr/share/sip/PyQt4/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 22 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 26 "/usr/share/sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 25 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 368 "/usr/share/sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 28 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 351 "/usr/share/sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 31 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 265 "/usr/share/sip/PyQt4/QtCore/qvariant.sip"
#include <qvariant.h>
#line 34 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 28 "/usr/share/sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#line 37 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 32 "/usr/share/sip/PyQt4/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 40 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 26 "/usr/share/sip/PyQt4/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 43 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 115 "/usr/share/sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#line 46 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 26 "/usr/share/sip/PyQt4/QtCore/qthread.sip"
#include <qthread.h>
#line 49 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 26 "/usr/share/sip/PyQt4/QtCore/qregexp.sip"
#include <qregexp.h>
#line 52 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"
#line 26 "/usr/share/sip/PyQt4/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 55 "/usr/src/ports/python-pykde4/python-pykde4-4.14.3-4.i686/build/py2/sip/dnssd/sipdnssdpart5.cpp"


class sipDNSSD_DomainBrowser : public  ::DNSSD::DomainBrowser
{
public:
    sipDNSSD_DomainBrowser( ::DNSSD::DomainBrowser::DomainType, ::QObject*);
    virtual ~sipDNSSD_DomainBrowser();

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

    /*
     * 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:
    sipDNSSD_DomainBrowser(const sipDNSSD_DomainBrowser &);
    sipDNSSD_DomainBrowser &operator = (const sipDNSSD_DomainBrowser &);

    char sipPyMethods[7];
};

sipDNSSD_DomainBrowser::sipDNSSD_DomainBrowser( ::DNSSD::DomainBrowser::DomainType a0, ::QObject*a1):  ::DNSSD::DomainBrowser(a0,a1), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipDNSSD_DomainBrowser::~sipDNSSD_DomainBrowser()
{
    sipInstanceDestroyed(sipPySelf);
}

const QMetaObject *sipDNSSD_DomainBrowser::metaObject() const
{
    return sip_dnssd_qt_metaobject(sipPySelf,sipType_DNSSD_DomainBrowser);
}

int sipDNSSD_DomainBrowser::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id =  ::DNSSD::DomainBrowser::qt_metacall(_c,_id,_a);

    if (_id >= 0)
        _id = sip_dnssd_qt_metacall(sipPySelf,sipType_DNSSD_DomainBrowser,_c,_id,_a);

    return _id;
}

void *sipDNSSD_DomainBrowser::qt_metacast(const char *_clname)
{
    return (sip_dnssd_qt_metacast(sipPySelf, sipType_DNSSD_DomainBrowser, _clname)) ? this :  ::DNSSD::DomainBrowser::qt_metacast(_clname);
}

bool sipDNSSD_DomainBrowser::event( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::DNSSD::DomainBrowser::event(a0);

    extern bool sipVH_dnssd_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    return sipVH_dnssd_5(sipGILState, 0, sipPySelf, sipMeth, a0);
}

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

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

    if (!sipMeth)
        return  ::DNSSD::DomainBrowser::eventFilter(a0,a1);

    extern bool sipVH_dnssd_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*, ::QEvent*);

    return sipVH_dnssd_4(sipGILState, 0, sipPySelf, sipMeth, a0, a1);
}

void sipDNSSD_DomainBrowser::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::DNSSD::DomainBrowser::timerEvent(a0);
        return;
    }

    extern void sipVH_dnssd_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QTimerEvent*);

    sipVH_dnssd_3(sipGILState, 0, sipPySelf, sipMeth, a0);
}

void sipDNSSD_DomainBrowser::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::DNSSD::DomainBrowser::childEvent(a0);
        return;
    }

    extern void sipVH_dnssd_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QChildEvent*);

    sipVH_dnssd_2(sipGILState, 0, sipPySelf, sipMeth, a0);
}

void sipDNSSD_DomainBrowser::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::DNSSD::DomainBrowser::customEvent(a0);
        return;
    }

    extern void sipVH_dnssd_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    sipVH_dnssd_1(sipGILState, 0, sipPySelf, sipMeth, a0);
}

void sipDNSSD_DomainBrowser::connectNotify(const char*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::DNSSD::DomainBrowser::connectNotify(a0);
        return;
    }

    extern void sipVH_dnssd_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const char*);

    sipVH_dnssd_0(sipGILState, 0, sipPySelf, sipMeth, a0);
}

void sipDNSSD_DomainBrowser::disconnectNotify(const char*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::DNSSD::DomainBrowser::disconnectNotify(a0);
        return;
    }

    extern void sipVH_dnssd_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const char*);

    sipVH_dnssd_0(sipGILState, 0, sipPySelf, sipMeth, a0);
}


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

    {
        const  ::DNSSD::DomainBrowser *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_DNSSD_DomainBrowser, &sipCpp))
        {
             ::QStringList*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::QStringList(sipCpp->domains());
            Py_END_ALLOW_THREADS

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

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

    return NULL;
}


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

    {
         ::DNSSD::DomainBrowser *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return NULL;
}


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

    {
        const  ::DNSSD::DomainBrowser *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_DNSSD_DomainBrowser, &sipCpp))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->isRunning();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

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

    return NULL;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_DNSSD_DomainBrowser(void *, const sipTypeDef *);}
static void *cast_DNSSD_DomainBrowser(void *sipCppV, const sipTypeDef *targetType)
{
     ::DNSSD::DomainBrowser *sipCpp = reinterpret_cast< ::DNSSD::DomainBrowser *>(sipCppV);

    if (targetType == sipType_QObject)
        return static_cast< ::QObject *>(sipCpp);

    return sipCppV;
}


/* Call the instance's destructor. */
extern "C" {static void release_DNSSD_DomainBrowser(void *, int);}
static void release_DNSSD_DomainBrowser(void *sipCppV, int)
{
     ::DNSSD::DomainBrowser *sipCpp = reinterpret_cast< ::DNSSD::DomainBrowser *>(sipCppV);

    Py_BEGIN_ALLOW_THREADS

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_DNSSD_DomainBrowser(sipSimpleWrapper *);}
static void dealloc_DNSSD_DomainBrowser(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipDNSSD_DomainBrowser *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_DNSSD_DomainBrowser(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


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

    {
         ::DNSSD::DomainBrowser::DomainType a0;
         ::QObject* a1 = 0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


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


static PyMethodDef methods_DNSSD_DomainBrowser[] = {
    {SIP_MLNAME_CAST(sipName_domains), meth_DNSSD_DomainBrowser_domains, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_isRunning), meth_DNSSD_DomainBrowser_isRunning, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_startBrowse), meth_DNSSD_DomainBrowser_startBrowse, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_DNSSD_DomainBrowser[] = {
    {sipName_Browsing, static_cast<int>( ::DNSSD::DomainBrowser::Browsing), 2},
    {sipName_Publishing, static_cast<int>( ::DNSSD::DomainBrowser::Publishing), 2},
};


/* Define this type's signals. */
static const pyqt4QtSignal signals_DNSSD_DomainBrowser[] = {
    {"domainAdded(QString)", 0, 0, 0},
    {"domainRemoved(QString)", 0, 0, 0},
    {0, 0, 0, 0}
};


static pyqt4ClassPluginDef plugin_DNSSD_DomainBrowser = {
    & ::DNSSD::DomainBrowser::staticMetaObject,
    0,
    signals_DNSSD_DomainBrowser
};


sipClassTypeDef sipTypeDef_dnssd_DNSSD_DomainBrowser = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_DNSSD__DomainBrowser,
        {0},
        &plugin_DNSSD_DomainBrowser
    },
    {
        sipNameNr_DomainBrowser,
        {0, 255, 0},
        3, methods_DNSSD_DomainBrowser,
        2, enummembers_DNSSD_DomainBrowser,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    supers_DNSSD_DomainBrowser,
    0,
    init_type_DNSSD_DomainBrowser,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_DNSSD_DomainBrowser,
    0,
    0,
    0,
    release_DNSSD_DomainBrowser,
    cast_DNSSD_DomainBrowser,
    0,
    0,
    0,
    0,
    0,
    0
};




static pyqt4ClassPluginDef plugin_DNSSD = {
    0,
    0,
    0
};


sipClassTypeDef sipTypeDef_dnssd_DNSSD = {
    {
        -1,
        0,
        0,
        SIP_TYPE_NAMESPACE,
        sipNameNr_DNSSD,
        {0},
        &plugin_DNSSD
    },
    {
        sipNameNr_DNSSD,
        {0, 0, 1},
        0, 0,
        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
};
