|
1 /* |
|
2 * Copyright (c) 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 "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 __CDNSMESSAGE_H__ |
|
20 #define __CDNSMESSAGE_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <mdns/cdnsquestion.h> |
|
24 #include <mdns/crdtypeptr.h> |
|
25 #include <mdns/crdtypea.h> |
|
26 #include <mdns/crdtypesrv.h> |
|
27 #include <mdns/crdtypetxt.h> |
|
28 #include <mdns/tdnsheader.h> |
|
29 |
|
30 |
|
31 //This class represents the complete dns message |
|
32 class CDnsMessage : public CBase |
|
33 { |
|
34 public: |
|
35 ~CDnsMessage(); |
|
36 IMPORT_C static CDnsMessage* NewL(TUint16 aId, TBool aQuery); |
|
37 IMPORT_C void AppendQueryL(const CDnsQuestion* aQuery ); |
|
38 IMPORT_C void AppendAnswerL( const CDnsResourceData* aAnswer ); |
|
39 IMPORT_C void AppendAuthorityL( const CDnsResourceData* aAuthority ); |
|
40 IMPORT_C void AppendAdditionalL(const CDnsResourceData* aAdditional ); |
|
41 IMPORT_C void SetHeader(const TDnsHeader& aHeader); |
|
42 IMPORT_C const RPointerArray<CDnsQuestion>& Queries()const; |
|
43 IMPORT_C const RPointerArray<CDnsResourceData>& Answers()const; |
|
44 IMPORT_C const RPointerArray<CDnsResourceData>& Authorities()const; |
|
45 IMPORT_C const RPointerArray<CDnsResourceData>& Additional()const; |
|
46 IMPORT_C const TDnsHeader& Header()const; |
|
47 IMPORT_C TUint16 Size()const; |
|
48 |
|
49 private : |
|
50 CDnsMessage(TUint16 aId, TBool aQuery); |
|
51 |
|
52 private: |
|
53 TDnsHeader iHeader; |
|
54 RPointerArray<CDnsQuestion> iQueries; |
|
55 RPointerArray<CDnsResourceData> iAnswers; |
|
56 RPointerArray<CDnsResourceData> iAuthorities; |
|
57 RPointerArray<CDnsResourceData> iAdditional; |
|
58 }; |
|
59 |
|
60 #endif //__CDNSMESSAGE_H__ |