/*
 * Module code.
 *
 * Generated by SIP 4.12.4 on Fri Dec 30 00:38:39 2011
 *
 * 
 *  Copyright (c) 2011 Shaheed Haque (srhaque@theiet.org)
 * 
 *  This file is part of PyKDE4.
 * 
 *  PyKDE4 is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as
 *  published by the Free Software Foundation; either version 2.1 of
 *  the License, or (at your option) any later version.
 * 
 *  PyKDE4 is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http:www.gnu.org/licenses/>.
 * 
 * 
 *  Copyright (c) 2011 Shaheed Haque (srhaque@theiet.org)
 * 
 *  This file is part of PyKDE4.
 * 
 *  PyKDE4 is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as
 *  published by the Free Software Foundation; either version 2.1 of
 *  the License, or (at your option) any later version.
 * 
 *  PyKDE4 is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http:www.gnu.org/licenses/>.
 * 
 * 
 *  Copyright (c) 2011 Shaheed Haque (srhaque@theiet.org)
 * 
 *  This file is part of PyKDE4.
 * 
 *  PyKDE4 is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as
 *  published by the Free Software Foundation; either version 2.1 of
 *  the License, or (at your option) any later version.
 * 
 *  PyKDE4 is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http:www.gnu.org/licenses/>.
 * 
 * 
 *  Copyright (c) 2011 Shaheed Haque (srhaque@theiet.org)
 * 
 *  This file is part of PyKDE4.
 * 
 *  PyKDE4 is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as
 *  published by the Free Software Foundation; either version 2.1 of
 *  the License, or (at your option) any later version.
 * 
 *  PyKDE4 is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http:www.gnu.org/licenses/>.
 * 
 */

#include "sipAPIkterminal.h"

#line 36 "/usr/local/share/py-sip/QtCore/qstring.sip"
#include <qstring.h>
#line 85 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kterminal/sipkterminalpart0.cpp"
#line 36 "/usr/local/share/py-sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 88 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kterminal/sipkterminalpart0.cpp"

/* Define the strings used by this module. */
const char sipStrings_kterminal[] = {
    'P', 'y', 'Q', 't', '4', '.', 'Q', 't', 'C', 'o', 'r', 'e', '.', 'p', 'y', 'q', 't', 'W', 'r', 'a', 'p', 'p', 'e', 'r', 'T', 'y', 'p', 'e', 0,
    'f', 'o', 'r', 'e', 'g', 'r', 'o', 'u', 'n', 'd', 'P', 'r', 'o', 'c', 'e', 's', 's', 'N', 'a', 'm', 'e', 0,
    't', 'e', 'r', 'm', 'i', 'n', 'a', 'l', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 'V', '2', 0,
    'f', 'o', 'r', 'e', 'g', 'r', 'o', 'u', 'n', 'd', 'P', 'r', 'o', 'c', 'e', 's', 's', 'I', 'd', 0,
    'T', 'e', 'r', 'm', 'i', 'n', 'a', 'l', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 'V', '2', 0,
    't', 'e', 'r', 'm', 'i', 'n', 'a', 'l', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0,
    't', 'e', 'r', 'm', 'i', 'n', 'a', 'l', 'P', 'r', 'o', 'c', 'e', 's', 's', 'I', 'd', 0,
    'T', 'e', 'r', 'm', 'i', 'n', 'a', 'l', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0,
    'd', 'e', 's', 't', 'r', 'o', 'y', 'S', 'u', 'b', 'W', 'i', 'n', 'd', 'o', 'w', 's', 0,
    'd', 'e', 's', 't', 'r', 'o', 'y', 'O', 'l', 'd', 'W', 'i', 'n', 'd', 'o', 'w', 0,
    'i', 'n', 'i', 't', 'i', 'a', 'l', 'i', 'z', 'e', 'W', 'i', 'n', 'd', 'o', 'w', 0,
    'P', 'y', 'K', 'D', 'E', '4', '.', 'k', 't', 'e', 'r', 'm', 'i', 'n', 'a', 'l', 0,
    's', 'h', 'o', 'w', 'S', 'h', 'e', 'l', 'l', 'I', 'n', 'D', 'i', 'r', 0,
    'c', 'h', 'a', 'n', 'g', 'e', 'd', 'S', 'i', 'g', 'n', 'a', 'l', 0,
    'd', 'e', 's', 't', 'r', 'o', 'y', 'W', 'i', 'n', 'd', 'o', 'w', 0,
    't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 'T', 'i', 'm', 'e', 0,
    's', 't', 'a', 'r', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 0,
    'c', 'o', 'n', 's', 't', 'r', 'a', 'i', 'n', 't', 0,
    'r', 'e', 'p', 'e', 'a', 't', 'T', 'i', 'm', 'e', 0,
    'K', 'T', 'e', 'r', 'm', 'i', 'n', 'a', 'l', 0,
    's', 'e', 'n', 'd', 'I', 'n', 'p', 'u', 't', 0,
    'b', 'e', 'g', 'i', 'n', 'n', 'i', 'n', 'g', 0,
    'p', 'r', 'o', 'p', 'e', 'r', 't', 'y', 0,
    'e', 'n', 'a', 'b', 'l', 'e', 'd', 0,
    'w', 'i', 'n', 'd', 'o', 'w', 0,
    'o', 'p', 't', 'i', 'o', 'n', 0,
    'w', 'i', 'd', 'g', 'e', 't', 0,
    's', 'y', 's', 't', 'e', 'm', 0,
    'd', 'e', 'v', 'i', 'c', 'e', 0,
    'c', 'o', 'l', 'u', 'm', 'n', 0,
    'o', 'f', 'f', 's', 'e', 't', 0,
    'o', 'b', 'j', 'e', 'c', 't', 0,
    'e', 'v', 'e', 'n', 't', 0,
    'm', 'o', 'd', 'e', 0,
};

void sipVH_kterminal_0(sip_gilstate_t sipGILState,PyObject *sipMethod,const QString& a0,const QStringList& a1)
{
    PyObject *resObj = sipCallMethod(0,sipMethod,"NN",new QString(a0),sipType_QString,NULL,new QStringList(a1),sipType_QStringList,NULL);

    if (!resObj || sipParseResult(0,sipMethod,resObj,"Z") < 0)
        PyErr_Print();

    Py_XDECREF(resObj);
    Py_DECREF(sipMethod);

    SIP_RELEASE_GIL(sipGILState)
}


/*
 * This defines each type in this module.
 */
static sipTypeDef *typesTable[] = {
    &sipTypeDef_kterminal_KTerminal.super.ctd_base,
    &sipTypeDef_kterminal_TerminalInterface.super.ctd_base,
    &sipTypeDef_kterminal_TerminalInterfaceV2.super.ctd_base,
};


/*
 * This defines the virtual handlers that this module implements and can be
 * used by other modules.
 */
static sipVirtHandlerFunc virtHandlersTable[] = {
    (sipVirtHandlerFunc)sipVH_kterminal_0,
};


/* This defines the modules that this module needs to import. */
static sipImportedModuleDef importsTable[] = {
    {"PyQt4.QtCore", 1, NULL},
    {"PyQt4.QtGui", -1, NULL},
    {"PyQt4.QtNetwork", -1, NULL},
    {"PyKDE4.kdecore", -1, NULL},
    {"PyKDE4.solid", -1, NULL},
    {"PyQt4.QtSvg", -1, NULL},
    {"PyQt4.QtXml", -1, NULL},
    {"PyKDE4.kdeui", -1, NULL},
    {"PyKDE4.kio", -1, NULL},
    {"PyKDE4.kparts", -1, NULL},
    {NULL, -1, NULL}
};


/* This defines this module. */
sipExportedModuleDef sipModuleAPI_kterminal = {
    0,
    SIP_API_MINOR_NR,
    sipNameNr_PyKDE4_kterminal,
    0,
    -1,
    sipStrings_kterminal,
    importsTable,
    NULL,
    3,
    typesTable,
    NULL,
    0,
    NULL,
    0,
    NULL,
    virtHandlersTable,
    NULL,
    {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL
};


/* The SIP API and the APIs of any imported modules. */
const sipAPIDef *sipAPI_kterminal;
const sipExportedModuleDef *sipModuleAPI_kterminal_QtCore;
const sipExportedModuleDef *sipModuleAPI_kterminal_QtGui;
const sipExportedModuleDef *sipModuleAPI_kterminal_QtNetwork;
const sipExportedModuleDef *sipModuleAPI_kterminal_kdecore;
const sipExportedModuleDef *sipModuleAPI_kterminal_solid;
const sipExportedModuleDef *sipModuleAPI_kterminal_QtSvg;
const sipExportedModuleDef *sipModuleAPI_kterminal_QtXml;
const sipExportedModuleDef *sipModuleAPI_kterminal_kdeui;
const sipExportedModuleDef *sipModuleAPI_kterminal_kio;
const sipExportedModuleDef *sipModuleAPI_kterminal_kparts;

sip_qt_metaobject_func sip_kterminal_qt_metaobject;
sip_qt_metacall_func sip_kterminal_qt_metacall;
sip_qt_metacast_func sip_kterminal_qt_metacast;


/* The Python module initialisation function. */
#if PY_MAJOR_VERSION >= 3
#define SIP_MODULE_ENTRY        PyInit_kterminal
#define SIP_MODULE_TYPE         PyObject *
#define SIP_MODULE_DISCARD(r)   Py_DECREF(r)
#define SIP_MODULE_RETURN(r)    return (r)
#else
#define SIP_MODULE_ENTRY        initkterminal
#define SIP_MODULE_TYPE         void
#define SIP_MODULE_DISCARD(r)
#define SIP_MODULE_RETURN(r)    return
#endif

#if defined(SIP_STATIC_MODULE)
extern "C" SIP_MODULE_TYPE SIP_MODULE_ENTRY()
#else
PyMODINIT_FUNC SIP_MODULE_ENTRY()
#endif
{
    static PyMethodDef sip_methods[] = {
        {0, 0, 0, 0}
    };

#if PY_MAJOR_VERSION >= 3
    static PyModuleDef sip_module_def = {
        PyModuleDef_HEAD_INIT,
        "PyKDE4.kterminal",
        NULL,
        -1,
        sip_methods,
        NULL,
        NULL,
        NULL,
        NULL
    };
#endif

    PyObject *sipModule, *sipModuleDict;
    PyObject *sip_sipmod, *sip_capiobj;

    /* Initialise the module and get it's dictionary. */
#if PY_MAJOR_VERSION >= 3
    sipModule = PyModule_Create(&sip_module_def);
#elif PY_VERSION_HEX >= 0x02050000
    sipModule = Py_InitModule(sipName_PyKDE4_kterminal, sip_methods);
#else
    sipModule = Py_InitModule(const_cast<char *>(sipName_PyKDE4_kterminal), sip_methods);
#endif

    if (sipModule == NULL)
        SIP_MODULE_RETURN(NULL);

    sipModuleDict = PyModule_GetDict(sipModule);

    /* Get the SIP module's API. */
#if PY_VERSION_HEX >= 0x02050000
    sip_sipmod = PyImport_ImportModule(SIP_MODULE_NAME);
#else
    sip_sipmod = PyImport_ImportModule(const_cast<char *>(SIP_MODULE_NAME));
#endif

    if (sip_sipmod == NULL)
    {
        SIP_MODULE_DISCARD(sipModule);
        SIP_MODULE_RETURN(NULL);
    }

    sip_capiobj = PyDict_GetItemString(PyModule_GetDict(sip_sipmod), "_C_API");
    Py_DECREF(sip_sipmod);

#if defined(SIP_USE_PYCAPSULE)
    if (sip_capiobj == NULL || !PyCapsule_CheckExact(sip_capiobj))
#else
    if (sip_capiobj == NULL || !PyCObject_Check(sip_capiobj))
#endif
    {
        SIP_MODULE_DISCARD(sipModule);
        SIP_MODULE_RETURN(NULL);
    }

#if defined(SIP_USE_PYCAPSULE)
    sipAPI_kterminal = reinterpret_cast<const sipAPIDef *>(PyCapsule_GetPointer(sip_capiobj, SIP_MODULE_NAME "._C_API"));
#else
    sipAPI_kterminal = reinterpret_cast<const sipAPIDef *>(PyCObject_AsVoidPtr(sip_capiobj));
#endif

#if defined(SIP_USE_PYCAPSULE)
    if (sipAPI_kterminal == NULL)
    {
        SIP_MODULE_DISCARD(sipModule);
        SIP_MODULE_RETURN(NULL);
    }
#endif

    /* Export the module and publish it's API. */
    if (sipExportModule(&sipModuleAPI_kterminal,SIP_API_MAJOR_NR,SIP_API_MINOR_NR,0) < 0)
    {
        SIP_MODULE_DISCARD(sipModule);
        SIP_MODULE_RETURN(0);
    }

    sip_kterminal_qt_metaobject = (sip_qt_metaobject_func)sipImportSymbol("qtcore_qt_metaobject");
    sip_kterminal_qt_metacall = (sip_qt_metacall_func)sipImportSymbol("qtcore_qt_metacall");
    sip_kterminal_qt_metacast = (sip_qt_metacast_func)sipImportSymbol("qtcore_qt_metacast");

    /* Initialise the module now all its dependencies have been set up. */
    if (sipInitModule(&sipModuleAPI_kterminal,sipModuleDict) < 0)
    {
        SIP_MODULE_DISCARD(sipModule);
        SIP_MODULE_RETURN(0);
    }

    /* Get the APIs of the modules that this one is dependent on. */
    sipModuleAPI_kterminal_QtCore = sipModuleAPI_kterminal.em_imports[0].im_module;
    sipModuleAPI_kterminal_QtGui = sipModuleAPI_kterminal.em_imports[1].im_module;
    sipModuleAPI_kterminal_QtNetwork = sipModuleAPI_kterminal.em_imports[2].im_module;
    sipModuleAPI_kterminal_kdecore = sipModuleAPI_kterminal.em_imports[3].im_module;
    sipModuleAPI_kterminal_solid = sipModuleAPI_kterminal.em_imports[4].im_module;
    sipModuleAPI_kterminal_QtSvg = sipModuleAPI_kterminal.em_imports[5].im_module;
    sipModuleAPI_kterminal_QtXml = sipModuleAPI_kterminal.em_imports[6].im_module;
    sipModuleAPI_kterminal_kdeui = sipModuleAPI_kterminal.em_imports[7].im_module;
    sipModuleAPI_kterminal_kio = sipModuleAPI_kterminal.em_imports[8].im_module;
    sipModuleAPI_kterminal_kparts = sipModuleAPI_kterminal.em_imports[9].im_module;

    SIP_MODULE_RETURN(sipModule);
}
