/*
 * 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 62 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kterminal/kterminal.sip"
#include <kde_terminal_interface.h>
#include <kde_terminal_interface_v2.h>
#include <kparts/part.h>
#line 87 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kterminal/sipkterminalpart1.cpp"

#line 66 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kparts/part.sip"
#include <kparts/part.h>
#line 91 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kterminal/sipkterminalpart1.cpp"
#line 25 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kterminal/terminal_interface_v2.sip"
#include <kde_terminal_interface_v2.h>
#line 94 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kterminal/sipkterminalpart1.cpp"
#line 25 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kterminal/terminal_interface.sip"
#include <kde_terminal_interface.h>
#line 97 "/work/a/ports/devel/kdebindings4-python-pykde4/work/pykde4-4.7.3/sip/kterminal/sipkterminalpart1.cpp"


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

    {
        KTerminal *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTerminal, &sipCpp))
        {
            TerminalInterface *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->terminalInterface();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_TerminalInterface,NULL);
        }
    }

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

    return NULL;
}


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

    {
        KTerminal *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_KTerminal, &sipCpp))
        {
            TerminalInterfaceV2 *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->terminalInterfaceV2();
            Py_END_ALLOW_THREADS

            return sipConvertFromType(sipRes,sipType_TerminalInterfaceV2,NULL);
        }
    }

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

    return NULL;
}


/* Cast a pointer to a type somewhere in its superclass hierarchy. */
extern "C" {static void *cast_KTerminal(void *, const sipTypeDef *);}
static void *cast_KTerminal(void *ptr, const sipTypeDef *targetType)
{
    if (targetType == sipType_KTerminal)
        return ptr;

    return NULL;
}


/* Call the instance's destructor. */
extern "C" {static void release_KTerminal(void *, int);}
static void release_KTerminal(void *sipCppV,int)
{
    Py_BEGIN_ALLOW_THREADS

    delete reinterpret_cast<KTerminal *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_KTerminal(sipSimpleWrapper *);}
static void dealloc_KTerminal(sipSimpleWrapper *sipSelf)
{
    if (sipIsPyOwned(sipSelf))
    {
        release_KTerminal(sipGetAddress(sipSelf),0);
    }
}


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

    {
        KParts::Part * a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J8", sipType_KParts_Part, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new KTerminal(a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        const KTerminal * a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_KTerminal, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new KTerminal(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KTerminal[] = {
    {SIP_MLNAME_CAST(sipName_terminalInterface), meth_KTerminal_terminalInterface, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_terminalInterfaceV2), meth_KTerminal_terminalInterfaceV2, METH_VARARGS, NULL}
};


pyqt4ClassTypeDef sipTypeDef_kterminal_KTerminal = {
{
    {
        -1,
        0,
        0,
        SIP_TYPE_CLASS,
        sipNameNr_KTerminal,
        {0}
    },
    {
        sipNameNr_KTerminal,
        {0, 0, 1},
        2, methods_KTerminal,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    sipNameNr_PyQt4_QtCore_pyqtWrapperType,
    -1,
    0,
    0,
    init_KTerminal,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KTerminal,
    0,
    0,
    0,
    release_KTerminal,
    cast_KTerminal,
    0,
    0,
    0
},
    0,
    0,
    0
};
