9752 lines
308 KiB
C++
9752 lines
308 KiB
C++
|
|
|
|
/*
|
|
* 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 <Python.h>
|
|
#include <string>
|
|
#include "interfaces/python/LanguageHook.h"
|
|
#include "interfaces/python/swig.h"
|
|
#include "interfaces/python/PyContext.h"
|
|
|
|
|
|
#if defined(TARGET_WINDOWS)
|
|
# include <windows.h>
|
|
#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<char*>("onPlayBackStarted"),const_cast<char*>("()"));
|
|
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<char*>("onAVStarted"),const_cast<char*>("()"));
|
|
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<char*>("onAVChange"),const_cast<char*>("()"));
|
|
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<char*>("onPlayBackEnded"),const_cast<char*>("()"));
|
|
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<char*>("onPlayBackStopped"),const_cast<char*>("()"));
|
|
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<char*>("onPlayBackError"),const_cast<char*>("()"));
|
|
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<char*>("onPlayBackPaused"),const_cast<char*>("()"));
|
|
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<char*>("onPlayBackResumed"),const_cast<char*>("()"));
|
|
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<char*>("onQueueNextItem"),const_cast<char*>("()"));
|
|
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<char*>("onPlayBackSpeedChanged"),const_cast<char*>("(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<char*>("onPlayBackSeek"),const_cast<char*>("(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<char*>("onPlayBackSeekChapter"),const_cast<char*>("(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<char*>("onSettingsChanged"),const_cast<char*>("()"));
|
|
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<char*>("onScreensaverActivated"),const_cast<char*>("()"));
|
|
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<char*>("onScreensaverDeactivated"),const_cast<char*>("()"));
|
|
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<char*>("onDPMSActivated"),const_cast<char*>("()"));
|
|
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<char*>("onDPMSDeactivated"),const_cast<char*>("()"));
|
|
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<char*>("onScanStarted"),const_cast<char*>("(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<char*>("onScanFinished"),const_cast<char*>("(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<char*>("onDatabaseScanStarted"),const_cast<char*>("(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<char*>("onDatabaseUpdated"),const_cast<char*>("(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<char*>("onCleanStarted"),const_cast<char*>("(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<char*>("onCleanFinished"),const_cast<char*>("(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<char*>("onAbortRequested"),const_cast<char*>("()"));
|
|
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<char*>("onNotification"),const_cast<char*>("(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<XBMCAddon::String >::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<char**>(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<char**>(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<XBMCAddon::String >::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<char**>(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<XBMCAddon::String >::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<char**>(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<char**>(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<char**>(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<std::string >::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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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<char**>(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 <http://kodi.tv>");
|
|
PyModule_AddStringConstant(module, "__date__", "Mon Apr 22 18:48:08 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
|
|
|
|
|