messagingfw/biomsgfw/BIFUSRC/cbifentry.cpp
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include "cbifentry.h"
       
    17 
       
    18 #include <f32file.h>
       
    19 
       
    20 EXPORT_C CBifEntry* CBifEntry::NewLC(const TEntry& aEntry)
       
    21 	{
       
    22 	CBifEntry* self = new(ELeave) CBifEntry();
       
    23 	CleanupStack::PushL(self);
       
    24 	self->ConstructL(aEntry);
       
    25 	return self;
       
    26 	}
       
    27 	
       
    28 EXPORT_C CBifEntry* CBifEntry::NewL(const TEntry& aEntry)
       
    29 	{
       
    30 	CBifEntry* self = CBifEntry::NewLC(aEntry);
       
    31 	CleanupStack::Pop(self);
       
    32 	return self;
       
    33 	}
       
    34 	
       
    35 CBifEntry::~CBifEntry()
       
    36 	{
       
    37 	delete iName;
       
    38 	}
       
    39 	
       
    40 CBifEntry::CBifEntry()
       
    41 : CBase()
       
    42 	{
       
    43 	}
       
    44 
       
    45 void CBifEntry::ConstructL(const TEntry& aEntry)
       
    46 	{
       
    47 	iSize = aEntry.iSize;
       
    48 	iModified = aEntry.iModified;
       
    49 	iName = aEntry.iName.AllocL();
       
    50 	}
       
    51 
       
    52 /**
       
    53 Equality operator.
       
    54 
       
    55 @param CBifEntry
       
    56 Specifies CBifEntry object to compare with.
       
    57 
       
    58 @return
       
    59 ETrue if the entries are the same.
       
    60 */
       
    61 EXPORT_C TBool CBifEntry::operator==(const CBifEntry& aEntry) const
       
    62 	{
       
    63 	return ((iModified == aEntry.iModified)
       
    64 		 && (iName->Compare(*aEntry.iName) == 0)
       
    65 		 && (iSize == aEntry.iSize));
       
    66 	}