diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-A7DFDC4F-56C2-46B3-8B76-A6488BE4ABE0.dita --- a/Symbian3/PDK/Source/GUID-A7DFDC4F-56C2-46B3-8B76-A6488BE4ABE0.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-A7DFDC4F-56C2-46B3-8B76-A6488BE4ABE0.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,37 +1,37 @@ - - - - - -Get -a converter -

To obtain a suitable converter, complete the following -steps:

    -
  1. Create a CCnaConverterList object and use it to get -the UID of the converter that convert from a particular data type to another.

  2. -
  3. Create the converter (a CConverterBase2-based object) -using CCnaConverterList::NewConverterL(). The converter architecture -loads the converter DLL and instantiates the converter object from it.

  4. -
  5. Check whether the converter supports file or stream conversion using CConverterBase2::Capabilities().

  6. -

The following code snippet creates a converter that can convert files -of data type text/abc to type text/xyz.

_LIT( KFromType, "text/abc" ); -_LIT( KToType, "text/xyz" ); -CCnaConverterList* list = CCnaConverterList::NewLC(); -TUid uid = list->ConverterL( TDataType( KFromType ), TDataType( KToType ) ); -CConverterBase* converter = list->NewConverterL( uid ); -User::LeaveIfNull( converter ); -if( !( converter->Capabilities() & CConverterBase::EConvertsFiles ) ) - { - delete converter; - converter = NULL; - } -CleanupStack::PushL( converter ); -... -CleanupStack::PopAndDestroy( 2 ); // list, converter
+ + + + + +Get +a converter +

To obtain a suitable converter, complete the following +steps:

    +
  1. Create a CCnaConverterList object and use it to get +the UID of the converter that convert from a particular data type to another.

  2. +
  3. Create the converter (a CConverterBase2-based object) +using CCnaConverterList::NewConverterL(). The converter architecture +loads the converter DLL and instantiates the converter object from it.

  4. +
  5. Check whether the converter supports file or stream conversion using CConverterBase2::Capabilities().

  6. +

The following code snippet creates a converter that can convert files +of data type text/abc to type text/xyz.

_LIT( KFromType, "text/abc" ); +_LIT( KToType, "text/xyz" ); +CCnaConverterList* list = CCnaConverterList::NewLC(); +TUid uid = list->ConverterL( TDataType( KFromType ), TDataType( KToType ) ); +CConverterBase* converter = list->NewConverterL( uid ); +User::LeaveIfNull( converter ); +if( !( converter->Capabilities() & CConverterBase::EConvertsFiles ) ) + { + delete converter; + converter = NULL; + } +CleanupStack::PushL( converter ); +... +CleanupStack::PopAndDestroy( 2 ); // list, converter
\ No newline at end of file