xbmc
CallbackHandler.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "interfaces/legacy/CallbackHandler.h"
12 
13 #include <Python.h>
14 
15 namespace XBMCAddon
16 {
17  namespace Python
18  {
25  {
26  PyThreadState* objectThreadState;
27  public:
28 
36  bool isStateOk(AddonClass* obj) override;
37  bool shouldRemoveCallback(AddonClass* obj, void* threadState) override;
38  };
39  }
40 }
PythonCallbackHandler()
We are ASS-U-MEing that this construction is happening within the context of a Python call...
Definition: CallbackHandler.cpp:23
Defining LOG_LIFECYCLE_EVENTS will log all instantiations, deletions and also reference countings (in...
Definition: Addon.cpp:25
This class represents a specialization of the callback handler that specifically checks to see if we&#39;...
Definition: CallbackHandler.h:24
bool shouldRemoveCallback(AddonClass *obj, void *threadState) override
For this method we expect the PyThreadState to be passed as the user data for the check...
Definition: CallbackHandler.cpp:54
This class is primarily for Python support (hence the "Retarded" prefix).
Definition: CallbackHandler.h:42
This class is the superclass for all reference counted classes in the api.
Definition: AddonClass.h:57
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 wh...
Definition: CallbackHandler.cpp:33