connectivitymodules/SeCon/wbxml/conmlhandler/src/sconconmlgenerator.cpp
branchRCL_3
changeset 25 4f0867e42d62
parent 24 8e7494275d3a
child 26 3e6957da2ff8
equal deleted inserted replaced
24:8e7494275d3a 25:4f0867e42d62
     1 /*
       
     2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  ConML parser/generator
       
    15 *
       
    16 */
       
    17 
       
    18 // -----------------------------------------------------------------------------
       
    19 // Includes
       
    20 // -----------------------------------------------------------------------------    
       
    21 #include "sconconmlgenerator.h"
       
    22 #include "sconconmlhandlererror.h"
       
    23 #include "sconconmldtd.h"
       
    24 #include "sconxmlelement.h"
       
    25 #include "debug.h"
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // CSConConMLGenerator
       
    29 // -----------------------------------------------------------------------------
       
    30 CSConConMLGenerator::CSConConMLGenerator()
       
    31     {
       
    32     }
       
    33     
       
    34 // -----------------------------------------------------------------------------
       
    35 // ~CSConConMLGenerator
       
    36 // -----------------------------------------------------------------------------
       
    37 CSConConMLGenerator::~CSConConMLGenerator()
       
    38     {
       
    39     if (iCmdStack)
       
    40         {
       
    41         iCmdStack->Reset();
       
    42         delete iCmdStack;
       
    43         iCmdStack = NULL;
       
    44         }
       
    45         
       
    46     if ( iWBXMLWorkspace )
       
    47         {
       
    48         delete iWBXMLWorkspace;
       
    49         iWBXMLWorkspace = NULL;
       
    50         }
       
    51         
       
    52     if ( iXMLWorkspace )
       
    53         {
       
    54         delete iXMLWorkspace;
       
    55         iXMLWorkspace = NULL;
       
    56         }
       
    57         
       
    58     if (iCleanupStack)
       
    59         {
       
    60         iCleanupStack->ResetAndDestroy();
       
    61         delete iCleanupStack;
       
    62         iCleanupStack = NULL;
       
    63         }
       
    64 
       
    65     iElemStack.Close();
       
    66     }
       
    67     
       
    68 // -----------------------------------------------------------------------------
       
    69 // NewL
       
    70 // -----------------------------------------------------------------------------
       
    71 CSConConMLGenerator* CSConConMLGenerator::NewL ()
       
    72     {
       
    73     LOGGER_ENTERFN( "CSConConMLGenerator::NewL()" );
       
    74     CSConConMLGenerator* self = new ( ELeave ) CSConConMLGenerator();
       
    75     CleanupStack::PushL(self);
       
    76     self->ConstructL();
       
    77     CleanupStack::Pop(); // self
       
    78     LOGGER_LEAVEFN( "CSConConMLGenerator::NewL()" );
       
    79     return self;
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // ConstructL
       
    84 // -----------------------------------------------------------------------------
       
    85 void CSConConMLGenerator::ConstructL()
       
    86     {
       
    87     LOGGER_ENTERFN( "CSConConMLGenerator::ConstructL()" );
       
    88     iCmdStack = CXMLStack<CXMLElement>::NewL();
       
    89     iCleanupStack = CXMLStack<CXMLElement>::NewL();
       
    90     iWBXMLWorkspace = CXMLWorkspace::NewL();
       
    91     iXMLWorkspace = CXMLWorkspace::NewL();
       
    92     LOGGER_LEAVEFN( "CSConConMLGenerator::ConstructL()" );
       
    93     }
       
    94     
       
    95 // -----------------------------------------------------------------------------
       
    96 // SetCallbacks
       
    97 // -----------------------------------------------------------------------------
       
    98 void CSConConMLGenerator::SetCallback ( MWBXMLConMLCallback* aCallback )
       
    99     {
       
   100     iCallback = aCallback;
       
   101     }
       
   102 
       
   103 // -----------------------------------------------------------------------------
       
   104 // StartDocument
       
   105 // -----------------------------------------------------------------------------    
       
   106 void CSConConMLGenerator::StartDocument( 
       
   107     TUint8 /*aVersion*/, TInt32 /*aPublicId*/, TUint32 /*aCharset*/ )
       
   108     {
       
   109     LOGGER_ENTERFN( "CSConConMLGenerator::StartDocumentL()" );
       
   110     iCmdStack->Reset();
       
   111     LOGGER_LEAVEFN( "CSConConMLGenerator::StartDocumentL()" );
       
   112     }
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // StartDocument
       
   116 // -----------------------------------------------------------------------------
       
   117 void CSConConMLGenerator::StartDocument( 
       
   118     TUint8 /*aVersion*/, const TDesC8& /*aPublicIdStr*/, TUint32 /*aCharset*/ )
       
   119     {
       
   120     LOGGER_ENTERFN( "CSConConMLGenerator::StartDocumentL()" );
       
   121     iCmdStack->Reset();
       
   122     LOGGER_LEAVEFN( "CSConConMLGenerator::StartDocumentL()" );
       
   123     }
       
   124     
       
   125 // -----------------------------------------------------------------------------
       
   126 // StartElementL
       
   127 // -----------------------------------------------------------------------------
       
   128 void CSConConMLGenerator::StartElementL( TWBXMLTag aTag )
       
   129     {
       
   130     if( iCmdStack->Top() != 0 )
       
   131         {
       
   132         AddElementL(iCmdStack->Top()->BeginElementL( 
       
   133             aTag, TXMLElementParams(iCallback, iCmdStack, iCleanupStack ) ) );
       
   134         }
       
   135     else
       
   136         {
       
   137         if( aTag == EConML )
       
   138             {
       
   139             ConML_ConML_t* element = new (ELeave) ConML_ConML_t();
       
   140             CleanupStack::PushL( element );
       
   141             AddElementL( element );
       
   142             CleanupStack::Pop( element );
       
   143             }
       
   144         else
       
   145             {
       
   146             LOGGER_WRITE( "CSConConMLGenerator::StartElementL() : Leave KWBXMLParserErrorInvalidTag" );
       
   147             User::Leave(KWBXMLParserErrorInvalidTag);
       
   148             }
       
   149         }
       
   150     }
       
   151     
       
   152 // -----------------------------------------------------------------------------
       
   153 // AddElement
       
   154 // -----------------------------------------------------------------------------
       
   155 void CSConConMLGenerator::AddElementL( CXMLElement* aElement )
       
   156     {
       
   157     if( aElement )
       
   158         {
       
   159         iCmdStack->PushL(aElement);
       
   160         if( aElement->NeedsCleanup() )
       
   161             {
       
   162             iCleanupStack->PushL(aElement);
       
   163             }
       
   164         }
       
   165     }
       
   166 
       
   167 // -----------------------------------------------------------------------------
       
   168 // CharactersL
       
   169 // -----------------------------------------------------------------------------
       
   170 void CSConConMLGenerator::CharactersL( const TDesC8& aBuffer )
       
   171     {
       
   172     if( iCmdStack->Top() != 0 )
       
   173         {
       
   174         iCmdStack->Top()->SetDataL(aBuffer);
       
   175         }
       
   176     else
       
   177         {
       
   178         LOGGER_WRITE( "CSConConMLGenerator::CharactersL() : Leave KWBXMLParserErrorInvalidTag" );
       
   179         User::Leave(KWBXMLParserErrorInvalidTag);
       
   180         }
       
   181     }
       
   182     
       
   183 // -----------------------------------------------------------------------------
       
   184 // EndElementL
       
   185 // -----------------------------------------------------------------------------
       
   186 void CSConConMLGenerator::EndElementL( TWBXMLTag aTag )
       
   187     {
       
   188     if( iCmdStack->Top() != 0 )
       
   189         {
       
   190         CXMLElement::TAction action = iCmdStack->Top()->EndElementL( 
       
   191             iCallback, aTag );
       
   192         if( action != CXMLElement::ENone )
       
   193             {
       
   194             CXMLElement* elem = iCmdStack->Pop();
       
   195             if( iCleanupStack->Top() == elem )
       
   196                 {
       
   197                 iCleanupStack->Pop();
       
   198                 }
       
   199             if( action == CXMLElement::EPopAndDestroy )
       
   200                 {
       
   201                 delete elem;
       
   202                 }
       
   203             }
       
   204         }
       
   205     }
       
   206     
       
   207 // -----------------------------------------------------------------------------
       
   208 // WriteMUint32L
       
   209 // -----------------------------------------------------------------------------
       
   210 void CSConConMLGenerator::WriteMUint32L( TUint32 aValue )
       
   211     {
       
   212     TUint8 temp[5];
       
   213     TInt i(4);
       
   214     
       
   215     temp[i--] = TUint8(aValue & 0x7F);
       
   216     aValue >>= 7;
       
   217     while( aValue > 0 )
       
   218         {
       
   219         temp[i--] = TUint8((aValue & 0x7F) | 0x80);
       
   220         aValue >>= 7;
       
   221         }
       
   222             
       
   223     while( i < 4 )
       
   224         {
       
   225         iWBXMLWorkspace->WriteL(temp[++i]);
       
   226         }
       
   227     }
       
   228 
       
   229 // -----------------------------------------------------------------------------
       
   230 // WriteOpaqueDataL
       
   231 // -----------------------------------------------------------------------------
       
   232 void CSConConMLGenerator::WriteOpaqueDataL( const TDesC8& aData )
       
   233     {
       
   234     iWBXMLWorkspace->WriteL( OPAQUE );
       
   235     WriteMUint32L( aData.Size() );
       
   236     iWBXMLWorkspace->WriteL( aData );
       
   237     iXMLWorkspace->WriteL( aData );
       
   238     }
       
   239     
       
   240 // -----------------------------------------------------------------------------
       
   241 // WriteInlineStringL
       
   242 // -----------------------------------------------------------------------------
       
   243 void CSConConMLGenerator::WriteInlineStringL( const TDesC8& aData )
       
   244     {
       
   245     iWBXMLWorkspace->WriteL( STR_I );
       
   246     iWBXMLWorkspace->WriteL( aData );
       
   247     iWBXMLWorkspace->WriteL( 0 );
       
   248     iXMLWorkspace->WriteL( aData );
       
   249     }
       
   250     
       
   251 // -----------------------------------------------------------------------------
       
   252 // IndentL
       
   253 // -----------------------------------------------------------------------------
       
   254 void CSConConMLGenerator::IndentL()
       
   255     {
       
   256     for( TInt i = 0; i < iElemStack.Count() + iInitialIndentLevel; i++ )
       
   257         {
       
   258         iXMLWorkspace->WriteL(KXMLIndent());
       
   259         }
       
   260     }
       
   261 
       
   262 // -----------------------------------------------------------------------------
       
   263 // TranslateElement
       
   264 // -----------------------------------------------------------------------------    
       
   265 TPtrC8 CSConConMLGenerator::TranslateElement( TUint8 aElement )
       
   266     {
       
   267     TPtrC8 buf( KConMLElements );
       
   268     while( aElement-- )
       
   269         {
       
   270         TInt pos = buf.Find(KXMLElemenentSeparator());
       
   271         if( pos == KErrNotFound )
       
   272             {
       
   273             return TPtrC8();
       
   274             }
       
   275         buf.Set(buf.Right(buf.Length() - pos - 1));
       
   276         }
       
   277 
       
   278     TInt pos = buf.Find(KXMLElemenentSeparator());
       
   279     
       
   280     if( pos != KErrNotFound )
       
   281         {
       
   282         buf.Set(buf.Left(pos));
       
   283         }
       
   284     return buf;
       
   285     }
       
   286     
       
   287 // -----------------------------------------------------------------------------
       
   288 // EndDocument
       
   289 // -----------------------------------------------------------------------------
       
   290 void CSConConMLGenerator::EndDocument()
       
   291     {
       
   292     LOGGER_ENTERFN( "CSConConMLGenerator::EndDocument()" );
       
   293     LOGGER_LEAVEFN( "CSConConMLGenerator::EndDocument()" );
       
   294     }
       
   295 
       
   296     
       
   297 // -----------------------------------------------------------------------------
       
   298 // GenerateConMLDocument
       
   299 // -----------------------------------------------------------------------------
       
   300 TInt CSConConMLGenerator::GenerateConMLDocument ( ConML_ConMLPtr_t aContent )
       
   301     {
       
   302     LOGGER_ENTERFN( "CSConConMLGenerator::GenerateConMLDocument()" );
       
   303     iWBXMLWorkspace->Reset();
       
   304     iWBXMLWorkspace->BeginTransaction();
       
   305     iXMLWorkspace->Reset();
       
   306     iXMLWorkspace->BeginTransaction();
       
   307     TRAPD(result, AppendConMLL(aContent));
       
   308     LOGGER_WRITE_1( "CSConConMLGenerator::GenerateConMLDocument()\
       
   309      : returned %d", result );
       
   310     return HandleResult(result);
       
   311     }
       
   312     
       
   313 // -----------------------------------------------------------------------------
       
   314 // AppendConMLL
       
   315 // -----------------------------------------------------------------------------
       
   316 void CSConConMLGenerator::AppendConMLL( ConML_ConMLPtr_t aContent )
       
   317     {
       
   318     BeginDocumentL(KSConConMLVersion, KSConConMLPublicId, KSConConMLUTF8);
       
   319     BeginElementL(EConML, ETrue);
       
   320     AppendExecuteL( aContent->execute );
       
   321     AppendGetStatusL( aContent->getStatus );
       
   322     AppendCancelL( aContent->cancel );
       
   323     AppendStatusL( aContent->status );
       
   324     EndElementL(); // EConML
       
   325     }
       
   326 
       
   327 // -----------------------------------------------------------------------------
       
   328 // AppendExecuteL
       
   329 // -----------------------------------------------------------------------------
       
   330 void CSConConMLGenerator::AppendExecuteL( ConML_ExecutePtr_t aContent )
       
   331     {
       
   332     if ( aContent )
       
   333         {
       
   334         BeginElementL( EConMLExecute, ETrue );
       
   335         AppendPCDataL( EConMLID, aContent->id );
       
   336         AppendInstallL( aContent->install );
       
   337         AppendUnInstallL( aContent->unInstall );
       
   338         AppendListInstalledAppsL( aContent->listInstalledApps );
       
   339         AppendListDataOwnersL( aContent->listDataOwners );
       
   340         AppendSetBURModeL( aContent->setBurMode );
       
   341         AppendGetDataSizeL( aContent->getDataSize );
       
   342         AppendRequestDataL( aContent->requestData );
       
   343         AppendUpdateDeviceInfoL( aContent->updateDeviceInfo );
       
   344         AppendListPublicFilesL( aContent->listPublicFiles );
       
   345         AppendSupplyDataL( aContent->supplyData );
       
   346         AppendGetDataOwnerStatusL( aContent->getDataOwnerStatus );
       
   347         AppendGetMetadataL( aContent->getMetadata );
       
   348         
       
   349         if ( aContent->reboot )
       
   350             {
       
   351             BeginElementL( EConMLReboot );
       
   352             }
       
   353         EndElementL(); // EConMLExecute
       
   354         }
       
   355     }
       
   356 
       
   357 // -----------------------------------------------------------------------------
       
   358 // AppendSupplyDataL
       
   359 // -----------------------------------------------------------------------------
       
   360 void CSConConMLGenerator::AppendSupplyDataL( ConML_SupplyDataPtr_t aContent )
       
   361     {
       
   362     if ( aContent )
       
   363         {
       
   364         BeginElementL( EConMLSupplyData, ETrue );
       
   365         AppendSIDListL( aContent->sid );
       
   366         AppendResultsL( aContent->results );
       
   367         EndElementL(); // EConMLSupplyData
       
   368         }
       
   369     }
       
   370 // -----------------------------------------------------------------------------
       
   371 // AppendInstallL
       
   372 // -----------------------------------------------------------------------------
       
   373 void CSConConMLGenerator::AppendInstallL( ConML_InstallPtr_t aContent )
       
   374     {
       
   375     if ( aContent)
       
   376         {
       
   377         BeginElementL( EConMLInstall, ETrue );
       
   378         AppendPCDataL( EConMLName, aContent->name );
       
   379         if ( aContent->instParams) 
       
   380             {
       
   381             if ( aContent->instParams->param )
       
   382                 {
       
   383                 AppendInstParamsL( aContent->instParams );  
       
   384                 }
       
   385             else 
       
   386                 {
       
   387                 BeginElementL( EConMLInstParams );
       
   388                 }
       
   389             }
       
   390         AppendResultsL( aContent->results );
       
   391         EndElementL(); // EConMLInstall
       
   392         }
       
   393     }
       
   394 
       
   395 // -----------------------------------------------------------------------------
       
   396 // AppendCancelL
       
   397 // -----------------------------------------------------------------------------    
       
   398 void CSConConMLGenerator::AppendCancelL ( ConML_CancelPtr_t aContent )
       
   399     {
       
   400     if ( aContent )
       
   401         {
       
   402         BeginElementL( EConMLCancel, ETrue );
       
   403         AppendPCDataL ( EConMLID, aContent->id );
       
   404         AppendPCDataL( EConMLAll, aContent->all);
       
   405         EndElementL(); // EConMLCancel
       
   406         }
       
   407     }
       
   408 
       
   409 // -----------------------------------------------------------------------------
       
   410 // AppendStatusL
       
   411 // -----------------------------------------------------------------------------
       
   412 void CSConConMLGenerator::AppendStatusL ( ConML_StatusPtr_t aContent )
       
   413     {
       
   414     if ( aContent )
       
   415         {
       
   416         if ( aContent->task )
       
   417             {
       
   418             BeginElementL( EConMLStatus, ETrue );
       
   419             AppendTaskListL( aContent->task );
       
   420             EndElementL(); // EConMLStatus
       
   421             }
       
   422         else
       
   423             {
       
   424             BeginElementL( EConMLStatus );  
       
   425             }
       
   426         }
       
   427     }
       
   428     
       
   429 // -----------------------------------------------------------------------------
       
   430 // AppendGetStatusL
       
   431 // -----------------------------------------------------------------------------
       
   432 void CSConConMLGenerator::AppendGetStatusL( ConML_GetStatusPtr_t aContent )
       
   433     {
       
   434     if ( aContent )
       
   435         {
       
   436         BeginElementL( EConMLGetStatus, ETrue );
       
   437         AppendPCDataL( EConMLID, aContent->id);
       
   438         if ( aContent->all )
       
   439             {
       
   440             BeginElementL( EConMLAll );
       
   441             }
       
   442         EndElementL(); // EConMLGetStatus
       
   443         }
       
   444     }
       
   445 
       
   446 // -----------------------------------------------------------------------------
       
   447 // AppendRebootL
       
   448 // -----------------------------------------------------------------------------
       
   449 void CSConConMLGenerator::AppendRebootL( ConML_RebootPtr_t aContent )
       
   450     {
       
   451     if ( aContent )
       
   452         {
       
   453         BeginElementL( EConMLReboot, ETrue );
       
   454         AppendResultsL( aContent->results );
       
   455         EndElementL(); // EConMLReboot
       
   456         }
       
   457     }
       
   458     
       
   459 // -----------------------------------------------------------------------------
       
   460 // AppendTaskL
       
   461 // -----------------------------------------------------------------------------
       
   462 void CSConConMLGenerator::AppendTaskL( ConML_TaskPtr_t aContent )
       
   463     {
       
   464     if ( aContent )
       
   465         {
       
   466         BeginElementL( EConMLTask, ETrue );
       
   467         AppendPCDataL( EConMLID, aContent->id );
       
   468         AppendInstallL(aContent->install );
       
   469         AppendUnInstallL( aContent->unInstall );
       
   470         AppendListInstalledAppsL ( aContent->listInstalledApps );
       
   471         AppendListDataOwnersL ( aContent->listDataOwners );
       
   472         AppendSetBURModeL ( aContent->setBurMode );
       
   473         AppendGetDataSizeL ( aContent->getDataSize );
       
   474         AppendRequestDataL ( aContent->requestData );
       
   475         AppendUpdateDeviceInfoL ( aContent->updateDeviceInfo);
       
   476         AppendListPublicFilesL ( aContent->listPublicFiles );
       
   477         AppendGetDataOwnerStatusL( aContent->getDataOwnerStatus );
       
   478         AppendSupplyDataL( aContent->supplyData );
       
   479         AppendRebootL( aContent->reboot );
       
   480         AppendGetMetadataL( aContent->getMetadata );
       
   481         EndElementL();
       
   482         }
       
   483     }
       
   484     
       
   485 // -----------------------------------------------------------------------------
       
   486 // AppendTaskListL
       
   487 // -----------------------------------------------------------------------------
       
   488 void CSConConMLGenerator::AppendTaskListL( ConML_TaskListPtr_t aContent )
       
   489     {
       
   490     for ( ConML_TaskListPtr_t p = aContent; p && p->data; p=p->next )
       
   491         {
       
   492         AppendTaskL( p->data );
       
   493         }
       
   494     }
       
   495     
       
   496 // -----------------------------------------------------------------------------
       
   497 // AppendListInstalledAppsL
       
   498 // -----------------------------------------------------------------------------
       
   499 void CSConConMLGenerator::AppendListInstalledAppsL ( 
       
   500     ConML_ListInstalledAppsPtr_t aContent )
       
   501     {
       
   502     if ( aContent )
       
   503         {
       
   504         BeginElementL( EConMLListInstalledApps, ETrue );
       
   505         AppendDrivesL( aContent->drives );
       
   506         if ( aContent ->all )
       
   507             {
       
   508             BeginElementL( EConMLAll );
       
   509             }
       
   510         AppendResultsL( aContent->results );
       
   511         EndElementL(); // EConMLListInstalledApps
       
   512         }
       
   513     }
       
   514 
       
   515 // -----------------------------------------------------------------------------
       
   516 // AppendListDataOwnersL
       
   517 // -----------------------------------------------------------------------------
       
   518 void CSConConMLGenerator::AppendListDataOwnersL ( 
       
   519     ConML_ListDataOwnersPtr_t aContent )
       
   520     {
       
   521     if ( aContent )
       
   522         {
       
   523         if ( aContent->results )
       
   524             {
       
   525             BeginElementL( EConMLListDataOwners, ETrue );
       
   526             AppendResultsL( aContent->results );
       
   527             EndElementL(); // EConMLListDataOwners
       
   528             }
       
   529         else
       
   530             {
       
   531             BeginElementL( EConMLListDataOwners );          
       
   532             }
       
   533         }
       
   534     }
       
   535 
       
   536 // -----------------------------------------------------------------------------
       
   537 // CSConConMLGanerator::AppendBUROptionsL
       
   538 // -----------------------------------------------------------------------------
       
   539 void CSConConMLGenerator::AppendBUROptionsL( ConML_BUROptionsPtr_t aContent )
       
   540     {
       
   541     if ( aContent )
       
   542         {
       
   543         BeginElementL( EConMLBUROptions, ETrue );
       
   544         if ( aContent->requiresReboot )
       
   545             {
       
   546             BeginElementL( EConMLRequiresReboot );
       
   547             }
       
   548         if ( aContent->hasFiles )
       
   549             {
       
   550             AppendPCDataL( EConMLHasFiles, aContent->hasFiles );
       
   551             }
       
   552         if ( aContent->supportsInc )
       
   553             {
       
   554             BeginElementL( EConMLSupportsInc );
       
   555             }
       
   556         if ( aContent->delayToPrepareData )
       
   557             {
       
   558             BeginElementL( EConMLDelayToPrepareData );
       
   559             }
       
   560         EndElementL(); // EConMLBUROptions
       
   561         }
       
   562     }
       
   563 
       
   564 // -----------------------------------------------------------------------------
       
   565 // AppendSetBURModeL
       
   566 // -----------------------------------------------------------------------------
       
   567 void CSConConMLGenerator::AppendSetBURModeL( ConML_SetBURModePtr_t aContent )
       
   568     {
       
   569     if ( aContent )
       
   570         {
       
   571         BeginElementL( EConMLSetBURMode, ETrue );
       
   572         AppendDrivesL( aContent->drives );
       
   573         AppendPCDataL( EConMLPartialType, aContent->partialType );
       
   574         AppendPCDataL( EConMLIncType, aContent->incType );
       
   575         AppendResultsL( aContent->results );
       
   576         EndElementL(); //EConMLSetBURMode
       
   577         }
       
   578     }
       
   579     
       
   580 // -----------------------------------------------------------------------------
       
   581 // AppendUnInstallL
       
   582 // -----------------------------------------------------------------------------
       
   583 void CSConConMLGenerator::AppendUnInstallL( ConML_UnInstallPtr_t aContent )
       
   584     {
       
   585     if ( aContent )
       
   586         {
       
   587         BeginElementL( EConMLUnInstall, ETrue );
       
   588         AppendApplicationsL( aContent->applications );
       
   589         AppendInstParamsL( aContent->instParams );
       
   590         AppendResultsL( aContent->results );
       
   591         EndElementL(); // EConMLUnInstall
       
   592         }
       
   593     }
       
   594 
       
   595 // -----------------------------------------------------------------------------
       
   596 // AppendGetDataSizeL
       
   597 // -----------------------------------------------------------------------------
       
   598 void CSConConMLGenerator::AppendGetDataSizeL( ConML_GetDataSizePtr_t aContent )
       
   599     {
       
   600     if ( aContent )
       
   601         {
       
   602         BeginElementL( EConMLGetDataSize, ETrue );
       
   603         AppendDataOwnersL( aContent->dataOwners );
       
   604         AppendResultsL( aContent->results );
       
   605         EndElementL(); //EConMLGetDataSize
       
   606         }
       
   607     }
       
   608 
       
   609 // -----------------------------------------------------------------------------
       
   610 // AppendRequestDataL
       
   611 // -----------------------------------------------------------------------------
       
   612 void CSConConMLGenerator::AppendRequestDataL( ConML_RequestDataPtr_t aContent )
       
   613     {
       
   614     if ( aContent )
       
   615         {
       
   616         BeginElementL( EConMLRequestData, ETrue );
       
   617         AppendSIDListL( aContent->sid );
       
   618         AppendResultsL( aContent->results );
       
   619         EndElementL();//EConMLRequestData
       
   620         }
       
   621     }
       
   622 
       
   623 // -----------------------------------------------------------------------------
       
   624 // AppendUpdateDeviceInfoL
       
   625 // -----------------------------------------------------------------------------
       
   626 void CSConConMLGenerator::AppendUpdateDeviceInfoL( 
       
   627     ConML_UpdateDeviceInfoPtr_t aContent )
       
   628     {
       
   629     if ( aContent )
       
   630         {
       
   631         BeginElementL(EConMLUpdateDeviceInfo, ETrue);
       
   632         AppendDeviceInfoL( aContent-> deviceInfo );
       
   633         AppendResultsL( aContent->results );
       
   634         EndElementL();// EConMLUpdateDeviceInfo
       
   635         }
       
   636     }
       
   637 
       
   638 // -----------------------------------------------------------------------------
       
   639 // AppendListPublicFilesL
       
   640 // -----------------------------------------------------------------------------
       
   641 void CSConConMLGenerator::AppendListPublicFilesL( 
       
   642     ConML_ListPublicFilesPtr_t aContent )
       
   643     {
       
   644     if ( aContent )
       
   645         {
       
   646         BeginElementL( EConMLListPublicFiles, ETrue );
       
   647         AppendSIDListL ( aContent->sid );
       
   648         AppendResultsL( aContent->results );
       
   649         EndElementL(); // EConMLListPublicFiles
       
   650         }
       
   651     }
       
   652 
       
   653 // -----------------------------------------------------------------------------
       
   654 // AppendApplicationL
       
   655 // -----------------------------------------------------------------------------
       
   656 void CSConConMLGenerator::AppendApplicationL( ConML_ApplicationPtr_t aContent )
       
   657     {
       
   658     if ( aContent )
       
   659         {
       
   660         BeginElementL(EConMLApplication, ETrue );
       
   661         AppendPCDataL( EConMLName, aContent->name );
       
   662         AppendPCDataL( EConMLUID, aContent->uid );
       
   663         EndElementL(); //EConMLApplication
       
   664         }
       
   665     }
       
   666 
       
   667 // -----------------------------------------------------------------------------
       
   668 // AppendApplicationListL
       
   669 // -----------------------------------------------------------------------------
       
   670 void CSConConMLGenerator::AppendApplicationListL( 
       
   671     ConML_ApplicationListPtr_t aContent )
       
   672     {
       
   673     for ( ConML_ApplicationListPtr_t p = aContent; p && p->data; p = p->next )
       
   674         {
       
   675         AppendApplicationL( p->data );
       
   676         }
       
   677     }
       
   678 
       
   679 // -----------------------------------------------------------------------------
       
   680 // AppendApplicationsL
       
   681 // -----------------------------------------------------------------------------
       
   682 void CSConConMLGenerator::AppendApplicationsL( 
       
   683     ConML_ApplicationsPtr_t aContent )
       
   684     {
       
   685     if ( aContent )
       
   686         {
       
   687         BeginElementL( EConMLApplications, ETrue );
       
   688         AppendApplicationListL( aContent->application );
       
   689         EndElementL(); // EConMLApplications
       
   690         }
       
   691     }
       
   692 
       
   693 // -----------------------------------------------------------------------------
       
   694 // AppendParamL
       
   695 // -----------------------------------------------------------------------------
       
   696 void CSConConMLGenerator::AppendParamL( ConML_ParamPtr_t aContent )
       
   697     {
       
   698     if ( aContent )
       
   699         {
       
   700         BeginElementL( EConMLParam, ETrue );
       
   701         AppendPCDataL( EConMLName, aContent->name );
       
   702         AppendPCDataL( EConMLValue, aContent->value );
       
   703         EndElementL(); // EConMLParam
       
   704         }
       
   705     }
       
   706 
       
   707 // -----------------------------------------------------------------------------
       
   708 // AppendParamListL
       
   709 // -----------------------------------------------------------------------------
       
   710 void CSConConMLGenerator::AppendParamListL( ConML_ParamListPtr_t aContent )
       
   711     {
       
   712     for ( ConML_ParamListPtr_t p = aContent; p && p->data; p = p->next )
       
   713         {
       
   714         AppendParamL( p-> data );
       
   715         }
       
   716     }
       
   717 
       
   718 // -----------------------------------------------------------------------------
       
   719 // AppendInstParamsL
       
   720 // -----------------------------------------------------------------------------
       
   721 void CSConConMLGenerator::AppendInstParamsL( ConML_InstParamsPtr_t aContent )
       
   722     {
       
   723     if ( aContent )
       
   724         {
       
   725         BeginElementL( EConMLInstParams, ETrue );
       
   726         AppendParamListL( aContent->param );
       
   727         EndElementL(); //EConMLInstParams
       
   728         }
       
   729     }
       
   730 
       
   731 // -----------------------------------------------------------------------------
       
   732 // AppendProgressL
       
   733 // -----------------------------------------------------------------------------
       
   734 void CSConConMLGenerator::AppendProgressL( ConML_ProgressPtr_t aContent )
       
   735     {
       
   736     if ( aContent )
       
   737         {
       
   738         BeginElementL( EConMLProgress, ETrue );
       
   739         AppendPCDataL( EConMLValue, aContent->value );
       
   740         EndElementL(); // EconMLProgress
       
   741         }
       
   742     }
       
   743     
       
   744 // -----------------------------------------------------------------------------
       
   745 // AppendResultsL
       
   746 // -----------------------------------------------------------------------------
       
   747 void CSConConMLGenerator::AppendResultsL( ConML_ResultsPtr_t aContent )
       
   748     {
       
   749     if ( aContent )
       
   750         {
       
   751         BeginElementL( EConMLResults, ETrue );
       
   752         if ( aContent->complete )
       
   753             {
       
   754             BeginElementL( EConMLComplete );
       
   755             }
       
   756         AppendProgressL( aContent->progress );
       
   757         AppendApplicationsL( aContent->applications );
       
   758         AppendDataOwnersL( aContent->dataOwners );
       
   759         if ( aContent->filename )
       
   760             {
       
   761             AppendPCDataL( EConMLFilename, aContent->filename );
       
   762             }
       
   763         AppendPCDataL( EConMLData, aContent->data );
       
   764         if ( aContent->moreData )
       
   765             {
       
   766             BeginElementL( EConMLMoreData );
       
   767             }
       
   768         AppendDeviceInfoL( aContent->deviceInfo );
       
   769         AppendFilesL( aContent->files );
       
   770         EndElementL(); //EConMLResults
       
   771         }
       
   772     }
       
   773 
       
   774 // -----------------------------------------------------------------------------
       
   775 // AppendDriveL
       
   776 // -----------------------------------------------------------------------------
       
   777 void CSConConMLGenerator::AppendDriveL( ConML_DrivePtr_t aContent )
       
   778     {
       
   779     if ( aContent )
       
   780         {
       
   781         BeginElementL( EConMLDrive, ETrue );
       
   782         AppendPCDataL( EConMLName, aContent->name );
       
   783         EndElementL(); //EConMLDrive
       
   784         }
       
   785     }
       
   786 
       
   787 // -----------------------------------------------------------------------------
       
   788 // AppendDriveListL
       
   789 // -----------------------------------------------------------------------------
       
   790 void CSConConMLGenerator::AppendDriveListL( ConML_DriveListPtr_t aContent )
       
   791     {
       
   792     for ( ConML_DriveListPtr_t p =  aContent; p && p->data; p=p->next )
       
   793         {
       
   794         AppendDriveL( p->data );
       
   795         }
       
   796     }
       
   797 
       
   798 // -----------------------------------------------------------------------------
       
   799 // AppendDrivesL
       
   800 // -----------------------------------------------------------------------------
       
   801 void CSConConMLGenerator::AppendDrivesL( ConML_DrivesPtr_t aContent )
       
   802     {
       
   803     if ( aContent )
       
   804         {
       
   805         BeginElementL( EConMLDrives, ETrue );
       
   806         AppendDriveListL( aContent->drive );
       
   807         EndElementL(); // EConMLDrives
       
   808         }
       
   809     }
       
   810 
       
   811 // -----------------------------------------------------------------------------
       
   812 // AppendDataOwnersL
       
   813 // -----------------------------------------------------------------------------
       
   814 void CSConConMLGenerator::AppendDataOwnersL( ConML_DataOwnersPtr_t aContent )
       
   815     {
       
   816     if ( aContent )
       
   817         {
       
   818         BeginElementL( EConMLDataOwners, ETrue );
       
   819         AppendSIDListL( aContent->sid );
       
   820         EndElementL(); //EConMLDataOwners
       
   821         }
       
   822     }
       
   823 
       
   824 // -----------------------------------------------------------------------------
       
   825 // AppendGetDataOwnerStatusL
       
   826 // -----------------------------------------------------------------------------
       
   827 void CSConConMLGenerator::AppendGetDataOwnerStatusL
       
   828     ( ConML_GetDataOwnerStatusPtr_t aContent )
       
   829     {
       
   830     if ( aContent)
       
   831         {
       
   832         BeginElementL( EConMLGetDataOwnerStatus, ETrue );
       
   833         AppendDataOwnersL( aContent->dataOwners );
       
   834         AppendResultsL( aContent->results );
       
   835         EndElementL(); // EconMLGetDataOwnerStatus
       
   836         }
       
   837     }
       
   838 
       
   839 // -----------------------------------------------------------------------------
       
   840 // AppendGetMetadataL
       
   841 // -----------------------------------------------------------------------------
       
   842 void CSConConMLGenerator::AppendGetMetadataL
       
   843     ( ConML_GetMetadataPtr_t aContent )
       
   844     {
       
   845     if ( aContent)
       
   846         {
       
   847         BeginElementL( EConMLGetMetadata, ETrue );
       
   848         AppendPCDataL( EConMLFilename, aContent->filename );
       
   849         AppendResultsL( aContent->results );
       
   850         EndElementL(); // EConMLGetMetadata
       
   851         }
       
   852     }
       
   853 
       
   854 // -----------------------------------------------------------------------------
       
   855 // AppendPackageInfoL
       
   856 // -----------------------------------------------------------------------------
       
   857 void CSConConMLGenerator::AppendPackageInfoL ( ConML_PackageInfoPtr_t aContent )
       
   858     {
       
   859     if ( aContent )
       
   860         {
       
   861         BeginElementL( EConMLPackageInfo, ETrue );
       
   862         AppendPCDataL( EConMLName, aContent->name );
       
   863         EndElementL(); // EConMLPackageInfo
       
   864         }
       
   865     }
       
   866 
       
   867 // -----------------------------------------------------------------------------
       
   868 // AppendSIDL
       
   869 // -----------------------------------------------------------------------------
       
   870 void CSConConMLGenerator::AppendSIDL( ConML_SIDPtr_t aContent )
       
   871     {
       
   872     if ( aContent )
       
   873         {
       
   874         BeginElementL( EConMLSID, ETrue );
       
   875         AppendPCDataL( EConMLType, aContent->type );
       
   876         AppendPCDataL( EConMLUID, aContent->uid );
       
   877         AppendPCDataL( EConMLDataOwnerStatus, aContent->dataOwnerStatus );
       
   878         AppendDrivesL( aContent->drives );
       
   879         if ( aContent->size )
       
   880             {
       
   881             AppendPCDataL( EConMLSize, aContent->size ); 
       
   882             }
       
   883         AppendPackageInfoL( aContent->packageInfo );
       
   884         AppendBUROptionsL( aContent->burOptions );
       
   885         AppendPCDataL( EConMLTransferDataType, aContent->transferDataType );
       
   886         AppendPCDataL( EConMLData, aContent->data );
       
   887         if ( aContent->moreData)
       
   888             {
       
   889             BeginElementL(EConMLMoreData );
       
   890             }
       
   891         EndElementL(); // EconMLSID
       
   892         }
       
   893     }
       
   894     
       
   895 // -----------------------------------------------------------------------------
       
   896 // AppendSIDListL
       
   897 // -----------------------------------------------------------------------------
       
   898 void CSConConMLGenerator::AppendSIDListL( ConML_SIDListPtr_t aContent )
       
   899     {
       
   900     for ( ConML_SIDListPtr_t p = aContent; p && p->data; p=p->next )
       
   901         {
       
   902         AppendSIDL( p->data );
       
   903         }
       
   904     }
       
   905 
       
   906 // -----------------------------------------------------------------------------
       
   907 // AppendDeviceInfoL
       
   908 // -----------------------------------------------------------------------------
       
   909 void CSConConMLGenerator::AppendDeviceInfoL( ConML_DeviceInfoPtr_t aContent )
       
   910     {
       
   911     if ( aContent )
       
   912         {
       
   913         BeginElementL( EConMLDeviceInfo, ETrue );
       
   914         AppendPCDataL( EConMLVersion, aContent->version );
       
   915         AppendSupportedMethodsL ( aContent->supportedMethods );
       
   916         AppendPCDataL(EConMLMaxObjectSize, aContent->maxObjectSize );
       
   917         EndElementL(); // EConMLDeviceInfo
       
   918         }
       
   919     }
       
   920 
       
   921 // -----------------------------------------------------------------------------
       
   922 // AppendFilesL
       
   923 // -----------------------------------------------------------------------------
       
   924 void CSConConMLGenerator::AppendFilesL( ConML_FilesPtr_t aContent )
       
   925     {
       
   926     if ( aContent )
       
   927         {
       
   928         BeginElementL( EConMLFiles, ETrue );
       
   929         AppendFileListL( aContent->file );
       
   930         EndElementL(); // EConMLFiles
       
   931         }
       
   932     }
       
   933 
       
   934 // -----------------------------------------------------------------------------
       
   935 // AppendSupportedMethodsL
       
   936 // -----------------------------------------------------------------------------
       
   937 void CSConConMLGenerator::AppendSupportedMethodsL
       
   938     ( ConML_SupportedMethodsPtr_t aContent )
       
   939     {
       
   940     if ( aContent )
       
   941         {
       
   942         BeginElementL( EConMLSupportedMethods, ETrue );
       
   943         if  ( aContent->install )
       
   944             {
       
   945             BeginElementL( EConMLInstall );
       
   946             }
       
   947         if ( aContent->unInstall )
       
   948             {
       
   949             BeginElementL( EConMLUnInstall );
       
   950             }
       
   951         if ( aContent->listInstalledApps )
       
   952             {
       
   953             BeginElementL( EConMLListInstalledApps );
       
   954             }
       
   955         if ( aContent->listDataOwners )
       
   956             {
       
   957             BeginElementL( EConMLListDataOwners );
       
   958             }
       
   959         if ( aContent->setBurMode )
       
   960             {
       
   961             BeginElementL( EConMLSetBURMode );
       
   962             }
       
   963         if ( aContent->getDataSize )
       
   964             {
       
   965             BeginElementL( EConMLGetDataSize );
       
   966             }
       
   967         if ( aContent->requestData )
       
   968             {
       
   969             BeginElementL( EConMLRequestData );
       
   970             }
       
   971         if ( aContent->supplyData )
       
   972             {
       
   973             BeginElementL( EConMLSupplyData );
       
   974             }
       
   975         if ( aContent->reboot )
       
   976             {
       
   977             BeginElementL( EConMLReboot );
       
   978             }
       
   979         EndElementL(); // EConMLSupportedMethods
       
   980         }
       
   981     }
       
   982 
       
   983 // -----------------------------------------------------------------------------
       
   984 // AppendFileListL
       
   985 // -----------------------------------------------------------------------------
       
   986 void CSConConMLGenerator::AppendFileListL( ConML_FileListPtr_t  aContent )
       
   987     {
       
   988     if ( aContent )
       
   989         {
       
   990         for ( ConML_FileListPtr_t p = aContent; p && p->data; p = p->next )
       
   991             {
       
   992             AppendFileL(p->data );
       
   993             }
       
   994         }
       
   995     }
       
   996 
       
   997 // -----------------------------------------------------------------------------
       
   998 // AppendFileL
       
   999 // -----------------------------------------------------------------------------
       
  1000 void CSConConMLGenerator::AppendFileL( ConML_FilePtr_t aContent )
       
  1001     {
       
  1002     if ( aContent )
       
  1003         {
       
  1004         BeginElementL( EConMLFile, ETrue );
       
  1005         AppendPCDataL( EConMLName, aContent->name );
       
  1006         AppendPCDataL( EConMLModified, aContent->modified );
       
  1007         AppendPCDataL( EConMLSize, aContent->size );
       
  1008         AppendPCDataL( EConMLUserPerm, aContent->userPerm );
       
  1009         EndElementL(); // EConMLFile
       
  1010         }
       
  1011     }
       
  1012 
       
  1013 // -----------------------------------------------------------------------------
       
  1014 // HandleResult
       
  1015 // -----------------------------------------------------------------------------
       
  1016 TInt CSConConMLGenerator::HandleResult( TInt aResult, TInt aTreshold )
       
  1017     {
       
  1018     LOGGER_ENTERFN( "CSConConMLGenerator::HandleResult()" );
       
  1019     switch( aResult )
       
  1020         {
       
  1021         case KErrNone:
       
  1022             if( iWBXMLWorkspace->FreeSize() < aTreshold )
       
  1023                 {               
       
  1024                 iWBXMLWorkspace->Rollback();
       
  1025                 return KWBXMLGeneratorBufferFull;
       
  1026                 }
       
  1027             iWBXMLWorkspace->Commit();
       
  1028             return KWBXMLGeneratorOk;
       
  1029 
       
  1030         case KErrTooBig:
       
  1031             iWBXMLWorkspace->Rollback();
       
  1032             return KWBXMLGeneratorBufferFull;
       
  1033         }
       
  1034     LOGGER_WRITE_1( "CSConConMLGenerator::HandleResult() : returned %d", aResult);
       
  1035     return aResult;
       
  1036     }
       
  1037 
       
  1038 // -----------------------------------------------------------------------------
       
  1039 // BeginDocumentL
       
  1040 // -----------------------------------------------------------------------------
       
  1041 void CSConConMLGenerator::BeginDocumentL( 
       
  1042     TUint8 aVersion, 
       
  1043     TInt32 aPublicId, 
       
  1044     TUint32 aCharset, 
       
  1045     const TDesC8& aStringTbl )
       
  1046     {
       
  1047     LOGGER_ENTERFN( "CSConConMLGenerator::BeginDocumentL()" );
       
  1048     iWBXMLWorkspace->WriteL(aVersion);
       
  1049 
       
  1050     if( aPublicId <= 0 )
       
  1051         {
       
  1052         iWBXMLWorkspace->WriteL(0);
       
  1053         WriteMUint32L(-aPublicId);
       
  1054         }
       
  1055     else
       
  1056         {
       
  1057         WriteMUint32L(aPublicId);
       
  1058         }
       
  1059     WriteMUint32L(aCharset);
       
  1060     WriteMUint32L(aStringTbl.Size());
       
  1061     iWBXMLWorkspace->WriteL(aStringTbl);
       
  1062     LOGGER_LEAVEFN( "CSConConMLGenerator::BeginDocumentL()" );
       
  1063     }
       
  1064 
       
  1065 // -----------------------------------------------------------------------------
       
  1066 // BeginElementL
       
  1067 // -----------------------------------------------------------------------------
       
  1068 void CSConConMLGenerator::BeginElementL( 
       
  1069     TUint8 aElement, TBool aHasContent, TBool aHasAttributes )
       
  1070     {
       
  1071     IndentL();
       
  1072     iXMLWorkspace->WriteL(KXMLTagStart());
       
  1073     iXMLWorkspace->WriteL(TranslateElement(aElement));
       
  1074         
       
  1075     if( aHasAttributes )
       
  1076         {
       
  1077         aElement |= KWBXMLHasAttributes;
       
  1078         }
       
  1079         
       
  1080     if( aHasContent )
       
  1081         {
       
  1082         iXMLWorkspace->WriteL(KXMLTagEnd());
       
  1083         iElemStack.Insert(aElement, 0);
       
  1084         aElement |= KWBXMLHasContent;
       
  1085         }
       
  1086     else
       
  1087         {
       
  1088         iXMLWorkspace->WriteL(KXMLTagEndNoContent());
       
  1089         }
       
  1090 
       
  1091     if( !iDontNewLine )
       
  1092         {
       
  1093         iXMLWorkspace->WriteL(KXMLNewLine());
       
  1094         }
       
  1095     iDontNewLine = EFalse;
       
  1096 
       
  1097     WriteMUint32L(aElement);
       
  1098     }
       
  1099 
       
  1100 // -----------------------------------------------------------------------------
       
  1101 // EndElementL
       
  1102 // -----------------------------------------------------------------------------
       
  1103 void CSConConMLGenerator::EndElementL()
       
  1104     {
       
  1105     TUint8 elem = iElemStack[0];
       
  1106     iElemStack.Remove(0);
       
  1107     if( !iDontIndent )
       
  1108         {
       
  1109         IndentL();
       
  1110         }
       
  1111     iDontIndent = EFalse;
       
  1112     iXMLWorkspace->WriteL(KXMLTagStartEndTag());
       
  1113     iXMLWorkspace->WriteL(TranslateElement(elem));
       
  1114     iXMLWorkspace->WriteL(KXMLTagEnd());
       
  1115     iXMLWorkspace->WriteL(KXMLNewLine());
       
  1116     
       
  1117     iWBXMLWorkspace->WriteL(END);
       
  1118     }
       
  1119 
       
  1120 // -----------------------------------------------------------------------------
       
  1121 // AddElementL
       
  1122 // -----------------------------------------------------------------------------
       
  1123 void CSConConMLGenerator::AddElementL( 
       
  1124     TUint8 aElement, const TDesC8& aContent, const TWBXMLContentFormat aFormat )
       
  1125     {
       
  1126     iDontNewLine = ETrue;
       
  1127     BeginElementL(aElement, ETrue);
       
  1128     if( aFormat == EWBXMLContentFormatOpaque )
       
  1129         {
       
  1130         WriteOpaqueDataL(aContent);
       
  1131         }
       
  1132     else
       
  1133         {
       
  1134         WriteInlineStringL(aContent);
       
  1135         }
       
  1136     iDontIndent = ETrue;
       
  1137     EndElementL();
       
  1138     }
       
  1139 
       
  1140 // -----------------------------------------------------------------------------
       
  1141 // AppendPCDataL
       
  1142 // -----------------------------------------------------------------------------
       
  1143 void CSConConMLGenerator::AppendPCDataL( TUint8 aElement, pcdataPtr_t aContent )
       
  1144     {
       
  1145     if( !aContent )
       
  1146         {
       
  1147         return;
       
  1148         }
       
  1149 
       
  1150     if( aContent->contentType == SML_PCDATA_OPAQUE )
       
  1151         {
       
  1152         AddElementL(aElement, 
       
  1153                     TPtrC8((TUint8*)aContent->content, 
       
  1154                     aContent->length));
       
  1155         }
       
  1156     else
       
  1157         {
       
  1158         LOGGER_WRITE( "CSConConMLGenerator::AppendPCDataL() : Data type not Opaque - ignoring " );
       
  1159         }
       
  1160     }
       
  1161     
       
  1162 // -----------------------------------------------------------------------------
       
  1163 // WBXMLDocument
       
  1164 // -----------------------------------------------------------------------------
       
  1165 TPtrC8 CSConConMLGenerator::WBXMLDocument()
       
  1166     {
       
  1167     return iWBXMLWorkspace->Buffer();
       
  1168     }
       
  1169     
       
  1170 // -----------------------------------------------------------------------------
       
  1171 // XMLDocument
       
  1172 // -----------------------------------------------------------------------------
       
  1173 TPtrC8 CSConConMLGenerator::XMLDocument()
       
  1174     {
       
  1175     return iXMLWorkspace->Buffer();
       
  1176     }