/*
 * 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 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 501 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 31 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQByteArrayFromBase64Result.cpp"

#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 35 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQByteArrayFromBase64Result.cpp"


PyDoc_STRVAR(doc_QByteArray_FromBase64Result_swap, "swap(self, QByteArray.FromBase64Result)");

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

    {
         ::QByteArray::FromBase64Result* a0;
         ::QByteArray::FromBase64Result *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_FromBase64Result, sipName_swap, doc_QByteArray_FromBase64Result_swap);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QByteArray_FromBase64Result___eq__(PyObject *,PyObject *);}
static PyObject *slot_QByteArray_FromBase64Result___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QByteArray::FromBase64Result *sipCpp = reinterpret_cast< ::QByteArray::FromBase64Result *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QByteArray_FromBase64Result));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QByteArray::FromBase64Result* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtCore, eq_slot, sipType_QByteArray_FromBase64Result, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QByteArray_FromBase64Result___ne__(PyObject *,PyObject *);}
static PyObject *slot_QByteArray_FromBase64Result___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QByteArray::FromBase64Result *sipCpp = reinterpret_cast< ::QByteArray::FromBase64Result *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QByteArray_FromBase64Result));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QByteArray::FromBase64Result* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtCore, ne_slot, sipType_QByteArray_FromBase64Result, sipSelf, sipArg);
}


extern "C" {static long slot_QByteArray_FromBase64Result___hash__(PyObject *);}
static long slot_QByteArray_FromBase64Result___hash__(PyObject *sipSelf)
{
     ::QByteArray::FromBase64Result *sipCpp = reinterpret_cast< ::QByteArray::FromBase64Result *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QByteArray_FromBase64Result));

    if (!sipCpp)
        return 0L;


    {
        {
            long sipRes = 0;

#line 516 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
            sipRes = qHash(*sipCpp);
#line 144 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQByteArrayFromBase64Result.cpp"

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_QByteArray_FromBase64Result___int__(PyObject *);}
static PyObject *slot_QByteArray_FromBase64Result___int__(PyObject *sipSelf)
{
     ::QByteArray::FromBase64Result *sipCpp = reinterpret_cast< ::QByteArray::FromBase64Result *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QByteArray_FromBase64Result));

    if (!sipCpp)
        return SIP_NULLPTR;


    {
        {
            bool sipRes = 0;

#line 510 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
            // This is required because SIP doesn't handle operator bool() properly.
            sipRes = sipCpp->operator bool();
#line 170 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQByteArrayFromBase64Result.cpp"

            return PyBool_FromLong(sipRes);
        }
    }

    return 0;
}


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


extern "C" {static void *array_QByteArray_FromBase64Result(Py_ssize_t);}
static void *array_QByteArray_FromBase64Result(Py_ssize_t sipNrElem)
{
    return new  ::QByteArray::FromBase64Result[sipNrElem];
}


extern "C" {static void array_delete_QByteArray_FromBase64Result(void *);}
static void array_delete_QByteArray_FromBase64Result(void *sipCpp)
{
    delete[] reinterpret_cast< ::QByteArray::FromBase64Result *>(sipCpp);
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QByteArray::FromBase64Result* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QByteArray_FromBase64Result[] = {
    {(void *)slot_QByteArray_FromBase64Result___eq__, eq_slot},
    {(void *)slot_QByteArray_FromBase64Result___ne__, ne_slot},
    {(void *)slot_QByteArray_FromBase64Result___hash__, hash_slot},
    {(void *)slot_QByteArray_FromBase64Result___int__, int_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QByteArray_FromBase64Result[] = {
    {sipName_swap, meth_QByteArray_FromBase64Result_swap, METH_VARARGS, doc_QByteArray_FromBase64Result_swap}
};


extern "C" {static PyObject *varget_QByteArray_FromBase64Result_decoded(void *, PyObject *, PyObject *);}
static PyObject *varget_QByteArray_FromBase64Result_decoded(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QByteArray*sipVal;
     ::QByteArray::FromBase64Result *sipCpp = reinterpret_cast< ::QByteArray::FromBase64Result *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -20);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->decoded;

    sipPy = sipConvertFromType(sipVal, sipType_QByteArray, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -19, sipPySelf);
        sipKeepReference(sipPySelf, -20, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QByteArray_FromBase64Result_decoded(void *, PyObject *, PyObject *);}
static int varset_QByteArray_FromBase64Result_decoded(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QByteArray*sipVal;
     ::QByteArray::FromBase64Result *sipCpp = reinterpret_cast< ::QByteArray::FromBase64Result *>(sipSelf);

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

    if (sipIsErr)
        return -1;

    sipCpp->decoded = *sipVal;

    sipReleaseType(sipVal, sipType_QByteArray, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QByteArray_FromBase64Result_decodingStatus(void *, PyObject *, PyObject *);}
static PyObject *varget_QByteArray_FromBase64Result_decodingStatus(void *sipSelf, PyObject *, PyObject *)
{
     ::QByteArray::Base64DecodingStatus sipVal;
     ::QByteArray::FromBase64Result *sipCpp = reinterpret_cast< ::QByteArray::FromBase64Result *>(sipSelf);

    sipVal = sipCpp->decodingStatus;

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


extern "C" {static int varset_QByteArray_FromBase64Result_decodingStatus(void *, PyObject *, PyObject *);}
static int varset_QByteArray_FromBase64Result_decodingStatus(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QByteArray::Base64DecodingStatus sipVal;
     ::QByteArray::FromBase64Result *sipCpp = reinterpret_cast< ::QByteArray::FromBase64Result *>(sipSelf);

    sipVal = ( ::QByteArray::Base64DecodingStatus)sipConvertToEnum(sipPy, sipType_QByteArray_Base64DecodingStatus);

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

    sipCpp->decodingStatus = sipVal;

    return 0;
}

sipVariableDef variables_QByteArray_FromBase64Result[] = {
    {InstanceVariable, sipName_decoded, (PyMethodDef *)varget_QByteArray_FromBase64Result_decoded, (PyMethodDef *)varset_QByteArray_FromBase64Result_decoded, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_decodingStatus, (PyMethodDef *)varget_QByteArray_FromBase64Result_decodingStatus, (PyMethodDef *)varset_QByteArray_FromBase64Result_decodingStatus, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QByteArray_FromBase64Result, "\1QByteArray.FromBase64Result()\n"
"QByteArray.FromBase64Result(QByteArray.FromBase64Result)");


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


sipClassTypeDef sipTypeDef_QtCore_QByteArray_FromBase64Result = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QByteArray__FromBase64Result,
        SIP_NULLPTR,
        &plugin_QByteArray_FromBase64Result
    },
    {
        sipNameNr_FromBase64Result,
        {21, 255, 0},
        1, methods_QByteArray_FromBase64Result,
        0, SIP_NULLPTR,
        2, variables_QByteArray_FromBase64Result,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QByteArray_FromBase64Result,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QByteArray_FromBase64Result,
    init_type_QByteArray_FromBase64Result,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QByteArray_FromBase64Result,
    assign_QByteArray_FromBase64Result,
    array_QByteArray_FromBase64Result,
    copy_QByteArray_FromBase64Result,
    release_QByteArray_FromBase64Result,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QByteArray_FromBase64Result,
    sizeof ( ::QByteArray::FromBase64Result),
};
