#include <mw/conarc.h>
Link against: conarc.lib
class CConverterBase2 : public CConverterBase |
Public Member Functions | |
---|---|
virtual | ~CConverterBase2() |
virtual IMPORT_C void | CancelConvert() |
virtual IMPORT_C TInt | Capabilities() |
virtual IMPORT_C void | ConvertAL(const TFileName &, const TFileName &, MConverterUiObserver *) |
virtual IMPORT_C void | ConvertL(const TFileName &, const TFileName &, MConverterUiObserver *) |
virtual IMPORT_C void | ConvertObjectAL(RReadStream &, RWriteStream &, MConverterUiObserver *) |
virtual IMPORT_C void | ConvertObjectL(RReadStream &, RWriteStream &, MConverterUiObserver *) |
CConverterBase2 * | CreateConverterL(TUid) |
virtual IMPORT_C TBool | DoConvertL() |
virtual IMPORT_C CConverterBase * | EmbeddedObjectL(TDataType &) |
virtual IMPORT_C void | ExtendedInterfaceL(TUid, CBase *&) |
virtual IMPORT_C TBool | GetEmbeddedFileName(TFileName &) |
virtual IMPORT_C void | Reserved_1() |
virtual IMPORT_C void | Reserved_2() |
pure virtual TUid | Uid() |
Inherited Enumerations | |
---|---|
CConverterBase:TCapability |
Base Class for Ecom Style Converters The methods in CConverterBase2 are inherited from CConverterBase
There are two flavours of conversion methods:
the synchronous interfaces, ConvertL() and ConvertObjectL(), which perform the specified conversion and then return
the asynchronous interfaces, ConvertAL() and ConvertObjectAL(), which initialise the converter object, and allow the client code to call DoConvertL() a number of times until the conversion is complete or abandoned.
IMPORT_C | ~CConverterBase2 | ( | ) | [virtual] |
IMPORT_C void | CancelConvert | ( | ) | [virtual] |
Reimplemented from CConverterBase::CancelConvert()
Cleans up a conversion that has been prepared or is in progress.
It should free any resources and reset the converter object to an initial state.
The default is to do nothing.
IMPORT_C TInt | Capabilities | ( | ) | [virtual] |
Reimplemented from CConverterBase::Capabilities()
Gets the converter's capabilities.
The default is to return a bitmask of all the TCapability flags.
IMPORT_C void | ConvertAL | ( | const TFileName & | aSourceFile, |
const TFileName & | aTargetFile, | |||
MConverterUiObserver * | aObserver = NULL | |||
) | [virtual] |
Reimplemented from CConverterBase::ConvertAL(const TFileName &,const TFileName &,MConverterUiObserver *)
Prepares for conversion in multiple steps of a file.
Clients must call this function before calling DoConvertL() one or more times to do the conversion. The function can call back the MaxSteps() function of the supplied MConverterUiObserver to tell the client the maximum number of calls to DoConvertL() that will be required.
The rest of this description describes how to implement this function.
The function should initialise the object before performing a conversion, but should not do the conversion itself. Such initialisation should include:
storing the MConverterUiObserver pointer (if supplied), so the client can later be notified of conversion progress
validating the integrity of the input data
optionally, creating the appropriate application engine, either for input or output, to enable access to the data
determining the number of steps (i.e. calls to DoConvertL()) required to perform the conversion and pass this to the client by calling MConverterUiObserver::MaxSteps()
The default implementation leaves with KErrNotSupported.
Parameters | |
---|---|
aSourceFile | File to convert |
aTargetFile | File to which to write the converted output. The file can be overwritten if it already exists. |
aObserver | Observer of the conversion process |
Leave Codes | |
---|---|
KErrNotSupported | File conversion is not supported |
IMPORT_C void | ConvertL | ( | const TFileName & | aSourceFile, |
const TFileName & | aTargetFile, | |||
MConverterUiObserver * | aObserver = NULL | |||
) | [virtual] |
Reimplemented from CConverterBase::ConvertL(const TFileName &,const TFileName &,MConverterUiObserver *)
Converts a file in a single step.
The caller can supply a MConverterUiObserver to be informed of progress in the conversion.
The default implementation calls ConvertAL() to prepare the object to perform the conversion, and then calls DoConvertL() in a loop until conversion is complete.
Parameters | |
---|---|
aSourceFile | File to convert |
aTargetFile | File to which to write the converted output |
aObserver | Optional observer of the conversion process |
Leave Codes | |
---|---|
KErrNotSupported | File conversion is not supported |
IMPORT_C void | ConvertObjectAL | ( | RReadStream & | aReadStream, |
RWriteStream & | aWriteStream, | |||
MConverterUiObserver * | aObserver = NULL | |||
) | [virtual] |
Reimplemented from CConverterBase::ConvertObjectAL(RReadStream &,RWriteStream &,MConverterUiObserver *)
Prepares for conversion in multiple steps of a stream object.
Clients must call this function before calling DoConvertL() one or more times to do the conversion. The function can call back the MaxSteps() function of the supplied MConverterUiObserver to tell the client the maximum number of calls to DoConvertL() that will be required.
For a description of how to implement this function, see ConvertAL().
Parameters | |
---|---|
aReadStream | Stream from which to read the data to convert |
aWriteStream | Stream to which to write the converted data |
aObserver | Optional observer of the conversion process |
Leave Codes | |
---|---|
KErrNotSupported | Stream object conversion is not supported |
IMPORT_C void | ConvertObjectL | ( | RReadStream & | aReadStream, |
RWriteStream & | aWriteStream, | |||
MConverterUiObserver * | aObserver = NULL | |||
) | [virtual] |
Reimplemented from CConverterBase::ConvertObjectL(RReadStream &,RWriteStream &,MConverterUiObserver *)
Converts a stream object in a single step.
The caller can supply a MConverterUiObserver to be informed of progress in the conversion.
The default implementation calls ConvertObjectAL() to prepare the object to perform the conversion, and then calls DoConvertL() in a loop until conversion is complete.
Parameters | |
---|---|
aReadStream | Stream from which to read the data to convert |
aWriteStream | Stream to which to write the converted data |
aObserver | Optional observer of the conversion process |
CConverterBase2 * | CreateConverterL | ( | TUid | aImplUid | ) | [static] |
IMPORT_C TBool | DoConvertL | ( | ) | [virtual] |
Reimplemented from CConverterBase::DoConvertL()
Performs a step in converting the data.
The function advances a step in converting the data each time that it is called. When conversion is complete, the function returns EFalse.
IMPORT_C CConverterBase * | EmbeddedObjectL | ( | TDataType & | aType | ) | [virtual] |
Reimplemented from CConverterBase::EmbeddedObjectL(TDataType &)
Gets a converter for an embedded object of the specified type.
The default is to return NULL.
Parameters | |
---|---|
aType | Type of the embedded object |
Reimplemented from CConverterBase::ExtendedInterfaceL(TUid,CBase *&)
Allows licensees to extend the Converter Architecture API.
If overridden by the converter, it allows third party code to request the extended interface object by UID. If not overridden, the default implementation does nothing.
Parameters | |
---|---|
aInterfaceUid | A UID that identifies the required extended interface object. |
aInterface | On return, an object that extends the Converter Architecture interface, or NULL, if the UID specified is not recognised. |
Reimplemented from CConverterBase::GetEmbeddedFileName(TFileName &)
Gets a filename embedded in the object.
Parameters | |
---|---|
aFileName | The file name found |
IMPORT_C void | Reserved_1 | ( | ) | [virtual] |
IMPORT_C void | Reserved_2 | ( | ) | [virtual] |
TUid | Uid | ( | ) | [pure virtual] |
Reimplemented from CConverterBase::Uid()
Gets the converter's UID.