本文整理汇总了C++中CGUIDialogProgress::StartModal方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialogProgress::StartModal方法的具体用法?C++ CGUIDialogProgress::StartModal怎么用?C++ CGUIDialogProgress::StartModal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIDialogProgress
的用法示例。
在下文中一共展示了CGUIDialogProgress::StartModal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WaitForNetwork
bool CGUIMediaWindow::WaitForNetwork() const
{
if (g_application.getNetwork().IsAvailable())
return true;
CGUIDialogProgress *progress = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (!progress)
return true;
CURL url(m_vecItems->GetPath());
progress->SetHeading(1040); // Loading Directory
progress->SetLine(1, url.GetWithoutUserDetails());
progress->ShowProgressBar(false);
progress->StartModal();
while (!g_application.getNetwork().IsAvailable())
{
progress->Progress();
if (progress->IsCanceled())
{
progress->Close();
return false;
}
}
progress->Close();
return true;
}
示例2: progress
/*! \brief Progress callback from rar manager.
\return true to continue processing, false to cancel.
*/
bool progress(int progress, const char *text)
{
bool cont(true);
if (shown || showTime.IsTimePast())
{
// grab the busy and show it
CGUIDialogProgress* dlg = (CGUIDialogProgress*)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (dlg)
{
if (!shown)
{
dlg->SetHeading(heading);
dlg->StartModal();
}
if (progress >= 0)
{
dlg->ShowProgressBar(true);
dlg->SetPercentage(progress);
}
if (text)
dlg->SetLine(1, text);
cont = !dlg->IsCanceled();
shown = true;
// tell render loop to spin
dlg->Progress();
}
}
return cont;
};
示例3: ShowLegal
bool CGUIWindowSettings::ShowLegal()
{
if (m_legalString.IsEmpty())
{
CGUIDialogProgress* progress = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (progress)
{
progress->StartModal();
progress->Progress();
}
// verify the username is available
CStdString strUrl = BOXEE::BXConfiguration::GetInstance().GetStringParam("Boxee.Legal","http://app.boxee.tv/api/getlegal?page=legal");
BOXEE::BXCurl curl;
m_legalString = curl.HttpGetString(strUrl, false);
if (progress)
{
progress->Close();
}
if (m_legalString.IsEmpty())
{
CGUIDialogOK2::ShowAndGetInput(g_localizeStrings.Get(53701), g_localizeStrings.Get(53431));
return true;
}
}
CGUIDialogBoxeeMessageScroll::ShowAndGetInput(g_localizeStrings.Get(53441), m_legalString);
return true;
}
示例4: SaveList
void CGUIDialogPVRChannelManager::SaveList(void)
{
if (!m_bContainsChanges)
return;
/* display the progress dialog */
CGUIDialogProgress* pDlgProgress = (CGUIDialogProgress*)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
pDlgProgress->SetHeading(190);
pDlgProgress->SetLine(0, "");
pDlgProgress->SetLine(1, 328);
pDlgProgress->SetLine(2, "");
pDlgProgress->StartModal();
pDlgProgress->Progress();
pDlgProgress->SetPercentage(0);
/* persist all channels */
unsigned int iNextChannelNumber(0);
CPVRChannelGroupPtr group = g_PVRChannelGroups->GetGroupAll(m_bIsRadio);
if (!group)
return;
for (int iListPtr = 0; iListPtr < m_channelItems->Size(); iListPtr++)
{
CFileItemPtr pItem = m_channelItems->Get(iListPtr);
PersistChannel(pItem, group, &iNextChannelNumber);
pDlgProgress->SetPercentage(iListPtr * 100 / m_channelItems->Size());
}
group->SortAndRenumber();
group->Persist();
m_bContainsChanges = false;
SetItemsUnchanged();
pDlgProgress->Close();
}
示例5: OnPrepareFileItems
void CGUIWindowPVRSearch::OnPrepareFileItems(CFileItemList &items)
{
items.Clear();
CFileItemPtr item(new CFileItem("pvr://guide/searchresults/search/", true));
item->SetLabel(g_localizeStrings.Get(19140));
item->SetLabelPreformated(true);
item->SetSpecialSort(SortSpecialOnTop);
items.Add(item);
if (m_bSearchConfirmed)
{
CGUIDialogProgress* dlgProgress = (CGUIDialogProgress*)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (dlgProgress)
{
dlgProgress->SetHeading(194);
dlgProgress->SetText(CVariant(m_searchfilter.m_strSearchTerm));
dlgProgress->StartModal();
dlgProgress->Progress();
}
// TODO should we limit the find similar search to the selected group?
g_EpgContainer.GetEPGSearch(items, m_searchfilter);
if (dlgProgress)
dlgProgress->Close();
if (items.IsEmpty())
{
CGUIDialogOK::ShowAndGetInput(194, 284, 0, 0);
m_bSearchConfirmed = false;
}
}
}
示例6: UpdateData
void CGUIWindowPVRSearch::UpdateData(bool bUpdateSelectedFile /* = true */)
{
CLog::Log(LOGDEBUG, "CGUIWindowPVRSearch - %s - update window '%s'. set view to %d", __FUNCTION__, GetName(), m_iControlList);
m_bUpdateRequired = false;
/* lock the graphics context while updating */
CSingleLock graphicsLock(g_graphicsContext);
m_iSelected = m_parent->m_viewControl.GetSelectedItem();
m_parent->m_viewControl.Clear();
m_parent->m_vecItems->Clear();
m_parent->m_viewControl.SetCurrentView(m_iControlList);
if (m_bSearchConfirmed)
{
CGUIDialogProgress* dlgProgress = (CGUIDialogProgress*)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (dlgProgress)
{
dlgProgress->SetHeading(194);
dlgProgress->SetLine(0, m_searchfilter.m_strSearchTerm);
dlgProgress->SetLine(1, "");
dlgProgress->SetLine(2, "");
dlgProgress->StartModal();
dlgProgress->Progress();
}
// TODO get this from the selected channel group
g_EpgContainer.GetEPGSearch(*m_parent->m_vecItems, m_searchfilter);
if (dlgProgress)
dlgProgress->Close();
if (m_parent->m_vecItems->Size() == 0)
{
CGUIDialogOK::ShowAndGetInput(194, 284, 0, 0);
m_bSearchConfirmed = false;
}
}
if (m_parent->m_vecItems->Size() == 0)
{
CFileItemPtr item;
item.reset(new CFileItem("pvr://guide/searchresults/empty.epg", false));
item->SetLabel(g_localizeStrings.Get(19027));
item->SetLabelPreformated(true);
m_parent->m_vecItems->Add(item);
}
else
{
m_parent->m_vecItems->Sort(m_iSortMethod, m_iSortOrder, m_iSortAttributes);
}
m_parent->m_viewControl.SetItems(*m_parent->m_vecItems);
if (bUpdateSelectedFile)
m_parent->m_viewControl.SetSelectedItem(m_iSelected);
m_parent->SetLabel(CONTROL_LABELHEADER, g_localizeStrings.Get(283));
m_parent->SetLabel(CONTROL_LABELGROUP, "");
}
示例7: GetDirectory
bool CUPnPAvDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items)
{
CURI url(strPath);
m_cacheDirectory = DIR_CACHE_ALWAYS;
if(url.GetProtocol() != "upnp")
{
CLog::Log(LOGERROR, "CUPnPAvDirectory::%s - invalid protocol [%s]", __func__, url.GetProtocol().c_str());
return false;
}
CBrowserService* pBrowser = g_application.GetBrowserService();
if( strPath == "upnp://" && pBrowser )
{
pBrowser->GetShare( CBrowserService::UPNP_SHARE, items );
return true;
}
// If we have the items in the cache, return them
if (g_directoryCache.GetDirectory(strPath, items))
{
return true;
}
if(strPath == "upnp://all")
{
bool bSuccess = ScanUPnPShares(items);
if(!bSuccess)
{
IHalServices& client = CHalServicesFactory::GetInstance();
client.DjmountRestart();
CLog::Log(LOGWARNING, "CUPnPAvDirectory::%s - failed to scan UPnP shares, retrying...", __func__);
CGUIDialogProgress* progress = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (progress)
{
CStdString strId;
strId.Format("%d-upnp-scan-retry", CThread::GetCurrentThreadId());
progress->StartModal(strId);
progress->Progress();
}
// hopefully djmount will be able to find all shares
Sleep(5000);
bSuccess = ScanUPnPShares(items);
progress->Close();
}
return bSuccess;
}
return ReadDir(url, items);
}
示例8: SaveConfiguration
bool CGUIWindowBoxeeWizardNetwork::SaveConfiguration()
{
if (!NetworkConfigurationChanged())
return true;
bool result = false;
CStdString currentEssId;
CStdString currentKey;
EncMode currentEnc;
CStdString currentInterfaceName;
GetUserConfiguration(currentInterfaceName, currentEssId, currentKey, currentEnc);
CGUIDialogProgress* pDlgProgress = (CGUIDialogProgress*)m_gWindowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
pDlgProgress->SetHeading("");
pDlgProgress->SetLine(0, "Applying network configuration...");
pDlgProgress->SetLine(1, "");
pDlgProgress->SetLine(2, "");
pDlgProgress->StartModal();
pDlgProgress->Progress();
CStdString empty;
NetworkAssignment assignment;
CNetworkInterface* interface;
for (unsigned int i = 0; i < m_interfaces.size(); i++)
{
interface = m_interfaces[i];
if (interface->GetName() == currentInterfaceName)
{
assignment = NETWORK_DHCP;
interface->SetSettings(assignment, empty, empty, empty, currentEssId, currentKey, currentEnc);
}
else
{
// if we have a different interfaces, we need to take them down
assignment = NETWORK_DISABLED;
EncMode enc = ENC_NONE;
interface->SetSettings(assignment, empty, empty, empty, empty, empty, enc);
}
}
pDlgProgress->Close();
if (!interface->IsConnected())
CGUIDialogOK::ShowAndGetInput(0, 50001, 50002, 0);
else if (!g_application.IsConnectedToNet())
CGUIDialogOK::ShowAndGetInput(0, 50003, 50004, 50002);
else
result = true;
ResetCurrentNetworkState();
return result;
}
示例9: PromptForInstall
bool CAddonInstaller::PromptForInstall(const std::string &addonID, AddonPtr &addon)
{
if (!g_passwordManager.CheckMenuLock(WINDOW_ADDON_BROWSER))
return false;
// we assume that addons that are enabled don't get to this routine (i.e. that GetAddon() has been called)
if (CAddonMgr::Get().GetAddon(addonID, addon, ADDON_UNKNOWN, false))
return false; // addon is installed but disabled, and the user has specifically activated something that needs
// the addon - should we enable it?
// check we have it available
CAddonDatabase database;
database.Open();
if (database.GetAddon(addonID, addon))
{ // yes - ask user if they want it installed
if (!CGUIDialogYesNo::ShowAndGetInput(g_localizeStrings.Get(24076), g_localizeStrings.Get(24100),
addon->Name().c_str(), g_localizeStrings.Get(24101)))
return false;
if (Install(addonID, true))
{
CGUIDialogProgress *progress = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (progress)
{
progress->SetHeading(13413); // Downloading
progress->SetLine(0, "");
progress->SetLine(1, addon->Name());
progress->SetLine(2, "");
progress->SetPercentage(0);
progress->StartModal();
while (true)
{
progress->Progress();
unsigned int percent;
if (progress->IsCanceled())
{
Cancel(addonID);
break;
}
if (!GetProgress(addonID, percent))
break;
progress->SetPercentage(percent);
}
progress->Close();
}
return CAddonMgr::Get().GetAddon(addonID, addon);
}
}
return false;
}
示例10: OnSearch
/// \brief Search the current directory for a string got from the virtual keyboard
void CGUIDialogVideoInfo::OnSearch(CStdString& strSearch)
{
CGUIDialogProgress *progress = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (progress)
{
progress->SetHeading(194);
progress->SetLine(0, strSearch);
progress->SetLine(1, "");
progress->SetLine(2, "");
progress->StartModal();
progress->Progress();
}
CFileItemList items;
DoSearch(strSearch, items);
if (progress)
progress->Close();
if (items.Size())
{
CGUIDialogSelect* pDlgSelect = (CGUIDialogSelect*)g_windowManager.GetWindow(WINDOW_DIALOG_SELECT);
pDlgSelect->Reset();
pDlgSelect->SetHeading(283);
for (int i = 0; i < (int)items.Size(); i++)
{
CFileItemPtr pItem = items[i];
pDlgSelect->Add(pItem->GetLabel());
}
pDlgSelect->DoModal();
int iItem = pDlgSelect->GetSelectedLabel();
if (iItem < 0)
return;
CFileItem* pSelItem = new CFileItem(*items[iItem]);
OnSearchItemFound(pSelItem);
delete pSelItem;
}
else
{
CGUIDialogOK::ShowAndGetInput(194, 284, 0, 0);
}
}
示例11: Copy
bool CAsyncFileCopy::Copy(const std::string &from, const std::string &to, const std::string &heading)
{
// reset the variables to their appropriate states
m_from = from;
m_to = to;
m_cancelled = false;
m_succeeded = false;
m_percent = 0;
m_speed = 0;
m_running = true;
CURL url1(from);
CURL url2(to);
// create our thread, which starts the file copy operation
Create();
CGUIDialogProgress *dlg = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
unsigned int time = XbmcThreads::SystemClockMillis();
while (m_running)
{
m_event.WaitMSec(1000 / 30);
if (!m_running)
break;
// start the dialog up as needed
if (dlg && !dlg->IsDialogRunning() && (XbmcThreads::SystemClockMillis() - time) > 500) // wait 0.5 seconds before starting dialog
{
dlg->SetHeading(CVariant{heading});
dlg->SetLine(0, CVariant{url1.GetWithoutUserDetails()});
dlg->SetLine(1, CVariant{url2.GetWithoutUserDetails()});
dlg->SetPercentage(0);
dlg->StartModal();
}
// and update the dialog as we go
if (dlg && dlg->IsDialogRunning())
{
dlg->SetHeading(CVariant{heading});
dlg->SetLine(0, CVariant{url1.Get()});
dlg->SetLine(1, CVariant{url2.Get()});
dlg->SetLine(2, CVariant{ StringUtils::Format("%2.2f KB/s", m_speed / 1024) });
dlg->SetPercentage(m_percent);
dlg->Progress();
m_cancelled = dlg->IsCanceled();
}
}
if (dlg)
dlg->Close();
return !m_cancelled && m_succeeded;
}
示例12: SaveList
void CGUIDialogPVRChannelManager::SaveList(void)
{
if (!m_bContainsChanges)
return;
/* display the progress dialog */
CGUIDialogProgress* pDlgProgress = (CGUIDialogProgress*)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
pDlgProgress->SetHeading(CVariant{190});
pDlgProgress->SetLine(0, CVariant{""});
pDlgProgress->SetLine(1, CVariant{328});
pDlgProgress->SetLine(2, CVariant{""});
pDlgProgress->StartModal();
pDlgProgress->Progress();
pDlgProgress->SetPercentage(0);
/* persist all channels */
unsigned int iNextChannelNumber(0);
CPVRChannelGroupPtr group = g_PVRChannelGroups->GetGroupAll(m_bIsRadio);
if (!group)
return;
for (int iListPtr = 0; iListPtr < m_channelItems->Size(); iListPtr++)
{
CFileItemPtr pItem = m_channelItems->Get(iListPtr);
if (!pItem->HasPVRChannelInfoTag())
continue;
if (pItem->GetProperty("SupportsSettings").asBoolean())
RenameChannel(pItem);
PersistChannel(pItem, group, &iNextChannelNumber);
pDlgProgress->SetPercentage(iListPtr * 100 / m_channelItems->Size());
}
group->SortAndRenumber();
group->Persist();
m_bContainsChanges = false;
SetItemsUnchanged();
pDlgProgress->Close();
}
示例13: GetDirectory
bool CMultiPathDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items)
{
CLog::Log(LOGDEBUG,"CMultiPathDirectory::GetDirectory(%s)", strPath.c_str());
vector<CStdString> vecPaths;
if (!GetPaths(strPath, vecPaths))
return false;
unsigned int progressTime = CTimeUtils::GetTimeMS() + 3000L; // 3 seconds before showing progress bar
CGUIDialogProgress* dlgProgress = NULL;
unsigned int iFailures = 0;
for (unsigned int i = 0; i < vecPaths.size(); ++i)
{
// show the progress dialog if we have passed our time limit
if (CTimeUtils::GetTimeMS() > progressTime && !dlgProgress)
{
dlgProgress = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (dlgProgress)
{
dlgProgress->SetHeading(15310);
dlgProgress->SetLine(0, 15311);
dlgProgress->SetLine(1, "");
dlgProgress->SetLine(2, "");
dlgProgress->StartModal();
dlgProgress->ShowProgressBar(true);
dlgProgress->SetProgressMax((int)vecPaths.size()*2);
dlgProgress->Progress();
}
}
if (dlgProgress)
{
CURL url(vecPaths[i]);
dlgProgress->SetLine(1, url.GetWithoutUserDetails());
dlgProgress->SetProgressAdvance();
dlgProgress->Progress();
}
CFileItemList tempItems;
CLog::Log(LOGDEBUG,"Getting Directory (%s)", vecPaths[i].c_str());
if (CDirectory::GetDirectory(vecPaths[i], tempItems, m_strFileMask, m_useFileDirectories, m_allowPrompting, m_cacheDirectory, m_extFileInfo))
items.Append(tempItems);
else
{
CLog::Log(LOGERROR,"Error Getting Directory (%s)", vecPaths[i].c_str());
iFailures++;
}
if (dlgProgress)
{
dlgProgress->SetProgressAdvance();
dlgProgress->Progress();
}
}
if (dlgProgress)
dlgProgress->Close();
if (iFailures == vecPaths.size())
return false;
// merge like-named folders into a sub multipath:// style url
MergeItems(items);
return true;
}
示例14: Open
bool CFileShoutcast::Open(const CURL& url, bool bBinary)
{
m_dwLastTime = timeGetTime();
int ret;
CGUIDialogProgress* dlgProgress = (CGUIDialogProgress*)m_gWindowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
set_rip_manager_options_defaults(&m_opt);
strcpy(m_opt.output_directory, "./");
m_opt.proxyurl[0] = '\0';
// Use a proxy, if the GUI was configured as such
bool bProxyEnabled = g_guiSettings.GetBool("network.usehttpproxy");
if (bProxyEnabled)
{
const CStdString &strProxyServer = g_guiSettings.GetString("network.httpproxyserver");
const CStdString &strProxyPort = g_guiSettings.GetString("network.httpproxyport");
// Should we check for valid strings here
#ifndef _LINUX
_snprintf( m_opt.proxyurl, MAX_URL_LEN, "http://%s:%s", strProxyServer.c_str(), strProxyPort.c_str() );
#else
snprintf( m_opt.proxyurl, MAX_URL_LEN, "http://%s:%s", strProxyServer.c_str(), strProxyPort.c_str() );
#endif
}
CStdString strUrl;
url.GetURL(strUrl);
strUrl.Replace("shout://", "http://");
printf("Opening url: %s\n", strUrl.c_str());
strncpy(m_opt.url, strUrl.c_str(), MAX_URL_LEN);
sprintf(m_opt.useragent, "x%s", url.GetFileName().c_str());
if (dlgProgress)
{
dlgProgress->SetHeading(260);
dlgProgress->SetLine(0, 259);
dlgProgress->SetLine(1, strUrl);
dlgProgress->SetLine(2, "");
if (!dlgProgress->IsDialogRunning())
dlgProgress->StartModal();
dlgProgress->Progress();
}
if ((ret = rip_manager_start(rip_callback, &m_opt)) != SR_SUCCESS)
{
if (dlgProgress) dlgProgress->Close();
return false;
}
int iShoutcastTimeout = 10 * SHOUTCASTTIMEOUT; //i.e: 10 * 10 = 100 * 100ms = 10s
int iCount = 0;
while (!m_fileState.bRipDone && !m_fileState.bRipStarted && !m_fileState.bRipError && (!dlgProgress || !dlgProgress->IsCanceled()))
{
if (iCount <= iShoutcastTimeout) //Normally, this isn't the problem,
//because if RIP_MANAGER fails, this would be here
//with m_fileState.bRipError
{
Sleep(100);
}
else
{
if (dlgProgress)
{
dlgProgress->SetLine(1, 257);
dlgProgress->SetLine(2, "Connection timed out...");
Sleep(1500);
dlgProgress->Close();
}
return false;
}
iCount++;
}
if (dlgProgress && dlgProgress->IsCanceled())
{
Close();
dlgProgress->Close();
return false;
}
/* store content type of stream */
m_contenttype = rip_manager_get_content_type();
//CHANGED CODE: Don't reset timer anymore.
while (!m_fileState.bRipDone && !m_fileState.bRipError && m_fileState.bBuffering && (!dlgProgress || !dlgProgress->IsCanceled()))
{
if (iCount <= iShoutcastTimeout) //Here is the real problem: Sometimes the buffer fills just to
//slowly, thus the quality of the stream will be bad, and should be
//aborted...
{
Sleep(100);
char szTmp[1024];
//g_dialog.SetCaption(0, "Shoutcast" );
sprintf(szTmp, "Buffering %i bytes", m_ringbuf.GetMaxReadSize());
if (dlgProgress)
{
dlgProgress->SetLine(2, szTmp );
dlgProgress->Progress();
}
//.........这里部分代码省略.........
示例15: pItem
//.........这里部分代码省略.........
} else if (!audio && !video && image) {
// pictures
object_id = "3";
}
}
#ifdef DISABLE_SPECIALCASE
// same thing but special case for XBMC
if (object_id == "0" && (((*device)->m_ModelName.Find("XBMC", 0, true) >= 0) ||
((*device)->m_ModelName.Find("Xbox Media Center", 0, true) >= 0))) {
// look for a specific type to differentiate which folder we want
if (audio && !video && !image) {
// music
object_id = "virtualpath://upnpmusic";
} else if (!audio && video && !image) {
// video
object_id = "virtualpath://upnpvideo";
} else if (!audio && !video && image) {
// pictures
object_id = "virtualpath://upnppictures";
}
}
#endif
// bring up dialog if object is not cached
if (!upnp->m_MediaBrowser->IsCached(uuid, object_id)) {
dlgProgress = (CGUIDialogProgress*)m_gWindowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (dlgProgress) {
dlgProgress->ShowProgressBar(false);
dlgProgress->SetCanCancel(false);
dlgProgress->SetHeading(20334);
dlgProgress->SetLine(0, 194);
dlgProgress->SetLine(1, "");
dlgProgress->SetLine(2, "");
dlgProgress->StartModal();
}
}
// if error, return now, the device could have gone away
// this will make us go back to the sources list
PLT_MediaObjectListReference list;
NPT_Result res = upnp->m_MediaBrowser->Browse(*device, object_id, list);
if (NPT_FAILED(res)) goto failure;
// empty list is ok
if (list.IsNull()) goto cleanup;
PLT_MediaObjectList::Iterator entry = list->GetFirstItem();
while (entry) {
// disregard items with wrong class/type
if( (!video && (*entry)->m_ObjectClass.type.CompareN("object.item.videoitem", 21,true) == 0)
|| (!audio && (*entry)->m_ObjectClass.type.CompareN("object.item.audioitem", 21,true) == 0)
|| (!image && (*entry)->m_ObjectClass.type.CompareN("object.item.imageitem", 21,true) == 0) )
{
++entry;
continue;
}
// never show empty containers in media views
if((*entry)->IsContainer()) {
if( (audio || video || image)
&& ((PLT_MediaContainer*)(*entry))->m_ChildrenCount == 0) {
++entry;
continue;
}
}