/*
 * Module code.
 *
 * Generated by SIP 4.18.1
 *
 * 
 *  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 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/kterminal/kterminal.sip"
#include <kde_terminal_interface.h>
#include <kde_terminal_interface_v2.h>
#include <kparts/part.h>
#line 87 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kterminal/sipkterminalpart1.cpp"

#line 66 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/kparts/part.sip"
#include <kparts/part.h>
#line 91 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kterminal/sipkterminalpart1.cpp"
#line 25 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/kterminal/terminal_interface_v2.sip"
#include <kde_terminal_interface_v2.h>
#line 94 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/sip/kterminal/sipkterminalpart1.cpp"
#line 25 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/src/pykde4-4.14.3/sip/kterminal/terminal_interface.sip"
#include <kde_terminal_interface.h>
#line 97 "/usr/src/ports/python3-pykde4/python3-pykde4-4.14.3-3.i686/build/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;
}


/* 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_type_KTerminal(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_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_type_KTerminal,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KTerminal,
    0,
    0,
    0,
    release_KTerminal,
    0,
    0,
    0,
    0,
    0,
    0,
    0
},
    0,
    0,
    0
};
