serviceproviders/sapi_mediamanagement/mediamanagementservice/src/mgpostfilter.cpp
branchRCL_3
changeset 45 a9c0808a1095
parent 44 0b68a1b0c15e
equal deleted inserted replaced
44:0b68a1b0c15e 45:a9c0808a1095
    17 
    17 
    18 
    18 
    19 
    19 
    20 #include <MCLFItem.h>
    20 #include <MCLFItem.h>
    21 #include "mgpostfilter.h"
    21 #include "mgpostfilter.h"
       
    22 #include <mmfcontrollerpluginresolver.h>
    22 
    23 
    23 const TInt32 KLargestSigned32 = 0x7fffffff;
    24 const TInt32 KLargestSigned32 = 0x7fffffff;
    24 const TInt64 KLargestSigned64 = 0x7fffffffffffffff;
    25 const TInt64 KLargestSigned64 = 0x7fffffffffffffff;
    25 
    26 
    26 // -----------------------------------------------------------------------------
    27 // -----------------------------------------------------------------------------
    53 // -----------------------------------------------------------------------------
    54 // -----------------------------------------------------------------------------
    54 void CPostFilter::FilterItemsL( const TArray<MCLFItem*>& aItemList,
    55 void CPostFilter::FilterItemsL( const TArray<MCLFItem*>& aItemList,
    55                                 RPointerArray<MCLFItem>& aFilteredItemList )
    56                                 RPointerArray<MCLFItem>& aFilteredItemList )
    56     {
    57     {
    57 	// It will filter the Items
    58 	// It will filter the Items
       
    59 	CleanupResetAndDestroyPushL(aFilteredItemList);
    58 	MCLFItem* item = NULL;
    60 	MCLFItem* item = NULL;
    59 
    61 
    60     for( TInt i = 0 ; i < aItemList.Count() ; ++i )
    62     for( TInt i = 0 ; i < aItemList.Count() ; ++i )
    61         {
    63         {
    62         item = aItemList[i];
    64         item = aItemList[i];
    65             {
    67             {
    66             // item should be include in result
    68             // item should be include in result
    67             aFilteredItemList.AppendL( item );
    69             aFilteredItemList.AppendL( item );
    68             }
    70             }
    69         }
    71         }
       
    72         CleanupStack::Pop(&aFilteredItemList);
    70 	}
    73 	}
    71 
    74 
    72 // -----------------------------------------------------------------------------
    75 // -----------------------------------------------------------------------------
    73 // CPostFilter::SetFilterMetaData
    76 // CPostFilter::SetFilterMetaData
    74 // method to set the filter metadata
    77 // method to set the filter metadata