#include <mw/MSenElement.h>
class MSenElement |
void | AddAttributesL | ( | const RAttributeArray & | aAttrs | ) | [pure virtual] |
Adds new attributes to the element.
CSenElement & | AddElementL | ( | CSenElement & | aElement | ) | [pure virtual] |
Adds an Element to the children elements. Sets this element to be the new parent of the given element.
Returns: the added Element
CSenElement & | AddElementL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [pure virtual] |
Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element.
Returns: the added Element Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length.
CSenElement & | AddElementL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName | |||
) | [pure virtual] |
Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element.
Returns: the added Element Leave codes: KErrSenInvalidCharacters if aLocalName or aQName contain illegal characters. KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length.
CSenElement & | AddElementL | ( | const TDesC8 & | aLocalName | ) | [pure virtual] |
Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element. Note: Element is created with no specific namespace, default namespace of some of the upper level elements are in effect if there is such a namespace.
Returns: the added Element Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length.
const CSenNamespace * | AddNamespaceL | ( | const TDesC8 & | aPrefix, |
const TDesC8 & | aUri | |||
) | [pure virtual] |
Method for adding a namespace for the Element.
Returns: the added Namespace, or the equivalent pre-existing one.
const CSenNamespace * | AddNamespaceL | ( | CSenNamespace & | aNewNamespace, |
TBool | aCheckInParent | |||
) | [pure virtual] |
Adds a namespace declaration. If this element (or its parent if parameter aCheckInParent is ETrue) already has a Namespace with the same prefix and URI the given Namespace is not added.
Returns: the added Namespace, or the equivalent pre-existing one.
MSenElement * | AsElement | ( | ) | [pure virtual] |
Gets the current element as XML element. Mostly used to get the classes which implement this interface as an instance of this interface.
Returns: the current object as element. Ownership is NOT transferred.
HBufC8 * | AsXmlL | ( | ) | [pure virtual] |
Gets element as an UTF-8 form XML.
Returns: element as XML (in UTF-8 format). Caller takes ownership.
HBufC * | AsXmlUnicodeL | ( | ) | [pure virtual] |
Returns: the service description as XML, which ownership is transferred to the caller.
RPointerArray< CSenBaseAttribute > & | AttributesL | ( | ) | [pure virtual] |
Gets all the attributes of this element in an array.
Returns: array of attributes. Array will be empty if element has no attributes.
CSenElement * | Child | ( | TInt | aIndex | ) | [pure virtual] |
Gets a child element from a specified index.
Returns: child element from a current index. NULL if no child in given index is found
TBool | ConsistsOfL | ( | MSenElement & | 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 | ( | ) | const [pure virtual] |
Getter for the content of the element.
Returns: the content or KNullDesC8 if empty.
HBufC * | ContentUnicodeL | ( | ) | const [pure virtual] |
Getter for the content of the element, unicode version.
Returns: content as unicode. Ownership IS TRANSFERRED to the caller.
RWriteStream & | ContentWriteStreamL | ( | ) | [pure virtual] |
Gets the write stream for the content for easy appending. Writing 8-bit (UTF-8) string to the returned stream will be appended to the content.
Returns: reference to the RWriteStream.
void | CopyFromL | ( | CSenElement & | aSource | ) | [pure virtual] |
Copies content from given element to this element appending to the existing content if there is any.
CSenElement * | CreateElementL | ( | const TDesC8 & | aNsPrefix, |
const TDesC8 & | aLocalName | |||
) | [pure virtual] |
Create a new element ready for adding or insertion. If the given namespace prefix is not declared yet the element will not be created and NULL will be returned.
Returns: the new Element just created, or NULL if given prefix was not declared yet. Ownership is transferred to the caller. Leave codes: KErrSenInvalidCharacters if aLocalName or aQName contain illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length.
CSenElement * | DetachL | ( | ) | [pure virtual] |
Detach the element from its parent. If the element, or one of its children, is dependent on a namespace declared in the scope of the parent copy those namespace declarations to this element.
Returns: this Element. Ownership is NOT transferred to the caller. Returns NULL if no parent was set, and nothing was detached.
CSenElement * | Element | ( | const TDesC8 & | aLocalName | ) | [pure virtual] |
Gets the child element with the specified local name. Assumes that namespace is the same as this parent element.
Returns: the child element or NULL if the child with the specified local name is not found. Ownership is NOT transferred.
CSenElement * | Element | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [pure virtual] |
Gets the child element with the specified local name and namespace URI.
Returns: the child element or NULL if the child with the specified criterias is not found. Ownership is NOT transferred.
RPointerArray< CSenElement > & | ElementsL | ( | ) | [pure virtual] |
Getting the child elements of this element.
Returns: an array of child elements. This is an empty array if there are no children. Any modifications made on the returned array modify the element object.
TBool | HasContent | ( | ) | const [pure virtual] |
Method for checking if the element has any content within.
Returns: ETrue if has content, EFalse if not.
CSenElement & | InsertElementL | ( | CSenElement & | aInsertedElement, |
const CSenElement & | aBeforeElement | |||
) | [pure virtual] |
Insert an Element into the list of children elements so that the inserted Element is placed right before the aBeforeElement. If aBeforeElement is not found, element will be appended to the last position. Function leaves if error occurs in inserting.
Returns: the inserted Element
const TDesC8 & | LocalName | ( | ) | const [pure virtual] |
Getter for Element's local name.
Returns: KNullDesC if not set
const CSenNamespace * | Namespace | ( | ) | [pure virtual] |
Getter for Element's namespace.
Returns: const pointer to the CSenNamespace object of this Element. NULL if not set.
const CSenNamespace * | Namespace | ( | const TDesC8 & | aNsPrefix | ) | [pure virtual] |
Get namespace that is declared for the given prefix
Returns: the found Namespace that is declared for the given prefix within the scope of this Element or NULL if not found.
const CSenNamespace * | Namespace | ( | const TDesC8 & | aNsPrefix, |
const TDesC8 & | aUri | |||
) | [pure virtual] |
Get namespace that is declared for the given prefix and namespace URI within the scope of this Element.
Returns: the found Namespace that is declared for the given prefix and namespace URI within the scope of this Element or NULL if not found.
const CSenNamespace * | Namespace | ( | const TDesC8 & | aNsPrefix, |
const TBool | aCheckInParent | |||
) | [pure virtual] |
Get namespace that is declared for the given prefix and namespace URI within the scope of this Element.
Returns: the found Namespace that is declared for the given prefix and namespace URI within the scope of this Element or NULL if not found
const TDesC8 & | NamespaceURI | ( | ) | const [pure virtual] |
Getter for Element's namespace URI.
Returns: Namespace URI or KNullDesC if not set.
RPointerArray< CSenNamespace > & | NamespacesL | ( | ) | [pure virtual] |
Gets all the namespaces of this element in an array.
Returns: array of namespaces. Array will be empty if element has no namespaces.
const TDesC8 & | NsPrefix | ( | ) | const [pure virtual] |
Getter for namespace prefix of this element.
Returns: namespace prefix or KNullDesC8 if not set.
CSenElement * | Parent | ( | ) | [pure virtual] |
Gets the parent element of this element.
Returns: the parent element or NULL if no parent set. Ownership is NOT transferred to the caller.
CSenElement * | RemoveElement | ( | CSenElement & | aElement | ) | [pure virtual] |
Remove an element from the childs.
Returns: The removed element. May be NULL if nothing was removed (if element was not found from the childs). The caller TAKES OWNERSHIP of the removed element.
CSenElement * | RemoveElement | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [pure virtual] |
Remove an element from the childs.
Returns: The removed element. May be NULL if nothing was removed (if element was not found from the childs). The caller TAKES OWNERSHIP of the removed element.
CSenElement * | RemoveElement | ( | const TDesC8 & | aLocalName | ) | [pure virtual] |
Remove an element from the childs.
Returns: The removed element. May be NULL if nothing was removed (if element was not found from the childs). The caller TAKES OWNERSHIP of the removed element.
CSenElement * | ReplaceElementL | ( | CSenElement & | aElement | ) | [pure virtual] |
Replaces an element from the childs with another element. Element's local name and namespace URI will be used to match the element to be replaced. If matching element is not found, will normally add the given element to the childs.
Returns: The old element. May be NULL if nothing was replaced (if element was not found from the childs). The caller TAKES OWNERSHIP of the old element.
MSenElement & | Root | ( | ) | [pure virtual] |
Gets the root element. If no parent element, returns this element.
Returns: the root of the tree. Ownership is not transferred.
(Re-) Set the name and namespace of this Element. The element will be given the localName in the the given namespace. A prefix will be computed from the qualified name.
This method should be used with care and is mainly intended for protected use in implementations.
void | SetNamespaceL | ( | const TDesC8 & | aNsUri | ) | [pure virtual] |
Setter for Element's namespace URI.
CSenElement * | SetParent | ( | CSenElement * | apParent | ) | [pure virtual] |
Sets the parent element to this element. Notice that the element is not automatically added as a child of the parent. Parent's AddElementL() should be called instead.
Returns: the parent element
void | SetPrefixL | ( | const TDesC8 & | aPrefix | ) | [pure virtual] |
Setter for namespace prefix of this element.
void | WriteAsXMLToL | ( | RWriteStream & | aWriteStream | ) | [pure virtual] |
Parameter | Description |
---|---|
aWriteStream | to write into. |
void | WriteNamespacesToL | ( | RWriteStream & | aWriteStream | ) | [pure virtual] |
Element writes its namespaces to a write stream using UTF-8 charset encoding.