iaupdate/IAD/firmwareupdate/src/iaupdatefwsyncutil.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     1 /*
     1 /*
     2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    18 
    18 
    19 
    19 
    20 
    20 
    21 // INCLUDES
    21 // INCLUDES
    22 #include <SyncMLTransportProperties.h>
    22 #include <SyncMLTransportProperties.h>
       
    23 #include <eikenv.h>
       
    24 #include <bautils.h>
    23 #include <collate.h>
    25 #include <collate.h>
    24 
    26 #include <StringLoader.h>
       
    27 #include <avkon.rsg>
    25 
    28 
    26 #include "iaupdatefwsyncutil.h"
    29 #include "iaupdatefwsyncutil.h"
    27 #include "iaupdatefwdebug.h"
    30 #include "iaupdatefwdebug.h"
    28 #include "iaupdatefwconst.h"
    31 #include "iaupdatefwconst.h"
    29 
    32 
   151 	if ( IsToday( homeTime ) )
   154 	if ( IsToday( homeTime ) )
   152 		{
   155 		{
   153 		FLOG( "[OMADM] TUtil::SyncTimeLC time" );
   156 		FLOG( "[OMADM] TUtil::SyncTimeLC time" );
   154 		
   157 		
   155 		TBuf<KBufSize> timeFormat;
   158 		TBuf<KBufSize> timeFormat;
   156 		/*HBufC* buf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
   159 		HBufC* buf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
   157 		TUtil::StrCopy( timeFormat, *buf );
   160 		TUtil::StrCopy( timeFormat, *buf );
   158 		CleanupStack::PopAndDestroy( buf );
   161 		CleanupStack::PopAndDestroy( buf );
   159 		homeTime.FormatL( ptr, timeFormat );*/
   162 		homeTime.FormatL( ptr, timeFormat );
   160 		
   163 		
   161 		FLOG( "[OMADM] TUtil::SyncTimeLC time done" );
   164 		FLOG( "[OMADM] TUtil::SyncTimeLC time done" );
   162 		}
   165 		}
   163 	else
   166 	else
   164 		{
   167 		{
   165 		FLOG( "[OMADM] TUtil::SyncTimeLC date" );
   168 		FLOG( "[OMADM] TUtil::SyncTimeLC date" );
   166 		
   169 		
   167 		TBuf<KBufSize> dateFormat;
   170 		TBuf<KBufSize> dateFormat;
   168         /*HBufC* buf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO );
   171         HBufC* buf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO );
   169         TUtil::StrCopy( dateFormat, *buf );
   172         TUtil::StrCopy( dateFormat, *buf );
   170         CleanupStack::PopAndDestroy( buf );
   173         CleanupStack::PopAndDestroy( buf );
   171 		homeTime.FormatL(ptr, dateFormat);*/
   174 		homeTime.FormatL(ptr, dateFormat);
   172 		
   175 		
   173 		FLOG( "[OMADM] TUtil::SyncTimeLC date done" );
   176 		FLOG( "[OMADM] TUtil::SyncTimeLC date done" );
   174 		}
   177 		}
   175     FLOG( "[OMADM] TUtil::SyncTimeLC Done" );
   178     FLOG( "[OMADM] TUtil::SyncTimeLC Done" );
   176 	return hBuf;
   179 	return hBuf;
   233 
   236 
   234 // -----------------------------------------------------------------------------
   237 // -----------------------------------------------------------------------------
   235 // TUtil::GetDateTextL
   238 // TUtil::GetDateTextL
   236 // -----------------------------------------------------------------------------
   239 // -----------------------------------------------------------------------------
   237 //
   240 //
   238 void TUtil::GetDateTextL(TDes& /*aText*/, TTime aDateTime)
   241 void TUtil::GetDateTextL(TDes& aText, TTime aDateTime)
   239 	{
   242 	{
   240 	TTime homeTime = ConvertUniversalToHomeTime( aDateTime );
   243 	TTime homeTime = ConvertUniversalToHomeTime( aDateTime );
   241 	//HBufC* hBuf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO );
   244 	HBufC* hBuf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO );
   242     //homeTime.FormatL( aText, *hBuf );
   245     homeTime.FormatL( aText, *hBuf );
   243     //CleanupStack::PopAndDestroy( hBuf );
   246     CleanupStack::PopAndDestroy( hBuf );
   244 	}
   247 	}
   245 
   248 
   246 
   249 
   247 // -----------------------------------------------------------------------------
   250 // -----------------------------------------------------------------------------
   248 // TUtil::GetTimeTextL
   251 // TUtil::GetTimeTextL
   249 // -----------------------------------------------------------------------------
   252 // -----------------------------------------------------------------------------
   250 //
   253 //
   251 void TUtil::GetTimeTextL( TDes& /*aText*/, TTime aDateTime )
   254 void TUtil::GetTimeTextL( TDes& aText, TTime aDateTime )
   252 	{
   255 	{
   253 	TTime homeTime = ConvertUniversalToHomeTime( aDateTime );
   256 	TTime homeTime = ConvertUniversalToHomeTime( aDateTime );
   254 	//HBufC* hBuf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
   257 	HBufC* hBuf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
   255     //homeTime.FormatL( aText, *hBuf );
   258     homeTime.FormatL( aText, *hBuf );
   256     //CleanupStack::PopAndDestroy( hBuf );
   259     CleanupStack::PopAndDestroy( hBuf );
   257 	}
   260 	}
   258 
   261 
   259 
   262 
   260 // -----------------------------------------------------------------------------
   263 // -----------------------------------------------------------------------------
   261 // TUtil::GetDateTimeTextL
   264 // TUtil::GetDateTimeTextL