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 void ParseResultDataL ( RPointerArray < CUpnpObject > &, const TDesC8 &)
IMPORT_C HBufC8 * XmlForCreateObjectLC (const CUpnpItem &)
Protected Member Functions
TAny * GetExtendedInterface (const TInt32 )
void OnContentL (const TDesC8 &, TInt )
void OnEndDocumentL ( TInt )
void OnEndElementL (const RTagInfo &, TInt )
void OnEndPrefixMappingL (const RString &, TInt )
void OnError ( TInt )
void OnIgnorableWhiteSpaceL (const TDesC8 &, TInt )
void OnProcessingInstructionL (const TDesC8 &, const TDesC8 &, TInt )
void OnSkippedEntityL (const RString &, TInt )
void OnStartDocumentL (const RDocumentParameters &, TInt )
void OnStartElementL (const RTagInfo &, const RAttributeArray &, TInt )
void OnStartPrefixMappingL (const RString &, const RString &, TInt )
Private Member Functions
CUPnPXMLParser ()
void ConstructL ()
void ResetMember ()
void SetAttributesL ( CUpnpObject &, const RAttributeArray &)
void SetAttributesL (const RAttributeArray &)
void SetValueToElementL ( 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()

void ConstructL ( ) [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 & aContainer container to convert

GetExtendedInterface(const TInt32)

TAny * GetExtendedInterface ( const TInt32 aUid ) [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 & aItem item to convert

NewL()

IMPORT_C CUPnPXMLParser * NewL ( ) [static]

2-phased constructor.

NewLC()

IMPORT_C CUPnPXMLParser * NewLC ( ) [static]

2-phased constructor.

OnContentL(const TDesC8 &, TInt)

void OnContentL ( const TDesC8 & aBytes,
TInt aErrorCode
) [protected]

From MContentHandler.

Parameters

const TDesC8 & aBytes
TInt aErrorCode

OnEndDocumentL(TInt)

void OnEndDocumentL ( TInt aErrorCode ) [protected]

From MContentHandler.

Parameters

TInt aErrorCode

OnEndElementL(const RTagInfo &, TInt)

void OnEndElementL ( const RTagInfo & aElement,
TInt aErrorCode
) [protected]

From MContentHandler.

Parameters

const RTagInfo & aElement
TInt aErrorCode

OnEndPrefixMappingL(const RString &, TInt)

void OnEndPrefixMappingL ( const RString & aPrefix,
TInt aErrorCode
) [protected]

From MContentHandler.

Parameters

const RString & aPrefix
TInt aErrorCode

OnError(TInt)

void OnError ( TInt aErrorCode ) [protected]

From MContentHandler.

Parameters

TInt aErrorCode

OnIgnorableWhiteSpaceL(const TDesC8 &, TInt)

void OnIgnorableWhiteSpaceL ( const TDesC8 & aBytes,
TInt aErrorCode
) [protected]

From MContentHandler.

Parameters

const TDesC8 & aBytes
TInt aErrorCode

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

void OnProcessingInstructionL ( const TDesC8 & aTarget,
const TDesC8 & aData,
TInt aErrorCode
) [protected]

From MContentHandler.

Parameters

const TDesC8 & aTarget
const TDesC8 & aData
TInt aErrorCode

OnSkippedEntityL(const RString &, TInt)

void OnSkippedEntityL ( const RString & aName,
TInt aErrorCode
) [protected]

From MContentHandler.

Parameters

const RString & aName
TInt aErrorCode

OnStartDocumentL(const RDocumentParameters &, TInt)

void OnStartDocumentL ( const RDocumentParameters & aDocParam,
TInt aErrorCode
) [protected]

From MContentHandler.

Parameters

const RDocumentParameters & aDocParam
TInt aErrorCode

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

void OnStartElementL ( const RTagInfo & aElement,
const RAttributeArray & aAttributes,
TInt aErrorCode
) [protected]

From MContentHandler.

Parameters

const RTagInfo & aElement
const RAttributeArray & aAttributes
TInt aErrorCode

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

void OnStartPrefixMappingL ( const RString & aPrefix,
const RString & aUri,
TInt aErrorCode
) [protected]

From MContentHandler.

Parameters

const RString & aPrefix
const RString & aUri
TInt aErrorCode

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

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

Parses xml data to the array of objects.

Parameters

RPointerArray < CUpnpObject > & aResultArray
const TDesC8 & aData

ResetMember()

void ResetMember ( ) [private]

Reset member for parse again.

SetAttributesL(CUpnpObject &, const RAttributeArray &)

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

Sets element's attributes to the object.

Parameters

CUpnpObject & aObject attributes will be set to this object
const RAttributeArray & aAttributes attributes to set

SetAttributesL(const RAttributeArray &)

void SetAttributesL ( const RAttributeArray & aAttributes ) [private]

Sets element's attributes to the element

Parameters

const RAttributeArray & aAttributes attributes to set

SetValueToElementL(CUpnpObject &, const TDesC8 &)

void SetValueToElementL ( 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 & aValue element 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 & aItem item 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]