textinput/ptienginev2/src/PtiLanguageDatabase.cpp
branchRCL_3
changeset 43 ebd48d2de13c
parent 14 e6a39382bb9c
child 44 ecbabf52600f
equal deleted inserted replaced
39:ac7e4d1d9209 43:ebd48d2de13c
   340     {EPtiLangImplUidUrdu3,       ELangUrdu},	 
   340     {EPtiLangImplUidUrdu3,       ELangUrdu},	 
   341     {EPtiLangImplUidMarathi3,    ELangMarathi},		
   341     {EPtiLangImplUidMarathi3,    ELangMarathi},		
   342 	{0, 0}
   342 	{0, 0}
   343 	};
   343 	};
   344 
   344 
   345 const TInt xt9LangImplUidDanish = 0x10282D36;
       
   346 const TInt xt9LangImplUidNorwegian = 0x10282D38;
       
   347 
   345 
   348 // ---------------------------------------------------------------------------
   346 // ---------------------------------------------------------------------------
   349 // CPtiLanguageDatabase::LanguageCodeForUid
   347 // CPtiLanguageDatabase::LanguageCodeForUid
   350 // 
   348 // 
   351 // ---------------------------------------------------------------------------
   349 // ---------------------------------------------------------------------------
   352 //
   350 //
   353 EXPORT_C TInt CPtiLanguageDatabase::LanguageCodeForUid(TInt aUid)
   351 EXPORT_C TInt CPtiLanguageDatabase::LanguageCodeForUid(TInt aUid)
   354 	{
   352 	{
   355 	TInt i;
   353 	TInt i;
   356 	
       
   357 	if ( aUid == xt9LangImplUidDanish )
       
   358 	    {
       
   359 	    return ELangDanish;
       
   360 	    }
       
   361 	else if ( aUid == xt9LangImplUidNorwegian )
       
   362 	    {
       
   363 	    return ELangNorwegian;
       
   364 	    }
       
   365 
   354 
   366 	for (i = 0; ; i++)
   355 	for (i = 0; ; i++)
   367 		{
   356 		{
   368 		if (langUids[i].iUid == 0)
   357 		if (langUids[i].iUid == 0)
   369 			{
   358 			{
   384 // 
   373 // 
   385 // ---------------------------------------------------------------------------
   374 // ---------------------------------------------------------------------------
   386 //
   375 //
   387 EXPORT_C TInt CPtiLanguageDatabase::CreateMappingTableL(TInt aCoreUid, RArray<TPtiLangDatabaseMapping>& aResult)
   376 EXPORT_C TInt CPtiLanguageDatabase::CreateMappingTableL(TInt aCoreUid, RArray<TPtiLangDatabaseMapping>& aResult)
   388 	{
   377 	{
   389 	CleanupClosePushL( aResult );
       
   390 	TInt res = 0, i, lc;
   378 	TInt res = 0, i, lc;
   391 	TPtiLangDatabaseMapping map;
   379 	TPtiLangDatabaseMapping map;
   392 	CArrayFix<TInt>* dbs = ListDatabasesLC(aCoreUid);
   380 	CArrayFix<TInt>* dbs = ListDatabasesLC(aCoreUid);
   393 
   381 
   394 	for (i = 0; i < dbs->Count(); i++)
   382 	for (i = 0; i < dbs->Count(); i++)
   412 				}
   400 				}
   413 			}
   401 			}
   414 		}
   402 		}
   415 
   403 
   416 	CleanupStack::PopAndDestroy(); // dbs
   404 	CleanupStack::PopAndDestroy(); // dbs
   417 	CleanupStack::Pop( &aResult );
       
   418 	return res;
   405 	return res;
   419 	}
   406 	}
   420 
   407 
   421 
   408 
   422 // ---------------------------------------------------------------------------
   409 // ---------------------------------------------------------------------------
   424 // 
   411 // 
   425 // ---------------------------------------------------------------------------
   412 // ---------------------------------------------------------------------------
   426 //		
   413 //		
   427 EXPORT_C TInt CPtiLanguageDatabase::CreateMappingTableWithOpaqueL(TInt aCoreUid, RArray<TPtiLangDatabaseMappingOpaque>& aResult)
   414 EXPORT_C TInt CPtiLanguageDatabase::CreateMappingTableWithOpaqueL(TInt aCoreUid, RArray<TPtiLangDatabaseMappingOpaque>& aResult)
   428     {
   415     {
   429 	CleanupClosePushL( aResult );
       
   430   	TInt res = 0, lc;
   416   	TInt res = 0, lc;
   431 	TPtiLangDatabaseMappingOpaque map;	
   417 	TPtiLangDatabaseMappingOpaque map;	
   432 	RImplInfoPtrArray infoArray;
   418 	RImplInfoPtrArray infoArray;
   433 	TInt i;
   419 	TInt i;
   434 
   420 
   459 				}
   445 				}
   460 			}
   446 			}
   461 		}
   447 		}
   462 
   448 
   463 	CleanupStack::PopAndDestroy(); // infoArray    
   449 	CleanupStack::PopAndDestroy(); // infoArray    
   464 	CleanupStack::Pop( &aResult );
   450 
   465 	return res;
   451 	return res;
   466     }
   452     }
   467 	
   453 	
   468 
   454 
   469 // End of file
   455 // End of file