|
1 /** @file |
|
2 * Copyright (c) 2007 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: Declares the CUpnpBodyOfSoapContentHandler class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __UPNPBODYOFSOAPCONTENTHANDLER_H__ |
|
21 #define __UPNPBODYOFSOAPCONTENTHANDLER_H__ |
|
22 |
|
23 #include <e32def.h> |
|
24 #include "upnppropertysetcontenthandler.h" |
|
25 |
|
26 using namespace Xml; |
|
27 |
|
28 /** |
|
29 * This class handles body subtree of soap messages |
|
30 * It extends CUpnpContentHandler class |
|
31 * It is designed to be used by upnp controler that delegates to it events from xml sax parser |
|
32 * |
|
33 */ |
|
34 NONSHARABLE_CLASS( CUpnpBodyOfSoapContentHandler ) : public CUpnpPropertysetContentHandler |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Two-phased constructor |
|
40 * @return instance of CUpnpBodyOfSoapContentHandler class |
|
41 */ |
|
42 static CUpnpBodyOfSoapContentHandler* NewL( |
|
43 CUpnpContentHandlersController& aController, |
|
44 RPointerArray<CUpnpDescriptionProperty>& aResultSetOfArguments ); |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. Leaves the object on CleanupStack |
|
48 * @return instance of CUpnpBodyOfSoapContentHandler class |
|
49 */ |
|
50 static CUpnpBodyOfSoapContentHandler* NewLC( |
|
51 CUpnpContentHandlersController& aController, |
|
52 RPointerArray<CUpnpDescriptionProperty>& aResultSetOfArguments ); |
|
53 |
|
54 /** |
|
55 * Destructor of CUpnpBodyOfSoapContentHandler class |
|
56 * |
|
57 */ |
|
58 virtual ~CUpnpBodyOfSoapContentHandler(); |
|
59 |
|
60 public: // from CUpnpContentHandler |
|
61 |
|
62 /** |
|
63 * This method is a callback to indicate an element has been parsed. |
|
64 * @param aElement is a handle to the element's details. |
|
65 * @param aAttributes contains the attributes for the element. |
|
66 */ |
|
67 virtual void OnStartElementL( const RTagInfo& aElement, |
|
68 const RAttributeArray& aAttributes ); |
|
69 |
|
70 /** |
|
71 * This method is a callback to indicate the end of the element has been reached. |
|
72 * @param aElement is a handle to the element's details. |
|
73 */ |
|
74 virtual void OnEndElementL( const RTagInfo& aElement ); |
|
75 |
|
76 /** |
|
77 * This method is a callback that sends the content of the element. |
|
78 * @param aBytes is the raw content data for the element in one chunk |
|
79 */ |
|
80 virtual void OnContentL( const TDesC8& aBytes ); |
|
81 |
|
82 /** |
|
83 * Returns value if class is interested in tags all namespaces |
|
84 * |
|
85 * @return ETrue when the class is interested in tags in all namespaces |
|
86 */ |
|
87 virtual TBool InterestedInAllNamespaces(); |
|
88 |
|
89 protected: |
|
90 |
|
91 /** |
|
92 * Default C++ constructor |
|
93 */ |
|
94 CUpnpBodyOfSoapContentHandler( CUpnpContentHandlersController& aController, |
|
95 RPointerArray<CUpnpDescriptionProperty>& aResultSetOfArguments ); |
|
96 |
|
97 /** |
|
98 * Second phase constructor |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 private: |
|
103 /** |
|
104 * Returns true if content handler is in inside argument state |
|
105 */ |
|
106 TBool InsideOfArgument(); |
|
107 |
|
108 private: |
|
109 |
|
110 TBool iIsInsideOfAction; |
|
111 |
|
112 }; |
|
113 |
|
114 #endif //__UPNPBODYOFSOAPCONTENTHANDLER_H__ |