/*
* 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 "CDnsQuestion.h"


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

CDnsQuestion::CDnsQuestion():CDnsSection()
	{
	
	}

EXPORT_C CDnsQuestion::~CDnsQuestion()
	{	
	}

EXPORT_C TBool CDnsQuestion::IsUnicast()const
	{
	if(iClass & KQueryBit)
		return ETrue;
	else
		return EFalse;
	}

EXPORT_C void CDnsQuestion::SetUnicast(TBool )
	{
	iClass |= KQueryBit;
	}

EXPORT_C TUint16 CDnsQuestion::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);
	return count;
	}
