CUPnPXMLParser Class Reference

class CUPnPXMLParser : public CBase

XML SAX Parser for UPnP.

Since
s60 3.1 upnpxmlparser.lib

Inherits from

Public Member Functions
~CUPnPXMLParser()
IMPORT_C HBufC8 *ContainerToXmlLC(const CUpnpContainer &)
IMPORT_C HBufC8 *ItemAsXmlLC(const CUpnpItem &)
IMPORT_C CUPnPXMLParser *NewL()
IMPORT_C CUPnPXMLParser *NewLC()
IMPORT_C voidParseResultDataL(RPointerArray< CUpnpObject > &, const TDesC8 &)
IMPORT_C HBufC8 *XmlForCreateObjectLC(const CUpnpItem &)
Protected Member Functions
TAny *GetExtendedInterface(const TInt32)
voidOnContentL(const TDesC8 &, TInt)
voidOnEndDocumentL(TInt)
voidOnEndElementL(const RTagInfo &, TInt)
voidOnEndPrefixMappingL(const RString &, TInt)
voidOnError(TInt)
voidOnIgnorableWhiteSpaceL(const TDesC8 &, TInt)
voidOnProcessingInstructionL(const TDesC8 &, const TDesC8 &, TInt)
voidOnSkippedEntityL(const RString &, TInt)
voidOnStartDocumentL(const RDocumentParameters &, TInt)
voidOnStartElementL(const RTagInfo &, const RAttributeArray &, TInt)
voidOnStartPrefixMappingL(const RString &, const RString &, TInt)
Private Member Functions
CUPnPXMLParser()
voidConstructL()
voidResetMember()
voidSetAttributesL(CUpnpObject &, const RAttributeArray &)
voidSetAttributesL(const RAttributeArray &)
voidSetValueToElementL(CUpnpObject &, const TDesC8 &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
HBufC8 *iElementValue
CUpnpElement *iNewElement
TBool iObjectClass
RPointerArray< CUpnpObject > *iResultRoot
CUPnPObjectStack *iStack
TBool iTitle

Constructor & Destructor Documentation

CUPnPXMLParser()

CUPnPXMLParser()[private]

Constructor.

~CUPnPXMLParser()

~CUPnPXMLParser()[virtual]

Destructor.

Member Functions Documentation

ConstructL()

voidConstructL()[private]

2nd phase constructor.

ContainerToXmlLC(const CUpnpContainer &)

IMPORT_C HBufC8 *ContainerToXmlLC(const CUpnpContainer &aContainer)[static]

Creates an xml document from a given item container

Parameters

const CUpnpContainer & aContainercontainer to convert

GetExtendedInterface(const TInt32)

TAny *GetExtendedInterface(const TInt32aUid)[protected]

From MContentHandler.

Parameters

const TInt32 aUid

ItemAsXmlLC(const CUpnpItem &)

IMPORT_C HBufC8 *ItemAsXmlLC(const CUpnpItem &aItem)[static]

Creates an xml document from a given item

Parameters

const CUpnpItem & aItemitem to convert

NewL()

IMPORT_C CUPnPXMLParser *NewL()[static]

2-phased constructor.

NewLC()

IMPORT_C CUPnPXMLParser *NewLC()[static]

2-phased constructor.

OnContentL(const TDesC8 &, TInt)

voidOnContentL(const TDesC8 &aBytes,
TIntaErrorCode
)[protected]

From MContentHandler.

Parameters

const TDesC8 & aBytes
TInt aErrorCode

OnEndDocumentL(TInt)

voidOnEndDocumentL(TIntaErrorCode)[protected]

From MContentHandler.

Parameters

TInt aErrorCode

OnEndElementL(const RTagInfo &, TInt)

voidOnEndElementL(const RTagInfo &aElement,
TIntaErrorCode
)[protected]

From MContentHandler.

Parameters

const RTagInfo & aElement
TInt aErrorCode

OnEndPrefixMappingL(const RString &, TInt)

voidOnEndPrefixMappingL(const RString &aPrefix,
TIntaErrorCode
)[protected]

From MContentHandler.

Parameters

const RString & aPrefix
TInt aErrorCode

OnError(TInt)

voidOnError(TIntaErrorCode)[protected]

From MContentHandler.

Parameters

TInt aErrorCode

OnIgnorableWhiteSpaceL(const TDesC8 &, TInt)

voidOnIgnorableWhiteSpaceL(const TDesC8 &aBytes,
TIntaErrorCode
)[protected]

From MContentHandler.

Parameters

const TDesC8 & aBytes
TInt aErrorCode

OnProcessingInstructionL(const TDesC8 &, const TDesC8 &, TInt)

voidOnProcessingInstructionL(const TDesC8 &aTarget,
const TDesC8 &aData,
TIntaErrorCode
)[protected]

From MContentHandler.

Parameters

const TDesC8 & aTarget
const TDesC8 & aData
TInt aErrorCode

OnSkippedEntityL(const RString &, TInt)

voidOnSkippedEntityL(const RString &aName,
TIntaErrorCode
)[protected]

From MContentHandler.

Parameters

const RString & aName
TInt aErrorCode

OnStartDocumentL(const RDocumentParameters &, TInt)

voidOnStartDocumentL(const RDocumentParameters &aDocParam,
TIntaErrorCode
)[protected]

From MContentHandler.

Parameters

const RDocumentParameters & aDocParam
TInt aErrorCode

OnStartElementL(const RTagInfo &, const RAttributeArray &, TInt)

voidOnStartElementL(const RTagInfo &aElement,
const RAttributeArray &aAttributes,
TIntaErrorCode
)[protected]

From MContentHandler.

Parameters

const RTagInfo & aElement
const RAttributeArray & aAttributes
TInt aErrorCode

OnStartPrefixMappingL(const RString &, const RString &, TInt)

voidOnStartPrefixMappingL(const RString &aPrefix,
const RString &aUri,
TIntaErrorCode
)[protected]

From MContentHandler.

Parameters

const RString & aPrefix
const RString & aUri
TInt aErrorCode

ParseResultDataL(RPointerArray< CUpnpObject > &, const TDesC8 &)

IMPORT_C voidParseResultDataL(RPointerArray< CUpnpObject > &aResultArray,
const TDesC8 &aData
)

Parses xml data to the array of objects.

Parameters

RPointerArray< CUpnpObject > & aResultArray
const TDesC8 & aData

ResetMember()

voidResetMember()[private]

Reset member for parse again.

SetAttributesL(CUpnpObject &, const RAttributeArray &)

voidSetAttributesL(CUpnpObject &aObject,
const RAttributeArray &aAttributes
)[private]

Sets element's attributes to the object.

Parameters

CUpnpObject & aObjectattributes will be set to this object
const RAttributeArray & aAttributesattributes to set

SetAttributesL(const RAttributeArray &)

voidSetAttributesL(const RAttributeArray &aAttributes)[private]

Sets element's attributes to the element

Parameters

const RAttributeArray & aAttributesattributes to set

SetValueToElementL(CUpnpObject &, const TDesC8 &)

voidSetValueToElementL(CUpnpObject &aItem,
const TDesC8 &aValue
)[private]

Set value to a element

Since
Series 60 3.1

Parameters

CUpnpObject & aItem(CUpnpObject&) a item which owns the element
const TDesC8 & aValueelement value

XmlForCreateObjectLC(const CUpnpItem &)

IMPORT_C HBufC8 *XmlForCreateObjectLC(const CUpnpItem &aItem)[static]

Creates an xml document from a given item, for CreateObject-action.

Parameters

const CUpnpItem & aItemitem to convert

Member Data Documentation

HBufC8 * iElementValue

HBufC8 *iElementValue[private]

Element value Own.

CUpnpElement * iNewElement

CUpnpElement *iNewElement[private]

Upnp element Owned until ownership is transferred for an object

TBool iObjectClass

TBool iObjectClass[private]

RPointerArray< CUpnpObject > * iResultRoot

RPointerArray< CUpnpObject > *iResultRoot[private]

A pointer to result array from the client. Not own.

CUPnPObjectStack * iStack

CUPnPObjectStack *iStack[private]

A stack for UPnP objects. Own.

TBool iTitle

TBool iTitle[private]