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

#include "sipAPIdnssd.h"

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

#line 29 "/usr/share/python3-sip/PyQt4/QtCore/qobject.sip"
#include <qobject.h>
#line 16 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 31 "/usr/share/python3-sip/PyQt4/QtCore/qstring.sip"
#include <qstring.h>
#line 19 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 31 "/usr/share/python3-sip/PyQt4/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 22 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 26 "/usr/share/python3-sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 25 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 368 "/usr/share/python3-sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 28 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 351 "/usr/share/python3-sip/PyQt4/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 31 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 269 "/usr/share/python3-sip/PyQt4/QtCore/qvariant.sip"
#include <qvariant.h>
#line 34 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 28 "/usr/share/python3-sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#line 37 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 32 "/usr/share/python3-sip/PyQt4/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 40 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 30 "/usr/share/python3-sip/PyQt4/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 43 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 115 "/usr/share/python3-sip/PyQt4/QtCore/qlist.sip"
#include <qlist.h>
#line 46 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 26 "/usr/share/python3-sip/PyQt4/QtCore/qthread.sip"
#include <qthread.h>
#line 49 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 30 "/usr/share/python3-sip/PyQt4/QtCore/qregexp.sip"
#include <qregexp.h>
#line 52 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/dnssd/sipdnssdpart5.cpp"
#line 26 "/usr/share/python3-sip/PyQt4/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 55 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/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:
    void disconnectNotify(const char*);
    void connectNotify(const char*);
    void customEvent(QEvent*);
    void childEvent(QChildEvent*);
    void timerEvent(QTimerEvent*);
    bool eventFilter(QObject*,QEvent*);
    bool event(QEvent*);

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()
{
    sipCommonDtor(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);
}

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

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

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

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

    ((sipVH_QtCore_24)(sipModuleAPI_dnssd_QtCore->em_virthandlers[24]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}

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

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

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

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

    ((sipVH_QtCore_24)(sipModuleAPI_dnssd_QtCore->em_virthandlers[24]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}

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

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

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

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

    ((sipVH_QtCore_17)(sipModuleAPI_dnssd_QtCore->em_virthandlers[17]))(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;
    }

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

    ((sipVH_QtCore_25)(sipModuleAPI_dnssd_QtCore->em_virthandlers[25]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}

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

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

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

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

    ((sipVH_QtCore_9)(sipModuleAPI_dnssd_QtCore->em_virthandlers[9]))(sipGILState, 0, sipPySelf, sipMeth, a0);
}

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

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

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

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

    return ((sipVH_QtCore_18)(sipModuleAPI_dnssd_QtCore->em_virthandlers[18]))(sipGILState, 0, sipPySelf, sipMeth, a0, a1);
}

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

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

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

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

    return ((sipVH_QtCore_5)(sipModuleAPI_dnssd_QtCore->em_virthandlers[5]))(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;
}


/* 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 (sipIsDerived(sipSelf))
        reinterpret_cast<sipDNSSD_DomainBrowser *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

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


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[] = {{141, 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}
};


pyqt4ClassTypeDef sipTypeDef_dnssd_DNSSD_DomainBrowser = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_DNSSD__DomainBrowser,
        {0}
    },
    {
        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,
    0,
    0,
    0,
    0,
    0,
    0,
    0
},
    &DNSSD::DomainBrowser::staticMetaObject,
    0,
    signals_DNSSD_DomainBrowser,
};




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