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