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

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtNetwork/qsslerror.sip"
#include <qsslerror.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtNetwork/sipQtNetworkQSslError.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtNetwork/qsslcertificate.sip"
#include <qsslcertificate.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtNetwork/sipQtNetworkQSslError.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtNetwork/sipQtNetworkQSslError.cpp"


PyDoc_STRVAR(doc_QSslError_error, "error(self) -> QSslError.SslError");

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

    {
        const  ::QSslError *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSslError, &sipCpp))
        {
             ::QSslError::SslError sipRes;

            sipRes = sipCpp->error();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QSslError_SslError);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSslError, sipName_error, doc_QSslError_error);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSslError_errorString, "errorString(self) -> str");

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

    {
        const  ::QSslError *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSslError, sipName_errorString, doc_QSslError_errorString);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSslError_certificate, "certificate(self) -> QSslCertificate");

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

    {
        const  ::QSslError *sipCpp;

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

            sipRes = new  ::QSslCertificate(sipCpp->certificate());

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

    sipNoMethod(sipParseErr, sipName_QSslError, sipName_certificate, doc_QSslError_certificate);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSslError_swap, "swap(self, QSslError)");

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

    {
         ::QSslError* a0;
         ::QSslError *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSslError, sipName_swap, doc_QSslError_swap);

    return SIP_NULLPTR;
}


extern "C" {static long slot_QSslError___hash__(PyObject *);}
static long slot_QSslError___hash__(PyObject *sipSelf)
{
     ::QSslError *sipCpp = reinterpret_cast< ::QSslError *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QSslError));

    if (!sipCpp)
        return 0L;


    {
        {
            long sipRes = 0;

#line 112 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtNetwork/qsslerror.sip"
        sipRes = qHash(*sipCpp);
#line 162 "/build/pyqt5/src/PyQt5-5.15.7/build/QtNetwork/sipQtNetworkQSslError.cpp"

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_QSslError___ne__(PyObject *,PyObject *);}
static PyObject *slot_QSslError___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QSslError *sipCpp = reinterpret_cast< ::QSslError *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QSslError));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSslError* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtNetwork, ne_slot, sipType_QSslError, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QSslError___eq__(PyObject *,PyObject *);}
static PyObject *slot_QSslError___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QSslError *sipCpp = reinterpret_cast< ::QSslError *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QSslError));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSslError* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtNetwork, eq_slot, sipType_QSslError, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
         ::QSslError::SslError a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "E", sipType_QSslError_SslError, &a0))
        {
            sipCpp = new  ::QSslError(a0);

            return sipCpp;
        }
    }

    {
         ::QSslError::SslError a0;
        const  ::QSslCertificate* a1;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "EJ9", sipType_QSslError_SslError, &a0, sipType_QSslCertificate, &a1))
        {
            sipCpp = new  ::QSslError(a0,*a1);

            return sipCpp;
        }
    }

    {
        const  ::QSslError* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QSslError[] = {
    {(void *)slot_QSslError___hash__, hash_slot},
    {(void *)slot_QSslError___ne__, ne_slot},
    {(void *)slot_QSslError___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QSslError[] = {
    {sipName_certificate, meth_QSslError_certificate, METH_VARARGS, doc_QSslError_certificate},
    {sipName_error, meth_QSslError_error, METH_VARARGS, doc_QSslError_error},
    {sipName_errorString, meth_QSslError_errorString, METH_VARARGS, doc_QSslError_errorString},
    {sipName_swap, meth_QSslError_swap, METH_VARARGS, doc_QSslError_swap}
};

static sipEnumMemberDef enummembers_QSslError[] = {
    {sipName_AuthorityIssuerSerialNumberMismatch, static_cast<int>( ::QSslError::AuthorityIssuerSerialNumberMismatch), 128},
    {sipName_CertificateBlacklisted, static_cast<int>( ::QSslError::CertificateBlacklisted), 128},
    {sipName_CertificateExpired, static_cast<int>( ::QSslError::CertificateExpired), 128},
    {sipName_CertificateNotYetValid, static_cast<int>( ::QSslError::CertificateNotYetValid), 128},
    {sipName_CertificateRejected, static_cast<int>( ::QSslError::CertificateRejected), 128},
    {sipName_CertificateRevoked, static_cast<int>( ::QSslError::CertificateRevoked), 128},
    {sipName_CertificateSignatureFailed, static_cast<int>( ::QSslError::CertificateSignatureFailed), 128},
    {sipName_CertificateStatusUnknown, static_cast<int>( ::QSslError::CertificateStatusUnknown), 128},
    {sipName_CertificateUntrusted, static_cast<int>( ::QSslError::CertificateUntrusted), 128},
    {sipName_HostNameMismatch, static_cast<int>( ::QSslError::HostNameMismatch), 128},
    {sipName_InvalidCaCertificate, static_cast<int>( ::QSslError::InvalidCaCertificate), 128},
    {sipName_InvalidNotAfterField, static_cast<int>( ::QSslError::InvalidNotAfterField), 128},
    {sipName_InvalidNotBeforeField, static_cast<int>( ::QSslError::InvalidNotBeforeField), 128},
    {sipName_InvalidPurpose, static_cast<int>( ::QSslError::InvalidPurpose), 128},
    {sipName_NoError, static_cast<int>( ::QSslError::NoError), 128},
    {sipName_NoPeerCertificate, static_cast<int>( ::QSslError::NoPeerCertificate), 128},
    {sipName_NoSslSupport, static_cast<int>( ::QSslError::NoSslSupport), 128},
    {sipName_OcspInternalError, static_cast<int>( ::QSslError::OcspInternalError), 128},
    {sipName_OcspMalformedRequest, static_cast<int>( ::QSslError::OcspMalformedRequest), 128},
    {sipName_OcspMalformedResponse, static_cast<int>( ::QSslError::OcspMalformedResponse), 128},
    {sipName_OcspNoResponseFound, static_cast<int>( ::QSslError::OcspNoResponseFound), 128},
    {sipName_OcspResponseCannotBeTrusted, static_cast<int>( ::QSslError::OcspResponseCannotBeTrusted), 128},
    {sipName_OcspResponseCertIdUnknown, static_cast<int>( ::QSslError::OcspResponseCertIdUnknown), 128},
    {sipName_OcspResponseExpired, static_cast<int>( ::QSslError::OcspResponseExpired), 128},
    {sipName_OcspSigRequred, static_cast<int>( ::QSslError::OcspSigRequred), 128},
    {sipName_OcspStatusUnknown, static_cast<int>( ::QSslError::OcspStatusUnknown), 128},
    {sipName_OcspTryLater, static_cast<int>( ::QSslError::OcspTryLater), 128},
    {sipName_OcspUnauthorized, static_cast<int>( ::QSslError::OcspUnauthorized), 128},
    {sipName_PathLengthExceeded, static_cast<int>( ::QSslError::PathLengthExceeded), 128},
    {sipName_SelfSignedCertificate, static_cast<int>( ::QSslError::SelfSignedCertificate), 128},
    {sipName_SelfSignedCertificateInChain, static_cast<int>( ::QSslError::SelfSignedCertificateInChain), 128},
    {sipName_SubjectIssuerMismatch, static_cast<int>( ::QSslError::SubjectIssuerMismatch), 128},
    {sipName_UnableToDecodeIssuerPublicKey, static_cast<int>( ::QSslError::UnableToDecodeIssuerPublicKey), 128},
    {sipName_UnableToDecryptCertificateSignature, static_cast<int>( ::QSslError::UnableToDecryptCertificateSignature), 128},
    {sipName_UnableToGetIssuerCertificate, static_cast<int>( ::QSslError::UnableToGetIssuerCertificate), 128},
    {sipName_UnableToGetLocalIssuerCertificate, static_cast<int>( ::QSslError::UnableToGetLocalIssuerCertificate), 128},
    {sipName_UnableToVerifyFirstCertificate, static_cast<int>( ::QSslError::UnableToVerifyFirstCertificate), 128},
    {sipName_UnspecifiedError, static_cast<int>( ::QSslError::UnspecifiedError), 128},
};

PyDoc_STRVAR(doc_QSslError, "\1QSslError()\n"
"QSslError(QSslError.SslError)\n"
"QSslError(QSslError.SslError, QSslCertificate)\n"
"QSslError(QSslError)");


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


sipClassTypeDef sipTypeDef_QtNetwork_QSslError = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSslError,
        SIP_NULLPTR,
        &plugin_QSslError
    },
    {
        sipNameNr_QSslError,
        {0, 0, 1},
        4, methods_QSslError,
        38, enummembers_QSslError,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSslError,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QSslError,
    init_type_QSslError,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSslError,
    assign_QSslError,
    array_QSslError,
    copy_QSslError,
    release_QSslError,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSslError,
    sizeof ( ::QSslError),
};
