diff -r 000000000000 -r eb1f2e154e89 textinput/AknInputLanguage/src/AknInputLanguageItem.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/textinput/AknInputLanguage/src/AknInputLanguageItem.cpp Tue Feb 02 01:02:04 2010 +0200 @@ -0,0 +1,92 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0"" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +* +*/ + + +// INCLUDE FILES +#include +#include +#include +#include "ptiInputLanguageInfo.h" + +CAknInputLanguageItem* CAknInputLanguageItem::NewL( + TLanguage aLanguageCode, + const TDesC& aName, + TAknInputLanguageCapabilities aCapabilities ) + { + CAknInputLanguageItem* item = new(ELeave)CAknInputLanguageItem(aLanguageCode); + CleanupStack::PushL(item); + item->ConstructL( aName, aCapabilities); + CleanupStack::Pop(); // item + return item; + } + +EXPORT_C CAknInputLanguageItem::~CAknInputLanguageItem() + { + delete iLanguageName; + } + +CAknInputLanguageItem::CAknInputLanguageItem( TLanguage aLanguageCode ): + iLanguageCode ( aLanguageCode ) + { + } + +void CAknInputLanguageItem::ConstructL( + const TDesC& aName, + TAknInputLanguageCapabilities aCapabilities) + { + iLanguageName = aName.AllocL(); + iCapabilities = aCapabilities; + } + +EXPORT_C TLanguage CAknInputLanguageItem::LanguageCode() const + { + return iLanguageCode; + } + +EXPORT_C TPtrC CAknInputLanguageItem::LanguageName() const + { + return iLanguageName->Des(); + } + +EXPORT_C TAknInputLanguageCapabilities CAknInputLanguageItem::Capabilities() const + { + return iCapabilities; + } + + +EXPORT_C CAknInputLanguageList::CAknInputLanguageList(TInt aGranularity): + CArrayPtrFlat( aGranularity ) + { + } + +EXPORT_C CAknInputLanguageList::~CAknInputLanguageList() + { + ResetAndDestroy(); + } + +EXPORT_C TInt CAknInputLanguageList::MdcaCount() const + { + return Count(); + } + +EXPORT_C TPtrC CAknInputLanguageList::MdcaPoint(TInt aIndex) const + { + return At( aIndex )->LanguageName(); + } + +// End of File