From 6060b47508604d7aac4b63445325741f04974ec4 Mon Sep 17 00:00:00 2001 From: Helmut Pozimski Date: Sun, 17 Nov 2019 15:15:29 +0100 Subject: [PATCH] kodi: update to 18.5. --- srcpkgs/kodi/files/CMakeCache.txt.nojava | 10 - .../swig.nojava-18.4/AddonModuleXbmc.i.cpp | 9752 ------ .../swig.nojava-18.4/AddonModuleXbmc.i.xml | 8079 ----- .../AddonModuleXbmcaddon.i.cpp | 941 - .../AddonModuleXbmcaddon.i.xml | 1237 - .../swig.nojava-18.4/AddonModuleXbmcdrm.i.cpp | 1075 - .../swig.nojava-18.4/AddonModuleXbmcdrm.i.xml | 1241 - .../swig.nojava-18.4/AddonModuleXbmcgui.i.cpp | 14128 -------- .../swig.nojava-18.4/AddonModuleXbmcgui.i.xml | 28688 ---------------- .../AddonModuleXbmcplugin.i.cpp | 906 - .../AddonModuleXbmcplugin.i.xml | 2077 -- .../swig.nojava-18.4/AddonModuleXbmcvfs.i.cpp | 1589 - .../swig.nojava-18.4/AddonModuleXbmcvfs.i.xml | 1804 - .../AddonModuleXbmcwsgi.i.cpp | 1275 - .../AddonModuleXbmcwsgi.i.xml | 2249 -- srcpkgs/kodi/template | 26 +- 16 files changed, 6 insertions(+), 75071 deletions(-) delete mode 100644 srcpkgs/kodi/files/CMakeCache.txt.nojava delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmc.i.cpp delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmc.i.xml delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcaddon.i.cpp delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcaddon.i.xml delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcdrm.i.cpp delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcdrm.i.xml delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcgui.i.cpp delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcgui.i.xml delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcplugin.i.cpp delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcplugin.i.xml delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcvfs.i.cpp delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcvfs.i.xml delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcwsgi.i.cpp delete mode 100644 srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcwsgi.i.xml diff --git a/srcpkgs/kodi/files/CMakeCache.txt.nojava b/srcpkgs/kodi/files/CMakeCache.txt.nojava deleted file mode 100644 index 9ddfa7ff5e..0000000000 --- a/srcpkgs/kodi/files/CMakeCache.txt.nojava +++ /dev/null @@ -1,10 +0,0 @@ -Java_IDLJ_EXECUTABLE:FILEPATH=/bin/true -Java_JARSIGNER_EXECUTABLE:FILEPATH=/bin/true -Java_JAR_EXECUTABLE:FILEPATH=/bin/true -Java_JAVAC_EXECUTABLE:FILEPATH=/bin/true -Java_JAVADOC_EXECUTABLE:FILEPATH=/bin/true -Java_JAVAH_EXECUTABLE:FILEPATH=/bin/true -Java_JAVA_EXECUTABLE:FILEPATH=/bin/true -SWIG_EXECUTABLE:FILEPATH=/bin/true -SWIG_DIR:FILEPATH=/var/empty - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmc.i.cpp b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmc.i.cpp deleted file mode 100644 index 42f767ab0f..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmc.i.cpp +++ /dev/null @@ -1,9752 +0,0 @@ - - -/* - * Copyright (C) 2005-2018 Team Kodi - * This file is part of Kodi - https://kodi.tv - * - * SPDX-License-Identifier: GPL-2.0-or-later - * See LICENSES/README.md for more information. - */ - -// ************************************************************************ -// This file was generated by xbmc compile process. DO NOT EDIT!! -// It was created by running the code generator on the spec file for -// the module "xbmc" on the template file PythonSwig.template.cpp -// ************************************************************************ - - - -#include -#include -#include "interfaces/python/LanguageHook.h" -#include "interfaces/python/swig.h" -#include "interfaces/python/PyContext.h" - - -#if defined(TARGET_WINDOWS) -# include -#endif - -#include "interfaces/legacy/Player.h" -#include "interfaces/legacy/RenderCapture.h" -#include "interfaces/legacy/Keyboard.h" -#include "interfaces/legacy/ModuleXbmc.h" -#include "interfaces/legacy/Monitor.h" - -using namespace XBMCAddon; -using namespace xbmc; - -#if defined(__GNUG__) -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif - - -namespace PythonBindings -{ - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmc::Player - TypeInfo TyXBMCAddon_xbmc_Player_Type(typeid(XBMCAddon::xbmc::Player)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmc::RenderCapture - TypeInfo TyXBMCAddon_xbmc_RenderCapture_Type(typeid(XBMCAddon::xbmc::RenderCapture)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmc::InfoTagMusic - TypeInfo TyXBMCAddon_xbmc_InfoTagMusic_Type(typeid(XBMCAddon::xbmc::InfoTagMusic)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmc::InfoTagRadioRDS - TypeInfo TyXBMCAddon_xbmc_InfoTagRadioRDS_Type(typeid(XBMCAddon::xbmc::InfoTagRadioRDS)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmc::InfoTagVideo - TypeInfo TyXBMCAddon_xbmc_InfoTagVideo_Type(typeid(XBMCAddon::xbmc::InfoTagVideo)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmc::Keyboard - TypeInfo TyXBMCAddon_xbmc_Keyboard_Type(typeid(XBMCAddon::xbmc::Keyboard)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmc::PlayList - TypeInfo TyXBMCAddon_xbmc_PlayList_Type(typeid(XBMCAddon::xbmc::PlayList)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmc::Monitor - TypeInfo TyXBMCAddon_xbmc_Monitor_Type(typeid(XBMCAddon::xbmc::Monitor)); - //========================================================================= - - //========================================================================= - // These variables define the type XBMCAddon::xbmcgui::ListItem from another module - extern TypeInfo TyXBMCAddon_xbmcgui_ListItem_Type; - //========================================================================= - - //========================================================================= - // These variables define the type XBMCAddon::xbmc::PlayListItem from another module - extern TypeInfo TyXBMCAddon_xbmc_PlayListItem_Type; - //========================================================================= - - - - //========================================================================= - // This class is the Director for XBMCAddon::xbmc::Player. - // It provides the "reverse bridge" from C++ to Python to support - // cross-language polymorphism. - //========================================================================= - class XBMCAddon_xbmc_Player_Director : public Director, public XBMCAddon::xbmc::Player - { - public: - - inline XBMCAddon_xbmc_Player_Director(int playerCore ) : XBMCAddon::xbmc::Player( playerCore ) { } - - virtual void onPlayBackStarted( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onPlayBackStarted"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onAVStarted( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onAVStarted"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onAVChange( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onAVChange"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onPlayBackEnded( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onPlayBackEnded"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onPlayBackStopped( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onPlayBackStopped"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onPlayBackError( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onPlayBackError"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onPlayBackPaused( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onPlayBackPaused"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onPlayBackResumed( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onPlayBackResumed"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onQueueNextItem( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onQueueNextItem"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onPlayBackSpeedChanged( int speed ) - { - PyObject* pyspeed = NULL; - pyspeed = Py_BuildValue("i", speed); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onPlayBackSpeedChanged"),const_cast("(O)"), pyspeed ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onPlayBackSeek( int time, int seekOffset ) - { - PyObject* pytime = NULL; - pytime = Py_BuildValue("i", time); - PyObject* pyseekOffset = NULL; - pyseekOffset = Py_BuildValue("i", seekOffset); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onPlayBackSeek"),const_cast("(OO)"), pytime , pyseekOffset ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onPlayBackSeekChapter( int chapter ) - { - PyObject* pychapter = NULL; - pychapter = Py_BuildValue("i", chapter); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onPlayBackSeekChapter"),const_cast("(O)"), pychapter ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - }; - - //========================================================================= - // This class is the Director for XBMCAddon::xbmc::Monitor. - // It provides the "reverse bridge" from C++ to Python to support - // cross-language polymorphism. - //========================================================================= - class XBMCAddon_xbmc_Monitor_Director : public Director, public XBMCAddon::xbmc::Monitor - { - public: - - inline XBMCAddon_xbmc_Monitor_Director() : XBMCAddon::xbmc::Monitor() { } - - virtual void onSettingsChanged( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onSettingsChanged"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onScreensaverActivated( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onScreensaverActivated"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onScreensaverDeactivated( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onScreensaverDeactivated"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onDPMSActivated( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onDPMSActivated"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onDPMSDeactivated( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onDPMSDeactivated"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onScanStarted( XBMCAddon::String const library ) - { - PyObject* pylibrary = NULL; - pylibrary = PyString_FromStringAndSize(library.c_str(), library.length()); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onScanStarted"),const_cast("(O)"), pylibrary ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onScanFinished( XBMCAddon::String const library ) - { - PyObject* pylibrary = NULL; - pylibrary = PyString_FromStringAndSize(library.c_str(), library.length()); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onScanFinished"),const_cast("(O)"), pylibrary ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onDatabaseScanStarted( XBMCAddon::String const database ) - { - PyObject* pydatabase = NULL; - pydatabase = PyString_FromStringAndSize(database.c_str(), database.length()); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onDatabaseScanStarted"),const_cast("(O)"), pydatabase ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onDatabaseUpdated( XBMCAddon::String const database ) - { - PyObject* pydatabase = NULL; - pydatabase = PyString_FromStringAndSize(database.c_str(), database.length()); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onDatabaseUpdated"),const_cast("(O)"), pydatabase ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onCleanStarted( XBMCAddon::String const library ) - { - PyObject* pylibrary = NULL; - pylibrary = PyString_FromStringAndSize(library.c_str(), library.length()); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onCleanStarted"),const_cast("(O)"), pylibrary ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onCleanFinished( XBMCAddon::String const library ) - { - PyObject* pylibrary = NULL; - pylibrary = PyString_FromStringAndSize(library.c_str(), library.length()); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onCleanFinished"),const_cast("(O)"), pylibrary ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onAbortRequested( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onAbortRequested"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onNotification( XBMCAddon::String const sender, XBMCAddon::String const method, XBMCAddon::String const data ) - { - PyObject* pysender = NULL; - pysender = PyString_FromStringAndSize(sender.c_str(), sender.length()); - PyObject* pymethod = NULL; - pymethod = PyString_FromStringAndSize(method.c_str(), method.length()); - PyObject* pydata = NULL; - pydata = PyString_FromStringAndSize(data.c_str(), data.length()); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onNotification"),const_cast("(OOO)"), pysender , pymethod , pydata ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - }; - - static PyObject* xbmc_log (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "msg", - "level", - NULL}; - - char * msg = nullptr; - int level = lLOGDEBUG; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s|i", - const_cast(keywords), - &msg, - &level - )) - { - return NULL; - } - - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::log( msg, level ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::log\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::log\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_shutdown (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::shutdown( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::shutdown\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::shutdown\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_restart (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::restart( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::restart\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::restart\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_executescript (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "script", - NULL}; - - char * script = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &script - )) - { - return NULL; - } - - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::executescript( script ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::executescript\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::executescript\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_executebuiltin (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "function", - "wait", - NULL}; - - char * function = nullptr; - bool wait = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s|b", - const_cast(keywords), - &function, - &wait - )) - { - return NULL; - } - - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::executebuiltin( function, wait ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::executebuiltin\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::executebuiltin\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_executeJSONRPC (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "jsonrpccommand", - NULL}; - - char * jsonrpccommand = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &jsonrpccommand - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::executeJSONRPC( jsonrpccommand ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::executeJSONRPC\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::executeJSONRPC\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_sleep (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "timemillis", - NULL}; - - long timemillis ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "l", - const_cast(keywords), - &timemillis - )) - { - return NULL; - } - - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::sleep( timemillis ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::sleep\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::sleep\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_getLocalizedString (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - int id ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &id - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getLocalizedString( id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getLocalizedString\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getLocalizedString\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyUnicode_DecodeUTF8(apiResult.c_str(),apiResult.size(),"replace"); - - return result; - } - - static PyObject* xbmc_getSkinDir (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getSkinDir( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getSkinDir\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getSkinDir\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_getLanguage (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "format", - "region", - NULL}; - - int format = CLangCodeExpander::ENGLISH_NAME; - bool region = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|ib", - const_cast(keywords), - &format, - ®ion - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getLanguage( format, region ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getLanguage\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getLanguage\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_getIPAddress (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getIPAddress( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getIPAddress\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getIPAddress\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_getDVDState (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getDVDState( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getDVDState\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getDVDState\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmc_getFreeMem (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getFreeMem( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getFreeMem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getFreeMem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmc_getInfoLabel (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "cLine", - NULL}; - - char * cLine = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &cLine - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getInfoLabel( cLine ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getInfoLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getInfoLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_getInfoImage (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "infotag", - NULL}; - - char * infotag = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &infotag - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getInfoImage( infotag ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getInfoImage\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getInfoImage\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_playSFX (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "filename", - "useCached", - NULL}; - - char * filename = nullptr; - bool useCached = true; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s|b", - const_cast(keywords), - &filename, - &useCached - )) - { - return NULL; - } - - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::playSFX( filename, useCached ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::playSFX\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::playSFX\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_stopSFX (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::stopSFX( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::stopSFX\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::stopSFX\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_enableNavSounds (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "yesNo", - NULL}; - - bool yesNo ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "b", - const_cast(keywords), - &yesNo - )) - { - return NULL; - } - - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::enableNavSounds( yesNo ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::enableNavSounds\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::enableNavSounds\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_getCondVisibility (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "condition", - NULL}; - - char * condition = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &condition - )) - { - return NULL; - } - - bool apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getCondVisibility( condition ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getCondVisibility\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getCondVisibility\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_getGlobalIdleTime (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getGlobalIdleTime( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getGlobalIdleTime\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getGlobalIdleTime\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_getCacheThumbName (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypath - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","XBMCAddon::xbmc::getCacheThumbName"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getCacheThumbName( path ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getCacheThumbName\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getCacheThumbName\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_makeLegalFilename (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "filename", - "fatX", - NULL}; - - std::string filename ; - PyObject* pyfilename = NULL; - bool fatX = true; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|b", - const_cast(keywords), - &pyfilename, - &fatX - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - if (pyfilename) PyXBMCGetUnicodeString(filename,pyfilename,false,"filename","XBMCAddon::xbmc::makeLegalFilename"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::makeLegalFilename( filename, fatX ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::makeLegalFilename\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::makeLegalFilename\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_translatePath (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypath - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","XBMCAddon::xbmc::translatePath"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::translatePath( path ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::translatePath\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::translatePath\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_getCleanMovieTitle (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - "usefoldername", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - bool usefoldername = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|b", - const_cast(keywords), - &pypath, - &usefoldername - )) - { - return NULL; - } - - Tuple< XBMCAddon::String ,XBMCAddon::String > apiResult; - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","XBMCAddon::xbmc::getCleanMovieTitle"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getCleanMovieTitle( path, usefoldername ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getCleanMovieTitle\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getCleanMovieTitle\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - int vecSize = apiResult.GetNumValuesSet(); - result = PyTuple_New(vecSize); - { - PyObject* pyentry1; - - if (vecSize > 0) - { - std::string & entry1 = apiResult.first(); - { - pyentry1 = PyString_FromStringAndSize(entry1.c_str(), entry1.length()); - } - PyTuple_SetItem(result, 0, pyentry1); - } - - - if (vecSize > 1) - { - std::string & entry1 = apiResult.second(); - { - pyentry1 = PyString_FromStringAndSize(entry1.c_str(), entry1.length()); - } - PyTuple_SetItem(result, 1, pyentry1); - } - - } - - return result; - } - - static PyObject* xbmc_validatePath (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypath - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","XBMCAddon::xbmc::validatePath"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::validatePath( path ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::validatePath\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::validatePath\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_getRegion (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - char * id = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &id - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getRegion( id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getRegion\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getRegion\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_getSupportedMedia (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "mediaType", - NULL}; - - char * mediaType = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &mediaType - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getSupportedMedia( mediaType ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getSupportedMedia\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getSupportedMedia\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_skinHasImage (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "image", - NULL}; - - char * image = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &image - )) - { - return NULL; - } - - bool apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::skinHasImage( image ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::skinHasImage\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::skinHasImage\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_startServer (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "iTyp", - "bStart", - "bWait", - NULL}; - - int iTyp ; - bool bStart ; - bool bWait = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "ib|b", - const_cast(keywords), - &iTyp, - &bStart, - &bWait - )) - { - return NULL; - } - - bool apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::startServer( iTyp, bStart, bWait ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::startServer\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::startServer\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_audioSuspend (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::audioSuspend( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::audioSuspend\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::audioSuspend\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_audioResume (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmc::audioResume( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::audioResume\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::audioResume\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_getUserAgent (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::getUserAgent( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::getUserAgent\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::getUserAgent\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_convertLanguage (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "language", - "format", - NULL}; - - char * language = nullptr; - int format ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "si", - const_cast(keywords), - &language, - &format - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmc::convertLanguage( language, format ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::convertLanguage\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::convertLanguage\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - int playerCore = 0; - if (!PyArg_ParseTuple( - args, - - "|i", - - &playerCore - )) - { - return NULL; - } - - XBMCAddon::xbmc::Player * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = (&(TyXBMCAddon_xbmc_Player_Type.pythonType) != pytype) ? new XBMCAddon_xbmc_Player_Director( playerCore ) : new XBMCAddon::xbmc::Player( playerCore ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmc::Player\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmc::Player\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - if (&(TyXBMCAddon_xbmc_Player_Type.pythonType) != pytype) - ((XBMCAddon_xbmc_Player_Director*)apiResult)->setPyObjectForDirector(result); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_play (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "item", - "listitem", - "windowed", - "startpos", - NULL}; - - Alternative< XBMCAddon::String ,PlayList const * > item = Player::defaultPlayParameter; - PyObject* pyitem = NULL; - XBMCAddon::xbmcgui::ListItem * listitem = NULL; - PyObject* pylistitem = NULL; - bool windowed = false; - int startpos = -1; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|OObi", - const_cast(keywords), - &pyitem, - &pylistitem, - &windowed, - &startpos - )) - { - return NULL; - } - - - try - { - - { - // we need to check the parameter type and see if it matches - PyObject *pyentry_1 = pyitem; - try - { - std::string entry0_1; - if (pyentry_1) PyXBMCGetUnicodeString(entry0_1,pyentry_1,false,"entry0_1","play"); - item.former() = entry0_1; - } - catch (const XBMCAddon::WrongTypeException&) - { - try - { - PlayList * entry1_1; - entry1_1 = (PlayList *)retrieveApiInstance(pyentry_1,"p.PlayList","XBMCAddon::xbmc::","play"); - item.later() = entry1_1; - } - catch (const XBMCAddon::WrongTypeException&) - { - throw XBMCAddon::WrongTypeException("Failed to convert to input type to either a " - "std::string or a " - "p.PlayList" ); - } - } - } - listitem = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pylistitem,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmc::","play"); - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"play","XBMCAddon::xbmc::Player"))-> play( item, listitem, windowed, startpos ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"play\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"play\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_stop (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"stop","XBMCAddon::xbmc::Player"))-> stop( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"stop\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"stop\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_pause (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"pause","XBMCAddon::xbmc::Player"))-> pause( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"pause\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"pause\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_playnext (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"playnext","XBMCAddon::xbmc::Player"))-> playnext( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"playnext\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"playnext\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_playprevious (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"playprevious","XBMCAddon::xbmc::Player"))-> playprevious( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"playprevious\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"playprevious\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_playselected (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "selected", - NULL}; - - int selected ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &selected - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"playselected","XBMCAddon::xbmc::Player"))-> playselected( selected ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"playselected\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"playselected\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onPlayBackStarted (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onPlayBackStarted","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onPlayBackStarted( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onPlayBackStarted\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onPlayBackStarted\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onAVStarted (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onAVStarted","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onAVStarted( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onAVStarted\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onAVStarted\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onAVChange (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onAVChange","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onAVChange( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onAVChange\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onAVChange\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onPlayBackEnded (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onPlayBackEnded","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onPlayBackEnded( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onPlayBackEnded\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onPlayBackEnded\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onPlayBackStopped (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onPlayBackStopped","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onPlayBackStopped( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onPlayBackStopped\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onPlayBackStopped\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onPlayBackError (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onPlayBackError","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onPlayBackError( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onPlayBackError\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onPlayBackError\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onPlayBackPaused (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onPlayBackPaused","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onPlayBackPaused( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onPlayBackPaused\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onPlayBackPaused\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onPlayBackResumed (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onPlayBackResumed","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onPlayBackResumed( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onPlayBackResumed\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onPlayBackResumed\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onQueueNextItem (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onQueueNextItem","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onQueueNextItem( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onQueueNextItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onQueueNextItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onPlayBackSpeedChanged (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "speed", - NULL}; - - int speed ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &speed - )) - { - return NULL; - } - - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onPlayBackSpeedChanged","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onPlayBackSpeedChanged( speed ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onPlayBackSpeedChanged\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onPlayBackSpeedChanged\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onPlayBackSeek (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "time", - "seekOffset", - NULL}; - - int time ; - int seekOffset ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "ii", - const_cast(keywords), - &time, - &seekOffset - )) - { - return NULL; - } - - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onPlayBackSeek","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onPlayBackSeek( time, seekOffset ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onPlayBackSeek\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onPlayBackSeek\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_onPlayBackSeekChapter (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "chapter", - NULL}; - - int chapter ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &chapter - )) - { - return NULL; - } - - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"onPlayBackSeekChapter","XBMCAddon::xbmc::Player"))-> XBMCAddon::xbmc::Player::onPlayBackSeekChapter( chapter ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onPlayBackSeekChapter\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onPlayBackSeekChapter\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_isPlaying (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"isPlaying","XBMCAddon::xbmc::Player"))-> isPlaying( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"isPlaying\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"isPlaying\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_isPlayingAudio (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"isPlayingAudio","XBMCAddon::xbmc::Player"))-> isPlayingAudio( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"isPlayingAudio\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"isPlayingAudio\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_isPlayingVideo (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"isPlayingVideo","XBMCAddon::xbmc::Player"))-> isPlayingVideo( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"isPlayingVideo\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"isPlayingVideo\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_isPlayingRDS (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"isPlayingRDS","XBMCAddon::xbmc::Player"))-> isPlayingRDS( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"isPlayingRDS\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"isPlayingRDS\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_isExternalPlayer (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"isExternalPlayer","XBMCAddon::xbmc::Player"))-> isExternalPlayer( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"isExternalPlayer\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"isExternalPlayer\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_getPlayingFile (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"getPlayingFile","XBMCAddon::xbmc::Player"))-> getPlayingFile( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPlayingFile\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPlayingFile\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_getTime (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - double apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"getTime","XBMCAddon::xbmc::Player"))-> getTime( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getTime\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getTime\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyFloat_FromDouble(apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_seekTime (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "seekTime", - NULL}; - - double seekTime ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "d", - const_cast(keywords), - &seekTime - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"seekTime","XBMCAddon::xbmc::Player"))-> seekTime( seekTime ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"seekTime\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"seekTime\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_setSubtitles (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "subtitleFile", - NULL}; - - char * subtitleFile = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &subtitleFile - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"setSubtitles","XBMCAddon::xbmc::Player"))-> setSubtitles( subtitleFile ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setSubtitles\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setSubtitles\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_showSubtitles (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "bVisible", - NULL}; - - bool bVisible ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "b", - const_cast(keywords), - &bVisible - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"showSubtitles","XBMCAddon::xbmc::Player"))-> showSubtitles( bVisible ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"showSubtitles\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"showSubtitles\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_getSubtitles (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"getSubtitles","XBMCAddon::xbmc::Player"))-> getSubtitles( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSubtitles\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSubtitles\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_getAvailableSubtitleStreams (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - std::vector< XBMCAddon::String > apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"getAvailableSubtitleStreams","XBMCAddon::xbmc::Player"))-> getAvailableSubtitleStreams( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAvailableSubtitleStreams\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAvailableSubtitleStreams\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - result = PyList_New(0); - - for (std::vector::iterator iter = apiResult.begin(); iter != apiResult.end(); ++iter) - { - std::string & entry1 = *iter; - PyObject* pyentry1; - pyentry1 = PyString_FromStringAndSize(entry1.c_str(), entry1.length()); - PyList_Append(result, pyentry1); - Py_DECREF(pyentry1); - } - - - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_setSubtitleStream (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "iStream", - NULL}; - - int iStream ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &iStream - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"setSubtitleStream","XBMCAddon::xbmc::Player"))-> setSubtitleStream( iStream ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setSubtitleStream\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setSubtitleStream\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_updateInfoTag (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "item", - NULL}; - - XBMCAddon::xbmcgui::ListItem * item = nullptr; - PyObject* pyitem = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyitem - )) - { - return NULL; - } - - - try - { - item = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pyitem,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmc::","updateInfoTag"); - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"updateInfoTag","XBMCAddon::xbmc::Player"))-> updateInfoTag( item ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"updateInfoTag\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"updateInfoTag\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_getVideoInfoTag (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - InfoTagVideo * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"getVideoInfoTag","XBMCAddon::xbmc::Player"))-> getVideoInfoTag( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getVideoInfoTag\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getVideoInfoTag\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_getMusicInfoTag (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - InfoTagMusic * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"getMusicInfoTag","XBMCAddon::xbmc::Player"))-> getMusicInfoTag( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getMusicInfoTag\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getMusicInfoTag\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_getRadioRDSInfoTag (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - InfoTagRadioRDS * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"getRadioRDSInfoTag","XBMCAddon::xbmc::Player"))-> getRadioRDSInfoTag( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getRadioRDSInfoTag\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getRadioRDSInfoTag\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_getTotalTime (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - double apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"getTotalTime","XBMCAddon::xbmc::Player"))-> getTotalTime( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getTotalTime\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getTotalTime\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyFloat_FromDouble(apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_getAvailableAudioStreams (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - std::vector< XBMCAddon::String > apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"getAvailableAudioStreams","XBMCAddon::xbmc::Player"))-> getAvailableAudioStreams( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAvailableAudioStreams\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAvailableAudioStreams\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - result = PyList_New(0); - - for (std::vector::iterator iter = apiResult.begin(); iter != apiResult.end(); ++iter) - { - std::string & entry1 = *iter; - PyObject* pyentry1; - pyentry1 = PyString_FromStringAndSize(entry1.c_str(), entry1.length()); - PyList_Append(result, pyentry1); - Py_DECREF(pyentry1); - } - - - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_setAudioStream (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "iStream", - NULL}; - - int iStream ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &iStream - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"setAudioStream","XBMCAddon::xbmc::Player"))-> setAudioStream( iStream ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setAudioStream\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setAudioStream\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_getAvailableVideoStreams (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - std::vector< XBMCAddon::String > apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"getAvailableVideoStreams","XBMCAddon::xbmc::Player"))-> getAvailableVideoStreams( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAvailableVideoStreams\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAvailableVideoStreams\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - result = PyList_New(0); - - for (std::vector::iterator iter = apiResult.begin(); iter != apiResult.end(); ++iter) - { - std::string & entry1 = *iter; - PyObject* pyentry1; - pyentry1 = PyString_FromStringAndSize(entry1.c_str(), entry1.length()); - PyList_Append(result, pyentry1); - Py_DECREF(pyentry1); - } - - - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Player_setVideoStream (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "iStream", - NULL}; - - int iStream ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &iStream - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"setVideoStream","XBMCAddon::xbmc::Player"))-> setVideoStream( iStream ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setVideoStream\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setVideoStream\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_RenderCapture_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmc::RenderCapture * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmc::RenderCapture( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmc::RenderCapture\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmc::RenderCapture\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_RenderCapture_getWidth (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::RenderCapture*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_RenderCapture_Type,"getWidth","XBMCAddon::xbmc::RenderCapture"))-> getWidth( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getWidth\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getWidth\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_RenderCapture_getHeight (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::RenderCapture*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_RenderCapture_Type,"getHeight","XBMCAddon::xbmc::RenderCapture"))-> getHeight( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getHeight\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getHeight\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_RenderCapture_getAspectRatio (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - float apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::RenderCapture*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_RenderCapture_Type,"getAspectRatio","XBMCAddon::xbmc::RenderCapture"))-> getAspectRatio( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAspectRatio\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAspectRatio\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("f", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_RenderCapture_getImageFormat (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - char const * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::RenderCapture*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_RenderCapture_Type,"getImageFormat","XBMCAddon::xbmc::RenderCapture"))-> getImageFormat( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getImageFormat\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getImageFormat\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromString(apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_RenderCapture_getImage (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "msecs", - NULL}; - - unsigned int msecs = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|I", - const_cast(keywords), - &msecs - )) - { - return NULL; - } - - XbmcCommons::Buffer apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::RenderCapture*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_RenderCapture_Type,"getImage","XBMCAddon::xbmc::RenderCapture"))-> getImage( msecs ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getImage\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getImage\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyByteArray_FromStringAndSize((char*)apiResult.curPosition(),apiResult.remaining()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_RenderCapture_capture (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "width", - "height", - NULL}; - - int width ; - int height ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "ii", - const_cast(keywords), - &width, - &height - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::RenderCapture*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_RenderCapture_Type,"capture","XBMCAddon::xbmc::RenderCapture"))-> capture( width, height ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"capture\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"capture\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmc::InfoTagMusic * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmc::InfoTagMusic( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmc::InfoTagMusic\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmc::InfoTagMusic\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getDbId (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getDbId","XBMCAddon::xbmc::InfoTagMusic"))-> getDbId( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getDbId\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getDbId\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getURL (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getURL","XBMCAddon::xbmc::InfoTagMusic"))-> getURL( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getURL\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getURL\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getTitle (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getTitle","XBMCAddon::xbmc::InfoTagMusic"))-> getTitle( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getTitle\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getTitle\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getMediaType (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getMediaType","XBMCAddon::xbmc::InfoTagMusic"))-> getMediaType( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getMediaType\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getMediaType\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getArtist (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getArtist","XBMCAddon::xbmc::InfoTagMusic"))-> getArtist( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getArtist\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getArtist\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getAlbum (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getAlbum","XBMCAddon::xbmc::InfoTagMusic"))-> getAlbum( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAlbum\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAlbum\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getAlbumArtist (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getAlbumArtist","XBMCAddon::xbmc::InfoTagMusic"))-> getAlbumArtist( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAlbumArtist\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAlbumArtist\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getGenre (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getGenre","XBMCAddon::xbmc::InfoTagMusic"))-> getGenre( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getGenre\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getGenre\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getDuration (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getDuration","XBMCAddon::xbmc::InfoTagMusic"))-> getDuration( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getDuration\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getDuration\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getRating (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getRating","XBMCAddon::xbmc::InfoTagMusic"))-> getRating( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getRating\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getRating\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getUserRating (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getUserRating","XBMCAddon::xbmc::InfoTagMusic"))-> getUserRating( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getUserRating\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getUserRating\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getTrack (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getTrack","XBMCAddon::xbmc::InfoTagMusic"))-> getTrack( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getTrack\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getTrack\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getDisc (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getDisc","XBMCAddon::xbmc::InfoTagMusic"))-> getDisc( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getDisc\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getDisc\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getReleaseDate (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getReleaseDate","XBMCAddon::xbmc::InfoTagMusic"))-> getReleaseDate( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getReleaseDate\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getReleaseDate\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getListeners (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getListeners","XBMCAddon::xbmc::InfoTagMusic"))-> getListeners( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getListeners\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getListeners\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getPlayCount (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getPlayCount","XBMCAddon::xbmc::InfoTagMusic"))-> getPlayCount( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPlayCount\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPlayCount\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getLastPlayed (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getLastPlayed","XBMCAddon::xbmc::InfoTagMusic"))-> getLastPlayed( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getLastPlayed\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getLastPlayed\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getComment (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getComment","XBMCAddon::xbmc::InfoTagMusic"))-> getComment( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getComment\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getComment\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagMusic_getLyrics (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"getLyrics","XBMCAddon::xbmc::InfoTagMusic"))-> getLyrics( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getLyrics\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getLyrics\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmc::InfoTagRadioRDS * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmc::InfoTagRadioRDS( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmc::InfoTagRadioRDS\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmc::InfoTagRadioRDS\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getTitle (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getTitle","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getTitle( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getTitle\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getTitle\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getBand (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getBand","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getBand( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getBand\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getBand\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getArtist (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getArtist","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getArtist( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getArtist\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getArtist\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getComposer (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getComposer","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getComposer( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getComposer\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getComposer\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getConductor (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getConductor","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getConductor( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getConductor\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getConductor\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getAlbum (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getAlbum","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getAlbum( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAlbum\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAlbum\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getComment (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getComment","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getComment( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getComment\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getComment\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getAlbumTrackNumber (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getAlbumTrackNumber","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getAlbumTrackNumber( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAlbumTrackNumber\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAlbumTrackNumber\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoNews (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getInfoNews","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getInfoNews( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getInfoNews\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getInfoNews\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoNewsLocal (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getInfoNewsLocal","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getInfoNewsLocal( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getInfoNewsLocal\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getInfoNewsLocal\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoSport (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getInfoSport","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getInfoSport( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getInfoSport\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getInfoSport\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoStock (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getInfoStock","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getInfoStock( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getInfoStock\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getInfoStock\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoWeather (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getInfoWeather","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getInfoWeather( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getInfoWeather\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getInfoWeather\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoHoroscope (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getInfoHoroscope","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getInfoHoroscope( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getInfoHoroscope\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getInfoHoroscope\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoCinema (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getInfoCinema","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getInfoCinema( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getInfoCinema\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getInfoCinema\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoLottery (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getInfoLottery","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getInfoLottery( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getInfoLottery\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getInfoLottery\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoOther (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getInfoOther","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getInfoOther( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getInfoOther\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getInfoOther\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getEditorialStaff (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getEditorialStaff","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getEditorialStaff( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getEditorialStaff\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getEditorialStaff\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgStation (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getProgStation","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getProgStation( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getProgStation\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getProgStation\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgStyle (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getProgStyle","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getProgStyle( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getProgStyle\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getProgStyle\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgHost (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getProgHost","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getProgHost( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getProgHost\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getProgHost\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgWebsite (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getProgWebsite","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getProgWebsite( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getProgWebsite\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getProgWebsite\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgNow (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getProgNow","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getProgNow( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getProgNow\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getProgNow\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgNext (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getProgNext","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getProgNext( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getProgNext\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getProgNext\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getPhoneHotline (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getPhoneHotline","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getPhoneHotline( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPhoneHotline\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPhoneHotline\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getEMailHotline (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getEMailHotline","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getEMailHotline( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getEMailHotline\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getEMailHotline\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getPhoneStudio (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getPhoneStudio","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getPhoneStudio( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPhoneStudio\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPhoneStudio\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getEMailStudio (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getEMailStudio","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getEMailStudio( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getEMailStudio\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getEMailStudio\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getSMSStudio (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"getSMSStudio","XBMCAddon::xbmc::InfoTagRadioRDS"))-> getSMSStudio( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSMSStudio\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSMSStudio\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmc::InfoTagVideo * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmc::InfoTagVideo( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmc::InfoTagVideo\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmc::InfoTagVideo\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getDbId (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getDbId","XBMCAddon::xbmc::InfoTagVideo"))-> getDbId( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getDbId\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getDbId\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getDirector (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getDirector","XBMCAddon::xbmc::InfoTagVideo"))-> getDirector( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getDirector\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getDirector\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getWritingCredits (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getWritingCredits","XBMCAddon::xbmc::InfoTagVideo"))-> getWritingCredits( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getWritingCredits\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getWritingCredits\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getGenre (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getGenre","XBMCAddon::xbmc::InfoTagVideo"))-> getGenre( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getGenre\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getGenre\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getTagLine (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getTagLine","XBMCAddon::xbmc::InfoTagVideo"))-> getTagLine( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getTagLine\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getTagLine\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getPlotOutline (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getPlotOutline","XBMCAddon::xbmc::InfoTagVideo"))-> getPlotOutline( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPlotOutline\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPlotOutline\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getPlot (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getPlot","XBMCAddon::xbmc::InfoTagVideo"))-> getPlot( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPlot\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPlot\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getPictureURL (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getPictureURL","XBMCAddon::xbmc::InfoTagVideo"))-> getPictureURL( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPictureURL\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPictureURL\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getTitle (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getTitle","XBMCAddon::xbmc::InfoTagVideo"))-> getTitle( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getTitle\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getTitle\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getTVShowTitle (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getTVShowTitle","XBMCAddon::xbmc::InfoTagVideo"))-> getTVShowTitle( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getTVShowTitle\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getTVShowTitle\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getMediaType (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getMediaType","XBMCAddon::xbmc::InfoTagVideo"))-> getMediaType( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getMediaType\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getMediaType\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getVotes (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getVotes","XBMCAddon::xbmc::InfoTagVideo"))-> getVotes( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getVotes\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getVotes\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getCast (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getCast","XBMCAddon::xbmc::InfoTagVideo"))-> getCast( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getCast\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getCast\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getFile (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getFile","XBMCAddon::xbmc::InfoTagVideo"))-> getFile( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getFile\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getFile\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getPath (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getPath","XBMCAddon::xbmc::InfoTagVideo"))-> getPath( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPath\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPath\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getIMDBNumber (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getIMDBNumber","XBMCAddon::xbmc::InfoTagVideo"))-> getIMDBNumber( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getIMDBNumber\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getIMDBNumber\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getSeason (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getSeason","XBMCAddon::xbmc::InfoTagVideo"))-> getSeason( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSeason\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSeason\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getEpisode (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getEpisode","XBMCAddon::xbmc::InfoTagVideo"))-> getEpisode( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getEpisode\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getEpisode\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getYear (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getYear","XBMCAddon::xbmc::InfoTagVideo"))-> getYear( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getYear\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getYear\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getRating (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - double apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getRating","XBMCAddon::xbmc::InfoTagVideo"))-> getRating( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getRating\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getRating\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyFloat_FromDouble(apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getUserRating (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getUserRating","XBMCAddon::xbmc::InfoTagVideo"))-> getUserRating( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getUserRating\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getUserRating\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getPlayCount (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getPlayCount","XBMCAddon::xbmc::InfoTagVideo"))-> getPlayCount( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPlayCount\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPlayCount\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getLastPlayed (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getLastPlayed","XBMCAddon::xbmc::InfoTagVideo"))-> getLastPlayed( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getLastPlayed\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getLastPlayed\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getOriginalTitle (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getOriginalTitle","XBMCAddon::xbmc::InfoTagVideo"))-> getOriginalTitle( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getOriginalTitle\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getOriginalTitle\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getPremiered (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getPremiered","XBMCAddon::xbmc::InfoTagVideo"))-> getPremiered( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPremiered\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPremiered\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getFirstAired (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getFirstAired","XBMCAddon::xbmc::InfoTagVideo"))-> getFirstAired( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getFirstAired\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getFirstAired\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getTrailer (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getTrailer","XBMCAddon::xbmc::InfoTagVideo"))-> getTrailer( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getTrailer\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getTrailer\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getArtist (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - std::vector< std::string > apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getArtist","XBMCAddon::xbmc::InfoTagVideo"))-> getArtist( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getArtist\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getArtist\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - result = PyList_New(0); - - for (std::vector::iterator iter = apiResult.begin(); iter != apiResult.end(); ++iter) - { - std::string & entry1 = *iter; - PyObject* pyentry1; - pyentry1 = PyString_FromStringAndSize(entry1.c_str(), entry1.length()); - PyList_Append(result, pyentry1); - Py_DECREF(pyentry1); - } - - - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getAlbum (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getAlbum","XBMCAddon::xbmc::InfoTagVideo"))-> getAlbum( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAlbum\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAlbum\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getTrack (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getTrack","XBMCAddon::xbmc::InfoTagVideo"))-> getTrack( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getTrack\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getTrack\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_InfoTagVideo_getDuration (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - unsigned int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"getDuration","XBMCAddon::xbmc::InfoTagVideo"))-> getDuration( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getDuration\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getDuration\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("I", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Keyboard_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - std::string line = XBMCAddon::emptyString; - PyObject* pyline = NULL; - std::string heading = XBMCAddon::emptyString; - PyObject* pyheading = NULL; - bool hidden = false; - if (!PyArg_ParseTuple( - args, - - "|OOb", - - &pyline, - &pyheading, - &hidden - )) - { - return NULL; - } - - XBMCAddon::xbmc::Keyboard * apiResult; - try - { - if (pyline) PyXBMCGetUnicodeString(line,pyline,false,"line","Keyboard"); - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","Keyboard"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmc::Keyboard( line, heading, hidden ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmc::Keyboard\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmc::Keyboard\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Keyboard_doModal (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "autoclose", - NULL}; - - int autoclose = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|i", - const_cast(keywords), - &autoclose - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::Keyboard*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Keyboard_Type,"doModal","XBMCAddon::xbmc::Keyboard"))-> doModal( autoclose ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"doModal\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"doModal\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Keyboard_setDefault (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "line", - NULL}; - - std::string line = XBMCAddon::emptyString; - PyObject* pyline = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|O", - const_cast(keywords), - &pyline - )) - { - return NULL; - } - - - try - { - if (pyline) PyXBMCGetUnicodeString(line,pyline,false,"line","setDefault"); - - ((XBMCAddon::xbmc::Keyboard*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Keyboard_Type,"setDefault","XBMCAddon::xbmc::Keyboard"))-> setDefault( line ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setDefault\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setDefault\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Keyboard_setHiddenInput (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "hidden", - NULL}; - - bool hidden = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|b", - const_cast(keywords), - &hidden - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::Keyboard*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Keyboard_Type,"setHiddenInput","XBMCAddon::xbmc::Keyboard"))-> setHiddenInput( hidden ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setHiddenInput\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setHiddenInput\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Keyboard_setHeading (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "heading", - NULL}; - - std::string heading ; - PyObject* pyheading = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyheading - )) - { - return NULL; - } - - - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","setHeading"); - - ((XBMCAddon::xbmc::Keyboard*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Keyboard_Type,"setHeading","XBMCAddon::xbmc::Keyboard"))-> setHeading( heading ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setHeading\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setHeading\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Keyboard_getText (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Keyboard*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Keyboard_Type,"getText","XBMCAddon::xbmc::Keyboard"))-> getText( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getText\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getText\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Keyboard_isConfirmed (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Keyboard*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Keyboard_Type,"isConfirmed","XBMCAddon::xbmc::Keyboard"))-> isConfirmed( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"isConfirmed\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"isConfirmed\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - int playList ; - if (!PyArg_ParseTuple( - args, - - "i", - - &playList - )) - { - return NULL; - } - - XBMCAddon::xbmc::PlayList * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmc::PlayList( playList ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmc::PlayList\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmc::PlayList\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_getPlayListId (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"getPlayListId","XBMCAddon::xbmc::PlayList"))-> getPlayListId( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPlayListId\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPlayListId\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_add (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "url", - "listitem", - "index", - NULL}; - - std::string url ; - PyObject* pyurl = NULL; - XBMCAddon::xbmcgui::ListItem * listitem = NULL; - PyObject* pylistitem = NULL; - int index = -1; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|Oi", - const_cast(keywords), - &pyurl, - &pylistitem, - &index - )) - { - return NULL; - } - - - try - { - if (pyurl) PyXBMCGetUnicodeString(url,pyurl,false,"url","add"); - listitem = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pylistitem,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmc::","add"); - - ((XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"add","XBMCAddon::xbmc::PlayList"))-> add( url, listitem, index ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"add\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"add\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_load (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "filename", - NULL}; - - char * filename = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &filename - )) - { - return NULL; - } - - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"load","XBMCAddon::xbmc::PlayList"))-> load( filename ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"load\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"load\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_remove (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "filename", - NULL}; - - char * filename = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &filename - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"remove","XBMCAddon::xbmc::PlayList"))-> remove( filename ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"remove\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"remove\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_clear (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"clear","XBMCAddon::xbmc::PlayList"))-> clear( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"clear\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"clear\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_size (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"size","XBMCAddon::xbmc::PlayList"))-> size( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"size\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"size\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_shuffle (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"shuffle","XBMCAddon::xbmc::PlayList"))-> shuffle( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"shuffle\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"shuffle\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_unshuffle (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"unshuffle","XBMCAddon::xbmc::PlayList"))-> unshuffle( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"unshuffle\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"unshuffle\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_getposition (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"getposition","XBMCAddon::xbmc::PlayList"))-> getposition( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getposition\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getposition\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_PlayList_operatorIndex_ (PyHolder* self , PyObject* pyi ) - { - XBMC_TRACE; - - long i ; XBMCAddon::xbmcgui::ListItem * apiResult; - try - { - i = PyInt_AsLong(pyi); - - apiResult = ((XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"operator []","XBMCAddon::xbmc::PlayList"))-> operator []( i ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"operator []\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"operator []\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmc::Monitor * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = (&(TyXBMCAddon_xbmc_Monitor_Type.pythonType) != pytype) ? new XBMCAddon_xbmc_Monitor_Director() : new XBMCAddon::xbmc::Monitor( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmc::Monitor\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmc::Monitor\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - if (&(TyXBMCAddon_xbmc_Monitor_Type.pythonType) != pytype) - ((XBMCAddon_xbmc_Monitor_Director*)apiResult)->setPyObjectForDirector(result); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onSettingsChanged (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onSettingsChanged","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onSettingsChanged( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onSettingsChanged\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onSettingsChanged\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onScreensaverActivated (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onScreensaverActivated","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onScreensaverActivated( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onScreensaverActivated\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onScreensaverActivated\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onScreensaverDeactivated (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onScreensaverDeactivated","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onScreensaverDeactivated( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onScreensaverDeactivated\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onScreensaverDeactivated\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onDPMSActivated (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onDPMSActivated","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onDPMSActivated( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onDPMSActivated\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onDPMSActivated\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onDPMSDeactivated (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onDPMSDeactivated","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onDPMSDeactivated( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onDPMSDeactivated\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onDPMSDeactivated\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onScanStarted (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "library", - NULL}; - - std::string library ; - PyObject* pylibrary = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pylibrary - )) - { - return NULL; - } - - - try - { - if (pylibrary) PyXBMCGetUnicodeString(library,pylibrary,false,"library","onScanStarted"); - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onScanStarted","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onScanStarted( library ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onScanStarted\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onScanStarted\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onScanFinished (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "library", - NULL}; - - std::string library ; - PyObject* pylibrary = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pylibrary - )) - { - return NULL; - } - - - try - { - if (pylibrary) PyXBMCGetUnicodeString(library,pylibrary,false,"library","onScanFinished"); - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onScanFinished","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onScanFinished( library ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onScanFinished\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onScanFinished\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onDatabaseScanStarted (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "database", - NULL}; - - std::string database ; - PyObject* pydatabase = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pydatabase - )) - { - return NULL; - } - - - try - { - if (pydatabase) PyXBMCGetUnicodeString(database,pydatabase,false,"database","onDatabaseScanStarted"); - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onDatabaseScanStarted","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onDatabaseScanStarted( database ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onDatabaseScanStarted\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onDatabaseScanStarted\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onDatabaseUpdated (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "database", - NULL}; - - std::string database ; - PyObject* pydatabase = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pydatabase - )) - { - return NULL; - } - - - try - { - if (pydatabase) PyXBMCGetUnicodeString(database,pydatabase,false,"database","onDatabaseUpdated"); - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onDatabaseUpdated","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onDatabaseUpdated( database ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onDatabaseUpdated\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onDatabaseUpdated\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onCleanStarted (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "library", - NULL}; - - std::string library ; - PyObject* pylibrary = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pylibrary - )) - { - return NULL; - } - - - try - { - if (pylibrary) PyXBMCGetUnicodeString(library,pylibrary,false,"library","onCleanStarted"); - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onCleanStarted","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onCleanStarted( library ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onCleanStarted\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onCleanStarted\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onCleanFinished (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "library", - NULL}; - - std::string library ; - PyObject* pylibrary = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pylibrary - )) - { - return NULL; - } - - - try - { - if (pylibrary) PyXBMCGetUnicodeString(library,pylibrary,false,"library","onCleanFinished"); - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onCleanFinished","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onCleanFinished( library ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onCleanFinished\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onCleanFinished\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onAbortRequested (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onAbortRequested","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onAbortRequested( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onAbortRequested\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onAbortRequested\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_onNotification (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "sender", - "method", - "data", - NULL}; - - std::string sender ; - PyObject* pysender = NULL; - std::string method ; - PyObject* pymethod = NULL; - std::string data ; - PyObject* pydata = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OOO", - const_cast(keywords), - &pysender, - &pymethod, - &pydata - )) - { - return NULL; - } - - - try - { - if (pysender) PyXBMCGetUnicodeString(sender,pysender,false,"sender","onNotification"); - if (pymethod) PyXBMCGetUnicodeString(method,pymethod,false,"method","onNotification"); - if (pydata) PyXBMCGetUnicodeString(data,pydata,false,"data","onNotification"); - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"onNotification","XBMCAddon::xbmc::Monitor"))-> XBMCAddon::xbmc::Monitor::onNotification( sender, method, data ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onNotification\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onNotification\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_waitForAbort (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "timeout", - NULL}; - - double timeout = -1; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|d", - const_cast(keywords), - &timeout - )) - { - return NULL; - } - - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"waitForAbort","XBMCAddon::xbmc::Monitor"))-> waitForAbort( timeout ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"waitForAbort\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"waitForAbort\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmc_XBMCAddon_xbmc_Monitor_abortRequested (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"abortRequested","XBMCAddon::xbmc::Monitor"))-> abortRequested( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"abortRequested\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"abortRequested\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static void xbmc_XBMCAddon_xbmc_Player_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmc::Player* theObj = (XBMCAddon::xbmc::Player*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Player_Type,"~XBMCAddon::xbmc::Player","XBMCAddon::xbmc::Player"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::Player\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::Player\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmc_XBMCAddon_xbmc_RenderCapture_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmc::RenderCapture* theObj = (XBMCAddon::xbmc::RenderCapture*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_RenderCapture_Type,"~XBMCAddon::xbmc::RenderCapture","XBMCAddon::xbmc::RenderCapture"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::RenderCapture\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::RenderCapture\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmc_XBMCAddon_xbmc_InfoTagMusic_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmc::InfoTagMusic* theObj = (XBMCAddon::xbmc::InfoTagMusic*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagMusic_Type,"~XBMCAddon::xbmc::InfoTagMusic","XBMCAddon::xbmc::InfoTagMusic"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::InfoTagMusic\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::InfoTagMusic\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmc::InfoTagRadioRDS* theObj = (XBMCAddon::xbmc::InfoTagRadioRDS*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type,"~XBMCAddon::xbmc::InfoTagRadioRDS","XBMCAddon::xbmc::InfoTagRadioRDS"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::InfoTagRadioRDS\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::InfoTagRadioRDS\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmc_XBMCAddon_xbmc_InfoTagVideo_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmc::InfoTagVideo* theObj = (XBMCAddon::xbmc::InfoTagVideo*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_InfoTagVideo_Type,"~XBMCAddon::xbmc::InfoTagVideo","XBMCAddon::xbmc::InfoTagVideo"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::InfoTagVideo\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::InfoTagVideo\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmc_XBMCAddon_xbmc_Keyboard_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmc::Keyboard* theObj = (XBMCAddon::xbmc::Keyboard*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Keyboard_Type,"~XBMCAddon::xbmc::Keyboard","XBMCAddon::xbmc::Keyboard"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::Keyboard\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::Keyboard\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmc_XBMCAddon_xbmc_PlayList_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmc::PlayList* theObj = (XBMCAddon::xbmc::PlayList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_PlayList_Type,"~XBMCAddon::xbmc::PlayList","XBMCAddon::xbmc::PlayList"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::PlayList\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::PlayList\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmc_XBMCAddon_xbmc_Monitor_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmc::Monitor* theObj = (XBMCAddon::xbmc::Monitor*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmc_Monitor_Type,"~XBMCAddon::xbmc::Monitor","XBMCAddon::xbmc::Monitor"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmc::Monitor\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmc::Monitor\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmc::Player - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmc_Player_methods[] = { - {"play", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_play, METH_VARARGS|METH_KEYWORDS, NULL }, - {"stop", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_stop, METH_VARARGS|METH_KEYWORDS, NULL }, - {"pause", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_pause, METH_VARARGS|METH_KEYWORDS, NULL }, - {"playnext", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_playnext, METH_VARARGS|METH_KEYWORDS, NULL }, - {"playprevious", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_playprevious, METH_VARARGS|METH_KEYWORDS, NULL }, - {"playselected", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_playselected, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onPlayBackStarted", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onPlayBackStarted, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onAVStarted", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onAVStarted, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onAVChange", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onAVChange, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onPlayBackEnded", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onPlayBackEnded, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onPlayBackStopped", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onPlayBackStopped, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onPlayBackError", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onPlayBackError, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onPlayBackPaused", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onPlayBackPaused, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onPlayBackResumed", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onPlayBackResumed, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onQueueNextItem", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onQueueNextItem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onPlayBackSpeedChanged", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onPlayBackSpeedChanged, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onPlayBackSeek", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onPlayBackSeek, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onPlayBackSeekChapter", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_onPlayBackSeekChapter, METH_VARARGS|METH_KEYWORDS, NULL }, - {"isPlaying", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_isPlaying, METH_VARARGS|METH_KEYWORDS, NULL }, - {"isPlayingAudio", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_isPlayingAudio, METH_VARARGS|METH_KEYWORDS, NULL }, - {"isPlayingVideo", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_isPlayingVideo, METH_VARARGS|METH_KEYWORDS, NULL }, - {"isPlayingRDS", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_isPlayingRDS, METH_VARARGS|METH_KEYWORDS, NULL }, - {"isExternalPlayer", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_isExternalPlayer, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPlayingFile", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_getPlayingFile, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getTime", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_getTime, METH_VARARGS|METH_KEYWORDS, NULL }, - {"seekTime", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_seekTime, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setSubtitles", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_setSubtitles, METH_VARARGS|METH_KEYWORDS, NULL }, - {"showSubtitles", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_showSubtitles, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSubtitles", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_getSubtitles, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAvailableSubtitleStreams", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_getAvailableSubtitleStreams, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setSubtitleStream", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_setSubtitleStream, METH_VARARGS|METH_KEYWORDS, NULL }, - {"updateInfoTag", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_updateInfoTag, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getVideoInfoTag", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_getVideoInfoTag, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getMusicInfoTag", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_getMusicInfoTag, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getRadioRDSInfoTag", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_getRadioRDSInfoTag, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getTotalTime", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_getTotalTime, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAvailableAudioStreams", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_getAvailableAudioStreams, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setAudioStream", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_setAudioStream, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAvailableVideoStreams", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_getAvailableVideoStreams, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setVideoStream", (PyCFunction)xbmc_XBMCAddon_xbmc_Player_setVideoStream, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmc_Player_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmc_Player_Type.pythonType; - pythonType.tp_name = "xbmc.Player"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmc_XBMCAddon_xbmc_Player_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmc_Player_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmc_XBMCAddon_xbmc_Player_New; - - TyXBMCAddon_xbmc_Player_Type.swigType="p.XBMCAddon::xbmc::Player"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmc_Player_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmc::RenderCapture - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmc_RenderCapture_methods[] = { - {"getWidth", (PyCFunction)xbmc_XBMCAddon_xbmc_RenderCapture_getWidth, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getHeight", (PyCFunction)xbmc_XBMCAddon_xbmc_RenderCapture_getHeight, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAspectRatio", (PyCFunction)xbmc_XBMCAddon_xbmc_RenderCapture_getAspectRatio, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getImageFormat", (PyCFunction)xbmc_XBMCAddon_xbmc_RenderCapture_getImageFormat, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getImage", (PyCFunction)xbmc_XBMCAddon_xbmc_RenderCapture_getImage, METH_VARARGS|METH_KEYWORDS, NULL }, - {"capture", (PyCFunction)xbmc_XBMCAddon_xbmc_RenderCapture_capture, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmc_RenderCapture_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmc_RenderCapture_Type.pythonType; - pythonType.tp_name = "xbmc.RenderCapture"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmc_XBMCAddon_xbmc_RenderCapture_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmc_RenderCapture_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmc_XBMCAddon_xbmc_RenderCapture_New; - - TyXBMCAddon_xbmc_RenderCapture_Type.swigType="p.XBMCAddon::xbmc::RenderCapture"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmc_RenderCapture_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmc::InfoTagMusic - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmc_InfoTagMusic_methods[] = { - {"getDbId", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getDbId, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getURL", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getURL, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getTitle", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getTitle, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getMediaType", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getMediaType, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getArtist", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getArtist, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAlbum", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getAlbum, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAlbumArtist", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getAlbumArtist, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getGenre", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getGenre, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getDuration", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getDuration, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getRating", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getRating, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getUserRating", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getUserRating, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getTrack", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getTrack, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getDisc", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getDisc, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getReleaseDate", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getReleaseDate, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getListeners", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getListeners, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPlayCount", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getPlayCount, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getLastPlayed", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getLastPlayed, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getComment", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getComment, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getLyrics", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagMusic_getLyrics, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmc_InfoTagMusic_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmc_InfoTagMusic_Type.pythonType; - pythonType.tp_name = "xbmc.InfoTagMusic"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmc_XBMCAddon_xbmc_InfoTagMusic_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmc_InfoTagMusic_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmc_XBMCAddon_xbmc_InfoTagMusic_New; - - TyXBMCAddon_xbmc_InfoTagMusic_Type.swigType="p.XBMCAddon::xbmc::InfoTagMusic"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmc_InfoTagMusic_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmc::InfoTagRadioRDS - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmc_InfoTagRadioRDS_methods[] = { - {"getTitle", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getTitle, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getBand", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getBand, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getArtist", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getArtist, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getComposer", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getComposer, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getConductor", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getConductor, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAlbum", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getAlbum, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getComment", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getComment, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAlbumTrackNumber", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getAlbumTrackNumber, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoNews", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoNews, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoNewsLocal", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoNewsLocal, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoSport", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoSport, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoStock", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoStock, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoWeather", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoWeather, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoHoroscope", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoHoroscope, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoCinema", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoCinema, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoLottery", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoLottery, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoOther", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getInfoOther, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getEditorialStaff", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getEditorialStaff, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getProgStation", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgStation, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getProgStyle", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgStyle, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getProgHost", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgHost, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getProgWebsite", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgWebsite, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getProgNow", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgNow, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getProgNext", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getProgNext, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPhoneHotline", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getPhoneHotline, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getEMailHotline", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getEMailHotline, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPhoneStudio", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getPhoneStudio, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getEMailStudio", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getEMailStudio, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSMSStudio", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_getSMSStudio, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmc_InfoTagRadioRDS_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmc_InfoTagRadioRDS_Type.pythonType; - pythonType.tp_name = "xbmc.InfoTagRadioRDS"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmc_InfoTagRadioRDS_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmc_XBMCAddon_xbmc_InfoTagRadioRDS_New; - - TyXBMCAddon_xbmc_InfoTagRadioRDS_Type.swigType="p.XBMCAddon::xbmc::InfoTagRadioRDS"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmc_InfoTagRadioRDS_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmc::InfoTagVideo - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmc_InfoTagVideo_methods[] = { - {"getDbId", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getDbId, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getDirector", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getDirector, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getWritingCredits", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getWritingCredits, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getGenre", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getGenre, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getTagLine", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getTagLine, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPlotOutline", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getPlotOutline, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPlot", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getPlot, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPictureURL", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getPictureURL, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getTitle", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getTitle, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getTVShowTitle", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getTVShowTitle, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getMediaType", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getMediaType, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getVotes", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getVotes, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getCast", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getCast, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getFile", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getFile, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPath", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getPath, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getIMDBNumber", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getIMDBNumber, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSeason", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getSeason, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getEpisode", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getEpisode, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getYear", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getYear, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getRating", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getRating, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getUserRating", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getUserRating, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPlayCount", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getPlayCount, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getLastPlayed", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getLastPlayed, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getOriginalTitle", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getOriginalTitle, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPremiered", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getPremiered, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getFirstAired", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getFirstAired, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getTrailer", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getTrailer, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getArtist", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getArtist, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAlbum", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getAlbum, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getTrack", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getTrack, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getDuration", (PyCFunction)xbmc_XBMCAddon_xbmc_InfoTagVideo_getDuration, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmc_InfoTagVideo_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmc_InfoTagVideo_Type.pythonType; - pythonType.tp_name = "xbmc.InfoTagVideo"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmc_XBMCAddon_xbmc_InfoTagVideo_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmc_InfoTagVideo_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmc_XBMCAddon_xbmc_InfoTagVideo_New; - - TyXBMCAddon_xbmc_InfoTagVideo_Type.swigType="p.XBMCAddon::xbmc::InfoTagVideo"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmc_InfoTagVideo_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmc::Keyboard - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmc_Keyboard_methods[] = { - {"doModal", (PyCFunction)xbmc_XBMCAddon_xbmc_Keyboard_doModal, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setDefault", (PyCFunction)xbmc_XBMCAddon_xbmc_Keyboard_setDefault, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setHiddenInput", (PyCFunction)xbmc_XBMCAddon_xbmc_Keyboard_setHiddenInput, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setHeading", (PyCFunction)xbmc_XBMCAddon_xbmc_Keyboard_setHeading, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getText", (PyCFunction)xbmc_XBMCAddon_xbmc_Keyboard_getText, METH_VARARGS|METH_KEYWORDS, NULL }, - {"isConfirmed", (PyCFunction)xbmc_XBMCAddon_xbmc_Keyboard_isConfirmed, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmc_Keyboard_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmc_Keyboard_Type.pythonType; - pythonType.tp_name = "xbmc.Keyboard"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmc_XBMCAddon_xbmc_Keyboard_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmc_Keyboard_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmc_XBMCAddon_xbmc_Keyboard_New; - - TyXBMCAddon_xbmc_Keyboard_Type.swigType="p.XBMCAddon::xbmc::Keyboard"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmc_Keyboard_Type); - - } - //========================================================================= - - static Py_ssize_t xbmc_XBMCAddon_xbmc_PlayList_size_(PyObject* self) - { - return (Py_ssize_t)((XBMCAddon::xbmc::PlayList*)retrieveApiInstance(self,&TyXBMCAddon_xbmc_PlayList_Type,"operator []","XBMCAddon::xbmc::PlayList"))-> size(); - } - - //========================================================================= - // tp_as_mapping struct for XBMCAddon::xbmc::PlayList - //========================================================================= - PyMappingMethods xbmc_XBMCAddon_xbmc_PlayList_as_mapping = { - xbmc_XBMCAddon_xbmc_PlayList_size_, /* inquiry mp_length; __len__ */ - (PyCFunction)xbmc_XBMCAddon_xbmc_PlayList_operatorIndex_, /* binaryfunc mp_subscript __getitem__ */ - 0, /* objargproc mp_ass_subscript; __setitem__ */ - }; - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmc::PlayList - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmc_PlayList_methods[] = { - {"getPlayListId", (PyCFunction)xbmc_XBMCAddon_xbmc_PlayList_getPlayListId, METH_VARARGS|METH_KEYWORDS, NULL }, - {"add", (PyCFunction)xbmc_XBMCAddon_xbmc_PlayList_add, METH_VARARGS|METH_KEYWORDS, NULL }, - {"load", (PyCFunction)xbmc_XBMCAddon_xbmc_PlayList_load, METH_VARARGS|METH_KEYWORDS, NULL }, - {"remove", (PyCFunction)xbmc_XBMCAddon_xbmc_PlayList_remove, METH_VARARGS|METH_KEYWORDS, NULL }, - {"clear", (PyCFunction)xbmc_XBMCAddon_xbmc_PlayList_clear, METH_VARARGS|METH_KEYWORDS, NULL }, - {"size", (PyCFunction)xbmc_XBMCAddon_xbmc_PlayList_size, METH_VARARGS|METH_KEYWORDS, NULL }, - {"shuffle", (PyCFunction)xbmc_XBMCAddon_xbmc_PlayList_shuffle, METH_VARARGS|METH_KEYWORDS, NULL }, - {"unshuffle", (PyCFunction)xbmc_XBMCAddon_xbmc_PlayList_unshuffle, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getposition", (PyCFunction)xbmc_XBMCAddon_xbmc_PlayList_getposition, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmc_PlayList_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmc_PlayList_Type.pythonType; - pythonType.tp_name = "xbmc.PlayList"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmc_XBMCAddon_xbmc_PlayList_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmc_PlayList_methods; - pythonType.tp_as_mapping = &xbmc_XBMCAddon_xbmc_PlayList_as_mapping; - - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmc_XBMCAddon_xbmc_PlayList_New; - - TyXBMCAddon_xbmc_PlayList_Type.swigType="p.XBMCAddon::xbmc::PlayList"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmc_PlayList_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmc::Monitor - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmc_Monitor_methods[] = { - {"onSettingsChanged", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onSettingsChanged, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onScreensaverActivated", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onScreensaverActivated, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onScreensaverDeactivated", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onScreensaverDeactivated, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onDPMSActivated", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onDPMSActivated, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onDPMSDeactivated", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onDPMSDeactivated, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onScanStarted", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onScanStarted, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onScanFinished", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onScanFinished, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onDatabaseScanStarted", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onDatabaseScanStarted, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onDatabaseUpdated", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onDatabaseUpdated, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onCleanStarted", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onCleanStarted, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onCleanFinished", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onCleanFinished, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onAbortRequested", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onAbortRequested, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onNotification", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_onNotification, METH_VARARGS|METH_KEYWORDS, NULL }, - {"waitForAbort", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_waitForAbort, METH_VARARGS|METH_KEYWORDS, NULL }, - {"abortRequested", (PyCFunction)xbmc_XBMCAddon_xbmc_Monitor_abortRequested, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmc_Monitor_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmc_Monitor_Type.pythonType; - pythonType.tp_name = "xbmc.Monitor"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmc_XBMCAddon_xbmc_Monitor_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmc_Monitor_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmc_XBMCAddon_xbmc_Monitor_New; - - TyXBMCAddon_xbmc_Monitor_Type.swigType="p.XBMCAddon::xbmc::Monitor"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmc_Monitor_Type); - - } - //========================================================================= - - - static PyMethodDef xbmc_methods[] = { - {"log", (PyCFunction)xbmc_log, METH_VARARGS|METH_KEYWORDS, NULL }, - {"shutdown", (PyCFunction)xbmc_shutdown, METH_VARARGS|METH_KEYWORDS, NULL }, - {"restart", (PyCFunction)xbmc_restart, METH_VARARGS|METH_KEYWORDS, NULL }, - {"executescript", (PyCFunction)xbmc_executescript, METH_VARARGS|METH_KEYWORDS, NULL }, - {"executebuiltin", (PyCFunction)xbmc_executebuiltin, METH_VARARGS|METH_KEYWORDS, NULL }, - {"executeJSONRPC", (PyCFunction)xbmc_executeJSONRPC, METH_VARARGS|METH_KEYWORDS, NULL }, - {"sleep", (PyCFunction)xbmc_sleep, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getLocalizedString", (PyCFunction)xbmc_getLocalizedString, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSkinDir", (PyCFunction)xbmc_getSkinDir, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getLanguage", (PyCFunction)xbmc_getLanguage, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getIPAddress", (PyCFunction)xbmc_getIPAddress, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getDVDState", (PyCFunction)xbmc_getDVDState, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getFreeMem", (PyCFunction)xbmc_getFreeMem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoLabel", (PyCFunction)xbmc_getInfoLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInfoImage", (PyCFunction)xbmc_getInfoImage, METH_VARARGS|METH_KEYWORDS, NULL }, - {"playSFX", (PyCFunction)xbmc_playSFX, METH_VARARGS|METH_KEYWORDS, NULL }, - {"stopSFX", (PyCFunction)xbmc_stopSFX, METH_VARARGS|METH_KEYWORDS, NULL }, - {"enableNavSounds", (PyCFunction)xbmc_enableNavSounds, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getCondVisibility", (PyCFunction)xbmc_getCondVisibility, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getGlobalIdleTime", (PyCFunction)xbmc_getGlobalIdleTime, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getCacheThumbName", (PyCFunction)xbmc_getCacheThumbName, METH_VARARGS|METH_KEYWORDS, NULL }, - {"makeLegalFilename", (PyCFunction)xbmc_makeLegalFilename, METH_VARARGS|METH_KEYWORDS, NULL }, - {"translatePath", (PyCFunction)xbmc_translatePath, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getCleanMovieTitle", (PyCFunction)xbmc_getCleanMovieTitle, METH_VARARGS|METH_KEYWORDS, NULL }, - {"validatePath", (PyCFunction)xbmc_validatePath, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getRegion", (PyCFunction)xbmc_getRegion, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSupportedMedia", (PyCFunction)xbmc_getSupportedMedia, METH_VARARGS|METH_KEYWORDS, NULL }, - {"skinHasImage", (PyCFunction)xbmc_skinHasImage, METH_VARARGS|METH_KEYWORDS, NULL }, - {"startServer", (PyCFunction)xbmc_startServer, METH_VARARGS|METH_KEYWORDS, NULL }, - {"audioSuspend", (PyCFunction)xbmc_audioSuspend, METH_VARARGS|METH_KEYWORDS, NULL }, - {"audioResume", (PyCFunction)xbmc_audioResume, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getUserAgent", (PyCFunction)xbmc_getUserAgent, METH_VARARGS|METH_KEYWORDS, NULL }, - {"convertLanguage", (PyCFunction)xbmc_convertLanguage, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - // This is the call that will call all of the other initializes - // for all of the classes in this module - static void initTypes() - { - static bool typesAlreadyInitialized = false; - if (!typesAlreadyInitialized) - { - typesAlreadyInitialized = true; - - initPyXBMCAddon_xbmc_Player_Type(); - initPyXBMCAddon_xbmc_RenderCapture_Type(); - initPyXBMCAddon_xbmc_InfoTagMusic_Type(); - initPyXBMCAddon_xbmc_InfoTagRadioRDS_Type(); - initPyXBMCAddon_xbmc_InfoTagVideo_Type(); - initPyXBMCAddon_xbmc_Keyboard_Type(); - initPyXBMCAddon_xbmc_PlayList_Type(); - initPyXBMCAddon_xbmc_Monitor_Type(); - if (PyType_Ready(&(TyXBMCAddon_xbmc_Player_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmc_RenderCapture_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmc_InfoTagMusic_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmc_InfoTagRadioRDS_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmc_InfoTagVideo_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmc_Keyboard_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmc_PlayList_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmc_Monitor_Type.pythonType)) < 0) - return; - } - } - - void initModule_xbmc() - { - initTypes(); - - // init general xbmc modules - PyObject* module; - - - Py_INCREF(&(TyXBMCAddon_xbmc_Player_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmc_RenderCapture_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmc_InfoTagMusic_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmc_InfoTagRadioRDS_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmc_InfoTagVideo_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmc_Keyboard_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmc_PlayList_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmc_Monitor_Type.pythonType)); - - module = Py_InitModule("xbmc", xbmc_methods); - if (module == NULL) return; - - - PyModule_AddObject(module, "Player", (PyObject*)(&(TyXBMCAddon_xbmc_Player_Type.pythonType))); - PyModule_AddObject(module, "RenderCapture", (PyObject*)(&(TyXBMCAddon_xbmc_RenderCapture_Type.pythonType))); - PyModule_AddObject(module, "InfoTagMusic", (PyObject*)(&(TyXBMCAddon_xbmc_InfoTagMusic_Type.pythonType))); - PyModule_AddObject(module, "InfoTagRadioRDS", (PyObject*)(&(TyXBMCAddon_xbmc_InfoTagRadioRDS_Type.pythonType))); - PyModule_AddObject(module, "InfoTagVideo", (PyObject*)(&(TyXBMCAddon_xbmc_InfoTagVideo_Type.pythonType))); - PyModule_AddObject(module, "Keyboard", (PyObject*)(&(TyXBMCAddon_xbmc_Keyboard_Type.pythonType))); - PyModule_AddObject(module, "PlayList", (PyObject*)(&(TyXBMCAddon_xbmc_PlayList_Type.pythonType))); - PyModule_AddObject(module, "Monitor", (PyObject*)(&(TyXBMCAddon_xbmc_Monitor_Type.pythonType))); - - // constants - PyModule_AddStringConstant(module, "__author__", "Team Kodi "); - PyModule_AddStringConstant(module, "__date__", "Sun Sep 01 10:47:01 GMT 2019"); - PyModule_AddStringConstant(module, "__version__", "2.26.0"); - PyModule_AddStringConstant(module, "__credits__", "Team Kodi"); - PyModule_AddStringConstant(module, "__platform__", "ALL"); - - // need to handle constants - - PyModule_AddIntConstant(module,"SERVER_WEBSERVER",getSERVER_WEBSERVER()); - PyModule_AddIntConstant(module,"SERVER_AIRPLAYSERVER",getSERVER_AIRPLAYSERVER()); - PyModule_AddIntConstant(module,"SERVER_UPNPSERVER",getSERVER_UPNPSERVER()); - PyModule_AddIntConstant(module,"SERVER_UPNPRENDERER",getSERVER_UPNPRENDERER()); - PyModule_AddIntConstant(module,"SERVER_EVENTSERVER",getSERVER_EVENTSERVER()); - PyModule_AddIntConstant(module,"SERVER_JSONRPCSERVER",getSERVER_JSONRPCSERVER()); - PyModule_AddIntConstant(module,"SERVER_ZEROCONF",getSERVER_ZEROCONF()); - PyModule_AddIntConstant(module,"PLAYLIST_MUSIC",getPLAYLIST_MUSIC()); - PyModule_AddIntConstant(module,"PLAYLIST_VIDEO",getPLAYLIST_VIDEO()); - PyModule_AddIntConstant(module,"TRAY_OPEN",getTRAY_OPEN()); - PyModule_AddIntConstant(module,"DRIVE_NOT_READY",getDRIVE_NOT_READY()); - PyModule_AddIntConstant(module,"TRAY_CLOSED_NO_MEDIA",getTRAY_CLOSED_NO_MEDIA()); - PyModule_AddIntConstant(module,"TRAY_CLOSED_MEDIA_PRESENT",getTRAY_CLOSED_MEDIA_PRESENT()); - PyModule_AddIntConstant(module,"LOGDEBUG",getLOGDEBUG()); - PyModule_AddIntConstant(module,"LOGINFO",getLOGINFO()); - PyModule_AddIntConstant(module,"LOGNOTICE",getLOGNOTICE()); - PyModule_AddIntConstant(module,"LOGWARNING",getLOGWARNING()); - PyModule_AddIntConstant(module,"LOGERROR",getLOGERROR()); - PyModule_AddIntConstant(module,"LOGSEVERE",getLOGSEVERE()); - PyModule_AddIntConstant(module,"LOGFATAL",getLOGFATAL()); - PyModule_AddIntConstant(module,"LOGNONE",getLOGNONE()); - PyModule_AddIntConstant(module,"ISO_639_1",getISO_639_1()); - PyModule_AddIntConstant(module,"ISO_639_2",getISO_639_2()); - PyModule_AddIntConstant(module,"ENGLISH_NAME",getENGLISH_NAME()); - } - -} // end PythonBindings namespace for python type definitions - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmc.i.xml b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmc.i.xml deleted file mode 100644 index cd136323a3..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmc.i.xml +++ /dev/null @@ -1,8079 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcaddon.i.cpp b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcaddon.i.cpp deleted file mode 100644 index 52eaa678f3..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcaddon.i.cpp +++ /dev/null @@ -1,941 +0,0 @@ - - -/* - * Copyright (C) 2005-2018 Team Kodi - * This file is part of Kodi - https://kodi.tv - * - * SPDX-License-Identifier: GPL-2.0-or-later - * See LICENSES/README.md for more information. - */ - -// ************************************************************************ -// This file was generated by xbmc compile process. DO NOT EDIT!! -// It was created by running the code generator on the spec file for -// the module "xbmcaddon" on the template file PythonSwig.template.cpp -// ************************************************************************ - - - -#include -#include -#include "interfaces/python/LanguageHook.h" -#include "interfaces/python/swig.h" -#include "interfaces/python/PyContext.h" - - -#if defined(TARGET_WINDOWS) -# include -#endif - -#include "interfaces/legacy/Addon.h" - -using namespace XBMCAddon; -using namespace xbmcaddon; - -#if defined(__GNUG__) -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif - - - -namespace PythonBindings -{ - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcaddon::Addon - TypeInfo TyXBMCAddon_xbmcaddon_Addon_Type(typeid(XBMCAddon::xbmcaddon::Addon)); - //========================================================================= - - - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - char * id = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|s", - const_cast(keywords), - &id - )) - { - return NULL; - } - - XBMCAddon::xbmcaddon::Addon * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcaddon::Addon( id ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcaddon::Addon\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcaddon::Addon\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_getLocalizedString (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - int id ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &id - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"getLocalizedString","XBMCAddon::xbmcaddon::Addon"))-> getLocalizedString( id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getLocalizedString\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getLocalizedString\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyUnicode_DecodeUTF8(apiResult.c_str(),apiResult.size(),"replace"); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_getSetting (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - char * id = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &id - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"getSetting","XBMCAddon::xbmcaddon::Addon"))-> getSetting( id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSetting\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSetting\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_getSettingBool (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - char * id = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &id - )) - { - return NULL; - } - - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"getSettingBool","XBMCAddon::xbmcaddon::Addon"))-> getSettingBool( id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSettingBool\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSettingBool\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_getSettingInt (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - char * id = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &id - )) - { - return NULL; - } - - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"getSettingInt","XBMCAddon::xbmcaddon::Addon"))-> getSettingInt( id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSettingInt\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSettingInt\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_getSettingNumber (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - char * id = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &id - )) - { - return NULL; - } - - double apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"getSettingNumber","XBMCAddon::xbmcaddon::Addon"))-> getSettingNumber( id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSettingNumber\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSettingNumber\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyFloat_FromDouble(apiResult); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_getSettingString (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - char * id = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &id - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"getSettingString","XBMCAddon::xbmcaddon::Addon"))-> getSettingString( id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSettingString\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSettingString\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_setSetting (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - "value", - NULL}; - - char * id = nullptr; - std::string value ; - PyObject* pyvalue = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "sO", - const_cast(keywords), - &id, - &pyvalue - )) - { - return NULL; - } - - - try - { - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,false,"value","setSetting"); - - ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"setSetting","XBMCAddon::xbmcaddon::Addon"))-> setSetting( id, value ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setSetting\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setSetting\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_setSettingBool (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - "value", - NULL}; - - char * id = nullptr; - bool value ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "sb", - const_cast(keywords), - &id, - &value - )) - { - return NULL; - } - - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"setSettingBool","XBMCAddon::xbmcaddon::Addon"))-> setSettingBool( id, value ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setSettingBool\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setSettingBool\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_setSettingInt (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - "value", - NULL}; - - char * id = nullptr; - int value ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "si", - const_cast(keywords), - &id, - &value - )) - { - return NULL; - } - - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"setSettingInt","XBMCAddon::xbmcaddon::Addon"))-> setSettingInt( id, value ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setSettingInt\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setSettingInt\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_setSettingNumber (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - "value", - NULL}; - - char * id = nullptr; - double value ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "sd", - const_cast(keywords), - &id, - &value - )) - { - return NULL; - } - - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"setSettingNumber","XBMCAddon::xbmcaddon::Addon"))-> setSettingNumber( id, value ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setSettingNumber\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setSettingNumber\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_setSettingString (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - "value", - NULL}; - - char * id = nullptr; - std::string value ; - PyObject* pyvalue = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "sO", - const_cast(keywords), - &id, - &pyvalue - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,false,"value","setSettingString"); - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"setSettingString","XBMCAddon::xbmcaddon::Addon"))-> setSettingString( id, value ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setSettingString\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setSettingString\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_openSettings (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"openSettings","XBMCAddon::xbmcaddon::Addon"))-> openSettings( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"openSettings\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"openSettings\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcaddon_XBMCAddon_xbmcaddon_Addon_getAddonInfo (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - char * id = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &id - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"getAddonInfo","XBMCAddon::xbmcaddon::Addon"))-> getAddonInfo( id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAddonInfo\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAddonInfo\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static void xbmcaddon_XBMCAddon_xbmcaddon_Addon_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcaddon::Addon* theObj = (XBMCAddon::xbmcaddon::Addon*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcaddon_Addon_Type,"~XBMCAddon::xbmcaddon::Addon","XBMCAddon::xbmcaddon::Addon"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcaddon::Addon\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcaddon::Addon\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcaddon::Addon - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcaddon_Addon_methods[] = { - {"getLocalizedString", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_getLocalizedString, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSetting", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_getSetting, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSettingBool", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_getSettingBool, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSettingInt", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_getSettingInt, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSettingNumber", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_getSettingNumber, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSettingString", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_getSettingString, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setSetting", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_setSetting, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setSettingBool", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_setSettingBool, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setSettingInt", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_setSettingInt, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setSettingNumber", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_setSettingNumber, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setSettingString", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_setSettingString, METH_VARARGS|METH_KEYWORDS, NULL }, - {"openSettings", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_openSettings, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAddonInfo", (PyCFunction)xbmcaddon_XBMCAddon_xbmcaddon_Addon_getAddonInfo, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcaddon_Addon_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcaddon_Addon_Type.pythonType; - pythonType.tp_name = "xbmcaddon.Addon"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcaddon_XBMCAddon_xbmcaddon_Addon_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcaddon_Addon_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcaddon_XBMCAddon_xbmcaddon_Addon_New; - - TyXBMCAddon_xbmcaddon_Addon_Type.swigType="p.XBMCAddon::xbmcaddon::Addon"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcaddon_Addon_Type); - - } - //========================================================================= - - - static PyMethodDef xbmcaddon_methods[] = { - {NULL, NULL, 0, NULL} - }; - - // This is the call that will call all of the other initializes - // for all of the classes in this module - static void initTypes() - { - static bool typesAlreadyInitialized = false; - if (!typesAlreadyInitialized) - { - typesAlreadyInitialized = true; - - initPyXBMCAddon_xbmcaddon_Addon_Type(); - if (PyType_Ready(&(TyXBMCAddon_xbmcaddon_Addon_Type.pythonType)) < 0) - return; - } - } - - void initModule_xbmcaddon() - { - initTypes(); - - // init general xbmcaddon modules - PyObject* module; - - - Py_INCREF(&(TyXBMCAddon_xbmcaddon_Addon_Type.pythonType)); - - module = Py_InitModule("xbmcaddon", xbmcaddon_methods); - if (module == NULL) return; - - - PyModule_AddObject(module, "Addon", (PyObject*)(&(TyXBMCAddon_xbmcaddon_Addon_Type.pythonType))); - - // constants - PyModule_AddStringConstant(module, "__author__", "Team Kodi "); - PyModule_AddStringConstant(module, "__date__", "Sun Sep 01 10:46:50 GMT 2019"); - PyModule_AddStringConstant(module, "__version__", "2.26.0"); - PyModule_AddStringConstant(module, "__credits__", "Team Kodi"); - PyModule_AddStringConstant(module, "__platform__", "ALL"); - - // need to handle constants - - } - -} // end PythonBindings namespace for python type definitions - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcaddon.i.xml b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcaddon.i.xml deleted file mode 100644 index a6cd368b8a..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcaddon.i.xml +++ /dev/null @@ -1,1237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcdrm.i.cpp b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcdrm.i.cpp deleted file mode 100644 index 096ebdfda7..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcdrm.i.cpp +++ /dev/null @@ -1,1075 +0,0 @@ - - -/* - * Copyright (C) 2005-2018 Team Kodi - * This file is part of Kodi - https://kodi.tv - * - * SPDX-License-Identifier: GPL-2.0-or-later - * See LICENSES/README.md for more information. - */ - -// ************************************************************************ -// This file was generated by xbmc compile process. DO NOT EDIT!! -// It was created by running the code generator on the spec file for -// the module "xbmcdrm" on the template file PythonSwig.template.cpp -// ************************************************************************ - - - -#include -#include -#include "interfaces/python/LanguageHook.h" -#include "interfaces/python/swig.h" -#include "interfaces/python/PyContext.h" - - -#if defined(TARGET_WINDOWS) -# include -#endif - -#include "interfaces/legacy/DrmCryptoSession.h" -#include "utils/log.h" - -using namespace XBMCAddon; -using namespace xbmcdrm; - -#if defined(__GNUG__) -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif - - - -namespace PythonBindings -{ - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcdrm::CryptoSession - TypeInfo TyXBMCAddon_xbmcdrm_CryptoSession_Type(typeid(XBMCAddon::xbmcdrm::CryptoSession)); - //========================================================================= - - - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "UUID", - "cipherAlgorithm", - "macAlgorithm", - NULL}; - - std::string UUID ; - PyObject* pyUUID = NULL; - std::string cipherAlgorithm ; - PyObject* pycipherAlgorithm = NULL; - std::string macAlgorithm ; - PyObject* pymacAlgorithm = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OOO", - const_cast(keywords), - &pyUUID, - &pycipherAlgorithm, - &pymacAlgorithm - )) - { - return NULL; - } - - XBMCAddon::xbmcdrm::CryptoSession * apiResult; - try - { - if (pyUUID) PyXBMCGetUnicodeString(UUID,pyUUID,false,"UUID","CryptoSession"); - if (pycipherAlgorithm) PyXBMCGetUnicodeString(cipherAlgorithm,pycipherAlgorithm,false,"cipherAlgorithm","CryptoSession"); - if (pymacAlgorithm) PyXBMCGetUnicodeString(macAlgorithm,pymacAlgorithm,false,"macAlgorithm","CryptoSession"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcdrm::CryptoSession( UUID, cipherAlgorithm, macAlgorithm ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcdrm::CryptoSession\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcdrm::CryptoSession\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_GetKeyRequest (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "init", - "mimeType", - "offlineKey", - "optionalParameters", - NULL}; - - XbmcCommons::Buffer init ; - PyObject* pyinit = NULL; - std::string mimeType ; - PyObject* pymimeType = NULL; - bool offlineKey ; - std::map< XBMCAddon::String ,XBMCAddon::String > optionalParameters ; - PyObject* pyoptionalParameters = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OObO", - const_cast(keywords), - &pyinit, - &pymimeType, - &offlineKey, - &pyoptionalParameters - )) - { - return NULL; - } - - XbmcCommons::Buffer apiResult; - try - { - - if (PyString_Check(pyinit)) - { - const char* str = PyString_AsString(pyinit); - size_t size = (size_t)PyString_Size(pyinit); - init.allocate(size); - init.put(str,size); - init.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pyinit)) - { - size_t size = PyByteArray_Size(pyinit); - init.allocate(size); - init.put(PyByteArray_AsString(pyinit),size); - init.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "init", "GetKeyRequest"); - if (pymimeType) PyXBMCGetUnicodeString(mimeType,pymimeType,false,"mimeType","GetKeyRequest"); - - { - PyObject *pykey, *pyvalue; - Py_ssize_t pos = 0; - while(PyDict_Next(pyoptionalParameters, &pos, &pykey, &pyvalue)) - { - std::string key; - std::string value; - if (pykey) PyXBMCGetUnicodeString(key,pykey,false,"key","GetKeyRequest"); - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,false,"value","GetKeyRequest"); - optionalParameters[key] = value; - } - } - - apiResult = ((XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"GetKeyRequest","XBMCAddon::xbmcdrm::CryptoSession"))-> GetKeyRequest( init, mimeType, offlineKey, optionalParameters ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"GetKeyRequest\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"GetKeyRequest\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyByteArray_FromStringAndSize((char*)apiResult.curPosition(),apiResult.remaining()); - - return result; - } - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_GetPropertyString (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "name", - NULL}; - - std::string name ; - PyObject* pyname = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyname - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - if (pyname) PyXBMCGetUnicodeString(name,pyname,false,"name","GetPropertyString"); - - apiResult = ((XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"GetPropertyString","XBMCAddon::xbmcdrm::CryptoSession"))-> GetPropertyString( name ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"GetPropertyString\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"GetPropertyString\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_ProvideKeyResponse (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "response", - NULL}; - - XbmcCommons::Buffer response ; - PyObject* pyresponse = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyresponse - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - if (PyString_Check(pyresponse)) - { - const char* str = PyString_AsString(pyresponse); - size_t size = (size_t)PyString_Size(pyresponse); - response.allocate(size); - response.put(str,size); - response.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pyresponse)) - { - size_t size = PyByteArray_Size(pyresponse); - response.allocate(size); - response.put(PyByteArray_AsString(pyresponse),size); - response.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "response", "ProvideKeyResponse"); - - apiResult = ((XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"ProvideKeyResponse","XBMCAddon::xbmcdrm::CryptoSession"))-> ProvideKeyResponse( response ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"ProvideKeyResponse\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"ProvideKeyResponse\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_RemoveKeys (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"RemoveKeys","XBMCAddon::xbmcdrm::CryptoSession"))-> RemoveKeys( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"RemoveKeys\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"RemoveKeys\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_RestoreKeys (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "keySetId", - NULL}; - - std::string keySetId ; - PyObject* pykeySetId = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pykeySetId - )) - { - return NULL; - } - - - try - { - if (pykeySetId) PyXBMCGetUnicodeString(keySetId,pykeySetId,false,"keySetId","RestoreKeys"); - - ((XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"RestoreKeys","XBMCAddon::xbmcdrm::CryptoSession"))-> RestoreKeys( keySetId ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"RestoreKeys\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"RestoreKeys\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_SetPropertyString (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "name", - "value", - NULL}; - - std::string name ; - PyObject* pyname = NULL; - std::string value ; - PyObject* pyvalue = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO", - const_cast(keywords), - &pyname, - &pyvalue - )) - { - return NULL; - } - - - try - { - if (pyname) PyXBMCGetUnicodeString(name,pyname,false,"name","SetPropertyString"); - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,false,"value","SetPropertyString"); - - ((XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"SetPropertyString","XBMCAddon::xbmcdrm::CryptoSession"))-> SetPropertyString( name, value ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"SetPropertyString\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"SetPropertyString\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_Decrypt (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "cipherKeyId", - "input", - "iv", - NULL}; - - XbmcCommons::Buffer cipherKeyId ; - PyObject* pycipherKeyId = NULL; - XbmcCommons::Buffer input ; - PyObject* pyinput = NULL; - XbmcCommons::Buffer iv ; - PyObject* pyiv = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OOO", - const_cast(keywords), - &pycipherKeyId, - &pyinput, - &pyiv - )) - { - return NULL; - } - - XbmcCommons::Buffer apiResult; - try - { - - if (PyString_Check(pycipherKeyId)) - { - const char* str = PyString_AsString(pycipherKeyId); - size_t size = (size_t)PyString_Size(pycipherKeyId); - cipherKeyId.allocate(size); - cipherKeyId.put(str,size); - cipherKeyId.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pycipherKeyId)) - { - size_t size = PyByteArray_Size(pycipherKeyId); - cipherKeyId.allocate(size); - cipherKeyId.put(PyByteArray_AsString(pycipherKeyId),size); - cipherKeyId.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "cipherKeyId", "Decrypt"); - - if (PyString_Check(pyinput)) - { - const char* str = PyString_AsString(pyinput); - size_t size = (size_t)PyString_Size(pyinput); - input.allocate(size); - input.put(str,size); - input.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pyinput)) - { - size_t size = PyByteArray_Size(pyinput); - input.allocate(size); - input.put(PyByteArray_AsString(pyinput),size); - input.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "input", "Decrypt"); - - if (PyString_Check(pyiv)) - { - const char* str = PyString_AsString(pyiv); - size_t size = (size_t)PyString_Size(pyiv); - iv.allocate(size); - iv.put(str,size); - iv.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pyiv)) - { - size_t size = PyByteArray_Size(pyiv); - iv.allocate(size); - iv.put(PyByteArray_AsString(pyiv),size); - iv.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "iv", "Decrypt"); - - apiResult = ((XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"Decrypt","XBMCAddon::xbmcdrm::CryptoSession"))-> Decrypt( cipherKeyId, input, iv ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"Decrypt\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"Decrypt\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyByteArray_FromStringAndSize((char*)apiResult.curPosition(),apiResult.remaining()); - - return result; - } - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_Encrypt (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "cipherKeyId", - "input", - "iv", - NULL}; - - XbmcCommons::Buffer cipherKeyId ; - PyObject* pycipherKeyId = NULL; - XbmcCommons::Buffer input ; - PyObject* pyinput = NULL; - XbmcCommons::Buffer iv ; - PyObject* pyiv = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OOO", - const_cast(keywords), - &pycipherKeyId, - &pyinput, - &pyiv - )) - { - return NULL; - } - - XbmcCommons::Buffer apiResult; - try - { - - if (PyString_Check(pycipherKeyId)) - { - const char* str = PyString_AsString(pycipherKeyId); - size_t size = (size_t)PyString_Size(pycipherKeyId); - cipherKeyId.allocate(size); - cipherKeyId.put(str,size); - cipherKeyId.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pycipherKeyId)) - { - size_t size = PyByteArray_Size(pycipherKeyId); - cipherKeyId.allocate(size); - cipherKeyId.put(PyByteArray_AsString(pycipherKeyId),size); - cipherKeyId.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "cipherKeyId", "Encrypt"); - - if (PyString_Check(pyinput)) - { - const char* str = PyString_AsString(pyinput); - size_t size = (size_t)PyString_Size(pyinput); - input.allocate(size); - input.put(str,size); - input.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pyinput)) - { - size_t size = PyByteArray_Size(pyinput); - input.allocate(size); - input.put(PyByteArray_AsString(pyinput),size); - input.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "input", "Encrypt"); - - if (PyString_Check(pyiv)) - { - const char* str = PyString_AsString(pyiv); - size_t size = (size_t)PyString_Size(pyiv); - iv.allocate(size); - iv.put(str,size); - iv.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pyiv)) - { - size_t size = PyByteArray_Size(pyiv); - iv.allocate(size); - iv.put(PyByteArray_AsString(pyiv),size); - iv.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "iv", "Encrypt"); - - apiResult = ((XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"Encrypt","XBMCAddon::xbmcdrm::CryptoSession"))-> Encrypt( cipherKeyId, input, iv ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"Encrypt\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"Encrypt\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyByteArray_FromStringAndSize((char*)apiResult.curPosition(),apiResult.remaining()); - - return result; - } - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_Sign (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "macKeyId", - "message", - NULL}; - - XbmcCommons::Buffer macKeyId ; - PyObject* pymacKeyId = NULL; - XbmcCommons::Buffer message ; - PyObject* pymessage = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO", - const_cast(keywords), - &pymacKeyId, - &pymessage - )) - { - return NULL; - } - - XbmcCommons::Buffer apiResult; - try - { - - if (PyString_Check(pymacKeyId)) - { - const char* str = PyString_AsString(pymacKeyId); - size_t size = (size_t)PyString_Size(pymacKeyId); - macKeyId.allocate(size); - macKeyId.put(str,size); - macKeyId.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pymacKeyId)) - { - size_t size = PyByteArray_Size(pymacKeyId); - macKeyId.allocate(size); - macKeyId.put(PyByteArray_AsString(pymacKeyId),size); - macKeyId.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "macKeyId", "Sign"); - - if (PyString_Check(pymessage)) - { - const char* str = PyString_AsString(pymessage); - size_t size = (size_t)PyString_Size(pymessage); - message.allocate(size); - message.put(str,size); - message.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pymessage)) - { - size_t size = PyByteArray_Size(pymessage); - message.allocate(size); - message.put(PyByteArray_AsString(pymessage),size); - message.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "message", "Sign"); - - apiResult = ((XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"Sign","XBMCAddon::xbmcdrm::CryptoSession"))-> Sign( macKeyId, message ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"Sign\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"Sign\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyByteArray_FromStringAndSize((char*)apiResult.curPosition(),apiResult.remaining()); - - return result; - } - - static PyObject* xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_Verify (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "macKeyId", - "message", - "signature", - NULL}; - - XbmcCommons::Buffer macKeyId ; - PyObject* pymacKeyId = NULL; - XbmcCommons::Buffer message ; - PyObject* pymessage = NULL; - XbmcCommons::Buffer signature ; - PyObject* pysignature = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OOO", - const_cast(keywords), - &pymacKeyId, - &pymessage, - &pysignature - )) - { - return NULL; - } - - bool apiResult; - try - { - - if (PyString_Check(pymacKeyId)) - { - const char* str = PyString_AsString(pymacKeyId); - size_t size = (size_t)PyString_Size(pymacKeyId); - macKeyId.allocate(size); - macKeyId.put(str,size); - macKeyId.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pymacKeyId)) - { - size_t size = PyByteArray_Size(pymacKeyId); - macKeyId.allocate(size); - macKeyId.put(PyByteArray_AsString(pymacKeyId),size); - macKeyId.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "macKeyId", "Verify"); - - if (PyString_Check(pymessage)) - { - const char* str = PyString_AsString(pymessage); - size_t size = (size_t)PyString_Size(pymessage); - message.allocate(size); - message.put(str,size); - message.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pymessage)) - { - size_t size = PyByteArray_Size(pymessage); - message.allocate(size); - message.put(PyByteArray_AsString(pymessage),size); - message.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "message", "Verify"); - - if (PyString_Check(pysignature)) - { - const char* str = PyString_AsString(pysignature); - size_t size = (size_t)PyString_Size(pysignature); - signature.allocate(size); - signature.put(str,size); - signature.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pysignature)) - { - size_t size = PyByteArray_Size(pysignature); - signature.allocate(size); - signature.put(PyByteArray_AsString(pysignature),size); - signature.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "signature", "Verify"); - - apiResult = ((XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"Verify","XBMCAddon::xbmcdrm::CryptoSession"))-> Verify( macKeyId, message, signature ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"Verify\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"Verify\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static void xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcdrm::CryptoSession* theObj = (XBMCAddon::xbmcdrm::CryptoSession*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcdrm_CryptoSession_Type,"~XBMCAddon::xbmcdrm::CryptoSession","XBMCAddon::xbmcdrm::CryptoSession"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcdrm::CryptoSession\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcdrm::CryptoSession\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcdrm::CryptoSession - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcdrm_CryptoSession_methods[] = { - {"GetKeyRequest", (PyCFunction)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_GetKeyRequest, METH_VARARGS|METH_KEYWORDS, NULL }, - {"GetPropertyString", (PyCFunction)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_GetPropertyString, METH_VARARGS|METH_KEYWORDS, NULL }, - {"ProvideKeyResponse", (PyCFunction)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_ProvideKeyResponse, METH_VARARGS|METH_KEYWORDS, NULL }, - {"RemoveKeys", (PyCFunction)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_RemoveKeys, METH_VARARGS|METH_KEYWORDS, NULL }, - {"RestoreKeys", (PyCFunction)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_RestoreKeys, METH_VARARGS|METH_KEYWORDS, NULL }, - {"SetPropertyString", (PyCFunction)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_SetPropertyString, METH_VARARGS|METH_KEYWORDS, NULL }, - {"Decrypt", (PyCFunction)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_Decrypt, METH_VARARGS|METH_KEYWORDS, NULL }, - {"Encrypt", (PyCFunction)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_Encrypt, METH_VARARGS|METH_KEYWORDS, NULL }, - {"Sign", (PyCFunction)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_Sign, METH_VARARGS|METH_KEYWORDS, NULL }, - {"Verify", (PyCFunction)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_Verify, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcdrm_CryptoSession_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcdrm_CryptoSession_Type.pythonType; - pythonType.tp_name = "xbmcdrm.CryptoSession"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcdrm_CryptoSession_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcdrm_XBMCAddon_xbmcdrm_CryptoSession_New; - - TyXBMCAddon_xbmcdrm_CryptoSession_Type.swigType="p.XBMCAddon::xbmcdrm::CryptoSession"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcdrm_CryptoSession_Type); - - } - //========================================================================= - - - static PyMethodDef xbmcdrm_methods[] = { - {NULL, NULL, 0, NULL} - }; - - // This is the call that will call all of the other initializes - // for all of the classes in this module - static void initTypes() - { - static bool typesAlreadyInitialized = false; - if (!typesAlreadyInitialized) - { - typesAlreadyInitialized = true; - - initPyXBMCAddon_xbmcdrm_CryptoSession_Type(); - if (PyType_Ready(&(TyXBMCAddon_xbmcdrm_CryptoSession_Type.pythonType)) < 0) - return; - } - } - - void initModule_xbmcdrm() - { - initTypes(); - - // init general xbmcdrm modules - PyObject* module; - - - Py_INCREF(&(TyXBMCAddon_xbmcdrm_CryptoSession_Type.pythonType)); - - module = Py_InitModule("xbmcdrm", xbmcdrm_methods); - if (module == NULL) return; - - - PyModule_AddObject(module, "CryptoSession", (PyObject*)(&(TyXBMCAddon_xbmcdrm_CryptoSession_Type.pythonType))); - - // constants - PyModule_AddStringConstant(module, "__author__", "Team Kodi "); - PyModule_AddStringConstant(module, "__date__", "Sun Sep 01 10:46:53 GMT 2019"); - PyModule_AddStringConstant(module, "__version__", "2.26.0"); - PyModule_AddStringConstant(module, "__credits__", "Team Kodi"); - PyModule_AddStringConstant(module, "__platform__", "ALL"); - - // need to handle constants - - } - -} // end PythonBindings namespace for python type definitions - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcdrm.i.xml b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcdrm.i.xml deleted file mode 100644 index 2683d3c06b..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcdrm.i.xml +++ /dev/null @@ -1,1241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcgui.i.cpp b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcgui.i.cpp deleted file mode 100644 index fbee7dfdb3..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcgui.i.cpp +++ /dev/null @@ -1,14128 +0,0 @@ - - -/* - * Copyright (C) 2005-2018 Team Kodi - * This file is part of Kodi - https://kodi.tv - * - * SPDX-License-Identifier: GPL-2.0-or-later - * See LICENSES/README.md for more information. - */ - -// ************************************************************************ -// This file was generated by xbmc compile process. DO NOT EDIT!! -// It was created by running the code generator on the spec file for -// the module "xbmcgui" on the template file PythonSwig.template.cpp -// ************************************************************************ - - - -#include -#include -#include "interfaces/python/LanguageHook.h" -#include "interfaces/python/swig.h" -#include "interfaces/python/PyContext.h" - - -#if defined(TARGET_WINDOWS) -# include -#endif - -#include "interfaces/legacy/Dialog.h" -#include "interfaces/legacy/ModuleXbmcgui.h" -#include "interfaces/legacy/Control.h" -#include "interfaces/legacy/Window.h" -#include "interfaces/legacy/WindowDialog.h" -#include "interfaces/legacy/Dialog.h" -#include "interfaces/legacy/WindowXML.h" -#include "input/actions/ActionIDs.h" -#include "input/Key.h" - -using namespace XBMCAddon; -using namespace xbmcgui; - -#if defined(__GNUG__) -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif - - - -namespace PythonBindings -{ - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ListItem - TypeInfo TyXBMCAddon_xbmcgui_ListItem_Type(typeid(XBMCAddon::xbmcgui::ListItem)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::Control - TypeInfo TyXBMCAddon_xbmcgui_Control_Type(typeid(XBMCAddon::xbmcgui::Control)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlSpin - TypeInfo TyXBMCAddon_xbmcgui_ControlSpin_Type(typeid(XBMCAddon::xbmcgui::ControlSpin)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlLabel - TypeInfo TyXBMCAddon_xbmcgui_ControlLabel_Type(typeid(XBMCAddon::xbmcgui::ControlLabel)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlEdit - TypeInfo TyXBMCAddon_xbmcgui_ControlEdit_Type(typeid(XBMCAddon::xbmcgui::ControlEdit)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlList - TypeInfo TyXBMCAddon_xbmcgui_ControlList_Type(typeid(XBMCAddon::xbmcgui::ControlList)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlFadeLabel - TypeInfo TyXBMCAddon_xbmcgui_ControlFadeLabel_Type(typeid(XBMCAddon::xbmcgui::ControlFadeLabel)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlTextBox - TypeInfo TyXBMCAddon_xbmcgui_ControlTextBox_Type(typeid(XBMCAddon::xbmcgui::ControlTextBox)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlImage - TypeInfo TyXBMCAddon_xbmcgui_ControlImage_Type(typeid(XBMCAddon::xbmcgui::ControlImage)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlProgress - TypeInfo TyXBMCAddon_xbmcgui_ControlProgress_Type(typeid(XBMCAddon::xbmcgui::ControlProgress)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlButton - TypeInfo TyXBMCAddon_xbmcgui_ControlButton_Type(typeid(XBMCAddon::xbmcgui::ControlButton)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlGroup - TypeInfo TyXBMCAddon_xbmcgui_ControlGroup_Type(typeid(XBMCAddon::xbmcgui::ControlGroup)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlRadioButton - TypeInfo TyXBMCAddon_xbmcgui_ControlRadioButton_Type(typeid(XBMCAddon::xbmcgui::ControlRadioButton)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::ControlSlider - TypeInfo TyXBMCAddon_xbmcgui_ControlSlider_Type(typeid(XBMCAddon::xbmcgui::ControlSlider)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::Dialog - TypeInfo TyXBMCAddon_xbmcgui_Dialog_Type(typeid(XBMCAddon::xbmcgui::Dialog)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::DialogProgress - TypeInfo TyXBMCAddon_xbmcgui_DialogProgress_Type(typeid(XBMCAddon::xbmcgui::DialogProgress)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::DialogBusy - TypeInfo TyXBMCAddon_xbmcgui_DialogBusy_Type(typeid(XBMCAddon::xbmcgui::DialogBusy)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::DialogProgressBG - TypeInfo TyXBMCAddon_xbmcgui_DialogProgressBG_Type(typeid(XBMCAddon::xbmcgui::DialogProgressBG)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::Action - TypeInfo TyXBMCAddon_xbmcgui_Action_Type(typeid(XBMCAddon::xbmcgui::Action)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::Window - TypeInfo TyXBMCAddon_xbmcgui_Window_Type(typeid(XBMCAddon::xbmcgui::Window)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::WindowDialog - TypeInfo TyXBMCAddon_xbmcgui_WindowDialog_Type(typeid(XBMCAddon::xbmcgui::WindowDialog)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::WindowXML - TypeInfo TyXBMCAddon_xbmcgui_WindowXML_Type(typeid(XBMCAddon::xbmcgui::WindowXML)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcgui::WindowXMLDialog - TypeInfo TyXBMCAddon_xbmcgui_WindowXMLDialog_Type(typeid(XBMCAddon::xbmcgui::WindowXMLDialog)); - //========================================================================= - - //========================================================================= - // These variables define the type XBMCAddon::xbmc::InfoTagVideo from another module - extern TypeInfo TyXBMCAddon_xbmc_InfoTagVideo_Type; - //========================================================================= - - //========================================================================= - // These variables define the type xbmc::InfoTagMusic from another module - extern TypeInfo Tyxbmc_InfoTagMusic_Type; - //========================================================================= - - - - //========================================================================= - // This class is the Director for XBMCAddon::xbmcgui::Window. - // It provides the "reverse bridge" from C++ to Python to support - // cross-language polymorphism. - //========================================================================= - class XBMCAddon_xbmcgui_Window_Director : public Director, public XBMCAddon::xbmcgui::Window - { - public: - - inline XBMCAddon_xbmcgui_Window_Director(int existingWindowId ) : XBMCAddon::xbmcgui::Window( existingWindowId ) { } - - virtual void onAction( XBMCAddon::xbmcgui::Action * action ) - { - PyObject* pyaction = NULL; - pyaction = makePythonInstance(action,true); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onAction"),const_cast("(O)"), pyaction ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onControl( XBMCAddon::xbmcgui::Control * control ) - { - PyObject* pycontrol = NULL; - pycontrol = makePythonInstance(control,true); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onControl"),const_cast("(O)"), pycontrol ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onClick( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onClick"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onDoubleClick( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onDoubleClick"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onFocus( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onFocus"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onInit( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onInit"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - }; - - //========================================================================= - // This class is the Director for XBMCAddon::xbmcgui::WindowDialog. - // It provides the "reverse bridge" from C++ to Python to support - // cross-language polymorphism. - //========================================================================= - class XBMCAddon_xbmcgui_WindowDialog_Director : public Director, public XBMCAddon::xbmcgui::WindowDialog - { - public: - - inline XBMCAddon_xbmcgui_WindowDialog_Director() : XBMCAddon::xbmcgui::WindowDialog() { } - - virtual void onAction( XBMCAddon::xbmcgui::Action * action ) - { - PyObject* pyaction = NULL; - pyaction = makePythonInstance(action,true); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onAction"),const_cast("(O)"), pyaction ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onControl( XBMCAddon::xbmcgui::Control * control ) - { - PyObject* pycontrol = NULL; - pycontrol = makePythonInstance(control,true); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onControl"),const_cast("(O)"), pycontrol ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onClick( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onClick"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onDoubleClick( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onDoubleClick"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onFocus( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onFocus"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onInit( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onInit"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - }; - - //========================================================================= - // This class is the Director for XBMCAddon::xbmcgui::WindowXML. - // It provides the "reverse bridge" from C++ to Python to support - // cross-language polymorphism. - //========================================================================= - class XBMCAddon_xbmcgui_WindowXML_Director : public Director, public XBMCAddon::xbmcgui::WindowXML - { - public: - - inline XBMCAddon_xbmcgui_WindowXML_Director(XBMCAddon::String const & xmlFilename, XBMCAddon::String const & scriptPath, XBMCAddon::String const & defaultSkin, XBMCAddon::String const & defaultRes, bool isMedia ) : XBMCAddon::xbmcgui::WindowXML( xmlFilename, scriptPath, defaultSkin, defaultRes, isMedia ) { } - - virtual void onAction( XBMCAddon::xbmcgui::Action * action ) - { - PyObject* pyaction = NULL; - pyaction = makePythonInstance(action,true); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onAction"),const_cast("(O)"), pyaction ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onControl( XBMCAddon::xbmcgui::Control * control ) - { - PyObject* pycontrol = NULL; - pycontrol = makePythonInstance(control,true); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onControl"),const_cast("(O)"), pycontrol ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onClick( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onClick"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onDoubleClick( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onDoubleClick"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onFocus( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onFocus"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onInit( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onInit"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - }; - - //========================================================================= - // This class is the Director for XBMCAddon::xbmcgui::WindowXMLDialog. - // It provides the "reverse bridge" from C++ to Python to support - // cross-language polymorphism. - //========================================================================= - class XBMCAddon_xbmcgui_WindowXMLDialog_Director : public Director, public XBMCAddon::xbmcgui::WindowXMLDialog - { - public: - - inline XBMCAddon_xbmcgui_WindowXMLDialog_Director(XBMCAddon::String const & xmlFilename, XBMCAddon::String const & scriptPath, XBMCAddon::String const & defaultSkin, XBMCAddon::String const & defaultRes ) : XBMCAddon::xbmcgui::WindowXMLDialog( xmlFilename, scriptPath, defaultSkin, defaultRes ) { } - - virtual void onAction( XBMCAddon::xbmcgui::Action * action ) - { - PyObject* pyaction = NULL; - pyaction = makePythonInstance(action,true); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onAction"),const_cast("(O)"), pyaction ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onControl( XBMCAddon::xbmcgui::Control * control ) - { - PyObject* pycontrol = NULL; - pycontrol = makePythonInstance(control,true); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onControl"),const_cast("(O)"), pycontrol ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onClick( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onClick"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onDoubleClick( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onDoubleClick"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onFocus( int controlId ) - { - PyObject* pycontrolId = NULL; - pycontrolId = Py_BuildValue("i", controlId); - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onFocus"),const_cast("(O)"), pycontrolId ); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - virtual void onInit( ) - { - XBMCAddon::Python::PyContext pyContext; - //! @bug libpython < 3.4 isn't const correct - PyObject_CallMethod(self,const_cast("onInit"),const_cast("()")); - if (PyErr_Occurred()) - throw PythonBindings::PythonToCppException(); - } - - }; - - static PyObject* xbmcgui_getCurrentWindowId (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcgui::getCurrentWindowId( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::getCurrentWindowId\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::getCurrentWindowId\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_getCurrentWindowDialogId (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcgui::getCurrentWindowDialogId( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::getCurrentWindowDialogId\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::getCurrentWindowDialogId\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_getScreenHeight (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcgui::getScreenHeight( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::getScreenHeight\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::getScreenHeight\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_getScreenWidth (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcgui::getScreenWidth( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::getScreenWidth\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::getScreenWidth\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "label", - "label2", - "iconImage", - "thumbnailImage", - "path", - "offscreen", - NULL}; - - std::string label = XBMCAddon::emptyString; - PyObject* pylabel = NULL; - std::string label2 = XBMCAddon::emptyString; - PyObject* pylabel2 = NULL; - std::string iconImage = XBMCAddon::emptyString; - PyObject* pyiconImage = NULL; - std::string thumbnailImage = XBMCAddon::emptyString; - PyObject* pythumbnailImage = NULL; - std::string path = XBMCAddon::emptyString; - PyObject* pypath = NULL; - bool offscreen = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|OOOOOb", - const_cast(keywords), - &pylabel, - &pylabel2, - &pyiconImage, - &pythumbnailImage, - &pypath, - &offscreen - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ListItem * apiResult; - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","ListItem"); - if (pylabel2) PyXBMCGetUnicodeString(label2,pylabel2,false,"label2","ListItem"); - if (pyiconImage) PyXBMCGetUnicodeString(iconImage,pyiconImage,false,"iconImage","ListItem"); - if (pythumbnailImage) PyXBMCGetUnicodeString(thumbnailImage,pythumbnailImage,false,"thumbnailImage","ListItem"); - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","ListItem"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ListItem( label, label2, iconImage, thumbnailImage, path, offscreen ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ListItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ListItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getLabel (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getLabel","XBMCAddon::xbmcgui::ListItem"))-> getLabel( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getLabel2 (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getLabel2","XBMCAddon::xbmcgui::ListItem"))-> getLabel2( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getLabel2\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getLabel2\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setLabel (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "label", - NULL}; - - std::string label ; - PyObject* pylabel = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pylabel - )) - { - return NULL; - } - - - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","setLabel"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setLabel","XBMCAddon::xbmcgui::ListItem"))-> setLabel( label ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setLabel2 (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "label", - NULL}; - - std::string label ; - PyObject* pylabel = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pylabel - )) - { - return NULL; - } - - - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","setLabel2"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setLabel2","XBMCAddon::xbmcgui::ListItem"))-> setLabel2( label ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setLabel2\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setLabel2\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setIconImage (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "iconImage", - NULL}; - - std::string iconImage ; - PyObject* pyiconImage = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyiconImage - )) - { - return NULL; - } - - - try - { - if (pyiconImage) PyXBMCGetUnicodeString(iconImage,pyiconImage,false,"iconImage","setIconImage"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setIconImage","XBMCAddon::xbmcgui::ListItem"))-> setIconImage( iconImage ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setIconImage\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setIconImage\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setThumbnailImage (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "thumbFilename", - NULL}; - - std::string thumbFilename ; - PyObject* pythumbFilename = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pythumbFilename - )) - { - return NULL; - } - - - try - { - if (pythumbFilename) PyXBMCGetUnicodeString(thumbFilename,pythumbFilename,false,"thumbFilename","setThumbnailImage"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setThumbnailImage","XBMCAddon::xbmcgui::ListItem"))-> setThumbnailImage( thumbFilename ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setThumbnailImage\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setThumbnailImage\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setArt (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "dictionary", - NULL}; - - XBMCAddon::Dictionary< XBMCAddon::StringOrInt > dictionary ; - PyObject* pydictionary = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pydictionary - )) - { - return NULL; - } - - - try - { - - { - PyObject *pykey, *pyvalue; - Py_ssize_t pos = 0; - while(PyDict_Next(pydictionary, &pos, &pykey, &pyvalue)) - { - std::string key; - PyXBMCGetUnicodeString(key,pykey,false,"dictionary","setArt"); - std::string value; - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,PyInt_Check(pyvalue) || PyLong_Check(pyvalue) || PyFloat_Check(pyvalue),"value","setArt"); - dictionary[key] = value; - } - } - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setArt","XBMCAddon::xbmcgui::ListItem"))-> setArt( dictionary ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setArt\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setArt\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setIsFolder (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "isFolder", - NULL}; - - bool isFolder ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "b", - const_cast(keywords), - &isFolder - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setIsFolder","XBMCAddon::xbmcgui::ListItem"))-> setIsFolder( isFolder ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setIsFolder\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setIsFolder\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setUniqueIDs (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "dictionary", - "defaultrating", - NULL}; - - XBMCAddon::Dictionary< XBMCAddon::StringOrInt > dictionary ; - PyObject* pydictionary = NULL; - std::string defaultrating = ""; - PyObject* pydefaultrating = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|O", - const_cast(keywords), - &pydictionary, - &pydefaultrating - )) - { - return NULL; - } - - - try - { - - { - PyObject *pykey, *pyvalue; - Py_ssize_t pos = 0; - while(PyDict_Next(pydictionary, &pos, &pykey, &pyvalue)) - { - std::string key; - PyXBMCGetUnicodeString(key,pykey,false,"dictionary","setUniqueIDs"); - std::string value; - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,PyInt_Check(pyvalue) || PyLong_Check(pyvalue) || PyFloat_Check(pyvalue),"value","setUniqueIDs"); - dictionary[key] = value; - } - } - if (pydefaultrating) PyXBMCGetUnicodeString(defaultrating,pydefaultrating,false,"defaultrating","setUniqueIDs"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setUniqueIDs","XBMCAddon::xbmcgui::ListItem"))-> setUniqueIDs( dictionary, defaultrating ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setUniqueIDs\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setUniqueIDs\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setRating (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "type", - "rating", - "votes", - "defaultt", - NULL}; - - std::string type ; - PyObject* pytype = NULL; - float rating ; - int votes = 0; - bool defaultt = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "Of|ib", - const_cast(keywords), - &pytype, - &rating, - &votes, - &defaultt - )) - { - return NULL; - } - - - try - { - if (pytype) PyXBMCGetUnicodeString(type,pytype,false,"type","setRating"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setRating","XBMCAddon::xbmcgui::ListItem"))-> setRating( type, rating, votes, defaultt ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setRating\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setRating\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_addSeason (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "number", - "name", - NULL}; - - int number ; - std::string name = ""; - PyObject* pyname = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i|O", - const_cast(keywords), - &number, - &pyname - )) - { - return NULL; - } - - - try - { - if (pyname) PyXBMCGetUnicodeString(name,pyname,false,"name","addSeason"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"addSeason","XBMCAddon::xbmcgui::ListItem"))-> addSeason( number, name ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addSeason\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addSeason\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getArt (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "key", - NULL}; - - char * key = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &key - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getArt","XBMCAddon::xbmcgui::ListItem"))-> getArt( key ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getArt\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getArt\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getUniqueID (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "key", - NULL}; - - char * key = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &key - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getUniqueID","XBMCAddon::xbmcgui::ListItem"))-> getUniqueID( key ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getUniqueID\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getUniqueID\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getRating (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "key", - NULL}; - - char * key = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &key - )) - { - return NULL; - } - - float apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getRating","XBMCAddon::xbmcgui::ListItem"))-> getRating( key ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getRating\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getRating\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("f", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getVotes (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "key", - NULL}; - - char * key = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &key - )) - { - return NULL; - } - - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getVotes","XBMCAddon::xbmcgui::ListItem"))-> getVotes( key ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getVotes\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getVotes\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_select (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "selected", - NULL}; - - bool selected ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "b", - const_cast(keywords), - &selected - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"select","XBMCAddon::xbmcgui::ListItem"))-> select( selected ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"select\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"select\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_isSelected (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"isSelected","XBMCAddon::xbmcgui::ListItem"))-> isSelected( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"isSelected\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"isSelected\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setInfo (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "type", - "infoLabels", - NULL}; - - char * type = nullptr; - XBMCAddon::Dictionary< XBMCAddon::xbmcgui::InfoLabelValue > infoLabels ; - PyObject* pyinfoLabels = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "sO", - const_cast(keywords), - &type, - &pyinfoLabels - )) - { - return NULL; - } - - - try - { - - { - PyObject *pykey, *pyvalue; - Py_ssize_t pos = 0; - while(PyDict_Next(pyinfoLabels, &pos, &pykey, &pyvalue)) - { - std::string key; - PyXBMCGetUnicodeString(key,pykey,false,"infoLabels","setInfo"); - Alternative< XBMCAddon::StringOrInt ,std::vector< XBMCAddon::xbmcgui::InfoLabelStringOrTuple > > value; - - { - // we need to check the parameter type and see if it matches - PyObject *pyentry_1 = pyvalue; - try - { - std::string entry0_1; - if (pyentry_1) PyXBMCGetUnicodeString(entry0_1,pyentry_1,PyInt_Check(pyentry_1) || PyLong_Check(pyentry_1) || PyFloat_Check(pyentry_1),"entry0_1","setInfo"); - value.former() = entry0_1; - } - catch (const XBMCAddon::WrongTypeException&) - { - try - { - std::vector< XBMCAddon::xbmcgui::InfoLabelStringOrTuple > entry1_1; - - if (pyentry_1) - { - bool isTuple = PyObject_TypeCheck(pyentry_1,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyentry_1,&PyList_Type)) - throw WrongTypeException("The parameter \"entry1_1\" must be either a Tuple or a List."); - - - PyObject *pyentry2 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyentry_1) : PyList_Size(pyentry_1)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry2 = (isTuple ? PyTuple_GetItem(pyentry_1, i) : PyList_GetItem(pyentry_1, i)); - Alternative< XBMCAddon::StringOrInt ,Tuple< XBMCAddon::String ,XBMCAddon::StringOrInt > > entry2; - - { - // we need to check the parameter type and see if it matches - PyObject *pyentry_3 = pyentry2; - try - { - std::string entry0_3; - if (pyentry_3) PyXBMCGetUnicodeString(entry0_3,pyentry_3,PyInt_Check(pyentry_3) || PyLong_Check(pyentry_3) || PyFloat_Check(pyentry_3),"entry0_3","setInfo"); - entry2.former() = entry0_3; - } - catch (const XBMCAddon::WrongTypeException&) - { - try - { - Tuple< XBMCAddon::String ,XBMCAddon::StringOrInt > entry1_3; - - if(pyentry_3) - { - bool isTuple = PyObject_TypeCheck(pyentry_3,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyentry_3,&PyList_Type)) - throw WrongTypeException("The parameter \"entry1_3\" must be either a Tuple or a List."); - auto vecSize = (isTuple ? PyTuple_Size(pyentry_3) : PyList_Size(pyentry_3)); - - if (vecSize > 0) - { - PyObject *pyentry0_4 = NULL; - pyentry0_4 = (isTuple ? PyTuple_GetItem(pyentry_3, 0) : PyList_GetItem(pyentry_3, 0)); - std::string entry0_4; - if (pyentry0_4) PyXBMCGetUnicodeString(entry0_4,pyentry0_4,false,"entry0_4","setInfo"); - entry1_3.first() = entry0_4; - } - - if (vecSize > 1) - { - PyObject *pyentry1_4 = NULL; - pyentry1_4 = (isTuple ? PyTuple_GetItem(pyentry_3, 1) : PyList_GetItem(pyentry_3, 1)); - std::string entry1_4; - if (pyentry1_4) PyXBMCGetUnicodeString(entry1_4,pyentry1_4,PyInt_Check(pyentry1_4) || PyLong_Check(pyentry1_4) || PyFloat_Check(pyentry1_4),"entry1_4","setInfo"); - entry1_3.second() = entry1_4; - } - - } - - entry2.later() = entry1_3; - } - catch (const XBMCAddon::WrongTypeException&) - { - throw XBMCAddon::WrongTypeException("Failed to convert to input type to either a " - "std::string or a " - "Tuple<(XBMCAddon::String,XBMCAddon::StringOrInt)>" ); - } - } - } - entry1_1.push_back(entry2); - } - } - - value.later() = entry1_1; - } - catch (const XBMCAddon::WrongTypeException&) - { - throw XBMCAddon::WrongTypeException("Failed to convert to input type to either a " - "std::string or a " - "std::vector<(XBMCAddon::xbmcgui::InfoLabelStringOrTuple)>" ); - } - } - } - infoLabels[key] = value; - } - } - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setInfo","XBMCAddon::xbmcgui::ListItem"))-> setInfo( type, infoLabels ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setInfo\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setInfo\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setCast (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "actors", - NULL}; - - std::vector< XBMCAddon::Properties > actors ; - PyObject* pyactors = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyactors - )) - { - return NULL; - } - - - try - { - - if (pyactors) - { - bool isTuple = PyObject_TypeCheck(pyactors,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyactors,&PyList_Type)) - throw WrongTypeException("The parameter \"actors\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyactors) : PyList_Size(pyactors)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyactors, i) : PyList_GetItem(pyactors, i)); - XBMCAddon::Dictionary< XBMCAddon::StringOrInt > entry1; - - { - PyObject *pykey, *pyvalue; - Py_ssize_t pos = 0; - while(PyDict_Next(pyentry1, &pos, &pykey, &pyvalue)) - { - std::string key; - PyXBMCGetUnicodeString(key,pykey,false,"entry1","setCast"); - std::string value; - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,PyInt_Check(pyvalue) || PyLong_Check(pyvalue) || PyFloat_Check(pyvalue),"value","setCast"); - entry1[key] = value; - } - } - actors.push_back(entry1); - } - } - - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setCast","XBMCAddon::xbmcgui::ListItem"))-> setCast( actors ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setCast\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setCast\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setAvailableFanart (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "images", - NULL}; - - std::vector< XBMCAddon::Properties > images ; - PyObject* pyimages = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyimages - )) - { - return NULL; - } - - - try - { - - if (pyimages) - { - bool isTuple = PyObject_TypeCheck(pyimages,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyimages,&PyList_Type)) - throw WrongTypeException("The parameter \"images\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyimages) : PyList_Size(pyimages)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyimages, i) : PyList_GetItem(pyimages, i)); - XBMCAddon::Dictionary< XBMCAddon::StringOrInt > entry1; - - { - PyObject *pykey, *pyvalue; - Py_ssize_t pos = 0; - while(PyDict_Next(pyentry1, &pos, &pykey, &pyvalue)) - { - std::string key; - PyXBMCGetUnicodeString(key,pykey,false,"entry1","setAvailableFanart"); - std::string value; - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,PyInt_Check(pyvalue) || PyLong_Check(pyvalue) || PyFloat_Check(pyvalue),"value","setAvailableFanart"); - entry1[key] = value; - } - } - images.push_back(entry1); - } - } - - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setAvailableFanart","XBMCAddon::xbmcgui::ListItem"))-> setAvailableFanart( images ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setAvailableFanart\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setAvailableFanart\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_addAvailableArtwork (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "url", - "art_type", - "referrer", - "cache", - "post", - "isgz", - "season", - NULL}; - - std::string url ; - PyObject* pyurl = NULL; - std::string art_type = ""; - PyObject* pyart_type = NULL; - std::string referrer = ""; - PyObject* pyreferrer = NULL; - std::string cache = ""; - PyObject* pycache = NULL; - bool post = false; - bool isgz = false; - int season = -1; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|OOObbi", - const_cast(keywords), - &pyurl, - &pyart_type, - &pyreferrer, - &pycache, - &post, - &isgz, - &season - )) - { - return NULL; - } - - - try - { - if (pyurl) PyXBMCGetUnicodeString(url,pyurl,false,"url","addAvailableArtwork"); - if (pyart_type) PyXBMCGetUnicodeString(art_type,pyart_type,false,"art_type","addAvailableArtwork"); - if (pyreferrer) PyXBMCGetUnicodeString(referrer,pyreferrer,false,"referrer","addAvailableArtwork"); - if (pycache) PyXBMCGetUnicodeString(cache,pycache,false,"cache","addAvailableArtwork"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"addAvailableArtwork","XBMCAddon::xbmcgui::ListItem"))-> addAvailableArtwork( url, art_type, referrer, cache, post, isgz, season ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addAvailableArtwork\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addAvailableArtwork\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_addStreamInfo (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "cType", - "dictionary", - NULL}; - - char * cType = nullptr; - XBMCAddon::Dictionary< XBMCAddon::StringOrInt > dictionary ; - PyObject* pydictionary = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "sO", - const_cast(keywords), - &cType, - &pydictionary - )) - { - return NULL; - } - - - try - { - - { - PyObject *pykey, *pyvalue; - Py_ssize_t pos = 0; - while(PyDict_Next(pydictionary, &pos, &pykey, &pyvalue)) - { - std::string key; - PyXBMCGetUnicodeString(key,pykey,false,"dictionary","addStreamInfo"); - std::string value; - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,PyInt_Check(pyvalue) || PyLong_Check(pyvalue) || PyFloat_Check(pyvalue),"value","addStreamInfo"); - dictionary[key] = value; - } - } - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"addStreamInfo","XBMCAddon::xbmcgui::ListItem"))-> addStreamInfo( cType, dictionary ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addStreamInfo\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addStreamInfo\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_addContextMenuItems (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "items", - "replaceItems", - NULL}; - - std::vector< Tuple< XBMCAddon::String ,XBMCAddon::String > > items ; - PyObject* pyitems = NULL; - bool replaceItems = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|b", - const_cast(keywords), - &pyitems, - &replaceItems - )) - { - return NULL; - } - - - try - { - - if (pyitems) - { - bool isTuple = PyObject_TypeCheck(pyitems,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyitems,&PyList_Type)) - throw WrongTypeException("The parameter \"items\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyitems) : PyList_Size(pyitems)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyitems, i) : PyList_GetItem(pyitems, i)); - Tuple< XBMCAddon::String ,XBMCAddon::String > entry1; - - if(pyentry1) - { - bool isTuple = PyObject_TypeCheck(pyentry1,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyentry1,&PyList_Type)) - throw WrongTypeException("The parameter \"entry1\" must be either a Tuple or a List."); - auto vecSize = (isTuple ? PyTuple_Size(pyentry1) : PyList_Size(pyentry1)); - - if (vecSize > 0) - { - PyObject *pyentry0_2 = NULL; - pyentry0_2 = (isTuple ? PyTuple_GetItem(pyentry1, 0) : PyList_GetItem(pyentry1, 0)); - std::string entry0_2; - if (pyentry0_2) PyXBMCGetUnicodeString(entry0_2,pyentry0_2,false,"entry0_2","addContextMenuItems"); - entry1.first() = entry0_2; - } - - if (vecSize > 1) - { - PyObject *pyentry1_2 = NULL; - pyentry1_2 = (isTuple ? PyTuple_GetItem(pyentry1, 1) : PyList_GetItem(pyentry1, 1)); - std::string entry1_2; - if (pyentry1_2) PyXBMCGetUnicodeString(entry1_2,pyentry1_2,false,"entry1_2","addContextMenuItems"); - entry1.second() = entry1_2; - } - - } - - items.push_back(entry1); - } - } - - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"addContextMenuItems","XBMCAddon::xbmcgui::ListItem"))-> addContextMenuItems( items, replaceItems ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addContextMenuItems\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addContextMenuItems\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setProperty (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "key", - "value", - NULL}; - - char * key = nullptr; - std::string value ; - PyObject* pyvalue = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "sO", - const_cast(keywords), - &key, - &pyvalue - )) - { - return NULL; - } - - - try - { - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,false,"value","setProperty"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setProperty","XBMCAddon::xbmcgui::ListItem"))-> setProperty( key, value ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setProperty\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setProperty\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setProperties (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "dictionary", - NULL}; - - XBMCAddon::Dictionary< XBMCAddon::StringOrInt > dictionary ; - PyObject* pydictionary = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pydictionary - )) - { - return NULL; - } - - - try - { - - { - PyObject *pykey, *pyvalue; - Py_ssize_t pos = 0; - while(PyDict_Next(pydictionary, &pos, &pykey, &pyvalue)) - { - std::string key; - PyXBMCGetUnicodeString(key,pykey,false,"dictionary","setProperties"); - std::string value; - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,PyInt_Check(pyvalue) || PyLong_Check(pyvalue) || PyFloat_Check(pyvalue),"value","setProperties"); - dictionary[key] = value; - } - } - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setProperties","XBMCAddon::xbmcgui::ListItem"))-> setProperties( dictionary ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setProperties\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setProperties\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getProperty (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "key", - NULL}; - - char * key = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &key - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getProperty","XBMCAddon::xbmcgui::ListItem"))-> getProperty( key ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getProperty\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getProperty\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setPath (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypath - )) - { - return NULL; - } - - - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","setPath"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setPath","XBMCAddon::xbmcgui::ListItem"))-> setPath( path ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setPath\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setPath\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setMimeType (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "mimetype", - NULL}; - - std::string mimetype ; - PyObject* pymimetype = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pymimetype - )) - { - return NULL; - } - - - try - { - if (pymimetype) PyXBMCGetUnicodeString(mimetype,pymimetype,false,"mimetype","setMimeType"); - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setMimeType","XBMCAddon::xbmcgui::ListItem"))-> setMimeType( mimetype ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setMimeType\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setMimeType\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setContentLookup (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "enable", - NULL}; - - bool enable ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "b", - const_cast(keywords), - &enable - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setContentLookup","XBMCAddon::xbmcgui::ListItem"))-> setContentLookup( enable ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setContentLookup\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setContentLookup\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_setSubtitles (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "subtitleFiles", - NULL}; - - std::vector< XBMCAddon::String > subtitleFiles ; - PyObject* pysubtitleFiles = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pysubtitleFiles - )) - { - return NULL; - } - - - try - { - - if (pysubtitleFiles) - { - bool isTuple = PyObject_TypeCheck(pysubtitleFiles,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pysubtitleFiles,&PyList_Type)) - throw WrongTypeException("The parameter \"subtitleFiles\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pysubtitleFiles) : PyList_Size(pysubtitleFiles)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pysubtitleFiles, i) : PyList_GetItem(pysubtitleFiles, i)); - std::string entry1; - if (pyentry1) PyXBMCGetUnicodeString(entry1,pyentry1,false,"entry1","setSubtitles"); - subtitleFiles.push_back(entry1); - } - } - - - ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"setSubtitles","XBMCAddon::xbmcgui::ListItem"))-> setSubtitles( subtitleFiles ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setSubtitles\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setSubtitles\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getdescription (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getdescription","XBMCAddon::xbmcgui::ListItem"))-> getdescription( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getdescription\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getdescription\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getduration (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getduration","XBMCAddon::xbmcgui::ListItem"))-> getduration( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getduration\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getduration\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getfilename (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getfilename","XBMCAddon::xbmcgui::ListItem"))-> getfilename( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getfilename\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getfilename\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getPath (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getPath","XBMCAddon::xbmcgui::ListItem"))-> getPath( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPath\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPath\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getVideoInfoTag (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - xbmc::InfoTagVideo * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getVideoInfoTag","XBMCAddon::xbmcgui::ListItem"))-> getVideoInfoTag( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getVideoInfoTag\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getVideoInfoTag\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ListItem_getMusicInfoTag (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - xbmc::InfoTagMusic * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"getMusicInfoTag","XBMCAddon::xbmcgui::ListItem"))-> getMusicInfoTag( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getMusicInfoTag\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getMusicInfoTag\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_canAcceptMessages (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "actionId", - NULL}; - - int actionId ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &actionId - )) - { - return NULL; - } - - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"canAcceptMessages","XBMCAddon::xbmcgui::Control"))-> canAcceptMessages( actionId ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"canAcceptMessages\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"canAcceptMessages\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_getId (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"getId","XBMCAddon::xbmcgui::Control"))-> getId( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getId\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getId\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - - - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_getPosition (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - std::vector< int > apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"getPosition","XBMCAddon::xbmcgui::Control"))-> getPosition( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPosition\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPosition\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - result = PyList_New(0); - - for (std::vector::iterator iter = apiResult.begin(); iter != apiResult.end(); ++iter) - { - int & entry1 = *iter; - PyObject* pyentry1; - pyentry1 = Py_BuildValue("i", entry1); - PyList_Append(result, pyentry1); - Py_DECREF(pyentry1); - } - - - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_getX (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"getX","XBMCAddon::xbmcgui::Control"))-> getX( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getX\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getX\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_getY (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"getY","XBMCAddon::xbmcgui::Control"))-> getY( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getY\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getY\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_getHeight (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"getHeight","XBMCAddon::xbmcgui::Control"))-> getHeight( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getHeight\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getHeight\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_getWidth (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"getWidth","XBMCAddon::xbmcgui::Control"))-> getWidth( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getWidth\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getWidth\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_setEnabled (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "enabled", - NULL}; - - bool enabled ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "b", - const_cast(keywords), - &enabled - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"setEnabled","XBMCAddon::xbmcgui::Control"))-> setEnabled( enabled ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setEnabled\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setEnabled\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_setVisible (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "visible", - NULL}; - - bool visible ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "b", - const_cast(keywords), - &visible - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"setVisible","XBMCAddon::xbmcgui::Control"))-> setVisible( visible ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setVisible\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setVisible\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_isVisible (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"isVisible","XBMCAddon::xbmcgui::Control"))-> isVisible( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"isVisible\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"isVisible\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_setVisibleCondition (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "visible", - "allowHiddenFocus", - NULL}; - - char * visible = nullptr; - bool allowHiddenFocus = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s|b", - const_cast(keywords), - &visible, - &allowHiddenFocus - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"setVisibleCondition","XBMCAddon::xbmcgui::Control"))-> setVisibleCondition( visible, allowHiddenFocus ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setVisibleCondition\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setVisibleCondition\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_setEnableCondition (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "enable", - NULL}; - - char * enable = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &enable - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"setEnableCondition","XBMCAddon::xbmcgui::Control"))-> setEnableCondition( enable ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setEnableCondition\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setEnableCondition\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_setAnimations (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "eventAttr", - NULL}; - - std::vector< Tuple< XBMCAddon::String ,XBMCAddon::String > > eventAttr ; - PyObject* pyeventAttr = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyeventAttr - )) - { - return NULL; - } - - - try - { - - if (pyeventAttr) - { - bool isTuple = PyObject_TypeCheck(pyeventAttr,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyeventAttr,&PyList_Type)) - throw WrongTypeException("The parameter \"eventAttr\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyeventAttr) : PyList_Size(pyeventAttr)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyeventAttr, i) : PyList_GetItem(pyeventAttr, i)); - Tuple< XBMCAddon::String ,XBMCAddon::String > entry1; - - if(pyentry1) - { - bool isTuple = PyObject_TypeCheck(pyentry1,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyentry1,&PyList_Type)) - throw WrongTypeException("The parameter \"entry1\" must be either a Tuple or a List."); - auto vecSize = (isTuple ? PyTuple_Size(pyentry1) : PyList_Size(pyentry1)); - - if (vecSize > 0) - { - PyObject *pyentry0_2 = NULL; - pyentry0_2 = (isTuple ? PyTuple_GetItem(pyentry1, 0) : PyList_GetItem(pyentry1, 0)); - std::string entry0_2; - if (pyentry0_2) PyXBMCGetUnicodeString(entry0_2,pyentry0_2,false,"entry0_2","setAnimations"); - entry1.first() = entry0_2; - } - - if (vecSize > 1) - { - PyObject *pyentry1_2 = NULL; - pyentry1_2 = (isTuple ? PyTuple_GetItem(pyentry1, 1) : PyList_GetItem(pyentry1, 1)); - std::string entry1_2; - if (pyentry1_2) PyXBMCGetUnicodeString(entry1_2,pyentry1_2,false,"entry1_2","setAnimations"); - entry1.second() = entry1_2; - } - - } - - eventAttr.push_back(entry1); - } - } - - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"setAnimations","XBMCAddon::xbmcgui::Control"))-> setAnimations( eventAttr ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setAnimations\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setAnimations\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_setPosition (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - NULL}; - - long x ; - long y ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "ll", - const_cast(keywords), - &x, - &y - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"setPosition","XBMCAddon::xbmcgui::Control"))-> setPosition( x, y ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setPosition\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setPosition\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_setWidth (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "width", - NULL}; - - long width ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "l", - const_cast(keywords), - &width - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"setWidth","XBMCAddon::xbmcgui::Control"))-> setWidth( width ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setWidth\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setWidth\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_setHeight (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "height", - NULL}; - - long height ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "l", - const_cast(keywords), - &height - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"setHeight","XBMCAddon::xbmcgui::Control"))-> setHeight( height ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setHeight\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setHeight\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_setNavigation (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "up", - "down", - "left", - "right", - NULL}; - - XBMCAddon::xbmcgui::Control * up = nullptr; - PyObject* pyup = NULL; - XBMCAddon::xbmcgui::Control * down = nullptr; - PyObject* pydown = NULL; - XBMCAddon::xbmcgui::Control * left = nullptr; - PyObject* pyleft = NULL; - XBMCAddon::xbmcgui::Control * right = nullptr; - PyObject* pyright = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OOOO", - const_cast(keywords), - &pyup, - &pydown, - &pyleft, - &pyright - )) - { - return NULL; - } - - - try - { - up = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pyup,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","setNavigation"); - down = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pydown,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","setNavigation"); - left = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pyleft,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","setNavigation"); - right = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pyright,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","setNavigation"); - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"setNavigation","XBMCAddon::xbmcgui::Control"))-> setNavigation( up, down, left, right ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setNavigation\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setNavigation\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_controlUp (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "up", - NULL}; - - XBMCAddon::xbmcgui::Control * up = nullptr; - PyObject* pyup = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyup - )) - { - return NULL; - } - - - try - { - up = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pyup,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","controlUp"); - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"controlUp","XBMCAddon::xbmcgui::Control"))-> controlUp( up ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"controlUp\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"controlUp\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_controlDown (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "control", - NULL}; - - XBMCAddon::xbmcgui::Control * control = nullptr; - PyObject* pycontrol = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pycontrol - )) - { - return NULL; - } - - - try - { - control = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pycontrol,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","controlDown"); - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"controlDown","XBMCAddon::xbmcgui::Control"))-> controlDown( control ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"controlDown\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"controlDown\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_controlLeft (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "control", - NULL}; - - XBMCAddon::xbmcgui::Control * control = nullptr; - PyObject* pycontrol = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pycontrol - )) - { - return NULL; - } - - - try - { - control = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pycontrol,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","controlLeft"); - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"controlLeft","XBMCAddon::xbmcgui::Control"))-> controlLeft( control ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"controlLeft\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"controlLeft\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Control_controlRight (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "control", - NULL}; - - XBMCAddon::xbmcgui::Control * control = nullptr; - PyObject* pycontrol = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pycontrol - )) - { - return NULL; - } - - - try - { - control = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pycontrol,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","controlRight"); - - ((XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"controlRight","XBMCAddon::xbmcgui::Control"))-> controlRight( control ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"controlRight\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"controlRight\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlSpin_setTextures (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "up", - "down", - "upFocus", - "downFocus", - "upDisabled", - "downDisabled", - NULL}; - - char * up = nullptr; - char * down = nullptr; - char * upFocus = nullptr; - char * downFocus = nullptr; - char * upDisabled = nullptr; - char * downDisabled = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "ssssss", - const_cast(keywords), - &up, - &down, - &upFocus, - &downFocus, - &upDisabled, - &downDisabled - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlSpin*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlSpin_Type,"setTextures","XBMCAddon::xbmcgui::ControlSpin"))-> setTextures( up, down, upFocus, downFocus, upDisabled, downDisabled ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setTextures\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setTextures\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlLabel_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - "label", - "font", - "textColor", - "disabledColor", - "alignment", - "hasPath", - "angle", - NULL}; - - long x ; - long y ; - long width ; - long height ; - std::string label ; - PyObject* pylabel = NULL; - char * font = NULL; - char * textColor = NULL; - char * disabledColor = NULL; - long alignment = XBFONT_LEFT; - bool hasPath = false; - long angle = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llllO|ssslbl", - const_cast(keywords), - &x, - &y, - &width, - &height, - &pylabel, - &font, - &textColor, - &disabledColor, - &alignment, - &hasPath, - &angle - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlLabel * apiResult; - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","ControlLabel"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlLabel( x, y, width, height, label, font, textColor, disabledColor, alignment, hasPath, angle ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlLabel_getLabel (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlLabel*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlLabel_Type,"getLabel","XBMCAddon::xbmcgui::ControlLabel"))-> getLabel( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlLabel_setLabel (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "label", - "font", - "textColor", - "disabledColor", - "shadowColor", - "focusedColor", - "label2", - NULL}; - - std::string label = XBMCAddon::emptyString; - PyObject* pylabel = NULL; - char * font = NULL; - char * textColor = NULL; - char * disabledColor = NULL; - char * shadowColor = NULL; - char * focusedColor = NULL; - std::string label2 = XBMCAddon::emptyString; - PyObject* pylabel2 = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|OsssssO", - const_cast(keywords), - &pylabel, - &font, - &textColor, - &disabledColor, - &shadowColor, - &focusedColor, - &pylabel2 - )) - { - return NULL; - } - - - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","setLabel"); - if (pylabel2) PyXBMCGetUnicodeString(label2,pylabel2,false,"label2","setLabel"); - - ((XBMCAddon::xbmcgui::ControlLabel*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlLabel_Type,"setLabel","XBMCAddon::xbmcgui::ControlLabel"))-> setLabel( label, font, textColor, disabledColor, shadowColor, focusedColor, label2 ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlEdit_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - "label", - "font", - "textColor", - "disabledColor", - "_alignment", - "focusTexture", - "noFocusTexture", - "isPassword", - NULL}; - - long x ; - long y ; - long width ; - long height ; - std::string label ; - PyObject* pylabel = NULL; - char * font = NULL; - char * textColor = NULL; - char * disabledColor = NULL; - long _alignment = XBFONT_LEFT; - char * focusTexture = NULL; - char * noFocusTexture = NULL; - bool isPassword = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llllO|ssslssb", - const_cast(keywords), - &x, - &y, - &width, - &height, - &pylabel, - &font, - &textColor, - &disabledColor, - &_alignment, - &focusTexture, - &noFocusTexture, - &isPassword - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlEdit * apiResult; - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","ControlEdit"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlEdit( x, y, width, height, label, font, textColor, disabledColor, _alignment, focusTexture, noFocusTexture, isPassword ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlEdit\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlEdit\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlEdit_setLabel (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "label", - "font", - "textColor", - "disabledColor", - "shadowColor", - "focusedColor", - "label2", - NULL}; - - std::string label = XBMCAddon::emptyString; - PyObject* pylabel = NULL; - char * font = NULL; - char * textColor = NULL; - char * disabledColor = NULL; - char * shadowColor = NULL; - char * focusedColor = NULL; - std::string label2 = XBMCAddon::emptyString; - PyObject* pylabel2 = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|OsssssO", - const_cast(keywords), - &pylabel, - &font, - &textColor, - &disabledColor, - &shadowColor, - &focusedColor, - &pylabel2 - )) - { - return NULL; - } - - - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","setLabel"); - if (pylabel2) PyXBMCGetUnicodeString(label2,pylabel2,false,"label2","setLabel"); - - ((XBMCAddon::xbmcgui::ControlEdit*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlEdit_Type,"setLabel","XBMCAddon::xbmcgui::ControlEdit"))-> setLabel( label, font, textColor, disabledColor, shadowColor, focusedColor, label2 ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlEdit_getLabel (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlEdit*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlEdit_Type,"getLabel","XBMCAddon::xbmcgui::ControlEdit"))-> getLabel( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlEdit_setText (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "text", - NULL}; - - std::string text ; - PyObject* pytext = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pytext - )) - { - return NULL; - } - - - try - { - if (pytext) PyXBMCGetUnicodeString(text,pytext,false,"text","setText"); - - ((XBMCAddon::xbmcgui::ControlEdit*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlEdit_Type,"setText","XBMCAddon::xbmcgui::ControlEdit"))-> setText( text ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setText\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setText\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlEdit_getText (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlEdit*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlEdit_Type,"getText","XBMCAddon::xbmcgui::ControlEdit"))-> getText( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getText\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getText\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlEdit_setType (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "type", - "heading", - NULL}; - - int type ; - std::string heading ; - PyObject* pyheading = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iO", - const_cast(keywords), - &type, - &pyheading - )) - { - return NULL; - } - - - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","setType"); - - ((XBMCAddon::xbmcgui::ControlEdit*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlEdit_Type,"setType","XBMCAddon::xbmcgui::ControlEdit"))-> setType( type, heading ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setType\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setType\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - "font", - "textColor", - "buttonTexture", - "buttonFocusTexture", - "selectedColor", - "_imageWidth", - "_imageHeight", - "_itemTextXOffset", - "_itemTextYOffset", - "_itemHeight", - "_space", - "_alignmentY", - NULL}; - - long x ; - long y ; - long width ; - long height ; - char * font = NULL; - char * textColor = NULL; - char * buttonTexture = NULL; - char * buttonFocusTexture = NULL; - char * selectedColor = NULL; - long _imageWidth = 10; - long _imageHeight = 10; - long _itemTextXOffset = 10; - long _itemTextYOffset = 2; - long _itemHeight = 27; - long _space = 2; - long _alignmentY = XBFONT_CENTER_Y; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llll|ssssslllllll", - const_cast(keywords), - &x, - &y, - &width, - &height, - &font, - &textColor, - &buttonTexture, - &buttonFocusTexture, - &selectedColor, - &_imageWidth, - &_imageHeight, - &_itemTextXOffset, - &_itemTextYOffset, - &_itemHeight, - &_space, - &_alignmentY - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlList * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlList( x, y, width, height, font, textColor, buttonTexture, buttonFocusTexture, selectedColor, _imageWidth, _imageHeight, _itemTextXOffset, _itemTextYOffset, _itemHeight, _space, _alignmentY ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlList\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlList\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_addItem (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "item", - "sendMessage", - NULL}; - - Alternative< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const * > item ; - PyObject* pyitem = NULL; - bool sendMessage = true; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|b", - const_cast(keywords), - &pyitem, - &sendMessage - )) - { - return NULL; - } - - - try - { - - { - // we need to check the parameter type and see if it matches - PyObject *pyentry_1 = pyitem; - try - { - std::string entry0_1; - if (pyentry_1) PyXBMCGetUnicodeString(entry0_1,pyentry_1,false,"entry0_1","addItem"); - item.former() = entry0_1; - } - catch (const XBMCAddon::WrongTypeException&) - { - try - { - XBMCAddon::xbmcgui::ListItem * entry1_1; - entry1_1 = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pyentry_1,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcgui::","addItem"); - item.later() = entry1_1; - } - catch (const XBMCAddon::WrongTypeException&) - { - throw XBMCAddon::WrongTypeException("Failed to convert to input type to either a " - "std::string or a " - "p.XBMCAddon::xbmcgui::ListItem" ); - } - } - } - - ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"addItem","XBMCAddon::xbmcgui::ControlList"))-> addItem( item, sendMessage ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_addItems (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "items", - NULL}; - - std::vector< Alternative< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const * > > items ; - PyObject* pyitems = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyitems - )) - { - return NULL; - } - - - try - { - - if (pyitems) - { - bool isTuple = PyObject_TypeCheck(pyitems,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyitems,&PyList_Type)) - throw WrongTypeException("The parameter \"items\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyitems) : PyList_Size(pyitems)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyitems, i) : PyList_GetItem(pyitems, i)); - Alternative< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const * > entry1; - - { - // we need to check the parameter type and see if it matches - PyObject *pyentry_2 = pyentry1; - try - { - std::string entry0_2; - if (pyentry_2) PyXBMCGetUnicodeString(entry0_2,pyentry_2,false,"entry0_2","addItems"); - entry1.former() = entry0_2; - } - catch (const XBMCAddon::WrongTypeException&) - { - try - { - XBMCAddon::xbmcgui::ListItem * entry1_2; - entry1_2 = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pyentry_2,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcgui::","addItems"); - entry1.later() = entry1_2; - } - catch (const XBMCAddon::WrongTypeException&) - { - throw XBMCAddon::WrongTypeException("Failed to convert to input type to either a " - "std::string or a " - "p.XBMCAddon::xbmcgui::ListItem" ); - } - } - } - items.push_back(entry1); - } - } - - - ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"addItems","XBMCAddon::xbmcgui::ControlList"))-> addItems( items ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addItems\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addItems\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_selectItem (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "item", - NULL}; - - long item ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "l", - const_cast(keywords), - &item - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"selectItem","XBMCAddon::xbmcgui::ControlList"))-> selectItem( item ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"selectItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"selectItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_removeItem (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "index", - NULL}; - - int index ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &index - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"removeItem","XBMCAddon::xbmcgui::ControlList"))-> removeItem( index ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"removeItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"removeItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_reset (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"reset","XBMCAddon::xbmcgui::ControlList"))-> reset( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"reset\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"reset\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_getSpinControl (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcgui::Control * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"getSpinControl","XBMCAddon::xbmcgui::ControlList"))-> getSpinControl( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSpinControl\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSpinControl\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_getSelectedPosition (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"getSelectedPosition","XBMCAddon::xbmcgui::ControlList"))-> getSelectedPosition( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSelectedPosition\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSelectedPosition\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_getSelectedItem (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcgui::ListItem * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"getSelectedItem","XBMCAddon::xbmcgui::ControlList"))-> getSelectedItem( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSelectedItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSelectedItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_setImageDimensions (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "imageWidth", - "imageHeight", - NULL}; - - long imageWidth ; - long imageHeight ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "ll", - const_cast(keywords), - &imageWidth, - &imageHeight - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"setImageDimensions","XBMCAddon::xbmcgui::ControlList"))-> setImageDimensions( imageWidth, imageHeight ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setImageDimensions\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setImageDimensions\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_setItemHeight (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "height", - NULL}; - - long height ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "l", - const_cast(keywords), - &height - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"setItemHeight","XBMCAddon::xbmcgui::ControlList"))-> setItemHeight( height ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setItemHeight\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setItemHeight\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_setSpace (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "space", - NULL}; - - int space ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &space - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"setSpace","XBMCAddon::xbmcgui::ControlList"))-> setSpace( space ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setSpace\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setSpace\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_setPageControlVisible (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "visible", - NULL}; - - bool visible ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "b", - const_cast(keywords), - &visible - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"setPageControlVisible","XBMCAddon::xbmcgui::ControlList"))-> setPageControlVisible( visible ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setPageControlVisible\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setPageControlVisible\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_size (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"size","XBMCAddon::xbmcgui::ControlList"))-> size( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"size\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"size\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_getItemHeight (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"getItemHeight","XBMCAddon::xbmcgui::ControlList"))-> getItemHeight( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getItemHeight\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getItemHeight\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_getSpace (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"getSpace","XBMCAddon::xbmcgui::ControlList"))-> getSpace( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getSpace\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getSpace\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_getListItem (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "index", - NULL}; - - int index ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &index - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ListItem * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"getListItem","XBMCAddon::xbmcgui::ControlList"))-> getListItem( index ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getListItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getListItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlList_setStaticContent (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "items", - NULL}; - - std::vector< XBMCAddon::xbmcgui::ListItem * > * items = nullptr; - PyObject* pyitems = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyitems - )) - { - return NULL; - } - - - try - { - - if (pyitems) - { - bool isTuple = PyObject_TypeCheck(pyitems,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyitems,&PyList_Type)) - throw WrongTypeException("The parameter \"items\" must be either a Tuple or a List."); - - items = new std::vector(); - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyitems) : PyList_Size(pyitems)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyitems, i) : PyList_GetItem(pyitems, i)); - XBMCAddon::xbmcgui::ListItem * entry1; - entry1 = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pyentry1,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcgui::","setStaticContent"); - items->push_back(entry1); - } - } - - - ((XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"setStaticContent","XBMCAddon::xbmcgui::ControlList"))-> setStaticContent( items ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setStaticContent\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setStaticContent\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlFadeLabel_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - "font", - "textColor", - "_alignment", - NULL}; - - long x ; - long y ; - long width ; - long height ; - char * font = NULL; - char * textColor = NULL; - long _alignment = XBFONT_LEFT; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llll|ssl", - const_cast(keywords), - &x, - &y, - &width, - &height, - &font, - &textColor, - &_alignment - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlFadeLabel * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlFadeLabel( x, y, width, height, font, textColor, _alignment ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlFadeLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlFadeLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlFadeLabel_addLabel (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "label", - NULL}; - - std::string label ; - PyObject* pylabel = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pylabel - )) - { - return NULL; - } - - - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","addLabel"); - - ((XBMCAddon::xbmcgui::ControlFadeLabel*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlFadeLabel_Type,"addLabel","XBMCAddon::xbmcgui::ControlFadeLabel"))-> addLabel( label ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlFadeLabel_setScrolling (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "scroll", - NULL}; - - bool scroll ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "b", - const_cast(keywords), - &scroll - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlFadeLabel*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlFadeLabel_Type,"setScrolling","XBMCAddon::xbmcgui::ControlFadeLabel"))-> setScrolling( scroll ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setScrolling\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setScrolling\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlFadeLabel_reset (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::ControlFadeLabel*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlFadeLabel_Type,"reset","XBMCAddon::xbmcgui::ControlFadeLabel"))-> reset( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"reset\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"reset\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - "font", - "textColor", - NULL}; - - long x ; - long y ; - long width ; - long height ; - char * font = NULL; - char * textColor = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llll|ss", - const_cast(keywords), - &x, - &y, - &width, - &height, - &font, - &textColor - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlTextBox * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlTextBox( x, y, width, height, font, textColor ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlTextBox\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlTextBox\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_setText (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "text", - NULL}; - - std::string text ; - PyObject* pytext = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pytext - )) - { - return NULL; - } - - - try - { - if (pytext) PyXBMCGetUnicodeString(text,pytext,false,"text","setText"); - - ((XBMCAddon::xbmcgui::ControlTextBox*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlTextBox_Type,"setText","XBMCAddon::xbmcgui::ControlTextBox"))-> setText( text ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setText\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setText\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_getText (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlTextBox*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlTextBox_Type,"getText","XBMCAddon::xbmcgui::ControlTextBox"))-> getText( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getText\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getText\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_reset (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::ControlTextBox*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlTextBox_Type,"reset","XBMCAddon::xbmcgui::ControlTextBox"))-> reset( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"reset\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"reset\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_scroll (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "id", - NULL}; - - long id ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "l", - const_cast(keywords), - &id - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlTextBox*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlTextBox_Type,"scroll","XBMCAddon::xbmcgui::ControlTextBox"))-> scroll( id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"scroll\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"scroll\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_autoScroll (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "delay", - "time", - "repeat", - NULL}; - - int delay ; - int time ; - int repeat ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iii", - const_cast(keywords), - &delay, - &time, - &repeat - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlTextBox*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlTextBox_Type,"autoScroll","XBMCAddon::xbmcgui::ControlTextBox"))-> autoScroll( delay, time, repeat ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"autoScroll\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"autoScroll\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlImage_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - "filename", - "aspectRatio", - "colorDiffuse", - NULL}; - - long x ; - long y ; - long width ; - long height ; - char * filename = nullptr; - long aspectRatio = 0; - char * colorDiffuse = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "lllls|ls", - const_cast(keywords), - &x, - &y, - &width, - &height, - &filename, - &aspectRatio, - &colorDiffuse - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlImage * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlImage( x, y, width, height, filename, aspectRatio, colorDiffuse ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlImage\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlImage\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlImage_setImage (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "imageFilename", - "useCache", - NULL}; - - char * imageFilename = nullptr; - bool useCache = true; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s|b", - const_cast(keywords), - &imageFilename, - &useCache - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlImage*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlImage_Type,"setImage","XBMCAddon::xbmcgui::ControlImage"))-> setImage( imageFilename, useCache ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setImage\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setImage\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlImage_setColorDiffuse (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "hexString", - NULL}; - - char * hexString = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &hexString - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlImage*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlImage_Type,"setColorDiffuse","XBMCAddon::xbmcgui::ControlImage"))-> setColorDiffuse( hexString ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setColorDiffuse\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setColorDiffuse\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlProgress_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - "texturebg", - "textureleft", - "texturemid", - "textureright", - "textureoverlay", - NULL}; - - long x ; - long y ; - long width ; - long height ; - char * texturebg = NULL; - char * textureleft = NULL; - char * texturemid = NULL; - char * textureright = NULL; - char * textureoverlay = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llll|sssss", - const_cast(keywords), - &x, - &y, - &width, - &height, - &texturebg, - &textureleft, - &texturemid, - &textureright, - &textureoverlay - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlProgress * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlProgress( x, y, width, height, texturebg, textureleft, texturemid, textureright, textureoverlay ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlProgress\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlProgress\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlProgress_setPercent (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "pct", - NULL}; - - float pct ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "f", - const_cast(keywords), - &pct - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlProgress*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlProgress_Type,"setPercent","XBMCAddon::xbmcgui::ControlProgress"))-> setPercent( pct ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setPercent\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setPercent\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlProgress_getPercent (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - float apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlProgress*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlProgress_Type,"getPercent","XBMCAddon::xbmcgui::ControlProgress"))-> getPercent( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPercent\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPercent\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("f", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlButton_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - "label", - "focusTexture", - "noFocusTexture", - "textOffsetX", - "textOffsetY", - "alignment", - "font", - "textColor", - "disabledColor", - "angle", - "shadowColor", - "focusedColor", - NULL}; - - long x ; - long y ; - long width ; - long height ; - std::string label ; - PyObject* pylabel = NULL; - char * focusTexture = NULL; - char * noFocusTexture = NULL; - long textOffsetX = 10; - long textOffsetY = 2; - long alignment = (XBFONT_LEFT|XBFONT_CENTER_Y); - char * font = NULL; - char * textColor = NULL; - char * disabledColor = NULL; - long angle = 0; - char * shadowColor = NULL; - char * focusedColor = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llllO|sslllssslss", - const_cast(keywords), - &x, - &y, - &width, - &height, - &pylabel, - &focusTexture, - &noFocusTexture, - &textOffsetX, - &textOffsetY, - &alignment, - &font, - &textColor, - &disabledColor, - &angle, - &shadowColor, - &focusedColor - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlButton * apiResult; - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","ControlButton"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlButton( x, y, width, height, label, focusTexture, noFocusTexture, textOffsetX, textOffsetY, alignment, font, textColor, disabledColor, angle, shadowColor, focusedColor ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlButton\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlButton\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlButton_setLabel (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "label", - "font", - "textColor", - "disabledColor", - "shadowColor", - "focusedColor", - "label2", - NULL}; - - std::string label = XBMCAddon::emptyString; - PyObject* pylabel = NULL; - char * font = NULL; - char * textColor = NULL; - char * disabledColor = NULL; - char * shadowColor = NULL; - char * focusedColor = NULL; - std::string label2 = XBMCAddon::emptyString; - PyObject* pylabel2 = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|OsssssO", - const_cast(keywords), - &pylabel, - &font, - &textColor, - &disabledColor, - &shadowColor, - &focusedColor, - &pylabel2 - )) - { - return NULL; - } - - - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","setLabel"); - if (pylabel2) PyXBMCGetUnicodeString(label2,pylabel2,false,"label2","setLabel"); - - ((XBMCAddon::xbmcgui::ControlButton*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlButton_Type,"setLabel","XBMCAddon::xbmcgui::ControlButton"))-> setLabel( label, font, textColor, disabledColor, shadowColor, focusedColor, label2 ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlButton_setDisabledColor (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "color", - NULL}; - - char * color = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &color - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlButton*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlButton_Type,"setDisabledColor","XBMCAddon::xbmcgui::ControlButton"))-> setDisabledColor( color ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setDisabledColor\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setDisabledColor\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlButton_getLabel (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlButton*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlButton_Type,"getLabel","XBMCAddon::xbmcgui::ControlButton"))-> getLabel( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyUnicode_DecodeUTF8(apiResult.c_str(),apiResult.size(),"replace"); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlButton_getLabel2 (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlButton*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlButton_Type,"getLabel2","XBMCAddon::xbmcgui::ControlButton"))-> getLabel2( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getLabel2\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getLabel2\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyUnicode_DecodeUTF8(apiResult.c_str(),apiResult.size(),"replace"); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlGroup_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - NULL}; - - long x ; - long y ; - long width ; - long height ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llll", - const_cast(keywords), - &x, - &y, - &width, - &height - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlGroup * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlGroup( x, y, width, height ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlGroup\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlGroup\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - "label", - "focusOnTexture", - "noFocusOnTexture", - "focusOffTexture", - "noFocusOffTexture", - "focusTexture", - "noFocusTexture", - "textOffsetX", - "textOffsetY", - "_alignment", - "font", - "textColor", - "disabledColor", - "angle", - "shadowColor", - "focusedColor", - "disabledOnTexture", - "disabledOffTexture", - NULL}; - - long x ; - long y ; - long width ; - long height ; - std::string label ; - PyObject* pylabel = NULL; - char * focusOnTexture = NULL; - char * noFocusOnTexture = NULL; - char * focusOffTexture = NULL; - char * noFocusOffTexture = NULL; - char * focusTexture = NULL; - char * noFocusTexture = NULL; - long textOffsetX = 10; - long textOffsetY = 2; - long _alignment = (XBFONT_LEFT|XBFONT_CENTER_Y); - char * font = NULL; - char * textColor = NULL; - char * disabledColor = NULL; - long angle = 0; - char * shadowColor = NULL; - char * focusedColor = NULL; - char * disabledOnTexture = NULL; - char * disabledOffTexture = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llllO|sssssslllssslssss", - const_cast(keywords), - &x, - &y, - &width, - &height, - &pylabel, - &focusOnTexture, - &noFocusOnTexture, - &focusOffTexture, - &noFocusOffTexture, - &focusTexture, - &noFocusTexture, - &textOffsetX, - &textOffsetY, - &_alignment, - &font, - &textColor, - &disabledColor, - &angle, - &shadowColor, - &focusedColor, - &disabledOnTexture, - &disabledOffTexture - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlRadioButton * apiResult; - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","ControlRadioButton"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlRadioButton( x, y, width, height, label, focusOnTexture, noFocusOnTexture, focusOffTexture, noFocusOffTexture, focusTexture, noFocusTexture, textOffsetX, textOffsetY, _alignment, font, textColor, disabledColor, angle, shadowColor, focusedColor, disabledOnTexture, disabledOffTexture ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlRadioButton\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlRadioButton\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_setSelected (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "selected", - NULL}; - - bool selected ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "b", - const_cast(keywords), - &selected - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlRadioButton*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlRadioButton_Type,"setSelected","XBMCAddon::xbmcgui::ControlRadioButton"))-> setSelected( selected ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setSelected\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setSelected\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_isSelected (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlRadioButton*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlRadioButton_Type,"isSelected","XBMCAddon::xbmcgui::ControlRadioButton"))-> isSelected( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"isSelected\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"isSelected\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_setLabel (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "label", - "font", - "textColor", - "disabledColor", - "shadowColor", - "focusedColor", - "label2", - NULL}; - - std::string label = XBMCAddon::emptyString; - PyObject* pylabel = NULL; - char * font = NULL; - char * textColor = NULL; - char * disabledColor = NULL; - char * shadowColor = NULL; - char * focusedColor = NULL; - std::string label2 = XBMCAddon::emptyString; - PyObject* pylabel2 = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|OsssssO", - const_cast(keywords), - &pylabel, - &font, - &textColor, - &disabledColor, - &shadowColor, - &focusedColor, - &pylabel2 - )) - { - return NULL; - } - - - try - { - if (pylabel) PyXBMCGetUnicodeString(label,pylabel,false,"label","setLabel"); - if (pylabel2) PyXBMCGetUnicodeString(label2,pylabel2,false,"label2","setLabel"); - - ((XBMCAddon::xbmcgui::ControlRadioButton*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlRadioButton_Type,"setLabel","XBMCAddon::xbmcgui::ControlRadioButton"))-> setLabel( label, font, textColor, disabledColor, shadowColor, focusedColor, label2 ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setLabel\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_setRadioDimension (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - NULL}; - - long x ; - long y ; - long width ; - long height ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llll", - const_cast(keywords), - &x, - &y, - &width, - &height - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlRadioButton*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlRadioButton_Type,"setRadioDimension","XBMCAddon::xbmcgui::ControlRadioButton"))-> setRadioDimension( x, y, width, height ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setRadioDimension\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setRadioDimension\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlSlider_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "x", - "y", - "width", - "height", - "textureback", - "texture", - "texturefocus", - "orientation", - NULL}; - - long x ; - long y ; - long width ; - long height ; - char * textureback = NULL; - char * texture = NULL; - char * texturefocus = NULL; - int orientation = 1; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "llll|sssi", - const_cast(keywords), - &x, - &y, - &width, - &height, - &textureback, - &texture, - &texturefocus, - &orientation - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ControlSlider * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::ControlSlider( x, y, width, height, textureback, texture, texturefocus, orientation ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlSlider\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::ControlSlider\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlSlider_getPercent (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - float apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlSlider*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlSlider_Type,"getPercent","XBMCAddon::xbmcgui::ControlSlider"))-> getPercent( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getPercent\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getPercent\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("f", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlSlider_setPercent (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "pct", - NULL}; - - float pct ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "f", - const_cast(keywords), - &pct - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlSlider*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlSlider_Type,"setPercent","XBMCAddon::xbmcgui::ControlSlider"))-> setPercent( pct ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setPercent\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setPercent\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlSlider_getInt (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlSlider*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlSlider_Type,"getInt","XBMCAddon::xbmcgui::ControlSlider"))-> getInt( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getInt\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getInt\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlSlider_setInt (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "value", - "min", - "delta", - "max", - NULL}; - - int value ; - int min ; - int delta ; - int max ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iiii", - const_cast(keywords), - &value, - &min, - &delta, - &max - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlSlider*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlSlider_Type,"setInt","XBMCAddon::xbmcgui::ControlSlider"))-> setInt( value, min, delta, max ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setInt\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setInt\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlSlider_getFloat (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - float apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::ControlSlider*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlSlider_Type,"getFloat","XBMCAddon::xbmcgui::ControlSlider"))-> getFloat( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getFloat\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getFloat\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("f", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_ControlSlider_setFloat (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "value", - "min", - "delta", - "max", - NULL}; - - float value ; - float min ; - float delta ; - float max ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "ffff", - const_cast(keywords), - &value, - &min, - &delta, - &max - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::ControlSlider*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlSlider_Type,"setFloat","XBMCAddon::xbmcgui::ControlSlider"))-> setFloat( value, min, delta, max ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setFloat\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setFloat\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcgui::Dialog * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::Dialog( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::Dialog\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::Dialog\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_yesno (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "heading", - "line1", - "line2", - "line3", - "nolabel", - "yeslabel", - "autoclose", - NULL}; - - std::string heading ; - PyObject* pyheading = NULL; - std::string line1 ; - PyObject* pyline1 = NULL; - std::string line2 = XBMCAddon::emptyString; - PyObject* pyline2 = NULL; - std::string line3 = XBMCAddon::emptyString; - PyObject* pyline3 = NULL; - std::string nolabel = XBMCAddon::emptyString; - PyObject* pynolabel = NULL; - std::string yeslabel = XBMCAddon::emptyString; - PyObject* pyyeslabel = NULL; - int autoclose = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO|OOOOi", - const_cast(keywords), - &pyheading, - &pyline1, - &pyline2, - &pyline3, - &pynolabel, - &pyyeslabel, - &autoclose - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","yesno"); - if (pyline1) PyXBMCGetUnicodeString(line1,pyline1,false,"line1","yesno"); - if (pyline2) PyXBMCGetUnicodeString(line2,pyline2,false,"line2","yesno"); - if (pyline3) PyXBMCGetUnicodeString(line3,pyline3,false,"line3","yesno"); - if (pynolabel) PyXBMCGetUnicodeString(nolabel,pynolabel,false,"nolabel","yesno"); - if (pyyeslabel) PyXBMCGetUnicodeString(yeslabel,pyyeslabel,false,"yeslabel","yesno"); - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"yesno","XBMCAddon::xbmcgui::Dialog"))-> yesno( heading, line1, line2, line3, nolabel, yeslabel, autoclose ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"yesno\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"yesno\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_info (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "item", - NULL}; - - XBMCAddon::xbmcgui::ListItem * item = nullptr; - PyObject* pyitem = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyitem - )) - { - return NULL; - } - - bool apiResult; - try - { - item = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pyitem,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcgui::","info"); - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"info","XBMCAddon::xbmcgui::Dialog"))-> info( item ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"info\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"info\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_select (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "heading", - "list", - "autoclose", - "preselect", - "useDetails", - NULL}; - - std::string heading ; - PyObject* pyheading = NULL; - std::vector< Alternative< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const * > > list ; - PyObject* pylist = NULL; - int autoclose = 0; - int preselect = -1; - bool useDetails = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO|iib", - const_cast(keywords), - &pyheading, - &pylist, - &autoclose, - &preselect, - &useDetails - )) - { - return NULL; - } - - int apiResult; - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","select"); - - if (pylist) - { - bool isTuple = PyObject_TypeCheck(pylist,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pylist,&PyList_Type)) - throw WrongTypeException("The parameter \"list\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pylist) : PyList_Size(pylist)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pylist, i) : PyList_GetItem(pylist, i)); - Alternative< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const * > entry1; - - { - // we need to check the parameter type and see if it matches - PyObject *pyentry_2 = pyentry1; - try - { - std::string entry0_2; - if (pyentry_2) PyXBMCGetUnicodeString(entry0_2,pyentry_2,false,"entry0_2","select"); - entry1.former() = entry0_2; - } - catch (const XBMCAddon::WrongTypeException&) - { - try - { - XBMCAddon::xbmcgui::ListItem * entry1_2; - entry1_2 = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pyentry_2,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcgui::","select"); - entry1.later() = entry1_2; - } - catch (const XBMCAddon::WrongTypeException&) - { - throw XBMCAddon::WrongTypeException("Failed to convert to input type to either a " - "std::string or a " - "p.XBMCAddon::xbmcgui::ListItem" ); - } - } - } - list.push_back(entry1); - } - } - - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"select","XBMCAddon::xbmcgui::Dialog"))-> select( heading, list, autoclose, preselect, useDetails ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"select\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"select\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_contextmenu (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "list", - NULL}; - - std::vector< XBMCAddon::String > list ; - PyObject* pylist = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pylist - )) - { - return NULL; - } - - int apiResult; - try - { - - if (pylist) - { - bool isTuple = PyObject_TypeCheck(pylist,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pylist,&PyList_Type)) - throw WrongTypeException("The parameter \"list\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pylist) : PyList_Size(pylist)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pylist, i) : PyList_GetItem(pylist, i)); - std::string entry1; - if (pyentry1) PyXBMCGetUnicodeString(entry1,pyentry1,false,"entry1","contextmenu"); - list.push_back(entry1); - } - } - - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"contextmenu","XBMCAddon::xbmcgui::Dialog"))-> contextmenu( list ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"contextmenu\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"contextmenu\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_multiselect (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "heading", - "options", - "autoclose", - "preselect", - "useDetails", - NULL}; - - std::string heading ; - PyObject* pyheading = NULL; - std::vector< Alternative< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const * > > options ; - PyObject* pyoptions = NULL; - int autoclose = 0; - std::vector< int > preselect = std::vector< int >(); - PyObject* pypreselect = NULL; - bool useDetails = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO|iOb", - const_cast(keywords), - &pyheading, - &pyoptions, - &autoclose, - &pypreselect, - &useDetails - )) - { - return NULL; - } - - std::unique_ptr< std::vector< int > > apiResult; - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","multiselect"); - - if (pyoptions) - { - bool isTuple = PyObject_TypeCheck(pyoptions,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyoptions,&PyList_Type)) - throw WrongTypeException("The parameter \"options\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyoptions) : PyList_Size(pyoptions)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyoptions, i) : PyList_GetItem(pyoptions, i)); - Alternative< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const * > entry1; - - { - // we need to check the parameter type and see if it matches - PyObject *pyentry_2 = pyentry1; - try - { - std::string entry0_2; - if (pyentry_2) PyXBMCGetUnicodeString(entry0_2,pyentry_2,false,"entry0_2","multiselect"); - entry1.former() = entry0_2; - } - catch (const XBMCAddon::WrongTypeException&) - { - try - { - XBMCAddon::xbmcgui::ListItem * entry1_2; - entry1_2 = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pyentry_2,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcgui::","multiselect"); - entry1.later() = entry1_2; - } - catch (const XBMCAddon::WrongTypeException&) - { - throw XBMCAddon::WrongTypeException("Failed to convert to input type to either a " - "std::string or a " - "p.XBMCAddon::xbmcgui::ListItem" ); - } - } - } - options.push_back(entry1); - } - } - - - if (pypreselect) - { - bool isTuple = PyObject_TypeCheck(pypreselect,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pypreselect,&PyList_Type)) - throw WrongTypeException("The parameter \"preselect\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pypreselect) : PyList_Size(pypreselect)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pypreselect, i) : PyList_GetItem(pypreselect, i)); - int entry1; - entry1 = (int)PyInt_AsLong(pyentry1); - preselect.push_back(entry1); - } - } - - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"multiselect","XBMCAddon::xbmcgui::Dialog"))-> multiselect( heading, options, autoclose, preselect, useDetails ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"multiselect\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"multiselect\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - std::vector< int > * entry1 = apiResult.get(); - - if (entry1 != NULL) - { - - result = PyList_New(0); - - for (std::vector::iterator iter = entry1->begin(); iter != entry1->end(); ++iter) - { - int & entry2 = *iter; - PyObject* pyentry2; - pyentry2 = Py_BuildValue("i", entry2); - PyList_Append(result, pyentry2); - Py_DECREF(pyentry2); - } - - } - - - - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_ok (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "heading", - "line1", - "line2", - "line3", - NULL}; - - std::string heading ; - PyObject* pyheading = NULL; - std::string line1 ; - PyObject* pyline1 = NULL; - std::string line2 = XBMCAddon::emptyString; - PyObject* pyline2 = NULL; - std::string line3 = XBMCAddon::emptyString; - PyObject* pyline3 = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO|OO", - const_cast(keywords), - &pyheading, - &pyline1, - &pyline2, - &pyline3 - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","ok"); - if (pyline1) PyXBMCGetUnicodeString(line1,pyline1,false,"line1","ok"); - if (pyline2) PyXBMCGetUnicodeString(line2,pyline2,false,"line2","ok"); - if (pyline3) PyXBMCGetUnicodeString(line3,pyline3,false,"line3","ok"); - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"ok","XBMCAddon::xbmcgui::Dialog"))-> ok( heading, line1, line2, line3 ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"ok\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"ok\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_textviewer (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "heading", - "text", - "usemono", - NULL}; - - std::string heading ; - PyObject* pyheading = NULL; - std::string text ; - PyObject* pytext = NULL; - bool usemono = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO|b", - const_cast(keywords), - &pyheading, - &pytext, - &usemono - )) - { - return NULL; - } - - - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","textviewer"); - if (pytext) PyXBMCGetUnicodeString(text,pytext,false,"text","textviewer"); - - ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"textviewer","XBMCAddon::xbmcgui::Dialog"))-> textviewer( heading, text, usemono ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"textviewer\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"textviewer\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_browse (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "type", - "heading", - "shares", - "mask", - "useThumbs", - "treatAsFolder", - "defaultt", - "enableMultiple", - NULL}; - - int type ; - std::string heading ; - PyObject* pyheading = NULL; - std::string shares ; - PyObject* pyshares = NULL; - std::string mask = XBMCAddon::emptyString; - PyObject* pymask = NULL; - bool useThumbs = false; - bool treatAsFolder = false; - std::string defaultt = XBMCAddon::emptyString; - PyObject* pydefaultt = NULL; - bool enableMultiple = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iOO|ObbOb", - const_cast(keywords), - &type, - &pyheading, - &pyshares, - &pymask, - &useThumbs, - &treatAsFolder, - &pydefaultt, - &enableMultiple - )) - { - return NULL; - } - - Alternative< XBMCAddon::String ,std::vector< XBMCAddon::String > > apiResult; - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","browse"); - if (pyshares) PyXBMCGetUnicodeString(shares,pyshares,false,"shares","browse"); - if (pymask) PyXBMCGetUnicodeString(mask,pymask,false,"mask","browse"); - if (pydefaultt) PyXBMCGetUnicodeString(defaultt,pydefaultt,false,"defaultt","browse"); - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"browse","XBMCAddon::xbmcgui::Dialog"))-> browse( type, heading, shares, mask, useThumbs, treatAsFolder, defaultt, enableMultiple ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"browse\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"browse\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - WhichAlternative pos = apiResult.which(); - - if (pos != XBMCAddon::none) - { - if (pos == XBMCAddon::first) - { - std::string & entry1 = apiResult.former(); - { - result = PyString_FromStringAndSize(entry1.c_str(), entry1.length()); - } - } - - if (pos == XBMCAddon::second) - { - std::vector< XBMCAddon::String > & entry1 = apiResult.later(); - { - - result = PyList_New(0); - - for (std::vector::iterator iter = entry1.begin(); iter != entry1.end(); ++iter) - { - std::string & entry2 = *iter; - PyObject* pyentry2; - pyentry2 = PyString_FromStringAndSize(entry2.c_str(), entry2.length()); - PyList_Append(result, pyentry2); - Py_DECREF(pyentry2); - } - - - } - } - - } - else - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_browseSingle (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "type", - "heading", - "shares", - "mask", - "useThumbs", - "treatAsFolder", - "defaultt", - NULL}; - - int type ; - std::string heading ; - PyObject* pyheading = NULL; - std::string shares ; - PyObject* pyshares = NULL; - std::string mask = XBMCAddon::emptyString; - PyObject* pymask = NULL; - bool useThumbs = false; - bool treatAsFolder = false; - std::string defaultt = XBMCAddon::emptyString; - PyObject* pydefaultt = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iOO|ObbO", - const_cast(keywords), - &type, - &pyheading, - &pyshares, - &pymask, - &useThumbs, - &treatAsFolder, - &pydefaultt - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","browseSingle"); - if (pyshares) PyXBMCGetUnicodeString(shares,pyshares,false,"shares","browseSingle"); - if (pymask) PyXBMCGetUnicodeString(mask,pymask,false,"mask","browseSingle"); - if (pydefaultt) PyXBMCGetUnicodeString(defaultt,pydefaultt,false,"defaultt","browseSingle"); - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"browseSingle","XBMCAddon::xbmcgui::Dialog"))-> browseSingle( type, heading, shares, mask, useThumbs, treatAsFolder, defaultt ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"browseSingle\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"browseSingle\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_browseMultiple (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "type", - "heading", - "shares", - "mask", - "useThumbs", - "treatAsFolder", - "defaultt", - NULL}; - - int type ; - std::string heading ; - PyObject* pyheading = NULL; - std::string shares ; - PyObject* pyshares = NULL; - std::string mask = XBMCAddon::emptyString; - PyObject* pymask = NULL; - bool useThumbs = false; - bool treatAsFolder = false; - std::string defaultt = XBMCAddon::emptyString; - PyObject* pydefaultt = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iOO|ObbO", - const_cast(keywords), - &type, - &pyheading, - &pyshares, - &pymask, - &useThumbs, - &treatAsFolder, - &pydefaultt - )) - { - return NULL; - } - - std::vector< XBMCAddon::String > apiResult; - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","browseMultiple"); - if (pyshares) PyXBMCGetUnicodeString(shares,pyshares,false,"shares","browseMultiple"); - if (pymask) PyXBMCGetUnicodeString(mask,pymask,false,"mask","browseMultiple"); - if (pydefaultt) PyXBMCGetUnicodeString(defaultt,pydefaultt,false,"defaultt","browseMultiple"); - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"browseMultiple","XBMCAddon::xbmcgui::Dialog"))-> browseMultiple( type, heading, shares, mask, useThumbs, treatAsFolder, defaultt ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"browseMultiple\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"browseMultiple\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - result = PyList_New(0); - - for (std::vector::iterator iter = apiResult.begin(); iter != apiResult.end(); ++iter) - { - std::string & entry1 = *iter; - PyObject* pyentry1; - pyentry1 = PyString_FromStringAndSize(entry1.c_str(), entry1.length()); - PyList_Append(result, pyentry1); - Py_DECREF(pyentry1); - } - - - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_numeric (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "type", - "heading", - "defaultt", - NULL}; - - int type ; - std::string heading ; - PyObject* pyheading = NULL; - std::string defaultt = XBMCAddon::emptyString; - PyObject* pydefaultt = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iO|O", - const_cast(keywords), - &type, - &pyheading, - &pydefaultt - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","numeric"); - if (pydefaultt) PyXBMCGetUnicodeString(defaultt,pydefaultt,false,"defaultt","numeric"); - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"numeric","XBMCAddon::xbmcgui::Dialog"))-> numeric( type, heading, defaultt ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"numeric\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"numeric\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_notification (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "heading", - "message", - "icon", - "time", - "sound", - NULL}; - - std::string heading ; - PyObject* pyheading = NULL; - std::string message ; - PyObject* pymessage = NULL; - std::string icon = XBMCAddon::emptyString; - PyObject* pyicon = NULL; - int time = 0; - bool sound = true; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO|Oib", - const_cast(keywords), - &pyheading, - &pymessage, - &pyicon, - &time, - &sound - )) - { - return NULL; - } - - - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","notification"); - if (pymessage) PyXBMCGetUnicodeString(message,pymessage,false,"message","notification"); - if (pyicon) PyXBMCGetUnicodeString(icon,pyicon,false,"icon","notification"); - - ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"notification","XBMCAddon::xbmcgui::Dialog"))-> notification( heading, message, icon, time, sound ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"notification\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"notification\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Dialog_input (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "heading", - "defaultt", - "type", - "option", - "autoclose", - NULL}; - - std::string heading ; - PyObject* pyheading = NULL; - std::string defaultt = XBMCAddon::emptyString; - PyObject* pydefaultt = NULL; - int type = 0; - int option = 0; - int autoclose = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|Oiii", - const_cast(keywords), - &pyheading, - &pydefaultt, - &type, - &option, - &autoclose - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","input"); - if (pydefaultt) PyXBMCGetUnicodeString(defaultt,pydefaultt,false,"defaultt","input"); - - apiResult = ((XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"input","XBMCAddon::xbmcgui::Dialog"))-> input( heading, defaultt, type, option, autoclose ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"input\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"input\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogProgress_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcgui::DialogProgress * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::DialogProgress( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::DialogProgress\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::DialogProgress\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogProgress_create (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "heading", - "line1", - "line2", - "line3", - NULL}; - - std::string heading ; - PyObject* pyheading = NULL; - std::string line1 = XBMCAddon::emptyString; - PyObject* pyline1 = NULL; - std::string line2 = XBMCAddon::emptyString; - PyObject* pyline2 = NULL; - std::string line3 = XBMCAddon::emptyString; - PyObject* pyline3 = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|OOO", - const_cast(keywords), - &pyheading, - &pyline1, - &pyline2, - &pyline3 - )) - { - return NULL; - } - - - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","create"); - if (pyline1) PyXBMCGetUnicodeString(line1,pyline1,false,"line1","create"); - if (pyline2) PyXBMCGetUnicodeString(line2,pyline2,false,"line2","create"); - if (pyline3) PyXBMCGetUnicodeString(line3,pyline3,false,"line3","create"); - - ((XBMCAddon::xbmcgui::DialogProgress*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogProgress_Type,"create","XBMCAddon::xbmcgui::DialogProgress"))-> create( heading, line1, line2, line3 ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"create\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"create\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogProgress_update (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "percent", - "line1", - "line2", - "line3", - NULL}; - - int percent ; - std::string line1 = XBMCAddon::emptyString; - PyObject* pyline1 = NULL; - std::string line2 = XBMCAddon::emptyString; - PyObject* pyline2 = NULL; - std::string line3 = XBMCAddon::emptyString; - PyObject* pyline3 = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i|OOO", - const_cast(keywords), - &percent, - &pyline1, - &pyline2, - &pyline3 - )) - { - return NULL; - } - - - try - { - if (pyline1) PyXBMCGetUnicodeString(line1,pyline1,false,"line1","update"); - if (pyline2) PyXBMCGetUnicodeString(line2,pyline2,false,"line2","update"); - if (pyline3) PyXBMCGetUnicodeString(line3,pyline3,false,"line3","update"); - - ((XBMCAddon::xbmcgui::DialogProgress*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogProgress_Type,"update","XBMCAddon::xbmcgui::DialogProgress"))-> update( percent, line1, line2, line3 ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"update\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"update\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogProgress_close (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::DialogProgress*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogProgress_Type,"close","XBMCAddon::xbmcgui::DialogProgress"))-> close( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"close\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"close\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogProgress_iscanceled (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::DialogProgress*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogProgress_Type,"iscanceled","XBMCAddon::xbmcgui::DialogProgress"))-> iscanceled( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"iscanceled\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"iscanceled\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogBusy_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcgui::DialogBusy * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::DialogBusy( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::DialogBusy\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::DialogBusy\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogBusy_create (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::DialogBusy*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogBusy_Type,"create","XBMCAddon::xbmcgui::DialogBusy"))-> create( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"create\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"create\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogBusy_update (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "percent", - NULL}; - - int percent ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &percent - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::DialogBusy*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogBusy_Type,"update","XBMCAddon::xbmcgui::DialogBusy"))-> update( percent ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"update\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"update\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogBusy_close (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::DialogBusy*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogBusy_Type,"close","XBMCAddon::xbmcgui::DialogBusy"))-> close( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"close\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"close\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogBusy_iscanceled (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::DialogBusy*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogBusy_Type,"iscanceled","XBMCAddon::xbmcgui::DialogBusy"))-> iscanceled( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"iscanceled\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"iscanceled\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcgui::DialogProgressBG * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::DialogProgressBG( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::DialogProgressBG\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::DialogProgressBG\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_create (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "heading", - "message", - NULL}; - - std::string heading ; - PyObject* pyheading = NULL; - std::string message = XBMCAddon::emptyString; - PyObject* pymessage = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|O", - const_cast(keywords), - &pyheading, - &pymessage - )) - { - return NULL; - } - - - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","create"); - if (pymessage) PyXBMCGetUnicodeString(message,pymessage,false,"message","create"); - - ((XBMCAddon::xbmcgui::DialogProgressBG*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogProgressBG_Type,"create","XBMCAddon::xbmcgui::DialogProgressBG"))-> create( heading, message ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"create\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"create\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_update (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "percent", - "heading", - "message", - NULL}; - - int percent = 0; - std::string heading = XBMCAddon::emptyString; - PyObject* pyheading = NULL; - std::string message = XBMCAddon::emptyString; - PyObject* pymessage = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|iOO", - const_cast(keywords), - &percent, - &pyheading, - &pymessage - )) - { - return NULL; - } - - - try - { - if (pyheading) PyXBMCGetUnicodeString(heading,pyheading,false,"heading","update"); - if (pymessage) PyXBMCGetUnicodeString(message,pymessage,false,"message","update"); - - ((XBMCAddon::xbmcgui::DialogProgressBG*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogProgressBG_Type,"update","XBMCAddon::xbmcgui::DialogProgressBG"))-> update( percent, heading, message ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"update\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"update\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_close (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::DialogProgressBG*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogProgressBG_Type,"close","XBMCAddon::xbmcgui::DialogProgressBG"))-> close( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"close\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"close\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_isFinished (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - bool apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::DialogProgressBG*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogProgressBG_Type,"isFinished","XBMCAddon::xbmcgui::DialogProgressBG"))-> isFinished( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"isFinished\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"isFinished\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Action_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcgui::Action * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcgui::Action( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::Action\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::Action\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Action_getId (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Action*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Action_Type,"getId","XBMCAddon::xbmcgui::Action"))-> getId( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getId\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getId\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Action_getButtonCode (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Action*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Action_Type,"getButtonCode","XBMCAddon::xbmcgui::Action"))-> getButtonCode( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getButtonCode\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getButtonCode\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Action_getAmount1 (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - float apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Action*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Action_Type,"getAmount1","XBMCAddon::xbmcgui::Action"))-> getAmount1( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAmount1\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAmount1\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("f", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Action_getAmount2 (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - float apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Action*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Action_Type,"getAmount2","XBMCAddon::xbmcgui::Action"))-> getAmount2( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getAmount2\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getAmount2\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("f", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - int existingWindowId = -1; - if (!PyArg_ParseTuple( - args, - - "|i", - - &existingWindowId - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::Window * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = (&(TyXBMCAddon_xbmcgui_Window_Type.pythonType) != pytype) ? new XBMCAddon_xbmcgui_Window_Director( existingWindowId ) : new XBMCAddon::xbmcgui::Window( existingWindowId ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::Window\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::Window\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - if (&(TyXBMCAddon_xbmcgui_Window_Type.pythonType) != pytype) - ((XBMCAddon_xbmcgui_Window_Director*)apiResult)->setPyObjectForDirector(result); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_onAction (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "action", - NULL}; - - XBMCAddon::xbmcgui::Action * action = nullptr; - PyObject* pyaction = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyaction - )) - { - return NULL; - } - - - try - { - action = (XBMCAddon::xbmcgui::Action *)retrieveApiInstance(pyaction,"p.XBMCAddon::xbmcgui::Action","XBMCAddon::xbmcgui::","onAction"); - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"onAction","XBMCAddon::xbmcgui::Window"))-> XBMCAddon::xbmcgui::Window::onAction( action ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onAction\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onAction\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_onControl (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "control", - NULL}; - - XBMCAddon::xbmcgui::Control * control = nullptr; - PyObject* pycontrol = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pycontrol - )) - { - return NULL; - } - - - try - { - control = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pycontrol,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","onControl"); - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"onControl","XBMCAddon::xbmcgui::Window"))-> XBMCAddon::xbmcgui::Window::onControl( control ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onControl\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onControl\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_onClick (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "controlId", - NULL}; - - int controlId ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &controlId - )) - { - return NULL; - } - - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"onClick","XBMCAddon::xbmcgui::Window"))-> XBMCAddon::xbmcgui::Window::onClick( controlId ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onClick\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onClick\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_onDoubleClick (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "controlId", - NULL}; - - int controlId ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &controlId - )) - { - return NULL; - } - - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"onDoubleClick","XBMCAddon::xbmcgui::Window"))-> XBMCAddon::xbmcgui::Window::onDoubleClick( controlId ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onDoubleClick\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onDoubleClick\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_onFocus (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "controlId", - NULL}; - - int controlId ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &controlId - )) - { - return NULL; - } - - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"onFocus","XBMCAddon::xbmcgui::Window"))-> XBMCAddon::xbmcgui::Window::onFocus( controlId ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onFocus\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onFocus\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_onInit (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - // This is a director call coming from python so it explicitly calls the base class method. - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"onInit","XBMCAddon::xbmcgui::Window"))-> XBMCAddon::xbmcgui::Window::onInit( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"onInit\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"onInit\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_show (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"show","XBMCAddon::xbmcgui::Window"))-> show( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"show\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"show\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_setFocus (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "pControl", - NULL}; - - XBMCAddon::xbmcgui::Control * pControl = nullptr; - PyObject* pypControl = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypControl - )) - { - return NULL; - } - - - try - { - pControl = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pypControl,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","setFocus"); - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"setFocus","XBMCAddon::xbmcgui::Window"))-> setFocus( pControl ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setFocus\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setFocus\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_setFocusId (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "iControlId", - NULL}; - - int iControlId ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &iControlId - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"setFocusId","XBMCAddon::xbmcgui::Window"))-> setFocusId( iControlId ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setFocusId\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setFocusId\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_getFocus (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcgui::Control * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"getFocus","XBMCAddon::xbmcgui::Window"))-> getFocus( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getFocus\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getFocus\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_getFocusId (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"getFocusId","XBMCAddon::xbmcgui::Window"))-> getFocusId( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getFocusId\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getFocusId\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_removeControl (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "pControl", - NULL}; - - XBMCAddon::xbmcgui::Control * pControl = nullptr; - PyObject* pypControl = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypControl - )) - { - return NULL; - } - - - try - { - pControl = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pypControl,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","removeControl"); - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"removeControl","XBMCAddon::xbmcgui::Window"))-> removeControl( pControl ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"removeControl\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"removeControl\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_removeControls (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "pControls", - NULL}; - - std::vector< XBMCAddon::xbmcgui::Control * > pControls ; - PyObject* pypControls = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypControls - )) - { - return NULL; - } - - - try - { - - if (pypControls) - { - bool isTuple = PyObject_TypeCheck(pypControls,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pypControls,&PyList_Type)) - throw WrongTypeException("The parameter \"pControls\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pypControls) : PyList_Size(pypControls)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pypControls, i) : PyList_GetItem(pypControls, i)); - XBMCAddon::xbmcgui::Control * entry1; - entry1 = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pyentry1,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","removeControls"); - pControls.push_back(entry1); - } - } - - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"removeControls","XBMCAddon::xbmcgui::Window"))-> removeControls( pControls ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"removeControls\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"removeControls\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_getHeight (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"getHeight","XBMCAddon::xbmcgui::Window"))-> getHeight( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getHeight\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getHeight\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_getWidth (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"getWidth","XBMCAddon::xbmcgui::Window"))-> getWidth( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getWidth\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getWidth\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_getResolution (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"getResolution","XBMCAddon::xbmcgui::Window"))-> getResolution( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getResolution\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getResolution\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyInt_FromLong(apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_setCoordinateResolution (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "res", - NULL}; - - long res ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "l", - const_cast(keywords), - &res - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"setCoordinateResolution","XBMCAddon::xbmcgui::Window"))-> setCoordinateResolution( res ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setCoordinateResolution\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setCoordinateResolution\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_setProperty (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "key", - "value", - NULL}; - - char * key = nullptr; - std::string value ; - PyObject* pyvalue = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "sO", - const_cast(keywords), - &key, - &pyvalue - )) - { - return NULL; - } - - - try - { - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,false,"value","setProperty"); - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"setProperty","XBMCAddon::xbmcgui::Window"))-> setProperty( key, value ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setProperty\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setProperty\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_getProperty (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "key", - NULL}; - - char * key = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &key - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"getProperty","XBMCAddon::xbmcgui::Window"))-> getProperty( key ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getProperty\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getProperty\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_clearProperty (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "key", - NULL}; - - char * key = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "s", - const_cast(keywords), - &key - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"clearProperty","XBMCAddon::xbmcgui::Window"))-> clearProperty( key ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"clearProperty\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"clearProperty\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_clearProperties (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"clearProperties","XBMCAddon::xbmcgui::Window"))-> clearProperties( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"clearProperties\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"clearProperties\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_close (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"close","XBMCAddon::xbmcgui::Window"))-> close( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"close\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"close\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_doModal (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"doModal","XBMCAddon::xbmcgui::Window"))-> doModal( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"doModal\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"doModal\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_addControl (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "pControl", - NULL}; - - XBMCAddon::xbmcgui::Control * pControl = nullptr; - PyObject* pypControl = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypControl - )) - { - return NULL; - } - - - try - { - pControl = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pypControl,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","addControl"); - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"addControl","XBMCAddon::xbmcgui::Window"))-> addControl( pControl ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addControl\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addControl\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_addControls (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "pControls", - NULL}; - - std::vector< XBMCAddon::xbmcgui::Control * > pControls ; - PyObject* pypControls = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypControls - )) - { - return NULL; - } - - - try - { - - if (pypControls) - { - bool isTuple = PyObject_TypeCheck(pypControls,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pypControls,&PyList_Type)) - throw WrongTypeException("The parameter \"pControls\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pypControls) : PyList_Size(pypControls)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pypControls, i) : PyList_GetItem(pypControls, i)); - XBMCAddon::xbmcgui::Control * entry1; - entry1 = (XBMCAddon::xbmcgui::Control *)retrieveApiInstance(pyentry1,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","addControls"); - pControls.push_back(entry1); - } - } - - - ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"addControls","XBMCAddon::xbmcgui::Window"))-> addControls( pControls ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addControls\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addControls\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Window_getControl (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "iControlId", - NULL}; - - int iControlId ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &iControlId - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::Control * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"getControl","XBMCAddon::xbmcgui::Window"))-> getControl( iControlId ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getControl\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getControl\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowDialog_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcgui::WindowDialog * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = (&(TyXBMCAddon_xbmcgui_WindowDialog_Type.pythonType) != pytype) ? new XBMCAddon_xbmcgui_WindowDialog_Director() : new XBMCAddon::xbmcgui::WindowDialog( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::WindowDialog\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::WindowDialog\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - if (&(TyXBMCAddon_xbmcgui_WindowDialog_Type.pythonType) != pytype) - ((XBMCAddon_xbmcgui_WindowDialog_Director*)apiResult)->setPyObjectForDirector(result); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - std::string xmlFilename ; - PyObject* pyxmlFilename = NULL; - std::string scriptPath ; - PyObject* pyscriptPath = NULL; - std::string defaultSkin = "Default"; - PyObject* pydefaultSkin = NULL; - std::string defaultRes = "720p"; - PyObject* pydefaultRes = NULL; - bool isMedia = false; - if (!PyArg_ParseTuple( - args, - - "OO|OOb", - - &pyxmlFilename, - &pyscriptPath, - &pydefaultSkin, - &pydefaultRes, - &isMedia - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::WindowXML * apiResult; - try - { - if (pyxmlFilename) PyXBMCGetUnicodeString(xmlFilename,pyxmlFilename,false,"xmlFilename","WindowXML"); - if (pyscriptPath) PyXBMCGetUnicodeString(scriptPath,pyscriptPath,false,"scriptPath","WindowXML"); - if (pydefaultSkin) PyXBMCGetUnicodeString(defaultSkin,pydefaultSkin,false,"defaultSkin","WindowXML"); - if (pydefaultRes) PyXBMCGetUnicodeString(defaultRes,pydefaultRes,false,"defaultRes","WindowXML"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = (&(TyXBMCAddon_xbmcgui_WindowXML_Type.pythonType) != pytype) ? new XBMCAddon_xbmcgui_WindowXML_Director( xmlFilename, scriptPath, defaultSkin, defaultRes, isMedia ) : new XBMCAddon::xbmcgui::WindowXML( xmlFilename, scriptPath, defaultSkin, defaultRes, isMedia ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::WindowXML\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::WindowXML\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - if (&(TyXBMCAddon_xbmcgui_WindowXML_Type.pythonType) != pytype) - ((XBMCAddon_xbmcgui_WindowXML_Director*)apiResult)->setPyObjectForDirector(result); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_addItem (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "item", - "position", - NULL}; - - Alternative< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const * > item ; - PyObject* pyitem = NULL; - int position = INT_MAX; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|i", - const_cast(keywords), - &pyitem, - &position - )) - { - return NULL; - } - - - try - { - - { - // we need to check the parameter type and see if it matches - PyObject *pyentry_1 = pyitem; - try - { - std::string entry0_1; - if (pyentry_1) PyXBMCGetUnicodeString(entry0_1,pyentry_1,false,"entry0_1","addItem"); - item.former() = entry0_1; - } - catch (const XBMCAddon::WrongTypeException&) - { - try - { - XBMCAddon::xbmcgui::ListItem * entry1_1; - entry1_1 = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pyentry_1,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcgui::","addItem"); - item.later() = entry1_1; - } - catch (const XBMCAddon::WrongTypeException&) - { - throw XBMCAddon::WrongTypeException("Failed to convert to input type to either a " - "std::string or a " - "p.XBMCAddon::xbmcgui::ListItem" ); - } - } - } - - ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"addItem","XBMCAddon::xbmcgui::WindowXML"))-> addItem( item, position ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_addItems (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "items", - NULL}; - - std::vector< Alternative< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const * > > items ; - PyObject* pyitems = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyitems - )) - { - return NULL; - } - - - try - { - - if (pyitems) - { - bool isTuple = PyObject_TypeCheck(pyitems,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyitems,&PyList_Type)) - throw WrongTypeException("The parameter \"items\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyitems) : PyList_Size(pyitems)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyitems, i) : PyList_GetItem(pyitems, i)); - Alternative< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const * > entry1; - - { - // we need to check the parameter type and see if it matches - PyObject *pyentry_2 = pyentry1; - try - { - std::string entry0_2; - if (pyentry_2) PyXBMCGetUnicodeString(entry0_2,pyentry_2,false,"entry0_2","addItems"); - entry1.former() = entry0_2; - } - catch (const XBMCAddon::WrongTypeException&) - { - try - { - XBMCAddon::xbmcgui::ListItem * entry1_2; - entry1_2 = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pyentry_2,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcgui::","addItems"); - entry1.later() = entry1_2; - } - catch (const XBMCAddon::WrongTypeException&) - { - throw XBMCAddon::WrongTypeException("Failed to convert to input type to either a " - "std::string or a " - "p.XBMCAddon::xbmcgui::ListItem" ); - } - } - } - items.push_back(entry1); - } - } - - - ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"addItems","XBMCAddon::xbmcgui::WindowXML"))-> addItems( items ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"addItems\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"addItems\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_removeItem (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "position", - NULL}; - - int position ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &position - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"removeItem","XBMCAddon::xbmcgui::WindowXML"))-> removeItem( position ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"removeItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"removeItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_getCurrentListPosition (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"getCurrentListPosition","XBMCAddon::xbmcgui::WindowXML"))-> getCurrentListPosition( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getCurrentListPosition\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getCurrentListPosition\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_setCurrentListPosition (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "position", - NULL}; - - int position ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &position - )) - { - return NULL; - } - - - try - { - - ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"setCurrentListPosition","XBMCAddon::xbmcgui::WindowXML"))-> setCurrentListPosition( position ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setCurrentListPosition\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setCurrentListPosition\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_getListItem (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "position", - NULL}; - - int position ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i", - const_cast(keywords), - &position - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::ListItem * apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"getListItem","XBMCAddon::xbmcgui::WindowXML"))-> getListItem( position ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getListItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getListItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_getListSize (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"getListSize","XBMCAddon::xbmcgui::WindowXML"))-> getListSize( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getListSize\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getListSize\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_clearList (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"clearList","XBMCAddon::xbmcgui::WindowXML"))-> clearList( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"clearList\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"clearList\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_setContainerProperty (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "strProperty", - "strValue", - NULL}; - - std::string strProperty ; - PyObject* pystrProperty = NULL; - std::string strValue ; - PyObject* pystrValue = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO", - const_cast(keywords), - &pystrProperty, - &pystrValue - )) - { - return NULL; - } - - - try - { - if (pystrProperty) PyXBMCGetUnicodeString(strProperty,pystrProperty,false,"strProperty","setContainerProperty"); - if (pystrValue) PyXBMCGetUnicodeString(strValue,pystrValue,false,"strValue","setContainerProperty"); - - ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"setContainerProperty","XBMCAddon::xbmcgui::WindowXML"))-> setContainerProperty( strProperty, strValue ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setContainerProperty\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setContainerProperty\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_setContent (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "strValue", - NULL}; - - std::string strValue ; - PyObject* pystrValue = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pystrValue - )) - { - return NULL; - } - - - try - { - if (pystrValue) PyXBMCGetUnicodeString(strValue,pystrValue,false,"strValue","setContent"); - - ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"setContent","XBMCAddon::xbmcgui::WindowXML"))-> setContent( strValue ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"setContent\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"setContent\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXML_getCurrentContainerId (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - int apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"getCurrentContainerId","XBMCAddon::xbmcgui::WindowXML"))-> getCurrentContainerId( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"getCurrentContainerId\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"getCurrentContainerId\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("i", apiResult); - - return result; - } - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_WindowXMLDialog_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - std::string xmlFilename ; - PyObject* pyxmlFilename = NULL; - std::string scriptPath ; - PyObject* pyscriptPath = NULL; - std::string defaultSkin = "Default"; - PyObject* pydefaultSkin = NULL; - std::string defaultRes = "720p"; - PyObject* pydefaultRes = NULL; - if (!PyArg_ParseTuple( - args, - - "OO|OO", - - &pyxmlFilename, - &pyscriptPath, - &pydefaultSkin, - &pydefaultRes - )) - { - return NULL; - } - - XBMCAddon::xbmcgui::WindowXMLDialog * apiResult; - try - { - if (pyxmlFilename) PyXBMCGetUnicodeString(xmlFilename,pyxmlFilename,false,"xmlFilename","WindowXMLDialog"); - if (pyscriptPath) PyXBMCGetUnicodeString(scriptPath,pyscriptPath,false,"scriptPath","WindowXMLDialog"); - if (pydefaultSkin) PyXBMCGetUnicodeString(defaultSkin,pydefaultSkin,false,"defaultSkin","WindowXMLDialog"); - if (pydefaultRes) PyXBMCGetUnicodeString(defaultRes,pydefaultRes,false,"defaultRes","WindowXMLDialog"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = (&(TyXBMCAddon_xbmcgui_WindowXMLDialog_Type.pythonType) != pytype) ? new XBMCAddon_xbmcgui_WindowXMLDialog_Director( xmlFilename, scriptPath, defaultSkin, defaultRes ) : new XBMCAddon::xbmcgui::WindowXMLDialog( xmlFilename, scriptPath, defaultSkin, defaultRes ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::WindowXMLDialog\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcgui::WindowXMLDialog\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - if (&(TyXBMCAddon_xbmcgui_WindowXMLDialog_Type.pythonType) != pytype) - ((XBMCAddon_xbmcgui_WindowXMLDialog_Director*)apiResult)->setPyObjectForDirector(result); - - return result; - } - - static void xbmcgui_XBMCAddon_xbmcgui_ListItem_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ListItem* theObj = (XBMCAddon::xbmcgui::ListItem*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ListItem_Type,"~XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcgui::ListItem"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ListItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ListItem\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_Control_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::Control* theObj = (XBMCAddon::xbmcgui::Control*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Control_Type,"~XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::Control"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::Control\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::Control\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlSpin_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlSpin* theObj = (XBMCAddon::xbmcgui::ControlSpin*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlSpin_Type,"~XBMCAddon::xbmcgui::ControlSpin","XBMCAddon::xbmcgui::ControlSpin"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlSpin\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlSpin\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlLabel_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlLabel* theObj = (XBMCAddon::xbmcgui::ControlLabel*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlLabel_Type,"~XBMCAddon::xbmcgui::ControlLabel","XBMCAddon::xbmcgui::ControlLabel"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlLabel\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlEdit_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlEdit* theObj = (XBMCAddon::xbmcgui::ControlEdit*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlEdit_Type,"~XBMCAddon::xbmcgui::ControlEdit","XBMCAddon::xbmcgui::ControlEdit"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlEdit\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlEdit\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlList_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlList* theObj = (XBMCAddon::xbmcgui::ControlList*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlList_Type,"~XBMCAddon::xbmcgui::ControlList","XBMCAddon::xbmcgui::ControlList"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlList\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlList\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlFadeLabel_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlFadeLabel* theObj = (XBMCAddon::xbmcgui::ControlFadeLabel*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlFadeLabel_Type,"~XBMCAddon::xbmcgui::ControlFadeLabel","XBMCAddon::xbmcgui::ControlFadeLabel"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlFadeLabel\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlFadeLabel\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlTextBox* theObj = (XBMCAddon::xbmcgui::ControlTextBox*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlTextBox_Type,"~XBMCAddon::xbmcgui::ControlTextBox","XBMCAddon::xbmcgui::ControlTextBox"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlTextBox\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlTextBox\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlImage_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlImage* theObj = (XBMCAddon::xbmcgui::ControlImage*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlImage_Type,"~XBMCAddon::xbmcgui::ControlImage","XBMCAddon::xbmcgui::ControlImage"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlImage\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlImage\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlProgress_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlProgress* theObj = (XBMCAddon::xbmcgui::ControlProgress*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlProgress_Type,"~XBMCAddon::xbmcgui::ControlProgress","XBMCAddon::xbmcgui::ControlProgress"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlProgress\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlProgress\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlButton_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlButton* theObj = (XBMCAddon::xbmcgui::ControlButton*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlButton_Type,"~XBMCAddon::xbmcgui::ControlButton","XBMCAddon::xbmcgui::ControlButton"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlButton\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlButton\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlGroup_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlGroup* theObj = (XBMCAddon::xbmcgui::ControlGroup*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlGroup_Type,"~XBMCAddon::xbmcgui::ControlGroup","XBMCAddon::xbmcgui::ControlGroup"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlGroup\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlGroup\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlRadioButton* theObj = (XBMCAddon::xbmcgui::ControlRadioButton*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlRadioButton_Type,"~XBMCAddon::xbmcgui::ControlRadioButton","XBMCAddon::xbmcgui::ControlRadioButton"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlRadioButton\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlRadioButton\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_ControlSlider_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::ControlSlider* theObj = (XBMCAddon::xbmcgui::ControlSlider*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_ControlSlider_Type,"~XBMCAddon::xbmcgui::ControlSlider","XBMCAddon::xbmcgui::ControlSlider"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlSlider\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::ControlSlider\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_Dialog_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::Dialog* theObj = (XBMCAddon::xbmcgui::Dialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Dialog_Type,"~XBMCAddon::xbmcgui::Dialog","XBMCAddon::xbmcgui::Dialog"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::Dialog\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::Dialog\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_DialogProgress_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::DialogProgress* theObj = (XBMCAddon::xbmcgui::DialogProgress*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogProgress_Type,"~XBMCAddon::xbmcgui::DialogProgress","XBMCAddon::xbmcgui::DialogProgress"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::DialogProgress\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::DialogProgress\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_DialogBusy_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::DialogBusy* theObj = (XBMCAddon::xbmcgui::DialogBusy*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogBusy_Type,"~XBMCAddon::xbmcgui::DialogBusy","XBMCAddon::xbmcgui::DialogBusy"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::DialogBusy\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::DialogBusy\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::DialogProgressBG* theObj = (XBMCAddon::xbmcgui::DialogProgressBG*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_DialogProgressBG_Type,"~XBMCAddon::xbmcgui::DialogProgressBG","XBMCAddon::xbmcgui::DialogProgressBG"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::DialogProgressBG\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::DialogProgressBG\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_Action_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::Action* theObj = (XBMCAddon::xbmcgui::Action*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Action_Type,"~XBMCAddon::xbmcgui::Action","XBMCAddon::xbmcgui::Action"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::Action\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::Action\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_Window_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::Window* theObj = (XBMCAddon::xbmcgui::Window*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_Window_Type,"~XBMCAddon::xbmcgui::Window","XBMCAddon::xbmcgui::Window"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::Window\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::Window\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_WindowDialog_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::WindowDialog* theObj = (XBMCAddon::xbmcgui::WindowDialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowDialog_Type,"~XBMCAddon::xbmcgui::WindowDialog","XBMCAddon::xbmcgui::WindowDialog"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::WindowDialog\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::WindowDialog\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_WindowXML_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::WindowXML* theObj = (XBMCAddon::xbmcgui::WindowXML*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXML_Type,"~XBMCAddon::xbmcgui::WindowXML","XBMCAddon::xbmcgui::WindowXML"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::WindowXML\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::WindowXML\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcgui_XBMCAddon_xbmcgui_WindowXMLDialog_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcgui::WindowXMLDialog* theObj = (XBMCAddon::xbmcgui::WindowXMLDialog*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcgui_WindowXMLDialog_Type,"~XBMCAddon::xbmcgui::WindowXMLDialog","XBMCAddon::xbmcgui::WindowXMLDialog"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcgui::WindowXMLDialog\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcgui::WindowXMLDialog\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ListItem - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ListItem_methods[] = { - {"getLabel", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getLabel2", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getLabel2, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setLabel", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setLabel2", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setLabel2, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setIconImage", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setIconImage, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setThumbnailImage", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setThumbnailImage, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setArt", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setArt, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setIsFolder", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setIsFolder, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setUniqueIDs", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setUniqueIDs, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setRating", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setRating, METH_VARARGS|METH_KEYWORDS, NULL }, - {"addSeason", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_addSeason, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getArt", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getArt, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getUniqueID", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getUniqueID, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getRating", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getRating, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getVotes", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getVotes, METH_VARARGS|METH_KEYWORDS, NULL }, - {"select", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_select, METH_VARARGS|METH_KEYWORDS, NULL }, - {"isSelected", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_isSelected, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setInfo", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setInfo, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setCast", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setCast, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setAvailableFanart", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setAvailableFanart, METH_VARARGS|METH_KEYWORDS, NULL }, - {"addAvailableArtwork", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_addAvailableArtwork, METH_VARARGS|METH_KEYWORDS, NULL }, - {"addStreamInfo", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_addStreamInfo, METH_VARARGS|METH_KEYWORDS, NULL }, - {"addContextMenuItems", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_addContextMenuItems, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setProperty", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setProperty, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setProperties", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setProperties, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getProperty", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getProperty, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setPath", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setPath, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setMimeType", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setMimeType, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setContentLookup", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setContentLookup, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setSubtitles", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_setSubtitles, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getdescription", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getdescription, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getduration", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getduration, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getfilename", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getfilename, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPath", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getPath, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getVideoInfoTag", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getVideoInfoTag, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getMusicInfoTag", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ListItem_getMusicInfoTag, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ListItem_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ListItem_Type.pythonType; - pythonType.tp_name = "xbmcgui.ListItem"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ListItem_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ListItem_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ListItem_New; - - TyXBMCAddon_xbmcgui_ListItem_Type.swigType="p.XBMCAddon::xbmcgui::ListItem"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ListItem_Type); - - } - //========================================================================= - - static int xbmcgui_XBMCAddon_xbmcgui_Control_cmp(PyObject* obj1, PyObject* obj2) - { - return PythonCompare::compare(obj1,obj2,"p.XBMCAddon::xbmcgui::Control","XBMCAddon::xbmcgui::","compare on XBMCAddon::xbmcgui::Control"); - } - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::Control - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_Control_methods[] = { - {"canAcceptMessages", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_canAcceptMessages, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getId", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_getId, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPosition", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_getPosition, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getX", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_getX, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getY", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_getY, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getHeight", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_getHeight, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getWidth", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_getWidth, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setEnabled", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_setEnabled, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setVisible", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_setVisible, METH_VARARGS|METH_KEYWORDS, NULL }, - {"isVisible", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_isVisible, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setVisibleCondition", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_setVisibleCondition, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setEnableCondition", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_setEnableCondition, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setAnimations", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_setAnimations, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setPosition", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_setPosition, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setWidth", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_setWidth, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setHeight", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_setHeight, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setNavigation", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_setNavigation, METH_VARARGS|METH_KEYWORDS, NULL }, - {"controlUp", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_controlUp, METH_VARARGS|METH_KEYWORDS, NULL }, - {"controlDown", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_controlDown, METH_VARARGS|METH_KEYWORDS, NULL }, - {"controlLeft", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_controlLeft, METH_VARARGS|METH_KEYWORDS, NULL }, - {"controlRight", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Control_controlRight, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_Control_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_Control_Type.pythonType; - pythonType.tp_name = "xbmcgui.Control"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_Control_Dealloc; - pythonType.tp_compare=xbmcgui_XBMCAddon_xbmcgui_Control_cmp; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_Control_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = NULL; - - TyXBMCAddon_xbmcgui_Control_Type.swigType="p.XBMCAddon::xbmcgui::Control"; - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlSpin - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlSpin_methods[] = { - {"setTextures", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlSpin_setTextures, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlSpin_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlSpin_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlSpin"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlSpin_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlSpin_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = NULL; - - TyXBMCAddon_xbmcgui_ControlSpin_Type.swigType="p.XBMCAddon::xbmcgui::ControlSpin"; - TyXBMCAddon_xbmcgui_ControlSpin_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlLabel - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlLabel_methods[] = { - {"getLabel", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlLabel_getLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setLabel", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlLabel_setLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlLabel_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlLabel_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlLabel"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlLabel_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlLabel_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlLabel_New; - - TyXBMCAddon_xbmcgui_ControlLabel_Type.swigType="p.XBMCAddon::xbmcgui::ControlLabel"; - TyXBMCAddon_xbmcgui_ControlLabel_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlLabel_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlEdit - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlEdit_methods[] = { - {"setLabel", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlEdit_setLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getLabel", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlEdit_getLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setText", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlEdit_setText, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getText", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlEdit_getText, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setType", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlEdit_setType, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlEdit_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlEdit_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlEdit"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlEdit_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlEdit_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlEdit_New; - - TyXBMCAddon_xbmcgui_ControlEdit_Type.swigType="p.XBMCAddon::xbmcgui::ControlEdit"; - TyXBMCAddon_xbmcgui_ControlEdit_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlEdit_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlList - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlList_methods[] = { - {"addItem", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_addItem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"addItems", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_addItems, METH_VARARGS|METH_KEYWORDS, NULL }, - {"selectItem", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_selectItem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"removeItem", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_removeItem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"reset", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_reset, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSpinControl", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_getSpinControl, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSelectedPosition", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_getSelectedPosition, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSelectedItem", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_getSelectedItem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setImageDimensions", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_setImageDimensions, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setItemHeight", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_setItemHeight, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setSpace", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_setSpace, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setPageControlVisible", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_setPageControlVisible, METH_VARARGS|METH_KEYWORDS, NULL }, - {"size", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_size, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getItemHeight", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_getItemHeight, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSpace", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_getSpace, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getListItem", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_getListItem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setStaticContent", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlList_setStaticContent, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlList_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlList_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlList"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlList_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlList_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlList_New; - - TyXBMCAddon_xbmcgui_ControlList_Type.swigType="p.XBMCAddon::xbmcgui::ControlList"; - TyXBMCAddon_xbmcgui_ControlList_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlList_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlFadeLabel - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlFadeLabel_methods[] = { - {"addLabel", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlFadeLabel_addLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setScrolling", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlFadeLabel_setScrolling, METH_VARARGS|METH_KEYWORDS, NULL }, - {"reset", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlFadeLabel_reset, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlFadeLabel_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlFadeLabel_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlFadeLabel"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlFadeLabel_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlFadeLabel_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlFadeLabel_New; - - TyXBMCAddon_xbmcgui_ControlFadeLabel_Type.swigType="p.XBMCAddon::xbmcgui::ControlFadeLabel"; - TyXBMCAddon_xbmcgui_ControlFadeLabel_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlFadeLabel_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlTextBox - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlTextBox_methods[] = { - {"setText", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_setText, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getText", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_getText, METH_VARARGS|METH_KEYWORDS, NULL }, - {"reset", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_reset, METH_VARARGS|METH_KEYWORDS, NULL }, - {"scroll", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_scroll, METH_VARARGS|METH_KEYWORDS, NULL }, - {"autoScroll", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_autoScroll, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlTextBox_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlTextBox_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlTextBox"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlTextBox_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlTextBox_New; - - TyXBMCAddon_xbmcgui_ControlTextBox_Type.swigType="p.XBMCAddon::xbmcgui::ControlTextBox"; - TyXBMCAddon_xbmcgui_ControlTextBox_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlTextBox_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlImage - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlImage_methods[] = { - {"setImage", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlImage_setImage, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setColorDiffuse", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlImage_setColorDiffuse, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlImage_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlImage_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlImage"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlImage_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlImage_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlImage_New; - - TyXBMCAddon_xbmcgui_ControlImage_Type.swigType="p.XBMCAddon::xbmcgui::ControlImage"; - TyXBMCAddon_xbmcgui_ControlImage_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlImage_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlProgress - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlProgress_methods[] = { - {"setPercent", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlProgress_setPercent, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getPercent", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlProgress_getPercent, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlProgress_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlProgress_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlProgress"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlProgress_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlProgress_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlProgress_New; - - TyXBMCAddon_xbmcgui_ControlProgress_Type.swigType="p.XBMCAddon::xbmcgui::ControlProgress"; - TyXBMCAddon_xbmcgui_ControlProgress_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlProgress_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlButton - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlButton_methods[] = { - {"setLabel", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlButton_setLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setDisabledColor", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlButton_setDisabledColor, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getLabel", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlButton_getLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getLabel2", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlButton_getLabel2, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlButton_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlButton_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlButton"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlButton_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlButton_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlButton_New; - - TyXBMCAddon_xbmcgui_ControlButton_Type.swigType="p.XBMCAddon::xbmcgui::ControlButton"; - TyXBMCAddon_xbmcgui_ControlButton_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlButton_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlGroup - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlGroup_methods[] = { - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlGroup_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlGroup_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlGroup"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlGroup_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlGroup_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlGroup_New; - - TyXBMCAddon_xbmcgui_ControlGroup_Type.swigType="p.XBMCAddon::xbmcgui::ControlGroup"; - TyXBMCAddon_xbmcgui_ControlGroup_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlGroup_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlRadioButton - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlRadioButton_methods[] = { - {"setSelected", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_setSelected, METH_VARARGS|METH_KEYWORDS, NULL }, - {"isSelected", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_isSelected, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setLabel", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_setLabel, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setRadioDimension", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_setRadioDimension, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlRadioButton_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlRadioButton_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlRadioButton"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlRadioButton_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlRadioButton_New; - - TyXBMCAddon_xbmcgui_ControlRadioButton_Type.swigType="p.XBMCAddon::xbmcgui::ControlRadioButton"; - TyXBMCAddon_xbmcgui_ControlRadioButton_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlRadioButton_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::ControlSlider - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_ControlSlider_methods[] = { - {"getPercent", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlSlider_getPercent, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setPercent", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlSlider_setPercent, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getInt", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlSlider_getInt, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setInt", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlSlider_setInt, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getFloat", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlSlider_getFloat, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setFloat", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_ControlSlider_setFloat, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_ControlSlider_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_ControlSlider_Type.pythonType; - pythonType.tp_name = "xbmcgui.ControlSlider"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_ControlSlider_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_ControlSlider_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Control_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_ControlSlider_New; - - TyXBMCAddon_xbmcgui_ControlSlider_Type.swigType="p.XBMCAddon::xbmcgui::ControlSlider"; - TyXBMCAddon_xbmcgui_ControlSlider_Type.parentType=&TyXBMCAddon_xbmcgui_Control_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_ControlSlider_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::Dialog - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_Dialog_methods[] = { - {"yesno", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_yesno, METH_VARARGS|METH_KEYWORDS, NULL }, - {"info", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_info, METH_VARARGS|METH_KEYWORDS, NULL }, - {"select", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_select, METH_VARARGS|METH_KEYWORDS, NULL }, - {"contextmenu", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_contextmenu, METH_VARARGS|METH_KEYWORDS, NULL }, - {"multiselect", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_multiselect, METH_VARARGS|METH_KEYWORDS, NULL }, - {"ok", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_ok, METH_VARARGS|METH_KEYWORDS, NULL }, - {"textviewer", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_textviewer, METH_VARARGS|METH_KEYWORDS, NULL }, - {"browse", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_browse, METH_VARARGS|METH_KEYWORDS, NULL }, - {"browseSingle", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_browseSingle, METH_VARARGS|METH_KEYWORDS, NULL }, - {"browseMultiple", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_browseMultiple, METH_VARARGS|METH_KEYWORDS, NULL }, - {"numeric", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_numeric, METH_VARARGS|METH_KEYWORDS, NULL }, - {"notification", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_notification, METH_VARARGS|METH_KEYWORDS, NULL }, - {"input", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Dialog_input, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_Dialog_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_Dialog_Type.pythonType; - pythonType.tp_name = "xbmcgui.Dialog"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_Dialog_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_Dialog_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_Dialog_New; - - TyXBMCAddon_xbmcgui_Dialog_Type.swigType="p.XBMCAddon::xbmcgui::Dialog"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_Dialog_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::DialogProgress - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_DialogProgress_methods[] = { - {"create", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogProgress_create, METH_VARARGS|METH_KEYWORDS, NULL }, - {"update", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogProgress_update, METH_VARARGS|METH_KEYWORDS, NULL }, - {"close", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogProgress_close, METH_VARARGS|METH_KEYWORDS, NULL }, - {"iscanceled", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogProgress_iscanceled, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_DialogProgress_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_DialogProgress_Type.pythonType; - pythonType.tp_name = "xbmcgui.DialogProgress"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_DialogProgress_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_DialogProgress_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_DialogProgress_New; - - TyXBMCAddon_xbmcgui_DialogProgress_Type.swigType="p.XBMCAddon::xbmcgui::DialogProgress"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_DialogProgress_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::DialogBusy - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_DialogBusy_methods[] = { - {"create", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogBusy_create, METH_VARARGS|METH_KEYWORDS, NULL }, - {"update", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogBusy_update, METH_VARARGS|METH_KEYWORDS, NULL }, - {"close", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogBusy_close, METH_VARARGS|METH_KEYWORDS, NULL }, - {"iscanceled", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogBusy_iscanceled, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_DialogBusy_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_DialogBusy_Type.pythonType; - pythonType.tp_name = "xbmcgui.DialogBusy"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_DialogBusy_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_DialogBusy_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_DialogBusy_New; - - TyXBMCAddon_xbmcgui_DialogBusy_Type.swigType="p.XBMCAddon::xbmcgui::DialogBusy"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_DialogBusy_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::DialogProgressBG - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_DialogProgressBG_methods[] = { - {"create", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_create, METH_VARARGS|METH_KEYWORDS, NULL }, - {"update", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_update, METH_VARARGS|METH_KEYWORDS, NULL }, - {"close", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_close, METH_VARARGS|METH_KEYWORDS, NULL }, - {"isFinished", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_isFinished, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_DialogProgressBG_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_DialogProgressBG_Type.pythonType; - pythonType.tp_name = "xbmcgui.DialogProgressBG"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_DialogProgressBG_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_DialogProgressBG_New; - - TyXBMCAddon_xbmcgui_DialogProgressBG_Type.swigType="p.XBMCAddon::xbmcgui::DialogProgressBG"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_DialogProgressBG_Type); - - } - //========================================================================= - - static PyObject* xbmcgui_XBMCAddon_xbmcgui_Action_rcmp(PyObject* obj1, PyObject *obj2, int method) - { XBMC_TRACE; - if (method == Py_EQ) - { - XBMCAddon::xbmcgui::Action* a1 = (Action*)retrieveApiInstance(obj1,&TyXBMCAddon_xbmcgui_Action_Type,"rcmp","XBMCAddon::xbmcgui::Action"); - if (PyObject_TypeCheck(obj2, &(TyXBMCAddon_xbmcgui_Action_Type.pythonType))) - { - // both are Action objects - XBMCAddon::xbmcgui::Action* a2 = (Action*)retrieveApiInstance(obj2,&TyXBMCAddon_xbmcgui_Action_Type,"rcmp","XBMCAddon::xbmcgui::Action"); - - if (a1->id == a2->id && - a1->buttonCode == a2->buttonCode && - a1->fAmount1 == a2->fAmount1 && - a1->fAmount2 == a2->fAmount2 && - a1->fRepeat == a2->fRepeat && - a1->strAction == a2->strAction) - { - Py_RETURN_TRUE; - } - else - { - Py_RETURN_FALSE; - } - } - else - { - // for backwards compatability in python scripts - PyObject* o1 = PyLong_FromLong(a1->id); - return PyObject_RichCompare(o1, obj2, method); - } - } - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::Action - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_Action_methods[] = { - {"getId", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Action_getId, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getButtonCode", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Action_getButtonCode, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAmount1", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Action_getAmount1, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getAmount2", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Action_getAmount2, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_Action_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_Action_Type.pythonType; - pythonType.tp_name = "xbmcgui.Action"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_Action_Dealloc; - pythonType.tp_richcompare=(richcmpfunc)xbmcgui_XBMCAddon_xbmcgui_Action_rcmp; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_Action_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_Action_New; - - TyXBMCAddon_xbmcgui_Action_Type.swigType="p.XBMCAddon::xbmcgui::Action"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_Action_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::Window - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_Window_methods[] = { - {"onAction", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_onAction, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onControl", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_onControl, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onClick", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_onClick, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onDoubleClick", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_onDoubleClick, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onFocus", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_onFocus, METH_VARARGS|METH_KEYWORDS, NULL }, - {"onInit", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_onInit, METH_VARARGS|METH_KEYWORDS, NULL }, - {"show", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_show, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setFocus", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_setFocus, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setFocusId", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_setFocusId, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getFocus", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_getFocus, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getFocusId", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_getFocusId, METH_VARARGS|METH_KEYWORDS, NULL }, - {"removeControl", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_removeControl, METH_VARARGS|METH_KEYWORDS, NULL }, - {"removeControls", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_removeControls, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getHeight", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_getHeight, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getWidth", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_getWidth, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getResolution", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_getResolution, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setCoordinateResolution", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_setCoordinateResolution, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setProperty", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_setProperty, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getProperty", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_getProperty, METH_VARARGS|METH_KEYWORDS, NULL }, - {"clearProperty", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_clearProperty, METH_VARARGS|METH_KEYWORDS, NULL }, - {"clearProperties", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_clearProperties, METH_VARARGS|METH_KEYWORDS, NULL }, - {"close", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_close, METH_VARARGS|METH_KEYWORDS, NULL }, - {"doModal", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_doModal, METH_VARARGS|METH_KEYWORDS, NULL }, - {"addControl", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_addControl, METH_VARARGS|METH_KEYWORDS, NULL }, - {"addControls", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_addControls, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getControl", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_Window_getControl, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_Window_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_Window_Type.pythonType; - pythonType.tp_name = "xbmcgui.Window"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_Window_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_Window_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_Window_New; - - TyXBMCAddon_xbmcgui_Window_Type.swigType="p.XBMCAddon::xbmcgui::Window"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_Window_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::WindowDialog - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_WindowDialog_methods[] = { - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_WindowDialog_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_WindowDialog_Type.pythonType; - pythonType.tp_name = "xbmcgui.WindowDialog"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_WindowDialog_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_WindowDialog_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Window_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_WindowDialog_New; - - TyXBMCAddon_xbmcgui_WindowDialog_Type.swigType="p.XBMCAddon::xbmcgui::WindowDialog"; - TyXBMCAddon_xbmcgui_WindowDialog_Type.parentType=&TyXBMCAddon_xbmcgui_Window_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_WindowDialog_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::WindowXML - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_WindowXML_methods[] = { - {"addItem", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_addItem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"addItems", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_addItems, METH_VARARGS|METH_KEYWORDS, NULL }, - {"removeItem", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_removeItem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getCurrentListPosition", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_getCurrentListPosition, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setCurrentListPosition", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_setCurrentListPosition, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getListItem", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_getListItem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getListSize", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_getListSize, METH_VARARGS|METH_KEYWORDS, NULL }, - {"clearList", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_clearList, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setContainerProperty", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_setContainerProperty, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setContent", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_setContent, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getCurrentContainerId", (PyCFunction)xbmcgui_XBMCAddon_xbmcgui_WindowXML_getCurrentContainerId, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_WindowXML_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_WindowXML_Type.pythonType; - pythonType.tp_name = "xbmcgui.WindowXML"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_WindowXML_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_WindowXML_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_Window_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_WindowXML_New; - - TyXBMCAddon_xbmcgui_WindowXML_Type.swigType="p.XBMCAddon::xbmcgui::WindowXML"; - TyXBMCAddon_xbmcgui_WindowXML_Type.parentType=&TyXBMCAddon_xbmcgui_Window_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_WindowXML_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcgui::WindowXMLDialog - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcgui_WindowXMLDialog_methods[] = { - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcgui_WindowXMLDialog_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcgui_WindowXMLDialog_Type.pythonType; - pythonType.tp_name = "xbmcgui.WindowXMLDialog"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcgui_XBMCAddon_xbmcgui_WindowXMLDialog_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcgui_WindowXMLDialog_methods; - - pythonType.tp_base = &(TyXBMCAddon_xbmcgui_WindowXML_Type.pythonType); - pythonType.tp_new = xbmcgui_XBMCAddon_xbmcgui_WindowXMLDialog_New; - - TyXBMCAddon_xbmcgui_WindowXMLDialog_Type.swigType="p.XBMCAddon::xbmcgui::WindowXMLDialog"; - TyXBMCAddon_xbmcgui_WindowXMLDialog_Type.parentType=&TyXBMCAddon_xbmcgui_WindowXML_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcgui_WindowXMLDialog_Type); - - } - //========================================================================= - - - static PyMethodDef xbmcgui_methods[] = { - {"getCurrentWindowId", (PyCFunction)xbmcgui_getCurrentWindowId, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getCurrentWindowDialogId", (PyCFunction)xbmcgui_getCurrentWindowDialogId, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getScreenHeight", (PyCFunction)xbmcgui_getScreenHeight, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getScreenWidth", (PyCFunction)xbmcgui_getScreenWidth, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - // This is the call that will call all of the other initializes - // for all of the classes in this module - static void initTypes() - { - static bool typesAlreadyInitialized = false; - if (!typesAlreadyInitialized) - { - typesAlreadyInitialized = true; - - initPyXBMCAddon_xbmcgui_ListItem_Type(); - initPyXBMCAddon_xbmcgui_Control_Type(); - initPyXBMCAddon_xbmcgui_ControlSpin_Type(); - initPyXBMCAddon_xbmcgui_ControlLabel_Type(); - initPyXBMCAddon_xbmcgui_ControlEdit_Type(); - initPyXBMCAddon_xbmcgui_ControlList_Type(); - initPyXBMCAddon_xbmcgui_ControlFadeLabel_Type(); - initPyXBMCAddon_xbmcgui_ControlTextBox_Type(); - initPyXBMCAddon_xbmcgui_ControlImage_Type(); - initPyXBMCAddon_xbmcgui_ControlProgress_Type(); - initPyXBMCAddon_xbmcgui_ControlButton_Type(); - initPyXBMCAddon_xbmcgui_ControlGroup_Type(); - initPyXBMCAddon_xbmcgui_ControlRadioButton_Type(); - initPyXBMCAddon_xbmcgui_ControlSlider_Type(); - initPyXBMCAddon_xbmcgui_Dialog_Type(); - initPyXBMCAddon_xbmcgui_DialogProgress_Type(); - initPyXBMCAddon_xbmcgui_DialogBusy_Type(); - initPyXBMCAddon_xbmcgui_DialogProgressBG_Type(); - initPyXBMCAddon_xbmcgui_Action_Type(); - initPyXBMCAddon_xbmcgui_Window_Type(); - initPyXBMCAddon_xbmcgui_WindowDialog_Type(); - initPyXBMCAddon_xbmcgui_WindowXML_Type(); - initPyXBMCAddon_xbmcgui_WindowXMLDialog_Type(); - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ListItem_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_Control_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlSpin_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlLabel_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlEdit_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlList_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlFadeLabel_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlTextBox_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlImage_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlProgress_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlButton_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlGroup_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlRadioButton_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_ControlSlider_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_Dialog_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_DialogProgress_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_DialogBusy_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_DialogProgressBG_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_Action_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_Window_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_WindowDialog_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_WindowXML_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcgui_WindowXMLDialog_Type.pythonType)) < 0) - return; - } - } - - void initModule_xbmcgui() - { - initTypes(); - - // init general xbmcgui modules - PyObject* module; - - - Py_INCREF(&(TyXBMCAddon_xbmcgui_ListItem_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_Control_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlSpin_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlLabel_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlEdit_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlList_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlFadeLabel_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlTextBox_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlImage_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlProgress_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlButton_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlGroup_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlRadioButton_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_ControlSlider_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_Dialog_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_DialogProgress_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_DialogBusy_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_DialogProgressBG_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_Action_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_Window_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_WindowDialog_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_WindowXML_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcgui_WindowXMLDialog_Type.pythonType)); - - module = Py_InitModule("xbmcgui", xbmcgui_methods); - if (module == NULL) return; - - - PyModule_AddObject(module, "ListItem", (PyObject*)(&(TyXBMCAddon_xbmcgui_ListItem_Type.pythonType))); - PyModule_AddObject(module, "Control", (PyObject*)(&(TyXBMCAddon_xbmcgui_Control_Type.pythonType))); - PyModule_AddObject(module, "ControlSpin", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlSpin_Type.pythonType))); - PyModule_AddObject(module, "ControlLabel", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlLabel_Type.pythonType))); - PyModule_AddObject(module, "ControlEdit", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlEdit_Type.pythonType))); - PyModule_AddObject(module, "ControlList", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlList_Type.pythonType))); - PyModule_AddObject(module, "ControlFadeLabel", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlFadeLabel_Type.pythonType))); - PyModule_AddObject(module, "ControlTextBox", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlTextBox_Type.pythonType))); - PyModule_AddObject(module, "ControlImage", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlImage_Type.pythonType))); - PyModule_AddObject(module, "ControlProgress", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlProgress_Type.pythonType))); - PyModule_AddObject(module, "ControlButton", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlButton_Type.pythonType))); - PyModule_AddObject(module, "ControlGroup", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlGroup_Type.pythonType))); - PyModule_AddObject(module, "ControlRadioButton", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlRadioButton_Type.pythonType))); - PyModule_AddObject(module, "ControlSlider", (PyObject*)(&(TyXBMCAddon_xbmcgui_ControlSlider_Type.pythonType))); - PyModule_AddObject(module, "Dialog", (PyObject*)(&(TyXBMCAddon_xbmcgui_Dialog_Type.pythonType))); - PyModule_AddObject(module, "DialogProgress", (PyObject*)(&(TyXBMCAddon_xbmcgui_DialogProgress_Type.pythonType))); - PyModule_AddObject(module, "DialogBusy", (PyObject*)(&(TyXBMCAddon_xbmcgui_DialogBusy_Type.pythonType))); - PyModule_AddObject(module, "DialogProgressBG", (PyObject*)(&(TyXBMCAddon_xbmcgui_DialogProgressBG_Type.pythonType))); - PyModule_AddObject(module, "Action", (PyObject*)(&(TyXBMCAddon_xbmcgui_Action_Type.pythonType))); - PyModule_AddObject(module, "Window", (PyObject*)(&(TyXBMCAddon_xbmcgui_Window_Type.pythonType))); - PyModule_AddObject(module, "WindowDialog", (PyObject*)(&(TyXBMCAddon_xbmcgui_WindowDialog_Type.pythonType))); - PyModule_AddObject(module, "WindowXML", (PyObject*)(&(TyXBMCAddon_xbmcgui_WindowXML_Type.pythonType))); - PyModule_AddObject(module, "WindowXMLDialog", (PyObject*)(&(TyXBMCAddon_xbmcgui_WindowXMLDialog_Type.pythonType))); - - // constants - PyModule_AddStringConstant(module, "__author__", "Team Kodi "); - PyModule_AddStringConstant(module, "__date__", "Sun Sep 01 10:46:59 GMT 2019"); - PyModule_AddStringConstant(module, "__version__", "2.26.0"); - PyModule_AddStringConstant(module, "__credits__", "Team Kodi"); - PyModule_AddStringConstant(module, "__platform__", "ALL"); - - // need to handle constants - - PyModule_AddIntConstant(module,"ICON_OVERLAY_NONE",CGUIListItem::ICON_OVERLAY_NONE); - PyModule_AddIntConstant(module,"ICON_OVERLAY_RAR",CGUIListItem::ICON_OVERLAY_RAR); - PyModule_AddIntConstant(module,"ICON_OVERLAY_ZIP",CGUIListItem::ICON_OVERLAY_ZIP); - PyModule_AddIntConstant(module,"ICON_OVERLAY_LOCKED",CGUIListItem::ICON_OVERLAY_LOCKED); - PyModule_AddIntConstant(module,"ICON_OVERLAY_UNWATCHED",CGUIListItem::ICON_OVERLAY_UNWATCHED); - PyModule_AddIntConstant(module,"ICON_OVERLAY_WATCHED",CGUIListItem::ICON_OVERLAY_WATCHED); - PyModule_AddIntConstant(module,"ICON_OVERLAY_HD",CGUIListItem::ICON_OVERLAY_HD); - PyModule_AddIntConstant(module,"INPUT_TYPE_TEXT",CGUIEditControl::INPUT_TYPE_TEXT); - PyModule_AddIntConstant(module,"INPUT_TYPE_NUMBER",CGUIEditControl::INPUT_TYPE_NUMBER); - PyModule_AddIntConstant(module,"INPUT_TYPE_DATE",CGUIEditControl::INPUT_TYPE_DATE); - PyModule_AddIntConstant(module,"INPUT_TYPE_TIME",CGUIEditControl::INPUT_TYPE_TIME); - PyModule_AddIntConstant(module,"INPUT_TYPE_IPADDRESS",CGUIEditControl::INPUT_TYPE_IPADDRESS); - PyModule_AddIntConstant(module,"INPUT_TYPE_PASSWORD",CGUIEditControl::INPUT_TYPE_PASSWORD); - PyModule_AddIntConstant(module,"INPUT_TYPE_PASSWORD_MD5",CGUIEditControl::INPUT_TYPE_PASSWORD_MD5); - PyModule_AddIntConstant(module,"INPUT_TYPE_SECONDS",CGUIEditControl::INPUT_TYPE_SECONDS); - PyModule_AddStringConstant(module,"NOTIFICATION_INFO",getNOTIFICATION_INFO()); - PyModule_AddStringConstant(module,"NOTIFICATION_WARNING",getNOTIFICATION_WARNING()); - PyModule_AddStringConstant(module,"NOTIFICATION_ERROR",getNOTIFICATION_ERROR()); - PyModule_AddIntConstant(module,"INPUT_ALPHANUM",INPUT_ALPHANUM); - PyModule_AddIntConstant(module,"INPUT_NUMERIC",INPUT_NUMERIC); - PyModule_AddIntConstant(module,"INPUT_DATE",INPUT_DATE); - PyModule_AddIntConstant(module,"INPUT_TIME",INPUT_TIME); - PyModule_AddIntConstant(module,"INPUT_IPADDRESS",INPUT_IPADDRESS); - PyModule_AddIntConstant(module,"INPUT_PASSWORD",INPUT_PASSWORD); - PyModule_AddIntConstant(module,"HORIZONTAL",HORIZONTAL); - PyModule_AddIntConstant(module,"VERTICAL",VERTICAL); - PyModule_AddIntConstant(module,"PASSWORD_VERIFY",PASSWORD_VERIFY); - PyModule_AddIntConstant(module,"ALPHANUM_HIDE_INPUT",ALPHANUM_HIDE_INPUT); - PyModule_AddIntConstant(module,"CONTROL_TEXT_OFFSET_X",10); - PyModule_AddIntConstant(module,"CONTROL_TEXT_OFFSET_Y",2); - PyModule_AddIntConstant(module,"INPUT_ALPHANUM",0); - PyModule_AddIntConstant(module,"INPUT_NUMERIC",1); - PyModule_AddIntConstant(module,"INPUT_DATE",2); - PyModule_AddIntConstant(module,"INPUT_TIME",3); - PyModule_AddIntConstant(module,"INPUT_IPADDRESS",4); - PyModule_AddIntConstant(module,"INPUT_PASSWORD",5); - PyModule_AddIntConstant(module,"PASSWORD_VERIFY",1); - PyModule_AddIntConstant(module,"ALPHANUM_HIDE_INPUT",2); - PyModule_AddIntConstant(module,"ACTION_NONE",0); - PyModule_AddIntConstant(module,"ACTION_MOVE_LEFT",1); - PyModule_AddIntConstant(module,"ACTION_MOVE_RIGHT",2); - PyModule_AddIntConstant(module,"ACTION_MOVE_UP",3); - PyModule_AddIntConstant(module,"ACTION_MOVE_DOWN",4); - PyModule_AddIntConstant(module,"ACTION_PAGE_UP",5); - PyModule_AddIntConstant(module,"ACTION_PAGE_DOWN",6); - PyModule_AddIntConstant(module,"ACTION_SELECT_ITEM",7); - PyModule_AddIntConstant(module,"ACTION_HIGHLIGHT_ITEM",8); - PyModule_AddIntConstant(module,"ACTION_PARENT_DIR",9); - PyModule_AddIntConstant(module,"ACTION_PREVIOUS_MENU",10); - PyModule_AddIntConstant(module,"ACTION_SHOW_INFO",11); - PyModule_AddIntConstant(module,"ACTION_PAUSE",12); - PyModule_AddIntConstant(module,"ACTION_STOP",13); - PyModule_AddIntConstant(module,"ACTION_NEXT_ITEM",14); - PyModule_AddIntConstant(module,"ACTION_PREV_ITEM",15); - PyModule_AddIntConstant(module,"ACTION_FORWARD",16); - PyModule_AddIntConstant(module,"ACTION_REWIND",17); - PyModule_AddIntConstant(module,"ACTION_SHOW_GUI",18); - PyModule_AddIntConstant(module,"ACTION_ASPECT_RATIO",19); - PyModule_AddIntConstant(module,"ACTION_STEP_FORWARD",20); - PyModule_AddIntConstant(module,"ACTION_STEP_BACK",21); - PyModule_AddIntConstant(module,"ACTION_BIG_STEP_FORWARD",22); - PyModule_AddIntConstant(module,"ACTION_BIG_STEP_BACK",23); - PyModule_AddIntConstant(module,"ACTION_SHOW_OSD",24); - PyModule_AddIntConstant(module,"ACTION_SHOW_SUBTITLES",25); - PyModule_AddIntConstant(module,"ACTION_NEXT_SUBTITLE",26); - PyModule_AddIntConstant(module,"ACTION_BROWSE_SUBTITLE",247); - PyModule_AddIntConstant(module,"ACTION_PLAYER_DEBUG",27); - PyModule_AddIntConstant(module,"ACTION_NEXT_PICTURE",28); - PyModule_AddIntConstant(module,"ACTION_PREV_PICTURE",29); - PyModule_AddIntConstant(module,"ACTION_ZOOM_OUT",30); - PyModule_AddIntConstant(module,"ACTION_ZOOM_IN",31); - PyModule_AddIntConstant(module,"ACTION_TOGGLE_SOURCE_DEST",32); - PyModule_AddIntConstant(module,"ACTION_SHOW_PLAYLIST",33); - PyModule_AddIntConstant(module,"ACTION_QUEUE_ITEM",34); - PyModule_AddIntConstant(module,"ACTION_REMOVE_ITEM",35); - PyModule_AddIntConstant(module,"ACTION_SHOW_FULLSCREEN",36); - PyModule_AddIntConstant(module,"ACTION_ZOOM_LEVEL_NORMAL",37); - PyModule_AddIntConstant(module,"ACTION_ZOOM_LEVEL_1",38); - PyModule_AddIntConstant(module,"ACTION_ZOOM_LEVEL_2",39); - PyModule_AddIntConstant(module,"ACTION_ZOOM_LEVEL_3",40); - PyModule_AddIntConstant(module,"ACTION_ZOOM_LEVEL_4",41); - PyModule_AddIntConstant(module,"ACTION_ZOOM_LEVEL_5",42); - PyModule_AddIntConstant(module,"ACTION_ZOOM_LEVEL_6",43); - PyModule_AddIntConstant(module,"ACTION_ZOOM_LEVEL_7",44); - PyModule_AddIntConstant(module,"ACTION_ZOOM_LEVEL_8",45); - PyModule_AddIntConstant(module,"ACTION_ZOOM_LEVEL_9",46); - PyModule_AddIntConstant(module,"ACTION_CALIBRATE_SWAP_ARROWS",47); - PyModule_AddIntConstant(module,"ACTION_CALIBRATE_RESET",48); - PyModule_AddIntConstant(module,"ACTION_ANALOG_MOVE",49); - PyModule_AddIntConstant(module,"ACTION_ROTATE_PICTURE_CW",50); - PyModule_AddIntConstant(module,"ACTION_ROTATE_PICTURE_CCW",51); - PyModule_AddIntConstant(module,"ACTION_SUBTITLE_DELAY_MIN",52); - PyModule_AddIntConstant(module,"ACTION_SUBTITLE_DELAY_PLUS",53); - PyModule_AddIntConstant(module,"ACTION_AUDIO_DELAY_MIN",54); - PyModule_AddIntConstant(module,"ACTION_AUDIO_DELAY_PLUS",55); - PyModule_AddIntConstant(module,"ACTION_AUDIO_NEXT_LANGUAGE",56); - PyModule_AddIntConstant(module,"ACTION_CHANGE_RESOLUTION",57); - PyModule_AddIntConstant(module,"REMOTE_0",58); - PyModule_AddIntConstant(module,"REMOTE_1",59); - PyModule_AddIntConstant(module,"REMOTE_2",60); - PyModule_AddIntConstant(module,"REMOTE_3",61); - PyModule_AddIntConstant(module,"REMOTE_4",62); - PyModule_AddIntConstant(module,"REMOTE_5",63); - PyModule_AddIntConstant(module,"REMOTE_6",64); - PyModule_AddIntConstant(module,"REMOTE_7",65); - PyModule_AddIntConstant(module,"REMOTE_8",66); - PyModule_AddIntConstant(module,"REMOTE_9",67); - PyModule_AddIntConstant(module,"ACTION_PLAYER_PROCESS_INFO",69); - PyModule_AddIntConstant(module,"ACTION_PLAYER_PROGRAM_SELECT",70); - PyModule_AddIntConstant(module,"ACTION_PLAYER_RESOLUTION_SELECT",71); - PyModule_AddIntConstant(module,"ACTION_SMALL_STEP_BACK",76); - PyModule_AddIntConstant(module,"ACTION_PLAYER_FORWARD",77); - PyModule_AddIntConstant(module,"ACTION_PLAYER_REWIND",78); - PyModule_AddIntConstant(module,"ACTION_PLAYER_PLAY",79); - PyModule_AddIntConstant(module,"ACTION_DELETE_ITEM",80); - PyModule_AddIntConstant(module,"ACTION_COPY_ITEM",81); - PyModule_AddIntConstant(module,"ACTION_MOVE_ITEM",82); - PyModule_AddIntConstant(module,"ACTION_TAKE_SCREENSHOT",85); - PyModule_AddIntConstant(module,"ACTION_RENAME_ITEM",87); - PyModule_AddIntConstant(module,"ACTION_VOLUME_UP",88); - PyModule_AddIntConstant(module,"ACTION_VOLUME_DOWN",89); - PyModule_AddIntConstant(module,"ACTION_VOLAMP",90); - PyModule_AddIntConstant(module,"ACTION_MUTE",91); - PyModule_AddIntConstant(module,"ACTION_NAV_BACK",92); - PyModule_AddIntConstant(module,"ACTION_VOLAMP_UP",93); - PyModule_AddIntConstant(module,"ACTION_VOLAMP_DOWN",94); - PyModule_AddIntConstant(module,"ACTION_CREATE_EPISODE_BOOKMARK",95); - PyModule_AddIntConstant(module,"ACTION_CREATE_BOOKMARK",96); - PyModule_AddIntConstant(module,"ACTION_CHAPTER_OR_BIG_STEP_FORWARD",97); - PyModule_AddIntConstant(module,"ACTION_CHAPTER_OR_BIG_STEP_BACK",98); - PyModule_AddIntConstant(module,"ACTION_CYCLE_SUBTITLE",99); - PyModule_AddIntConstant(module,"ACTION_MOUSE_START",100); - PyModule_AddIntConstant(module,"ACTION_MOUSE_LEFT_CLICK",100); - PyModule_AddIntConstant(module,"ACTION_MOUSE_RIGHT_CLICK",101); - PyModule_AddIntConstant(module,"ACTION_MOUSE_MIDDLE_CLICK",102); - PyModule_AddIntConstant(module,"ACTION_MOUSE_DOUBLE_CLICK",103); - PyModule_AddIntConstant(module,"ACTION_MOUSE_WHEEL_UP",104); - PyModule_AddIntConstant(module,"ACTION_MOUSE_WHEEL_DOWN",105); - PyModule_AddIntConstant(module,"ACTION_MOUSE_DRAG",106); - PyModule_AddIntConstant(module,"ACTION_MOUSE_MOVE",107); - PyModule_AddIntConstant(module,"ACTION_MOUSE_LONG_CLICK",108); - PyModule_AddIntConstant(module,"ACTION_MOUSE_END",109); - PyModule_AddIntConstant(module,"ACTION_BACKSPACE",110); - PyModule_AddIntConstant(module,"ACTION_SCROLL_UP",111); - PyModule_AddIntConstant(module,"ACTION_SCROLL_DOWN",112); - PyModule_AddIntConstant(module,"ACTION_ANALOG_FORWARD",113); - PyModule_AddIntConstant(module,"ACTION_ANALOG_REWIND",114); - PyModule_AddIntConstant(module,"ACTION_MOVE_ITEM_UP",115); - PyModule_AddIntConstant(module,"ACTION_MOVE_ITEM_DOWN",116); - PyModule_AddIntConstant(module,"ACTION_CONTEXT_MENU",117); - PyModule_AddIntConstant(module,"ACTION_SHIFT",118); - PyModule_AddIntConstant(module,"ACTION_SYMBOLS",119); - PyModule_AddIntConstant(module,"ACTION_CURSOR_LEFT",120); - PyModule_AddIntConstant(module,"ACTION_CURSOR_RIGHT",121); - PyModule_AddIntConstant(module,"ACTION_BUILT_IN_FUNCTION",122); - PyModule_AddIntConstant(module,"ACTION_SHOW_OSD_TIME",123); - PyModule_AddIntConstant(module,"ACTION_ANALOG_SEEK_FORWARD",124); - PyModule_AddIntConstant(module,"ACTION_ANALOG_SEEK_BACK",125); - PyModule_AddIntConstant(module,"ACTION_VIS_PRESET_SHOW",126); - PyModule_AddIntConstant(module,"ACTION_VIS_PRESET_NEXT",128); - PyModule_AddIntConstant(module,"ACTION_VIS_PRESET_PREV",129); - PyModule_AddIntConstant(module,"ACTION_VIS_PRESET_LOCK",130); - PyModule_AddIntConstant(module,"ACTION_VIS_PRESET_RANDOM",131); - PyModule_AddIntConstant(module,"ACTION_VIS_RATE_PRESET_PLUS",132); - PyModule_AddIntConstant(module,"ACTION_VIS_RATE_PRESET_MINUS",133); - PyModule_AddIntConstant(module,"ACTION_SHOW_VIDEOMENU",134); - PyModule_AddIntConstant(module,"ACTION_ENTER",135); - PyModule_AddIntConstant(module,"ACTION_INCREASE_RATING",136); - PyModule_AddIntConstant(module,"ACTION_DECREASE_RATING",137); - PyModule_AddIntConstant(module,"ACTION_NEXT_SCENE",138); - PyModule_AddIntConstant(module,"ACTION_PREV_SCENE",139); - PyModule_AddIntConstant(module,"ACTION_NEXT_LETTER",140); - PyModule_AddIntConstant(module,"ACTION_PREV_LETTER",141); - PyModule_AddIntConstant(module,"ACTION_JUMP_SMS2",142); - PyModule_AddIntConstant(module,"ACTION_JUMP_SMS3",143); - PyModule_AddIntConstant(module,"ACTION_JUMP_SMS4",144); - PyModule_AddIntConstant(module,"ACTION_JUMP_SMS5",145); - PyModule_AddIntConstant(module,"ACTION_JUMP_SMS6",146); - PyModule_AddIntConstant(module,"ACTION_JUMP_SMS7",147); - PyModule_AddIntConstant(module,"ACTION_JUMP_SMS8",148); - PyModule_AddIntConstant(module,"ACTION_JUMP_SMS9",149); - PyModule_AddIntConstant(module,"ACTION_FILTER_CLEAR",150); - PyModule_AddIntConstant(module,"ACTION_FILTER_SMS2",151); - PyModule_AddIntConstant(module,"ACTION_FILTER_SMS3",152); - PyModule_AddIntConstant(module,"ACTION_FILTER_SMS4",153); - PyModule_AddIntConstant(module,"ACTION_FILTER_SMS5",154); - PyModule_AddIntConstant(module,"ACTION_FILTER_SMS6",155); - PyModule_AddIntConstant(module,"ACTION_FILTER_SMS7",156); - PyModule_AddIntConstant(module,"ACTION_FILTER_SMS8",157); - PyModule_AddIntConstant(module,"ACTION_FILTER_SMS9",158); - PyModule_AddIntConstant(module,"ACTION_FIRST_PAGE",159); - PyModule_AddIntConstant(module,"ACTION_LAST_PAGE",160); - PyModule_AddIntConstant(module,"ACTION_AUDIO_DELAY",161); - PyModule_AddIntConstant(module,"ACTION_SUBTITLE_DELAY",162); - PyModule_AddIntConstant(module,"ACTION_MENU",163); - PyModule_AddIntConstant(module,"ACTION_SET_RATING",164); - PyModule_AddIntConstant(module,"ACTION_RECORD",170); - PyModule_AddIntConstant(module,"ACTION_PASTE",180); - PyModule_AddIntConstant(module,"ACTION_NEXT_CONTROL",181); - PyModule_AddIntConstant(module,"ACTION_PREV_CONTROL",182); - PyModule_AddIntConstant(module,"ACTION_CHANNEL_SWITCH",183); - PyModule_AddIntConstant(module,"ACTION_CHANNEL_UP",184); - PyModule_AddIntConstant(module,"ACTION_CHANNEL_DOWN",185); - PyModule_AddIntConstant(module,"ACTION_NEXT_CHANNELGROUP",186); - PyModule_AddIntConstant(module,"ACTION_PREVIOUS_CHANNELGROUP",187); - PyModule_AddIntConstant(module,"ACTION_PVR_PLAY",188); - PyModule_AddIntConstant(module,"ACTION_PVR_PLAY_TV",189); - PyModule_AddIntConstant(module,"ACTION_PVR_PLAY_RADIO",190); - PyModule_AddIntConstant(module,"ACTION_PVR_SHOW_TIMER_RULE",191); - PyModule_AddIntConstant(module,"ACTION_CHANNEL_NUMBER_SEP",192); - PyModule_AddIntConstant(module,"ACTION_TOGGLE_FULLSCREEN",199); - PyModule_AddIntConstant(module,"ACTION_TOGGLE_WATCHED",200); - PyModule_AddIntConstant(module,"ACTION_SCAN_ITEM",201); - PyModule_AddIntConstant(module,"ACTION_TOGGLE_DIGITAL_ANALOG",202); - PyModule_AddIntConstant(module,"ACTION_RELOAD_KEYMAPS",203); - PyModule_AddIntConstant(module,"ACTION_GUIPROFILE_BEGIN",204); - PyModule_AddIntConstant(module,"ACTION_TELETEXT_RED",215); - PyModule_AddIntConstant(module,"ACTION_TELETEXT_GREEN",216); - PyModule_AddIntConstant(module,"ACTION_TELETEXT_YELLOW",217); - PyModule_AddIntConstant(module,"ACTION_TELETEXT_BLUE",218); - PyModule_AddIntConstant(module,"ACTION_INCREASE_PAR",219); - PyModule_AddIntConstant(module,"ACTION_DECREASE_PAR",220); - PyModule_AddIntConstant(module,"ACTION_VSHIFT_UP",227); - PyModule_AddIntConstant(module,"ACTION_VSHIFT_DOWN",228); - PyModule_AddIntConstant(module,"ACTION_PLAYER_PLAYPAUSE",229); - PyModule_AddIntConstant(module,"ACTION_SUBTITLE_VSHIFT_UP",230); - PyModule_AddIntConstant(module,"ACTION_SUBTITLE_VSHIFT_DOWN",231); - PyModule_AddIntConstant(module,"ACTION_SUBTITLE_ALIGN",232); - PyModule_AddIntConstant(module,"ACTION_FILTER",233); - PyModule_AddIntConstant(module,"ACTION_SWITCH_PLAYER",234); - PyModule_AddIntConstant(module,"ACTION_STEREOMODE_NEXT",235); - PyModule_AddIntConstant(module,"ACTION_STEREOMODE_PREVIOUS",236); - PyModule_AddIntConstant(module,"ACTION_STEREOMODE_TOGGLE",237); - PyModule_AddIntConstant(module,"ACTION_STEREOMODE_SELECT",238); - PyModule_AddIntConstant(module,"ACTION_STEREOMODE_TOMONO",239); - PyModule_AddIntConstant(module,"ACTION_STEREOMODE_SET",240); - PyModule_AddIntConstant(module,"ACTION_SETTINGS_RESET",241); - PyModule_AddIntConstant(module,"ACTION_SETTINGS_LEVEL_CHANGE",242); - PyModule_AddIntConstant(module,"ACTION_TRIGGER_OSD",243); - PyModule_AddIntConstant(module,"ACTION_INPUT_TEXT",244); - PyModule_AddIntConstant(module,"ACTION_VOLUME_SET",245); - PyModule_AddIntConstant(module,"ACTION_TOGGLE_COMMSKIP",246); - PyModule_AddIntConstant(module,"ACTION_PLAYER_RESET",248); - PyModule_AddIntConstant(module,"ACTION_TOGGLE_FONT",249); - PyModule_AddIntConstant(module,"ACTION_VIDEO_NEXT_STREAM",250); - PyModule_AddIntConstant(module,"ACTION_QUEUE_ITEM_NEXT",251); - PyModule_AddIntConstant(module,"ACTION_VOICE_RECOGNIZE",300); - PyModule_AddIntConstant(module,"ACTION_TOUCH_TAP",401); - PyModule_AddIntConstant(module,"ACTION_TOUCH_TAP_TEN",410); - PyModule_AddIntConstant(module,"ACTION_TOUCH_LONGPRESS",411); - PyModule_AddIntConstant(module,"ACTION_TOUCH_LONGPRESS_TEN",420); - PyModule_AddIntConstant(module,"ACTION_GESTURE_NOTIFY",500); - PyModule_AddIntConstant(module,"ACTION_GESTURE_BEGIN",501); - PyModule_AddIntConstant(module,"ACTION_GESTURE_ZOOM",502); - PyModule_AddIntConstant(module,"ACTION_GESTURE_ROTATE",503); - PyModule_AddIntConstant(module,"ACTION_GESTURE_PAN",504); - PyModule_AddIntConstant(module,"ACTION_GESTURE_ABORT",505); - PyModule_AddIntConstant(module,"ACTION_GESTURE_SWIPE_LEFT",511); - PyModule_AddIntConstant(module,"ACTION_GESTURE_SWIPE_LEFT_TEN",520); - PyModule_AddIntConstant(module,"ACTION_GESTURE_SWIPE_RIGHT",521); - PyModule_AddIntConstant(module,"ACTION_GESTURE_SWIPE_RIGHT_TEN",530); - PyModule_AddIntConstant(module,"ACTION_GESTURE_SWIPE_UP",531); - PyModule_AddIntConstant(module,"ACTION_GESTURE_SWIPE_UP_TEN",540); - PyModule_AddIntConstant(module,"ACTION_GESTURE_SWIPE_DOWN",541); - PyModule_AddIntConstant(module,"ACTION_GESTURE_SWIPE_DOWN_TEN",550); - PyModule_AddIntConstant(module,"ACTION_GESTURE_END",599); - PyModule_AddIntConstant(module,"ACTION_ANALOG_MOVE_X_LEFT",601); - PyModule_AddIntConstant(module,"ACTION_ANALOG_MOVE_X_RIGHT",602); - PyModule_AddIntConstant(module,"ACTION_ANALOG_MOVE_Y_UP",603); - PyModule_AddIntConstant(module,"ACTION_ANALOG_MOVE_Y_DOWN",604); - PyModule_AddIntConstant(module,"ACTION_ERROR",998); - PyModule_AddIntConstant(module,"ACTION_NOOP",999); - PyModule_AddIntConstant(module,"KEY_BUTTON_A",256); - PyModule_AddIntConstant(module,"KEY_BUTTON_B",257); - PyModule_AddIntConstant(module,"KEY_BUTTON_X",258); - PyModule_AddIntConstant(module,"KEY_BUTTON_Y",259); - PyModule_AddIntConstant(module,"KEY_BUTTON_BLACK",260); - PyModule_AddIntConstant(module,"KEY_BUTTON_WHITE",261); - PyModule_AddIntConstant(module,"KEY_BUTTON_LEFT_TRIGGER",262); - PyModule_AddIntConstant(module,"KEY_BUTTON_RIGHT_TRIGGER",263); - PyModule_AddIntConstant(module,"KEY_BUTTON_LEFT_THUMB_STICK",264); - PyModule_AddIntConstant(module,"KEY_BUTTON_RIGHT_THUMB_STICK",265); - PyModule_AddIntConstant(module,"KEY_BUTTON_RIGHT_THUMB_STICK_UP",266); - PyModule_AddIntConstant(module,"KEY_BUTTON_RIGHT_THUMB_STICK_DOWN",267); - PyModule_AddIntConstant(module,"KEY_BUTTON_RIGHT_THUMB_STICK_LEFT",268); - PyModule_AddIntConstant(module,"KEY_BUTTON_RIGHT_THUMB_STICK_RIGHT",269); - PyModule_AddIntConstant(module,"KEY_BUTTON_DPAD_UP",270); - PyModule_AddIntConstant(module,"KEY_BUTTON_DPAD_DOWN",271); - PyModule_AddIntConstant(module,"KEY_BUTTON_DPAD_LEFT",272); - PyModule_AddIntConstant(module,"KEY_BUTTON_DPAD_RIGHT",273); - PyModule_AddIntConstant(module,"KEY_BUTTON_START",274); - PyModule_AddIntConstant(module,"KEY_BUTTON_BACK",275); - PyModule_AddIntConstant(module,"KEY_BUTTON_LEFT_THUMB_BUTTON",276); - PyModule_AddIntConstant(module,"KEY_BUTTON_RIGHT_THUMB_BUTTON",277); - PyModule_AddIntConstant(module,"KEY_BUTTON_LEFT_ANALOG_TRIGGER",278); - PyModule_AddIntConstant(module,"KEY_BUTTON_RIGHT_ANALOG_TRIGGER",279); - PyModule_AddIntConstant(module,"KEY_BUTTON_LEFT_THUMB_STICK_UP",280); - PyModule_AddIntConstant(module,"KEY_BUTTON_LEFT_THUMB_STICK_DOWN",281); - PyModule_AddIntConstant(module,"KEY_BUTTON_LEFT_THUMB_STICK_LEFT",282); - PyModule_AddIntConstant(module,"KEY_BUTTON_LEFT_THUMB_STICK_RIGHT",283); - PyModule_AddIntConstant(module,"KEY_VKEY",0xF000); - PyModule_AddIntConstant(module,"KEY_ASCII",0xF100); - PyModule_AddIntConstant(module,"KEY_UNICODE",0xF200); - PyModule_AddIntConstant(module,"KEY_VMOUSE",0xEFFF); - PyModule_AddIntConstant(module,"KEY_MOUSE_START",0xE000); - PyModule_AddIntConstant(module,"KEY_MOUSE_CLICK",0xE000); - PyModule_AddIntConstant(module,"KEY_MOUSE_RIGHTCLICK",0xE001); - PyModule_AddIntConstant(module,"KEY_MOUSE_MIDDLECLICK",0xE002); - PyModule_AddIntConstant(module,"KEY_MOUSE_DOUBLE_CLICK",0xE010); - PyModule_AddIntConstant(module,"KEY_MOUSE_LONG_CLICK",0xE020); - PyModule_AddIntConstant(module,"KEY_MOUSE_WHEEL_UP",0xE101); - PyModule_AddIntConstant(module,"KEY_MOUSE_WHEEL_DOWN",0xE102); - PyModule_AddIntConstant(module,"KEY_MOUSE_MOVE",0xE103); - PyModule_AddIntConstant(module,"KEY_MOUSE_DRAG",0xE104); - PyModule_AddIntConstant(module,"KEY_MOUSE_DRAG_START",0xE105); - PyModule_AddIntConstant(module,"KEY_MOUSE_DRAG_END",0xE106); - PyModule_AddIntConstant(module,"KEY_MOUSE_RDRAG",0xE107); - PyModule_AddIntConstant(module,"KEY_MOUSE_RDRAG_START",0xE108); - PyModule_AddIntConstant(module,"KEY_MOUSE_RDRAG_END",0xE109); - PyModule_AddIntConstant(module,"KEY_MOUSE_NOOP",0xEFFF); - PyModule_AddIntConstant(module,"KEY_MOUSE_END",0xEFFF); - PyModule_AddIntConstant(module,"KEY_APPCOMMAND",0xD000); - PyModule_AddIntConstant(module,"KEY_INVALID",0xFFFF); - PyModule_AddIntConstant(module,"ICON_TYPE_NONE",101); - PyModule_AddIntConstant(module,"ICON_TYPE_PROGRAMS",102); - PyModule_AddIntConstant(module,"ICON_TYPE_MUSIC",103); - PyModule_AddIntConstant(module,"ICON_TYPE_PICTURES",104); - PyModule_AddIntConstant(module,"ICON_TYPE_VIDEOS",105); - PyModule_AddIntConstant(module,"ICON_TYPE_FILES",106); - PyModule_AddIntConstant(module,"ICON_TYPE_WEATHER",107); - PyModule_AddIntConstant(module,"ICON_TYPE_SETTINGS",109); - } - -} // end PythonBindings namespace for python type definitions - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcgui.i.xml b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcgui.i.xml deleted file mode 100644 index 1bcca33914..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcgui.i.xml +++ /dev/null @@ -1,28688 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcplugin.i.cpp b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcplugin.i.cpp deleted file mode 100644 index c85af24f4f..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcplugin.i.cpp +++ /dev/null @@ -1,906 +0,0 @@ - - -/* - * Copyright (C) 2005-2018 Team Kodi - * This file is part of Kodi - https://kodi.tv - * - * SPDX-License-Identifier: GPL-2.0-or-later - * See LICENSES/README.md for more information. - */ - -// ************************************************************************ -// This file was generated by xbmc compile process. DO NOT EDIT!! -// It was created by running the code generator on the spec file for -// the module "xbmcplugin" on the template file PythonSwig.template.cpp -// ************************************************************************ - - - -#include -#include -#include "interfaces/python/LanguageHook.h" -#include "interfaces/python/swig.h" -#include "interfaces/python/PyContext.h" - - -#if defined(TARGET_WINDOWS) -# include -#endif - -#include "interfaces/legacy/ModuleXbmcplugin.h" - -using namespace XBMCAddon; -using namespace xbmcplugin; - -#if defined(__GNUG__) -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif - - - -namespace PythonBindings -{ - - //========================================================================= - // These variables define the type XBMCAddon::xbmcgui::ListItem from another module - extern TypeInfo TyXBMCAddon_xbmcgui_ListItem_Type; - //========================================================================= - - - - static PyObject* xbmcplugin_addDirectoryItem (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "url", - "listitem", - "isFolder", - "totalItems", - NULL}; - - int handle ; - std::string url ; - PyObject* pyurl = NULL; - XBMCAddon::xbmcgui::ListItem * listitem = nullptr; - PyObject* pylistitem = NULL; - bool isFolder = false; - int totalItems = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iOO|bi", - const_cast(keywords), - &handle, - &pyurl, - &pylistitem, - &isFolder, - &totalItems - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pyurl) PyXBMCGetUnicodeString(url,pyurl,false,"url","XBMCAddon::xbmcplugin::addDirectoryItem"); - listitem = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pylistitem,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcplugin::","XBMCAddon::xbmcplugin::addDirectoryItem"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcplugin::addDirectoryItem( handle, url, listitem, isFolder, totalItems ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::addDirectoryItem\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::addDirectoryItem\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcplugin_addDirectoryItems (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "items", - "totalItems", - NULL}; - - int handle ; - std::vector< Tuple< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const *,bool > > items ; - PyObject* pyitems = NULL; - int totalItems = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iO|i", - const_cast(keywords), - &handle, - &pyitems, - &totalItems - )) - { - return NULL; - } - - bool apiResult; - try - { - - if (pyitems) - { - bool isTuple = PyObject_TypeCheck(pyitems,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyitems,&PyList_Type)) - throw WrongTypeException("The parameter \"items\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyitems) : PyList_Size(pyitems)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyitems, i) : PyList_GetItem(pyitems, i)); - Tuple< XBMCAddon::String ,XBMCAddon::xbmcgui::ListItem const *,bool > entry1; - - if(pyentry1) - { - bool isTuple = PyObject_TypeCheck(pyentry1,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyentry1,&PyList_Type)) - throw WrongTypeException("The parameter \"entry1\" must be either a Tuple or a List."); - auto vecSize = (isTuple ? PyTuple_Size(pyentry1) : PyList_Size(pyentry1)); - - if (vecSize > 0) - { - PyObject *pyentry0_2 = NULL; - pyentry0_2 = (isTuple ? PyTuple_GetItem(pyentry1, 0) : PyList_GetItem(pyentry1, 0)); - std::string entry0_2; - if (pyentry0_2) PyXBMCGetUnicodeString(entry0_2,pyentry0_2,false,"entry0_2","XBMCAddon::xbmcplugin::addDirectoryItems"); - entry1.first() = entry0_2; - } - - if (vecSize > 1) - { - PyObject *pyentry1_2 = NULL; - pyentry1_2 = (isTuple ? PyTuple_GetItem(pyentry1, 1) : PyList_GetItem(pyentry1, 1)); - XBMCAddon::xbmcgui::ListItem * entry1_2; - entry1_2 = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pyentry1_2,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcplugin::","XBMCAddon::xbmcplugin::addDirectoryItems"); - entry1.second() = entry1_2; - } - - if (vecSize > 2) - { - PyObject *pyentry2_2 = NULL; - pyentry2_2 = (isTuple ? PyTuple_GetItem(pyentry1, 2) : PyList_GetItem(pyentry1, 2)); - bool entry2_2; - entry2_2 = (PyInt_AsLong(pyentry2_2) == 0L ? false : true); - entry1.third() = entry2_2; - } - - } - - items.push_back(entry1); - } - } - - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcplugin::addDirectoryItems( handle, items, totalItems ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::addDirectoryItems\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::addDirectoryItems\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcplugin_endOfDirectory (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "succeeded", - "updateListing", - "cacheToDisc", - NULL}; - - int handle ; - bool succeeded = true; - bool updateListing = false; - bool cacheToDisc = true; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i|bbb", - const_cast(keywords), - &handle, - &succeeded, - &updateListing, - &cacheToDisc - )) - { - return NULL; - } - - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmcplugin::endOfDirectory( handle, succeeded, updateListing, cacheToDisc ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::endOfDirectory\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::endOfDirectory\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcplugin_setResolvedUrl (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "succeeded", - "listitem", - NULL}; - - int handle ; - bool succeeded ; - XBMCAddon::xbmcgui::ListItem * listitem = nullptr; - PyObject* pylistitem = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "ibO", - const_cast(keywords), - &handle, - &succeeded, - &pylistitem - )) - { - return NULL; - } - - - try - { - listitem = (XBMCAddon::xbmcgui::ListItem *)retrieveApiInstance(pylistitem,"p.XBMCAddon::xbmcgui::ListItem","XBMCAddon::xbmcplugin::","XBMCAddon::xbmcplugin::setResolvedUrl"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmcplugin::setResolvedUrl( handle, succeeded, listitem ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setResolvedUrl\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setResolvedUrl\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcplugin_addSortMethod (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "sortMethod", - "label2Mask", - NULL}; - - int handle ; - int sortMethod ; - std::string label2Mask = XBMCAddon::emptyString; - PyObject* pylabel2Mask = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "ii|O", - const_cast(keywords), - &handle, - &sortMethod, - &pylabel2Mask - )) - { - return NULL; - } - - - try - { - if (pylabel2Mask) PyXBMCGetUnicodeString(label2Mask,pylabel2Mask,false,"label2Mask","XBMCAddon::xbmcplugin::addSortMethod"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmcplugin::addSortMethod( handle, sortMethod, label2Mask ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::addSortMethod\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::addSortMethod\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcplugin_getSetting (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "id", - NULL}; - - int handle ; - char * id = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "is", - const_cast(keywords), - &handle, - &id - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcplugin::getSetting( handle, id ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::getSetting\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::getSetting\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcplugin_setSetting (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "id", - "value", - NULL}; - - int handle ; - std::string id ; - PyObject* pyid = NULL; - std::string value ; - PyObject* pyvalue = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iOO", - const_cast(keywords), - &handle, - &pyid, - &pyvalue - )) - { - return NULL; - } - - - try - { - if (pyid) PyXBMCGetUnicodeString(id,pyid,false,"id","XBMCAddon::xbmcplugin::setSetting"); - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,false,"value","XBMCAddon::xbmcplugin::setSetting"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmcplugin::setSetting( handle, id, value ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setSetting\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setSetting\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcplugin_setContent (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "content", - NULL}; - - int handle ; - char * content = nullptr; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "is", - const_cast(keywords), - &handle, - &content - )) - { - return NULL; - } - - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmcplugin::setContent( handle, content ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setContent\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setContent\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcplugin_setPluginCategory (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "category", - NULL}; - - int handle ; - std::string category ; - PyObject* pycategory = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "iO", - const_cast(keywords), - &handle, - &pycategory - )) - { - return NULL; - } - - - try - { - if (pycategory) PyXBMCGetUnicodeString(category,pycategory,false,"category","XBMCAddon::xbmcplugin::setPluginCategory"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmcplugin::setPluginCategory( handle, category ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setPluginCategory\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setPluginCategory\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcplugin_setPluginFanart (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "image", - "color1", - "color2", - "color3", - NULL}; - - int handle ; - char * image = NULL; - char * color1 = NULL; - char * color2 = NULL; - char * color3 = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "i|ssss", - const_cast(keywords), - &handle, - &image, - &color1, - &color2, - &color3 - )) - { - return NULL; - } - - - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmcplugin::setPluginFanart( handle, image, color1, color2, color3 ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setPluginFanart\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setPluginFanart\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcplugin_setProperty (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "handle", - "key", - "value", - NULL}; - - int handle ; - char * key = nullptr; - std::string value ; - PyObject* pyvalue = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "isO", - const_cast(keywords), - &handle, - &key, - &pyvalue - )) - { - return NULL; - } - - - try - { - if (pyvalue) PyXBMCGetUnicodeString(value,pyvalue,false,"value","XBMCAddon::xbmcplugin::setProperty"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - XBMCAddon::xbmcplugin::setProperty( handle, key, value ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setProperty\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcplugin::setProperty\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - - static PyMethodDef xbmcplugin_methods[] = { - {"addDirectoryItem", (PyCFunction)xbmcplugin_addDirectoryItem, METH_VARARGS|METH_KEYWORDS, NULL }, - {"addDirectoryItems", (PyCFunction)xbmcplugin_addDirectoryItems, METH_VARARGS|METH_KEYWORDS, NULL }, - {"endOfDirectory", (PyCFunction)xbmcplugin_endOfDirectory, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setResolvedUrl", (PyCFunction)xbmcplugin_setResolvedUrl, METH_VARARGS|METH_KEYWORDS, NULL }, - {"addSortMethod", (PyCFunction)xbmcplugin_addSortMethod, METH_VARARGS|METH_KEYWORDS, NULL }, - {"getSetting", (PyCFunction)xbmcplugin_getSetting, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setSetting", (PyCFunction)xbmcplugin_setSetting, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setContent", (PyCFunction)xbmcplugin_setContent, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setPluginCategory", (PyCFunction)xbmcplugin_setPluginCategory, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setPluginFanart", (PyCFunction)xbmcplugin_setPluginFanart, METH_VARARGS|METH_KEYWORDS, NULL }, - {"setProperty", (PyCFunction)xbmcplugin_setProperty, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - // This is the call that will call all of the other initializes - // for all of the classes in this module - static void initTypes() - { - static bool typesAlreadyInitialized = false; - if (!typesAlreadyInitialized) - { - typesAlreadyInitialized = true; - - } - } - - void initModule_xbmcplugin() - { - initTypes(); - - // init general xbmcplugin modules - PyObject* module; - - - - module = Py_InitModule("xbmcplugin", xbmcplugin_methods); - if (module == NULL) return; - - - - // constants - PyModule_AddStringConstant(module, "__author__", "Team Kodi "); - PyModule_AddStringConstant(module, "__date__", "Sun Sep 01 10:46:59 GMT 2019"); - PyModule_AddStringConstant(module, "__version__", "2.26.0"); - PyModule_AddStringConstant(module, "__credits__", "Team Kodi"); - PyModule_AddStringConstant(module, "__platform__", "ALL"); - - // need to handle constants - - PyModule_AddIntConstant(module,"SORT_METHOD_NONE",SORT_METHOD_NONE); - PyModule_AddIntConstant(module,"SORT_METHOD_LABEL",SORT_METHOD_LABEL); - PyModule_AddIntConstant(module,"SORT_METHOD_LABEL_IGNORE_THE",SORT_METHOD_LABEL_IGNORE_THE); - PyModule_AddIntConstant(module,"SORT_METHOD_DATE",SORT_METHOD_DATE); - PyModule_AddIntConstant(module,"SORT_METHOD_SIZE",SORT_METHOD_SIZE); - PyModule_AddIntConstant(module,"SORT_METHOD_FILE",SORT_METHOD_FILE); - PyModule_AddIntConstant(module,"SORT_METHOD_DRIVE_TYPE",SORT_METHOD_DRIVE_TYPE); - PyModule_AddIntConstant(module,"SORT_METHOD_TRACKNUM",SORT_METHOD_TRACKNUM); - PyModule_AddIntConstant(module,"SORT_METHOD_DURATION",SORT_METHOD_DURATION); - PyModule_AddIntConstant(module,"SORT_METHOD_TITLE",SORT_METHOD_TITLE); - PyModule_AddIntConstant(module,"SORT_METHOD_TITLE_IGNORE_THE",SORT_METHOD_TITLE_IGNORE_THE); - PyModule_AddIntConstant(module,"SORT_METHOD_ARTIST",SORT_METHOD_ARTIST); - PyModule_AddIntConstant(module,"SORT_METHOD_ARTIST_IGNORE_THE",SORT_METHOD_ARTIST_IGNORE_THE); - PyModule_AddIntConstant(module,"SORT_METHOD_ALBUM",SORT_METHOD_ALBUM); - PyModule_AddIntConstant(module,"SORT_METHOD_ALBUM_IGNORE_THE",SORT_METHOD_ALBUM_IGNORE_THE); - PyModule_AddIntConstant(module,"SORT_METHOD_GENRE",SORT_METHOD_GENRE); - PyModule_AddIntConstant(module,"SORT_METHOD_VIDEO_YEAR",SORT_METHOD_YEAR); - PyModule_AddIntConstant(module,"SORT_METHOD_VIDEO_RATING",SORT_METHOD_VIDEO_RATING); - PyModule_AddIntConstant(module,"SORT_METHOD_PROGRAM_COUNT",SORT_METHOD_PROGRAM_COUNT); - PyModule_AddIntConstant(module,"SORT_METHOD_PLAYLIST_ORDER",SORT_METHOD_PLAYLIST_ORDER); - PyModule_AddIntConstant(module,"SORT_METHOD_EPISODE",SORT_METHOD_EPISODE); - PyModule_AddIntConstant(module,"SORT_METHOD_VIDEO_TITLE",SORT_METHOD_VIDEO_TITLE); - PyModule_AddIntConstant(module,"SORT_METHOD_VIDEO_SORT_TITLE",SORT_METHOD_VIDEO_SORT_TITLE); - PyModule_AddIntConstant(module,"SORT_METHOD_VIDEO_SORT_TITLE_IGNORE_THE",SORT_METHOD_VIDEO_SORT_TITLE_IGNORE_THE); - PyModule_AddIntConstant(module,"SORT_METHOD_PRODUCTIONCODE",SORT_METHOD_PRODUCTIONCODE); - PyModule_AddIntConstant(module,"SORT_METHOD_SONG_RATING",SORT_METHOD_SONG_RATING); - PyModule_AddIntConstant(module,"SORT_METHOD_MPAA_RATING",SORT_METHOD_MPAA_RATING); - PyModule_AddIntConstant(module,"SORT_METHOD_VIDEO_RUNTIME",SORT_METHOD_VIDEO_RUNTIME); - PyModule_AddIntConstant(module,"SORT_METHOD_STUDIO",SORT_METHOD_STUDIO); - PyModule_AddIntConstant(module,"SORT_METHOD_STUDIO_IGNORE_THE",SORT_METHOD_STUDIO_IGNORE_THE); - PyModule_AddIntConstant(module,"SORT_METHOD_UNSORTED",SORT_METHOD_UNSORTED); - PyModule_AddIntConstant(module,"SORT_METHOD_BITRATE",SORT_METHOD_BITRATE); - PyModule_AddIntConstant(module,"SORT_METHOD_LISTENERS",SORT_METHOD_LISTENERS); - PyModule_AddIntConstant(module,"SORT_METHOD_COUNTRY",SORT_METHOD_COUNTRY); - PyModule_AddIntConstant(module,"SORT_METHOD_DATEADDED",SORT_METHOD_DATEADDED); - PyModule_AddIntConstant(module,"SORT_METHOD_FULLPATH",SORT_METHOD_FULLPATH); - PyModule_AddIntConstant(module,"SORT_METHOD_LABEL_IGNORE_FOLDERS",SORT_METHOD_LABEL_IGNORE_FOLDERS); - PyModule_AddIntConstant(module,"SORT_METHOD_LASTPLAYED",SORT_METHOD_LASTPLAYED); - PyModule_AddIntConstant(module,"SORT_METHOD_PLAYCOUNT",SORT_METHOD_PLAYCOUNT); - PyModule_AddIntConstant(module,"SORT_METHOD_CHANNEL",SORT_METHOD_CHANNEL); - PyModule_AddIntConstant(module,"SORT_METHOD_DATE_TAKEN",SORT_METHOD_DATE_TAKEN); - PyModule_AddIntConstant(module,"SORT_METHOD_VIDEO_USER_RATING",SORT_METHOD_VIDEO_USER_RATING); - PyModule_AddIntConstant(module,"SORT_METHOD_SONG_USER_RATING",SORT_METHOD_SONG_USER_RATING); - } - -} // end PythonBindings namespace for python type definitions - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcplugin.i.xml b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcplugin.i.xml deleted file mode 100644 index f4128e7c44..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcplugin.i.xml +++ /dev/null @@ -1,2077 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcvfs.i.cpp b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcvfs.i.cpp deleted file mode 100644 index 7f812820c6..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcvfs.i.cpp +++ /dev/null @@ -1,1589 +0,0 @@ - - -/* - * Copyright (C) 2005-2018 Team Kodi - * This file is part of Kodi - https://kodi.tv - * - * SPDX-License-Identifier: GPL-2.0-or-later - * See LICENSES/README.md for more information. - */ - -// ************************************************************************ -// This file was generated by xbmc compile process. DO NOT EDIT!! -// It was created by running the code generator on the spec file for -// the module "xbmcvfs" on the template file PythonSwig.template.cpp -// ************************************************************************ - - - -#include -#include -#include "interfaces/python/LanguageHook.h" -#include "interfaces/python/swig.h" -#include "interfaces/python/PyContext.h" - - -#if defined(TARGET_WINDOWS) -# include -#endif - -#include "interfaces/legacy/ModuleXbmcvfs.h" -#include "interfaces/legacy/File.h" -#include "interfaces/legacy/Stat.h" -#include "utils/log.h" - -using namespace XBMCAddon; -using namespace xbmcvfs; - -#if defined(__GNUG__) -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif - - - -namespace PythonBindings -{ - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcvfs::File - TypeInfo TyXBMCAddon_xbmcvfs_File_Type(typeid(XBMCAddon::xbmcvfs::File)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcvfs::Stat - TypeInfo TyXBMCAddon_xbmcvfs_Stat_Type(typeid(XBMCAddon::xbmcvfs::Stat)); - //========================================================================= - - - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_File_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "filepath", - "mode", - NULL}; - - std::string filepath ; - PyObject* pyfilepath = NULL; - char * mode = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|s", - const_cast(keywords), - &pyfilepath, - &mode - )) - { - return NULL; - } - - XBMCAddon::xbmcvfs::File * apiResult; - try - { - if (pyfilepath) PyXBMCGetUnicodeString(filepath,pyfilepath,false,"filepath","File"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcvfs::File( filepath, mode ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcvfs::File\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcvfs::File\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_File_read (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "numBytes", - NULL}; - - unsigned long numBytes = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|k", - const_cast(keywords), - &numBytes - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::File*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_File_Type,"read","XBMCAddon::xbmcvfs::File"))-> read( numBytes ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"read\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"read\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_File_readBytes (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "numBytes", - NULL}; - - unsigned long numBytes = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|k", - const_cast(keywords), - &numBytes - )) - { - return NULL; - } - - XbmcCommons::Buffer apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::File*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_File_Type,"readBytes","XBMCAddon::xbmcvfs::File"))-> readBytes( numBytes ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"readBytes\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"readBytes\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyByteArray_FromStringAndSize((char*)apiResult.curPosition(),apiResult.remaining()); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_File_write (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "buffer", - NULL}; - - XbmcCommons::Buffer buffer ; - PyObject* pybuffer = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pybuffer - )) - { - return NULL; - } - - bool apiResult; - try - { - - if (PyString_Check(pybuffer)) - { - const char* str = PyString_AsString(pybuffer); - size_t size = (size_t)PyString_Size(pybuffer); - buffer.allocate(size); - buffer.put(str,size); - buffer.flip(); // prepare the buffer for reading from - } - else if (PyByteArray_Check(pybuffer)) - { - size_t size = PyByteArray_Size(pybuffer); - buffer.allocate(size); - buffer.put(PyByteArray_AsString(pybuffer),size); - buffer.flip(); // prepare the buffer for reading from - } - else - throw XBMCAddon::WrongTypeException("argument \"%s\" for \"%s\" must be a string or a bytearray", "buffer", "write"); - - apiResult = ((XBMCAddon::xbmcvfs::File*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_File_Type,"write","XBMCAddon::xbmcvfs::File"))-> write( buffer ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"write\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"write\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_File_size (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::File*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_File_Type,"size","XBMCAddon::xbmcvfs::File"))-> size( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"size\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"size\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_File_seek (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "seekBytes", - "iWhence", - NULL}; - - long long seekBytes ; - int iWhence ; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "Li", - const_cast(keywords), - &seekBytes, - &iWhence - )) - { - return NULL; - } - - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::File*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_File_Type,"seek","XBMCAddon::xbmcvfs::File"))-> seek( seekBytes, iWhence ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"seek\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"seek\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_File_close (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcvfs::File*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_File_Type,"close","XBMCAddon::xbmcvfs::File"))-> close( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"close\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"close\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypath - )) - { - return NULL; - } - - XBMCAddon::xbmcvfs::Stat * apiResult; - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","Stat"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcvfs::Stat( path ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcvfs::Stat\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcvfs::Stat\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_mode (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"st_mode","XBMCAddon::xbmcvfs::Stat"))-> st_mode( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"st_mode\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"st_mode\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_ino (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"st_ino","XBMCAddon::xbmcvfs::Stat"))-> st_ino( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"st_ino\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"st_ino\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_dev (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"st_dev","XBMCAddon::xbmcvfs::Stat"))-> st_dev( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"st_dev\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"st_dev\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_nlink (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"st_nlink","XBMCAddon::xbmcvfs::Stat"))-> st_nlink( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"st_nlink\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"st_nlink\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_uid (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"st_uid","XBMCAddon::xbmcvfs::Stat"))-> st_uid( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"st_uid\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"st_uid\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_gid (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"st_gid","XBMCAddon::xbmcvfs::Stat"))-> st_gid( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"st_gid\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"st_gid\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_size (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"st_size","XBMCAddon::xbmcvfs::Stat"))-> st_size( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"st_size\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"st_size\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_atime (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"atime","XBMCAddon::xbmcvfs::Stat"))-> atime( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"atime\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"atime\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_mtime (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"mtime","XBMCAddon::xbmcvfs::Stat"))-> mtime( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"mtime\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"mtime\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_ctime (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - long long apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"ctime","XBMCAddon::xbmcvfs::Stat"))-> ctime( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"ctime\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"ctime\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("L", apiResult); - - return result; - } - - static PyObject* xbmcvfs_copy (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "strSource", - "strDestination", - NULL}; - - std::string strSource ; - PyObject* pystrSource = NULL; - std::string strDestination ; - PyObject* pystrDestination = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO", - const_cast(keywords), - &pystrSource, - &pystrDestination - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pystrSource) PyXBMCGetUnicodeString(strSource,pystrSource,false,"strSource","XBMCAddon::xbmcvfs::copy"); - if (pystrDestination) PyXBMCGetUnicodeString(strDestination,pystrDestination,false,"strDestination","XBMCAddon::xbmcvfs::copy"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcvfs::copy( strSource, strDestination ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::copy\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::copy\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcvfs_delete (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "file", - NULL}; - - std::string file ; - PyObject* pyfile = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyfile - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pyfile) PyXBMCGetUnicodeString(file,pyfile,false,"file","XBMCAddon::xbmcvfs::deleteFile"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcvfs::deleteFile( file ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::deleteFile\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::deleteFile\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcvfs_rename (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "file", - "newFile", - NULL}; - - std::string file ; - PyObject* pyfile = NULL; - std::string newFile ; - PyObject* pynewFile = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO", - const_cast(keywords), - &pyfile, - &pynewFile - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pyfile) PyXBMCGetUnicodeString(file,pyfile,false,"file","XBMCAddon::xbmcvfs::rename"); - if (pynewFile) PyXBMCGetUnicodeString(newFile,pynewFile,false,"newFile","XBMCAddon::xbmcvfs::rename"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcvfs::rename( file, newFile ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::rename\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::rename\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcvfs_exists (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypath - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","XBMCAddon::xbmcvfs::exists"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcvfs::exists( path ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::exists\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::exists\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcvfs_mkdir (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypath - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","XBMCAddon::xbmcvfs::mkdir"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcvfs::mkdir( path ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::mkdir\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::mkdir\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcvfs_mkdirs (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypath - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","XBMCAddon::xbmcvfs::mkdirs"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcvfs::mkdirs( path ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::mkdirs\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::mkdirs\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcvfs_rmdir (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - "force", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - bool force = false; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O|b", - const_cast(keywords), - &pypath, - &force - )) - { - return NULL; - } - - bool apiResult; - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","XBMCAddon::xbmcvfs::rmdir"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcvfs::rmdir( path, force ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::rmdir\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::rmdir\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = Py_BuildValue("b", apiResult); - - return result; - } - - static PyObject* xbmcvfs_listdir (PyObject* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "path", - NULL}; - - std::string path ; - PyObject* pypath = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pypath - )) - { - return NULL; - } - - Tuple< std::vector< XBMCAddon::String > ,std::vector< XBMCAddon::String > > apiResult; - try - { - if (pypath) PyXBMCGetUnicodeString(path,pypath,false,"path","XBMCAddon::xbmcvfs::listdir"); - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = XBMCAddon::xbmcvfs::listdir( path ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::listdir\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::listdir\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - int vecSize = apiResult.GetNumValuesSet(); - result = PyTuple_New(vecSize); - { - PyObject* pyentry1; - - if (vecSize > 0) - { - std::vector< XBMCAddon::String > & entry1 = apiResult.first(); - { - - pyentry1 = PyList_New(0); - - for (std::vector::iterator iter = entry1.begin(); iter != entry1.end(); ++iter) - { - std::string & entry2 = *iter; - PyObject* pyentry2; - pyentry2 = PyString_FromStringAndSize(entry2.c_str(), entry2.length()); - PyList_Append(pyentry1, pyentry2); - Py_DECREF(pyentry2); - } - - - } - PyTuple_SetItem(result, 0, pyentry1); - } - - - if (vecSize > 1) - { - std::vector< XBMCAddon::String > & entry1 = apiResult.second(); - { - - pyentry1 = PyList_New(0); - - for (std::vector::iterator iter = entry1.begin(); iter != entry1.end(); ++iter) - { - std::string & entry3 = *iter; - PyObject* pyentry3; - pyentry3 = PyString_FromStringAndSize(entry3.c_str(), entry3.length()); - PyList_Append(pyentry1, pyentry3); - Py_DECREF(pyentry3); - } - - - } - PyTuple_SetItem(result, 1, pyentry1); - } - - } - - return result; - } - - static void xbmcvfs_XBMCAddon_xbmcvfs_File_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcvfs::File* theObj = (XBMCAddon::xbmcvfs::File*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_File_Type,"~XBMCAddon::xbmcvfs::File","XBMCAddon::xbmcvfs::File"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::File\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::File\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcvfs_XBMCAddon_xbmcvfs_Stat_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcvfs::Stat* theObj = (XBMCAddon::xbmcvfs::Stat*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcvfs_Stat_Type,"~XBMCAddon::xbmcvfs::Stat","XBMCAddon::xbmcvfs::Stat"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::Stat\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcvfs::Stat\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcvfs::File - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcvfs_File_methods[] = { - {"read", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_File_read, METH_VARARGS|METH_KEYWORDS, NULL }, - {"readBytes", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_File_readBytes, METH_VARARGS|METH_KEYWORDS, NULL }, - {"write", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_File_write, METH_VARARGS|METH_KEYWORDS, NULL }, - {"size", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_File_size, METH_VARARGS|METH_KEYWORDS, NULL }, - {"seek", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_File_seek, METH_VARARGS|METH_KEYWORDS, NULL }, - {"close", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_File_close, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcvfs_File_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcvfs_File_Type.pythonType; - pythonType.tp_name = "xbmcvfs.File"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcvfs_XBMCAddon_xbmcvfs_File_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcvfs_File_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcvfs_XBMCAddon_xbmcvfs_File_New; - - TyXBMCAddon_xbmcvfs_File_Type.swigType="p.XBMCAddon::xbmcvfs::File"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcvfs_File_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcvfs::Stat - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcvfs_Stat_methods[] = { - {"st_mode", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_mode, METH_VARARGS|METH_KEYWORDS, NULL }, - {"st_ino", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_ino, METH_VARARGS|METH_KEYWORDS, NULL }, - {"st_dev", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_dev, METH_VARARGS|METH_KEYWORDS, NULL }, - {"st_nlink", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_nlink, METH_VARARGS|METH_KEYWORDS, NULL }, - {"st_uid", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_uid, METH_VARARGS|METH_KEYWORDS, NULL }, - {"st_gid", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_gid, METH_VARARGS|METH_KEYWORDS, NULL }, - {"st_size", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_size, METH_VARARGS|METH_KEYWORDS, NULL }, - {"st_atime", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_atime, METH_VARARGS|METH_KEYWORDS, NULL }, - {"st_mtime", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_mtime, METH_VARARGS|METH_KEYWORDS, NULL }, - {"st_ctime", (PyCFunction)xbmcvfs_XBMCAddon_xbmcvfs_Stat_st_ctime, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcvfs_Stat_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcvfs_Stat_Type.pythonType; - pythonType.tp_name = "xbmcvfs.Stat"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcvfs_XBMCAddon_xbmcvfs_Stat_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcvfs_Stat_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcvfs_XBMCAddon_xbmcvfs_Stat_New; - - TyXBMCAddon_xbmcvfs_Stat_Type.swigType="p.XBMCAddon::xbmcvfs::Stat"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcvfs_Stat_Type); - - } - //========================================================================= - - - static PyMethodDef xbmcvfs_methods[] = { - {"copy", (PyCFunction)xbmcvfs_copy, METH_VARARGS|METH_KEYWORDS, NULL }, - {"delete", (PyCFunction)xbmcvfs_delete, METH_VARARGS|METH_KEYWORDS, NULL }, - {"rename", (PyCFunction)xbmcvfs_rename, METH_VARARGS|METH_KEYWORDS, NULL }, - {"exists", (PyCFunction)xbmcvfs_exists, METH_VARARGS|METH_KEYWORDS, NULL }, - {"mkdir", (PyCFunction)xbmcvfs_mkdir, METH_VARARGS|METH_KEYWORDS, NULL }, - {"mkdirs", (PyCFunction)xbmcvfs_mkdirs, METH_VARARGS|METH_KEYWORDS, NULL }, - {"rmdir", (PyCFunction)xbmcvfs_rmdir, METH_VARARGS|METH_KEYWORDS, NULL }, - {"listdir", (PyCFunction)xbmcvfs_listdir, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - // This is the call that will call all of the other initializes - // for all of the classes in this module - static void initTypes() - { - static bool typesAlreadyInitialized = false; - if (!typesAlreadyInitialized) - { - typesAlreadyInitialized = true; - - initPyXBMCAddon_xbmcvfs_File_Type(); - initPyXBMCAddon_xbmcvfs_Stat_Type(); - if (PyType_Ready(&(TyXBMCAddon_xbmcvfs_File_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcvfs_Stat_Type.pythonType)) < 0) - return; - } - } - - void initModule_xbmcvfs() - { - initTypes(); - - // init general xbmcvfs modules - PyObject* module; - - - Py_INCREF(&(TyXBMCAddon_xbmcvfs_File_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcvfs_Stat_Type.pythonType)); - - module = Py_InitModule("xbmcvfs", xbmcvfs_methods); - if (module == NULL) return; - - - PyModule_AddObject(module, "File", (PyObject*)(&(TyXBMCAddon_xbmcvfs_File_Type.pythonType))); - PyModule_AddObject(module, "Stat", (PyObject*)(&(TyXBMCAddon_xbmcvfs_Stat_Type.pythonType))); - - // constants - PyModule_AddStringConstant(module, "__author__", "Team Kodi "); - PyModule_AddStringConstant(module, "__date__", "Sun Sep 01 10:46:59 GMT 2019"); - PyModule_AddStringConstant(module, "__version__", "2.26.0"); - PyModule_AddStringConstant(module, "__credits__", "Team Kodi"); - PyModule_AddStringConstant(module, "__platform__", "ALL"); - - // need to handle constants - - } - -} // end PythonBindings namespace for python type definitions - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcvfs.i.xml b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcvfs.i.xml deleted file mode 100644 index c6fb95bf1f..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcvfs.i.xml +++ /dev/null @@ -1,1804 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcwsgi.i.cpp b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcwsgi.i.cpp deleted file mode 100644 index 02911664b9..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcwsgi.i.cpp +++ /dev/null @@ -1,1275 +0,0 @@ - - -/* - * Copyright (C) 2005-2018 Team Kodi - * This file is part of Kodi - https://kodi.tv - * - * SPDX-License-Identifier: GPL-2.0-or-later - * See LICENSES/README.md for more information. - */ - -// ************************************************************************ -// This file was generated by xbmc compile process. DO NOT EDIT!! -// It was created by running the code generator on the spec file for -// the module "xbmcwsgi" on the template file PythonSwig.template.cpp -// ************************************************************************ - - -#if defined(TARGET_WINDOWS) -# include -#endif - -#ifdef HAS_WEB_SERVER - - -#include -#include -#include "interfaces/python/LanguageHook.h" -#include "interfaces/python/swig.h" -#include "interfaces/python/PyContext.h" - - -#include "interfaces/legacy/wsgi/WsgiErrorStream.h" -#include "interfaces/legacy/wsgi/WsgiInputStream.h" -#include "interfaces/legacy/wsgi/WsgiResponse.h" -#include "interfaces/legacy/wsgi/WsgiResponseBody.h" - -using namespace XBMCAddon; -using namespace xbmcwsgi; - -#if defined(__GNUG__) -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif - - - -namespace PythonBindings -{ - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcwsgi::WsgiErrorStream - TypeInfo TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type(typeid(XBMCAddon::xbmcwsgi::WsgiErrorStream)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcwsgi::WsgiInputStreamIterator - TypeInfo TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type(typeid(XBMCAddon::xbmcwsgi::WsgiInputStreamIterator)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcwsgi::WsgiInputStream - TypeInfo TyXBMCAddon_xbmcwsgi_WsgiInputStream_Type(typeid(XBMCAddon::xbmcwsgi::WsgiInputStream)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcwsgi::WsgiResponse - TypeInfo TyXBMCAddon_xbmcwsgi_WsgiResponse_Type(typeid(XBMCAddon::xbmcwsgi::WsgiResponse)); - //========================================================================= - - //========================================================================= - // These variables will hold the Python Type information for XBMCAddon::xbmcwsgi::WsgiResponseBody - TypeInfo TyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type(typeid(XBMCAddon::xbmcwsgi::WsgiResponseBody)); - //========================================================================= - - - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiErrorStream_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcwsgi::WsgiErrorStream * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcwsgi::WsgiErrorStream( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcwsgi::WsgiErrorStream\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcwsgi::WsgiErrorStream\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiErrorStream_flush (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - try - { - - ((XBMCAddon::xbmcwsgi::WsgiErrorStream*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type,"flush","XBMCAddon::xbmcwsgi::WsgiErrorStream"))-> flush( ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"flush\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"flush\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiErrorStream_write (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "str", - NULL}; - - std::string str ; - PyObject* pystr = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pystr - )) - { - return NULL; - } - - - try - { - if (pystr) PyXBMCGetUnicodeString(str,pystr,false,"str","write"); - - ((XBMCAddon::xbmcwsgi::WsgiErrorStream*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type,"write","XBMCAddon::xbmcwsgi::WsgiErrorStream"))-> write( str ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"write\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"write\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiErrorStream_writelines (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "seq", - NULL}; - - std::vector< XBMCAddon::String > seq ; - PyObject* pyseq = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pyseq - )) - { - return NULL; - } - - - try - { - - if (pyseq) - { - bool isTuple = PyObject_TypeCheck(pyseq,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyseq,&PyList_Type)) - throw WrongTypeException("The parameter \"seq\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyseq) : PyList_Size(pyseq)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyseq, i) : PyList_GetItem(pyseq, i)); - std::string entry1; - if (pyentry1) PyXBMCGetUnicodeString(entry1,pyentry1,false,"entry1","writelines"); - seq.push_back(entry1); - } - } - - - ((XBMCAddon::xbmcwsgi::WsgiErrorStream*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type,"writelines","XBMCAddon::xbmcwsgi::WsgiErrorStream"))-> writelines( seq ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"writelines\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"writelines\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcwsgi::WsgiInputStreamIterator * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcwsgi::WsgiInputStreamIterator( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcwsgi::WsgiInputStreamIterator\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcwsgi::WsgiInputStreamIterator\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_read (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "size", - NULL}; - - unsigned long size = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|k", - const_cast(keywords), - &size - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcwsgi::WsgiInputStreamIterator*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type,"read","XBMCAddon::xbmcwsgi::WsgiInputStreamIterator"))-> read( size ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"read\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"read\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_readline (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "size", - NULL}; - - unsigned long size = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|k", - const_cast(keywords), - &size - )) - { - return NULL; - } - - XBMCAddon::String apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcwsgi::WsgiInputStreamIterator*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type,"readline","XBMCAddon::xbmcwsgi::WsgiInputStreamIterator"))-> readline( size ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"readline\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"readline\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_readlines (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "sizehint", - NULL}; - - unsigned long sizehint = 0; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "|k", - const_cast(keywords), - &sizehint - )) - { - return NULL; - } - - std::vector< XBMCAddon::String > apiResult; - try - { - - apiResult = ((XBMCAddon::xbmcwsgi::WsgiInputStreamIterator*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type,"readlines","XBMCAddon::xbmcwsgi::WsgiInputStreamIterator"))-> readlines( sizehint ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"readlines\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"readlines\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - - result = PyList_New(0); - - for (std::vector::iterator iter = apiResult.begin(); iter != apiResult.end(); ++iter) - { - std::string & entry1 = *iter; - PyObject* pyentry1; - pyentry1 = PyString_FromStringAndSize(entry1.c_str(), entry1.length()); - PyList_Append(result, pyentry1); - Py_DECREF(pyentry1); - } - - - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStream_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcwsgi::WsgiInputStream * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcwsgi::WsgiInputStream( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcwsgi::WsgiInputStream\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcwsgi::WsgiInputStream\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponse_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcwsgi::WsgiResponse * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcwsgi::WsgiResponse( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcwsgi::WsgiResponse\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcwsgi::WsgiResponse\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponse_callable_ (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "status", - "response_headers", - "exc_info", - NULL}; - - std::string status ; - PyObject* pystatus = NULL; - std::vector< XBMCAddon::xbmcwsgi::WsgiHttpHeader > response_headers ; - PyObject* pyresponse_headers = NULL; - void * exc_info = NULL; - PyObject* pyexc_info = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "OO|O", - const_cast(keywords), - &pystatus, - &pyresponse_headers, - &pyexc_info - )) - { - return NULL; - } - - WsgiResponseBody * apiResult; - try - { - if (pystatus) PyXBMCGetUnicodeString(status,pystatus,false,"status","operator ()"); - - if (pyresponse_headers) - { - bool isTuple = PyObject_TypeCheck(pyresponse_headers,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyresponse_headers,&PyList_Type)) - throw WrongTypeException("The parameter \"response_headers\" must be either a Tuple or a List."); - - - PyObject *pyentry1 = NULL; - auto vecSize = (isTuple ? PyTuple_Size(pyresponse_headers) : PyList_Size(pyresponse_headers)); - for(Py_ssize_t i = 0; i < vecSize; i++) - { - pyentry1 = (isTuple ? PyTuple_GetItem(pyresponse_headers, i) : PyList_GetItem(pyresponse_headers, i)); - Tuple< XBMCAddon::String ,XBMCAddon::String > entry1; - - if(pyentry1) - { - bool isTuple = PyObject_TypeCheck(pyentry1,&PyTuple_Type); - if (!isTuple && !PyObject_TypeCheck(pyentry1,&PyList_Type)) - throw WrongTypeException("The parameter \"entry1\" must be either a Tuple or a List."); - auto vecSize = (isTuple ? PyTuple_Size(pyentry1) : PyList_Size(pyentry1)); - - if (vecSize > 0) - { - PyObject *pyentry0_2 = NULL; - pyentry0_2 = (isTuple ? PyTuple_GetItem(pyentry1, 0) : PyList_GetItem(pyentry1, 0)); - std::string entry0_2; - if (pyentry0_2) PyXBMCGetUnicodeString(entry0_2,pyentry0_2,false,"entry0_2","operator ()"); - entry1.first() = entry0_2; - } - - if (vecSize > 1) - { - PyObject *pyentry1_2 = NULL; - pyentry1_2 = (isTuple ? PyTuple_GetItem(pyentry1, 1) : PyList_GetItem(pyentry1, 1)); - std::string entry1_2; - if (pyentry1_2) PyXBMCGetUnicodeString(entry1_2,pyentry1_2,false,"entry1_2","operator ()"); - entry1.second() = entry1_2; - } - - } - - response_headers.push_back(entry1); - } - } - - exc_info = (void*)pyexc_info; - - apiResult = ((XBMCAddon::xbmcwsgi::WsgiResponse*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiResponse_Type,"operator ()","XBMCAddon::xbmcwsgi::WsgiResponse"))-> operator ()( status, response_headers, exc_info ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"operator ()\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"operator ()\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,true); - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponseBody_New (PyTypeObject* pytype , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - XBMCAddon::xbmcwsgi::WsgiResponseBody * apiResult; - try - { - - XBMCAddon::SetLanguageHookGuard slhg(XBMCAddon::Python::PythonLanguageHook::GetIfExists(PyThreadState_Get()->interp).get()); - apiResult = new XBMCAddon::xbmcwsgi::WsgiResponseBody( ); - prepareForReturn(apiResult); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"new XBMCAddon::xbmcwsgi::WsgiResponseBody\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"new XBMCAddon::xbmcwsgi::WsgiResponseBody\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - result = makePythonInstance(apiResult,pytype,false); - - return result; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponseBody_callable_ (PyHolder* self , PyObject *args, PyObject *kwds ) - { - XBMC_TRACE; - - static const char *keywords[] = { - "data", - NULL}; - - std::string data ; - PyObject* pydata = NULL; - if (!PyArg_ParseTupleAndKeywords( - args, - kwds, - "O", - const_cast(keywords), - &pydata - )) - { - return NULL; - } - - - try - { - if (pydata) PyXBMCGetUnicodeString(data,pydata,false,"data","operator ()"); - - ((XBMCAddon::xbmcwsgi::WsgiResponseBody*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type,"operator ()","XBMCAddon::xbmcwsgi::WsgiResponseBody"))-> operator ()( data ); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"operator ()\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"operator ()\""); - return NULL; - } - - PyObject* result = Py_None; - - // transform the result - Py_INCREF(Py_None); - result = Py_None; - - return result; - } - - static void xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiErrorStream_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcwsgi::WsgiErrorStream* theObj = (XBMCAddon::xbmcwsgi::WsgiErrorStream*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type,"~XBMCAddon::xbmcwsgi::WsgiErrorStream","XBMCAddon::xbmcwsgi::WsgiErrorStream"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcwsgi::WsgiErrorStream\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcwsgi::WsgiErrorStream\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcwsgi::WsgiInputStreamIterator* theObj = (XBMCAddon::xbmcwsgi::WsgiInputStreamIterator*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type,"~XBMCAddon::xbmcwsgi::WsgiInputStreamIterator","XBMCAddon::xbmcwsgi::WsgiInputStreamIterator"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcwsgi::WsgiInputStreamIterator\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcwsgi::WsgiInputStreamIterator\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStream_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcwsgi::WsgiInputStream* theObj = (XBMCAddon::xbmcwsgi::WsgiInputStream*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiInputStream_Type,"~XBMCAddon::xbmcwsgi::WsgiInputStream","XBMCAddon::xbmcwsgi::WsgiInputStream"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcwsgi::WsgiInputStream\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcwsgi::WsgiInputStream\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponse_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcwsgi::WsgiResponse* theObj = (XBMCAddon::xbmcwsgi::WsgiResponse*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiResponse_Type,"~XBMCAddon::xbmcwsgi::WsgiResponse","XBMCAddon::xbmcwsgi::WsgiResponse"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcwsgi::WsgiResponse\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcwsgi::WsgiResponse\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - static void xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponseBody_Dealloc (PyHolder* self ) - { - XBMC_TRACE; - - try - { - - - XBMCAddon::xbmcwsgi::WsgiResponseBody* theObj = (XBMCAddon::xbmcwsgi::WsgiResponseBody*)retrieveApiInstance((PyObject*)self,&TyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type,"~XBMCAddon::xbmcwsgi::WsgiResponseBody","XBMCAddon::xbmcwsgi::WsgiResponseBody"); - cleanForDealloc(theObj); - - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"XBMCAddon::xbmcwsgi::WsgiResponseBody\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"XBMCAddon::xbmcwsgi::WsgiResponseBody\""); - } - - self->ob_type->tp_free((PyObject*)self); - - } - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcwsgi::WsgiErrorStream - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcwsgi_WsgiErrorStream_methods[] = { - {"flush", (PyCFunction)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiErrorStream_flush, METH_VARARGS|METH_KEYWORDS, NULL }, - {"write", (PyCFunction)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiErrorStream_write, METH_VARARGS|METH_KEYWORDS, NULL }, - {"writelines", (PyCFunction)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiErrorStream_writelines, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type.pythonType; - pythonType.tp_name = "xbmcwsgi.WsgiErrorStream"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiErrorStream_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcwsgi_WsgiErrorStream_methods; - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiErrorStream_New; - - TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type.swigType="p.XBMCAddon::xbmcwsgi::WsgiErrorStream"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcwsgi::WsgiInputStreamIterator - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_methods[] = { - {"read", (PyCFunction)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_read, METH_VARARGS|METH_KEYWORDS, NULL }, - {"readline", (PyCFunction)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_readline, METH_VARARGS|METH_KEYWORDS, NULL }, - {"readlines", (PyCFunction)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_readlines, METH_VARARGS|METH_KEYWORDS, NULL }, - {NULL, NULL, 0, NULL} - }; - - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_iter(PyObject* self) - { - return self; - } - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_iternext(PyObject* self) - { - PyObject* result = NULL; - try - { - XBMCAddon::xbmcwsgi::WsgiInputStreamIterator* iter = (XBMCAddon::xbmcwsgi::WsgiInputStreamIterator*)retrieveApiInstance(self,&TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type,"xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_iternext","XBMCAddon::xbmcwsgi::WsgiInputStreamIterator"); - - // check if we have reached the end - if (!iter->end()) - { - ++(*iter); - - std::string apiResult = **iter; - result = PyString_FromStringAndSize(apiResult.c_str(), apiResult.length()); - } - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_iternext\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_iternext\""); - return NULL; - } - - return result; - } - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type.pythonType; - pythonType.tp_name = "xbmcwsgi.WsgiInputStreamIterator"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_methods; - pythonType.tp_iter = (getiterfunc)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_iter; - pythonType.tp_iternext = (iternextfunc)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_iternext; - - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStreamIterator_New; - - TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type.swigType="p.XBMCAddon::xbmcwsgi::WsgiInputStreamIterator"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcwsgi::WsgiInputStream - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcwsgi_WsgiInputStream_methods[] = { - {NULL, NULL, 0, NULL} - }; - - - static PyObject* xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStream_iter(PyObject* self) - { - PyObject* result = NULL; - try - { - XBMCAddon::xbmcwsgi::WsgiInputStreamIterator* apiResult = ((XBMCAddon::xbmcwsgi::WsgiInputStream*)retrieveApiInstance(self,&TyXBMCAddon_xbmcwsgi_WsgiInputStream_Type,"xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStream_iternext","XBMCAddon::xbmcwsgi::WsgiInputStream"))->begin(); - - result = makePythonInstance(apiResult,true); - } - catch (const XBMCAddon::WrongTypeException& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_TypeError, e.GetMessage()); - return NULL; - } - catch (const XbmcCommons::Exception& e) - { - CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage()); - PyErr_SetString(PyExc_RuntimeError, e.GetMessage()); - return NULL; - } - catch (...) - { - CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStream_iternext\""); - PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStream_iternext\""); - return NULL; - } - - return result; - } - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcwsgi_WsgiInputStream_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcwsgi_WsgiInputStream_Type.pythonType; - pythonType.tp_name = "xbmcwsgi.WsgiInputStream"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStream_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcwsgi_WsgiInputStream_methods; - pythonType.tp_iter = (getiterfunc)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStream_iter; - - - pythonType.tp_base = &(TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type.pythonType); - pythonType.tp_new = xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiInputStream_New; - - TyXBMCAddon_xbmcwsgi_WsgiInputStream_Type.swigType="p.XBMCAddon::xbmcwsgi::WsgiInputStream"; - TyXBMCAddon_xbmcwsgi_WsgiInputStream_Type.parentType=&TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type; - - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcwsgi_WsgiInputStream_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcwsgi::WsgiResponse - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcwsgi_WsgiResponse_methods[] = { - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcwsgi_WsgiResponse_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcwsgi_WsgiResponse_Type.pythonType; - pythonType.tp_name = "xbmcwsgi.WsgiResponse"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponse_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcwsgi_WsgiResponse_methods; - pythonType.tp_call = (ternaryfunc)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponse_callable_; - - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponse_New; - - TyXBMCAddon_xbmcwsgi_WsgiResponse_Type.swigType="p.XBMCAddon::xbmcwsgi::WsgiResponse"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcwsgi_WsgiResponse_Type); - - } - //========================================================================= - - //========================================================================= - // This section contains the initialization for the - // Python extension for the Api class XBMCAddon::xbmcwsgi::WsgiResponseBody - //========================================================================= - // All of the methods on this class - static PyMethodDef XBMCAddon_xbmcwsgi_WsgiResponseBody_methods[] = { - {NULL, NULL, 0, NULL} - }; - - - - // This method initializes the above mentioned Python Type structure - static void initPyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type() - { - - - PyTypeObject& pythonType = TyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type.pythonType; - pythonType.tp_name = "xbmcwsgi.WsgiResponseBody"; - pythonType.tp_basicsize = sizeof(PyHolder); - pythonType.tp_dealloc = (destructor)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponseBody_Dealloc; - - - pythonType.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE; - - pythonType.tp_doc = NULL; - pythonType.tp_methods = XBMCAddon_xbmcwsgi_WsgiResponseBody_methods; - pythonType.tp_call = (ternaryfunc)xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponseBody_callable_; - - - pythonType.tp_base = NULL; - pythonType.tp_new = xbmcwsgi_XBMCAddon_xbmcwsgi_WsgiResponseBody_New; - - TyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type.swigType="p.XBMCAddon::xbmcwsgi::WsgiResponseBody"; - registerAddonClassTypeInformation(&TyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type); - - } - //========================================================================= - - - static PyMethodDef xbmcwsgi_methods[] = { - {NULL, NULL, 0, NULL} - }; - - // This is the call that will call all of the other initializes - // for all of the classes in this module - static void initTypes() - { - static bool typesAlreadyInitialized = false; - if (!typesAlreadyInitialized) - { - typesAlreadyInitialized = true; - - initPyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type(); - initPyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type(); - initPyXBMCAddon_xbmcwsgi_WsgiInputStream_Type(); - initPyXBMCAddon_xbmcwsgi_WsgiResponse_Type(); - initPyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type(); - if (PyType_Ready(&(TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcwsgi_WsgiInputStream_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcwsgi_WsgiResponse_Type.pythonType)) < 0) - return; - if (PyType_Ready(&(TyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type.pythonType)) < 0) - return; - } - } - - void initModule_xbmcwsgi() - { - initTypes(); - - // init general xbmcwsgi modules - PyObject* module; - - - Py_INCREF(&(TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcwsgi_WsgiInputStream_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcwsgi_WsgiResponse_Type.pythonType)); - Py_INCREF(&(TyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type.pythonType)); - - module = Py_InitModule("xbmcwsgi", xbmcwsgi_methods); - if (module == NULL) return; - - - PyModule_AddObject(module, "WsgiErrorStream", (PyObject*)(&(TyXBMCAddon_xbmcwsgi_WsgiErrorStream_Type.pythonType))); - PyModule_AddObject(module, "WsgiInputStreamIterator", (PyObject*)(&(TyXBMCAddon_xbmcwsgi_WsgiInputStreamIterator_Type.pythonType))); - PyModule_AddObject(module, "WsgiInputStream", (PyObject*)(&(TyXBMCAddon_xbmcwsgi_WsgiInputStream_Type.pythonType))); - PyModule_AddObject(module, "WsgiResponse", (PyObject*)(&(TyXBMCAddon_xbmcwsgi_WsgiResponse_Type.pythonType))); - PyModule_AddObject(module, "WsgiResponseBody", (PyObject*)(&(TyXBMCAddon_xbmcwsgi_WsgiResponseBody_Type.pythonType))); - - // constants - PyModule_AddStringConstant(module, "__author__", "Team Kodi "); - PyModule_AddStringConstant(module, "__date__", "Sun Sep 01 10:46:49 GMT 2019"); - PyModule_AddStringConstant(module, "__version__", "2.26.0"); - PyModule_AddStringConstant(module, "__credits__", "Team Kodi"); - PyModule_AddStringConstant(module, "__platform__", "ALL"); - - // need to handle constants - - } - -} // end PythonBindings namespace for python type definitions - - -#endif - diff --git a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcwsgi.i.xml b/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcwsgi.i.xml deleted file mode 100644 index 2d03f4dffa..0000000000 --- a/srcpkgs/kodi/files/swig.nojava-18.4/AddonModuleXbmcwsgi.i.xml +++ /dev/null @@ -1,2249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/srcpkgs/kodi/template b/srcpkgs/kodi/template index 2a942c565e..96627f4012 100644 --- a/srcpkgs/kodi/template +++ b/srcpkgs/kodi/template @@ -1,7 +1,7 @@ # Template file for 'kodi' pkgname=kodi -version=18.4 -revision=2 +version=18.5 +revision=1 _codename="Leia" wrksrc="xbmc-${version}-${_codename}" build_style=cmake @@ -11,7 +11,7 @@ maintainer="Helmut Pozimski " license="GPL-2.0-or-later" homepage="http://www.kodi.tv" distfiles="https://github.com/xbmc/xbmc/archive/${version}-${_codename}.tar.gz" -checksum=bf2be186d8ae5b5377e43c06a538012bb9f51a0e98f8244b70a401006861d110 +checksum=108979df8b41ab4168f5cdc0233f46e38767eda5921f4ccae16584e98d0d6b29 patch_args="-Np1" LDFLAGS+=" -Wl,-z,stack-size=1048576" @@ -21,7 +21,7 @@ archs="i686* x86_64* aarch64* hostmakedepends=" automake libtool pkg-config gperf cmake zip unzip nasm yasm python-devel - gettext-devel libltdl-devel curl flatbuffers" + gettext-devel libltdl-devel curl flatbuffers swig openjdk11" makedepends=" eudev-libudev-devel pcre-devel expat-devel libpng-devel libjpeg-turbo-devel libXrandr-devel avahi-libs-devel pulseaudio-devel samba-devel tiff-devel @@ -46,15 +46,12 @@ case "$XBPS_TARGET_MACHINE" in hostmakedepends+=" libmysqlclient-devel SDL2_image-devel lzo-devel"; makedepends+=" python-devel ffmpeg-devel"; configure_args+=" -DENABLE_LDGOLD=Off -DENABLE_VAAPI=OFF"; - _kodi_nojava=yes ;; esac -# musl builds need generated addons (no java). # gold broken with musl case "$XBPS_MACHINE" in - *-musl) _kodi_nojava=yes; configure_args+=" -DENABLE_LDGOLD=Off";; - *) hostmakedepends+=" swig openjdk-jre";; + *-musl) configure_args+=" -DENABLE_LDGOLD=Off";; esac pre_configure() { @@ -64,18 +61,7 @@ pre_configure() { xargs sed -i -e "s;-isystem;-I;g" fi - # Copy generated files to avoid requiring java. - if [ "${_kodi_nojava}" ]; then - mkdir -p build/build/swig - - # THESE FILES MUST BE UPDATED WITH EVERY VERSION BUMP! - cp -r $FILESDIR/swig.nojava-$version/* -t build/build/swig - cp $FILESDIR/CMakeCache.txt.nojava build/CMakeCache.txt - - echo "set(FOUND_SWIG Yes)" > cmake/modules/FindSWIG.cmake - else - . /etc/profile.d/10_openjdk.sh - fi + . /etc/profile.d/10_openjdk11.sh if [ "$CROSS_BUILD" ]; then for i in JsonSchemaBuilder TexturePacker; do