homescreensrv_plat/sapi_contentpublishing/src/cpclientiterable.cpp
changeset 93 82b66994846c
parent 92 782e3408c2ab
child 94 dbb8300717f7
--- a/homescreensrv_plat/sapi_contentpublishing/src/cpclientiterable.cpp	Fri Apr 16 14:45:49 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2007 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:  
- *
-*/
-
-#include <s32mem.h>
-
-#include "cpclientiterable.h"
-#include "cpglobals.h"
-#include "cpdebug.h"
-
-using namespace LIW;
-
-// ---------------------------------------------------------------------------
-// Two-Phase constructor
-// ---------------------------------------------------------------------------
-//
-CCPClientIterable* CCPClientIterable::NewL( CLiwGenericParamList* aList )
-    {
-    return new(ELeave) CCPClientIterable( aList );
-    }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CCPClientIterable::CCPClientIterable( CLiwGenericParamList* aList ) :
-    iList(aList)
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CCPClientIterable::~CCPClientIterable()
-    {
-    delete iList;
-    }
-
-// ---------------------------------------------------------------------------
-// Reset the list
-// ---------------------------------------------------------------------------
-//
-void CCPClientIterable::Reset()
-    {
-    iPos = 0;
-    }
-
-// ---------------------------------------------------------------------------
-// Gets next element in list
-// ---------------------------------------------------------------------------
-//
-TBool CCPClientIterable::NextL( TLiwVariant& aNext )
-    {
-    CP_DEBUG( _L8("CCPClientIterable::NextL()") );
-    TBool retValue = EFalse;
-    const TLiwGenericParam* param= NULL;
-    param = iList->FindFirst( iPos, KListMap, EVariantTypeMap );
-
-    if ( param && iPos !=KErrNotFound )
-        {
-        CLiwDefaultMap* map = CLiwDefaultMap::NewLC( );
-        //get map
-        if ( param->Value().Get( *map ) )
-            {
-            ExctractBinariesL( *map );
-            aNext.SetL( map );
-            retValue = ETrue;
-            }
-        CleanupStack::PopAndDestroy( map );
-        iPos++;
-        }
-    return retValue;
-    }
-
-// ---------------------------------------------------------------------------
-// 
-// ---------------------------------------------------------------------------
-//
-void CCPClientIterable::ExctractBinariesL( CLiwDefaultMap& aMap )
-    {
-    CP_DEBUG( _L8("CCPClientIterable::ExctractBinariesL()") );
-    TLiwVariant buffer;
-    buffer.PushL( );
-    if ( aMap.FindL( KDataMap, buffer ) )
-        {
-        TPtrC8 packedData( KNullDesC8 );
-        if ( buffer.Get( packedData ) )
-            {
-            RDesReadStream str(packedData);
-            CleanupClosePushL( str );
-            CLiwDefaultMap* datamap = CLiwDefaultMap::NewLC( str );
-            aMap.Remove( KDataMap );
-            aMap.InsertL( KDataMap, datamap );
-            CleanupStack::PopAndDestroy( datamap );
-            CleanupStack::PopAndDestroy( &str );
-            }
-        }
-    if ( aMap.FindL( KActionMap, buffer ) )
-        {
-        TPtrC8 packedAction( KNullDesC8 );
-        if ( buffer.Get( packedAction ) )
-            {
-            RDesReadStream str(packedAction);
-            CleanupClosePushL( str );
-            CLiwDefaultMap* actionmap = CLiwDefaultMap::NewLC( str );
-            aMap.Remove( KActionMap );
-            aMap.InsertL( KActionMap, actionmap );
-            CleanupStack::PopAndDestroy( actionmap );
-            CleanupStack::PopAndDestroy( &str );
-            }
-        }
-    CleanupStack::PopAndDestroy( &buffer );
-    }