equal
deleted
inserted
replaced
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2004-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". |
17 #endif |
17 #endif |
18 #include "dataprovider.h" |
18 #include "dataprovider.h" |
19 #include "ReadOnlyTzDb.h" |
19 #include "ReadOnlyTzDb.h" |
20 #include "vtzrules.h" |
20 #include "vtzrules.h" |
21 #include "timezoneserver.h" |
21 #include "timezoneserver.h" |
|
22 #include "OstTraceDefinitions.h" |
|
23 #ifdef OST_TRACE_COMPILER_IN_USE |
|
24 #include "DataProviderTraces.h" |
|
25 #endif |
|
26 |
|
27 |
22 |
28 |
23 CTzDataProvider* CTzDataProvider::NewL(RFs& aFs, CTzSwiObserver& aSwiObserver, |
29 CTzDataProvider* CTzDataProvider::NewL(RFs& aFs, CTzSwiObserver& aSwiObserver, |
24 CTzUserDataDb& aTzUserDataDb, MTzDataObserver& aTzDataObserver) |
30 CTzUserDataDb& aTzUserDataDb, MTzDataObserver& aTzDataObserver) |
25 { |
31 { |
26 CTzDataProvider* self = new(ELeave) CTzDataProvider(aFs, aTzUserDataDb, aTzDataObserver); |
32 CTzDataProvider* self = new(ELeave) CTzDataProvider(aFs, aTzUserDataDb, aTzDataObserver); |
90 identifiers followed by the numeric time zone identifiers (TInt's) for which the |
96 identifiers followed by the numeric time zone identifiers (TInt's) for which the |
91 current UTC offset is required. |
97 current UTC offset is required. |
92 */ |
98 */ |
93 void CTzDataProvider::GetOffsetsForTimeZoneIdsL(CBufFlat& aTimeZoneIdArray) const |
99 void CTzDataProvider::GetOffsetsForTimeZoneIdsL(CBufFlat& aTimeZoneIdArray) const |
94 { |
100 { |
|
101 OstTraceDef0( OST_TRACE_CATEGORY_DEBUG,TRACE_FLOW_PARAM, CTZDATAPROVIDER_GETOFFSETSFORTIMEZONEIDSL_ENTRY, "CTzDataProvider::GetOffsetsForTimeZoneIdsL Entrty" ); |
|
102 |
95 const TInt KElementSize = sizeof(TInt); |
103 const TInt KElementSize = sizeof(TInt); |
96 |
104 |
97 // Get number of time zone identifiers in array. |
105 // Get number of time zone identifiers in array. |
98 TInt arrayOffset = 0; |
106 TInt arrayOffset = 0; |
99 TInt numIds = 0; |
107 TInt numIds = 0; |
143 aTimeZoneIdArray.Write(arrayOffset, &utcOffset, KElementSize); |
151 aTimeZoneIdArray.Write(arrayOffset, &utcOffset, KElementSize); |
144 |
152 |
145 // Advance array offset to next time zone identifier. |
153 // Advance array offset to next time zone identifier. |
146 arrayOffset += KElementSize; |
154 arrayOffset += KElementSize; |
147 } |
155 } |
|
156 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_FLOW_PARAM, CTZDATAPROVIDER_GETOFFSETSFORTIMEZONEIDSL_EXIT, "CTzDataProvider::GetOffsetsForTimeZoneIdsL Exit" ); |
|
157 |
148 } |
158 } |
149 |
159 |
150 void CTzDataProvider::BackupBeginningL() |
160 void CTzDataProvider::BackupBeginningL() |
151 { |
161 { |
152 iReadOnlyTzDb->BackupBeginningL(); |
162 iReadOnlyTzDb->BackupBeginningL(); |