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