/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.3
 */

#include "sipAPIKConfigCore.h"

#include <kemailsettings.h>

#include <qstring.h>
#include <qstringlist.h>


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

    {
        const  ::KEMailSettings *sipCpp;

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

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

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KEMailSettings, sipName_profiles, NULL);

    return NULL;
}


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

    {
        const  ::KEMailSettings *sipCpp;

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

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

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KEMailSettings, sipName_currentProfileName, NULL);

    return NULL;
}


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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KEMailSettings, &sipCpp, sipType_QString,&a0, &a0State))
        {
            sipCpp->setProfile(*a0);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KEMailSettings, sipName_setProfile, NULL);

    return NULL;
}


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

    {
        const  ::KEMailSettings *sipCpp;

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

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

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KEMailSettings, sipName_defaultProfileName, NULL);

    return NULL;
}


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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_KEMailSettings, &sipCpp, sipType_QString,&a0, &a0State))
        {
            sipCpp->setDefault(*a0);
            sipReleaseType(const_cast< ::QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KEMailSettings, sipName_setDefault, NULL);

    return NULL;
}


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

    {
         ::KEMailSettings::Setting a0;
        const  ::KEMailSettings *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_KEMailSettings, &sipCpp, sipType_KEMailSettings_Setting, &a0))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->getSetting(a0));

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KEMailSettings, sipName_getSetting, NULL);

    return NULL;
}


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

    {
         ::KEMailSettings::Setting a0;
        const  ::QString* a1;
        int a1State = 0;
         ::KEMailSettings *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BEJ1", &sipSelf, sipType_KEMailSettings, &sipCpp, sipType_KEMailSettings_Setting, &a0, sipType_QString,&a1, &a1State))
        {
            sipCpp->setSetting(a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a1),sipType_QString,a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_KEMailSettings, sipName_setSetting, NULL);

    return NULL;
}


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


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


extern "C" {static void *init_type_KEMailSettings(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_KEMailSettings(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::KEMailSettings *sipCpp = 0;

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

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KEMailSettings[] = {
    {SIP_MLNAME_CAST(sipName_currentProfileName), meth_KEMailSettings_currentProfileName, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_defaultProfileName), meth_KEMailSettings_defaultProfileName, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_getSetting), meth_KEMailSettings_getSetting, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_profiles), meth_KEMailSettings_profiles, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setDefault), meth_KEMailSettings_setDefault, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setProfile), meth_KEMailSettings_setProfile, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setSetting), meth_KEMailSettings_setSetting, METH_VARARGS, NULL}
};

static sipEnumMemberDef enummembers_KEMailSettings[] = {
    {sipName_ClientProgram, static_cast<int>( ::KEMailSettings::ClientProgram), 37},
    {sipName_ClientTerminal, static_cast<int>( ::KEMailSettings::ClientTerminal), 37},
    {sipName_EmailAddress, static_cast<int>( ::KEMailSettings::EmailAddress), 37},
    {sipName_InServer, static_cast<int>( ::KEMailSettings::InServer), 37},
    {sipName_InServerLogin, static_cast<int>( ::KEMailSettings::InServerLogin), 37},
    {sipName_InServerMBXType, static_cast<int>( ::KEMailSettings::InServerMBXType), 37},
    {sipName_InServerPass, static_cast<int>( ::KEMailSettings::InServerPass), 37},
    {sipName_InServerTLS, static_cast<int>( ::KEMailSettings::InServerTLS), 37},
    {sipName_InServerType, static_cast<int>( ::KEMailSettings::InServerType), 37},
    {sipName_OTHER, static_cast<int>( ::KEMailSettings::OTHER), 36},
    {sipName_Organization, static_cast<int>( ::KEMailSettings::Organization), 37},
    {sipName_OutServer, static_cast<int>( ::KEMailSettings::OutServer), 37},
    {sipName_OutServerCommand, static_cast<int>( ::KEMailSettings::OutServerCommand), 37},
    {sipName_OutServerLogin, static_cast<int>( ::KEMailSettings::OutServerLogin), 37},
    {sipName_OutServerPass, static_cast<int>( ::KEMailSettings::OutServerPass), 37},
    {sipName_OutServerTLS, static_cast<int>( ::KEMailSettings::OutServerTLS), 37},
    {sipName_OutServerType, static_cast<int>( ::KEMailSettings::OutServerType), 37},
    {sipName_POP3, static_cast<int>( ::KEMailSettings::POP3), 36},
    {sipName_RealName, static_cast<int>( ::KEMailSettings::RealName), 37},
    {sipName_ReplyToAddress, static_cast<int>( ::KEMailSettings::ReplyToAddress), 37},
    {sipName_SMTP, static_cast<int>( ::KEMailSettings::SMTP), 36},
};


static pyqt5ClassPluginDef plugin_KEMailSettings = {
    0,
    0,
    0,
    0
};


sipClassTypeDef sipTypeDef_KConfigCore_KEMailSettings = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KEMailSettings,
        {0},
        &plugin_KEMailSettings
    },
    {
        sipNameNr_KEMailSettings,
        {0, 0, 1},
        7, methods_KEMailSettings,
        21, enummembers_KEMailSettings,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    0,
    init_type_KEMailSettings,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KEMailSettings,
    0,
    0,
    0,
    release_KEMailSettings,
    0,
    0,
    0,
    0,
    0,
    0,
    0
};
