|
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 #ifndef __CSTATETABLEPARSER_H_ |
|
17 #define __CSTATETABLEPARSER_H_ |
|
18 |
|
19 #include <xml/parser.h> |
|
20 #include "parsehandlerbase.h" |
|
21 #include "cpnpserviceparam.h" |
|
22 |
|
23 // Parser for the state table |
|
24 class CStateTableParser : public CParseHandlerBase |
|
25 { |
|
26 public: |
|
27 static CStateTableParser* NewL(CUPnPStateVariable *aStateTable, const RStringPool &aStringPool); |
|
28 virtual ~CStateTableParser(); |
|
29 virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes); |
|
30 virtual void ParseEndElementL(const RTagInfo& aElement); |
|
31 virtual void ParseContentL(const TDesC8& aBytes); |
|
32 |
|
33 private: |
|
34 CStateTableParser(CUPnPStateVariable *aStateTable, const RStringPool &aStringPool); |
|
35 enum |
|
36 { |
|
37 EAllowedValue = 0x01, |
|
38 }; |
|
39 private: |
|
40 CUPnPStateVariable* iStateTable; |
|
41 CUPnPArgValueList* iArgValueList; |
|
42 const RStringPool& iStringPool; |
|
43 CParser* iXmlParser; |
|
44 TUint iFlags; |
|
45 }; |
|
46 |
|
47 //-------------------------------------------------------------------------- |
|
48 // Parser for the value range object |
|
49 class CValueRangeParser : public CParseHandlerBase |
|
50 { |
|
51 public: |
|
52 static CValueRangeParser* NewL(CUPnPValueRange *aValueRange, const RStringPool &aStringPool); |
|
53 virtual ~CValueRangeParser(); |
|
54 virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes); |
|
55 virtual void ParseEndElementL(const RTagInfo& aElement); |
|
56 virtual void ParseContentL(const TDesC8& aBytes); |
|
57 |
|
58 private: |
|
59 CValueRangeParser(CUPnPValueRange *aValueRange, const RStringPool &aStringPool); |
|
60 enum |
|
61 { |
|
62 EAllowedValueRange = 0x01, |
|
63 EMinimumValue = 0x02, |
|
64 EMaximumValue = 0x04, |
|
65 EStepValue = 0x08, |
|
66 EAllChild = 0x0E |
|
67 }; |
|
68 private: |
|
69 CUPnPValueRange* iValueRange; |
|
70 const RStringPool& iStringPool; |
|
71 CParser* iXmlParser; |
|
72 TUint iFlags; |
|
73 }; |
|
74 |
|
75 #endif /*CSTATETABLEPARSER_H_*/ |