equal
deleted
inserted
replaced
290 { |
290 { |
291 iBasePlugin.CompleteConstructL(); |
291 iBasePlugin.CompleteConstructL(); |
292 IPSAccountsL(); |
292 IPSAccountsL(); |
293 return; |
293 return; |
294 } |
294 } |
295 if ( !iPluginObserver && iMBoxObservers.Count()==0 ) |
295 if ( iMBoxObservers.Count() == 0 ) |
296 { |
296 { |
297 //if no observer we can't relay these events. |
297 if ( !iPluginObserver ) |
298 return; |
298 { |
299 } |
299 //if no observer we can't relay these events. |
300 //<cmail> |
300 return; |
301 if ( iMBoxObservers.Count() == 0 && aArg2 && |
301 } |
302 (*(TMsvId*) (aArg2)) != KMsvRootIndexEntryIdValue && |
302 if ( !IsMailboxOrMediaEvent(aEvent, aArg2) ) |
303 aEvent != EMsvMediaChanged ) |
303 { |
304 { |
304 // event is related to messages / folders, can return |
305 // event is related to messages / folders, can return |
305 // because no mailbox observers found |
306 // because no mailbox observers found |
306 return; |
307 return; |
307 } |
308 } |
308 } |
309 //</cmail> |
|
310 |
309 |
311 switch( aEvent ) |
310 switch( aEvent ) |
312 { |
311 { |
313 case EMsvEntriesCreated: |
312 case EMsvEntriesCreated: |
314 HandleEntriesCreatedL( aArg1, aArg2, aArg3 ); |
313 HandleEntriesCreatedL( aArg1, aArg2, aArg3 ); |
1149 // ---------------------------------------------------------------------------- |
1148 // ---------------------------------------------------------------------------- |
1150 // ---------------------------------------------------------------------------- |
1149 // ---------------------------------------------------------------------------- |
1151 void CIpsPlgEventHandler::HandleMediaChangedL( |
1150 void CIpsPlgEventHandler::HandleMediaChangedL( |
1152 TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/ ) |
1151 TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/ ) |
1153 { |
1152 { |
1154 TAny* arg1=NULL; |
1153 TAny* arg1(NULL); |
1155 TAny* arg2=NULL; |
1154 TAny* arg2(NULL); |
1156 TAny* arg3=NULL; |
1155 TAny* arg3(NULL); |
1157 TMsvId service; |
1156 TMsvId service; |
1158 TMsvEntry tChanged; |
1157 TMsvEntry tChanged; |
1159 TFSMailMsgId mbox; |
1158 TFSMailMsgId mbox; |
1160 TFSMailEvent event( TFSEventMailboxDeleted ); |
1159 TFSMailEvent event( TFSEventMailboxDeleted ); |
1161 TInt startPoint(iIPSAccounts.Count()-1); |
1160 TInt startPoint(iIPSAccounts.Count()-1); |
|
1161 |
|
1162 if ( !aArg1 || !aArg2 ) |
|
1163 { |
|
1164 return; |
|
1165 } |
1162 TInt from(*(TInt*) (aArg1)); |
1166 TInt from(*(TInt*) (aArg1)); |
1163 TInt to(*(TInt*) (aArg2)); |
1167 TInt to(*(TInt*) (aArg2)); |
1164 |
1168 if ( from > KMaxDriveUnitValue || to > KMaxDriveUnitValue ) |
1165 if ( !aArg1 || !aArg2 || |
|
1166 from>KMaxDriveUnitValue || to>KMaxDriveUnitValue ) |
|
1167 { |
1169 { |
1168 // Possibly duplicate event |
1170 // Possibly duplicate event |
1169 // or some other disinformation |
1171 // or some other disinformation |
1170 return; |
1172 return; |
1171 } |
1173 } |
1737 { |
1739 { |
1738 FUNC_LOG; |
1740 FUNC_LOG; |
1739 // <qmail> code removed as it does nothing; keeping the func as it probably will be needed |
1741 // <qmail> code removed as it does nothing; keeping the func as it probably will be needed |
1740 } |
1742 } |
1741 |
1743 |
|
1744 // ---------------------------------------------------------------------------- |
|
1745 // ---------------------------------------------------------------------------- |
|
1746 TBool CIpsPlgEventHandler::IsMailboxOrMediaEvent( MMsvSessionObserver::TMsvSessionEvent aEvent, |
|
1747 TAny* aArg ) |
|
1748 { |
|
1749 TBool ret(EFalse); |
|
1750 if ( aArg ) |
|
1751 { |
|
1752 if ( (*(TMsvId*)(aArg)) == KMsvRootIndexEntryIdValue |
|
1753 || aEvent == EMsvMediaChanged ) |
|
1754 { |
|
1755 ret = ETrue; |
|
1756 } |
|
1757 } |
|
1758 return ret; |
|
1759 } |
|
1760 |
1742 // <qmail> not needed |
1761 // <qmail> not needed |
1743 // ---------------------------------------------------------------------------- |
1762 // ---------------------------------------------------------------------------- |
1744 // ---------------------------------------------------------------------------- |
1763 // ---------------------------------------------------------------------------- |
1745 //void CIpsPlgEventHandler::ExceptionEventCallbackL( |
1764 //void CIpsPlgEventHandler::ExceptionEventCallbackL( |
1746 // TFSMailMsgId aMailboxId, |
1765 // TFSMailMsgId aMailboxId, |