|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 #ifndef __ROOTSERVICEPARSER_H_ |
|
18 #define __ROOTSERVICEPARSER_H_ |
|
19 #include <xml/parser.h> |
|
20 #include "parsehandlerbase.h" |
|
21 #include "cpnpserviceparam.h" |
|
22 |
|
23 /* CRootServiceParser parses the root device information. It calls suitable parsers where necessary |
|
24 to parse child elements |
|
25 */ |
|
26 class CRootServiceParser : public CParseHandlerBase |
|
27 { |
|
28 public: |
|
29 static CRootServiceParser* NewL(CUPnPServiceDescription *aServiceParser, const RStringPool& aStringPool); |
|
30 virtual ~CRootServiceParser(); |
|
31 |
|
32 void StartParseL(const TDesC8& aFragment); |
|
33 virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes); |
|
34 virtual void ParseEndElementL(const RTagInfo& aElement); |
|
35 virtual void ParseContentL(const TDesC8& aBytes); |
|
36 |
|
37 private: |
|
38 void ConstructL(); |
|
39 CRootServiceParser(CUPnPServiceDescription* aServiceParser, const RStringPool& aStringPool); |
|
40 enum |
|
41 { |
|
42 EScpd = 0x01, |
|
43 EActionList = 0x02, |
|
44 EServiceStateTable = 0x04, |
|
45 EAllChild = 0x08 |
|
46 }; |
|
47 |
|
48 private: |
|
49 CUPnPServiceDescription* iServiceDesc; |
|
50 const RStringPool& iStringPool; |
|
51 CParser* iXmlParser; |
|
52 TUint iFlags; |
|
53 }; |
|
54 |
|
55 #endif /*ROOTSERVICEPARSER_H_*/ |