本文整理汇总了C++中CAddonDll::Icon方法的典型用法代码示例。如果您正苦于以下问题:C++ CAddonDll::Icon方法的具体用法?C++ CAddonDll::Icon怎么用?C++ CAddonDll::Icon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAddonDll
的用法示例。
在下文中一共展示了CAddonDll::Icon方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: get_addon_info
char* Interface_General::get_addon_info(void* kodiBase, const char* id)
{
CAddonDll* addon = static_cast<CAddonDll*>(kodiBase);
if (addon == nullptr || id == nullptr)
{
CLog::Log(LOGERROR, "Interface_General::%s - invalid data (addon='%p', id='%p')", __FUNCTION__, addon, id);
return nullptr;
}
std::string str;
if (strcmpi(id, "author") == 0)
str = addon->Author();
else if (strcmpi(id, "changelog") == 0)
str = addon->ChangeLog();
else if (strcmpi(id, "description") == 0)
str = addon->Description();
else if (strcmpi(id, "disclaimer") == 0)
str = addon->Disclaimer();
else if (strcmpi(id, "fanart") == 0)
str = addon->FanArt();
else if (strcmpi(id, "icon") == 0)
str = addon->Icon();
else if (strcmpi(id, "id") == 0)
str = addon->ID();
else if (strcmpi(id, "name") == 0)
str = addon->Name();
else if (strcmpi(id, "path") == 0)
str = addon->Path();
else if (strcmpi(id, "profile") == 0)
str = addon->Profile();
else if (strcmpi(id, "summary") == 0)
str = addon->Summary();
else if (strcmpi(id, "type") == 0)
str = ADDON::CAddonInfo::TranslateType(addon->Type());
else if (strcmpi(id, "version") == 0)
str = addon->Version().asString();
else
{
CLog::Log(LOGERROR, "Interface_General::%s - add-on '%s' requests invalid id '%s'",
__FUNCTION__, addon->Name().c_str(), id);
return nullptr;
}
char* buffer = strdup(str.c_str());
return buffer;
}