xbmc
Public Member Functions | List of all members
XBMCAddon::Python::PythonCallbackHandler Class Reference

This class represents a specialization of the callback handler that specifically checks to see if we're in an OK thread state based on Python specifics. More...

#include <CallbackHandler.h>

Inheritance diagram for XBMCAddon::Python::PythonCallbackHandler:
Inheritance graph
[legend]
Collaboration diagram for XBMCAddon::Python::PythonCallbackHandler:
Collaboration graph
[legend]

Public Member Functions

 PythonCallbackHandler ()
 We are ASS-U-MEing that this construction is happening within the context of a Python call. More...
 
bool isStateOk (AddonClass *obj) override
 Now we are answering the question as to whether or not we are in the PyThreadState that we were in when we started.
 
bool shouldRemoveCallback (AddonClass *obj, void *threadState) override
 For this method we expect the PyThreadState to be passed as the user data for the check. More...
 
- Public Member Functions inherited from XBMCAddon::RetardedAsyncCallbackHandler
void invokeCallback (Callback *cb) override
 
- Public Member Functions inherited from XBMCAddon::AddonClass
const char * GetClassname () const
 
LanguageHookGetLanguageHook ()
 
bool isDeallocating ()
 This method should be called while holding a Synchronize on the object. More...
 
void Release () const
 
void Acquire () const
 

Additional Inherited Members

- Static Public Member Functions inherited from XBMCAddon::RetardedAsyncCallbackHandler
static void makePendingCalls ()
 
static void clearPendingCalls (void *userData)
 
- Static Public Member Functions inherited from XBMCAddon::AddonClass
static short getNumAddonClasses ()
 
- Protected Member Functions inherited from XBMCAddon::AddonClass
virtual void deallocating ()
 This method is meant to be called from the destructor of the lowest level class. More...
 
- Static Protected Member Functions inherited from XBMCAddon::AddonClass
static short getNextClassIndex ()
 This is meant to be called during static initialization and so isn't synchronized.
 
- Protected Attributes inherited from XBMCAddon::AddonClass
LanguageHooklanguageHook
 

Detailed Description

This class represents a specialization of the callback handler that specifically checks to see if we're in an OK thread state based on Python specifics.

Constructor & Destructor Documentation

◆ PythonCallbackHandler()

XBMCAddon::Python::PythonCallbackHandler::PythonCallbackHandler ( )

We are ASS-U-MEing that this construction is happening within the context of a Python call.

This way we can store off the PyThreadState to later verify that we're handling callbacks in the appropriate thread.

Member Function Documentation

◆ shouldRemoveCallback()

bool XBMCAddon::Python::PythonCallbackHandler::shouldRemoveCallback ( AddonClass obj,
void *  threadState 
)
overridevirtual

For this method we expect the PyThreadState to be passed as the user data for the check.

Todo:
This is a stupid way to get this information back to the handler. there should be a more language neutral means.

Implements XBMCAddon::RetardedAsyncCallbackHandler.


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