/*
* Copyright (c) 2009 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 "crdtypea.h"


CRdTypeA::CRdTypeA():CDnsResourceData()       
	{
	}

EXPORT_C CRdTypeA* CRdTypeA::NewL()
	{
	return (new(ELeave)CRdTypeA());
	}

EXPORT_C CRdTypeA::~CRdTypeA()
	{	
	}

EXPORT_C const TInetAddr& CRdTypeA::Address()const
	{
	return iAddr;
	}

EXPORT_C void CRdTypeA::SetAddr(const TInetAddr& aAddr )
	{
	iAddr = aAddr;
	}

EXPORT_C TUint16 CRdTypeA::Size()const
	{
	TUint16 count = 0;
	count += iName.Size();
	count += 2; // 2 bytes = descriptor length+ 0 length octet at the end
	count += sizeof(iType);
	count += sizeof(iClass);
	count += sizeof(iTtl);
	count += sizeof(iRdLength);
	count += sizeof(iAddr);	
	return count;
	}
		

