/*
 * 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 "sipAPIQtLocation.h"

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtLocation/qgeoroutesegment.sip"
#include <qgeoroutesegment.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoRouteSegment.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtLocation/qgeomaneuver.sip"
#include <qgeomaneuver.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoRouteSegment.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoRouteSegment.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtPositioning/qgeocoordinate.sip"
#include <qgeocoordinate.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoRouteSegment.cpp"


PyDoc_STRVAR(doc_QGeoRouteSegment_isValid, "isValid(self) -> bool");

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

    {
        const ::QGeoRouteSegment *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_isValid, doc_QGeoRouteSegment_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_setNextRouteSegment, "setNextRouteSegment(self, routeSegment: QGeoRouteSegment)");

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

    {
        const ::QGeoRouteSegment* a0;
        ::QGeoRouteSegment *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_setNextRouteSegment, doc_QGeoRouteSegment_setNextRouteSegment);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_nextRouteSegment, "nextRouteSegment(self) -> QGeoRouteSegment");

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

    {
        const ::QGeoRouteSegment *sipCpp;

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

            sipRes = new ::QGeoRouteSegment(sipCpp->nextRouteSegment());

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

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_nextRouteSegment, doc_QGeoRouteSegment_nextRouteSegment);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_setTravelTime, "setTravelTime(self, secs: int)");

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

    {
        int a0;
        ::QGeoRouteSegment *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QGeoRouteSegment, &sipCpp, &a0))
        {
            sipCpp->setTravelTime(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_setTravelTime, doc_QGeoRouteSegment_setTravelTime);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_travelTime, "travelTime(self) -> int");

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

    {
        const ::QGeoRouteSegment *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QGeoRouteSegment, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->travelTime();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_travelTime, doc_QGeoRouteSegment_travelTime);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_setDistance, "setDistance(self, distance: float)");

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

    {
        ::qreal a0;
        ::QGeoRouteSegment *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_QGeoRouteSegment, &sipCpp, &a0))
        {
            sipCpp->setDistance(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_setDistance, doc_QGeoRouteSegment_setDistance);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_distance, "distance(self) -> float");

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

    {
        const ::QGeoRouteSegment *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QGeoRouteSegment, &sipCpp))
        {
            ::qreal sipRes;

            sipRes = sipCpp->distance();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_distance, doc_QGeoRouteSegment_distance);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_setPath, "setPath(self, path: Iterable[QGeoCoordinate])");

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

    {
        const QList< ::QGeoCoordinate>* a0;
        int a0State = 0;
        ::QGeoRouteSegment *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QGeoRouteSegment, &sipCpp, sipType_QList_0100QGeoCoordinate, &a0, &a0State))
        {
            sipCpp->setPath(*a0);
            sipReleaseType(const_cast<QList< ::QGeoCoordinate> *>(a0), sipType_QList_0100QGeoCoordinate, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_setPath, doc_QGeoRouteSegment_setPath);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_path, "path(self) -> list[QGeoCoordinate]");

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

    {
        const ::QGeoRouteSegment *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QGeoRouteSegment, &sipCpp))
        {
            QList< ::QGeoCoordinate>*sipRes;

            sipRes = new QList< ::QGeoCoordinate>(sipCpp->path());

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

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_path, doc_QGeoRouteSegment_path);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_setManeuver, "setManeuver(self, maneuver: QGeoManeuver)");

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

    {
        const ::QGeoManeuver* a0;
        ::QGeoRouteSegment *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QGeoRouteSegment, &sipCpp, sipType_QGeoManeuver, &a0))
        {
            sipCpp->setManeuver(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_setManeuver, doc_QGeoRouteSegment_setManeuver);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_maneuver, "maneuver(self) -> QGeoManeuver");

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

    {
        const ::QGeoRouteSegment *sipCpp;

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

            sipRes = new ::QGeoManeuver(sipCpp->maneuver());

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

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_maneuver, doc_QGeoRouteSegment_maneuver);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoRouteSegment_isLegLastSegment, "isLegLastSegment(self) -> bool");

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

    {
        const ::QGeoRouteSegment *sipCpp;

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

            sipRes = sipCpp->isLegLastSegment();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoRouteSegment, sipName_isLegLastSegment, doc_QGeoRouteSegment_isLegLastSegment);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QGeoRouteSegment___ne__(PyObject *, PyObject *);}
static PyObject *slot_QGeoRouteSegment___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QGeoRouteSegment *sipCpp = reinterpret_cast< ::QGeoRouteSegment *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QGeoRouteSegment));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QGeoRouteSegment* a0;

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

            sipRes = sipCpp->::QGeoRouteSegment::operator!=(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtLocation, ne_slot, sipType_QGeoRouteSegment, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QGeoRouteSegment___eq__(PyObject *, PyObject *);}
static PyObject *slot_QGeoRouteSegment___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QGeoRouteSegment *sipCpp = reinterpret_cast< ::QGeoRouteSegment *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QGeoRouteSegment));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QGeoRouteSegment* a0;

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

            sipRes = sipCpp->::QGeoRouteSegment::operator==(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtLocation, eq_slot, sipType_QGeoRouteSegment, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QGeoRouteSegment* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QGeoRouteSegment[] = {
    {(void *)slot_QGeoRouteSegment___ne__, ne_slot},
    {(void *)slot_QGeoRouteSegment___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QGeoRouteSegment[] = {
    {sipName_distance, meth_QGeoRouteSegment_distance, METH_VARARGS, doc_QGeoRouteSegment_distance},
    {sipName_isLegLastSegment, meth_QGeoRouteSegment_isLegLastSegment, METH_VARARGS, doc_QGeoRouteSegment_isLegLastSegment},
    {sipName_isValid, meth_QGeoRouteSegment_isValid, METH_VARARGS, doc_QGeoRouteSegment_isValid},
    {sipName_maneuver, meth_QGeoRouteSegment_maneuver, METH_VARARGS, doc_QGeoRouteSegment_maneuver},
    {sipName_nextRouteSegment, meth_QGeoRouteSegment_nextRouteSegment, METH_VARARGS, doc_QGeoRouteSegment_nextRouteSegment},
    {sipName_path, meth_QGeoRouteSegment_path, METH_VARARGS, doc_QGeoRouteSegment_path},
    {sipName_setDistance, meth_QGeoRouteSegment_setDistance, METH_VARARGS, doc_QGeoRouteSegment_setDistance},
    {sipName_setManeuver, meth_QGeoRouteSegment_setManeuver, METH_VARARGS, doc_QGeoRouteSegment_setManeuver},
    {sipName_setNextRouteSegment, meth_QGeoRouteSegment_setNextRouteSegment, METH_VARARGS, doc_QGeoRouteSegment_setNextRouteSegment},
    {sipName_setPath, meth_QGeoRouteSegment_setPath, METH_VARARGS, doc_QGeoRouteSegment_setPath},
    {sipName_setTravelTime, meth_QGeoRouteSegment_setTravelTime, METH_VARARGS, doc_QGeoRouteSegment_setTravelTime},
    {sipName_travelTime, meth_QGeoRouteSegment_travelTime, METH_VARARGS, doc_QGeoRouteSegment_travelTime}
};

PyDoc_STRVAR(doc_QGeoRouteSegment, "\1QGeoRouteSegment()\n"
"QGeoRouteSegment(other: QGeoRouteSegment)");


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


sipClassTypeDef sipTypeDef_QtLocation_QGeoRouteSegment = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QGeoRouteSegment,
        SIP_NULLPTR,
        &plugin_QGeoRouteSegment,
    },
    {
        sipNameNr_QGeoRouteSegment,
        {0, 0, 1},
        12, methods_QGeoRouteSegment,
        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_QGeoRouteSegment,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QGeoRouteSegment,
    init_type_QGeoRouteSegment,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QGeoRouteSegment,
    assign_QGeoRouteSegment,
    array_QGeoRouteSegment,
    copy_QGeoRouteSegment,
    release_QGeoRouteSegment,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QGeoRouteSegment,
    sizeof (::QGeoRouteSegment),
};
