CSenFragmentBase Class Reference

Link against: senfragment.lib


#include <SenFragmentBase.h>

Inherited by CSenCredential2, CSenDomFragmentBase, CSenSoapEnvelope2, and CSenWsSecurityHeader2.


Detailed Description

Class implements basic functionality of an XML fragment Typically base fragment is used to parse certain part of some XML document.

The element is identified by local name (or qualified name) and namespace. All child elements between start tag and and end tag defined this fragment will become content of this BaseFragment. In other words, BaseFragment has all data inside a single element. BaseFragment will parse only namespace (xmlns) attributes from a document and rest of the attributes are to be handled by subclasses, which should overwrite SetAttributesL() method to achieve this. The CSenFragmentReader class will do the actual parsing and this class will act as content handler for XML parser SAX events.

Dll SenFragment.dll
Since:
Series60 4.0

Public Member Functions

virtual IMPORT_C  ~CSenFragmentBase ()
  Destructor.
virtual IMPORT_C void  OnStartElementL (const RTagInfo &aElement, const RAttributeArray &aAttributes, TInt aErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C void  OnEndElementL (const RTagInfo &aElement, TInt aErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C void  OnStartDocumentL (const RDocumentParameters &aDocParam, TInt aErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C void  OnEndDocumentL (TInt aErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C void  OnContentL (const TDesC8 &aBytes, TInt aErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C void  OnStartPrefixMappingL (const RString &aPrefix, const RString &aUri, TInt aErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C void  OnEndPrefixMappingL (const RString &aPrefix, TInt aErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C void  OnIgnorableWhiteSpaceL (const TDesC8 &aBytes, TInt ErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C void  OnSkippedEntityL (const RString &aName, TInt aErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C void  OnProcessingInstructionL (const TDesC8 &aTarget, const TDesC8 &aData, TInt aErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C void  OnError (TInt aErrorCode)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C TAny *  GetExtendedInterface (const TInt32 aUid)
  Callback function implementing the XML content handler interface.
virtual IMPORT_C TPtrC8  ContentL ()
  Getter for the content,which is returned as UTF-8 form XML.
virtual IMPORT_C TXmlEngNamespace  Namespace (const TDesC8 &aPrefix)
  Gets the namespace object with a given prefix.
virtual IMPORT_C void  ResetContentL ()
  Resets the content of the fragment, and resets the namespaces.
virtual IMPORT_C TPtrC8  LocalName () const
virtual IMPORT_C TPtrC8  NsUri () const
  Getter for Fragment's namespace URI.
virtual IMPORT_C TPtrC8  NsPrefix () const
  Getter for namespace prefix of this fragment.
virtual IMPORT_C TXmlEngElement  AsElementL ()
  Returns the current XML element of this fragment.
virtual IMPORT_C RSenDocument AsDocumentL ()
  Returns the current XML element of this fragment.
virtual IMPORT_C TXmlEngElement  ExtractElement ()
  Etracts the XML element from the fragment, leaving the fragment empty.
virtual IMPORT_C void  OnDelegateParsingL (CSenFragmentBase &aDelegate)
  Let the delegate MSenFragment handle the following SAX events.
virtual IMPORT_C void  OnDelegateParsingL (const RTagInfo &aElement, const RAttributeArray &aAttributes, TInt aErrorCode)
  Creates a new fragment and lets the created MSenFragment handle the following SAX events.
virtual IMPORT_C void  SetOwner (CSenFragmentBase &aFragment)
  Sets a new parent for this fragment.
virtual IMPORT_C void  OnResumeParsingFromL (const RTagInfo &aElement, TInt aErrorCode)
  Leave codes: Resumes parsing to be handled by this fragment.
IMPORT_C void  OnWriteStartElementL (const RTagInfo &aElement, const RAttributeArray &aAttributes)
  Writes the start element tag to the content stream.
IMPORT_C void  OnWriteEndElementL (const RTagInfo &aElement)
  Writes the end element tag to the content stream.
virtual IMPORT_C HBufC *  AsXmlUnicodeL ()
  Gets the fragment data as an unicode XML.
virtual IMPORT_C HBufC8 *  AsXmlL ()
  Gets the fragment data as an UTF-8 form XML.
virtual IMPORT_C void  WriteAsXMLToL (RWriteStream &aWs)
  Invokes AsElement().WriteAsXMLToL(aWs);.
virtual IMPORT_C TBool  ConsistsOfL (CSenFragmentBase &aCandidate)
  Checks if fragment matches to another fragment by its content and child elements.
IMPORT_C void  SetContentHandler (CSenFragmentBase &aContentHandler)
IMPORT_C void  SetDocument (RSenDocument &aDocument)
  Sets the RSenDocument.

Static Public Member Functions

static IMPORT_C CSenFragmentBase NewL (const TXmlEngElement &aElement)
  Standard 2 phase constructor.
static IMPORT_C CSenFragmentBase NewL (const TDesC8 &aLocalName)
  Standard 2 phase constructor.
static IMPORT_C CSenFragmentBase NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName)
  Standard 2 phase constructor.
static IMPORT_C CSenFragmentBase NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix)
  Standard 2 phase constructor.
static IMPORT_C CSenFragmentBase NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &apAttrs)
  Standard 2 phase constructor.
static IMPORT_C CSenFragmentBase NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &apAttrs, TXmlEngElement &aParent)
  Standard 2 phase constructor.
static IMPORT_C CSenFragmentBase NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &apAttrs, TXmlEngElement &aParent, RSenDocument &aOwnerDocument)
  Standard 2 phase constructor.
static IMPORT_C CSenFragmentBase NewL (TXmlEngElement &aRootElement, RSenDocument &aOwnerDocument)
  Standard 2 phase constructor.

Protected Member Functions

IMPORT_C  CSenFragmentBase ()
  C++ default constructor.
IMPORT_C void  BaseConstructL (const TXmlEngElement &aSrc)
  BaseConstructL, where an element is given as initializer.
IMPORT_C void  BaseConstructL (const TDesC8 &aLocalName)
  BaseConstructL setting XML localname for this fragment.
IMPORT_C void  BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName)
  BaseConstructL offering possibility to set XML namespace and localname.
IMPORT_C void  BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix)
  Base constructor.
IMPORT_C void  BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &aAttrs)
  Base constructor.
IMPORT_C void  BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &aAttrs, TXmlEngElement &aParent)
  Base constructor.
IMPORT_C void  BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &aAttrs, TXmlEngElement &aParent, RSenDocument &aOwnerDocument)
  Base constructor.
IMPORT_C void  BaseConstructL (TXmlEngElement &aRootElement, RSenDocument &aOwnerDocument)
  Base constructor.
virtual IMPORT_C void  AddAttributesL (const RAttributeArray &apAttrs)
  Adds new XML attributes to this fragment.
virtual IMPORT_C void  AddAttributesToElementL (TXmlEngElement element, const RAttributeArray &apAttrs)
  Adds new XML attributes to specified element.
void  RenameL (const TDesC8 &aLocalName, const TDesC8 &aPrefix, const TDesC8 &aNamespace)
  Method renames the XML properties of this fragment.
void  RenameL (const TDesC8 &aLocalName, const TDesC8 &aNamespace)
  Method renames the XML properties of this fragment.
void  RenameLocalNameL (const TDesC8 &aLocalName)
  Renames local name for this XML fragment.
void  RenameNamespaceL (const TDesC8 &aNamespace)
  Renames namespace URI for this XML fragment.
void  RenamePrefixL (const TDesC8 &aPrefix)
  Renames namespace prefix for this XML fragment.
void  RenameNamespaceL (const TDesC8 &aPrefix, const TDesC8 &aNamespace)
  Renames namespace prefix and namespace URI for this XML fragment.
IMPORT_C TXmlEngElement  SetContentOfL (const TDesC8 &aLocalName, const TDesC8 &aContent)
  Sets content to a child element.
IMPORT_C TPtrC8  ContentOf (const TDesC8 &aLocalName)
  Gets the content of a given element.
virtual IMPORT_C TBool  ConsistsOfL (TXmlEngElement &aElement, TXmlEngElement &aCandidate)
virtual IMPORT_C void  AddNamespacesL ()
  Adds namespaces from internal array for the fragment.
virtual IMPORT_C void  SetContentL (const TDesC8 &aContent)
  Sets content to a child element.
virtual IMPORT_C void  AddContentL (const TDesC8 &aContent)
  Adds the content.
IMPORT_C void  StartSavingContent ()
  StartSavingContent changes the internal SAX parsing state of this fragment to KSenStateSave, which means that next call to OnStartElementL is treated as data, and not ignored (in DOM fragment implementation, it would be "extended" into a DOM object).

Protected Attributes

TInt  iState
TXmlEngElement  iElement
RSenDocument  iDocument
CSenParser ipParser
CSenFragmentBase ipOwner
CSenFragmentBase ipDelegate
RPointerArray< CSenNamespaceData > *  ipNamespaceArray
CBufFlat *  ipContentBuf
RBufWriteStream *  ipContentWriteStream

Friends

class  CSenParserImpl

Constructor & Destructor Documentation

virtual IMPORT_C CSenFragmentBase::~CSenFragmentBase  )  [virtual]
 

Destructor.

IMPORT_C CSenFragmentBase::CSenFragmentBase  )  [protected]
 

C++ default constructor.


Member Function Documentation

virtual IMPORT_C void CSenFragmentBase::AddAttributesL const RAttributeArray apAttrs  )  [protected, virtual]
 

Adds new XML attributes to this fragment.

Can be overridden to replace old attributes.

Parameters:
aAttrs,:  the array of attributes.

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::AddAttributesToElementL TXmlEngElement  element,
const RAttributeArray apAttrs
[protected, virtual]
 

Adds new XML attributes to specified element.

Can be overridden to replace old attributes.

Parameters:
aAttrs,:  the array of attributes.
virtual IMPORT_C void CSenFragmentBase::AddContentL const TDesC8 &  aContent  )  [protected, virtual]
 

Adds the content.

Since:
Series60 4.0
Parameters:
aContent  Content to be set.
virtual IMPORT_C void CSenFragmentBase::AddNamespacesL  )  [protected, virtual]
 

Adds namespaces from internal array for the fragment.

Since:
Series60 4.0

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C RSenDocument& CSenFragmentBase::AsDocumentL  )  [virtual]
 

Returns the current XML element of this fragment.

If element has not been set, this method will initialize new, un-initialized element. Method leaves with if there is not enough memory (OOM)

Returns:
reference to the element of this fragment

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C TXmlEngElement CSenFragmentBase::AsElementL  )  [virtual]
 

Returns the current XML element of this fragment.

If element has not been set, this method will initialize new, un-initialized element. Method leaves with if there is not enough memory (OOM)

Returns:
reference to the element of this fragment

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C HBufC8* CSenFragmentBase::AsXmlL  )  [virtual]
 

Gets the fragment data as an UTF-8 form XML.

Since:
Series60 4.0
Returns:
fragment as XML. Caller takes ownership.

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C HBufC* CSenFragmentBase::AsXmlUnicodeL  )  [virtual]
 

Gets the fragment data as an unicode XML.

Since:
Series60 4.0
Returns:
fragment as XML. Caller takes ownership.

Reimplemented in CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::BaseConstructL TXmlEngElement aRootElement,
RSenDocument aOwnerDocument
[protected]
 

Base constructor.

Since:
Series60 4.0
Parameters:
aRootElement  The element which will be the root element of this fragment
aOwnerDocument  The document which will be the owner of the elements of this fragment
IMPORT_C void CSenFragmentBase::BaseConstructL const TDesC8 &  aNsUri,
const TDesC8 &  aLocalName,
const TDesC8 &  aPrefix,
const RAttributeArray aAttrs,
TXmlEngElement aParent,
RSenDocument aOwnerDocument
[protected]
 

Base constructor.

Since:
Series60 4.0
Parameters:
aNsUri  XML namespace URI for this fragment
aLocalName  XML localname for this fragment
aQName  XML qualifiedname for this fragment
aAttrs  XML attributes for this fragment
aParent  Parent to be set for this fragmemt
aOwnerDocument  The document which will be the owner of the elements of this fragment

Reimplemented in CSenCredential2, and CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::BaseConstructL const TDesC8 &  aNsUri,
const TDesC8 &  aLocalName,
const TDesC8 &  aPrefix,
const RAttributeArray aAttrs,
TXmlEngElement aParent
[protected]
 

Base constructor.

Since:
Series60 4.0
Parameters:
aNsUri  XML namespace URI for this fragment
aLocalName  XML localname for this fragment
aQName  XML qualifiedname for this fragment
aAttrs  XML attributes for this fragment
aParent  parent to be set for this fragmemt

Reimplemented in CSenCredential2, and CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::BaseConstructL const TDesC8 &  aNsUri,
const TDesC8 &  aLocalName,
const TDesC8 &  aPrefix,
const RAttributeArray aAttrs
[protected]
 

Base constructor.

Since:
Series60 4.0
Parameters:
aNsUri  XML namespace URI for this fragment
aLocalName  XML localname for this fragment
aQName  XML qualifiedname for this fragment
aAttrs  XML attributes for this fragment

Reimplemented in CSenCredential2, and CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::BaseConstructL const TDesC8 &  aNsUri,
const TDesC8 &  aLocalName,
const TDesC8 &  aPrefix
[protected]
 

Base constructor.

Since:
Series60 4.0
Parameters:
aNsUri  XML namespace URI for this fragment
aLocalName  XML localname for this fragment
aQName  XML qualifiedname for this fragment

Reimplemented in CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::BaseConstructL const TDesC8 &  aNsUri,
const TDesC8 &  aLocalName
[protected]
 

BaseConstructL offering possibility to set XML namespace and localname.

Since:
Series60 4.0
Parameters:
aNsUri  XML namespace URI for this fragment
aLocalName  XML localname for this fragment

Reimplemented in CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::BaseConstructL const TDesC8 &  aLocalName  )  [protected]
 

BaseConstructL setting XML localname for this fragment.

Since:
Series60 4.0
Parameters:
aLocalName  XML localname for this fragment

Reimplemented in CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::BaseConstructL const TXmlEngElement aSrc  )  [protected]
 

BaseConstructL, where an element is given as initializer.

Since:
Series60 4.0
Parameters:
aElement  from which this fragment will be constructed from.

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C TBool CSenFragmentBase::ConsistsOfL TXmlEngElement aElement,
TXmlEngElement aCandidate
[protected, virtual]
 

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C TBool CSenFragmentBase::ConsistsOfL CSenFragmentBase aCandidate  )  [virtual]
 

Checks if fragment matches to another fragment by its content and child elements.

Fragment can contain more data than the given candidate.

Since:
Series60 4.0
Parameters:
aCandidate  The pattern to be matched. Must contain same or less data for match to come true.
Returns:
ETrue if content and possible children match exactly to given pattern. EFalse otherwise.

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C TPtrC8 CSenFragmentBase::ContentL  )  [virtual]
 

Getter for the content,which is returned as UTF-8 form XML.

Since:
Series60 4.0
Returns:
content as UTF-8 form XML.

Reimplemented in CSenDomFragmentBase.

IMPORT_C TPtrC8 CSenFragmentBase::ContentOf const TDesC8 &  aLocalName  )  [protected]
 

Gets the content of a given element.

Since:
Series60 4.0
Parameters:
aLocalName  The local name of the element which content is asked
Returns:
the content which was asked

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C TXmlEngElement CSenFragmentBase::ExtractElement  )  [virtual]
 

Etracts the XML element from the fragment, leaving the fragment empty.

Note(!): the return value (CSenElement) STRONGLY suggests that subclasses INHERIT CSenFragment in order properly comply the requirement of the ExtractElement() implementation.

Since:
Series60 4.0
Returns:
the current object as element. May return NULL. Ownership IS TRANSFERRED to the caller.

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C TAny* CSenFragmentBase::GetExtendedInterface const TInt32  aUid  )  [virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C TPtrC8 CSenFragmentBase::LocalName  )  const [virtual]
 
Since:
Series60 4.0
Returns:
the localname of this fragment as UTF-8 form descriptor

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C TXmlEngNamespace CSenFragmentBase::Namespace const TDesC8 &  aPrefix  )  [virtual]
 

Gets the namespace object with a given prefix.

Since:
Series60 4.0
Parameters:
aPrefix,:  prefix that wanted namespace should have.
Returns:
namespace with the given prefix. If not found or given prefix is zero length, will return NULL.

Reimplemented in CSenDomFragmentBase.

static IMPORT_C CSenFragmentBase* CSenFragmentBase::NewL TXmlEngElement aRootElement,
RSenDocument aOwnerDocument
[static]
 

Standard 2 phase constructor.

Parameters:
aParent  Element to be set as fragment's parent element.
Since:
Series60 4.0
Parameters:
aRootElement  The element which will be the root element of this fragment.
aOwnerDocument  The document which will be the owner of the elements of this fragment

Reimplemented in CSenSoapFault2.

static IMPORT_C CSenFragmentBase* CSenFragmentBase::NewL const TDesC8 &  aNsUri,
const TDesC8 &  aLocalName,
const TDesC8 &  aPrefix,
const RAttributeArray apAttrs,
TXmlEngElement aParent,
RSenDocument aOwnerDocument
[static]
 

Standard 2 phase constructor.

Parameters:
aParent  Element to be set as fragment's parent element.
Since:
Series60 4.0
Parameters:
aNsUri  XML namespace URI
aLocalName  XML localname
aPrefix  XML prefix
apAttrs  XML attributes
aParent  Parent element
aOwnerDocument  The document which will be the owner of the elements of this fragment

Reimplemented in CSenCredential2, CSenDomFragmentBase, and CSenSoapFault2.

static IMPORT_C CSenFragmentBase* CSenFragmentBase::NewL const TDesC8 &  aNsUri,
const TDesC8 &  aLocalName,
const TDesC8 &  aPrefix,
const RAttributeArray apAttrs,
TXmlEngElement aParent
[static]
 

Standard 2 phase constructor.

Parameters:
aParent  Element to be set as fragment's parent element.
Since:
Series60 4.0
Parameters:
aNsUri  XML namespace URI
aLocalName  XML localname
aPrefix  XML prefix
apAttrs  XML attributes
aParent  Parent element

Reimplemented in CSenCredential2, and CSenDomFragmentBase.

static IMPORT_C CSenFragmentBase* CSenFragmentBase::NewL const TDesC8 &  aNsUri,
const TDesC8 &  aLocalName,
const TDesC8 &  aPrefix,
const RAttributeArray apAttrs
[static]
 

Standard 2 phase constructor.

Since:
Series60 4.0
Parameters:
aNsUri  XML namespace URI
aLocalName  XML localname
aPrefix  XML prefix
apAttrs  XML attributes

Reimplemented in CSenCredential2, and CSenDomFragmentBase.

static IMPORT_C CSenFragmentBase* CSenFragmentBase::NewL const TDesC8 &  aNsUri,
const TDesC8 &  aLocalName,
const TDesC8 &  aPrefix
[static]
 

Standard 2 phase constructor.

Since:
Series60 4.0
Parameters:
aNsUri  XML namespace URI
aLocalName  XML localname
aPrefix  XML prefix

Reimplemented in CSenDomFragmentBase.

static IMPORT_C CSenFragmentBase* CSenFragmentBase::NewL const TDesC8 &  aNsUri,
const TDesC8 &  aLocalName
[static]
 

Standard 2 phase constructor.

Since:
Series60 4.0
Parameters:
aNsUri,:  XML namespace URI
aLocalName,:  XML localname

Reimplemented in CSenDomFragmentBase.

static IMPORT_C CSenFragmentBase* CSenFragmentBase::NewL const TDesC8 &  aLocalName  )  [static]
 

Standard 2 phase constructor.

Since:
Series60 4.0
Parameters:
aLocalName,:  is the XML localname for this fragment

Reimplemented in CSenDomFragmentBase.

static IMPORT_C CSenFragmentBase* CSenFragmentBase::NewL const TXmlEngElement aElement  )  [static]
 

Standard 2 phase constructor.

Since:
Series60 4.0
Parameters:
aElement  is the element where construction data will be copied from.

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C TPtrC8 CSenFragmentBase::NsPrefix  )  const [virtual]
 

Getter for namespace prefix of this fragment.

Since:
Series60 4.0
Returns:
namespace prefix or KNullDesC if not set.

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C TPtrC8 CSenFragmentBase::NsUri  )  const [virtual]
 

Getter for Fragment's namespace URI.

Since:
Series60 4.0
Returns:
Namespace URI or KNullDesC if not set.

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnContentL const TDesC8 &  aBytes,
TInt  aErrorCode
[virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnDelegateParsingL const RTagInfo &  aElement,
const RAttributeArray aAttributes,
TInt  aErrorCode
[virtual]
 

Creates a new fragment and lets the created MSenFragment handle the following SAX events.

This fragment is made the owner of the delegate and the delegate is expected to make this MSenFragment act as receiver for SAX events (callbacks) once it has seen the end element for itself.

Since:
Series60 4.0
Parameters:
aElement  The RTagInfo class holding information that describes the element.
aAttributes  The attributes of the new element
aErrorCode  Error code

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnDelegateParsingL CSenFragmentBase aDelegate  )  [virtual]
 

Let the delegate MSenFragment handle the following SAX events.

This fragment is made the owner of the delegate and the delegate is expected to make this MSenFragment the receiver of SAX events once it has seen the end element for itself.

Since:
Series60 4.0
Parameters:
aDelegate  is the fragment to start handling the SAX events.

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnEndDocumentL TInt  aErrorCode  )  [virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnEndElementL const RTagInfo &  aElement,
TInt  aErrorCode
[virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase, and CSenSoapEnvelope2.

virtual IMPORT_C void CSenFragmentBase::OnEndPrefixMappingL const RString &  aPrefix,
TInt  aErrorCode
[virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnError TInt  aErrorCode  )  [virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnIgnorableWhiteSpaceL const TDesC8 &  aBytes,
TInt  ErrorCode
[virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnProcessingInstructionL const TDesC8 &  aTarget,
const TDesC8 &  aData,
TInt  aErrorCode
[virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnResumeParsingFromL const RTagInfo &  aElement,
TInt  aErrorCode
[virtual]
 

Leave codes: Resumes parsing to be handled by this fragment.

Usually called by some delegate fragment which was set to be content handler because this fragment called DelegateParsingL().

Since:
Series60 4.0
Parameters:
aElement  The RTagInfo class holding information that describes the element.
aErrorCode  Error code

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnSkippedEntityL const RString &  aName,
TInt  aErrorCode
[virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnStartDocumentL const RDocumentParameters &  aDocParam,
TInt  aErrorCode
[virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::OnStartElementL const RTagInfo &  aElement,
const RAttributeArray aAttributes,
TInt  aErrorCode
[virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenCredential2, CSenDomFragmentBase, and CSenSoapEnvelope2.

virtual IMPORT_C void CSenFragmentBase::OnStartPrefixMappingL const RString &  aPrefix,
const RString &  aUri,
TInt  aErrorCode
[virtual]
 

Callback function implementing the XML content handler interface.

Inheriting classes can override these.

Since:
Series60 3.1
See also:
MContentHandler

Reimplemented in CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::OnWriteEndElementL const RTagInfo &  aElement  ) 
 

Writes the end element tag to the content stream.

Derivants can override the basic usage used in BaseFragment.

Since:
Series60 4.0
Parameters:
aElement  The RTagInfo class holding information that describes the element.

Reimplemented in CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::OnWriteStartElementL const RTagInfo &  aElement,
const RAttributeArray aAttributes
 

Writes the start element tag to the content stream.

Derivants can override the basic usage used in BaseFragment.

Since:
Series60 4.0
Parameters:
aElement  The RTagInfo class holding information that describes the element.
aAttributes  The attributes of the new element

Reimplemented in CSenDomFragmentBase.

void CSenFragmentBase::RenameL const TDesC8 &  aLocalName,
const TDesC8 &  aNamespace
[protected]
 

Method renames the XML properties of this fragment.

Parameters:
aLocalName  XML localname for this fragment
aNamespace  XML namespace URI for this fragment Method leaves with if there is not enough memory (OOM)

Reimplemented in CSenDomFragmentBase.

void CSenFragmentBase::RenameL const TDesC8 &  aLocalName,
const TDesC8 &  aPrefix,
const TDesC8 &  aNamespace
[protected]
 

Method renames the XML properties of this fragment.

Parameters:
aLocalName  XML localname for this fragment
aPrefix  XML namespace prefix for this fragment
aNamespace  XML namespace URI for this fragment Method leaves with if there is not enough memory (OOM)

Reimplemented in CSenDomFragmentBase.

void CSenFragmentBase::RenameLocalNameL const TDesC8 &  aLocalName  )  [protected]
 

Renames local name for this XML fragment.

Parameters:
aLocalName  XML localname for this fragment Method leaves with if there is not enough memory (OOM)

Reimplemented in CSenDomFragmentBase.

void CSenFragmentBase::RenameNamespaceL const TDesC8 &  aPrefix,
const TDesC8 &  aNamespace
[protected]
 

Renames namespace prefix and namespace URI for this XML fragment.

Parameters:
aPrefix  XML namespace prefix for this fragment
aNamespace  XML namespace URI for this fragment Method leaves with if there is not enough memory (OOM)

Reimplemented in CSenDomFragmentBase.

void CSenFragmentBase::RenameNamespaceL const TDesC8 &  aNamespace  )  [protected]
 

Renames namespace URI for this XML fragment.

Parameters:
aNamespace  XML namespace URI for this fragment Method leaves with if there is not enough memory(OOM)

Reimplemented in CSenDomFragmentBase.

void CSenFragmentBase::RenamePrefixL const TDesC8 &  aPrefix  )  [protected]
 

Renames namespace prefix for this XML fragment.

Parameters:
aPrefix  XML namespace prefix for this fragment Method leaves with if there is not enough memory (OOM)

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::ResetContentL  )  [virtual]
 

Resets the content of the fragment, and resets the namespaces.

Since:
Series60 4.0

Reimplemented in CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::SetContentHandler CSenFragmentBase aContentHandler  ) 
 

Reimplemented in CSenDomFragmentBase.

virtual IMPORT_C void CSenFragmentBase::SetContentL const TDesC8 &  aContent  )  [protected, virtual]
 

Sets content to a child element.

If no element with given local name is not found, new one is added and content is set to that one.

Since:
Series60 4.0
Parameters:
aContent  Content to be set.
IMPORT_C TXmlEngElement CSenFragmentBase::SetContentOfL const TDesC8 &  aLocalName,
const TDesC8 &  aContent
[protected]
 

Sets content to a child element.

If no element with given local name is not found, new one is added and content is set to that one.

Since:
Series60 4.0
Parameters:
aLocalName  The local name of element which content is about to be set
aContent  Content to be set.
Returns:
the element where content was set. Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length.

Reimplemented in CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::SetDocument RSenDocument aDocument  ) 
 

Sets the RSenDocument.

Parameters:
aDocument 
virtual IMPORT_C void CSenFragmentBase::SetOwner CSenFragmentBase aFragment  )  [virtual]
 

Sets a new parent for this fragment.

Since:
Series60 4.0
Parameters:
aFragment,:  the new parent.

Reimplemented in CSenDomFragmentBase.

IMPORT_C void CSenFragmentBase::StartSavingContent  )  [protected]
 

StartSavingContent changes the internal SAX parsing state of this fragment to KSenStateSave, which means that next call to OnStartElementL is treated as data, and not ignored (in DOM fragment implementation, it would be "extended" into a DOM object).

virtual IMPORT_C void CSenFragmentBase::WriteAsXMLToL RWriteStream &  aWs  )  [virtual]
 

Invokes AsElement().WriteAsXMLToL(aWs);.

Since:
Series60 4.0
Parameters:
aWs  is the stream into which the UTF-8 form XML will be written.

Reimplemented in CSenDomFragmentBase.


Friends And Related Function Documentation

friend class CSenParserImpl [friend]
 

Field Documentation

RSenDocument CSenFragmentBase::iDocument [protected]
 
TXmlEngElement CSenFragmentBase::iElement [protected]
 
CBufFlat* CSenFragmentBase::ipContentBuf [protected]
 
RBufWriteStream* CSenFragmentBase::ipContentWriteStream [protected]
 
CSenFragmentBase* CSenFragmentBase::ipDelegate [protected]
 
RPointerArray<CSenNamespaceData>* CSenFragmentBase::ipNamespaceArray [protected]
 
CSenFragmentBase* CSenFragmentBase::ipOwner [protected]
 
CSenParser* CSenFragmentBase::ipParser [protected]
 
TInt CSenFragmentBase::iState [protected]
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top