landmarks/locationlandmarks/localaccess/src/epos_rposlmlocalnameindex.cpp
branchRCL_3
changeset 16 6fcbaa43369c
parent 0 667063e416a2
equal deleted inserted replaced
13:19bff11d6c18 16:6fcbaa43369c
    44 
    44 
    45 RPosLmLocalNameIndex::CIndexItem* RPosLmLocalNameIndex::CIndexItem::NewL( 
    45 RPosLmLocalNameIndex::CIndexItem* RPosLmLocalNameIndex::CIndexItem::NewL( 
    46     TPosLmItemId aId, const TDesC& aName )
    46     TPosLmItemId aId, const TDesC& aName )
    47     {
    47     {
    48     CIndexItem* self = new (ELeave) CIndexItem;
    48     CIndexItem* self = new (ELeave) CIndexItem;
       
    49     CleanupStack::PushL( self );
    49     self->iId = aId;
    50     self->iId = aId;
    50     self->iName = aName.AllocL();
    51     self->iName = aName.AllocL();
       
    52     CleanupStack::Pop( self );
    51     return self;
    53     return self;
    52     }
    54     }
    53 
    55 
    54 RPosLmLocalNameIndex::CIndexItem* RPosLmLocalNameIndex::CIndexItem::NewL( 
    56 RPosLmLocalNameIndex::CIndexItem* RPosLmLocalNameIndex::CIndexItem::NewL( 
    55     RReadStream& aStream )
    57     RReadStream& aStream )
   273         
   275         
   274     TPtrC8 idsDes( reinterpret_cast<const TUint8*>( ids ), sizeof( TPosLmItemId ) * lmCount );
   276     TPtrC8 idsDes( reinterpret_cast<const TUint8*>( ids ), sizeof( TPosLmItemId ) * lmCount );
   275 
   277 
   276     TInt err = iSession.SendReceive( EPosLmServerUpdateNameIndex, 
   278     TInt err = iSession.SendReceive( EPosLmServerUpdateNameIndex, 
   277         TIpcArgs( EPosLmServerRemoveLandmarks, &idsDes ) );
   279         TIpcArgs( EPosLmServerRemoveLandmarks, &idsDes ) );
   278     delete ids;
   280         delete[] ids;
   279     User::LeaveIfError( err );
   281     User::LeaveIfError( err );
   280     }
   282     }
   281 
   283 
   282 
   284 
   283 // -----------------------------------------------------------------------------
   285 // -----------------------------------------------------------------------------