equal
deleted
inserted
replaced
|
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 |
|
20 #ifndef __CDNSMSGBUF_H__ |
|
21 #define __CDNSMSGBUF_H__ |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <es_sock.h> |
|
25 #include <in_sock.h> |
|
26 |
|
27 #include "tdnsheader.h" |
|
28 #include "cstringparser.h" |
|
29 |
|
30 |
|
31 //CDnsMsgBuf class composes a raw buffer from the supplied inputs |
|
32 class CDnsMsgBuf : public CBase |
|
33 { |
|
34 public: |
|
35 ~CDnsMsgBuf(); |
|
36 static CDnsMsgBuf* NewL(const TDesC8& aBuf); |
|
37 void SetChar(TUint8 aVal); |
|
38 void SetInt16(TUint16 aVal); |
|
39 void SetInt32(TUint32 aVal); |
|
40 void SetDomainNameL(const TDesC8& aName); |
|
41 void SetText(const TDesC8& aTxt); |
|
42 void SetPtrRdLengthL(const TDesC8& aName); |
|
43 void SetSrvRdLengthL(const TDesC8& aName); |
|
44 void SetTxtRdLength(const RArray<RBuf8>& aTxtList); |
|
45 |
|
46 private: |
|
47 void ConstructL(const TDesC8& aBuf); |
|
48 CDnsMsgBuf(const TDesC8& aBuf); |
|
49 TUint16 GetDomainLengthL(const TDesC8& aName)const; |
|
50 |
|
51 private: |
|
52 TUint8* iPtr; |
|
53 TUint iIndex; |
|
54 TUint iDataLength; |
|
55 }; |
|
56 |
|
57 #endif //__CDNSMSGBUF_H__ |