pimappservices/calendar/server/src/agssess.cpp
branchRCL_3
changeset 30 bd7edf625bdd
parent 29 12af337248b1
child 31 97232defd20e
equal deleted inserted replaced
29:12af337248b1 30:bd7edf625bdd
   140 			}
   140 			}
   141 		if (iEntryType == MCalChangeCallBack2::EChangeEntryEvent && aChange.iEntryType == CCalEntry::ETodo)
   141 		if (iEntryType == MCalChangeCallBack2::EChangeEntryEvent && aChange.iEntryType == CCalEntry::ETodo)
   142 			{
   142 			{
   143 			return EFalse;
   143 			return EFalse;
   144 			}
   144 			}
   145 
   145 		
   146 		// Check for the requested entry type and the change type.
       
   147 		// Don't notify clients which are listening for event and
       
   148 		// to-do notifictaions when note event is modified.
       
   149 		if ( ((iEntryType == MCalChangeCallBack2::EChangeEntryEvent) ||
       
   150 			(iEntryType == MCalChangeCallBack2::EChangeEntryTodo)) &&
       
   151 			(aChange.iEntryType == CCalEntry::ENote))
       
   152 			{
       
   153 			return EFalse;
       
   154 			}
       
   155 
       
   156 		// Notify clients which are listening for event type note modifications.
       
   157 		if (iEntryType == MCalChangeCallBack2::EChangeEntryNote &&
       
   158 			aChange.iEntryType == CCalEntry::ENote)
       
   159 			{
       
   160 			return ETrue;
       
   161 			}
       
   162 
       
   163 		// Check the entry is within the time range specified by the filter
   146 		// Check the entry is within the time range specified by the filter
   164 		// aChange.iRepeatRule gives the repeat data for the newly stored entry. If this operation is an update,
   147 		// aChange.iRepeatRule gives the repeat data for the newly stored entry. If this operation is an update,
   165 		// then aChange.iOriginalRepeatRule gives the repeat data for the old entry.
   148 		// then aChange.iOriginalRepeatRule gives the repeat data for the old entry.
   166 		TBool entryInTimeRange = CheckChangeWithinRangeL(aChange.iRepeatRule, aChange.iStartTimeOfEntryUtc, aChange.iEndTimeOfEntryUtc);
   149 		TBool entryInTimeRange = CheckChangeWithinRangeL(aChange.iRepeatRule, aChange.iStartTimeOfEntryUtc, aChange.iEndTimeOfEntryUtc);
   167 		TBool originalEntryInTimeRange = CheckChangeWithinRangeL(aChange.iOriginalRepeatRule, aChange.iOriginalStartTimeUtc, aChange.iOriginalEndTimeUtc);
   150 		TBool originalEntryInTimeRange = CheckChangeWithinRangeL(aChange.iOriginalRepeatRule, aChange.iOriginalStartTimeUtc, aChange.iOriginalEndTimeUtc);
  2080 	TPckgBuf<TTime> end;
  2063 	TPckgBuf<TTime> end;
  2081 	iMessage.ReadL(KSlot1, end);
  2064 	iMessage.ReadL(KSlot1, end);
  2082 	
  2065 	
  2083 	// Restore length
  2066 	// Restore length
  2084 	const TInt KBufferSize = iMessage.GetDesLength(KSlot2);
  2067 	const TInt KBufferSize = iMessage.GetDesLength(KSlot2);
       
  2068 	
       
  2069     if (KBufferSize == KErrArgument)
       
  2070         {
       
  2071         PanicClientL(EIndexError);
       
  2072         }
       
  2073     else if (KBufferSize == KErrBadDescriptor)
       
  2074         {
       
  2075         PanicClientL(EBadDescriptor);
       
  2076         }
       
  2077     User::LeaveIfError(KBufferSize);
  2085 	
  2078 	
  2086 	// Restore buffer
  2079 	// Restore buffer
  2087 	CBufFlat* buffer = CBufFlat::NewL(KBufferSize);
  2080 	CBufFlat* buffer = CBufFlat::NewL(KBufferSize);
  2088 	CleanupStack::PushL(buffer);
  2081 	CleanupStack::PushL(buffer);
  2089 	buffer->ExpandL(0, KBufferSize);
  2082 	buffer->ExpandL(0, KBufferSize);
  4061             }
  4054             }
  4062         else
  4055         else
  4063             {
  4056             {
  4064              // Clear all the notifications in the buffer
  4057              // Clear all the notifications in the buffer
  4065             iFileBufferedNotification->Reset();
  4058             iFileBufferedNotification->Reset();
  4066             iFileBufferedNotificationStream.Open(*iBufferedNotification);       
  4059             iFileBufferedNotificationStream.Open(*iFileBufferedNotification);       
  4067         
  4060         
  4068             // Add a single 'Undefined Change' notification to the notification buffer
  4061             // Add a single 'Undefined Change' notification to the notification buffer
  4069             CAgnFileChangeInfo* fileChang = CAgnFileChangeInfo::NewL(NULL, MCalFileChangeObserver::ECalendarInfoUpdated);
  4062             CAgnFileChangeInfo* fileChang = CAgnFileChangeInfo::NewL(NULL, MCalFileChangeObserver::ECalendarInfoUpdated);
  4070             CleanupStack::PushL(fileChang);
  4063             CleanupStack::PushL(fileChang);
  4071             aFileChangeInfo.ExternalizeL(iFileBufferedNotificationStream);
  4064             aFileChangeInfo.ExternalizeL(iFileBufferedNotificationStream);