sysstatemgmt/systemstatemgr/cmd/src/ssmcommandfactory.cpp
changeset 0 4e1aa6a622a0
child 3 a811597961f0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <ssm/ssmswp.h>
       
    17 #include <ssm/ssmcommandfactory.h>
       
    18 
       
    19 #include "ssmdebug.h"
       
    20 #include "ssmpanic.h"
       
    21 #include "ssmcommandlistimpl.h"
       
    22 #include "ssmcommandparameters.h"
       
    23 #include "ssmcommandutilprovider.h"
       
    24 
       
    25 #include "cmdwaitforapparcinit.h"
       
    26 #include "cmdmultiplewait.h"
       
    27 #include "cmdpublishswp.h"
       
    28 #include "cmdcustomcommand.h"
       
    29 #include "cmdpublishsystemstate.h"
       
    30 #include "cmdpoweroff.h"
       
    31 #include "cmdfinalisedrives.h"
       
    32 #include "cmdloadsup.h"
       
    33 #include "cmdpersisthalattributes.h"
       
    34 #include "cmdpublishswp.h"
       
    35 #include "cmdreqswpchange.h"
       
    36 #include "cmdamastarter.h"
       
    37 #include "cmdstartprocess.h"
       
    38 #include "cmdstartapp.h"
       
    39 #include "cmdcreateswp.h"
       
    40 #include "cmdsetpandskey.h"
       
    41 
       
    42 /**
       
    43  * Releases the command passed in as a parameter.
       
    44  * 
       
    45  * Designed for use with a TCleanupItem as follows:
       
    46 @code
       
    47 CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
    48 @endcode
       
    49  * Where cmd is a MSsmCommand pointer.
       
    50  * 
       
    51  * @internalComponent
       
    52  * @released
       
    53 */
       
    54 static void CleanupCommand(TAny* aCmd)
       
    55 	{
       
    56 	MSsmCommand* const cmd = static_cast<MSsmCommand*>(aCmd);
       
    57 	cmd->Release();
       
    58 	}
       
    59 
       
    60 /**
       
    61  * Constructs and returns a new wait for app-arc init command.
       
    62  * 
       
    63  * @param aSeverity The severity to use for the returned command.
       
    64  * 
       
    65  * @publishedPartner
       
    66  * @released
       
    67  */
       
    68 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructWaitForApparcInitCommandLC(TCmdErrorSeverity aSeverity)
       
    69 	{
       
    70 	MSsmCommand* cmd = CCmdWaitForApparcInit::NewL(aSeverity);
       
    71 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
    72 	return cmd;
       
    73 	}
       
    74 
       
    75 /**
       
    76  * Constructs and returns a new multiple wait command.
       
    77  * 
       
    78  * @param aTimeout Timeout in milliseconds for the multiple wait command to wait for.
       
    79  * 
       
    80  * @publishedPartner
       
    81  * @released
       
    82  */
       
    83 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructMultipleWaitCommandLC(TInt32 aTimeout)
       
    84 	{
       
    85 	MSsmCommand* cmd = CCmdMultipleWait::NewL(aTimeout);
       
    86 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
    87 	return cmd;
       
    88 	}
       
    89 
       
    90 /**
       
    91  * Constructs and returns a new AMA starter command.
       
    92  * 
       
    93  * @param aSeverity The severity to use for the returned command.
       
    94  * @param aExecutionBehaviour The execution behaviour of the command.
       
    95  * @param aDscId The UID of the DSC that this command should start.
       
    96  * 
       
    97  * @see KDefaultSymbianDsc
       
    98  * 
       
    99  * @publishedPartner
       
   100  * @released
       
   101  */
       
   102 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructAMAStarterCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TUid& aDscId)
       
   103 	{
       
   104 	MSsmCommand* cmd = CCmdAmaStarter::NewL(aSeverity, aExecutionBehaviour, aDscId);
       
   105 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   106 	return cmd;
       
   107 	}
       
   108 
       
   109 /**
       
   110  * Constructs and returns a new start application command.
       
   111  * 
       
   112  * @param aSeverity The severity to use for the returned command.
       
   113  * @param aStartupProperties The properties of the started application. Ownership of this object is not transferred to the returned command.
       
   114  * 
       
   115  * @publishedPartner
       
   116  * @released
       
   117  */
       
   118 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructStartApplicationCommandLC(TCmdErrorSeverity aSeverity, CSsmStartupProperties* aStartupProperties)
       
   119 	{
       
   120 	MSsmCommand* cmd = CCmdStartApp::NewL(aSeverity, aStartupProperties);
       
   121 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   122 	return cmd;
       
   123 	}
       
   124 
       
   125 /**
       
   126  * Constructs and returns a new start process command.
       
   127  * 
       
   128  * @param aSeverity The severity to use for the returned command.
       
   129  * @param aStartupProperties The properties of the started process. Ownership of this object is not transferred to the returned command.
       
   130  * 
       
   131  * @publishedPartner
       
   132  * @released
       
   133  */
       
   134 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructStartProcessCommandLC(TCmdErrorSeverity aSeverity, CSsmStartupProperties* aStartupProperties)
       
   135 	{
       
   136 	MSsmCommand* cmd = CCmdStartProcess::NewL(aSeverity, aStartupProperties);
       
   137 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   138 	return cmd;
       
   139 	}
       
   140 
       
   141 /**
       
   142  * Constructs and returns a new custom command.
       
   143  * 
       
   144  * @param aSeverity The severity to use for the returned command.
       
   145  * @param aExecutionBehaviour The execution behaviour of the command.
       
   146  * @param aCustomInfo The properties of the custom command.
       
   147  * 
       
   148  * @publishedPartner
       
   149  * @released
       
   150  */
       
   151 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructCustomCommandCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, CSsmCustomCommandInfo& aCustomInfo)
       
   152 	{
       
   153 	MSsmCommand* cmd = CCmdCustomCommand::NewL(aSeverity, aExecutionBehaviour, aCustomInfo);
       
   154 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   155 	return cmd;
       
   156 	}
       
   157 
       
   158 /**
       
   159  * Constructs and returns a new finalise drives command.
       
   160  * 
       
   161  * @param aSeverity The severity to use for the returned command.
       
   162  * 
       
   163  * @publishedPartner
       
   164  * @released
       
   165  */
       
   166 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructFinaliseDrivesCommandLC(TCmdErrorSeverity aSeverity)
       
   167 	{
       
   168 	MSsmCommand* cmd = CCmdFinaliseDrives::NewL(aSeverity);
       
   169 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   170 	return cmd;
       
   171 	}
       
   172 
       
   173 /**
       
   174  * Constructs and returns a load SSM Utility Plugin command.
       
   175  * 
       
   176  * @param aSeverity The severity to use for the returned command.
       
   177  * @param aExecutionBehaviour The execution behaviour of the command.
       
   178  * @param aRetries The number of times to attempt to load the specified SSM Utility Plugin.
       
   179  * @param aInfo The properties of the SSM Utility Plugin to load.
       
   180  * 
       
   181  * @publishedPartner
       
   182  * @released
       
   183  */
       
   184 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructLoadSupCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TInt aRetries, const TSsmSupInfo& aInfo)
       
   185 	{
       
   186 	MSsmCommand* cmd = CCmdLoadSup::NewL(aSeverity, aExecutionBehaviour, aRetries, aInfo);
       
   187 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   188 	return cmd;
       
   189 	}
       
   190 
       
   191 /**
       
   192  * Constructs and returns a new persist HAL attributes.
       
   193  *
       
   194  * This command calls BaflUtils::PersistHAL().
       
   195  * 
       
   196  * @param aSeverity The severity to use for the returned command.
       
   197  * 
       
   198  * @publishedPartner
       
   199  * @released
       
   200  */
       
   201 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructPersistHalAttributesCommandLC(TCmdErrorSeverity aSeverity)
       
   202 	{
       
   203 	MSsmCommand* cmd = CCmdPersistHalAttributes::NewL(aSeverity);
       
   204 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   205 	return cmd;
       
   206 	}
       
   207 
       
   208 /**
       
   209  * Constructs and returns a new power off command.
       
   210  * 
       
   211  * @param aSeverity The severity to use for the returned command.
       
   212  * @param aPowerEvent The type of power off event represented by the returned command.
       
   213  * 
       
   214  * @publishedPartner
       
   215  * @released
       
   216  */
       
   217 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructPowerOffCommandLC(TCmdErrorSeverity aSeverity, TPowerState aPowerEvent)
       
   218 	{
       
   219 	MSsmCommand* cmd = CCmdPowerOff::NewL(aSeverity, aPowerEvent);
       
   220 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   221 	return cmd;
       
   222 	}
       
   223 
       
   224 /**
       
   225  * Constructs and returns a new publish System-wide Property command.
       
   226  * 
       
   227  * This command should only be used by a System-wide Property policy to 
       
   228  * publish the System-wide Property value or values controlled by that policy.
       
   229  * 
       
   230  * @param aSeverity The severity to use for the returned command.
       
   231  * @param aSwp The System-wide Property information.
       
   232  * 
       
   233  * @publishedPartner
       
   234  * @released
       
   235  */
       
   236 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructPublishSwpCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TSsmSwp& aSwp)
       
   237 	{
       
   238 	MSsmCommand* cmd = CCmdPublishSwp::NewL(aSeverity, aExecutionBehaviour, aSwp);
       
   239 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   240 	return cmd;
       
   241 	}
       
   242 
       
   243 /**
       
   244  * Constructs and returns a new request System-wide Property change command.
       
   245  * 
       
   246  * This command will request a change to a System-wide Property, using the
       
   247  * appropriate policy for the System-wide Property to determine required actions.
       
   248  * 
       
   249  * This is equivalent to calling RSsmStateManger::RequestSwpChange().
       
   250  * 
       
   251  * @param aSeverity The severity to use for the returned command.
       
   252  * @param aExecutionBehaviour The execution behaviour of the returned command.
       
   253  * @param aSwp The System-wide Property information used in the returned command.
       
   254  * 
       
   255  * @publishedPartner
       
   256  * @released
       
   257  */
       
   258 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructReqSwpChangeCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TSsmSwp& aSwp)
       
   259 	{
       
   260 	MSsmCommand* cmd = CCmdReqSwpChange::NewL(aSeverity, aExecutionBehaviour, aSwp);
       
   261 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   262 	return cmd;
       
   263 	}
       
   264 
       
   265 /**
       
   266  * Constructs and returns a new publish system state command.
       
   267  * 
       
   268  * This command should only be used by the current system state policy 
       
   269  * to publish a change in system state value.
       
   270  * 
       
   271  * @param aSeverity The severity to use for the returned command.
       
   272  * @param aExecutionBehaviour The execution behaviour of the returned command.
       
   273  * @param aInfo The system state information used in the returned command.
       
   274  * 
       
   275  * @publishedPartner
       
   276  * @released
       
   277  */
       
   278 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructPublishSystemStateCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TSsmPublishSystemStateInfo& aInfo)
       
   279 	{
       
   280 	MSsmCommand* cmd = CCmdPublishSystemState::NewL(aSeverity, aExecutionBehaviour, aInfo);
       
   281 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   282 	return cmd;
       
   283 	}
       
   284 
       
   285 /**
       
   286  * Constructs and returns a new publish system state command.
       
   287  * 
       
   288  * This command should only be used by the current system state policy 
       
   289  * to publish a change in system state value.
       
   290  * 
       
   291  * @param aSeverity The severity to use for the returned command.
       
   292  * @param aExecutionBehaviour The execution behaviour of the returned command.
       
   293  * @param aInfo The system state information used in the returned command.
       
   294  * 
       
   295  * @publishedPartner
       
   296  * @released
       
   297  */
       
   298 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructCreateSwpCommandLC(TCmdErrorSeverity aSeverity, const TSsmSwp& aSwp, TDesC& aFilename)
       
   299 	{
       
   300 	MSsmCommand* cmd = CCmdCreateSwp::NewL(aSeverity, aSwp, aFilename);
       
   301 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   302 	return cmd;
       
   303 	}
       
   304 
       
   305 /**
       
   306  * Constructs and returns a new set publish and subscribe key command.
       
   307  * 
       
   308  * @param aSeverity The severity to use for the returned command.
       
   309  * @param aCategory The category of the P+S key to be set.
       
   310  * @param aKey The key value of the P+S key to be set.
       
   311  * @param aValue The value to set the P+S key to.
       
   312  * 
       
   313  * @publishedPartner
       
   314  * @released
       
   315  */
       
   316 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructSetPAndSKeyCommandLC(TCmdErrorSeverity aSeverity, const TUid& aCategory, TUint aKey, TInt aValue)
       
   317 	{
       
   318 	MSsmCommand* cmd = CCmdSetPAndSKey::NewL(aSeverity, aCategory, aKey, aValue);
       
   319 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   320 	return cmd;
       
   321 	}
       
   322 
       
   323 /**
       
   324 Factory function to create a command from a MSsmCommand object.
       
   325 @param aSsmCommand is reference of MSsmCommand which needs to be created.
       
   326 @param aDeferredList List of commands which has execution behaviour as ESsmDeferredWaitForSignal in command list.
       
   327 @@param aUtilProvider CSsmCommandUtilProvider reference. Only few commands require CSsmCommandUtilProvider reference 
       
   328 @internalComponent
       
   329 @panic ECmdBadCommand if the command type is invalid
       
   330 @see TSsmCommandType
       
   331 */
       
   332 CSsmCommandBase* SsmCommandFactory::ConstructCommandFromCommandLC(const MSsmCommand& aSsmCommand, TArray<MSsmCommand*>& aDeferredList, CSsmCommandUtilProvider* aUtilProvider)
       
   333     {
       
   334     CSsmCommandBase* cmd = NULL;
       
   335     TSsmCommandType const cmdType = aSsmCommand.Type();
       
   336     DEBUGPRINT2A("Adding command type in CLE commandlist: %d", cmdType);
       
   337     
       
   338     switch(cmdType)
       
   339         {
       
   340         case ESsmCmdWaitForApparcInit:
       
   341             {
       
   342             const CCmdWaitForApparcInit& cmdWaitForApparc = dynamic_cast<const CCmdWaitForApparcInit&>(aSsmCommand);
       
   343             cmd = CCmdWaitForApparcInit::NewLC(cmdWaitForApparc, aUtilProvider);
       
   344             break;
       
   345             }
       
   346         case ESsmCmdMultipleWait:
       
   347             {
       
   348             const CCmdMultipleWait& cmdMultipleWait = dynamic_cast<const CCmdMultipleWait&>(aSsmCommand);
       
   349             cmd = CCmdMultipleWait::NewLC(cmdMultipleWait, aDeferredList);
       
   350             break;
       
   351             }
       
   352         case ESsmCmdAMAStarter:
       
   353             {
       
   354             const CCmdAmaStarter& cmdAmaStart = dynamic_cast<const CCmdAmaStarter&>(aSsmCommand);
       
   355             cmd = CCmdAmaStarter::NewLC(cmdAmaStart);
       
   356             break; 
       
   357             }
       
   358         case ESsmCmdStartProcess:
       
   359             {
       
   360             const CCmdStartProcess& cmdProcess = dynamic_cast<const CCmdStartProcess&>(aSsmCommand);
       
   361             cmd = CCmdStartProcess::NewLC(cmdProcess, aUtilProvider);
       
   362             break;
       
   363             }
       
   364         case ESsmCmdStartApp:
       
   365             {
       
   366             const CCmdStartApp& cmdApp = dynamic_cast<const CCmdStartApp&>(aSsmCommand);
       
   367             cmd = CCmdStartApp::NewLC(cmdApp, aUtilProvider);
       
   368             break;
       
   369             }
       
   370         case ESsmCmdPublishSystemState:
       
   371             {
       
   372             const CCmdPublishSystemState& cmdPublishSystemState = dynamic_cast<const CCmdPublishSystemState&>(aSsmCommand);
       
   373             cmd = CCmdPublishSystemState::NewLC(cmdPublishSystemState);
       
   374             break;
       
   375             }
       
   376         case ESsmCmdPublishSwp:
       
   377             {
       
   378             const CCmdPublishSwp& cmdPublishSwp = dynamic_cast<const CCmdPublishSwp&>(aSsmCommand);
       
   379             cmd = CCmdPublishSwp::NewLC(cmdPublishSwp);
       
   380             break;
       
   381             }
       
   382         case ESsmCmdReqSwProperty:
       
   383             {
       
   384             const CCmdReqSwpChange& cmdReqSwpProperty = dynamic_cast<const CCmdReqSwpChange&>(aSsmCommand);
       
   385             cmd = CCmdReqSwpChange::NewLC(cmdReqSwpProperty);
       
   386             break;
       
   387             }
       
   388         case ESsmCmdLoadSup:
       
   389             {
       
   390             const CCmdLoadSup& cmdLoadSup = dynamic_cast<const CCmdLoadSup&>(aSsmCommand);
       
   391             cmd = CCmdLoadSup::NewLC(cmdLoadSup);
       
   392             break;
       
   393             }
       
   394         case ESsmCmdPowerOff:
       
   395             {
       
   396             const CCmdPowerOff& cmdPowerOff = dynamic_cast<const CCmdPowerOff&>(aSsmCommand);
       
   397             cmd = CCmdPowerOff::NewLC(cmdPowerOff);
       
   398             break;
       
   399             }
       
   400         case ESsmCmdFinaliseDrives:
       
   401             {
       
   402             const CCmdFinaliseDrives& cmdFinaliseDrives = dynamic_cast<const CCmdFinaliseDrives&>(aSsmCommand);
       
   403             cmd = CCmdFinaliseDrives::NewLC(cmdFinaliseDrives);
       
   404             break;
       
   405             }
       
   406         case ESsmCmdPersistHalAttributes:
       
   407             {
       
   408             const CCmdPersistHalAttributes& cmdPersistHalAttributes = dynamic_cast<const CCmdPersistHalAttributes&>(aSsmCommand);
       
   409             cmd = CCmdPersistHalAttributes::NewLC(cmdPersistHalAttributes);
       
   410             break;
       
   411             }
       
   412         case ESsmCmdCustomCommand:
       
   413             {
       
   414             const CCmdCustomCommand& cmdCustomCommand = dynamic_cast<const CCmdCustomCommand&>(aSsmCommand);
       
   415             cmd = CCmdCustomCommand::NewLC(cmdCustomCommand, aUtilProvider);
       
   416             break;
       
   417             }
       
   418         case ESsmCmdCreateSwp:
       
   419             {
       
   420             const CCmdCreateSwp& cmdCreateSwp = dynamic_cast<const CCmdCreateSwp&>(aSsmCommand);
       
   421             cmd = CCmdCreateSwp::NewLC(cmdCreateSwp);
       
   422             break;
       
   423             }
       
   424         case ESsmCmdSetPAndSKey:
       
   425             {
       
   426             const CCmdSetPAndSKey& cmdSetPAndSKey = dynamic_cast<const CCmdSetPAndSKey&>(aSsmCommand);
       
   427             cmd = CCmdSetPAndSKey::NewLC(cmdSetPAndSKey);
       
   428             break;
       
   429             }
       
   430         default:
       
   431             {
       
   432             __ASSERT_ALWAYS( EFalse, PanicNow(KPanicCmdList, ECmdBadCommand));
       
   433             break;
       
   434             }
       
   435         }
       
   436     
       
   437     return cmd;
       
   438     }
       
   439 
       
   440 /**
       
   441 Factory function to create a command from a stream.
       
   442 @param aType Type of the command which needs to be created.
       
   443 @param aReadStream Stream containing the data for the command.
       
   444 @param aDeferredList List of commands which has execution behaviour as ESsmDeferredWaitForSignal in command list.
       
   445 @internalComponent
       
   446 @panic ECmdBadCommand if the command type is invalid
       
   447 @see TSsmCommandType
       
   448 @see RReadStream
       
   449 */
       
   450 CSsmCommandBase* SsmCommandFactory::ConstructCommandFromStreamLC(TSsmCommandType aType, RReadStream& aReadStream, TArray<MSsmCommand*>& aDeferredList)
       
   451 	{
       
   452 	CSsmCommandBase* cmd = NULL;
       
   453 	
       
   454 	switch(aType)
       
   455 		{
       
   456 	case ESsmCmdWaitForApparcInit:
       
   457 		cmd = CCmdWaitForApparcInit::NewL(aReadStream);
       
   458 		break;
       
   459 	case ESsmCmdMultipleWait:
       
   460 		cmd = CCmdMultipleWait::NewL(aReadStream, aDeferredList);
       
   461 		break;
       
   462 	case ESsmCmdAMAStarter:
       
   463 		cmd = CCmdAmaStarter::NewL(aReadStream);
       
   464 		break;
       
   465 	case ESsmCmdStartApp:
       
   466 		cmd = CCmdStartApp::NewL(aReadStream);
       
   467 		break;
       
   468 	case ESsmCmdStartProcess:
       
   469 		cmd = CCmdStartProcess::NewL(aReadStream);
       
   470 		break;
       
   471 	case ESsmCmdPublishSystemState:
       
   472 		cmd = CCmdPublishSystemState::NewL(aReadStream);
       
   473 		break;
       
   474 	case ESsmCmdPublishSwp:
       
   475 		cmd = CCmdPublishSwp::NewL(aReadStream);
       
   476 		break;
       
   477 	case ESsmCmdReqSwProperty:
       
   478 		cmd = CCmdReqSwpChange::NewL(aReadStream);
       
   479 		break;
       
   480 	case ESsmCmdLoadSup:
       
   481 		cmd = CCmdLoadSup::NewL(aReadStream);
       
   482 		break;
       
   483 	case ESsmCmdPowerOff:
       
   484 		cmd = CCmdPowerOff::NewL(aReadStream);
       
   485 		break;
       
   486 	case ESsmCmdFinaliseDrives:
       
   487 		cmd = CCmdFinaliseDrives::NewL(aReadStream);
       
   488 		break;
       
   489 	case ESsmCmdPersistHalAttributes:
       
   490 		cmd = CCmdPersistHalAttributes::NewL(aReadStream);
       
   491 		break;
       
   492 	case ESsmCmdCustomCommand:
       
   493 		cmd = CCmdCustomCommand::NewL(aReadStream);
       
   494 		break;
       
   495 	case ESsmCmdCreateSwp:
       
   496 		cmd = CCmdCreateSwp::NewL(aReadStream);
       
   497 		break;
       
   498 	case ESsmCmdSetPAndSKey:
       
   499 		cmd = CCmdSetPAndSKey::NewL(aReadStream);
       
   500 		break;
       
   501 	default:
       
   502 		__ASSERT_ALWAYS( EFalse, PanicNow(KPanicCmdList, ECmdBadCommand));
       
   503 		break;
       
   504 		}
       
   505 
       
   506 	CleanupStack::PushL(cmd);
       
   507 	return cmd;
       
   508 	}
       
   509 
       
   510 /**
       
   511 Factory function to create a command from a resource.
       
   512 @param aType Type of the command which needs to be created.
       
   513 @param aCommandParameters Object data from a resource file
       
   514 @internalComponent
       
   515 @panic ECmdBadCommand if the command type is invalid
       
   516 @see TSsmCommandType
       
   517 @see TSsmCommandParameters
       
   518 */
       
   519 CSsmCommandBase* SsmCommandFactory::ConstructCommandFromResourceLC(TSsmCommandType aType, TSsmCommandParameters& aCommandParameters)
       
   520 	{
       
   521 	CSsmCommandBase* cmd = NULL;
       
   522 	
       
   523 	switch(aType)
       
   524 		{
       
   525 	case ESsmCmdWaitForApparcInit:
       
   526 		cmd = CCmdWaitForApparcInit::NewL(aCommandParameters);
       
   527 		break;
       
   528 	case ESsmCmdMultipleWait:
       
   529 		cmd = CCmdMultipleWait::NewL(aCommandParameters);
       
   530 		break;
       
   531 	case ESsmCmdAMAStarter:
       
   532 		cmd = CCmdAmaStarter::NewL(aCommandParameters);
       
   533 		break;
       
   534 	case ESsmCmdStartApp:
       
   535 		cmd = CCmdStartApp::NewL(aCommandParameters);
       
   536 		break;
       
   537 	case ESsmCmdStartProcess:
       
   538 		cmd = CCmdStartProcess::NewL(aCommandParameters);
       
   539 		break;
       
   540 	case ESsmCmdPublishSwp:
       
   541 		cmd = CCmdPublishSwp::NewL(aCommandParameters);
       
   542 		break;
       
   543 	case ESsmCmdPublishSystemState:
       
   544 		cmd = CCmdPublishSystemState::NewL(aCommandParameters);
       
   545 		break;
       
   546 	case ESsmCmdReqSwProperty:
       
   547 		cmd = CCmdReqSwpChange::NewL(aCommandParameters);
       
   548 		break;
       
   549 	case ESsmCmdLoadSup:
       
   550 		cmd = CCmdLoadSup::NewL(aCommandParameters);
       
   551 		break;
       
   552 	case ESsmCmdPowerOff:
       
   553 		cmd = CCmdPowerOff::NewL(aCommandParameters);
       
   554 		break;
       
   555 	case ESsmCmdFinaliseDrives:
       
   556 		cmd = CCmdFinaliseDrives::NewL(aCommandParameters);
       
   557 		break;
       
   558 	case ESsmCmdPersistHalAttributes:
       
   559 		cmd = CCmdPersistHalAttributes::NewL(aCommandParameters);
       
   560 		break;
       
   561 	case ESsmCmdCustomCommand:
       
   562 		cmd = CCmdCustomCommand::NewL(aCommandParameters);
       
   563 		break;
       
   564 	case ESsmCmdCreateSwp:
       
   565 		cmd = CCmdCreateSwp::NewL(aCommandParameters);
       
   566 		break;
       
   567 	case ESsmCmdSetPAndSKey:
       
   568 		cmd = CCmdSetPAndSKey::NewL(aCommandParameters);
       
   569 		break;
       
   570 	default:
       
   571 		__ASSERT_ALWAYS( EFalse, PanicNow(KPanicCmdList, ECmdBadCommand));
       
   572 		break;
       
   573 		}
       
   574 
       
   575 	cmd->SetConditionalInformation(aCommandParameters.ConditionalInformation());
       
   576 	CleanupStack::PushL(cmd);
       
   577 	return cmd;
       
   578 	}
       
   579 
       
   580 
       
   581 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
       
   582 /**
       
   583  * Constructs and returns a new wait for app-arc init command.
       
   584  * 
       
   585  * @param aSeverity The severity to use for the returned command.
       
   586  * @param aPriority The priority of the command in the list
       
   587  * 
       
   588  * @publishedPartner
       
   589  * @released
       
   590  */
       
   591 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructWaitForApparcInitCommandLC(TCmdErrorSeverity aSeverity, const TUint16 aPriority)
       
   592 	{
       
   593 	MSsmCommand* cmd = CCmdWaitForApparcInit::NewL(aSeverity, aPriority);
       
   594 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   595 	return cmd;
       
   596 	}
       
   597 
       
   598 /**
       
   599  * Constructs and returns a new AMA starter command.
       
   600  * 
       
   601  * @param aSeverity The severity to use for the returned command.
       
   602  * @param aExecutionBehaviour The execution behaviour of the command.
       
   603  * @param aDscId The UID of the DSC that this command should start.
       
   604  * @param aPriority The priority of the command in the list
       
   605  * 
       
   606  * @see KDefaultSymbianDsc
       
   607  * 
       
   608  * @publishedPartner
       
   609  * @released
       
   610  */
       
   611 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructAMAStarterCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TUid& aDscId, const TUint16 aPriority)
       
   612 	{
       
   613 	MSsmCommand* cmd = CCmdAmaStarter::NewL(aSeverity, aExecutionBehaviour, aDscId, aPriority);
       
   614 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   615 	return cmd;
       
   616 	}
       
   617 
       
   618 /**
       
   619  * Constructs and returns a new start application command.
       
   620  * 
       
   621  * @param aSeverity The severity to use for the returned command.
       
   622  * @param aStartupProperties The properties of the started application. Ownership of this object is not transferred to the returned command.
       
   623  * @param aPriority The priority of the command in the list
       
   624  * 
       
   625  * @publishedPartner
       
   626  * @released
       
   627  */
       
   628 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructStartApplicationCommandLC(TCmdErrorSeverity aSeverity, CSsmStartupProperties* aStartupProperties, const TUint16 aPriority)
       
   629 	{
       
   630 	MSsmCommand* cmd = CCmdStartApp::NewL(aSeverity, aStartupProperties, aPriority);
       
   631 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   632 	return cmd;
       
   633 	}
       
   634 
       
   635 /**
       
   636  * Constructs and returns a new start process command.
       
   637  * 
       
   638  * @param aSeverity The severity to use for the returned command.
       
   639  * @param aStartupProperties The properties of the started process. Ownership of this object is not transferred to the returned command.
       
   640  * @param aPriority The priority of the command in the list
       
   641  * 
       
   642  * @publishedPartner
       
   643  * @released
       
   644  */
       
   645 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructStartProcessCommandLC(TCmdErrorSeverity aSeverity, CSsmStartupProperties* aStartupProperties, const TUint16 aPriority)
       
   646 	{
       
   647 	MSsmCommand* cmd = CCmdStartProcess::NewL(aSeverity, aStartupProperties, aPriority);
       
   648 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   649 	return cmd;
       
   650 	}
       
   651 
       
   652 /**
       
   653  * Constructs and returns a new custom command.
       
   654  * 
       
   655  * @param aSeverity The severity to use for the returned command.
       
   656  * @param aExecutionBehaviour The execution behaviour of the command.
       
   657  * @param aCustomInfo The properties of the custom command.
       
   658  * @param aPriority The priority of the command in the list
       
   659  * 
       
   660  * @publishedPartner
       
   661  * @released
       
   662  */
       
   663 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructCustomCommandCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, CSsmCustomCommandInfo& aCustomInfo, const TUint16 aPriority)
       
   664 	{
       
   665 	MSsmCommand* cmd = CCmdCustomCommand::NewL(aSeverity, aExecutionBehaviour, aCustomInfo, aPriority);
       
   666 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   667 	return cmd;
       
   668 	}
       
   669 
       
   670 /**
       
   671  * Constructs and returns a load SSM Utility Plugin command.
       
   672  * 
       
   673  * @param aSeverity The severity to use for the returned command.
       
   674  * @param aExecutionBehaviour The execution behaviour of the command.
       
   675  * @param aRetries The number of times to attempt to load the specified SSM Utility Plugin.
       
   676  * @param aInfo The properties of the SSM Utility Plugin to load.
       
   677  * @param aPriority The priority of the command in the list
       
   678  * 
       
   679  * @publishedPartner
       
   680  * @released
       
   681  */
       
   682 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructLoadSupCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TInt aRetries, const TSsmSupInfo& aInfo, const TUint16 aPriority)
       
   683 	{
       
   684 	MSsmCommand* cmd = CCmdLoadSup::NewL(aSeverity, aExecutionBehaviour, aRetries, aInfo, aPriority);
       
   685 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   686 	return cmd;
       
   687 	}
       
   688 
       
   689 /**
       
   690  * Constructs and returns a new publish System-wide Property command.
       
   691  * 
       
   692  * This command should only be used by a System-wide Property policy to 
       
   693  * publish the System-wide Property value or values controlled by that policy.
       
   694  * 
       
   695  * @param aSeverity The severity to use for the returned command.
       
   696  * @param aSwp The System-wide Property information.
       
   697  * @param aPriority The priority of the command in the list
       
   698  * 
       
   699  * @publishedPartner
       
   700  * @released
       
   701  */
       
   702 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructPublishSwpCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TSsmSwp& aSwp, const TUint16 aPriority)
       
   703 	{
       
   704 	MSsmCommand* cmd = CCmdPublishSwp::NewL(aSeverity, aExecutionBehaviour, aSwp, aPriority);
       
   705 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   706 	return cmd;
       
   707 	}
       
   708 
       
   709 /**
       
   710  * Constructs and returns a new request System-wide Property change command.
       
   711  * 
       
   712  * This command will request a change to a System-wide Property, using the
       
   713  * appropriate policy for the System-wide Property to determine required actions.
       
   714  * 
       
   715  * This is equivalent to calling RSsmStateManger::RequestSwpChange().
       
   716  * 
       
   717  * @param aSeverity The severity to use for the returned command.
       
   718  * @param aExecutionBehaviour The execution behaviour of the returned command.
       
   719  * @param aSwp The System-wide Property information used in the returned command.
       
   720  * @param aPriority The priority of the command in the list
       
   721  * 
       
   722  * @publishedPartner
       
   723  * @released
       
   724  */
       
   725 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructReqSwpChangeCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TSsmSwp& aSwp, const TUint16 aPriority)
       
   726 	{
       
   727 	MSsmCommand* cmd = CCmdReqSwpChange::NewL(aSeverity, aExecutionBehaviour, aSwp, aPriority);
       
   728 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   729 	return cmd;
       
   730 	}
       
   731 
       
   732 /**
       
   733  * Constructs and returns a new publish system state command.
       
   734  * 
       
   735  * This command should only be used by the current system state policy 
       
   736  * to publish a change in system state value.
       
   737  * 
       
   738  * @param aSeverity The severity to use for the returned command.
       
   739  * @param aExecutionBehaviour The execution behaviour of the returned command.
       
   740  * @param aInfo The system state information used in the returned command.
       
   741  * @param aPriority The priority of the command in the list
       
   742  * 
       
   743  * @publishedPartner
       
   744  * @released
       
   745  */
       
   746 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructPublishSystemStateCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TSsmPublishSystemStateInfo& aInfo, const TUint16 aPriority)
       
   747 	{
       
   748 	MSsmCommand* cmd = CCmdPublishSystemState::NewL(aSeverity, aExecutionBehaviour, aInfo, aPriority);
       
   749 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   750 	return cmd;
       
   751 	}
       
   752 
       
   753 /**
       
   754  * Constructs and returns a new publish system state command.
       
   755  * 
       
   756  * This command should only be used by the current system state policy 
       
   757  * to publish a change in system state value.
       
   758  * 
       
   759  * @param aSeverity The severity to use for the returned command.
       
   760  * @param aExecutionBehaviour The execution behaviour of the returned command.
       
   761  * @param aInfo The system state information used in the returned command.
       
   762  * @param aPriority The priority of the command in the list
       
   763  * 
       
   764  * @publishedPartner
       
   765  * @released
       
   766  */
       
   767 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructCreateSwpCommandLC(TCmdErrorSeverity aSeverity, const TSsmSwp& aSwp, TDesC& aFilename, const TUint16 aPriority)
       
   768 	{
       
   769 	MSsmCommand* cmd = CCmdCreateSwp::NewL(aSeverity, aSwp, aFilename, aPriority);
       
   770 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   771 	return cmd;
       
   772 	}
       
   773 
       
   774 /**
       
   775  * Constructs and returns a new set publish and subscribe key command.
       
   776  * 
       
   777  * @param aSeverity The severity to use for the returned command.
       
   778  * @param aCategory The category of the P+S key to be set.
       
   779  * @param aKey The key value of the P+S key to be set.
       
   780  * @param aValue The value to set the P+S key to.
       
   781  * @param aPriority The priority of the command in the list
       
   782  * 
       
   783  * @publishedPartner
       
   784  * @released
       
   785  */
       
   786 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructSetPAndSKeyCommandLC(TCmdErrorSeverity aSeverity, const TUid& aCategory, TUint aKey, TInt aValue, const TUint16 aPriority)
       
   787 	{
       
   788 	MSsmCommand* cmd = CCmdSetPAndSKey::NewL(aSeverity, aCategory, aKey, aValue, aPriority);
       
   789 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   790 	return cmd;
       
   791 	}
       
   792 
       
   793 /**
       
   794  * Constructs and returns a new multiple wait command.
       
   795  * 
       
   796  * @param aTimeout Timeout in milliseconds for the multiple wait command to wait for.
       
   797  * @param aPriority The priority of the command in the list
       
   798  * 
       
   799  * @publishedPartner
       
   800  * @released
       
   801  */
       
   802 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructMultipleWaitCommandLC(TInt32 aTimeout, const TUint16 aPriority)
       
   803 	{
       
   804 	MSsmCommand* cmd = CCmdMultipleWait::NewL(aTimeout, aPriority);
       
   805 	CleanupStack::PushL(TCleanupItem(CleanupCommand, cmd));
       
   806 	return cmd;
       
   807 	}
       
   808 
       
   809 #else //SYMBIAN_SSM_FLEXIBLE_MERGE
       
   810 /**
       
   811  * Constructs and returns a new wait for app-arc init command.
       
   812  * 
       
   813  * @param aSeverity The severity to use for the returned command.
       
   814  * @param aPriority The priority of the command in the list
       
   815  * 
       
   816  * @publishedPartner
       
   817  * @released
       
   818  */
       
   819 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructWaitForApparcInitCommandLC(TCmdErrorSeverity /*aSeverity*/, const TUint16 /*aPriority*/)
       
   820 	{
       
   821 	User::Leave(KErrNotSupported);
       
   822 	return NULL; //will never reach here; keeping compiler happy
       
   823 	}
       
   824 
       
   825 /**
       
   826  * Constructs and returns a new AMA starter command.
       
   827  * 
       
   828  * @param aSeverity The severity to use for the returned command.
       
   829  * @param aExecutionBehaviour The execution behaviour of the command.
       
   830  * @param aDscId The UID of the DSC that this command should start.
       
   831  * @param aPriority The priority of the command in the list
       
   832  * 
       
   833  * @see KDefaultSymbianDsc
       
   834  * 
       
   835  * @publishedPartner
       
   836  * @released
       
   837  */
       
   838 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructAMAStarterCommandLC(TCmdErrorSeverity /*aSeverity*/, TSsmExecutionBehaviour /*aExecutionBehaviour*/, const TUid& /*aDscId*/, const TUint16 /*aPriority*/)
       
   839 	{
       
   840 	User::Leave(KErrNotSupported);
       
   841 	return NULL; //will never reach here; keeping compiler happy
       
   842 	}
       
   843 
       
   844 /**
       
   845  * Constructs and returns a new start application command.
       
   846  * 
       
   847  * @param aSeverity The severity to use for the returned command.
       
   848  * @param aStartupProperties The properties of the started application. Ownership of this object is not transferred to the returned command.
       
   849  * @param aPriority The priority of the command in the list
       
   850  * 
       
   851  * @publishedPartner
       
   852  * @released
       
   853  */
       
   854 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructStartApplicationCommandLC(TCmdErrorSeverity /*aSeverity*/, CSsmStartupProperties* /*aStartupProperties*/, const TUint16 /*aPriority*/)
       
   855 	{
       
   856 	User::Leave(KErrNotSupported);
       
   857 	return NULL; //will never reach here; keeping compiler happy
       
   858 	}
       
   859 
       
   860 /**
       
   861  * Constructs and returns a new start process command.
       
   862  * 
       
   863  * @param aSeverity The severity to use for the returned command.
       
   864  * @param aStartupProperties The properties of the started process. Ownership of this object is not transferred to the returned command.
       
   865  * @param aPriority The priority of the command in the list
       
   866  * 
       
   867  * @publishedPartner
       
   868  * @released
       
   869  */
       
   870 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructStartProcessCommandLC(TCmdErrorSeverity /*aSeverity*/, CSsmStartupProperties* /*aStartupProperties*/, const TUint16 /*aPriority*/)
       
   871 	{
       
   872 	User::Leave(KErrNotSupported);
       
   873 	return NULL; //will never reach here; keeping compiler happy
       
   874 	}
       
   875 
       
   876 /**
       
   877  * Constructs and returns a new custom command.
       
   878  * 
       
   879  * @param aSeverity The severity to use for the returned command.
       
   880  * @param aExecutionBehaviour The execution behaviour of the command.
       
   881  * @param aCustomInfo The properties of the custom command.
       
   882  * @param aPriority The priority of the command in the list
       
   883  * 
       
   884  * @publishedPartner
       
   885  * @released
       
   886  */
       
   887 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructCustomCommandCommandLC(TCmdErrorSeverity /*aSeverity*/, TSsmExecutionBehaviour /*aExecutionBehaviour*/, CSsmCustomCommandInfo& /*aCustomInfo*/, const TUint16 /*aPriority*/)
       
   888 	{
       
   889 	User::Leave(KErrNotSupported);
       
   890 	return NULL; //will never reach here; keeping compiler happy
       
   891 	}
       
   892 
       
   893 /**
       
   894  * Constructs and returns a load SSM Utility Plugin command.
       
   895  * 
       
   896  * @param aSeverity The severity to use for the returned command.
       
   897  * @param aExecutionBehaviour The execution behaviour of the command.
       
   898  * @param aRetries The number of times to attempt to load the specified SSM Utility Plugin.
       
   899  * @param aInfo The properties of the SSM Utility Plugin to load.
       
   900  * @param aPriority The priority of the command in the list
       
   901  * 
       
   902  * @publishedPartner
       
   903  * @released
       
   904  */
       
   905 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructLoadSupCommandLC(TCmdErrorSeverity /*aSeverity*/, TSsmExecutionBehaviour /*aExecutionBehaviour*/, TInt /*aRetries*/, const TSsmSupInfo& /*aInfo*/, const TUint16 /*aPriority*/)
       
   906 	{
       
   907 	User::Leave(KErrNotSupported);
       
   908 	return NULL; //will never reach here; keeping compiler happy
       
   909 	}
       
   910 
       
   911 /**
       
   912  * Constructs and returns a new publish System-wide Property command.
       
   913  * 
       
   914  * This command should only be used by a System-wide Property policy to 
       
   915  * publish the System-wide Property value or values controlled by that policy.
       
   916  * 
       
   917  * @param aSeverity The severity to use for the returned command.
       
   918  * @param aSwp The System-wide Property information.
       
   919  * @param aPriority The priority of the command in the list
       
   920  * 
       
   921  * @publishedPartner
       
   922  * @released
       
   923  */
       
   924 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructPublishSwpCommandLC(TCmdErrorSeverity /*aSeverity*/, TSsmExecutionBehaviour /*aExecutionBehaviour*/, const TSsmSwp& /*aSwp*/, const TUint16 /*aPriority*/)
       
   925 	{
       
   926 	User::Leave(KErrNotSupported);
       
   927 	return NULL; //will never reach here; keeping compiler happy
       
   928 	}
       
   929 	
       
   930 /**
       
   931  * Constructs and returns a new request System-wide Property change command.
       
   932  * 
       
   933  * This command will request a change to a System-wide Property, using the
       
   934  * appropriate policy for the System-wide Property to determine required actions.
       
   935  * 
       
   936  * This is equivalent to calling RSsmStateManger::RequestSwpChange().
       
   937  * 
       
   938  * @param aSeverity The severity to use for the returned command.
       
   939  * @param aExecutionBehaviour The execution behaviour of the returned command.
       
   940  * @param aSwp The System-wide Property information used in the returned command.
       
   941  * @param aPriority The priority of the command in the list
       
   942  * 
       
   943  * @publishedPartner
       
   944  * @released
       
   945  */
       
   946 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructReqSwpChangeCommandLC(TCmdErrorSeverity /*aSeverity*/, TSsmExecutionBehaviour /*aExecutionBehaviour*/, const TSsmSwp& /*aSwp*/, const TUint16 /*aPriority*/)
       
   947 	{
       
   948 	User::Leave(KErrNotSupported);
       
   949 	return NULL; //will never reach here; keeping compiler happy
       
   950 	}
       
   951 
       
   952 /**
       
   953  * Constructs and returns a new publish system state command.
       
   954  * 
       
   955  * This command should only be used by the current system state policy 
       
   956  * to publish a change in system state value.
       
   957  * 
       
   958  * @param aSeverity The severity to use for the returned command.
       
   959  * @param aExecutionBehaviour The execution behaviour of the returned command.
       
   960  * @param aInfo The system state information used in the returned command.
       
   961  * @param aPriority The priority of the command in the list
       
   962  * 
       
   963  * @publishedPartner
       
   964  * @released
       
   965  */
       
   966 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructPublishSystemStateCommandLC(TCmdErrorSeverity /*aSeverity*/, TSsmExecutionBehaviour /*aExecutionBehaviour*/, TSsmPublishSystemStateInfo& /*aInfo*/, const TUint16 /*aPriority*/)
       
   967 	{
       
   968 	User::Leave(KErrNotSupported);
       
   969 	return NULL; //will never reach here; keeping compiler happy
       
   970 	}
       
   971 
       
   972 /**
       
   973  * Constructs and returns a new publish system state command.
       
   974  * 
       
   975  * This command should only be used by the current system state policy 
       
   976  * to publish a change in system state value.
       
   977  * 
       
   978  * @param aSeverity The severity to use for the returned command.
       
   979  * @param aExecutionBehaviour The execution behaviour of the returned command.
       
   980  * @param aInfo The system state information used in the returned command.
       
   981  * @param aPriority The priority of the command in the list
       
   982  * 
       
   983  * @publishedPartner
       
   984  * @released
       
   985  */
       
   986 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructCreateSwpCommandLC(TCmdErrorSeverity /*aSeverity*/, const TSsmSwp& /*aSwp*/, TDesC& /*aFilename*/, const TUint16 /*aPriority*/)
       
   987 	{
       
   988 	User::Leave(KErrNotSupported);
       
   989 	return NULL; //will never reach here; keeping compiler happy
       
   990 	}
       
   991 
       
   992 /**
       
   993  * Constructs and returns a new set publish and subscribe key command.
       
   994  * 
       
   995  * @param aSeverity The severity to use for the returned command.
       
   996  * @param aCategory The category of the P+S key to be set.
       
   997  * @param aKey The key value of the P+S key to be set.
       
   998  * @param aValue The value to set the P+S key to.
       
   999  * @param aPriority The priority of the command in the list
       
  1000  * 
       
  1001  * @publishedPartner
       
  1002  * @released
       
  1003  */
       
  1004 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructSetPAndSKeyCommandLC(TCmdErrorSeverity /*aSeverity*/, const TUid& /*aCategory*/, TUint /*aKey*/, TInt /*aValue*/, const TUint16 /*aPriority*/)
       
  1005 	{
       
  1006 	User::Leave(KErrNotSupported);
       
  1007 	return NULL; //will never reach here; keeping compiler happy
       
  1008 	}
       
  1009 
       
  1010 /**
       
  1011  * Constructs and returns a new multiple wait command.
       
  1012  * 
       
  1013  * @param aTimeout Timeout in milliseconds for the multiple wait command to wait for.
       
  1014  * @param aPriority The priority of the command in the list
       
  1015  * 
       
  1016  * @publishedPartner
       
  1017  * @released
       
  1018  */
       
  1019 EXPORT_C MSsmCommand* SsmCommandFactory::ConstructMultipleWaitCommandLC(TInt32 /*aTimeout*/, const TUint16 /*aPriority*/)
       
  1020 	{
       
  1021 	User::Leave(KErrNotSupported);
       
  1022 	return NULL; //will never reach here; keeping compiler happy
       
  1023 	}
       
  1024 #endif //SYMBIAN_SSM_FLEXIBLE_MERGE
       
  1025