agendainterface/agendautil/src/agendautil_p.cpp
changeset 64 1881ad52dc45
parent 57 bb2d3e476f29
child 70 a5ed90760192
equal deleted inserted replaced
63:a3cb48f6c889 64:1881ad52dc45
   201 }
   201 }
   202 
   202 
   203 /*!
   203 /*!
   204 	To store the new entry or update the entry in the Calendar db.
   204 	To store the new entry or update the entry in the Calendar db.
   205 
   205 
   206 	\param entry The entry to be added/updated
   206 	\param entry The entry to be added/updated.
   207 	\param range The recurrence range of entry
   207 	\param range The recurrence range of entry.
       
   208 	\param instanceOriginalDateTime The start time of the original instance..
   208 	\return ulong The local uid of the entry added/updated in the db.
   209 	\return ulong The local uid of the entry added/updated in the db.
   209 */
   210 */
   210 ulong AgendaUtilPrivate::store(AgendaEntry &entry, AgendaUtil::RecurrenceRange range)
   211 ulong AgendaUtilPrivate::store(
       
   212 		AgendaEntry &entry, AgendaUtil::RecurrenceRange range,
       
   213 		QDateTime &instanceOriginalDateTime)
   211 {
   214 {
   212 	// Will be filled with the lUID of the new entry created.
   215 	// Will be filled with the lUID of the new entry created.
   213 	TCalLocalUid localUid = 0;
   216 	TCalLocalUid localUid = 0;
   214 
   217 
   215 	// First check if the session to the calendar database is prepared or not.
   218 	// First check if the session to the calendar database is prepared or not.
   267 					CCalEntry *parentEntry = iCalEntryView->FetchL(entry.id());
   270 					CCalEntry *parentEntry = iCalEntryView->FetchL(entry.id());
   268 					CleanupStack::PushL(parentEntry);
   271 					CleanupStack::PushL(parentEntry);
   269 					// We are creating an exception, hence get the global Uid
   272 					// We are creating an exception, hence get the global Uid
   270 					HBufC8* guid = parentEntry->UidL().AllocLC();
   273 					HBufC8* guid = parentEntry->UidL().AllocLC();
   271 					
   274 					
   272 					QDateTime instanceOriginalDateTime = entry.startTime();
   275 					
   273 					
   276 					
   274 					// create new (child) entry
   277 					// create new (child) entry
   275 					// Use original instance time for recurrenceID as this entry hasn't got one.
   278 					// Use original instance time for recurrenceID as this entry hasn't got one.
   276 					TCalTime originalCalTime;
   279 					TCalTime originalCalTime;
   277 					TDateTime originalDateTime(instanceOriginalDateTime.date().year(),
   280 					TDateTime originalDateTime(instanceOriginalDateTime.date().year(),