/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 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 "sipAPIQtBluetooth.h"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtBluetooth/qlowenergyadvertisingparameters.sip"
#include <qlowenergyadvertisingparameters.h>
#line 49 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtBluetooth/qlowenergyadvertisingparameters.sip"
#include <qlowenergyadvertisingparameters.h>
#line 31 "/build/pyqt5/src/PyQt5-5.15.7/build/QtBluetooth/sipQtBluetoothQLowEnergyAdvertisingParametersAddressInfo.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtBluetooth/qbluetoothaddress.sip"
#include <qbluetoothaddress.h>
#line 35 "/build/pyqt5/src/PyQt5-5.15.7/build/QtBluetooth/sipQtBluetoothQLowEnergyAdvertisingParametersAddressInfo.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtBluetooth/qlowenergycontroller.sip"
#include <qlowenergycontroller.h>
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/build/QtBluetooth/sipQtBluetoothQLowEnergyAdvertisingParametersAddressInfo.cpp"


extern "C" {static PyObject *slot_QLowEnergyAdvertisingParameters_AddressInfo___ne__(PyObject *,PyObject *);}
static PyObject *slot_QLowEnergyAdvertisingParameters_AddressInfo___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QLowEnergyAdvertisingParameters::AddressInfo *sipCpp = reinterpret_cast< ::QLowEnergyAdvertisingParameters::AddressInfo *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QLowEnergyAdvertisingParameters_AddressInfo));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QLowEnergyAdvertisingParameters::AddressInfo* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtBluetooth, ne_slot, sipType_QLowEnergyAdvertisingParameters_AddressInfo, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QLowEnergyAdvertisingParameters_AddressInfo___eq__(PyObject *,PyObject *);}
static PyObject *slot_QLowEnergyAdvertisingParameters_AddressInfo___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QLowEnergyAdvertisingParameters::AddressInfo *sipCpp = reinterpret_cast< ::QLowEnergyAdvertisingParameters::AddressInfo *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QLowEnergyAdvertisingParameters_AddressInfo));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QLowEnergyAdvertisingParameters::AddressInfo* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtBluetooth, eq_slot, sipType_QLowEnergyAdvertisingParameters_AddressInfo, sipSelf, sipArg);
}


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


extern "C" {static void *array_QLowEnergyAdvertisingParameters_AddressInfo(Py_ssize_t);}
static void *array_QLowEnergyAdvertisingParameters_AddressInfo(Py_ssize_t sipNrElem)
{
    return new  ::QLowEnergyAdvertisingParameters::AddressInfo[sipNrElem];
}


extern "C" {static void array_delete_QLowEnergyAdvertisingParameters_AddressInfo(void *);}
static void array_delete_QLowEnergyAdvertisingParameters_AddressInfo(void *sipCpp)
{
    delete[] reinterpret_cast< ::QLowEnergyAdvertisingParameters::AddressInfo *>(sipCpp);
}


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


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


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


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

    {
        const  ::QBluetoothAddress* a0;
         ::QLowEnergyController::RemoteAddressType a1;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9E", sipType_QBluetoothAddress, &a0, sipType_QLowEnergyController_RemoteAddressType, &a1))
        {
            sipCpp = new  ::QLowEnergyAdvertisingParameters::AddressInfo(*a0,a1);

            return sipCpp;
        }
    }

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

            return sipCpp;
        }
    }

    {
        const  ::QLowEnergyAdvertisingParameters::AddressInfo* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


extern "C" {static PyObject *varget_QLowEnergyAdvertisingParameters_AddressInfo_address(void *, PyObject *, PyObject *);}
static PyObject *varget_QLowEnergyAdvertisingParameters_AddressInfo_address(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QBluetoothAddress*sipVal;
     ::QLowEnergyAdvertisingParameters::AddressInfo *sipCpp = reinterpret_cast< ::QLowEnergyAdvertisingParameters::AddressInfo *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -2);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->address;

    sipPy = sipConvertFromType(sipVal, sipType_QBluetoothAddress, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -1, sipPySelf);
        sipKeepReference(sipPySelf, -2, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QLowEnergyAdvertisingParameters_AddressInfo_address(void *, PyObject *, PyObject *);}
static int varset_QLowEnergyAdvertisingParameters_AddressInfo_address(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QBluetoothAddress*sipVal;
     ::QLowEnergyAdvertisingParameters::AddressInfo *sipCpp = reinterpret_cast< ::QLowEnergyAdvertisingParameters::AddressInfo *>(sipSelf);

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::QBluetoothAddress *>(sipForceConvertToType(sipPy, sipType_QBluetoothAddress, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->address = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QLowEnergyAdvertisingParameters_AddressInfo_type(void *, PyObject *, PyObject *);}
static PyObject *varget_QLowEnergyAdvertisingParameters_AddressInfo_type(void *sipSelf, PyObject *, PyObject *)
{
     ::QLowEnergyController::RemoteAddressType sipVal;
     ::QLowEnergyAdvertisingParameters::AddressInfo *sipCpp = reinterpret_cast< ::QLowEnergyAdvertisingParameters::AddressInfo *>(sipSelf);

    sipVal = sipCpp->type;

    return sipConvertFromEnum(static_cast<int>(sipVal), sipType_QLowEnergyController_RemoteAddressType);
}


extern "C" {static int varset_QLowEnergyAdvertisingParameters_AddressInfo_type(void *, PyObject *, PyObject *);}
static int varset_QLowEnergyAdvertisingParameters_AddressInfo_type(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QLowEnergyController::RemoteAddressType sipVal;
     ::QLowEnergyAdvertisingParameters::AddressInfo *sipCpp = reinterpret_cast< ::QLowEnergyAdvertisingParameters::AddressInfo *>(sipSelf);

    sipVal = ( ::QLowEnergyController::RemoteAddressType)sipConvertToEnum(sipPy, sipType_QLowEnergyController_RemoteAddressType);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->type = sipVal;

    return 0;
}

sipVariableDef variables_QLowEnergyAdvertisingParameters_AddressInfo[] = {
    {InstanceVariable, sipName_address, (PyMethodDef *)varget_QLowEnergyAdvertisingParameters_AddressInfo_address, (PyMethodDef *)varset_QLowEnergyAdvertisingParameters_AddressInfo_address, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_type, (PyMethodDef *)varget_QLowEnergyAdvertisingParameters_AddressInfo_type, (PyMethodDef *)varset_QLowEnergyAdvertisingParameters_AddressInfo_type, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QLowEnergyAdvertisingParameters_AddressInfo, "\1QLowEnergyAdvertisingParameters.AddressInfo(QBluetoothAddress, QLowEnergyController.RemoteAddressType)\n"
"QLowEnergyAdvertisingParameters.AddressInfo()\n"
"QLowEnergyAdvertisingParameters.AddressInfo(QLowEnergyAdvertisingParameters.AddressInfo)");


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


sipClassTypeDef sipTypeDef_QtBluetooth_QLowEnergyAdvertisingParameters_AddressInfo = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QLowEnergyAdvertisingParameters__AddressInfo,
        SIP_NULLPTR,
        &plugin_QLowEnergyAdvertisingParameters_AddressInfo
    },
    {
        sipNameNr_AddressInfo,
        {72, 255, 0},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        2, variables_QLowEnergyAdvertisingParameters_AddressInfo,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QLowEnergyAdvertisingParameters_AddressInfo,
    -1,
    -1,
    SIP_NULLPTR,
    slots_QLowEnergyAdvertisingParameters_AddressInfo,
    init_type_QLowEnergyAdvertisingParameters_AddressInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QLowEnergyAdvertisingParameters_AddressInfo,
    assign_QLowEnergyAdvertisingParameters_AddressInfo,
    array_QLowEnergyAdvertisingParameters_AddressInfo,
    copy_QLowEnergyAdvertisingParameters_AddressInfo,
    release_QLowEnergyAdvertisingParameters_AddressInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QLowEnergyAdvertisingParameters_AddressInfo,
    sizeof ( ::QLowEnergyAdvertisingParameters::AddressInfo),
};
