// -----------------------------------------------------------------------------
// CTestUiAifCoreToolkit::TestCapabilitiesL
// -----------------------------------------------------------------------------
//    
TInt CTestPubInputLanguageInfo::TestCapabilitiesL( CStifItemParser& /*aItem*/ )
    {

    // Print to UI
    _LIT( Ktestinputlanguageinfo, "TestInputLanguageInfo" );
    _LIT( KTestCapabilitiesL, "In TestCapabilitiesL" );
    TestModuleIf().Printf( 0, Ktestinputlanguageinfo, KTestCapabilitiesL );
    // Print to log file
    iLog->Log( KTestCapabilitiesL );
    
    CAknInputLanguageList* inputLanguageList = new CAknInputLanguageList( 1 );
    CleanupStack::PushL( inputLanguageList );
    STIF_ASSERT_NOT_NULL( inputLanguageList );
    CAknInputLanguageInfo* inputLanguageInfo = AknInputLanguageInfoFactory::CreateInputLanguageInfoL();
    CleanupStack::PushL( inputLanguageInfo );
    STIF_ASSERT_NOT_NULL( inputLanguageInfo );
    inputLanguageInfo->AppendAvailableLanguagesL( inputLanguageList );
    CAknInputLanguageItem* item = inputLanguageList->At( 1 );
    item->Capabilities();
    delete item;
    CleanupStack::PopAndDestroy( inputLanguageInfo );
    CleanupStack::PopAndDestroy( inputLanguageList );
    
    return KErrNone;
    }
Пример #2
0
/*!
    \internal

    This function contains pure Symbian exception handling code for
    getting S60 language list.
    Returned object ownership is transferred to caller.
*/
static CAknInputLanguageList* s60LangListL()
{
    CAknInputLanguageInfo *langInfo = AknInputLanguageInfoFactory::CreateInputLanguageInfoL();
    CleanupStack::PushL(langInfo);
    // In rare phone there is more than 7 languages installed -> use 7 as an array granularity
    CAknInputLanguageList *langList = new (ELeave) CAknInputLanguageList(7);
    CleanupStack::PushL(langList);
    langInfo->AppendAvailableLanguagesL(langList);
    CleanupStack::Pop(langList);
    CleanupStack::PopAndDestroy(langInfo);
    return langList;
}