|
14
|
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 __CDNSMESSAGECOMPOSERPARSER_H__
|
|
|
20 |
#define __CDNSMESSAGECOMPOSERPARSER_H__
|
|
|
21 |
|
|
|
22 |
#include <e32base.h>
|
|
|
23 |
#include <comms-infras/commsdebugutility.h>
|
|
|
24 |
#include <es_sock.H>
|
|
|
25 |
#include <mdns/cdnsmessage.h>
|
|
|
26 |
#include <mdns/cdnsquestion.h>
|
|
|
27 |
#include <mdns/crdtypeptr.h>
|
|
|
28 |
#include <mdns/crdtypea.h>
|
|
|
29 |
#include <mdns/crdtypesrv.h>
|
|
|
30 |
#include <mdns/crdtypetxt.h>
|
|
|
31 |
#include <mdns/dnsconstants.h>
|
|
|
32 |
|
|
|
33 |
class CDnsPacket;
|
|
|
34 |
class CDnsMsgBuf;
|
|
|
35 |
|
|
|
36 |
//Main class which mDNS Responder will be making use to evoke compose and parse operations
|
|
|
37 |
class CDnsMessageComposerParser: public CBase
|
|
|
38 |
{
|
|
|
39 |
public:
|
|
|
40 |
IMPORT_C static CDnsMessageComposerParser* NewL();
|
|
|
41 |
IMPORT_C void CreateMessageL(RBuf8& aMessageBuffer, const CDnsMessage& aMessage );
|
|
|
42 |
IMPORT_C CDnsMessage* ParseMessageL(const TDesC8& aBuffer);
|
|
|
43 |
~CDnsMessageComposerParser();
|
|
|
44 |
void ConstructL();
|
|
|
45 |
|
|
|
46 |
private:
|
|
|
47 |
CDnsMessageComposerParser();
|
|
|
48 |
CDnsResourceData* GetResourceRecordsL();
|
|
|
49 |
void AppendResourceRecordsL( CDnsResourceData* aResourceRecord );
|
|
|
50 |
TUint16 GetLength( const CDnsMessage& aMessage )const;
|
|
|
51 |
|
|
|
52 |
private:
|
|
|
53 |
RBuf8 iBuf;
|
|
|
54 |
CDnsPacket* iPacket;
|
|
|
55 |
CDnsMsgBuf* iMsgBuf;
|
|
|
56 |
__FLOG_DECLARATION_MEMBER;
|
|
|
57 |
};
|
|
|
58 |
|
|
|
59 |
#endif //__CDNSMESSAGECOMPOSERPARSER_H__ |