applayerprotocols/httpexamples/testcpimanager/testcpimanager.cpp
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2002-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 // System Includes
       
    17 #include <http/thttphdrval.h>
       
    18 
       
    19 // User Includes
       
    20 #include "testcpimanager.h"
       
    21 
       
    22 
       
    23 
       
    24 EXPORT_C CTestCpiManager* CTestCpiManager::NewL(RStringPool aStringPool)
       
    25 	{
       
    26 	CTestCpiManager* cpiManager = new (ELeave) CTestCpiManager(aStringPool);
       
    27 	CleanupStack::PushL(cpiManager);
       
    28 	cpiManager->ConstructL();
       
    29 	CleanupStack::Pop();
       
    30 	return cpiManager;
       
    31 	}
       
    32 	
       
    33 CTestCpiManager::CTestCpiManager(RStringPool aStringPool) :
       
    34 	iStringPool(aStringPool)
       
    35 	{
       
    36 	}
       
    37 	
       
    38 void CTestCpiManager::ConstructL()
       
    39 	{
       
    40 	}	
       
    41 
       
    42 EXPORT_C CTestCpiManager::~CTestCpiManager()
       
    43 	{
       
    44 	iProfileData.ResetAndDestroy();
       
    45 	iProfileDiffData.ResetAndDestroy();
       
    46 	}
       
    47 
       
    48 EXPORT_C void CTestCpiManager::SetProfileDataL(HBufC8* aCpiData)
       
    49 	{
       
    50 	User::LeaveIfError(iProfileData.Append(aCpiData));
       
    51 	}
       
    52 	
       
    53 EXPORT_C void CTestCpiManager::SetProfileDiffDataL(HBufC8* aCpiData)
       
    54 	{
       
    55 	User::LeaveIfError(iProfileDiffData.Append(aCpiData));
       
    56 	}
       
    57 
       
    58 EXPORT_C RPointerArray<HBufC8>& CTestCpiManager::GetProfiles()
       
    59 	{
       
    60 	return iProfileData;
       
    61 	}
       
    62 	
       
    63 EXPORT_C RPointerArray<HBufC8>& CTestCpiManager::GetProfileDiffs()
       
    64 	{
       
    65 	return iProfileDiffData;
       
    66 	}
       
    67 	
       
    68