tzservices/tzserver/Client/Source/timezoneconverter.cpp
changeset 81 676b6116ca93
parent 0 2e3d3ce01487
equal deleted inserted replaced
78:175a0d824084 81:676b6116ca93
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1997-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 #include "tzrules.h"
    17 #include "tzrules.h"
    18 #include <vtzrules.h>
    18 #include <vtzrules.h>
    19 #include <tzconverter.h>
    19 #include <tzconverter.h>
    20 #include "tzruleholder.h"
    20 #include "tzruleholder.h"
    21 #include "tzchangenotifier.h"
    21 #include "tzchangenotifier.h"
       
    22 #include "OstTraceDefinitions.h"
       
    23 #ifdef OST_TRACE_COMPILER_IN_USE
       
    24 #include "timezoneconverterTraces.h"
       
    25 #endif
       
    26 
    22 
    27 
    23 //
    28 //
    24 // CTzRuleHolder
    29 // CTzRuleHolder
    25 //
    30 //
    26 
    31 
    76 
    81 
    77 
    82 
    78 
    83 
    79 void CTzRuleHolder::DoConvertL(TTime& aTime, TTzTimeReference aTimerRef)
    84 void CTzRuleHolder::DoConvertL(TTime& aTime, TTzTimeReference aTimerRef)
    80 	{
    85 	{
       
    86     OstTraceDefExt5( OST_TRACE_CATEGORY_DEBUG,TRACE_FLOW_PARAM, CTZRULEHOLDER_DOCONVERTL_ENTRY, "CTzRuleHolder::DoConvertL Entry: atime:Year=%d;Month=%d;Day=%d;Hour=%d;Min=%d", aTime.DateTime().Year(), aTime.DateTime().Month(), aTime.DateTime().Day(), aTime.DateTime().Hour(), aTime.DateTime().Minute());
       
    87     OstTraceDefExt2( OST_TRACE_CATEGORY_DEBUG,TRACE_FLOW_PARAM, CTZRULEHOLDER_DOCONVERTL_ENTRY_PARAM, "Parameters cont..;Sec=%d;aTimerRef=%u", aTime.DateTime().Second(), aTimerRef );
       
    88     
    81 	// The change notifier may not have had a chance to run yet
    89 	// The change notifier may not have had a chance to run yet
    82 	// so check if it is ready to run now to force the update of the client side cache
    90 	// so check if it is ready to run now to force the update of the client side cache
    83 	iTzChangeNotifier->RunIfReadyL();
    91 	iTzChangeNotifier->RunIfReadyL();
    84 	
    92 	
    85 	if (!(iTzRules && iTzRules->RulesApply(aTime) ) )
    93 	if (!(iTzRules && iTzRules->RulesApply(aTime) ) )
   120 		delete iTzActualisedRules;
   128 		delete iTzActualisedRules;
   121 		iTzActualisedRules = newRules;
   129 		iTzActualisedRules = newRules;
   122 		}
   130 		}
   123 		
   131 		
   124 	User::LeaveIfError(iTzRules->ConvertTime(*iTzActualisedRules, aTime, aTimerRef));
   132 	User::LeaveIfError(iTzRules->ConvertTime(*iTzActualisedRules, aTime, aTimerRef));
       
   133 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_FLOW_PARAM, CTZRULEHOLDER_DOCONVERTL_EXIT, "CTzRuleHolder::DoConvertL Exit" );
       
   134 	
   125 	}
   135 	}
   126 
   136 
   127 /**
   137 /**
   128 Handles notifications from the Time Zone Server
   138 Handles notifications from the Time Zone Server
   129 if the Time Zone Database Changes or the System Time Zone is Changed then
   139 if the Time Zone Database Changes or the System Time Zone is Changed then