tzservices/tzserver/Client/Source/tzlocalizedtimezonerecord.cpp
changeset 81 676b6116ca93
parent 0 2e3d3ce01487
equal deleted inserted replaced
78:175a0d824084 81:676b6116ca93
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    14 //
    14 //
    15 
    15 
    16 #include "tzlocalizedtimezonerecord.h"
    16 #include "tzlocalizedtimezonerecord.h"
    17 #include "tzid.h"
    17 #include "tzid.h"
    18 #include "tzidinternal.h"
    18 #include "tzidinternal.h"
       
    19 #include "OstTraceDefinitions.h"
       
    20 #ifdef OST_TRACE_COMPILER_IN_USE
       
    21 #include "tzlocalizedtimezonerecordTraces.h"
       
    22 #endif
       
    23 
    19 
    24 
    20 
    25 
    21 EXPORT_C CTzLocalizedTimeZoneRecord* CTzLocalizedTimeZoneRecord::NewL(TInt aTimeZoneId, const TDesC& aStandardName,
    26 EXPORT_C CTzLocalizedTimeZoneRecord* CTzLocalizedTimeZoneRecord::NewL(TInt aTimeZoneId, const TDesC& aStandardName,
    22 		const TDesC& aDaylightName, const TDesC& aShortStandardName, const TDesC& aShortDaylightName,
    27 		const TDesC& aDaylightName, const TDesC& aShortStandardName, const TDesC& aShortDaylightName,
    23 		TUint aResourceId)
    28 		TUint aResourceId)
    86 	if (aTzId > KTzIdMax)
    91 	if (aTzId > KTzIdMax)
    87 		{
    92 		{
    88 		// This is a mess, although most of the API allows for 32 bit tz ids some of them
    93 		// This is a mess, although most of the API allows for 32 bit tz ids some of them
    89 		// only allow for 16 bit tz ids so we accept a TInt but do check that it can fit in 
    94 		// only allow for 16 bit tz ids so we accept a TInt but do check that it can fit in 
    90 		// 16 bits
    95 		// 16 bits
       
    96 	    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_ERROR, CTZLOCALIZEDTIMEZONERECORD_CONSTRUCTL, "CTzLocalizedTimeZoneRecord::ConstructL;Invalid time zone id = %d", aTzId );
       
    97 	    
    91 		User::Leave(KErrArgument);
    98 		User::Leave(KErrArgument);
    92 		}
    99 		}
    93 	iId = aTzId;
   100 	iId = aTzId;
    94 	iStandardName = aStandardName.AllocL();
   101 	iStandardName = aStandardName.AllocL();
    95 	iDaylightName = aDaylightName.AllocL();
   102 	iDaylightName = aDaylightName.AllocL();