equal
deleted
inserted
replaced
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 "tzlocalizedcityrecord.h" |
16 #include "tzlocalizedcityrecord.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 "tzlocalizedcityrecordTraces.h" |
|
22 #endif |
|
23 |
19 |
24 |
20 EXPORT_C CTzLocalizedCityRecord* CTzLocalizedCityRecord::NewL(const TDesC& aName, TUint8 aGroupId, TInt aIndex, |
25 EXPORT_C CTzLocalizedCityRecord* CTzLocalizedCityRecord::NewL(const TDesC& aName, TUint8 aGroupId, TInt aIndex, |
21 TInt aTzId, TUint aTzResourceId) |
26 TInt aTzId, TUint aTzResourceId) |
22 { |
27 { |
23 CTzLocalizedCityRecord* self = CTzLocalizedCityRecord::NewLC(aName, aGroupId, aIndex, aTzId, aTzResourceId); |
28 CTzLocalizedCityRecord* self = CTzLocalizedCityRecord::NewLC(aName, aGroupId, aIndex, aTzId, aTzResourceId); |
78 if (aTzId > KTzIdMax) |
83 if (aTzId > KTzIdMax) |
79 { |
84 { |
80 // This is a mess, although most of the API allows for 32 bit tz ids some of them |
85 // This is a mess, although most of the API allows for 32 bit tz ids some of them |
81 // only allow for 16 bit tz ids so we accept a TInt but do check that it can fit in |
86 // only allow for 16 bit tz ids so we accept a TInt but do check that it can fit in |
82 // 16 bits |
87 // 16 bits |
|
88 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_ERROR, CTZLOCALIZEDCITYRECORD_CONSTRUCTL, "CTzLocalizedCityRecord::ConstructL;Invalid Time zone id = %d",aTzId ); |
|
89 |
83 User::Leave(KErrArgument); |
90 User::Leave(KErrArgument); |
84 } |
91 } |
85 iTzId = aTzId; |
92 iTzId = aTzId; |
86 iName = aName.AllocL(); |
93 iName = aName.AllocL(); |
87 } |
94 } |