commsfwtools/preparedefaultcommsdatabase/src/netmetalib.cpp
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2004-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 // Cut down version of NetMeta.lib to allow Commsdat to build on the TOOLS2 platform
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file NetMetaLib.cpp
       
    20  @internalTechnology
       
    21 */
       
    22 #ifdef __TOOLS2__
       
    23 // For the TOOLS2 platform
       
    24  
       
    25 #include "netmetalib.h"
       
    26  
       
    27 using namespace Meta;
       
    28 
       
    29 
       
    30 EXPORT_C TMetaVTableIterator::TMetaVTableIterator(MMetaData const* aMetaData) :
       
    31 	iEntry(aMetaData->GetVDataTable() + 1)
       
    32 	{
       
    33 	}
       
    34 
       
    35 	
       
    36 EXPORT_C TMetaVTableIterator::~TMetaVTableIterator()
       
    37 	{
       
    38 	}
       
    39 
       
    40 	
       
    41 TBool TMetaVTableIterator::IsNextEntryPresent()
       
    42 	{
       
    43 	if (iEntry->iOffset == 0)
       
    44 		{
       
    45 		return EFalse;
       
    46 		}
       
    47 	if (iEntry->iMetaNewL == NULL)
       
    48 		{
       
    49 		typedef SVDataTableEntry* (*TMetaBaseTableNewL)();
       
    50 		iEntry = reinterpret_cast<TMetaBaseTableNewL>(iEntry->iOffset)();
       
    51 		iEntry++;
       
    52 		return IsNextEntryPresent();
       
    53 		}
       
    54 	return ETrue;
       
    55 	}
       
    56 
       
    57 	
       
    58 EXPORT_C  SVDataTableEntry const* TMetaVTableIterator::operator++(TInt /*aDummy*/)
       
    59 	{
       
    60 	if (!IsNextEntryPresent())
       
    61 	    return NULL;
       
    62 
       
    63 	SVDataTableEntry const* entry = iEntry;
       
    64 	iEntry++;
       
    65 	return entry;
       
    66 	}
       
    67 
       
    68 #endif