servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/rootdeviceparser.h
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // rootinfoparser.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __ROOTINFOPARSER_H__
       
    19 #define __ROOTINFOPARSER_H__
       
    20 
       
    21 #include <xml/parser.h>
       
    22 #include "parsehandlerbase.h"
       
    23 #include "cpnpdeviceparam.h"
       
    24 /* CRootDeviceParser parses the root device information. It calls suitable parsers where necessary
       
    25  to parse child elements
       
    26  */
       
    27 class CRootDeviceParser : public CParseHandlerBase
       
    28 	{
       
    29 public:
       
    30 	static CRootDeviceParser* NewL(CUPnPDeviceDescription *aDeviceParser, const RStringPool& aStringPool);
       
    31 	virtual ~CRootDeviceParser();
       
    32 
       
    33 	void StartParseL(const TDesC8& aFragment);
       
    34 	virtual void ParseStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes);
       
    35 	virtual void ParseEndElementL(const RTagInfo& aElement);
       
    36 	virtual void ParseContentL(const TDesC8& aBytes);
       
    37 	
       
    38 private:
       
    39 	void ConstructL();
       
    40 	CRootDeviceParser(CUPnPDeviceDescription *aDeviceParser, const RStringPool& aStringPool);
       
    41 	enum
       
    42 		{
       
    43 		ERoot = 	0x0001,
       
    44 		EUrlBase=	0x0002
       
    45 		};
       
    46 
       
    47 private:
       
    48 	CUPnPDeviceDescription *iDeviceDescpn;
       
    49 	const RStringPool &iStringPool;
       
    50 	CParser* iXmlParser;
       
    51 	TUint iFlags;
       
    52 	};
       
    53 
       
    54 #endif//__ROOTINFOPARSER_H__