connectivitymodules/SeCon/wbxml/conmlhandler/src/sconconmldtd.cpp
branchRCL_3
changeset 42 0aa8cc770c8a
parent 40 453dfc402455
child 43 4a793f564d72
equal deleted inserted replaced
40:453dfc402455 42:0aa8cc770c8a
     1 /*
       
     2 * Copyright (c) 2005-2008 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 #include "sconconmldtd.h"
       
    20 #include "sconconmltags.h"
       
    21 #include "sconconmlhandler.h"
       
    22 #include "sconconmlhandlererror.h"
       
    23 #include "debug.h"
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // Macros
       
    27 // -----------------------------------------------------------------------------
       
    28 #define CHECK_NO_DUPLICATE(a) if( a ) { User::Leave( KWBXMLParserErrorinvalidDocument ); }
       
    29 
       
    30 // -----------------------------------------------------------------------------
       
    31 // pcdata_s
       
    32 // -----------------------------------------------------------------------------
       
    33 pcdata_s::pcdata_s( const pcdataType_t aType, const pcdataExtension_t aExt )
       
    34 	: contentType(aType), extension(aExt)
       
    35     {
       
    36     }
       
    37 
       
    38 pcdata_s::pcdata_s() : contentType(SML_PCDATA_OPAQUE), 
       
    39                        extension(SML_EXT_UNDEFINED)
       
    40     {
       
    41     }
       
    42 
       
    43 pcdata_s::~pcdata_s()
       
    44     {
       
    45     FreeContent();
       
    46     }
       
    47 
       
    48 void pcdata_s::FreeContent()
       
    49     {
       
    50     User::Free(content);
       
    51     content = 0;
       
    52     }
       
    53 
       
    54 void pcdata_s::SetDataL( const TDesC8& aData )
       
    55     {
       
    56     FreeContent();
       
    57     length = aData.Length();
       
    58     content = User::AllocL(length);
       
    59     Mem::Copy(content, aData.Ptr(), length);
       
    60     }
       
    61 
       
    62 TPtrC8 pcdata_s::Data() const
       
    63     {
       
    64     return TPtrC8((TUint8*)content, length);
       
    65     }
       
    66 
       
    67 void pcdata_s::TruncateL( TInt aConsumed )
       
    68     {
       
    69     HBufC8* buffer = TPtrC8((TUint8*)content + aConsumed, 
       
    70                              length - aConsumed).AllocLC();
       
    71     SetDataL(*buffer);
       
    72     CleanupStack::PopAndDestroy(); // buffer
       
    73     }
       
    74 
       
    75 pcdata_list_s::pcdata_list_s()
       
    76     {
       
    77     }
       
    78 
       
    79 pcdata_list_s::~pcdata_list_s()
       
    80     {
       
    81     delete data;
       
    82     delete next;
       
    83     }
       
    84 
       
    85 // -----------------------------------------------------------------------------
       
    86 // AddDriveL
       
    87 // -----------------------------------------------------------------------------
       
    88 CXMLElement* AddDriveL(  ConML_DriveListPtr_t* aList )
       
    89     {
       
    90     ConML_DriveListPtr_t itemL = new ( ELeave ) ConML_DriveList_t();
       
    91     CleanupStack::PushL( itemL );
       
    92     itemL->data = new ( ELeave ) ConML_Drive_t();
       
    93     GenericListAddL(aList, itemL);
       
    94     CleanupStack::Pop(); // itemL
       
    95     return itemL->data;
       
    96     }
       
    97 
       
    98 // -----------------------------------------------------------------------------
       
    99 // AddSIDL
       
   100 // -----------------------------------------------------------------------------
       
   101 CXMLElement* AddSIDL( ConML_SIDListPtr_t * aList )
       
   102     {
       
   103     ConML_SIDListPtr_t itemL = new ( ELeave ) ConML_SIDList_t();
       
   104     CleanupStack::PushL( itemL );
       
   105     itemL->data = new ( ELeave ) ConML_SID_t();
       
   106     GenericListAddL(aList, itemL);
       
   107     CleanupStack::Pop(); // itemL
       
   108     return itemL->data;
       
   109     }
       
   110 		
       
   111 // -----------------------------------------------------------------------------
       
   112 // AddFileL
       
   113 // -----------------------------------------------------------------------------
       
   114 CXMLElement* AddFileL( ConML_FileListPtr_t * aList )
       
   115     {
       
   116     ConML_FileListPtr_t itemL = new ( ELeave ) ConML_FileList_t();
       
   117     CleanupStack::PushL( itemL );
       
   118     itemL->data = new ( ELeave ) ConML_File_t();
       
   119     GenericListAddL(aList, itemL);
       
   120     CleanupStack::Pop(); // itemL
       
   121     return itemL->data;
       
   122     }
       
   123 
       
   124 // -----------------------------------------------------------------------------
       
   125 // AddApplicationL
       
   126 // -----------------------------------------------------------------------------
       
   127 CXMLElement* AddApplicationL( ConML_ApplicationListPtr_t * aList )
       
   128     {   
       
   129     ConML_ApplicationListPtr_t itemL = new ( ELeave ) ConML_ApplicationList_t();
       
   130     CleanupStack::PushL( itemL );
       
   131     itemL->data = new ( ELeave ) ConML_Application_t();
       
   132     GenericListAddL(aList, itemL);
       
   133     CleanupStack::Pop(); // itemL
       
   134     return itemL->data;
       
   135     }
       
   136 
       
   137 // -----------------------------------------------------------------------------
       
   138 // AddTaskL
       
   139 // -----------------------------------------------------------------------------
       
   140 CXMLElement* AddTaskL( ConML_TaskListPtr_t * aList )
       
   141     {
       
   142     ConML_TaskListPtr_t itemL = new ( ELeave ) ConML_TaskList_t();
       
   143     CleanupStack::PushL( itemL );
       
   144     itemL->data = new ( ELeave ) ConML_Task_t();
       
   145     GenericListAddL(aList, itemL);
       
   146     CleanupStack::Pop(); // itemL
       
   147     return itemL->data;
       
   148     }
       
   149 	
       
   150 // -----------------------------------------------------------------------------
       
   151 // AddParamL
       
   152 // -----------------------------------------------------------------------------
       
   153 CXMLElement* AddParamL( ConML_ParamListPtr_t * aList )
       
   154     {
       
   155     ConML_ParamListPtr_t itemL = new ( ELeave ) ConML_ParamList_t();
       
   156     CleanupStack::PushL( itemL );
       
   157     itemL->data = new ( ELeave ) ConML_Param_t();
       
   158     GenericListAddL(aList, itemL);
       
   159     CleanupStack::Pop(); // itemL
       
   160     return itemL->data;
       
   161     }
       
   162 	
       
   163 // -----------------------------------------------------------------------------
       
   164 // ConML_Drive_s
       
   165 // -----------------------------------------------------------------------------
       
   166 ConML_Drive_s::ConML_Drive_s()
       
   167     {
       
   168     }
       
   169 
       
   170 ConML_Drive_s::~ConML_Drive_s()
       
   171     {
       
   172     delete name;
       
   173     }
       
   174 
       
   175 CXMLElement* ConML_Drive_s::BeginElementL( 
       
   176     TUint8 aTag, const TXMLElementParams& /*aParams*/ )
       
   177     {
       
   178     switch ( aTag )
       
   179         {
       
   180         case EConMLName:
       
   181             CHECK_NO_DUPLICATE ( name );
       
   182             name = new ( ELeave ) pcdata_t();
       
   183             return name;
       
   184 				
       
   185         default:
       
   186             LOGGER_WRITE_1( "ConML_Drive_s::BeginElement() : Unknown element  %02x", aTag );
       
   187             User::Leave( KWBXMLParserErrorInvalidTag );
       
   188         }
       
   189     return KErrNone;
       
   190     }
       
   191 
       
   192 // -----------------------------------------------------------------------------
       
   193 // ConML_DriveList_s
       
   194 // -----------------------------------------------------------------------------
       
   195 ConML_DriveList_s::ConML_DriveList_s()	
       
   196     {
       
   197     }
       
   198 
       
   199 ConML_DriveList_s::~ConML_DriveList_s()	
       
   200     {
       
   201     delete data;
       
   202     delete next;
       
   203     }
       
   204 
       
   205 // -----------------------------------------------------------------------------
       
   206 // ConML_Drives_s
       
   207 // -----------------------------------------------------------------------------
       
   208 ConML_Drives_s::ConML_Drives_s()
       
   209     {
       
   210     }
       
   211 	
       
   212 ConML_Drives_s::~ConML_Drives_s()
       
   213     {
       
   214     delete drive;
       
   215     }
       
   216 	
       
   217 CXMLElement* ConML_Drives_s::BeginElementL( 
       
   218     TUint8 aTag, const TXMLElementParams& /*aParams*/ )
       
   219     {
       
   220     switch ( aTag )
       
   221         {
       
   222         case EConMLDrive:
       
   223             return AddDriveL ( &drive );
       
   224 	
       
   225         default:
       
   226             LOGGER_WRITE_1( "ConML_Drives_s::BeginElement()\
       
   227              : Unknown element  %02x ", aTag );
       
   228             User::Leave( KWBXMLParserErrorInvalidTag );
       
   229         }
       
   230     return KErrNone;
       
   231     }
       
   232 	
       
   233 // -----------------------------------------------------------------------------
       
   234 // ConML_BUROptions_s
       
   235 // -----------------------------------------------------------------------------
       
   236 ConML_BUROptions_s::ConML_BUROptions_s()
       
   237     {
       
   238     }
       
   239 
       
   240 ConML_BUROptions_s::~ConML_BUROptions_s()
       
   241     {
       
   242     delete requiresReboot;
       
   243     delete hasFiles;
       
   244     delete supportsInc;
       
   245     delete delayToPrepareData;
       
   246     }
       
   247 
       
   248 CXMLElement* ConML_BUROptions_s::BeginElementL ( 
       
   249         TUint8 aTag, const TXMLElementParams& /*aParams*/ )
       
   250     {
       
   251     switch ( aTag )
       
   252         {
       
   253         case EConMLRequiresReboot:
       
   254             CHECK_NO_DUPLICATE ( requiresReboot );
       
   255             requiresReboot = new ( ELeave ) pcdata_t();
       
   256             return requiresReboot;
       
   257 		
       
   258         case EConMLHasFiles:
       
   259             CHECK_NO_DUPLICATE ( hasFiles );
       
   260             hasFiles = new ( ELeave ) pcdata_t();
       
   261             return hasFiles;
       
   262 			
       
   263         case EConMLSupportsInc:
       
   264             CHECK_NO_DUPLICATE ( supportsInc );
       
   265             supportsInc = new ( ELeave ) pcdata_t();
       
   266             return supportsInc;
       
   267 		
       
   268         case EConMLDelayToPrepareData:
       
   269             CHECK_NO_DUPLICATE ( delayToPrepareData );
       
   270             delayToPrepareData = new ( ELeave ) pcdata_t();
       
   271             return delayToPrepareData;
       
   272 				
       
   273         default:
       
   274             LOGGER_WRITE_1( "ConML_BUROptions_s::BeginElement()\
       
   275              : Unknown element  %02x ", aTag );
       
   276             User::Leave( KWBXMLParserErrorInvalidTag );
       
   277         }
       
   278     return KErrNone;
       
   279     }
       
   280 
       
   281 // -----------------------------------------------------------------------------
       
   282 // ConML_PackageInfo_s
       
   283 // -----------------------------------------------------------------------------
       
   284 ConML_PackageInfo_s::ConML_PackageInfo_s()
       
   285     {
       
   286     }
       
   287 
       
   288 ConML_PackageInfo_s::~ConML_PackageInfo_s()
       
   289     {
       
   290     delete name;
       
   291     }
       
   292 
       
   293 CXMLElement* ConML_PackageInfo_s::BeginElementL( 
       
   294     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   295     {
       
   296     switch ( aTag )
       
   297         {
       
   298         case EConMLName:
       
   299             CHECK_NO_DUPLICATE ( name )
       
   300             name = new ( ELeave ) pcdata_t();
       
   301             return name;
       
   302 								
       
   303         default:
       
   304             LOGGER_WRITE_1( "ConML_PackageInfo_s::BeginElement()\
       
   305              : Unknown element  %02x ", aTag );
       
   306             User::Leave( KWBXMLParserErrorInvalidTag );
       
   307         }
       
   308     return KErrNone;
       
   309     }
       
   310 
       
   311 
       
   312 // -----------------------------------------------------------------------------
       
   313 // ConML_SID_s
       
   314 // -----------------------------------------------------------------------------
       
   315 ConML_SID_s::ConML_SID_s()
       
   316     {
       
   317     }
       
   318 
       
   319 ConML_SID_s::~ConML_SID_s()
       
   320     {
       
   321     delete type;
       
   322     delete uid;
       
   323     delete drives;
       
   324     delete packageInfo;
       
   325     delete burOptions;
       
   326     delete size;
       
   327     delete transferDataType;
       
   328     delete data;
       
   329     delete moreData;
       
   330     delete dataOwnerStatus;
       
   331     }
       
   332 
       
   333 CXMLElement* ConML_SID_s::BeginElementL( 
       
   334     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   335     {
       
   336     switch ( aTag )
       
   337         {
       
   338         case EConMLType:
       
   339             CHECK_NO_DUPLICATE ( type );
       
   340             type = new ( ELeave ) pcdata_t();
       
   341             return type;
       
   342 		
       
   343         case EConMLUID:
       
   344             CHECK_NO_DUPLICATE ( uid )
       
   345             uid = new ( ELeave ) pcdata_t();
       
   346             return uid;
       
   347 		
       
   348         case EConMLDrives:
       
   349             drives = new ( ELeave ) ConML_Drives_t();
       
   350             return drives;
       
   351 		
       
   352         case EConMLPackageInfo:
       
   353             CHECK_NO_DUPLICATE ( packageInfo );
       
   354             packageInfo = new ( ELeave ) ConML_PackageInfo_t();
       
   355             return packageInfo;
       
   356 		
       
   357         case EConMLBUROptions:
       
   358             CHECK_NO_DUPLICATE ( burOptions )
       
   359             burOptions = new ( ELeave )	ConML_BUROptions_t();
       
   360             return burOptions;
       
   361 			
       
   362         case EConMLSize:
       
   363             CHECK_NO_DUPLICATE ( size );
       
   364             size = new ( ELeave ) pcdata_t();
       
   365             return size;
       
   366 		
       
   367         case EConMLTransferDataType:
       
   368             CHECK_NO_DUPLICATE ( transferDataType );
       
   369             transferDataType = new ( ELeave ) pcdata_t();
       
   370             return transferDataType;
       
   371 		
       
   372         case EConMLData:
       
   373             CHECK_NO_DUPLICATE ( data );
       
   374             data = new ( ELeave ) pcdata_t();
       
   375             return data;
       
   376 		
       
   377         case EConMLMoreData:
       
   378             CHECK_NO_DUPLICATE ( moreData );
       
   379             moreData = new ( ELeave ) pcdata_t();
       
   380             return moreData;
       
   381 		
       
   382         case EConMLDataOwnerStatus:
       
   383             CHECK_NO_DUPLICATE ( dataOwnerStatus );
       
   384             dataOwnerStatus = new ( ELeave ) pcdata_t();
       
   385             return dataOwnerStatus;
       
   386 		
       
   387         default:
       
   388             LOGGER_WRITE_1( "ConML_SID_s::BeginElement()\
       
   389              : Unknown element  %02x ", aTag );
       
   390             User::Leave( KWBXMLParserErrorInvalidTag );
       
   391         }
       
   392     return KErrNone;
       
   393     }
       
   394 	
       
   395 // -----------------------------------------------------------------------------
       
   396 // ConML_SIDList_s
       
   397 // -----------------------------------------------------------------------------
       
   398 ConML_SIDList_s::ConML_SIDList_s()
       
   399     {
       
   400     }
       
   401 	
       
   402 ConML_SIDList_s::~ConML_SIDList_s()
       
   403     {
       
   404     delete data;
       
   405     delete next;
       
   406     }
       
   407 	
       
   408 // -----------------------------------------------------------------------------
       
   409 // ConML_DataOwners_s
       
   410 // -----------------------------------------------------------------------------
       
   411 ConML_DataOwners_s::ConML_DataOwners_s()
       
   412     {
       
   413     }
       
   414 
       
   415 ConML_DataOwners_s::~ConML_DataOwners_s()
       
   416     {
       
   417     delete sid;
       
   418     }
       
   419 
       
   420 CXMLElement* ConML_DataOwners_s::BeginElementL(
       
   421     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   422     {
       
   423     switch ( aTag )
       
   424         {
       
   425         case EConMLSID:
       
   426             return AddSIDL( &sid );
       
   427 				
       
   428         default:
       
   429             LOGGER_WRITE_1( "ConML_DataOwners_s::BeginElement()\
       
   430              : Unknown element  %02x ", aTag);
       
   431             User::Leave( KWBXMLParserErrorInvalidTag );
       
   432         }
       
   433     return KErrNone;
       
   434     }
       
   435 
       
   436 // -----------------------------------------------------------------------------
       
   437 // ConML_Application_s
       
   438 // -----------------------------------------------------------------------------
       
   439 ConML_Application_s::ConML_Application_s()
       
   440     {
       
   441     }
       
   442 	
       
   443 ConML_Application_s::~ConML_Application_s()
       
   444     {
       
   445     delete name;
       
   446     delete uid;
       
   447     }
       
   448 
       
   449 CXMLElement* ConML_Application_s::BeginElementL( 
       
   450     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   451     {
       
   452     switch ( aTag )
       
   453     	{
       
   454     	case EConMLName:
       
   455             CHECK_NO_DUPLICATE ( name );
       
   456             name = new ( ELeave ) pcdata_t();
       
   457             return name;
       
   458 		
       
   459         case EConMLUID:
       
   460             CHECK_NO_DUPLICATE ( uid );
       
   461             uid = new ( ELeave ) pcdata_t();
       
   462             return uid;
       
   463 		
       
   464         default:
       
   465             LOGGER_WRITE_1( "ConML_Application_s::BeginElement()\
       
   466              : Unknown element  %02x ", aTag );
       
   467             User::Leave( KWBXMLParserErrorInvalidTag );
       
   468         }
       
   469     return KErrNone;
       
   470     }
       
   471 
       
   472 // -----------------------------------------------------------------------------
       
   473 // ConML_ApplicationList_s
       
   474 // -----------------------------------------------------------------------------
       
   475 ConML_ApplicationList_s::ConML_ApplicationList_s()
       
   476     {
       
   477     }
       
   478 
       
   479 ConML_ApplicationList_s::~ConML_ApplicationList_s()
       
   480     {
       
   481     delete data;
       
   482     delete next;
       
   483     }
       
   484 	
       
   485 // -----------------------------------------------------------------------------
       
   486 // ConML_Applications_s
       
   487 // -----------------------------------------------------------------------------
       
   488 ConML_Applications_s::ConML_Applications_s()	
       
   489     {
       
   490     }
       
   491 
       
   492 ConML_Applications_s::~ConML_Applications_s()	
       
   493     {
       
   494     delete application;
       
   495     }
       
   496 	
       
   497 CXMLElement* ConML_Applications_s::BeginElementL(
       
   498     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   499     {
       
   500     switch ( aTag )
       
   501         {
       
   502         case EConMLApplication:
       
   503             return AddApplicationL( &application );
       
   504 				
       
   505         default:
       
   506             LOGGER_WRITE_1( "ConML_DataOwners_s::BeginElement()\
       
   507              : Unknown element  %02x ", aTag );
       
   508             User::Leave( KWBXMLParserErrorInvalidTag );
       
   509         }
       
   510     return KErrNone;
       
   511     }
       
   512 	
       
   513 // -----------------------------------------------------------------------------
       
   514 // ConML_SupportedMethod_s
       
   515 // -----------------------------------------------------------------------------
       
   516 ConML_SupportedMethods_s::ConML_SupportedMethods_s()
       
   517     {
       
   518     }
       
   519 
       
   520 ConML_SupportedMethods_s::~ConML_SupportedMethods_s()
       
   521     {
       
   522     delete install;
       
   523     delete unInstall;
       
   524     delete setInstParams;
       
   525     delete listInstalledApps;
       
   526     delete listDataOwners;
       
   527     delete setBurMode;
       
   528     delete getDataSize;
       
   529     delete requestData;
       
   530     delete supplyData;
       
   531     delete reboot;
       
   532     }
       
   533 
       
   534 CXMLElement* ConML_SupportedMethods_s::BeginElementL(
       
   535     TUint8 aTag, const TXMLElementParams& /*aParams*/ )
       
   536     {
       
   537     switch ( aTag )
       
   538         {
       
   539         case EConMLInstall:
       
   540             CHECK_NO_DUPLICATE ( install );
       
   541             install = new ( ELeave ) pcdata_t();
       
   542             return install;
       
   543 		
       
   544         case EConMLUnInstall:
       
   545             CHECK_NO_DUPLICATE ( unInstall );
       
   546             unInstall = new ( ELeave ) pcdata_t();
       
   547             return unInstall;
       
   548 	
       
   549         case EConMLListInstalledApps:
       
   550             CHECK_NO_DUPLICATE ( listInstalledApps );
       
   551             listInstalledApps = new ( ELeave ) pcdata_t();
       
   552             return listInstalledApps;
       
   553 		
       
   554         case EConMLListDataOwners:
       
   555             CHECK_NO_DUPLICATE ( listDataOwners );
       
   556             listDataOwners = new ( ELeave ) pcdata_t();
       
   557             return listDataOwners;
       
   558 		
       
   559         case EConMLSetBURMode:
       
   560             CHECK_NO_DUPLICATE ( setBurMode );
       
   561             setBurMode = new ( ELeave ) pcdata_t();
       
   562             return setBurMode;
       
   563 		
       
   564         case EConMLGetDataSize:
       
   565             CHECK_NO_DUPLICATE ( getDataSize );
       
   566             getDataSize = new ( ELeave ) pcdata_t();
       
   567             return getDataSize;
       
   568 		
       
   569         case EConMLRequestData:
       
   570             CHECK_NO_DUPLICATE ( requestData );
       
   571             requestData = new ( ELeave ) pcdata_t();
       
   572             return requestData;
       
   573 		
       
   574         case EConMLSupplyData:
       
   575             CHECK_NO_DUPLICATE (supplyData );
       
   576             supplyData = new ( ELeave ) pcdata_t();
       
   577             return supplyData;
       
   578 		
       
   579         case EConMLReboot:
       
   580             CHECK_NO_DUPLICATE ( reboot );
       
   581             reboot = new ( ELeave ) pcdata_t();
       
   582             return reboot;
       
   583 		
       
   584         default:
       
   585             LOGGER_WRITE_1( "ConML_SupportedMethods_s::\
       
   586             BeginElement() : Unknown element  %02x ", aTag );
       
   587             User::Leave( KWBXMLParserErrorInvalidTag );
       
   588         }
       
   589     return KErrNone;
       
   590     }
       
   591 
       
   592 // -----------------------------------------------------------------------------
       
   593 // ConML_DeviceInfo_s
       
   594 // -----------------------------------------------------------------------------
       
   595 ConML_DeviceInfo_s::ConML_DeviceInfo_s()
       
   596     {
       
   597     }
       
   598 
       
   599 ConML_DeviceInfo_s::~ConML_DeviceInfo_s()
       
   600     {
       
   601     delete version;
       
   602     delete supportedMethods;
       
   603     delete maxObjectSize;
       
   604     }
       
   605 
       
   606 CXMLElement* ConML_DeviceInfo_s::BeginElementL(
       
   607     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   608     {
       
   609     switch ( aTag )
       
   610         {
       
   611         case EConMLVersion:
       
   612             CHECK_NO_DUPLICATE (version);
       
   613             version = new ( ELeave ) pcdata_t();
       
   614             return version;
       
   615 		
       
   616         case EConMLSupportedMethods:
       
   617             CHECK_NO_DUPLICATE ( supportedMethods);
       
   618             supportedMethods = new ( ELeave ) ConML_SupportedMethods_t();
       
   619             return supportedMethods;
       
   620 		
       
   621         case EConMLMaxObjectSize:
       
   622             CHECK_NO_DUPLICATE ( maxObjectSize );
       
   623             maxObjectSize = new ( ELeave ) pcdata_t();
       
   624             return maxObjectSize;
       
   625 		
       
   626         default:
       
   627             LOGGER_WRITE_1( "ConML_DeviceInfo_s::BeginElement()\
       
   628              : Unknown element %d", aTag );
       
   629             User::Leave( KWBXMLParserErrorInvalidTag );
       
   630         }
       
   631     return KErrNone;
       
   632     }
       
   633 
       
   634 // -----------------------------------------------------------------------------
       
   635 // ConML_DeviceInfo_s
       
   636 // -----------------------------------------------------------------------------
       
   637 ConML_File_s::ConML_File_s()	
       
   638     {
       
   639     }
       
   640 
       
   641 ConML_File_s::~ConML_File_s()	
       
   642     {
       
   643     delete name;
       
   644     delete modified;
       
   645     delete size;
       
   646     delete userPerm;
       
   647     }
       
   648 
       
   649 CXMLElement* ConML_File_s::BeginElementL( 
       
   650     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   651     {
       
   652     switch ( aTag )
       
   653         {
       
   654         case EConMLName:
       
   655             CHECK_NO_DUPLICATE ( name );
       
   656             name = new ( ELeave ) pcdata_t();
       
   657             return name;
       
   658 		
       
   659         case EConMLModified:
       
   660             CHECK_NO_DUPLICATE ( modified );
       
   661             modified = new ( ELeave ) pcdata_t();
       
   662             return modified;
       
   663 		
       
   664         case EConMLSize:
       
   665             CHECK_NO_DUPLICATE ( size );
       
   666             size = new ( ELeave ) pcdata_t();
       
   667             return size;
       
   668 		
       
   669         case EConMLUserPerm:
       
   670             CHECK_NO_DUPLICATE ( userPerm );
       
   671             userPerm = new ( ELeave ) pcdata_t();
       
   672             return userPerm;
       
   673 		
       
   674         default:
       
   675             LOGGER_WRITE_1( "ConML_File_s::BeginElement()\
       
   676              : Unknown element %d", aTag );
       
   677             User::Leave( KWBXMLParserErrorInvalidTag );
       
   678         }
       
   679     return KErrNone;
       
   680     }
       
   681 
       
   682 // -----------------------------------------------------------------------------
       
   683 // ConML_FileList_s
       
   684 // -----------------------------------------------------------------------------
       
   685 ConML_FileList_s::ConML_FileList_s()
       
   686     {
       
   687     }
       
   688 	
       
   689 ConML_FileList_s::~ConML_FileList_s()
       
   690     {
       
   691     delete data;
       
   692     delete next;
       
   693     }	
       
   694 
       
   695 // -----------------------------------------------------------------------------
       
   696 // ConML_Files_s
       
   697 // -----------------------------------------------------------------------------
       
   698 ConML_Files_s::ConML_Files_s()
       
   699     {
       
   700     }
       
   701 
       
   702 ConML_Files_s::~ConML_Files_s()
       
   703     {
       
   704     delete file;
       
   705     }
       
   706 
       
   707 CXMLElement* ConML_Files_s::BeginElementL( 
       
   708     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   709     {
       
   710     switch ( aTag )
       
   711         {
       
   712         case EConMLFile:
       
   713             return AddFileL( &file );
       
   714 		
       
   715         default:
       
   716             LOGGER_WRITE_1( "ConML_File_s::BeginElement()\
       
   717              : Unknown element  %02x ", aTag );
       
   718             User::Leave( KWBXMLParserErrorInvalidTag );
       
   719         }
       
   720     return KErrNone;
       
   721     }
       
   722 
       
   723 // -----------------------------------------------------------------------------
       
   724 // ConML_Progress_s
       
   725 // -----------------------------------------------------------------------------
       
   726 ConML_Progress_s::ConML_Progress_s()
       
   727     {
       
   728     }
       
   729 	
       
   730 // -----------------------------------------------------------------------------
       
   731 // ~ConML_Progress_s
       
   732 // -----------------------------------------------------------------------------
       
   733 ConML_Progress_s::~ConML_Progress_s()
       
   734     {
       
   735     delete value;
       
   736     }
       
   737 	
       
   738 CXMLElement* ConML_Progress_s::BeginElementL( 
       
   739     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   740     {
       
   741     switch ( aTag )
       
   742         {
       
   743         case EConMLValue:
       
   744             CHECK_NO_DUPLICATE ( value );
       
   745             value = new ( ELeave ) pcdata_t();
       
   746             return value;
       
   747 		
       
   748         default:
       
   749             LOGGER_WRITE_1( "ConML_Progress_s::BeginElement()\
       
   750              : Unknown element  %02x ", aTag );
       
   751             User::Leave( KWBXMLParserErrorInvalidTag );
       
   752         }
       
   753     return KErrNone;
       
   754     }
       
   755 	
       
   756 // -----------------------------------------------------------------------------
       
   757 // ConML_Results_s
       
   758 // -----------------------------------------------------------------------------
       
   759 ConML_Results_s::ConML_Results_s()
       
   760     {
       
   761     }
       
   762 
       
   763 ConML_Results_s::~ConML_Results_s()
       
   764     {
       
   765     delete complete;
       
   766     delete progress;
       
   767     delete applications;
       
   768     delete dataOwners;
       
   769     delete filename;
       
   770     delete moreData;
       
   771     delete data;
       
   772     delete deviceInfo;
       
   773     delete files;
       
   774     }
       
   775 
       
   776 CXMLElement* ConML_Results_s::BeginElementL( 
       
   777     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   778     {
       
   779     switch ( aTag )
       
   780     {
       
   781         case EConMLComplete:
       
   782             CHECK_NO_DUPLICATE ( complete );
       
   783             complete = new ( ELeave ) pcdata_t();
       
   784             return complete;
       
   785 		
       
   786         case EConMLProgress:
       
   787             CHECK_NO_DUPLICATE ( progress );
       
   788             progress = new ( ELeave ) ConML_Progress_t();
       
   789             return progress;
       
   790 		
       
   791         case EConMLApplications:
       
   792             CHECK_NO_DUPLICATE ( applications );
       
   793             applications = new ( ELeave ) ConML_Applications_t();
       
   794             return applications;
       
   795 		
       
   796         case EConMLDataOwners:
       
   797             CHECK_NO_DUPLICATE ( dataOwners );
       
   798             dataOwners = new ( ELeave ) ConML_DataOwners_t();
       
   799             return dataOwners;
       
   800 		
       
   801         case EConMLMoreData:
       
   802             CHECK_NO_DUPLICATE ( moreData );
       
   803             moreData = new ( ELeave ) pcdata_t();
       
   804             return moreData;
       
   805 		
       
   806         case EConMLData:
       
   807             CHECK_NO_DUPLICATE ( data );
       
   808             data = new ( ELeave ) pcdata_t();
       
   809             return data;
       
   810 		
       
   811         case EConMLDeviceInfo:
       
   812             CHECK_NO_DUPLICATE ( deviceInfo )
       
   813             deviceInfo = new ( ELeave ) ConML_DeviceInfo_t();
       
   814             return deviceInfo;
       
   815 		
       
   816         case EConMLFiles:
       
   817             CHECK_NO_DUPLICATE ( files )
       
   818             files = new ( ELeave ) ConML_Files_t();
       
   819             return files;
       
   820 		
       
   821         default:
       
   822             LOGGER_WRITE_1( "ConML_Results_s::BeginElement()\
       
   823              : Unknown element  %02x ", aTag);
       
   824             User::Leave( KWBXMLParserErrorInvalidTag );
       
   825         }
       
   826     return KErrNone;
       
   827     }
       
   828 
       
   829 // -----------------------------------------------------------------------------
       
   830 // ConML_Param_s
       
   831 // -----------------------------------------------------------------------------
       
   832 ConML_Param_s::ConML_Param_s()
       
   833     {
       
   834     }
       
   835 	
       
   836 ConML_Param_s::~ConML_Param_s()
       
   837     {
       
   838     delete name;
       
   839     delete value;
       
   840     }
       
   841 	
       
   842 CXMLElement* ConML_Param_s::BeginElementL( 
       
   843     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   844     {
       
   845     switch ( aTag )
       
   846         {
       
   847         case EConMLName:
       
   848             CHECK_NO_DUPLICATE ( name );
       
   849             name = new ( ELeave ) pcdata_t();
       
   850             return name;
       
   851 		
       
   852         case EConMLValue:
       
   853             CHECK_NO_DUPLICATE ( value );
       
   854             value = new ( ELeave ) pcdata_t();
       
   855             return value;
       
   856 		
       
   857         default:
       
   858             LOGGER_WRITE_1( "ConML_Param_s::BeginElement()\
       
   859              : Unknown element  %02x ", aTag );
       
   860             User::Leave( KWBXMLParserErrorInvalidTag );
       
   861         }
       
   862     return KErrNone;
       
   863     }
       
   864 
       
   865 // -----------------------------------------------------------------------------
       
   866 // ConML_ParamList_s
       
   867 // -----------------------------------------------------------------------------
       
   868 ConML_ParamList_s::ConML_ParamList_s()
       
   869     {
       
   870     }
       
   871 
       
   872 ConML_ParamList_s::~ConML_ParamList_s()
       
   873     {
       
   874     delete data;
       
   875     delete next;
       
   876     }
       
   877 	
       
   878 // -----------------------------------------------------------------------------
       
   879 // ConML_InstParams_s
       
   880 // -----------------------------------------------------------------------------
       
   881 ConML_InstParams_s::ConML_InstParams_s()
       
   882     {
       
   883     }
       
   884 
       
   885 ConML_InstParams_s::~ConML_InstParams_s()
       
   886     {
       
   887     delete param;
       
   888     }
       
   889 	
       
   890 CXMLElement* ConML_InstParams_s::BeginElementL( 
       
   891     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   892     {
       
   893     switch ( aTag )
       
   894         {
       
   895         case EConMLParam:
       
   896             return AddParamL( &param );
       
   897 			
       
   898         default:
       
   899             LOGGER_WRITE_1( "ConML_InstParams_s::BeginElement()\
       
   900              : Unknown element  %02x ", aTag);
       
   901             User::Leave( KWBXMLParserErrorInvalidTag );
       
   902         }
       
   903     return KErrNone;
       
   904     }
       
   905 
       
   906 // -----------------------------------------------------------------------------
       
   907 // ConML_UnInstall_s
       
   908 // -----------------------------------------------------------------------------
       
   909 ConML_UnInstall_s::ConML_UnInstall_s()
       
   910     {
       
   911     }
       
   912 
       
   913 ConML_UnInstall_s::~ConML_UnInstall_s()
       
   914     {
       
   915     delete applications;
       
   916     delete instParams;
       
   917     delete results;
       
   918     }
       
   919 
       
   920 CXMLElement* ConML_UnInstall_s::BeginElementL( 
       
   921     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   922     {
       
   923     switch ( aTag )
       
   924         {
       
   925         case EConMLApplications:
       
   926             CHECK_NO_DUPLICATE ( applications );
       
   927             applications = new ( ELeave ) ConML_Applications_t();
       
   928             return applications;
       
   929 		
       
   930         case EConMLInstParams:
       
   931             CHECK_NO_DUPLICATE ( instParams );
       
   932             instParams = new ( ELeave ) ConML_InstParams_t();
       
   933             return instParams;
       
   934 				
       
   935         case EConMLResults:
       
   936             CHECK_NO_DUPLICATE ( results );
       
   937             results = new ( ELeave ) ConML_Results_t();
       
   938             return results;
       
   939 		
       
   940         default:
       
   941             LOGGER_WRITE_1( "ConML_UnInstall_s::BeginElement()\
       
   942              : Unknown element  %02x ", aTag);
       
   943             User::Leave( KWBXMLParserErrorInvalidTag );
       
   944         }
       
   945     return KErrNone;
       
   946     }
       
   947 
       
   948 
       
   949 // -----------------------------------------------------------------------------
       
   950 // ConML_ListDataOwners_s
       
   951 // -----------------------------------------------------------------------------
       
   952 ConML_ListDataOwners_s::ConML_ListDataOwners_s()
       
   953     {
       
   954     }
       
   955 
       
   956 ConML_ListDataOwners_s::~ConML_ListDataOwners_s()
       
   957     {
       
   958     delete results;
       
   959     }
       
   960 
       
   961 CXMLElement* ConML_ListDataOwners_s::BeginElementL(
       
   962     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   963     {
       
   964     switch ( aTag )
       
   965         {
       
   966         case EConMLResults:
       
   967             CHECK_NO_DUPLICATE ( results );
       
   968             results = new ( ELeave ) ConML_Results_t();
       
   969             return results;
       
   970 		
       
   971         default:
       
   972             LOGGER_WRITE_1( "ConML_ListDataOwners_s::BeginElement()\
       
   973              : Unknown element  %02x ", aTag );
       
   974             User::Leave( KWBXMLParserErrorInvalidTag );
       
   975         }
       
   976     return KErrNone;
       
   977     }
       
   978 
       
   979 // -----------------------------------------------------------------------------
       
   980 // ConML_Install_s
       
   981 // -----------------------------------------------------------------------------
       
   982 ConML_Install_s::ConML_Install_s()
       
   983     {
       
   984     }
       
   985 
       
   986 ConML_Install_s::~ConML_Install_s()
       
   987     {
       
   988     delete name;
       
   989     delete instParams;
       
   990     delete results;
       
   991     }
       
   992 
       
   993 CXMLElement* ConML_Install_s::BeginElementL( 
       
   994     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
   995     {
       
   996     switch ( aTag )
       
   997         {
       
   998         case EConMLName:
       
   999             CHECK_NO_DUPLICATE ( name );
       
  1000             name = new ( ELeave ) pcdata_t();
       
  1001             return name;
       
  1002 			
       
  1003         case EConMLInstParams:
       
  1004             CHECK_NO_DUPLICATE ( instParams );
       
  1005             instParams = new ( ELeave ) ConML_InstParams_t();
       
  1006             return instParams;
       
  1007 		
       
  1008         case EConMLResults:
       
  1009             CHECK_NO_DUPLICATE ( results );
       
  1010             results = new ( ELeave ) ConML_Results_t();
       
  1011             return results;
       
  1012 		
       
  1013         default:
       
  1014             LOGGER_WRITE_1( "ConML_Install_s::BeginElement()\
       
  1015              : Unknown element  %02x ", aTag );
       
  1016             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1017         }
       
  1018     return KErrNone;
       
  1019     }
       
  1020 
       
  1021 // -----------------------------------------------------------------------------
       
  1022 // ConML_ListInstalledApps
       
  1023 // -----------------------------------------------------------------------------
       
  1024 ConML_ListInstalledApps_s::ConML_ListInstalledApps_s()
       
  1025     {
       
  1026     }
       
  1027 
       
  1028 ConML_ListInstalledApps_s::~ConML_ListInstalledApps_s()
       
  1029     {
       
  1030     delete drives;
       
  1031     delete all;
       
  1032     delete results;
       
  1033     }
       
  1034 
       
  1035 CXMLElement* ConML_ListInstalledApps_s::BeginElementL(
       
  1036     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1037     {
       
  1038     switch ( aTag )
       
  1039         {
       
  1040         case EConMLDrives:
       
  1041             CHECK_NO_DUPLICATE ( drives );
       
  1042             drives = new ( ELeave ) ConML_Drives_t();
       
  1043             return drives;
       
  1044 		
       
  1045         case EConMLAll:
       
  1046             CHECK_NO_DUPLICATE ( all );
       
  1047             all = new ( ELeave ) pcdata_t();
       
  1048             return all;
       
  1049 		
       
  1050         case EConMLResults:
       
  1051             CHECK_NO_DUPLICATE ( results );
       
  1052             results = new ( ELeave ) ConML_Results_t();
       
  1053             return results;
       
  1054 		
       
  1055         default:
       
  1056             LOGGER_WRITE_1( "ConML_ListInstalledApps_s::\
       
  1057             BeginElement() : Unknown element  %02x ", aTag );
       
  1058             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1059         }
       
  1060     return KErrNone;
       
  1061     }
       
  1062 	
       
  1063 // -----------------------------------------------------------------------------
       
  1064 // ConML_SetBURMode_s
       
  1065 // -----------------------------------------------------------------------------
       
  1066 ConML_SetBURMode_s::ConML_SetBURMode_s()
       
  1067     {
       
  1068     }
       
  1069 
       
  1070 ConML_SetBURMode_s::~ConML_SetBURMode_s()
       
  1071     {
       
  1072     delete drives;
       
  1073     delete partialType;
       
  1074     delete incType;
       
  1075     delete results;
       
  1076     }
       
  1077 
       
  1078 CXMLElement* ConML_SetBURMode_s::BeginElementL(
       
  1079     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1080     {
       
  1081     switch ( aTag )
       
  1082         {
       
  1083         case EConMLDrives:
       
  1084             drives = new ( ELeave ) ConML_Drives_t();
       
  1085             return drives;
       
  1086 		
       
  1087         case EConMLPartialType:
       
  1088             CHECK_NO_DUPLICATE ( partialType );
       
  1089             partialType = new ( ELeave ) pcdata_t();
       
  1090             return partialType;
       
  1091 		
       
  1092         case EConMLIncType:
       
  1093             CHECK_NO_DUPLICATE ( incType );
       
  1094             incType = new ( ELeave ) pcdata_t();
       
  1095             return incType;
       
  1096 		
       
  1097         case EConMLResults:
       
  1098             CHECK_NO_DUPLICATE ( results );
       
  1099             results = new ( ELeave ) ConML_Results_t();
       
  1100             return results;
       
  1101 		
       
  1102         default:
       
  1103             LOGGER_WRITE_1( "ConML_SetBURMode_s::BeginElement()\
       
  1104              : Unknown element  %02x ", aTag );
       
  1105             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1106             }
       
  1107     return KErrNone;
       
  1108     }
       
  1109 
       
  1110 // -----------------------------------------------------------------------------
       
  1111 // ConML_GetDataSize_s
       
  1112 // -----------------------------------------------------------------------------
       
  1113 ConML_GetDataSize_s::ConML_GetDataSize_s()
       
  1114     {
       
  1115     }
       
  1116 
       
  1117 ConML_GetDataSize_s::~ConML_GetDataSize_s()
       
  1118     {
       
  1119     delete dataOwners;
       
  1120     delete results;
       
  1121     }
       
  1122 
       
  1123 CXMLElement* ConML_GetDataSize_s::BeginElementL(
       
  1124     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1125     {
       
  1126     switch ( aTag )
       
  1127         {
       
  1128         case EConMLDataOwners:
       
  1129             CHECK_NO_DUPLICATE ( dataOwners );
       
  1130             dataOwners = new ( ELeave ) ConML_DataOwners_t();
       
  1131             return dataOwners;
       
  1132 		
       
  1133         case EConMLResults:
       
  1134             CHECK_NO_DUPLICATE ( results );
       
  1135             results = new ( ELeave ) ConML_Results_t();
       
  1136             return results;
       
  1137 	
       
  1138         default:
       
  1139             LOGGER_WRITE_1( "ConML_GetDataSize_s::BeginElement()\
       
  1140              : Unknown element  %02x ", aTag);
       
  1141             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1142         }
       
  1143     return KErrNone;
       
  1144     }	
       
  1145 	
       
  1146 // -----------------------------------------------------------------------------
       
  1147 // ConML_RequestData_s
       
  1148 // -----------------------------------------------------------------------------
       
  1149 ConML_RequestData_s::ConML_RequestData_s()
       
  1150     {
       
  1151     }
       
  1152 
       
  1153 ConML_RequestData_s::~ConML_RequestData_s()
       
  1154     {
       
  1155     delete sid;
       
  1156     delete results;
       
  1157     }
       
  1158 
       
  1159 CXMLElement* ConML_RequestData_s::BeginElementL(
       
  1160     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1161     {
       
  1162     switch ( aTag )
       
  1163         {
       
  1164         case EConMLSID:
       
  1165             return AddSIDL( &sid );
       
  1166 		
       
  1167         case EConMLResults:
       
  1168             CHECK_NO_DUPLICATE ( results );
       
  1169             results = new ( ELeave ) ConML_Results_t();
       
  1170             return results;
       
  1171 		
       
  1172         default:
       
  1173             LOGGER_WRITE_1( "ConML_RequestData_s::BeginElement()\
       
  1174              : Unknown element  %02x ", aTag );
       
  1175             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1176         }
       
  1177     return KErrNone;
       
  1178     }
       
  1179 	
       
  1180 // -----------------------------------------------------------------------------
       
  1181 // ConML_UpdateDeviceInfo_s
       
  1182 // -----------------------------------------------------------------------------
       
  1183 ConML_UpdateDeviceInfo_s::ConML_UpdateDeviceInfo_s()
       
  1184     {
       
  1185     }
       
  1186 
       
  1187 ConML_UpdateDeviceInfo_s::~ConML_UpdateDeviceInfo_s()
       
  1188     {
       
  1189     delete deviceInfo;
       
  1190     delete results;
       
  1191     }
       
  1192 
       
  1193 CXMLElement* ConML_UpdateDeviceInfo_s::BeginElementL(
       
  1194     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1195     {
       
  1196     switch ( aTag )
       
  1197         {
       
  1198         case EConMLDeviceInfo:
       
  1199             CHECK_NO_DUPLICATE ( deviceInfo )
       
  1200             deviceInfo = new ( ELeave ) ConML_DeviceInfo_t();
       
  1201             return deviceInfo;
       
  1202 		
       
  1203         case EConMLResults:
       
  1204             CHECK_NO_DUPLICATE ( results )
       
  1205             results = new ( ELeave ) ConML_Results_t();
       
  1206             return results;
       
  1207 		
       
  1208         default:
       
  1209             LOGGER_WRITE_1( "ConML_UpdateDeviceInfo_s::\
       
  1210             BeginElement() : Unknown element  %02x ", aTag );
       
  1211             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1212         }
       
  1213     return KErrNone;
       
  1214     }
       
  1215 
       
  1216 // -----------------------------------------------------------------------------
       
  1217 // ConML_ListPublicFiles_s
       
  1218 // -----------------------------------------------------------------------------
       
  1219 ConML_ListPublicFiles_s::ConML_ListPublicFiles_s()
       
  1220     {
       
  1221     }
       
  1222 
       
  1223 ConML_ListPublicFiles_s::~ConML_ListPublicFiles_s()
       
  1224     {
       
  1225     delete results;
       
  1226     delete sid;
       
  1227     }
       
  1228 
       
  1229 CXMLElement* ConML_ListPublicFiles_s::BeginElementL(
       
  1230     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1231     {
       
  1232     switch ( aTag )
       
  1233         {
       
  1234         case EConMLResults:
       
  1235             CHECK_NO_DUPLICATE ( results );
       
  1236             results = new ( ELeave ) ConML_Results_t();
       
  1237             return results;
       
  1238 		
       
  1239         case EConMLSID:
       
  1240             return AddSIDL ( &sid );
       
  1241 	
       
  1242         default:
       
  1243             LOGGER_WRITE_1( "ConML_ListPublicFiles_s::\
       
  1244             BeginElement() : Unknown element  %02x ", aTag );
       
  1245             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1246         }
       
  1247     return KErrNone;
       
  1248     }
       
  1249 	
       
  1250 // -----------------------------------------------------------------------------
       
  1251 // ConML_Task_s
       
  1252 // -----------------------------------------------------------------------------
       
  1253 ConML_GetDataOwnerStatus_s::ConML_GetDataOwnerStatus_s()
       
  1254     {
       
  1255     }
       
  1256 
       
  1257 ConML_GetDataOwnerStatus_s::~ConML_GetDataOwnerStatus_s()
       
  1258     {
       
  1259     delete dataOwners;
       
  1260     delete results;
       
  1261     }
       
  1262     
       
  1263 CXMLElement* ConML_GetDataOwnerStatus_s::BeginElementL(
       
  1264     TUint8 aTag, const TXMLElementParams& /*aParams*/ )
       
  1265     {   
       
  1266     switch ( aTag )
       
  1267         {
       
  1268         case EConMLResults:
       
  1269             CHECK_NO_DUPLICATE ( results );
       
  1270             results = new ( ELeave ) ConML_Results_t();
       
  1271             return results;
       
  1272 		
       
  1273         case EConMLDataOwners:
       
  1274             CHECK_NO_DUPLICATE ( dataOwners );
       
  1275             dataOwners = new ( ELeave ) ConML_DataOwners_t();
       
  1276             return dataOwners;
       
  1277 
       
  1278         default:
       
  1279             LOGGER_WRITE_1( "ConML_GetDataOwnerStatus_s::\
       
  1280             BeginElement() : Unknown element  %02x ", aTag );
       
  1281             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1282         }
       
  1283     return KErrNone;
       
  1284     }
       
  1285 
       
  1286 // -----------------------------------------------------------------------------
       
  1287 // ConML_GetMetadata_s
       
  1288 // -----------------------------------------------------------------------------
       
  1289 ConML_GetMetadata_s::ConML_GetMetadata_s()
       
  1290     {
       
  1291     }
       
  1292 
       
  1293 ConML_GetMetadata_s::~ConML_GetMetadata_s()
       
  1294     {
       
  1295     delete filename;
       
  1296     delete results;
       
  1297     }
       
  1298     
       
  1299 CXMLElement* ConML_GetMetadata_s::BeginElementL(
       
  1300     TUint8 aTag, const TXMLElementParams& /*aParams*/ )
       
  1301     {   
       
  1302     switch ( aTag )
       
  1303         {
       
  1304         case EConMLResults:
       
  1305             CHECK_NO_DUPLICATE ( results );
       
  1306             results = new ( ELeave ) ConML_Results_t();
       
  1307             return results;
       
  1308 		
       
  1309         case EConMLFilename:
       
  1310             CHECK_NO_DUPLICATE ( filename );
       
  1311             filename = new ( ELeave ) pcdata_t();
       
  1312             return filename;
       
  1313 
       
  1314         default:
       
  1315             LOGGER_WRITE_1( "ConML_GetMetadata_s::\
       
  1316             BeginElement() : Unknown element  %02x ", aTag );
       
  1317             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1318         }
       
  1319     return KErrNone;
       
  1320     }
       
  1321 
       
  1322 	
       
  1323 // -----------------------------------------------------------------------------
       
  1324 // ConML_Reboot_s
       
  1325 // -----------------------------------------------------------------------------
       
  1326 ConML_Reboot_s::ConML_Reboot_s()
       
  1327     {
       
  1328     }
       
  1329 
       
  1330 ConML_Reboot_s::~ConML_Reboot_s()
       
  1331     {
       
  1332     delete results;
       
  1333     }
       
  1334 
       
  1335 CXMLElement* ConML_Reboot_s::BeginElementL( 
       
  1336     TUint8 aTag, const TXMLElementParams& /*aParams*/ )
       
  1337     {
       
  1338     switch ( aTag )
       
  1339         {
       
  1340         case EConMLResults:
       
  1341             CHECK_NO_DUPLICATE ( results );
       
  1342             results = new ( ELeave ) ConML_Results_t();
       
  1343             return results;
       
  1344 		
       
  1345         default:
       
  1346             LOGGER_WRITE_1( "ConML_Reboot_s::BeginElementL()\
       
  1347              : Unknown element %d ", aTag );
       
  1348             User::Leave ( KWBXMLParserErrorInvalidTag );
       
  1349         }
       
  1350     return KErrNone;
       
  1351     }
       
  1352 	
       
  1353 // -----------------------------------------------------------------------------
       
  1354 // ConML_Task_s
       
  1355 // -----------------------------------------------------------------------------
       
  1356 ConML_Task_s::ConML_Task_s()
       
  1357     {
       
  1358     }
       
  1359 
       
  1360 ConML_Task_s::~ConML_Task_s()
       
  1361     {
       
  1362     delete id;
       
  1363     delete install;
       
  1364     delete unInstall;
       
  1365     delete listInstalledApps;
       
  1366     delete listDataOwners;
       
  1367     delete setBurMode;
       
  1368     delete getDataSize;
       
  1369     delete requestData;
       
  1370     delete updateDeviceInfo;
       
  1371     delete listPublicFiles;
       
  1372     delete getDataOwnerStatus;
       
  1373     delete supplyData;
       
  1374     delete reboot;
       
  1375     delete getMetadata;
       
  1376     }
       
  1377 
       
  1378 CXMLElement* ConML_Task_s::BeginElementL( 
       
  1379     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1380     {
       
  1381     switch ( aTag )
       
  1382         {
       
  1383         case EConMLID:
       
  1384             CHECK_NO_DUPLICATE ( id )
       
  1385             id = new ( ELeave ) pcdata_t();
       
  1386             return id;
       
  1387 		
       
  1388         case EConMLInstall:
       
  1389             CHECK_NO_DUPLICATE ( install );
       
  1390             install = new ( ELeave ) ConML_Install_t();
       
  1391             return install;
       
  1392 		
       
  1393         case EConMLUnInstall:
       
  1394             CHECK_NO_DUPLICATE ( unInstall );
       
  1395             unInstall = new ( ELeave ) ConML_UnInstall_t();
       
  1396             return unInstall;
       
  1397 		
       
  1398         case EConMLListInstalledApps:
       
  1399             CHECK_NO_DUPLICATE ( listInstalledApps );
       
  1400             listInstalledApps = new ( ELeave ) ConML_ListInstalledApps_t();
       
  1401             return listInstalledApps;
       
  1402 		
       
  1403         case EConMLListDataOwners:
       
  1404             CHECK_NO_DUPLICATE ( listDataOwners );
       
  1405             listDataOwners = new ( ELeave ) ConML_ListDataOwners_t();
       
  1406             return listDataOwners;
       
  1407 		
       
  1408         case EConMLSetBURMode:
       
  1409             CHECK_NO_DUPLICATE ( setBurMode );
       
  1410             setBurMode = new ( ELeave ) ConML_SetBURMode_t();
       
  1411             return setBurMode;
       
  1412 		
       
  1413         case EConMLGetDataSize:
       
  1414             CHECK_NO_DUPLICATE ( getDataSize );
       
  1415             getDataSize = new ( ELeave ) ConML_GetDataSize_t();
       
  1416             return getDataSize;
       
  1417 		
       
  1418         case EConMLRequestData:
       
  1419             CHECK_NO_DUPLICATE ( requestData )
       
  1420             requestData = new ( ELeave ) ConML_RequestData_t();
       
  1421             return requestData;
       
  1422 		
       
  1423         case EConMLUpdateDeviceInfo:
       
  1424             CHECK_NO_DUPLICATE ( updateDeviceInfo );
       
  1425             updateDeviceInfo = new ( ELeave ) ConML_UpdateDeviceInfo_t();
       
  1426             return updateDeviceInfo;
       
  1427 		
       
  1428         case EConMLListPublicFiles:
       
  1429             CHECK_NO_DUPLICATE ( listPublicFiles );
       
  1430             listPublicFiles = new ( ELeave ) ConML_ListPublicFiles_t();
       
  1431             return listPublicFiles;
       
  1432 		
       
  1433         case EConMLGetDataOwnerStatus:
       
  1434             CHECK_NO_DUPLICATE ( getDataOwnerStatus );
       
  1435             getDataOwnerStatus = new ( ELeave ) ConML_GetDataOwnerStatus_t();
       
  1436             return getDataOwnerStatus;
       
  1437 		
       
  1438         case EConMLSupplyData:
       
  1439             CHECK_NO_DUPLICATE ( supplyData );
       
  1440             supplyData = new ( ELeave ) ConML_SupplyData_t();
       
  1441             return supplyData;
       
  1442 		
       
  1443         case EConMLReboot:
       
  1444             CHECK_NO_DUPLICATE ( reboot );
       
  1445             reboot = new ( ELeave ) ConML_Reboot_t();
       
  1446             return reboot;
       
  1447         case EConMLGetMetadata:
       
  1448             CHECK_NO_DUPLICATE ( getMetadata );
       
  1449             getMetadata = new ( ELeave ) ConML_GetMetadata_t();
       
  1450             return getMetadata;
       
  1451 		
       
  1452         default:
       
  1453             LOGGER_WRITE_1( "ConML_Task_s::BeginElement()\
       
  1454              : Unknown element  %02x ", aTag );
       
  1455             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1456         }
       
  1457     return KErrNone;
       
  1458     }
       
  1459 
       
  1460 // -----------------------------------------------------------------------------
       
  1461 // ConML_TaskList_s
       
  1462 // -----------------------------------------------------------------------------
       
  1463 ConML_TaskList_s::ConML_TaskList_s()
       
  1464     {
       
  1465     }
       
  1466 	
       
  1467 ConML_TaskList_s::~ConML_TaskList_s()
       
  1468     {
       
  1469     delete data;
       
  1470     delete next;
       
  1471     }	
       
  1472 
       
  1473 // -----------------------------------------------------------------------------
       
  1474 // ConML_Status_s
       
  1475 // -----------------------------------------------------------------------------
       
  1476 ConML_Status_s::ConML_Status_s()
       
  1477     {
       
  1478     }
       
  1479 	
       
  1480 ConML_Status_s::~ConML_Status_s()
       
  1481     {
       
  1482     delete task;
       
  1483     }
       
  1484 
       
  1485 CXMLElement* ConML_Status_s::BeginElementL( 
       
  1486     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1487     {
       
  1488     switch ( aTag )
       
  1489         {
       
  1490         case EConMLTask:
       
  1491             return AddTaskL( &task );
       
  1492 				
       
  1493         default:
       
  1494             LOGGER_WRITE_1( "ConML_Status_s::BeginElement()\
       
  1495              : Unknown element  %02x ", aTag );
       
  1496             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1497         }
       
  1498     return KErrNone;
       
  1499     }
       
  1500 
       
  1501 // -----------------------------------------------------------------------------
       
  1502 // ConML_Cancel_s
       
  1503 // -----------------------------------------------------------------------------
       
  1504 ConML_Cancel_s::ConML_Cancel_s()
       
  1505     {
       
  1506     }
       
  1507 
       
  1508 ConML_Cancel_s::~ConML_Cancel_s()
       
  1509     {
       
  1510     delete id;
       
  1511     delete all;
       
  1512     }
       
  1513 
       
  1514 CXMLElement* ConML_Cancel_s::BeginElementL( 
       
  1515     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1516     {
       
  1517     switch ( aTag )
       
  1518         {
       
  1519         case EConMLID:
       
  1520             CHECK_NO_DUPLICATE ( id );
       
  1521             id = new ( ELeave ) pcdata_t();
       
  1522             return id;
       
  1523 		
       
  1524         case EConMLAll:
       
  1525             CHECK_NO_DUPLICATE ( all );
       
  1526             all = new ( ELeave ) pcdata_t();
       
  1527             return all;
       
  1528 		
       
  1529         default:
       
  1530             LOGGER_WRITE_1( "ConML_Cancel_s::BeginElement()\
       
  1531              : Unknown element  %02x ", aTag );
       
  1532             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1533         }
       
  1534     return KErrNone;
       
  1535     }
       
  1536 
       
  1537 // -----------------------------------------------------------------------------
       
  1538 // ConML_GetStatus_s
       
  1539 // -----------------------------------------------------------------------------
       
  1540 ConML_GetStatus_s::ConML_GetStatus_s()
       
  1541     {
       
  1542     }
       
  1543 
       
  1544 ConML_GetStatus_s::~ConML_GetStatus_s()
       
  1545     {
       
  1546     delete id;
       
  1547     delete all;
       
  1548     }
       
  1549 
       
  1550 CXMLElement* ConML_GetStatus_s::BeginElementL( 
       
  1551     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1552     {
       
  1553     switch ( aTag )
       
  1554         {
       
  1555         case EConMLID:
       
  1556         CHECK_NO_DUPLICATE ( id );
       
  1557         id = new ( ELeave ) pcdata_t();
       
  1558         return id;
       
  1559 		
       
  1560         case EConMLAll:
       
  1561             CHECK_NO_DUPLICATE ( all );
       
  1562             all = new ( ELeave ) pcdata_t();
       
  1563             return all;
       
  1564 		
       
  1565         default:
       
  1566             LOGGER_WRITE_1( "ConML_GetStatus_s::BeginElement()\
       
  1567              : Unknown element  %02x ", aTag );
       
  1568             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1569         }
       
  1570     return KErrNone;
       
  1571     }
       
  1572 
       
  1573 // -----------------------------------------------------------------------------
       
  1574 // ConML_SupplyData_s
       
  1575 // -----------------------------------------------------------------------------
       
  1576 ConML_SupplyData_s::ConML_SupplyData_s()
       
  1577     {
       
  1578     }
       
  1579 
       
  1580 ConML_SupplyData_s::~ConML_SupplyData_s()
       
  1581     {
       
  1582     delete sid;
       
  1583     delete results;
       
  1584     }
       
  1585 
       
  1586 CXMLElement* ConML_SupplyData_s::BeginElementL( 
       
  1587     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1588     {
       
  1589     switch ( aTag )
       
  1590         {
       
  1591         case EConMLSID:
       
  1592             return AddSIDL ( &sid );
       
  1593 		
       
  1594         case EConMLResults:
       
  1595             results = new ( ELeave ) ConML_Results_t();
       
  1596             return results;
       
  1597 		
       
  1598         default:
       
  1599             LOGGER_WRITE_1( "ConML_SupplyData_s::BeginElement() :\
       
  1600              Unknown element  %02x ", aTag );
       
  1601             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1602         }
       
  1603     return KErrNone;
       
  1604     }
       
  1605 
       
  1606 // -----------------------------------------------------------------------------
       
  1607 // ConML_Execute_
       
  1608 // -----------------------------------------------------------------------------
       
  1609 ConML_Execute_s::ConML_Execute_s()
       
  1610     {
       
  1611     }
       
  1612 
       
  1613 ConML_Execute_s::~ConML_Execute_s()
       
  1614     {
       
  1615     delete id;
       
  1616     delete install;
       
  1617     delete unInstall;
       
  1618     delete listInstalledApps;
       
  1619     delete listDataOwners;
       
  1620     delete setBurMode;
       
  1621     delete getDataSize;
       
  1622     delete requestData;
       
  1623     delete updateDeviceInfo;
       
  1624     delete listPublicFiles;
       
  1625     delete supplyData;
       
  1626     delete reboot;
       
  1627     delete getDataOwnerStatus;
       
  1628     delete getMetadata;
       
  1629     }
       
  1630 
       
  1631 CXMLElement* ConML_Execute_s::BeginElementL( 
       
  1632     TUint8 aTag, const TXMLElementParams& /*aParams*/ )	
       
  1633     {
       
  1634     
       
  1635     switch ( aTag )
       
  1636         {
       
  1637         case EConMLID:
       
  1638             CHECK_NO_DUPLICATE ( id );
       
  1639             id = new ( ELeave ) pcdata_t();
       
  1640             return id;
       
  1641 		
       
  1642         case EConMLInstall:
       
  1643             CHECK_NO_DUPLICATE ( install );
       
  1644             install = new ( ELeave ) ConML_Install_t();
       
  1645             return install;
       
  1646 
       
  1647         case EConMLUpdateDeviceInfo:
       
  1648             CHECK_NO_DUPLICATE (updateDeviceInfo);
       
  1649             updateDeviceInfo = new ( ELeave ) ConML_UpdateDeviceInfo_t();
       
  1650             return updateDeviceInfo;
       
  1651 		
       
  1652         case EConMLUnInstall:
       
  1653             CHECK_NO_DUPLICATE ( unInstall );
       
  1654             unInstall = new ( ELeave ) ConML_UnInstall_t();
       
  1655             return unInstall;
       
  1656 			
       
  1657         case EConMLListInstalledApps:
       
  1658             CHECK_NO_DUPLICATE ( listInstalledApps );
       
  1659             listInstalledApps = new ( ELeave ) ConML_ListInstalledApps_t();
       
  1660             return listInstalledApps;
       
  1661 		
       
  1662         case EConMLListDataOwners:
       
  1663             CHECK_NO_DUPLICATE ( listDataOwners );
       
  1664             listDataOwners = new ( ELeave ) ConML_ListDataOwners_t();
       
  1665             return listDataOwners;
       
  1666 		
       
  1667         case EConMLSetBURMode:
       
  1668             CHECK_NO_DUPLICATE ( setBurMode );
       
  1669             setBurMode = new ( ELeave ) ConML_SetBURMode_t();
       
  1670             return setBurMode;
       
  1671 		
       
  1672         case EConMLGetDataSize:
       
  1673             CHECK_NO_DUPLICATE ( getDataSize );
       
  1674             getDataSize = new ( ELeave ) ConML_GetDataSize_t();
       
  1675             return getDataSize;
       
  1676 		
       
  1677         case EConMLRequestData:
       
  1678             CHECK_NO_DUPLICATE ( requestData );
       
  1679             requestData = new ( ELeave ) ConML_RequestData_t();
       
  1680             return requestData;
       
  1681 		
       
  1682         case EConMLListPublicFiles:
       
  1683             CHECK_NO_DUPLICATE ( listPublicFiles );
       
  1684             listPublicFiles = new ( ELeave ) ConML_ListPublicFiles_t();
       
  1685             return listPublicFiles;
       
  1686 		
       
  1687         case EConMLSupplyData:
       
  1688             CHECK_NO_DUPLICATE ( supplyData );
       
  1689             supplyData = new ( ELeave ) ConML_SupplyData_t();
       
  1690             return supplyData;
       
  1691 		
       
  1692         case EConMLReboot:
       
  1693             CHECK_NO_DUPLICATE ( reboot );
       
  1694             reboot = new ( ELeave ) pcdata_t();
       
  1695             return reboot;
       
  1696 		
       
  1697         case EConMLGetDataOwnerStatus:
       
  1698             CHECK_NO_DUPLICATE ( getDataOwnerStatus );
       
  1699             getDataOwnerStatus = new ( ELeave ) ConML_GetDataOwnerStatus_t();
       
  1700             return getDataOwnerStatus;
       
  1701         
       
  1702         case EConMLGetMetadata:
       
  1703             CHECK_NO_DUPLICATE ( getMetadata );
       
  1704             getMetadata = new ( ELeave ) ConML_GetMetadata_t();
       
  1705             return getMetadata;
       
  1706 		
       
  1707         default:
       
  1708             LOGGER_WRITE_1( "ConML_Execute_s::BeginElement()\
       
  1709              : Unknown element  %02x ", aTag );
       
  1710             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1711         }
       
  1712     return KErrNone;
       
  1713     }
       
  1714 	
       
  1715 // -----------------------------------------------------------------------------
       
  1716 // ConML_ConML_s
       
  1717 // -----------------------------------------------------------------------------
       
  1718 ConML_ConML_s::ConML_ConML_s()
       
  1719     {
       
  1720     }
       
  1721 
       
  1722 ConML_ConML_s::~ConML_ConML_s()
       
  1723     {
       
  1724     delete execute;
       
  1725     delete getStatus;
       
  1726     delete cancel;
       
  1727     delete status;
       
  1728     }
       
  1729 
       
  1730 CXMLElement* ConML_ConML_s::BeginElementL( 
       
  1731     TUint8 aTag, const TXMLElementParams& /*aParams*/ )
       
  1732     {
       
  1733     switch( aTag )
       
  1734         {
       
  1735         case EConMLExecute:
       
  1736             CHECK_NO_DUPLICATE( execute );
       
  1737             execute = new (ELeave) ConML_Execute_t();
       
  1738             return execute;
       
  1739 		
       
  1740         case EConMLGetStatus:
       
  1741             CHECK_NO_DUPLICATE ( getStatus );
       
  1742             getStatus = new ( ELeave) ConML_GetStatus_t();
       
  1743             return getStatus;
       
  1744 		
       
  1745         case EConMLCancel:
       
  1746             CHECK_NO_DUPLICATE ( cancel );
       
  1747             cancel = new ( ELeave ) ConML_Cancel_t();
       
  1748             return cancel;
       
  1749 		
       
  1750         case EConMLStatus:
       
  1751             CHECK_NO_DUPLICATE ( status )
       
  1752             status = new ( ELeave ) ConML_Status_t();
       
  1753             return status;
       
  1754 			
       
  1755         default:
       
  1756             LOGGER_WRITE_1( "ConML_ConML_s::BeginElement()\
       
  1757              : Unknown element  %02x ", aTag );
       
  1758             User::Leave( KWBXMLParserErrorInvalidTag );
       
  1759         }
       
  1760     return KErrNone;
       
  1761     }
       
  1762 
       
  1763 CXMLElement::TAction ConML_ConML_s::EndElementL( TAny* aCallbacks, TUint8 aTag )
       
  1764     {
       
  1765     switch( aTag)
       
  1766         {
       
  1767         case EConML:
       
  1768             ((MWBXMLConMLCallback*) aCallbacks)->ConMLL(this);
       
  1769             return EPopAndDestroy;
       
  1770 				
       
  1771         default:
       
  1772             return EPop;
       
  1773         }
       
  1774     }
       
  1775 
       
  1776 TBool ConML_ConML_s::NeedsCleanup() const
       
  1777     {
       
  1778     return ETrue;
       
  1779     }
       
  1780 	
       
  1781 
       
  1782 	
       
  1783