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

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qtimezone.sip"
#include <qtimezone.h>
#line 50 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qtimezone.sip"
#include <qtimezone.h>
#line 31 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQTimeZoneOffsetData.cpp"

#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 35 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQTimeZoneOffsetData.cpp"
#line 360 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qdatetime.sip"
#include <qdatetime.h>
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQTimeZoneOffsetData.cpp"


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


extern "C" {static void *array_QTimeZone_OffsetData(Py_ssize_t);}
static void *array_QTimeZone_OffsetData(Py_ssize_t sipNrElem)
{
    return new  ::QTimeZone::OffsetData[sipNrElem];
}


extern "C" {static void array_delete_QTimeZone_OffsetData(void *);}
static void array_delete_QTimeZone_OffsetData(void *sipCpp)
{
    delete[] reinterpret_cast< ::QTimeZone::OffsetData *>(sipCpp);
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QTimeZone::OffsetData* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_QTimeZone_OffsetData_abbreviation(void *, PyObject *, PyObject *);}
static PyObject *varget_QTimeZone_OffsetData_abbreviation(void *sipSelf, PyObject *, PyObject *)
{
     ::QString*sipVal;
     ::QTimeZone::OffsetData *sipCpp = reinterpret_cast< ::QTimeZone::OffsetData *>(sipSelf);

    sipVal = &sipCpp->abbreviation;

    return sipConvertFromType(sipVal, sipType_QString, SIP_NULLPTR);
}


extern "C" {static int varset_QTimeZone_OffsetData_abbreviation(void *, PyObject *, PyObject *);}
static int varset_QTimeZone_OffsetData_abbreviation(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QString*sipVal;
     ::QTimeZone::OffsetData *sipCpp = reinterpret_cast< ::QTimeZone::OffsetData *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::QString *>(sipForceConvertToType(sipPy, sipType_QString, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->abbreviation = *sipVal;

    sipReleaseType(sipVal, sipType_QString, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QTimeZone_OffsetData_atUtc(void *, PyObject *, PyObject *);}
static PyObject *varget_QTimeZone_OffsetData_atUtc(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QDateTime*sipVal;
     ::QTimeZone::OffsetData *sipCpp = reinterpret_cast< ::QTimeZone::OffsetData *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -15);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->atUtc;

    sipPy = sipConvertFromType(sipVal, sipType_QDateTime, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -14, sipPySelf);
        sipKeepReference(sipPySelf, -15, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QTimeZone_OffsetData_atUtc(void *, PyObject *, PyObject *);}
static int varset_QTimeZone_OffsetData_atUtc(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QDateTime*sipVal;
     ::QTimeZone::OffsetData *sipCpp = reinterpret_cast< ::QTimeZone::OffsetData *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::QDateTime *>(sipForceConvertToType(sipPy, sipType_QDateTime, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->atUtc = *sipVal;

    sipReleaseType(sipVal, sipType_QDateTime, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QTimeZone_OffsetData_daylightTimeOffset(void *, PyObject *, PyObject *);}
static PyObject *varget_QTimeZone_OffsetData_daylightTimeOffset(void *sipSelf, PyObject *, PyObject *)
{
    int sipVal;
     ::QTimeZone::OffsetData *sipCpp = reinterpret_cast< ::QTimeZone::OffsetData *>(sipSelf);

    sipVal = sipCpp->daylightTimeOffset;

    return PyLong_FromLong(sipVal);
}


extern "C" {static int varset_QTimeZone_OffsetData_daylightTimeOffset(void *, PyObject *, PyObject *);}
static int varset_QTimeZone_OffsetData_daylightTimeOffset(void *sipSelf, PyObject *sipPy, PyObject *)
{
    int sipVal;
     ::QTimeZone::OffsetData *sipCpp = reinterpret_cast< ::QTimeZone::OffsetData *>(sipSelf);

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->daylightTimeOffset = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QTimeZone_OffsetData_offsetFromUtc(void *, PyObject *, PyObject *);}
static PyObject *varget_QTimeZone_OffsetData_offsetFromUtc(void *sipSelf, PyObject *, PyObject *)
{
    int sipVal;
     ::QTimeZone::OffsetData *sipCpp = reinterpret_cast< ::QTimeZone::OffsetData *>(sipSelf);

    sipVal = sipCpp->offsetFromUtc;

    return PyLong_FromLong(sipVal);
}


extern "C" {static int varset_QTimeZone_OffsetData_offsetFromUtc(void *, PyObject *, PyObject *);}
static int varset_QTimeZone_OffsetData_offsetFromUtc(void *sipSelf, PyObject *sipPy, PyObject *)
{
    int sipVal;
     ::QTimeZone::OffsetData *sipCpp = reinterpret_cast< ::QTimeZone::OffsetData *>(sipSelf);

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->offsetFromUtc = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QTimeZone_OffsetData_standardTimeOffset(void *, PyObject *, PyObject *);}
static PyObject *varget_QTimeZone_OffsetData_standardTimeOffset(void *sipSelf, PyObject *, PyObject *)
{
    int sipVal;
     ::QTimeZone::OffsetData *sipCpp = reinterpret_cast< ::QTimeZone::OffsetData *>(sipSelf);

    sipVal = sipCpp->standardTimeOffset;

    return PyLong_FromLong(sipVal);
}


extern "C" {static int varset_QTimeZone_OffsetData_standardTimeOffset(void *, PyObject *, PyObject *);}
static int varset_QTimeZone_OffsetData_standardTimeOffset(void *sipSelf, PyObject *sipPy, PyObject *)
{
    int sipVal;
     ::QTimeZone::OffsetData *sipCpp = reinterpret_cast< ::QTimeZone::OffsetData *>(sipSelf);

    sipVal = sipLong_AsInt(sipPy);

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

    sipCpp->standardTimeOffset = sipVal;

    return 0;
}

sipVariableDef variables_QTimeZone_OffsetData[] = {
    {InstanceVariable, sipName_abbreviation, (PyMethodDef *)varget_QTimeZone_OffsetData_abbreviation, (PyMethodDef *)varset_QTimeZone_OffsetData_abbreviation, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_atUtc, (PyMethodDef *)varget_QTimeZone_OffsetData_atUtc, (PyMethodDef *)varset_QTimeZone_OffsetData_atUtc, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_daylightTimeOffset, (PyMethodDef *)varget_QTimeZone_OffsetData_daylightTimeOffset, (PyMethodDef *)varset_QTimeZone_OffsetData_daylightTimeOffset, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_offsetFromUtc, (PyMethodDef *)varget_QTimeZone_OffsetData_offsetFromUtc, (PyMethodDef *)varset_QTimeZone_OffsetData_offsetFromUtc, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_standardTimeOffset, (PyMethodDef *)varget_QTimeZone_OffsetData_standardTimeOffset, (PyMethodDef *)varset_QTimeZone_OffsetData_standardTimeOffset, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QTimeZone_OffsetData, "\1QTimeZone.OffsetData()\n"
"QTimeZone.OffsetData(QTimeZone.OffsetData)");


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


sipClassTypeDef sipTypeDef_QtCore_QTimeZone_OffsetData = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QTimeZone__OffsetData,
        SIP_NULLPTR,
        &plugin_QTimeZone_OffsetData
    },
    {
        sipNameNr_OffsetData,
        {302, 255, 0},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        5, variables_QTimeZone_OffsetData,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QTimeZone_OffsetData,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QTimeZone_OffsetData,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QTimeZone_OffsetData,
    assign_QTimeZone_OffsetData,
    array_QTimeZone_OffsetData,
    copy_QTimeZone_OffsetData,
    release_QTimeZone_OffsetData,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QTimeZone_OffsetData,
    sizeof ( ::QTimeZone::OffsetData),
};
