本文整理汇总了C++中CFileItemPtr::GetAddonInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileItemPtr::GetAddonInfo方法的具体用法?C++ CFileItemPtr::GetAddonInfo怎么用?C++ CFileItemPtr::GetAddonInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileItemPtr
的用法示例。
在下文中一共展示了CFileItemPtr::GetAddonInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetService
bool CGUIDialogSubtitles::SetService(const std::string &service)
{
if (service != m_currentService)
{
m_currentService = service;
CLog::Log(LOGDEBUG, "New Service [%s] ", m_currentService.c_str());
CFileItemPtr currentService = GetService();
// highlight this item in the skin
for (int i = 0; i < m_serviceItems->Size(); i++)
{
CFileItemPtr pItem = m_serviceItems->Get(i);
pItem->Select(pItem == currentService);
}
SET_CONTROL_LABEL(CONTROL_NAMELABEL, currentService->GetLabel());
if (currentService->HasAddonInfo())
{
std::string icon = URIUtils::AddFileToFolder(currentService->GetAddonInfo()->Path(), "logo.png");
SET_CONTROL_FILENAME(CONTROL_NAMELOGO, icon);
}
if (g_application.m_pPlayer->GetSubtitleCount() == 0)
SET_CONTROL_HIDDEN(CONTROL_SUBSEXIST);
else
SET_CONTROL_VISIBLE(CONTROL_SUBSEXIST);
return true;
}
return false;
}
示例2: SetItem
bool CGUIDialogAddonInfo::SetItem(const CFileItemPtr& item)
{
if (!item || !item->HasAddonInfo())
return false;
m_item = item;
m_localAddon.reset();
CAddonMgr::GetInstance().GetAddon(item->GetAddonInfo()->ID(), m_localAddon, ADDON_UNKNOWN, false);
return true;
}
示例3: SetItem
bool CGUIDialogAddonInfo::SetItem(const CFileItemPtr& item)
{
if (!item || !item->HasAddonInfo())
return false;
m_item = std::make_shared<CFileItem>(*item);
m_localAddon.reset();
CServiceBroker::GetAddonMgr().GetAddon(item->GetAddonInfo()->ID(), m_localAddon, ADDON_UNKNOWN, false);
return true;
}