diff -r 000000000000 -r 8466d47a6819 emailcontacts/contactactionservice/src/CFscFieldPropertyGroup.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailcontacts/contactactionservice/src/CFscFieldPropertyGroup.cpp Thu Dec 17 08:39:21 2009 +0200 @@ -0,0 +1,106 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implementation field property group. + * +*/ + + +#include "emailtrace.h" +#include "CFscFieldPropertyGroup.h" + +// System includes +#include + +// -------------------------------------------------------------------------- +// CFscFieldPropertyGroup::CFscFieldPropertyGroup +// -------------------------------------------------------------------------- +// +CFscFieldPropertyGroup::CFscFieldPropertyGroup() + { + FUNC_LOG; + } + +// -------------------------------------------------------------------------- +// CFscFieldPropertyGroup::~CFscFieldPropertyGroup +// -------------------------------------------------------------------------- +// +CFscFieldPropertyGroup::~CFscFieldPropertyGroup() + { + FUNC_LOG; + iProperties.Close(); + delete iLabel; + } + +// -------------------------------------------------------------------------- +// CFscFieldPropertyGroup::ConstructL +// -------------------------------------------------------------------------- +// +inline void CFscFieldPropertyGroup::ConstructL(TResourceReader& aReader) + { + FUNC_LOG; + aReader.ReadInt8(); // read version number + iGroupId = static_cast(aReader.ReadInt8() ); + iLabel = aReader.ReadHBufC16L(); + iIconId = TPbk2IconId(aReader); + iAddItemOrdering = aReader.ReadInt8(); + } + +// -------------------------------------------------------------------------- +// CFscFieldPropertyGroup::NewLC +// -------------------------------------------------------------------------- +// +CFscFieldPropertyGroup* CFscFieldPropertyGroup::NewLC( + TResourceReader& aReader) + { + FUNC_LOG; + CFscFieldPropertyGroup* self = new ( ELeave ) CFscFieldPropertyGroup; + CleanupStack::PushL(self); + self->ConstructL(aReader); + return self; + } + +// -------------------------------------------------------------------------- +// CFscFieldPropertyGroup::Count +// -------------------------------------------------------------------------- +// + TInt CFscFieldPropertyGroup::Count() const + { + FUNC_LOG; + return iProperties.Count(); + } + +// -------------------------------------------------------------------------- +// CFscFieldPropertyGroup::At +// -------------------------------------------------------------------------- +// + const MPbk2FieldProperty& CFscFieldPropertyGroup::At +( TInt aIndex ) const + { + FUNC_LOG; + return *iProperties[aIndex]; + } + +// -------------------------------------------------------------------------- +// CFscFieldPropertyGroup::AddFieldPropertyL +// -------------------------------------------------------------------------- +// +void CFscFieldPropertyGroup::AddFieldPropertyL( + const MPbk2FieldProperty& aProperty) + { + FUNC_LOG; + iProperties.AppendL( &aProperty); + } + +// End of File +