|
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 CUpnpActionContentHandler class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __UPNPACTIONCONTENTHANDLER_H__ |
|
20 #define __UPNPACTIONCONTENTHANDLER_H__ |
|
21 |
|
22 #include <babitflags.h> |
|
23 #include "upnpcontenthandler.h" |
|
24 |
|
25 class CUpnpAction; |
|
26 |
|
27 using namespace Xml; |
|
28 |
|
29 /** |
|
30 * This class handles action subtree of service descriptions |
|
31 * It extends CUpnpContentHandler class, thus it is subsequent implementation of MContentHandler interface |
|
32 * It is designed to be used by upnp controler that delegates to it events from xml sax parser |
|
33 * |
|
34 * @since Series60 2.6 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CUpnpActionContentHandler ) : public CUpnpContentHandler |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Two-phased constructor |
|
42 * @since Series60 3.2 |
|
43 * @return instance of CUpnpActionContentHandler class |
|
44 */ |
|
45 static CUpnpActionContentHandler* NewL( |
|
46 CUpnpContentHandlersController& aController, |
|
47 CUpnpAction& aResultAction ); |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. Leaves the object on CleanupStack |
|
51 * @since Series60 3.2 |
|
52 * @return instance of CUpnpActionContentHandler class |
|
53 */ |
|
54 static CUpnpActionContentHandler* NewLC( |
|
55 CUpnpContentHandlersController& aController, |
|
56 CUpnpAction& aResultAction ); |
|
57 |
|
58 /** |
|
59 * Destructor of CUpnpActionContentHandler class |
|
60 * @since Series60 3.2 |
|
61 */ |
|
62 virtual ~CUpnpActionContentHandler(); |
|
63 |
|
64 public: // from MContentHandler |
|
65 |
|
66 /** |
|
67 * This method is a callback to indicate an element has been parsed. |
|
68 * @param aElement is a handle to the element's details. |
|
69 * @param aAttributes contains the attributes for the element. |
|
70 */ |
|
71 virtual void OnStartElementL( const RTagInfo& aElement, |
|
72 const RAttributeArray& aAttributes ); |
|
73 |
|
74 /** |
|
75 * This method is a callback to indicate the end of the element has been reached. |
|
76 * @param aElement is a handle to the element's details. |
|
77 */ |
|
78 virtual void OnEndElementL( const RTagInfo& aElement ); |
|
79 |
|
80 /** |
|
81 * This method is a callback that sends the content of the element. |
|
82 * @param aBytes is the raw content data for the element in one chunk |
|
83 */ |
|
84 virtual void OnContentL( const TDesC8& aBytes ); |
|
85 |
|
86 protected: |
|
87 |
|
88 /** |
|
89 * Default C++ constructor |
|
90 * @since Series60 3.2 |
|
91 */ |
|
92 CUpnpActionContentHandler( CUpnpContentHandlersController& aController, |
|
93 CUpnpAction& aResultAction ); |
|
94 |
|
95 /** |
|
96 * 2nd phase constructor |
|
97 * @since Series60 3.2 |
|
98 */ |
|
99 void ConstructL(); |
|
100 |
|
101 private: |
|
102 CUpnpAction& iResultAction; |
|
103 TBitFlags8 iFoundTags; |
|
104 }; |
|
105 |
|
106 #endif //__UPNPACTIONCONTENTHANDLER_H__ |