os/security/contentmgmt/contentaccessfwfordrm/source/cafutils/mimefieldanddata.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 #ifndef REMOVE_CAF1
    20 
    21 #include <caf/caftypes.h>
    22 #include <e32base.h>
    23 #include "mimefieldanddata.h"
    24 
    25 using namespace ContentAccess;
    26 
    27 CMimeFieldAndData* CMimeFieldAndData::NewL(const TDesC8 &aFieldName, const TDesC8 &aData)
    28 	{
    29 	CMimeFieldAndData* self = new (ELeave) CMimeFieldAndData();
    30 	CleanupStack::PushL(self);
    31 	self->ConstructL(aFieldName, aData);
    32 	CleanupStack::Pop(self);
    33 	return self;
    34 	}
    35 
    36 void CMimeFieldAndData::ConstructL(const TDesC8 &aFieldName, const TDesC8 &aData)
    37 	{
    38 	iFieldName = aFieldName.AllocL();
    39 	iData = aData.AllocL();
    40 	}	
    41 
    42 CMimeFieldAndData::CMimeFieldAndData()
    43 	{
    44 	}
    45 
    46 CMimeFieldAndData::~CMimeFieldAndData()
    47 	{
    48 	delete iFieldName;
    49 	delete iData;
    50 	}
    51 
    52 TPtrC8 CMimeFieldAndData::FieldName() const
    53 	{
    54 	return *iFieldName;
    55 	}
    56 
    57 TPtrC8 CMimeFieldAndData::Data() const
    58 	{
    59 	return *iData;
    60 	}
    61 #endif // #ifndef REMOVE_CAF1