Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <GUIInfoManager.h>
Public Member Functions | |
CGUIInfoManager (void) | |
~CGUIInfoManager (void) override | |
void | Initialize () |
void | Clear () |
void | ResetCache () |
int | GetMessageMask () override |
Should return the message mask that it wishes to receive messages for. | |
void | OnApplicationMessage (KODI::MESSAGING::ThreadMessage *pMsg) override |
This gets called whenever a message matching the registered message mask is processed. | |
INFO::InfoPtr | Register (const std::string &expression, int context=0) |
Register a boolean condition/expression This routine allows controls or other clients of the info manager to register to receive updates of particular expressions, in a particular context (currently windows). | |
void | UnRegister (const INFO::InfoPtr &expression) |
Unregister a boolean condition/expression This routine allows controls or other clients of the info manager to unregister a previously registered boolean condition/expression. | |
bool | ConditionsChangedValues (const std::map< INFO::InfoPtr, bool > &map) |
iterates through boolean conditions and compares their stored values to current values. Returns true if any condition changed value. | |
bool | EvaluateBool (const std::string &expression, int context, const std::shared_ptr< CGUIListItem > &item=nullptr) |
Evaluate a boolean expression. | |
int | TranslateString (const std::string &strCondition) |
Translates a string as given by the skin into an int that we use for more efficient retrieval of data. Can handle combined strings on the form Player.Caching + VideoPlayer.IsFullscreen (Logical and) Player.HasVideo | Player.HasAudio (Logical or) | |
int | TranslateSingleString (const std::string &strCondition, bool &listItemDependent) |
std::string | GetLabel (int info, int contextWindow, std::string *fallback=nullptr) const |
std::string | GetImage (int info, int contextWindow, std::string *fallback=nullptr) |
Obtains the filename of the image to show from whichever subsystem is needed. | |
bool | GetInt (int &value, int info, int contextWindow, const CGUIListItem *item=nullptr) const |
bool | GetBool (int condition, int contextWindow, const CGUIListItem *item=nullptr) |
std::string | GetItemLabel (const CFileItem *item, int contextWindow, int info, std::string *fallback=nullptr) const |
std::string | GetItemImage (const CGUIListItem *item, int contextWindow, int info, std::string *fallback=nullptr) const |
bool | GetItemInt (int &value, const CGUIListItem *item, int contextWindow, int info) const |
Get integer value of info. | |
bool | GetItemBool (const CGUIListItem *item, int contextWindow, int condition) const |
void | SetCurrentItem (const CFileItem &item) |
Set currently playing file item. | |
void | ResetCurrentItem () |
void | UpdateCurrentItem (const CFileItem &item) |
void | SetCurrentAlbumThumb (const std::string &thumbFileName) |
const MUSIC_INFO::CMusicInfoTag * | GetCurrentSongTag () const |
const CVideoInfoTag * | GetCurrentMovieTag () const |
const KODI::GAME::CGameInfoTag * | GetCurrentGameTag () const |
void | UpdateAVInfo () |
int | RegisterSkinVariableString (const INFO::CSkinVariableString *info) |
int | TranslateSkinVariableString (const std::string &name, int context) |
void | RegisterInfoProvider (KODI::GUILIB::GUIINFO::IGUIInfoProvider *provider) |
register a guiinfo provider | |
void | UnregisterInfoProvider (KODI::GUILIB::GUIINFO::IGUIInfoProvider *provider) |
unregister a guiinfo provider | |
KODI::GUILIB::GUIINFO::CGUIInfoProviders & | GetInfoProviders () |
get access to the registered guiinfo providers | |
CGUIInfoManager::CGUIInfoManager | ( | void | ) |
|
override |
void CGUIInfoManager::Clear | ( | ) |
bool CGUIInfoManager::ConditionsChangedValues | ( | const std::map< INFO::InfoPtr, bool > & | map | ) |
iterates through boolean conditions and compares their stored values to current values. Returns true if any condition changed value.
bool CGUIInfoManager::EvaluateBool | ( | const std::string & | expression, |
int | context, | ||
const std::shared_ptr< CGUIListItem > & | item = nullptr ) |
Evaluate a boolean expression.
expression | the expression to evaluate |
context | the context in which to evaluate the expression (currently windows) |
bool CGUIInfoManager::GetBool | ( | int | condition, |
int | contextWindow, | ||
const CGUIListItem * | item = nullptr ) |
const KODI::GAME::CGameInfoTag * CGUIInfoManager::GetCurrentGameTag | ( | ) | const |
const CVideoInfoTag * CGUIInfoManager::GetCurrentMovieTag | ( | ) | const |
const MUSIC_INFO::CMusicInfoTag * CGUIInfoManager::GetCurrentSongTag | ( | ) | const |
std::string CGUIInfoManager::GetImage | ( | int | info, |
int | contextWindow, | ||
std::string * | fallback = nullptr ) |
Obtains the filename of the image to show from whichever subsystem is needed.
|
inline |
get access to the registered guiinfo providers
bool CGUIInfoManager::GetInt | ( | int & | value, |
int | info, | ||
int | contextWindow, | ||
const CGUIListItem * | item = nullptr ) const |
bool CGUIInfoManager::GetItemBool | ( | const CGUIListItem * | item, |
int | contextWindow, | ||
int | condition ) const |
std::string CGUIInfoManager::GetItemImage | ( | const CGUIListItem * | item, |
int | contextWindow, | ||
int | info, | ||
std::string * | fallback = nullptr ) const |
bool CGUIInfoManager::GetItemInt | ( | int & | value, |
const CGUIListItem * | item, | ||
int | contextWindow, | ||
int | info ) const |
Get integer value of info.
value | int reference to pass value of given info |
info | id of info |
context | the context in which to evaluate the expression (currently windows) |
item | optional listitem if want to get listitem related int |
std::string CGUIInfoManager::GetItemLabel | ( | const CFileItem * | item, |
int | contextWindow, | ||
int | info, | ||
std::string * | fallback = nullptr ) const |
std::string CGUIInfoManager::GetLabel | ( | int | info, |
int | contextWindow, | ||
std::string * | fallback = nullptr ) const |
|
overridevirtual |
Should return the message mask that it wishes to receive messages for.
The message mask is defined in "messaging/ApplicationMessenger.h" pick the next one available when creating a new
Implements KODI::MESSAGING::IMessageTarget.
void CGUIInfoManager::Initialize | ( | ) |
|
overridevirtual |
This gets called whenever a message matching the registered message mask is processed.
There are no ordering guarantees here so implementations should never rely on a certain ordering of messages.
Cleaning up any pointers stored in the message payload is not specified and is decided by the implementer of the message. In general prefer to delete any data in this method to keep the callsites cleaner and simpler but if data is to be passed back it's perfectly valid to handle it any way that fits the situation as long as it's documented along with the message.
To return a simple value the result parameter of
Implements KODI::MESSAGING::IMessageTarget.
INFO::InfoPtr CGUIInfoManager::Register | ( | const std::string & | expression, |
int | context = 0 ) |
Register a boolean condition/expression This routine allows controls or other clients of the info manager to register to receive updates of particular expressions, in a particular context (currently windows).
In the future, it will allow clients to receive pushed callbacks when the expression changes.
expression | the boolean condition or expression |
context | the context window |
void CGUIInfoManager::RegisterInfoProvider | ( | KODI::GUILIB::GUIINFO::IGUIInfoProvider * | provider | ) |
register a guiinfo provider
the | guiinfo provider to register |
int CGUIInfoManager::RegisterSkinVariableString | ( | const INFO::CSkinVariableString * | info | ) |
void CGUIInfoManager::ResetCache | ( | ) |
void CGUIInfoManager::ResetCurrentItem | ( | ) |
void CGUIInfoManager::SetCurrentAlbumThumb | ( | const std::string & | thumbFileName | ) |
int CGUIInfoManager::TranslateSingleString | ( | const std::string & | strCondition, |
bool & | listItemDependent ) |
int CGUIInfoManager::TranslateString | ( | const std::string & | strCondition | ) |
Translates a string as given by the skin into an int that we use for more efficient retrieval of data. Can handle combined strings on the form Player.Caching + VideoPlayer.IsFullscreen (Logical and) Player.HasVideo | Player.HasAudio (Logical or)
void CGUIInfoManager::UnRegister | ( | const INFO::InfoPtr & | expression | ) |
Unregister a boolean condition/expression This routine allows controls or other clients of the info manager to unregister a previously registered boolean condition/expression.
expression | the boolean condition or expression |
void CGUIInfoManager::UnregisterInfoProvider | ( | KODI::GUILIB::GUIINFO::IGUIInfoProvider * | provider | ) |
unregister a guiinfo provider
the | guiinfo provider to unregister |
void CGUIInfoManager::UpdateAVInfo | ( | ) |