equal
deleted
inserted
replaced
152 for ( TInt i = 0; i < iMBoxObservers.Count(); i++ ) |
152 for ( TInt i = 0; i < iMBoxObservers.Count(); i++ ) |
153 { |
153 { |
154 TMsvId mboxId = iMBoxObservers[i]->iMBoxId.Id(); |
154 TMsvId mboxId = iMBoxObservers[i]->iMBoxId.Id(); |
155 if ( mboxes.Find(mboxId) == KErrNotFound ) |
155 if ( mboxes.Find(mboxId) == KErrNotFound ) |
156 { |
156 { |
157 mboxes.Append( mboxId ); |
157 mboxes.AppendL( mboxId ); |
158 } |
158 } |
159 } |
159 } |
160 |
160 |
161 for ( TInt i = 0; i < mboxes.Count(); i++ ) |
161 for ( TInt i = 0; i < mboxes.Count(); i++ ) |
162 { |
162 { |
204 return error; |
204 return error; |
205 } |
205 } |
206 |
206 |
207 // ---------------------------------------------------------------------------- |
207 // ---------------------------------------------------------------------------- |
208 // ---------------------------------------------------------------------------- |
208 // ---------------------------------------------------------------------------- |
209 TInt CIpsPlgEventHandler::RegisterPropertyObserverL( |
209 void CIpsPlgEventHandler::RegisterPropertyObserverL( |
210 MIpsPlgPropertyObserver* aObserver ) |
210 MIpsPlgPropertyObserver* aObserver ) |
211 { |
211 { |
212 FUNC_LOG; |
212 FUNC_LOG; |
213 if ( !aObserver ) |
213 if ( !aObserver ) |
214 { |
214 { |
219 { |
219 { |
220 iPropertyWatcher = CIpsPlgPropertyWatcher::NewL( |
220 iPropertyWatcher = CIpsPlgPropertyWatcher::NewL( |
221 CActive::EPriorityIdle, *this ); |
221 CActive::EPriorityIdle, *this ); |
222 } |
222 } |
223 |
223 |
224 return iPropertyObservers.Append( aObserver ); |
224 iPropertyObservers.AppendL( aObserver ); |
225 } |
225 } |
226 |
226 |
227 // ---------------------------------------------------------------------------- |
227 // ---------------------------------------------------------------------------- |
228 // ---------------------------------------------------------------------------- |
228 // ---------------------------------------------------------------------------- |
229 void CIpsPlgEventHandler::UnRegisterPropertyObserver( |
229 void CIpsPlgEventHandler::UnRegisterPropertyObserver( |
490 return SymId2FsId( aEntry.Id(), aEntry.iMtm.iUid ); |
490 return SymId2FsId( aEntry.Id(), aEntry.iMtm.iUid ); |
491 } |
491 } |
492 |
492 |
493 // --------------------------------------------------------------------------- |
493 // --------------------------------------------------------------------------- |
494 // --------------------------------------------------------------------------- |
494 // --------------------------------------------------------------------------- |
495 inline void CIpsPlgEventHandler::FillFSMessageArray( |
495 inline void CIpsPlgEventHandler::FillFSMessageArrayL( |
496 RArray<TFSMailMsgId>& aFSArray, |
496 RArray<TFSMailMsgId>& aFSArray, |
497 const CMsvEntrySelection* aSelection, |
497 const CMsvEntrySelection* aSelection, |
498 TUint aMtmUid ) |
498 TUint aMtmUid ) |
499 { |
499 { |
500 FUNC_LOG; |
500 FUNC_LOG; |
502 __ASSERT_DEBUG( ( aFSArray.Count() == 0 ), |
502 __ASSERT_DEBUG( ( aFSArray.Count() == 0 ), |
503 User::Panic( KIpsPlgEventHandlerPanic, KErrGeneral ) ); |
503 User::Panic( KIpsPlgEventHandlerPanic, KErrGeneral ) ); |
504 |
504 |
505 for ( TInt i = 0; i < aSelection->Count(); i++ ) |
505 for ( TInt i = 0; i < aSelection->Count(); i++ ) |
506 { |
506 { |
507 aFSArray.Append( SymId2FsId(aSelection->At(i), aMtmUid) ); |
507 aFSArray.AppendL( SymId2FsId(aSelection->At(i), aMtmUid) ); |
508 } |
508 } |
509 } |
509 } |
510 |
510 |
511 // ---------------------------------------------------------------------------- |
511 // ---------------------------------------------------------------------------- |
512 // ---------------------------------------------------------------------------- |
512 // ---------------------------------------------------------------------------- |
692 |
692 |
693 // set entries array pointer |
693 // set entries array pointer |
694 RArray<TFSMailMsgId> array(KEventGranularity); |
694 RArray<TFSMailMsgId> array(KEventGranularity); |
695 CleanupClosePushL( array ); |
695 CleanupClosePushL( array ); |
696 |
696 |
697 FillFSMessageArray( |
697 FillFSMessageArrayL( |
698 array, |
698 array, |
699 static_cast<const CMsvEntrySelection*>(aArg1), |
699 static_cast<const CMsvEntrySelection*>(aArg1), |
700 tNew.iMtm.iUid ); |
700 tNew.iMtm.iUid ); |
701 arg1 = static_cast<TAny*>(&array); |
701 arg1 = static_cast<TAny*>(&array); |
702 |
702 |
715 mbox = SymId2FsId( tNew.iServiceId, tNew.iMtm.iUid ); |
715 mbox = SymId2FsId( tNew.iServiceId, tNew.iMtm.iUid ); |
716 |
716 |
717 // set entries array pointer |
717 // set entries array pointer |
718 RArray<TFSMailMsgId> array(1); |
718 RArray<TFSMailMsgId> array(1); |
719 CleanupClosePushL( array ); |
719 CleanupClosePushL( array ); |
720 array.Append( SymId2FsId( tNew ) ); |
720 array.AppendL( SymId2FsId( tNew ) ); |
721 arg1 = &array; |
721 arg1 = &array; |
722 |
722 |
723 // set parent pointer |
723 // set parent pointer |
724 TMsvId* parent = static_cast<TMsvId*>(aArg2); |
724 TMsvId* parent = static_cast<TMsvId*>(aArg2); |
725 TFSMailMsgId tfsid( iPluginId, *parent); |
725 TFSMailMsgId tfsid( iPluginId, *parent); |
764 |
764 |
765 TFSMailEvent event( TFSMailboxUnavailable ); |
765 TFSMailEvent event( TFSMailboxUnavailable ); |
766 |
766 |
767 RArray<TFSMailMsgId> array(KEventGranularity); |
767 RArray<TFSMailMsgId> array(KEventGranularity); |
768 CleanupClosePushL( array ); |
768 CleanupClosePushL( array ); |
769 FillFSMessageArray( |
769 FillFSMessageArrayL( |
770 array, |
770 array, |
771 static_cast<const CMsvEntrySelection*>(aArg1), |
771 static_cast<const CMsvEntrySelection*>(aArg1), |
772 tMoved.iMtm.iUid ); |
772 tMoved.iMtm.iUid ); |
773 |
773 |
774 arg1 = &array; |
774 arg1 = &array; |
933 arg3 ); |
933 arg3 ); |
934 } |
934 } |
935 } |
935 } |
936 else |
936 else |
937 { |
937 { |
938 array.Append( SymId2FsId(deletedId, tEntry.iMtm.iUid) ); |
938 array.AppendL( SymId2FsId(deletedId, tEntry.iMtm.iUid) ); |
939 arg1 = &array; |
939 arg1 = &array; |
940 arg2 = &parentId; |
940 arg2 = &parentId; |
941 |
941 |
942 event = TFSEventFoldersDeleted; |
942 event = TFSEventFoldersDeleted; |
943 SendDelayedEventL( |
943 SendDelayedEventL( |
990 return; |
990 return; |
991 } |
991 } |
992 |
992 |
993 RArray<TFSMailMsgId> array(1); |
993 RArray<TFSMailMsgId> array(1); |
994 CleanupClosePushL( array ); |
994 CleanupClosePushL( array ); |
995 array.Append( msg ); |
995 array.AppendL( msg ); |
996 arg1 = &array; |
996 arg1 = &array; |
997 arg2 = &parent; |
997 arg2 = &parent; |
998 event = TFSEventMailDeleted; |
998 event = TFSEventMailDeleted; |
999 SendDelayedEventL( |
999 SendDelayedEventL( |
1000 event, |
1000 event, |
1052 { |
1052 { |
1053 event = TFSEventMailChanged; |
1053 event = TFSEventMailChanged; |
1054 } |
1054 } |
1055 |
1055 |
1056 // message entry |
1056 // message entry |
1057 array.Append( SymId2FsId( tChanged ) ); |
1057 array.AppendL( SymId2FsId( tChanged ) ); |
1058 arg1 = &array; |
1058 arg1 = &array; |
1059 |
1059 |
1060 // parent entry |
1060 // parent entry |
1061 TFSMailMsgId id = SymId2FsId( *(static_cast<TMsvId*>(aArg2)), tChanged.iMtm.iUid ); |
1061 TFSMailMsgId id = SymId2FsId( *(static_cast<TMsvId*>(aArg2)), tChanged.iMtm.iUid ); |
1062 arg2 = &id; |
1062 arg2 = &id; |
1064 } |
1064 } |
1065 else if ( tChanged.iType == KUidMsvFolderEntry ) |
1065 else if ( tChanged.iType == KUidMsvFolderEntry ) |
1066 { |
1066 { |
1067 event = TFSEventFolderChanged; |
1067 event = TFSEventFolderChanged; |
1068 |
1068 |
1069 array.Append( SymId2FsId( tChanged ) ); |
1069 array.AppendL( SymId2FsId( tChanged ) ); |
1070 arg1 = &array; |
1070 arg1 = &array; |
1071 |
1071 |
1072 TFSMailMsgId id = SymId2FsId( *(static_cast<TMsvId*>(aArg2)), tChanged.iMtm.iUid ); |
1072 TFSMailMsgId id = SymId2FsId( *(static_cast<TMsvId*>(aArg2)), tChanged.iMtm.iUid ); |
1073 arg2 = &id; |
1073 arg2 = &id; |
1074 |
1074 |
1076 { |
1076 { |
1077 TMsvEmailEntry eml( tChanged ); |
1077 TMsvEmailEntry eml( tChanged ); |
1078 TInt index = iImapFolderIds.Find(tChanged.Id()); |
1078 TInt index = iImapFolderIds.Find(tChanged.Id()); |
1079 if ( eml.LocalSubscription() && index == KErrNotFound ) |
1079 if ( eml.LocalSubscription() && index == KErrNotFound ) |
1080 { |
1080 { |
1081 iImapFolderIds.Append( tChanged.Id() ); |
1081 iImapFolderIds.AppendL( tChanged.Id() ); |
1082 } |
1082 } |
1083 else if ( !eml.LocalSubscription() && index != KErrNotFound ) |
1083 else if ( !eml.LocalSubscription() && index != KErrNotFound ) |
1084 { |
1084 { |
1085 iImapFolderIds.Remove( index ); |
1085 iImapFolderIds.Remove( index ); |
1086 } |
1086 } |
1480 { |
1480 { |
1481 aFSParent.SetPluginId( TUid::Uid( iPluginId ) ); |
1481 aFSParent.SetPluginId( TUid::Uid( iPluginId ) ); |
1482 aFSParent.SetId( aParent.Id() ); |
1482 aFSParent.SetId( aParent.Id() ); |
1483 for ( TInt i = 0; i < aDeletedIds.Count(); i++ ) |
1483 for ( TInt i = 0; i < aDeletedIds.Count(); i++ ) |
1484 { |
1484 { |
1485 aFSDeletedArray.Append( |
1485 aFSDeletedArray.AppendL( |
1486 TFSMailMsgId( iPluginId, aDeletedIds.At(i) ) ); |
1486 TFSMailMsgId( iPluginId, aDeletedIds.At(i) ) ); |
1487 } |
1487 } |
1488 } |
1488 } |
1489 else |
1489 else |
1490 { |
1490 { |