Kodi Documentation
Kodi is an open source media player and entertainment hub.
XBMCAddon::RetardedAsyncCallbackHandler Class Referenceabstract

#include <CallbackHandler.h>

Inheritance diagram for XBMCAddon::RetardedAsyncCallbackHandler:
Collaboration diagram for XBMCAddon::RetardedAsyncCallbackHandler:

Public Member Functions

 ~RetardedAsyncCallbackHandler () override
void invokeCallback (Callback *cb) override
virtual bool isStateOk (AddonClass *obj)=0
virtual bool shouldRemoveCallback (AddonClass *obj, void *userData)=0
- Public Member Functions inherited from XBMCAddon::AddonClass
 AddonClass ()
virtual ~AddonClass ()
const char * GetClassname () const
LanguageHookGetLanguageHook ()
bool isDeallocating ()
void Release () const
void Acquire () const
- Public Member Functions inherited from XbmcThreads::CountingLockable< XbmcThreads::CRecursiveMutex >
 CountingLockable ()=default
void lock ()
bool try_lock ()
void unlock ()
unsigned int exit (unsigned int leave=0)
void restore (unsigned int restoreCount)
XbmcThreads::CRecursiveMutex & get_underlying ()

Static Public Member Functions

static void makePendingCalls ()
static void clearPendingCalls (void *userData)
- Static Public Member Functions inherited from XBMCAddon::AddonClass
static short getNumAddonClasses ()

Protected Member Functions

 RetardedAsyncCallbackHandler ()=default
- Protected Member Functions inherited from XBMCAddon::CallbackHandler
 CallbackHandler ()=default
- Protected Member Functions inherited from XBMCAddon::AddonClass
virtual void deallocating ()

Additional Inherited Members

- Static Protected Member Functions inherited from XBMCAddon::AddonClass
static short getNextClassIndex ()
- Protected Attributes inherited from XBMCAddon::AddonClass
- Protected Attributes inherited from XbmcThreads::CountingLockable< XbmcThreads::CRecursiveMutex >
XbmcThreads::CRecursiveMutex mutex
unsigned int count

Detailed Description

This class is primarily for Python support (hence the "Retarded" prefix). Python (et. al. Retarded languages) require that the context within which a callback executes is under the control of the language. Therefore, this handler is used to queue messages over to a language controlled thread for eventual execution.

Allow a cross thread synchronous execution. Fix the stupid means of calling the clearPendingCalls by passing userData which is specific to the handler/language type.

Constructor & Destructor Documentation

◆ RetardedAsyncCallbackHandler()

XBMCAddon::RetardedAsyncCallbackHandler::RetardedAsyncCallbackHandler ( )

◆ ~RetardedAsyncCallbackHandler()

XBMCAddon::RetardedAsyncCallbackHandler::~RetardedAsyncCallbackHandler ( )

Member Function Documentation

◆ clearPendingCalls()

void XBMCAddon::RetardedAsyncCallbackHandler::clearPendingCalls ( void userData)

◆ invokeCallback()

void XBMCAddon::RetardedAsyncCallbackHandler::invokeCallback ( Callback cb)

◆ isStateOk()

virtual bool XBMCAddon::RetardedAsyncCallbackHandler::isStateOk ( AddonClass obj)
pure virtual

◆ makePendingCalls()

void XBMCAddon::RetardedAsyncCallbackHandler::makePendingCalls ( )

◆ shouldRemoveCallback()

virtual bool XBMCAddon::RetardedAsyncCallbackHandler::shouldRemoveCallback ( AddonClass obj,
void userData 
pure virtual

The documentation for this class was generated from the following files: