sl@0: /* sl@0: * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Name : localetlsinfo.h sl@0: * Part of : LIBC sl@0: * Contains the class declartion for locale related functions sl@0: * Version : sl@0: * This material, including documentation and any related sl@0: * computer programs, is protected by copyright controlled by sl@0: * Nokia Corporation. All rights are reserved. Copying, sl@0: * including reproducing, storing, adapting or translating, any sl@0: * or all of this material requires the prior written consent of sl@0: * Nokia Corporation. This material also contains confidential sl@0: * information which may not be disclosed to others without the sl@0: * prior written consent of Nokia Corporation. sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef _LOCALETLSINFO_H_ sl@0: #define _LOCALETLSINFO_H_ sl@0: sl@0: #include sl@0: #include sl@0: #include "sysif.h" sl@0: sl@0: #define LANG_VARIANT_DLL_NAME 10 sl@0: #ifdef SYMBIAN_DISTINCT_LOCALE_MODEL sl@0: #define NEW_LANG_VARIANT_DLL_NAME 30 sl@0: #endif sl@0: class CLocale; sl@0: struct lc_monetary_T; sl@0: struct lc_time_T; sl@0: struct lc_numeric_T; sl@0: sl@0: struct LocaleInfo sl@0: { sl@0: CLocale *_s_iNewLocale; sl@0: lc_monetary_T*_s_iMonetary_locale; sl@0: lc_numeric_T * _s_iNumeric_locale; sl@0: lc_time_T * _s_iTime_locale; sl@0: sl@0: TText8 *_s_numericLocale; sl@0: TText8 *_s_monetaryLocale; sl@0: TText8 *_s_timeLocale; sl@0: sl@0: TBuf _s_DllName; sl@0: #ifdef SYMBIAN_DISTINCT_LOCALE_MODEL sl@0: TBuf _s_ColDllName; sl@0: #endif sl@0: /******************************************************************* sl@0: Overloading new and delete operators so that they will sl@0: allocate and deallocare memory from/to the private heap of backend sl@0: ********************************************************************/ sl@0: inline TAny* operator new(TUint aSize, TAny* aBase) __NO_THROW sl@0: { sl@0: Mem::FillZ(aBase, aSize); return aBase; sl@0: } sl@0: sl@0: inline TAny* operator new(TUint aSize) __NO_THROW sl@0: { sl@0: return Backend()->Alloc(aSize); sl@0: } sl@0: sl@0: inline TAny* operator new(TUint aSize, TLeave) sl@0: { sl@0: TAny* ptr = Backend()->Alloc(aSize); sl@0: if (ptr == NULL) sl@0: { sl@0: User::Leave(KErrNoMemory); sl@0: } sl@0: return ptr; sl@0: } sl@0: sl@0: inline TAny* operator new(TUint aSize, TUint aExtraSize) __NO_THROW sl@0: { sl@0: return Backend()->Alloc(aSize + aExtraSize); sl@0: } sl@0: sl@0: inline TAny* operator new(TUint aSize, TLeave, TUint aExtraSize) sl@0: { sl@0: TAny* ptr = Backend()->Alloc(aSize + aExtraSize); sl@0: if (ptr == NULL) sl@0: { sl@0: User::Leave(KErrNoMemory); sl@0: } sl@0: return ptr; sl@0: } sl@0: sl@0: inline void operator delete(TAny *aPtr) __NO_THROW sl@0: { sl@0: Backend()->Free( aPtr ); sl@0: } sl@0: }; sl@0: sl@0: typedef struct LocaleInfo _localeinfo; sl@0: sl@0: #endif //_LOCALETLSINFO_H_ sl@0: sl@0: sl@0: