本文整理汇总了C++中CFileItem::HasProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileItem::HasProperty方法的具体用法?C++ CFileItem::HasProperty怎么用?C++ CFileItem::HasProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileItem
的用法示例。
在下文中一共展示了CFileItem::HasProperty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetPluginResult
bool CPluginDirectory::GetPluginResult(const CStdString& strPath, CFileItem &resultItem)
{
CURL url(strPath);
CPluginDirectory* newDir = new CPluginDirectory();
bool success = newDir->StartScript(strPath, false);
if (success)
{ // update the play path, saving the old one as needed
if (!resultItem.HasProperty("original_listitem_url"))
resultItem.SetProperty("original_listitem_url", resultItem.m_strPath);
resultItem.m_strPath = newDir->m_fileResult->m_strPath;
resultItem.SetMimeType(newDir->m_fileResult->GetMimeType(false));
}
delete newDir;
return success;
}
示例2: GetPluginResult
bool CPluginDirectory::GetPluginResult(const std::string& strPath, CFileItem &resultItem)
{
CURL url(strPath);
CPluginDirectory newDir;
bool success = newDir.StartScript(strPath, false);
if (success)
{ // update the play path and metadata, saving the old one as needed
if (!resultItem.HasProperty("original_listitem_url"))
resultItem.SetProperty("original_listitem_url", resultItem.GetPath());
resultItem.SetPath(newDir.m_fileResult->GetPath());
resultItem.SetMimeType(newDir.m_fileResult->GetMimeType());
resultItem.UpdateInfo(*newDir.m_fileResult);
if (newDir.m_fileResult->HasVideoInfoTag() && newDir.m_fileResult->GetVideoInfoTag()->m_resumePoint.IsSet())
resultItem.m_lStartOffset = STARTOFFSET_RESUME; // resume point set in the resume item, so force resume
}
return success;
}
示例3: GameLauchDialog
bool CRetroPlayerDialogs::GameLauchDialog(const CFileItem &file, GameClientPtr &result)
{
CFileItem fileCopy = file;
// If an explicit game client was specified, try to download that
if (fileCopy.HasProperty("gameclient"))
{
if (InstallGameClient(fileCopy.GetProperty("gameclient").asString(), fileCopy, result))
return true;
fileCopy.ClearProperty("gameclient"); // don't want this to interfere later on
}
// First, ask the user if they would like to install a game client or go to
// the add-on manager
CContextButtons choices;
choices.Add(0, 24026); // Install emulator
choices.Add(1, 24058); // Add-on manager
int btnid = CGUIDialogContextMenu::ShowAndGetChoice(choices);
if (btnid == 0) // Install emulator
{
return InstallGameClientDialog(fileCopy, result);
}
else if (btnid == 1) // Add-on manager
{
// Queue the file so that if a compatible game client is installed, the
// user will be asked to launch the file.
CGameManager::Get().SetAutoLaunch(fileCopy);
CLog::Log(LOGDEBUG, "RetroPlayer: User chose to go to the add-on manager");
CStdStringArray params;
params.push_back("addons://all/xbmc.gameclient");
g_windowManager.ActivateWindow(WINDOW_ADDON_BROWSER, params);
}
else
{
CLog::Log(LOGDEBUG, "RetroPlayer: User canceled game client selection");
}
return false;
}