/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.6
 */

#include "sipAPIKDBusAddons.h"

#include <kdbusservice.h>

#include <kdbusservice.h>


extern "C" {static long slot_KDBusService_StartupOptions___hash__(PyObject *);}
static long slot_KDBusService_StartupOptions___hash__(PyObject *sipSelf)
{
     ::KDBusService::StartupOptions *sipCpp = reinterpret_cast< ::KDBusService::StartupOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KDBusService_StartupOptions));

    if (!sipCpp)
        return 0;


    {
        {
            long sipRes = 0;

        sipRes = sipCpp->operator KDBusService::StartupOptions::Int();

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static int slot_KDBusService_StartupOptions___bool__(PyObject *);}
static int slot_KDBusService_StartupOptions___bool__(PyObject *sipSelf)
{
     ::KDBusService::StartupOptions *sipCpp = reinterpret_cast< ::KDBusService::StartupOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KDBusService_StartupOptions));

    if (!sipCpp)
        return -1;


    {
        {
            int sipRes = 0;

        sipRes = (sipCpp->operator KDBusService::StartupOptions::Int() != 0);

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_KDBusService_StartupOptions___ne__(PyObject *,PyObject *);}
static PyObject *slot_KDBusService_StartupOptions___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KDBusService::StartupOptions *sipCpp = reinterpret_cast< ::KDBusService::StartupOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KDBusService_StartupOptions));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KDBusService::StartupOptions* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_KDBusService_StartupOptions, &a0, &a0State))
        {
            bool sipRes = 0;

        sipRes = (sipCpp->operator KDBusService::StartupOptions::Int() != a0->operator KDBusService::StartupOptions::Int());
            sipReleaseType(const_cast< ::KDBusService::StartupOptions *>(a0),sipType_KDBusService_StartupOptions,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KDBusAddons, ne_slot, sipType_KDBusService_StartupOptions, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_KDBusService_StartupOptions___eq__(PyObject *,PyObject *);}
static PyObject *slot_KDBusService_StartupOptions___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KDBusService::StartupOptions *sipCpp = reinterpret_cast< ::KDBusService::StartupOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KDBusService_StartupOptions));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KDBusService::StartupOptions* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_KDBusService_StartupOptions, &a0, &a0State))
        {
            bool sipRes = 0;

        sipRes = (sipCpp->operator KDBusService::StartupOptions::Int() == a0->operator KDBusService::StartupOptions::Int());
            sipReleaseType(const_cast< ::KDBusService::StartupOptions *>(a0),sipType_KDBusService_StartupOptions,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KDBusAddons, eq_slot, sipType_KDBusService_StartupOptions, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_KDBusService_StartupOptions___ixor__(PyObject *,PyObject *);}
static PyObject *slot_KDBusService_StartupOptions___ixor__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KDBusService_StartupOptions)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::KDBusService::StartupOptions *sipCpp = reinterpret_cast< ::KDBusService::StartupOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KDBusService_StartupOptions));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
        *sipCpp = KDBusService::StartupOptions(*sipCpp ^ a0);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KDBusService_StartupOptions___xor__(PyObject *,PyObject *);}
static PyObject *slot_KDBusService_StartupOptions___xor__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KDBusService::StartupOptions* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KDBusService_StartupOptions, &a0, &a0State, &a1))
        {
             ::KDBusService::StartupOptions*sipRes;

            sipRes = new  ::KDBusService::StartupOptions((*a0 ^ a1));
            sipReleaseType(a0,sipType_KDBusService_StartupOptions,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KDBusAddons, xor_slot, NULL, sipArg0, sipArg1);
}


extern "C" {static PyObject *slot_KDBusService_StartupOptions___ior__(PyObject *,PyObject *);}
static PyObject *slot_KDBusService_StartupOptions___ior__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KDBusService_StartupOptions)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::KDBusService::StartupOptions *sipCpp = reinterpret_cast< ::KDBusService::StartupOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KDBusService_StartupOptions));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
        *sipCpp = KDBusService::StartupOptions(*sipCpp | a0);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KDBusService_StartupOptions___or__(PyObject *,PyObject *);}
static PyObject *slot_KDBusService_StartupOptions___or__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KDBusService::StartupOptions* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KDBusService_StartupOptions, &a0, &a0State, &a1))
        {
             ::KDBusService::StartupOptions*sipRes;

            sipRes = new  ::KDBusService::StartupOptions((*a0 | a1));
            sipReleaseType(a0,sipType_KDBusService_StartupOptions,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KDBusAddons, or_slot, NULL, sipArg0, sipArg1);
}


extern "C" {static PyObject *slot_KDBusService_StartupOptions___iand__(PyObject *,PyObject *);}
static PyObject *slot_KDBusService_StartupOptions___iand__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KDBusService_StartupOptions)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::KDBusService::StartupOptions *sipCpp = reinterpret_cast< ::KDBusService::StartupOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KDBusService_StartupOptions));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
            sipCpp-> ::KDBusService::StartupOptions::operator&=(a0);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KDBusService_StartupOptions___and__(PyObject *,PyObject *);}
static PyObject *slot_KDBusService_StartupOptions___and__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KDBusService::StartupOptions* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KDBusService_StartupOptions, &a0, &a0State, &a1))
        {
             ::KDBusService::StartupOptions*sipRes;

            sipRes = new  ::KDBusService::StartupOptions((*a0 & a1));
            sipReleaseType(a0,sipType_KDBusService_StartupOptions,a0State);

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

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KDBusAddons, and_slot, NULL, sipArg0, sipArg1);
}


extern "C" {static PyObject *slot_KDBusService_StartupOptions___invert__(PyObject *);}
static PyObject *slot_KDBusService_StartupOptions___invert__(PyObject *sipSelf)
{
     ::KDBusService::StartupOptions *sipCpp = reinterpret_cast< ::KDBusService::StartupOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KDBusService_StartupOptions));

    if (!sipCpp)
        return 0;


    {
        {
             ::KDBusService::StartupOptions*sipRes;

            sipRes = new  ::KDBusService::StartupOptions(~(*sipCpp));

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

    return 0;
}


extern "C" {static PyObject *slot_KDBusService_StartupOptions___int__(PyObject *);}
static PyObject *slot_KDBusService_StartupOptions___int__(PyObject *sipSelf)
{
     ::KDBusService::StartupOptions *sipCpp = reinterpret_cast< ::KDBusService::StartupOptions *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KDBusService_StartupOptions));

    if (!sipCpp)
        return 0;


    {
        {
            int sipRes;

            sipRes = *sipCpp;

            return SIPLong_FromLong(sipRes);
        }
    }

    return 0;
}


/* Call the instance's destructor. */
extern "C" {static void release_KDBusService_StartupOptions(void *, int);}
static void release_KDBusService_StartupOptions(void *sipCppV, int)
{
    delete reinterpret_cast< ::KDBusService::StartupOptions *>(sipCppV);
}


extern "C" {static void assign_KDBusService_StartupOptions(void *, SIP_SSIZE_T, void *);}
static void assign_KDBusService_StartupOptions(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::KDBusService::StartupOptions *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::KDBusService::StartupOptions *>(sipSrc);
}


extern "C" {static void *array_KDBusService_StartupOptions(SIP_SSIZE_T);}
static void *array_KDBusService_StartupOptions(SIP_SSIZE_T sipNrElem)
{
    return new  ::KDBusService::StartupOptions[sipNrElem];
}


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


extern "C" {static void dealloc_KDBusService_StartupOptions(sipSimpleWrapper *);}
static void dealloc_KDBusService_StartupOptions(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_KDBusService_StartupOptions(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_KDBusService_StartupOptions(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_KDBusService_StartupOptions(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::KDBusService::StartupOptions *sipCpp = 0;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            sipCpp = new  ::KDBusService::StartupOptions();

            return sipCpp;
        }
    }

    {
        int a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "i", &a0))
        {
            sipCpp = new  ::KDBusService::StartupOptions(a0);

            return sipCpp;
        }
    }

    {
        const  ::KDBusService::StartupOptions* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J1", sipType_KDBusService_StartupOptions, &a0, &a0State))
        {
            sipCpp = new  ::KDBusService::StartupOptions(*a0);
            sipReleaseType(const_cast< ::KDBusService::StartupOptions *>(a0),sipType_KDBusService_StartupOptions,a0State);

            return sipCpp;
        }
    }

    return NULL;
}


extern "C" {static int convertTo_KDBusService_StartupOptions(PyObject *, void **, int *, PyObject *);}
static int convertTo_KDBusService_StartupOptions(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
     ::KDBusService::StartupOptions **sipCppPtr = reinterpret_cast< ::KDBusService::StartupOptions **>(sipCppPtrV);

// Allow an instance of the base enum whenever a KDBusService::StartupOptions is expected.

if (sipIsErr == NULL)
    return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KDBusService_StartupOption)) ||
            sipCanConvertToType(sipPy, sipType_KDBusService_StartupOptions, SIP_NO_CONVERTORS));

if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KDBusService_StartupOption)))
{
    *sipCppPtr = new KDBusService::StartupOptions(int(SIPLong_AsLong(sipPy)));

    return sipGetState(sipTransferObj);
}

*sipCppPtr = reinterpret_cast<KDBusService::StartupOptions *>(sipConvertToType(sipPy, sipType_KDBusService_StartupOptions, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));

return 0;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_KDBusService_StartupOptions[] = {
    {(void *)slot_KDBusService_StartupOptions___hash__, hash_slot},
    {(void *)slot_KDBusService_StartupOptions___bool__, bool_slot},
    {(void *)slot_KDBusService_StartupOptions___ne__, ne_slot},
    {(void *)slot_KDBusService_StartupOptions___eq__, eq_slot},
    {(void *)slot_KDBusService_StartupOptions___ixor__, ixor_slot},
    {(void *)slot_KDBusService_StartupOptions___xor__, xor_slot},
    {(void *)slot_KDBusService_StartupOptions___ior__, ior_slot},
    {(void *)slot_KDBusService_StartupOptions___or__, or_slot},
    {(void *)slot_KDBusService_StartupOptions___iand__, iand_slot},
    {(void *)slot_KDBusService_StartupOptions___and__, and_slot},
    {(void *)slot_KDBusService_StartupOptions___invert__, invert_slot},
    {(void *)slot_KDBusService_StartupOptions___int__, int_slot},
    {0, (sipPySlotType)0}
};


static pyqt5ClassPluginDef plugin_KDBusService_StartupOptions = {
    0,
    1,
    0,
    0
};


sipClassTypeDef sipTypeDef_KDBusAddons_KDBusService_StartupOptions = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KDBusService__StartupOptions,
        {0},
        &plugin_KDBusService_StartupOptions
    },
    {
        sipNameNr_StartupOptions,
        {2, 255, 0},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    slots_KDBusService_StartupOptions,
    init_type_KDBusService_StartupOptions,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KDBusService_StartupOptions,
    assign_KDBusService_StartupOptions,
    array_KDBusService_StartupOptions,
    copy_KDBusService_StartupOptions,
    release_KDBusService_StartupOptions,
    0,
    convertTo_KDBusService_StartupOptions,
    0,
    0,
    0,
    0,
    0
};
