--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/zeroconf/dnsparser/src/cdnsquestion.cpp Thu Jun 24 19:09:47 2010 +0530
@@ -0,0 +1,57 @@
+/*
+* 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;
+ }