/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.14.0
 *
 * Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtDBus.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtDBus/qdbusextratypes.sip"
#include <qdbusextratypes.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtDBus/sipQtDBusQDBusObjectPath.cpp"

#line 27 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtDBus/sipQtDBusQDBusObjectPath.cpp"


PyDoc_STRVAR(doc_QDBusObjectPath_path, "path(self) -> str");

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

    {
        const ::QDBusObjectPath *sipCpp;

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

            sipRes = new ::QString(sipCpp->path());

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

    sipNoMethod(sipParseErr, sipName_QDBusObjectPath, sipName_path, doc_QDBusObjectPath_path);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDBusObjectPath_setPath, "setPath(self, objectPath: Optional[str])");

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

    {
        const ::QString* a0;
        int a0State = 0;
        ::QDBusObjectPath *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QDBusObjectPath, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setPath(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusObjectPath, sipName_setPath, doc_QDBusObjectPath_setPath);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDBusObjectPath_swap, "swap(self, other: QDBusObjectPath)");

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

    {
        ::QDBusObjectPath* a0;
        ::QDBusObjectPath *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QDBusObjectPath, &sipCpp, sipType_QDBusObjectPath, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusObjectPath, sipName_swap, doc_QDBusObjectPath_swap);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QDBusObjectPath___ge__(PyObject *, PyObject *);}
static PyObject *slot_QDBusObjectPath___ge__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QDBusObjectPath *sipCpp = reinterpret_cast< ::QDBusObjectPath *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QDBusObjectPath));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QDBusObjectPath* a0;

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

            sipRes = !operator<((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtDBus, ge_slot, sipType_QDBusObjectPath, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QDBusObjectPath___eq__(PyObject *, PyObject *);}
static PyObject *slot_QDBusObjectPath___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QDBusObjectPath *sipCpp = reinterpret_cast< ::QDBusObjectPath *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QDBusObjectPath));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QDBusObjectPath* a0;

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

            sipRes = operator==((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtDBus, eq_slot, sipType_QDBusObjectPath, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QDBusObjectPath___ne__(PyObject *, PyObject *);}
static PyObject *slot_QDBusObjectPath___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QDBusObjectPath *sipCpp = reinterpret_cast< ::QDBusObjectPath *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QDBusObjectPath));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QDBusObjectPath* a0;

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

            sipRes = operator!=((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtDBus, ne_slot, sipType_QDBusObjectPath, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QDBusObjectPath___lt__(PyObject *, PyObject *);}
static PyObject *slot_QDBusObjectPath___lt__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QDBusObjectPath *sipCpp = reinterpret_cast< ::QDBusObjectPath *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QDBusObjectPath));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QDBusObjectPath* a0;

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

            sipRes = operator<((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtDBus, lt_slot, sipType_QDBusObjectPath, sipSelf, sipArg);
}


extern "C" {static long slot_QDBusObjectPath___hash__(PyObject *);}
static long slot_QDBusObjectPath___hash__(PyObject *sipSelf)
{
    ::QDBusObjectPath *sipCpp = reinterpret_cast< ::QDBusObjectPath *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QDBusObjectPath));

    if (!sipCpp)
        return 0L;


    {
        {
            long sipRes = 0;

#line 36 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtDBus/qdbusextratypes.sip"
        sipRes = qHash(*sipCpp, 0);
#line 247 "/build/pyqt5/src/PyQt5-5.15.11/build/QtDBus/sipQtDBusQDBusObjectPath.cpp"

            return sipRes;
        }
    }

    return 0;
}


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


extern "C" {static void *array_QDBusObjectPath(Py_ssize_t);}
static void *array_QDBusObjectPath(Py_ssize_t sipNrElem)
{
    return new ::QDBusObjectPath[sipNrElem];
}


extern "C" {static void array_delete_QDBusObjectPath(void *);}
static void array_delete_QDBusObjectPath(void *sipCpp)
{
    delete[] reinterpret_cast< ::QDBusObjectPath *>(sipCpp);
}


extern "C" {static void assign_QDBusObjectPath(void *, Py_ssize_t, void *);}
static void assign_QDBusObjectPath(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QDBusObjectPath *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QDBusObjectPath *>(sipSrc);
}


extern "C" {static void *copy_QDBusObjectPath(const void *, Py_ssize_t);}
static void *copy_QDBusObjectPath(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new ::QDBusObjectPath(reinterpret_cast<const ::QDBusObjectPath *>(sipSrc)[sipSrcIdx]);
}


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


extern "C" {static void *init_type_QDBusObjectPath(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QDBusObjectPath(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    ::QDBusObjectPath *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new ::QDBusObjectPath();

            return sipCpp;
        }
    }

    {
        const ::QString* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_QString, &a0, &a0State))
        {
            sipCpp = new ::QDBusObjectPath(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipCpp;
        }
    }

    {
        const ::QDBusObjectPath* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QDBusObjectPath, &a0))
        {
            sipCpp = new ::QDBusObjectPath(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QDBusObjectPath[] = {
    {(void *)slot_QDBusObjectPath___ge__, ge_slot},
    {(void *)slot_QDBusObjectPath___eq__, eq_slot},
    {(void *)slot_QDBusObjectPath___ne__, ne_slot},
    {(void *)slot_QDBusObjectPath___lt__, lt_slot},
    {(void *)slot_QDBusObjectPath___hash__, hash_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QDBusObjectPath[] = {
    {sipName_path, meth_QDBusObjectPath_path, METH_VARARGS, doc_QDBusObjectPath_path},
    {sipName_setPath, meth_QDBusObjectPath_setPath, METH_VARARGS, doc_QDBusObjectPath_setPath},
    {sipName_swap, meth_QDBusObjectPath_swap, METH_VARARGS, doc_QDBusObjectPath_swap}
};

PyDoc_STRVAR(doc_QDBusObjectPath, "\1QDBusObjectPath()\n"
"QDBusObjectPath(objectPath: Optional[str])\n"
"QDBusObjectPath(a0: QDBusObjectPath)");


static pyqt5ClassPluginDef plugin_QDBusObjectPath = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtDBus_QDBusObjectPath = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QDBusObjectPath,
        SIP_NULLPTR,
        &plugin_QDBusObjectPath,
    },
    {
        sipNameNr_QDBusObjectPath,
        {0, 0, 1},
        3, methods_QDBusObjectPath,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QDBusObjectPath,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QDBusObjectPath,
    init_type_QDBusObjectPath,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QDBusObjectPath,
    assign_QDBusObjectPath,
    array_QDBusObjectPath,
    copy_QDBusObjectPath,
    release_QDBusObjectPath,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QDBusObjectPath,
    sizeof (::QDBusObjectPath),
};
