本文整理汇总了C++中CLibraryFile::IsSchemaURI方法的典型用法代码示例。如果您正苦于以下问题:C++ CLibraryFile::IsSchemaURI方法的具体用法?C++ CLibraryFile::IsSchemaURI怎么用?C++ CLibraryFile::IsSchemaURI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLibraryFile
的用法示例。
在下文中一共展示了CLibraryFile::IsSchemaURI方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnUpdateMusicBrainzLookup
void CLibraryFileView::OnUpdateMusicBrainzLookup(CCmdUI* pCmdUI)
{
if ( m_bGhostFolder || GetSelectedCount() != 1 || m_bRequestingService )
{
pCmdUI->Enable( FALSE );
return;
}
CSingleLock pLock( &Library.m_pSection );
if ( ! pLock.Lock( 200 ) ) return;
CLibraryFile* pFile = GetSelectedFile();
if ( ! pFile->IsSchemaURI( CSchema::uriAudio ) || pFile->m_pMetadata == NULL )
{
pCmdUI->Enable( FALSE );
return;
}
CMetaList* pMetaList = new CMetaList();
pMetaList->Setup( pFile->m_pSchema, FALSE );
pMetaList->Combine( pFile->m_pMetadata );
pLock.Unlock();
pCmdUI->Enable( pMetaList->IsMusicBrainz() );
delete pMetaList;
}
示例2: CheckDynamicBar
// Called when the selection changes
void CLibraryFileView::CheckDynamicBar()
{
bool bIsMusicBrainz = false;
ClearServicePages();
CLibraryFrame* pFrame = GetFrame();
if ( _tcscmp( pFrame->GetDynamicBarName(), L"WebServices.MusicBrainz" ) == 0 )
bIsMusicBrainz = true;
if ( GetSelectedCount() != 1 )
{
if ( bIsMusicBrainz )
{
pFrame->SetDynamicBar( NULL );
m_bRequestingService = FALSE; // ToDo: Abort operation
}
return;
}
CSingleLock pLock( &Library.m_pSection, TRUE );
CLibraryFile* pFile = GetSelectedFile();
if ( pFile == NULL ) // Ghost file
{
pFrame->SetDynamicBar( NULL );
m_bRequestingService = FALSE;
return;
}
if ( ! pFile->IsSchemaURI( CSchema::uriAudio ) || pFile->m_pMetadata == NULL )
{
if ( bIsMusicBrainz )
pFrame->SetDynamicBar( NULL );
m_bRequestingService = FALSE; // ToDo: Abort operation
return;
}
CMetaList* pMetaList = new CMetaList();
pMetaList->Setup( pFile->m_pSchema, FALSE );
pMetaList->Combine( pFile->m_pMetadata );
pLock.Unlock();
if ( ! pMetaList->IsMusicBrainz() && bIsMusicBrainz )
pFrame->SetDynamicBar( NULL );
else
pFrame->HideDynamicBar();
m_bRequestingService = FALSE; // ToDo: Abort operation
delete pMetaList;
}