/*
 * 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 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmimetype.sip"
#include <qmimetype.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQMimeType.cpp"

#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQMimeType.cpp"
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQMimeType.cpp"


PyDoc_STRVAR(doc_QMimeType_swap, "swap(self, QMimeType)");

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

    {
         ::QMimeType* a0;
         ::QMimeType *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_swap, doc_QMimeType_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_isValid, "isValid(self) -> bool");

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

    {
        const  ::QMimeType *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QMimeType, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_isValid, doc_QMimeType_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_isDefault, "isDefault(self) -> bool");

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

    {
        const  ::QMimeType *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QMimeType, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isDefault();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_isDefault, doc_QMimeType_isDefault);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_name, "name(self) -> str");

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

    {
        const  ::QMimeType *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_name, doc_QMimeType_name);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_comment, "comment(self) -> str");

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

    {
        const  ::QMimeType *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_comment, doc_QMimeType_comment);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_genericIconName, "genericIconName(self) -> str");

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

    {
        const  ::QMimeType *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_genericIconName, doc_QMimeType_genericIconName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_iconName, "iconName(self) -> str");

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

    {
        const  ::QMimeType *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_iconName, doc_QMimeType_iconName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_globPatterns, "globPatterns(self) -> List[str]");

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

    {
        const  ::QMimeType *sipCpp;

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

            sipRes = new  ::QStringList(sipCpp->globPatterns());

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_globPatterns, doc_QMimeType_globPatterns);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_parentMimeTypes, "parentMimeTypes(self) -> List[str]");

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

    {
        const  ::QMimeType *sipCpp;

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

            sipRes = new  ::QStringList(sipCpp->parentMimeTypes());

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_parentMimeTypes, doc_QMimeType_parentMimeTypes);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_allAncestors, "allAncestors(self) -> List[str]");

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

    {
        const  ::QMimeType *sipCpp;

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

            sipRes = new  ::QStringList(sipCpp->allAncestors());

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_allAncestors, doc_QMimeType_allAncestors);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_aliases, "aliases(self) -> List[str]");

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

    {
        const  ::QMimeType *sipCpp;

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

            sipRes = new  ::QStringList(sipCpp->aliases());

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_aliases, doc_QMimeType_aliases);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_suffixes, "suffixes(self) -> List[str]");

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

    {
        const  ::QMimeType *sipCpp;

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

            sipRes = new  ::QStringList(sipCpp->suffixes());

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_suffixes, doc_QMimeType_suffixes);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_preferredSuffix, "preferredSuffix(self) -> str");

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

    {
        const  ::QMimeType *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_preferredSuffix, doc_QMimeType_preferredSuffix);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_inherits, "inherits(self, str) -> bool");

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

    {
        const  ::QString* a0;
        int a0State = 0;
        const  ::QMimeType *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QMimeType, &sipCpp, sipType_QString, &a0, &a0State))
        {
            bool sipRes;

            sipRes = sipCpp->inherits(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_inherits, doc_QMimeType_inherits);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QMimeType_filterString, "filterString(self) -> str");

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

    {
        const  ::QMimeType *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QMimeType, sipName_filterString, doc_QMimeType_filterString);

    return SIP_NULLPTR;
}


extern "C" {static long slot_QMimeType___hash__(PyObject *);}
static long slot_QMimeType___hash__(PyObject *sipSelf)
{
     ::QMimeType *sipCpp = reinterpret_cast< ::QMimeType *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QMimeType));

    if (!sipCpp)
        return 0L;


    {
        {
            long sipRes = 0;

#line 53 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qmimetype.sip"
        sipRes = qHash(*sipCpp);
#line 462 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQMimeType.cpp"

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_QMimeType___ne__(PyObject *,PyObject *);}
static PyObject *slot_QMimeType___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QMimeType *sipCpp = reinterpret_cast< ::QMimeType *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QMimeType));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QMimeType* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

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


extern "C" {static PyObject *slot_QMimeType___eq__(PyObject *,PyObject *);}
static PyObject *slot_QMimeType___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QMimeType *sipCpp = reinterpret_cast< ::QMimeType *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QMimeType));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QMimeType* a0;

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

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

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

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


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QMimeType* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QMimeType[] = {
    {(void *)slot_QMimeType___hash__, hash_slot},
    {(void *)slot_QMimeType___ne__, ne_slot},
    {(void *)slot_QMimeType___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QMimeType[] = {
    {sipName_aliases, meth_QMimeType_aliases, METH_VARARGS, doc_QMimeType_aliases},
    {sipName_allAncestors, meth_QMimeType_allAncestors, METH_VARARGS, doc_QMimeType_allAncestors},
    {sipName_comment, meth_QMimeType_comment, METH_VARARGS, doc_QMimeType_comment},
    {sipName_filterString, meth_QMimeType_filterString, METH_VARARGS, doc_QMimeType_filterString},
    {sipName_genericIconName, meth_QMimeType_genericIconName, METH_VARARGS, doc_QMimeType_genericIconName},
    {sipName_globPatterns, meth_QMimeType_globPatterns, METH_VARARGS, doc_QMimeType_globPatterns},
    {sipName_iconName, meth_QMimeType_iconName, METH_VARARGS, doc_QMimeType_iconName},
    {sipName_inherits, meth_QMimeType_inherits, METH_VARARGS, doc_QMimeType_inherits},
    {sipName_isDefault, meth_QMimeType_isDefault, METH_VARARGS, doc_QMimeType_isDefault},
    {sipName_isValid, meth_QMimeType_isValid, METH_VARARGS, doc_QMimeType_isValid},
    {sipName_name, meth_QMimeType_name, METH_VARARGS, doc_QMimeType_name},
    {sipName_parentMimeTypes, meth_QMimeType_parentMimeTypes, METH_VARARGS, doc_QMimeType_parentMimeTypes},
    {sipName_preferredSuffix, meth_QMimeType_preferredSuffix, METH_VARARGS, doc_QMimeType_preferredSuffix},
    {sipName_suffixes, meth_QMimeType_suffixes, METH_VARARGS, doc_QMimeType_suffixes},
    {sipName_swap, meth_QMimeType_swap, METH_VARARGS, doc_QMimeType_swap}
};

PyDoc_STRVAR(doc_QMimeType, "\1QMimeType()\n"
"QMimeType(QMimeType)");


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


sipClassTypeDef sipTypeDef_QtCore_QMimeType = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QMimeType,
        SIP_NULLPTR,
        &plugin_QMimeType
    },
    {
        sipNameNr_QMimeType,
        {0, 0, 1},
        15, methods_QMimeType,
        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},
    },
    doc_QMimeType,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QMimeType,
    init_type_QMimeType,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QMimeType,
    assign_QMimeType,
    array_QMimeType,
    copy_QMimeType,
    release_QMimeType,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QMimeType,
    sizeof ( ::QMimeType),
};
