class CMDXMLComposer : public CActive |
Creates an XML file from a given DOM structure.
Private Member Functions | |
---|---|
CMDXMLComposer ( MMDXMLComposerObserver *) | |
CMDXMLComposer ( MMDXMLComposerObserver *, TBool ) | |
void | BaseConstructL () |
IMPORT_C TInt | ComposeEndTagL ( CMDXMLNode &) |
TInt | ComposeL () |
IMPORT_C TInt | ComposeStartTagL ( CMDXMLNode &) |
void | ConstructL () |
IMPORT_C void | DoCancel () |
TInt | FlushOutputBufferL () |
void | InitialiseCompose ( CMDXMLDocument *, TXMLFileType ) |
IMPORT_C void | PlaceholderForRemovedExport1 ( MMDXMLComposerObserver *) |
IMPORT_C void | PlaceholderForRemovedExport2 () |
IMPORT_C void | PlaceholderForRemovedExport3 () |
TInt | ReplaceXmlCharactersL (const TDesC16 &, const TDesC &) |
IMPORT_C TInt | RunError ( TInt ) |
void | RunL () |
IMPORT_C void | SetError (const TInt , const TXMLErrorCodeSeverity ) |
TInt | WriteFileL (const TDesC &) |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Inherited Attributes | |
---|---|
CActive::iStatus |
CMDXMLComposer | ( | MMDXMLComposerObserver * | aComposerObserver | ) | [private] |
MMDXMLComposerObserver * aComposerObserver |
CMDXMLComposer | ( | MMDXMLComposerObserver * | aComposerObserver, |
TBool | aOutputProlog | ||
) | [private] |
MMDXMLComposerObserver * aComposerObserver | |
TBool aOutputProlog |
IMPORT_C TInt | CalculateFileSize | ( | TInt & | aSize, |
CMDXMLDocument * | aDocument, | |||
TXMLFileType | aFileType | |||
) |
Starts calculating the size of the XML output without actually writing it to the file.
File size calculation is asyncronous, the size value is only updated when ComposeFileComplete is called on the MMDXMLComposerObserver passed in in the NewL.
This function must not be called when file composition or another sizing operation is in progress. If it is necessary to calulate the size and generate the XML simultaneously then two instances of the composer should be used, one for sizing and one for composition.
TInt & aSize | Will be set to the size of the XML document when composition has completed. |
CMDXMLDocument * aDocument | The document object to size |
TXMLFileType aFileType | Type of the output file, required because it will affect the size of the XML |
IMPORT_C TInt | ComposeEndTagL | ( | CMDXMLNode & | aNode | ) | [private] |
CMDXMLNode & aNode |
IMPORT_C TInt | ComposeFile | ( | RFs | aRFs, |
const TDesC & | aFileToCompose, | |||
CMDXMLDocument * | aDocument, | |||
TXMLFileType | aFileType | |||
) |
Starts file composition.
This function must not be called when file sizing is in progress. If it is necessary to calulate the size and generate the XML simultaneously then two instances of the composer should be used, one for sizing and one for composition.
RFs aRFs | A file server session |
const TDesC & aFileToCompose | Name of the file to create |
CMDXMLDocument * aDocument | The document object to compose to the file |
TXMLFileType aFileType | Type of the output file |
IMPORT_C TInt | ComposeFile | ( | RFile & | aFileHandleToCompose, |
CMDXMLDocument * | aDocument, | |||
TXMLFileType | aFileType | |||
) |
RFile & aFileHandleToCompose | |
CMDXMLDocument * aDocument | |
TXMLFileType aFileType |
IMPORT_C TInt | ComposeStartTagL | ( | CMDXMLNode & | aNode | ) | [private] |
CMDXMLNode & aNode |
IMPORT_C void | DoCancel | ( | ) | [private, virtual] |
Implements cancellation of an outstanding request.
This function is called as part of the active object's Cancel() .
It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.
DoCancel() must not wait for event completion; this is handled by Cancel() .
IMPORT_C CMDXMLEntityConverter * | EntityConverter | ( | ) | const |
Gets the entity converter used by the composer.
IMPORT_C TXMLErrorCodeSeverity | ErrorSeverity | ( | ) | const |
Get the severity of the most severe error found.
void | InitialiseCompose | ( | CMDXMLDocument * | aDocument, |
TXMLFileType | aFileType | |||
) | [private] |
CMDXMLDocument * aDocument | |
TXMLFileType aFileType |
IMPORT_C CMDXMLComposer * | NewL | ( | MMDXMLComposerObserver * | aComposerObserver | ) | [static] |
Allocates and constructs a new XML composer.
MMDXMLComposerObserver * aComposerObserver | Composer observer |
IMPORT_C CMDXMLComposer * | NewL | ( | MMDXMLComposerObserver * | aComposerObserver, |
TBool | aOutputProlog | |||
) | [static] |
Allocates and constructs a new XML composer.
MMDXMLComposerObserver * aComposerObserver | Composer observer |
TBool aOutputProlog | Whether to output Version and Doctype tags. |
IMPORT_C CMDXMLComposer * | NewLC | ( | MMDXMLComposerObserver * | aComposerObserver | ) | [static] |
Allocates and constructs a new XML composer, leaving the object on the cleanup stack.
MMDXMLComposerObserver * aComposerObserver | Composer observer |
IMPORT_C CMDXMLComposer * | NewLC | ( | MMDXMLComposerObserver * | aComposerObserver, |
TBool | aOutputProlog | |||
) | [static] |
Allocates and constructs a new XML composer, leaving the object on the cleanup stack.
MMDXMLComposerObserver * aComposerObserver | Composer observer |
TBool aOutputProlog | Whether to output Version and Doctype tags. |
IMPORT_C TInt | OutputAttributeL | ( | const TDesC & | aAttributeName, |
const TDesC & | aAttributeValue | |||
) |
Outputs an attribute name and value.
TInt | OutputCDataSectionL | ( | const TDesC & | aCDataSection | ) |
Outputs a CDATA section.
const TDesC & aCDataSection | CDATA section to output |
TInt | OutputCommentL | ( | const TDesC & | aComment | ) |
Outputs a comment.
const TDesC & aComment | Comment to output |
IMPORT_C TInt | OutputDataL | ( | const TDesC & | aData | ) |
Outputs raw data. it's only intended to be used from within a custom entity converter as it relies on a Composer sesssion already being in progress
const TDesC & aData | Data to output |
IMPORT_C TInt | OutputEndOfElementTagL | ( | const TBool | aHasChildren | ) |
Outputs an end of element start tag (</).
const TBool aHasChildren | True if the element has children |
TInt | OutputEndTagL | ( | const TDesC & | aElementName | ) |
Output an end of element tag.
const TDesC & aElementName | The name of the tag to output |
TInt | OutputProcessingInstructionL | ( | const TDesC & | aInstruction | ) |
Outputs a processing instruction.
const TDesC & aInstruction | Processing instruction text to output |
IMPORT_C TInt | OutputStartOfElementTagL | ( | const TDesC & | aElementName | ) |
Outputs a start of element tag.
const TDesC & aElementName | The name of the tag to output |
IMPORT_C void | PlaceholderForRemovedExport1 | ( | MMDXMLComposerObserver * | aComposerObserver | ) | [private] |
MMDXMLComposerObserver * aComposerObserver |
TInt | ReplaceXmlCharactersL | ( | const TDesC16 & | aXmlData, |
const TDesC & | aString | |||
) | [private] |
void | RunL | ( | ) | [private, virtual] |
Handles an active object's request completion event.
A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.
The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.
Before calling this active object's RunL() function, the active scheduler has:
1. decided that this is the highest priority active object with a completed request
2. marked this active object's request as complete (i.e. the request is no longer outstanding)
RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.
Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.
CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD
IMPORT_C void | SetEntityConverter | ( | CMDXMLEntityConverter * | aEntityConverter | ) |
Sets the entity converter to be used and take ownership of the passed entity converter
CMDXMLEntityConverter * aEntityConverter | The entity converter to be used |
IMPORT_C void | SetError | ( | const TInt | aErrorCode, |
const TXMLErrorCodeSeverity | aSeverity | |||
) | [private] |
const TInt aErrorCode | |
const TXMLErrorCodeSeverity aSeverity |
TInt | WriteFileL | ( | const TDesC & | aStringToWrite | ) | [private, virtual] |
const TDesC & aStringToWrite |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.