kodi
|
Public Member Functions | |
void | Process () |
void | Uninitialize () |
void | RegisterLanguageInvocationHandler (ILanguageInvocationHandler *invocationHandler, const std::string &extension) |
void | RegisterLanguageInvocationHandler (ILanguageInvocationHandler *invocationHandler, const std::set< std::string > &extensions) |
void | UnregisterLanguageInvocationHandler (ILanguageInvocationHandler *invocationHandler) |
bool | HasLanguageInvoker (const std::string &script) const |
LanguageInvokerPtr | GetLanguageInvoker (const std::string &script) |
int | GetReusablePluginHandle (const std::string &script) |
Returns addon_handle if last reusable invoker is ready to use. | |
int | ExecuteAsync (const std::string &script, const ADDON::AddonPtr &addon=ADDON::AddonPtr(), const std::vector< std::string > &arguments=std::vector< std::string >(), bool reuseable=false, int pluginHandle=-1) |
Executes the given script asynchronously in a separate thread. More... | |
int | ExecuteAsync (const std::string &script, const LanguageInvokerPtr &languageInvoker, const ADDON::AddonPtr &addon=ADDON::AddonPtr(), const std::vector< std::string > &arguments=std::vector< std::string >(), bool reuseable=false, int pluginHandle=-1) |
Executes the given script asynchronously in a separate thread. More... | |
int | ExecuteSync (const std::string &script, const ADDON::AddonPtr &addon=ADDON::AddonPtr(), const std::vector< std::string > &arguments=std::vector< std::string >(), uint32_t timeoutMs=0, bool waitShutdown=false) |
Executes the given script synchronously. More... | |
int | ExecuteSync (const std::string &script, const LanguageInvokerPtr &languageInvoker, const ADDON::AddonPtr &addon=ADDON::AddonPtr(), const std::vector< std::string > &arguments=std::vector< std::string >(), uint32_t timeoutMs=0, bool waitShutdown=false) |
Executes the given script synchronously. More... | |
bool | Stop (int scriptId, bool wait=false) |
bool | Stop (const std::string &scriptPath, bool wait=false) |
void | StopRunningScripts (bool wait=false) |
Stop all running scripts. More... | |
bool | IsRunning (int scriptId) const |
bool | IsRunning (const std::string &scriptPath) const |
Static Public Member Functions | |
static CScriptInvocationManager & | GetInstance () |
Protected Member Functions | |
void | OnExecutionDone (int scriptId) |
Friends | |
class | CLanguageInvokerThread |
int CScriptInvocationManager::ExecuteAsync | ( | const std::string & | script, |
const ADDON::AddonPtr & | addon = ADDON::AddonPtr() , |
||
const std::vector< std::string > & | arguments = std::vector<std::string>() , |
||
bool | reuseable = false , |
||
int | pluginHandle = -1 |
||
) |
Executes the given script asynchronously in a separate thread.
script | Path to the script to be executed |
addon | (Optional) Addon to which the script belongs |
arguments | (Optional) List of arguments passed to the script |
int CScriptInvocationManager::ExecuteAsync | ( | const std::string & | script, |
const LanguageInvokerPtr & | languageInvoker, | ||
const ADDON::AddonPtr & | addon = ADDON::AddonPtr() , |
||
const std::vector< std::string > & | arguments = std::vector<std::string>() , |
||
bool | reuseable = false , |
||
int | pluginHandle = -1 |
||
) |
Executes the given script asynchronously in a separate thread.
script | Path to the script to be executed |
languageInvoker | Language invoker to be used to execute the script |
addon | (Optional) Addon to which the script belongs |
arguments | (Optional) List of arguments passed to the script |
int CScriptInvocationManager::ExecuteSync | ( | const std::string & | script, |
const ADDON::AddonPtr & | addon = ADDON::AddonPtr() , |
||
const std::vector< std::string > & | arguments = std::vector<std::string>() , |
||
uint32_t | timeoutMs = 0 , |
||
bool | waitShutdown = false |
||
) |
Executes the given script synchronously.
The script is actually executed asynchronously but the calling thread is blocked until either the script has finished or the given timeout has expired. If the given timeout has expired the script's execution is stopped and depending on the specified wait behaviour we wait for the script's execution to finish or not.
script | Path to the script to be executed |
addon | (Optional) Addon to which the script belongs |
arguments | (Optional) List of arguments passed to the script |
timeout | (Optional) Timeout (in milliseconds) for the script's execution |
waitShutdown | (Optional) Whether to wait when having to forcefully stop the script's execution or not. |
int CScriptInvocationManager::ExecuteSync | ( | const std::string & | script, |
const LanguageInvokerPtr & | languageInvoker, | ||
const ADDON::AddonPtr & | addon = ADDON::AddonPtr() , |
||
const std::vector< std::string > & | arguments = std::vector<std::string>() , |
||
uint32_t | timeoutMs = 0 , |
||
bool | waitShutdown = false |
||
) |
Executes the given script synchronously.
The script is actually executed asynchronously but the calling thread is blocked until either the script has finished or the given timeout has expired. If the given timeout has expired the script's execution is stopped and depending on the specified wait behaviour we wait for the script's execution to finish or not.
script | Path to the script to be executed |
languageInvoker | Language invoker to be used to execute the script |
addon | (Optional) Addon to which the script belongs |
arguments | (Optional) List of arguments passed to the script |
timeout | (Optional) Timeout (in milliseconds) for the script's execution |
waitShutdown | (Optional) Whether to wait when having to forcefully stop the script's execution or not. |
void CScriptInvocationManager::StopRunningScripts | ( | bool | wait = false | ) |
Stop all running scripts.
wait | if kodi should wait for each script to finish (default false) |