diff -r 78fbd574edf4 -r da856f45b798 zeroconf/dnsparser/inc/cdnsmessage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zeroconf/dnsparser/inc/cdnsmessage.h Thu Jun 24 19:09:47 2010 +0530 @@ -0,0 +1,60 @@ +/* +* 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: +* +*/ + + +#ifndef __CDNSMESSAGE_H__ +#define __CDNSMESSAGE_H__ + +#include +#include +#include +#include +#include +#include +#include + + +//This class represents the complete dns message +class CDnsMessage : public CBase + { +public: + ~CDnsMessage(); + IMPORT_C static CDnsMessage* NewL(TUint16 aId, TBool aQuery); + IMPORT_C void AppendQueryL(const CDnsQuestion* aQuery ); + IMPORT_C void AppendAnswerL( const CDnsResourceData* aAnswer ); + IMPORT_C void AppendAuthorityL( const CDnsResourceData* aAuthority ); + IMPORT_C void AppendAdditionalL(const CDnsResourceData* aAdditional ); + IMPORT_C void SetHeader(const TDnsHeader& aHeader); + IMPORT_C const RPointerArray& Queries()const; + IMPORT_C const RPointerArray& Answers()const; + IMPORT_C const RPointerArray& Authorities()const; + IMPORT_C const RPointerArray& Additional()const; + IMPORT_C const TDnsHeader& Header()const; + IMPORT_C TUint16 Size()const; + +private : + CDnsMessage(TUint16 aId, TBool aQuery); + +private: + TDnsHeader iHeader; + RPointerArray iQueries; + RPointerArray iAnswers; + RPointerArray iAuthorities; + RPointerArray iAdditional; + }; + +#endif //__CDNSMESSAGE_H__ \ No newline at end of file