equal
deleted
inserted
replaced
170 // |
170 // |
171 // Store the messagebody into handler's attribute |
171 // Store the messagebody into handler's attribute |
172 // If memory runs out, tough luck.. |
172 // If memory runs out, tough luck.. |
173 // |
173 // |
174 TPtrC8 messageBodyPtr; |
174 TPtrC8 messageBodyPtr; |
175 iPushMsg->GetMessageBody( messageBodyPtr ); |
175 if ( iPushMsg->GetMessageBody( messageBodyPtr ) ) |
176 iBody = messageBodyPtr.Alloc(); |
176 { |
177 if ( !iBody ) |
177 iBody = messageBodyPtr.Alloc(); |
178 { |
178 if ( !iBody ) |
179 LOGTEXT( _L("HandleMessageL(): Out of memory when allocating body buffer") ); |
179 { |
180 // Commit suicide - the caller expects it even if we leave |
180 LOGTEXT( _L("HandleMessageL(): Out of memory when allocating body buffer") ); |
181 iPluginKiller->KillPushPlugin(); |
181 // Commit suicide - the caller expects it even if we leave |
182 User::Leave( KErrNoMemory ); |
182 iPluginKiller->KillPushPlugin(); |
|
183 User::Leave( KErrNoMemory ); |
|
184 } |
183 } |
185 } |
184 |
186 |
185 // |
187 // |
186 // Setting 'this' active and complete in order to get to RunL |
188 // Setting 'this' active and complete in order to get to RunL |
187 // |
189 // |
751 // Now we should have a list of all local folders. |
753 // Now we should have a list of all local folders. |
752 // Prune away the standard folders. |
754 // Prune away the standard folders. |
753 // They should be at the end of the list |
755 // They should be at the end of the list |
754 TInt count = selection->Count(); |
756 TInt count = selection->Count(); |
755 TInt i; |
757 TInt i; |
756 for ( i = count - 1; i >= 0; i-- ) |
758 for ( i = count - 1; i >= 0; --i ) |
757 { |
759 { |
758 if ( selection->At( i ) <= KMsvDeletedEntryFolderEntryId ) |
760 if ( selection->At( i ) <= KMsvDeletedEntryFolderEntryId ) |
759 { |
761 { |
760 // Anything below this should not be ours |
762 // Anything below this should not be ours |
761 selection->Delete( i ); |
763 selection->Delete( i ); |
763 } |
765 } |
764 |
766 |
765 // Check if anything left. |
767 // Check if anything left. |
766 count = selection->Count(); |
768 count = selection->Count(); |
767 // Loop through the rest and find possible correct folder |
769 // Loop through the rest and find possible correct folder |
768 for ( i = 0; i < count && mmsFolderId == KMsvNullIndexEntryId; i++ ) |
770 for ( i = 0; i < count && mmsFolderId == KMsvNullIndexEntryId; ++i ) |
769 { |
771 { |
770 cMsvEntry->SetEntryL( selection->At( i ) ); |
772 cMsvEntry->SetEntryL( selection->At( i ) ); |
771 // must be exact match |
773 // must be exact match |
772 if (cMsvEntry->Entry().iDetails.Compare( KMMSNotificationFolder ) == 0) |
774 if (cMsvEntry->Entry().iDetails.Compare( KMMSNotificationFolder ) == 0) |
773 { |
775 { |