OMX_ERRORTYPE CSymbianOmxComponentLoader::InitializeComponentLoader() { RImplInfoPtrArray ecomArray; TRAPD(error,REComSession::ListImplementationsL(TUid::Uid(KUidOmxILSymbianComponentIf),ecomArray)); if( error != KErrNone ) { ecomArray.ResetAndDestroy(); return OMX_ErrorInsufficientResources; } TInt index; CImplementationInformation* info; TOmxComponentInfo component; iComponentNameList.Reset(); const TInt KEcomArrayCount = ecomArray.Count(); for( index=0; index<KEcomArrayCount && error == KErrNone; ++index ) { info = ecomArray[index]; component.iUid = info->ImplementationUid(); if( info->DisplayName().Length() >= OMX_MAX_STRINGNAME_SIZE || info->DataType().Length() >= OMX_MAX_ROLESBUFFER_SIZE ) { error = KErrBadName; break; } component.iComponentName.Copy(info->DisplayName()); component.iRoles.Copy(info->DataType()); error = iComponentNameList.Append(component); if(error) { break; } } ecomArray.ResetAndDestroy(); if( error != KErrNone ) { if( error == KErrNoMemory ) { return OMX_ErrorInsufficientResources; } return OMX_ErrorUndefined; } return OMX_ErrorNone; }
// ---------------------------------------------------------------------------- // CSIPClientResolver::AddClientDataL // ---------------------------------------------------------------------------- // void CSIPClientResolver::AddClientDataL( RPointerArray< CSIPClientData >& aRegistry, CImplementationInformation& aInfo, TBool aRomClient ) { TLex8 lex( aInfo.DataType() ); TUint32 uidValue( 0 ); User::LeaveIfError( lex.Val( uidValue, EHex ) ); TUid clientUid; clientUid.iUid = uidValue; const TBool romBased = ( aRomClient && aInfo.RomBased() ); TPtrC8 xml( aInfo.OpaqueData() ); const TBool dynamicCaps = ( xml.Length() == 0 ); CSIPClientData* clientData = CSIPClientData::NewLC( aInfo.ImplementationUid(), clientUid, romBased, dynamicCaps ); if ( !dynamicCaps ) { // XML specified in resource-file. iClientDataParser->ParseL( clientData, xml ); } aRegistry.AppendL( clientData ); CleanupStack::Pop( clientData ); }
// --------------------------------------------------------------------------- // Load ECom plug-ins // --------------------------------------------------------------------------- // void CBTUIPluginMan::LoadPluginsL() { TRACE_FUNC_ENTRY REComSession::ListImplementationsL( KCBtuiPluginInterfaceUid, iPluginInfoArray ); TInt count = iPluginInfoArray.Count(); TRACE_INFO( ( _L( "[BTUI]\t CBTUIPluginMan::LoadSettingPluginL() PluginArray count=%d" ), count) ) iPluginArray.Reset(); for ( TUint ii = 0 ; ii < count; ++ii ) { CImplementationInformation* impl = iPluginInfoArray[ii]; //Only append the plugins which datatype() is for HID devices. if(impl->DataType().Length()) { TLex8 lex( impl->DataType() ); TUint major = 0, minor = 0; TInt err1 = lex.Val(major, EHex); lex.SkipSpace(); TInt err2 = lex.Val(minor, EHex); if( !err1 && !err2) { TRACE_INFO( ( _L( "[BTUI]\t CBTUIPluginMan::LoadSettingPluginL() MajorCOD=%d MinorCOD=%d" ), major, minor) ) TBTDeviceClass cod(0x00, major, minor); CBtuiPluginInterface* plugin = NULL; TRAPD( ret, plugin = CBtuiPluginInterface::NewL( impl->ImplementationUid() ) ); if( !ret ) { CleanupStack::PushL(plugin); // Transfer the ownership to AppUi iAppUi->AddViewL( (CAknView*)plugin ); plugin->SetCOD(cod); iPluginArray.AppendL(plugin); CleanupStack::Pop(plugin); } } } } TRACE_FUNC_EXIT }
void CSenBaseIdentityManager::ReloadSenSecurityMechanismsL() { TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("Entering CSenXMLDAO::ReloadSenSecurityMechanismsL().."))); delete ipMechanicsNames; ipMechanicsNames = NULL; ipMechanicsNames = CBufFlat::NewL(KFLATBUF_SIZE); RBufWriteStream bufWs(*ipMechanicsNames); CleanupClosePushL(bufWs); iSechMechNames.ResetAndDestroy(); iSechMechCues.ResetAndDestroy(); REComSession::ListImplementationsL(KUidSechMech, iEcomInfoArray); TInt infoCount(iEcomInfoArray.Count()); TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KNormalLogLevel, _L8("%d Security Mechanism ECOM implementations found."), infoCount)); for (TInt i=0; i<infoCount; i++) { CImplementationInformation* pImplImfo = iEcomInfoArray[i]; CSenSecurityMechanism* pSechMech = CSenSecurityMechanism::NewL(pImplImfo->DataType(), iManager); CleanupStack::PushL(pSechMech); iSechMechNames.Append(pSechMech->Name().AllocL()); iSechMechCues.Append(pImplImfo->DataType().AllocL()); bufWs.WriteL(pSechMech->Name()); CleanupStack::PopAndDestroy(); // pSechMech if (i < (infoCount-1)) { bufWs.WriteL(KSpace); } } iEcomInfoArray.ResetAndDestroy(); CleanupStack::PopAndDestroy(1); // bufWs TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("Leaving CSenXMLDAO::ReloadSenSecurityMechanismsL().. "))); }
// ---------------------------------------------------------------------------- // CSIPClientResolver::ConvertClientDataL // ---------------------------------------------------------------------------- // void CSIPClientResolver::ConvertClientDataL( const RImplInfoPtrArray& aImplInfo, RPointerArray< CSIPClientData >& aRegistry, TBool aRomClient ) { TInt err = KErrNone; TInt clientCount = aImplInfo.Count(); for( TInt i = 0; i < clientCount; i++ ) { // Ignore clients with invalid data CImplementationInformation* info = aImplInfo[ i ]; TRAP( err, AddClientDataL( aRegistry, *info, aRomClient ) ); SIP_CR_STR_LOG("Plug-in with 'default_data'", info->DataType()) SIP_CR_INT_LOG("Plug-in status", err) if( err == KErrNoMemory ) { User::Leave( err ); } } }