upnp/upnpstack/serviceframework/inc/upnpignorecontenthandler.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 CUpnpIgnoreContentHandler class
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __UPNPIGNORECONTENTHANDLER_H__
       
    20 #define __UPNPIGNORECONTENTHANDLER_H__
       
    21 
       
    22 #include "upnpcontenthandler.h"
       
    23 
       
    24 class CUpnpContentHandlersController;
       
    25 
       
    26 /**
       
    27  *  Dummy implementation of MContentHandler (by derivation from CUpnpContentHandler) - ignore all subtree.
       
    28  * After correct use of it (correct methods calls series) it's ready to be reused again.
       
    29  * It is designed to be used by upnp controler that delegates to it events from xml sax parser
       
    30  *
       
    31  */
       
    32 
       
    33 NONSHARABLE_CLASS(CUpnpIgnoreContentHandler) : public CUpnpContentHandler
       
    34     {
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Two-phased constructor
       
    39      * @since Series60 3.2 
       
    40      * @return instance of CUpnpOldServiceContentHandler class
       
    41      */
       
    42     static CUpnpIgnoreContentHandler* NewL( 
       
    43         CUpnpContentHandlersController& aController );
       
    44 
       
    45     /**
       
    46      * Two-phased constructor. Leaves the object on CleanupStack
       
    47      * @since Series60 3.2 
       
    48      * @return instance of CUpnpOldServiceContentHandler class
       
    49      */
       
    50     static CUpnpIgnoreContentHandler* NewLC( 
       
    51         CUpnpContentHandlersController& aController );
       
    52 
       
    53 public: // from MContentHandler
       
    54 
       
    55     /**
       
    56      * This method is a callback to indicate an element has been parsed.
       
    57      * @param				aElement is a handle to the element's details.
       
    58      * @param				aAttributes contains the attributes for the element.
       
    59      */
       
    60     virtual void OnStartElementL( const RTagInfo& aElement, 
       
    61         const RAttributeArray& aAttributes );
       
    62 
       
    63     /**
       
    64      This method is a callback to indicate the end of the element has been reached.
       
    65      @param              aElement is a handle to the element's details.
       
    66      */
       
    67     virtual void OnEndElementL( const RTagInfo& aElement );
       
    68 
       
    69     /**
       
    70      This method is a callback that sends the content of the element.
       
    71      @param              aBytes is the raw content data for the element in one chunk
       
    72      */
       
    73     virtual void OnContentL( const TDesC8& aBytes );
       
    74 
       
    75 private:
       
    76 
       
    77     /**
       
    78      * Default C++ constructor 
       
    79      * @since Series60 3.2     
       
    80      */
       
    81     CUpnpIgnoreContentHandler( CUpnpContentHandlersController& aController );
       
    82 
       
    83 private:
       
    84     TUint iOpenedTagCounter;
       
    85 
       
    86     };
       
    87 
       
    88 #endif //__UPNPIGNORECONTENTHANDLER_H__