mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbcommon/src/mpxdbcommonutil.cpp
branchRCL_3
changeset 11 943ff5625028
parent 9 13afc0e517bd
child 12 171e07ac910f
equal deleted inserted replaced
9:13afc0e517bd 11:943ff5625028
   481     aMessage.SetTObjectValueL<TMPXGeneralCategory>(KMPXMessageMediaGeneralCategory, aCategory);
   481     aMessage.SetTObjectValueL<TMPXGeneralCategory>(KMPXMessageMediaGeneralCategory, aCategory);
   482     aMessage.SetTObjectValueL<TMPXItemId>(KMPXMessageMediaGeneralId, aId);
   482     aMessage.SetTObjectValueL<TMPXItemId>(KMPXMessageMediaGeneralId, aId);
   483 
   483 
   484     if ((aDeprecatedId != 0) && (aId != aDeprecatedId))
   484     if ((aDeprecatedId != 0) && (aId != aDeprecatedId))
   485         {
   485         {
   486         if ( aCategory == EMPXAlbum && aChangeType == EMPXItemModified )
   486         aMessage.SetTObjectValueL<TMPXItemId>(KMPXMessageMediaDeprecatedId, aDeprecatedId);
   487             {
       
   488             aMessage.SetTObjectValueL<TMPXItemId>(KMPXMessageMediaDeprecatedId, aId);
       
   489             }
       
   490         else
       
   491             {
       
   492             aMessage.SetTObjectValueL<TMPXItemId>(KMPXMessageMediaDeprecatedId, aDeprecatedId);
       
   493             }
       
   494         }
   487         }
   495     }
   488     }
   496 
   489 
   497 // ----------------------------------------------------------------------------
   490 // ----------------------------------------------------------------------------
   498 // Add an item changed message to the message array
   491 // Add an item changed message to the message array
  1283 		}	
  1276 		}	
  1284 
  1277 
  1285     return text;
  1278     return text;
  1286 	}
  1279 	}
  1287 
  1280 
  1288 
  1281 // ----------------------------------------------------------------------------
       
  1282 // Add an album item changed message to the message array
       
  1283 // ----------------------------------------------------------------------------
       
  1284 //
       
  1285 EXPORT_C void MPXDbCommonUtil::AddItemAlbumChangedMessageL(
       
  1286     CMPXMessageArray& aMessageArray,
       
  1287     TMPXItemId aId,
       
  1288     TMPXChangeEventType aChangeType,
       
  1289     TMPXGeneralCategory aCategory,
       
  1290     TUint aUid,
       
  1291     TBool aAlbumArt,
       
  1292     TMPXItemId aDeprecatedId)
       
  1293     {
       
  1294     MPX_FUNC("MPXDbCommonUtil::AddItemChangedMessageL");
       
  1295     CMPXMessage* message = CMPXMedia::NewL();
       
  1296     CleanupStack::PushL(message);
       
  1297 
       
  1298     FillItemChangedMessageL(*message, aId, aChangeType, aCategory, aUid,
       
  1299     		aDeprecatedId );
       
  1300     if ( aAlbumArt )
       
  1301         {
       
  1302         message->SetTObjectValueL<TMPXItemId>(KMPXMessageMediaDeprecatedId, aId);
       
  1303         }
       
  1304     if (FindItemChangedMessageL(aMessageArray, *message) == KErrNotFound)
       
  1305         {
       
  1306         aMessageArray.AppendL(*message); // ownership xfer
       
  1307         }
       
  1308     CleanupStack::PopAndDestroy(message);
       
  1309     }
  1289 // End of File
  1310 // End of File