/*
 * 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/qgeocodingmanager.sip"
#include <qgeocodingmanager.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtLocation/qgeocodereply.sip"
#include <qgeocodereply.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qlocale.sip"
#include <qlocale.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtPositioning/qgeocoordinate.sip"
#include <qgeocoordinate.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtPositioning/qgeoshape.sip"
#include <qgeoshape.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtPositioning/qgeoaddress.sip"
#include <qgeoaddress.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 53 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 56 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 59 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 252 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 62 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 240 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 65 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 68 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 71 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 38 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 74 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 77 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 149 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 80 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 83 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 86 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 89 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregexp.sip"
#include <qregexp.h>
#line 92 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 95 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 98 "/build/pyqt5/src/PyQt5-5.15.11/build/QtLocation/sipQtLocationQGeoCodingManager.cpp"


PyDoc_STRVAR(doc_QGeoCodingManager_managerName, "managerName(self) -> str");

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

    {
        const ::QGeoCodingManager *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QGeoCodingManager, sipName_managerName, doc_QGeoCodingManager_managerName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoCodingManager_managerVersion, "managerVersion(self) -> int");

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

    {
        const ::QGeoCodingManager *sipCpp;

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

            sipRes = sipCpp->managerVersion();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoCodingManager, sipName_managerVersion, doc_QGeoCodingManager_managerVersion);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoCodingManager_geocode, "geocode(self, address: QGeoAddress, bounds: QGeoShape = QGeoShape()) -> Optional[QGeoCodeReply]\n"
"geocode(self, searchString: Optional[str], limit: int = -1, offset: int = 0, bounds: QGeoShape = QGeoShape()) -> Optional[QGeoCodeReply]");

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

    {
        const ::QGeoAddress* a0;
        const ::QGeoShape& a1def = QGeoShape();
        const ::QGeoShape* a1 = &a1def;
        ::QGeoCodingManager *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_bounds,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9|J9", &sipSelf, sipType_QGeoCodingManager, &sipCpp, sipType_QGeoAddress, &a0, sipType_QGeoShape, &a1))
        {
            ::QGeoCodeReply*sipRes;

            sipRes = sipCpp->geocode(*a0, *a1);

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

    {
        const ::QString* a0;
        int a0State = 0;
        int a1 = -1;
        int a2 = 0;
        const ::QGeoShape& a3def = QGeoShape();
        const ::QGeoShape* a3 = &a3def;
        ::QGeoCodingManager *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_limit,
            sipName_offset,
            sipName_bounds,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|iiJ9", &sipSelf, sipType_QGeoCodingManager, &sipCpp, sipType_QString, &a0, &a0State, &a1, &a2, sipType_QGeoShape, &a3))
        {
            ::QGeoCodeReply*sipRes;

            sipRes = sipCpp->geocode(*a0, a1, a2, *a3);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

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

    sipNoMethod(sipParseErr, sipName_QGeoCodingManager, sipName_geocode, doc_QGeoCodingManager_geocode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoCodingManager_reverseGeocode, "reverseGeocode(self, coordinate: QGeoCoordinate, bounds: QGeoShape = QGeoShape()) -> Optional[QGeoCodeReply]");

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

    {
        const ::QGeoCoordinate* a0;
        const ::QGeoShape& a1def = QGeoShape();
        const ::QGeoShape* a1 = &a1def;
        ::QGeoCodingManager *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_bounds,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9|J9", &sipSelf, sipType_QGeoCodingManager, &sipCpp, sipType_QGeoCoordinate, &a0, sipType_QGeoShape, &a1))
        {
            ::QGeoCodeReply*sipRes;

            sipRes = sipCpp->reverseGeocode(*a0, *a1);

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

    sipNoMethod(sipParseErr, sipName_QGeoCodingManager, sipName_reverseGeocode, doc_QGeoCodingManager_reverseGeocode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoCodingManager_setLocale, "setLocale(self, locale: QLocale)");

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

    {
        const ::QLocale* a0;
        ::QGeoCodingManager *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QGeoCodingManager, &sipCpp, sipType_QLocale, &a0))
        {
            sipCpp->setLocale(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoCodingManager, sipName_setLocale, doc_QGeoCodingManager_setLocale);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QGeoCodingManager_locale, "locale(self) -> QLocale");

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

    {
        const ::QGeoCodingManager *sipCpp;

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

            sipRes = new ::QLocale(sipCpp->locale());

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

    sipNoMethod(sipParseErr, sipName_QGeoCodingManager, sipName_locale, doc_QGeoCodingManager_locale);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QGeoCodingManager)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

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


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


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


static PyMethodDef methods_QGeoCodingManager[] = {
    {sipName_geocode, SIP_MLMETH_CAST(meth_QGeoCodingManager_geocode), METH_VARARGS|METH_KEYWORDS, doc_QGeoCodingManager_geocode},
    {sipName_locale, meth_QGeoCodingManager_locale, METH_VARARGS, doc_QGeoCodingManager_locale},
    {sipName_managerName, meth_QGeoCodingManager_managerName, METH_VARARGS, doc_QGeoCodingManager_managerName},
    {sipName_managerVersion, meth_QGeoCodingManager_managerVersion, METH_VARARGS, doc_QGeoCodingManager_managerVersion},
    {sipName_reverseGeocode, SIP_MLMETH_CAST(meth_QGeoCodingManager_reverseGeocode), METH_VARARGS|METH_KEYWORDS, doc_QGeoCodingManager_reverseGeocode},
    {sipName_setLocale, meth_QGeoCodingManager_setLocale, METH_VARARGS, doc_QGeoCodingManager_setLocale}
};


extern "C" {static int emit_QGeoCodingManager_error(void *, PyObject *);}

static int emit_QGeoCodingManager_error(void *sipCppV, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    ::QGeoCodingManager *sipCpp = reinterpret_cast< ::QGeoCodingManager *>(sipCppV);

    {
        ::QGeoCodeReply* a0;
        ::QGeoCodeReply::Error a1;
        ::QString a2def = QString();
        ::QString* a2 = &a2def;
        int a2State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J8E|J1", sipType_QGeoCodeReply, &a0, sipType_QGeoCodeReply_Error, &a1, sipType_QString, &a2, &a2State))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->error(a0, a1, *a2);
            Py_END_ALLOW_THREADS

            sipReleaseType(a2, sipType_QString, a2State);

            return 0;
        }
    }

    sipNoMethod(sipParseErr, sipName_QGeoCodingManager, sipName_error, SIP_NULLPTR);

    return -1;
}


/* Define this type's signals. */
static const pyqt5QtSignal signals_QGeoCodingManager[] = {
    {"error(QGeoCodeReply*,QGeoCodeReply::Error,QString)", "\1error(self, reply: Optional[QGeoCodeReply], error: QGeoCodeReply.Error, errorString: Optional[str] = '')", SIP_NULLPTR, emit_QGeoCodingManager_error},
    {"finished(QGeoCodeReply*)", "\1finished(self, reply: Optional[QGeoCodeReply])", SIP_NULLPTR, SIP_NULLPTR},
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
};


static pyqt5ClassPluginDef plugin_QGeoCodingManager = {
    &::QGeoCodingManager::staticMetaObject,
    0,
    signals_QGeoCodingManager,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtLocation_QGeoCodingManager = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QGeoCodingManager,
        SIP_NULLPTR,
        &plugin_QGeoCodingManager,
    },
    {
        sipNameNr_QGeoCodingManager,
        {0, 0, 1},
        6, methods_QGeoCodingManager,
        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},
    },
    SIP_NULLPTR,
    -1,
    -1,
    supers_QGeoCodingManager,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QGeoCodingManager,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QGeoCodingManager,
    cast_QGeoCodingManager,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
