#include <mw/SenFragment.h>
class CSenFragment : public CBase |
Public Member Functions | |
---|---|
pure virtual CSenElement & | AsElement() |
pure virtual HBufC8 * | AsXmlL() |
pure virtual HBufC * | AsXmlUnicodeL() |
pure virtual TInt | BuildFrom(const TDesC8 &) |
pure virtual TBool | ConsistsOfL(MSenFragment &) |
pure virtual TPtrC8 | Content() |
pure virtual void | DelegateParsingL(MSenFragment &) |
pure virtual void | DelegateParsingL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &) |
pure virtual CSenElement * | ExtractElement() |
pure virtual const TDesC8 & | LocalName() |
pure virtual const TDesC8 & | NsPrefix() |
pure virtual const TDesC8 & | NsUri() |
pure virtual void | ParseL(const TDesC8 &) |
pure virtual void | ParseWithL(CSenXmlReader &) |
pure virtual CSenXmlReader * | Reader() |
pure virtual void | ResumeParsingFromL(const TDesC8 &, const TDesC8 &, const TDesC8 &) |
pure virtual void | SetAttributesL(const RAttributeArray &) |
pure virtual void | SetOwner(MSenFragment &) |
pure virtual void | SetReader(CSenXmlReader &) |
pure virtual void | WriteAsXMLToL(RWriteStream &) |
pure virtual void | WriteEndElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &) |
pure virtual void | WriteStartElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &) |
CSenElement & | AsElement | ( | ) | [pure virtual] |
Getting the fragment as an XML element. This method will panic if element has not been initialized for any reason.
Returns: the current object as element. Ownership is not transferred.
HBufC8 * | AsXmlL | ( | ) | [pure virtual] |
Gets the fragment as an XML buffer.
Returns: fragment as XML. Caller takes ownership.
HBufC * | AsXmlUnicodeL | ( | ) | [pure virtual] |
Gets the fragment as an unicode XML buffer. Buffer will contain all the childs etc.
Returns: fragment as XML. Caller takes ownership.
Same as ParseL() except that it doesn't leave in case of an error. Instead errors are trapped and error is returned. SetReader() must be called before this method can be used.
Returns: KErrNone or other system-wide Symbian error codes.
TBool | ConsistsOfL | ( | MSenFragment & | aCandidate | ) | [pure virtual] |
Parameter | Description |
---|---|
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.
TPtrC8 | Content | ( | ) | [pure virtual] |
Getter for the content. Returns content namespaces if there are any.
Returns: Content.
void | DelegateParsingL | ( | MSenFragment & | aDelegate | ) | [pure 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.
void | DelegateParsingL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName, | |||
const RAttributeArray & | aAttrs | |||
) | [pure 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 the receiver of SAX events once it has seen the end element for itself.
CSenElement * | ExtractElement | ( | ) | [pure virtual] |
Note(!): the return value (CSenElement) STRONGLY suggests that subclasses INHERIT CSenFragment in order properly comply the requirement of the ExtractElement() implementation.
Returns: the current object as element. May return NULL. Caller takes ownership.
const TDesC8 & | LocalName | ( | ) | const [pure virtual] |
Getter for Fragment's local name.
Returns: Localname or KNullDesC if not set.
const TDesC8 & | NsPrefix | ( | ) | const [pure virtual] |
Getter for namespace prefix of this fragment.
Returns: namespace prefix or KNullDesC if not set.
const TDesC8 & | NsUri | ( | ) | const [pure virtual] |
Getter for Fragment's namespace URI.
Returns: Namespace URI or KNullDesC if not set.
void | ParseL | ( | const TDesC8 & | aXml | ) | [pure virtual] |
Method to invoke parsing of a XML data. Note: SetReader() must be called before this method can be used.
void | ParseWithL | ( | CSenXmlReader & | aReader | ) | [pure virtual] |
Sets the reader for this fragment and sets this to be the content handler of the following SAX events.
CSenXmlReader * | Reader | ( | ) | [pure virtual] |
Gets the XML reader which this fragment uses for parsing.
void | ResumeParsingFromL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName | |||
) | [pure virtual] |
Resumes the parsing. Usually called by the delegate fragment which was parsing itself after DelegateParsingL().
Parameter | Description |
---|---|
aNsUri | The namespace URI of the current element |
aLocalName | The local name of the current element |
aQName | The qualified name of the current element |
void | SetAttributesL | ( | const RAttributeArray & | aAttrs | ) | [pure virtual] |
Sets the attributes for the fragment.
void | SetOwner | ( | MSenFragment & | aFragment | ) | [pure virtual] |
Sets a new parent for this fragment.
void | SetReader | ( | CSenXmlReader & | aReader | ) | [pure virtual] |
Sets the XML reader to be used for parsing for the fragment.
void | WriteAsXMLToL | ( | RWriteStream & | aWriteStream | ) | [pure virtual] |
Fragment writes itself to a write stream using UTF-8 charset encoding.
void | WriteEndElementL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName | |||
) | [pure virtual] |
Writes the end element tag to the content stream. Derivants can override the basic usage used in BaseFragment.
Parameter | Description |
---|---|
aNsUri | The namespace URI of the current element |
aLocalName | The local name of the current element |
aQName | The qualified name of the current element |
void | WriteStartElementL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName, | |||
const RAttributeArray & | aAttrs | |||
) | [pure virtual] |
Writes the start element tag to the content stream. Derivants can override the basic usage used in BaseFragment.
Parameter | Description |
---|---|
aNsUri | The namespace URI of the current element |
aLocalName | The local name of the current element |
aQName | The qualified name of the current element |