Пример #1
0
void CBkmrkProperties::TransLoadL()
	{
	TUint32 indexBase = IndexBase();
	TInt low  = 0;
	TInt high = 0;
	TInt err = iRepository->Get( indexBase + KBkmrkLastModifiedLoIndex, low );
	if ( err == KErrNone )
		{
		User::LeaveIfError(iRepository->Get(indexBase + KBkmrkLastModifiedHiIndex, high));					
		TUint32 timeLo = static_cast<TUint32>(low);
		TUint32 timeHi = static_cast<TUint32>(high);
		TInt64 time = MAKE_TINT64(timeHi, timeLo);
		iLastModified = time;
		}
	else
		{
		// Set the time as 1st January 1970 midnight.
		TDateTime dt ( 1970, EJanuary, 1, 0, 0, 0, 0 );
		iLastModified = TTime ( dt );
		}
		
	HBufC* descBuffer = HBufC::NewLC(Bookmark::KMaxDescriptorLength);
	TPtr descPtr = descBuffer->Des();
	User::LeaveIfError(iRepository->Get(indexBase + KCmnDescriptionIndex, descPtr));
	delete iDescription;
	iDescription = NULL;
	iDescription = descPtr.AllocL();
	CleanupStack::PopAndDestroy(descBuffer);
	
	TInt retVal;
	User::LeaveIfError(iRepository->Get(indexBase + KCmnIconIndex, retVal));
	iIconId = static_cast<Bookmark::TAttachmentId>(retVal);
	
	iCustomProperties->TransLoadL();
	SetClean();
	}