sysstatemgmt/systemstatemgr/inc/ssmcommandfactory.h
changeset 0 4e1aa6a622a0
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 #ifndef __SSMCOMMANDFACTORY_H__
       
    17 #define __SSMCOMMANDFACTORY_H__
       
    18 
       
    19 #include <e32power.h>
       
    20 #include <ssm/ssmcmd.hrh>
       
    21 #include <ssm/ssmswp.h>
       
    22 
       
    23 class CSsmCustomCommandInfo;
       
    24 class TSsmSupInfo;
       
    25 class TSsmPublishSystemStateInfo;
       
    26 class CSsmStartupProperties;
       
    27 class RResourceReader;
       
    28 class CSsmCommandUtilProvider;
       
    29 class CSsmCommandBase;
       
    30 class MSsmCommand;
       
    31 class MSsmCommandList;
       
    32 class TSsmCommandParameters;
       
    33 class MSsmCommandFactory;
       
    34 class TSsmSwp;
       
    35 
       
    36 /**
       
    37 @publishedPartner
       
    38 @released
       
    39 */
       
    40 class SsmCommandFactory
       
    41 	{
       
    42 public:
       
    43 	// Construct a specific type of command
       
    44 	IMPORT_C static MSsmCommand* ConstructWaitForApparcInitCommandLC(TCmdErrorSeverity aSeverity);
       
    45 	IMPORT_C static MSsmCommand* ConstructMultipleWaitCommandLC(TInt32 aTimeout);
       
    46 	IMPORT_C static MSsmCommand* ConstructAMAStarterCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TUid& aDscId);
       
    47 	IMPORT_C static MSsmCommand* ConstructStartApplicationCommandLC(TCmdErrorSeverity aSeverity, CSsmStartupProperties* aStartupProperties);
       
    48 	IMPORT_C static MSsmCommand* ConstructStartProcessCommandLC(TCmdErrorSeverity aSeverity, CSsmStartupProperties* aStartupProperties);
       
    49 	IMPORT_C static MSsmCommand* ConstructCustomCommandCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, CSsmCustomCommandInfo& aCustomInfo);
       
    50 	IMPORT_C static MSsmCommand* ConstructFinaliseDrivesCommandLC(TCmdErrorSeverity aSeverity);
       
    51 	IMPORT_C static MSsmCommand* ConstructLoadSupCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TInt aRetries, const TSsmSupInfo& aInfo);
       
    52 	IMPORT_C static MSsmCommand* ConstructPersistHalAttributesCommandLC(TCmdErrorSeverity aSeverity);
       
    53 	IMPORT_C static MSsmCommand* ConstructPowerOffCommandLC(TCmdErrorSeverity aSeverity, TPowerState aPowerEvent);
       
    54 	IMPORT_C static MSsmCommand* ConstructPublishSwpCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TSsmSwp& aSwp);
       
    55 	IMPORT_C static MSsmCommand* ConstructReqSwpChangeCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TSsmSwp& aSwp);
       
    56 	IMPORT_C static MSsmCommand* ConstructPublishSystemStateCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TSsmPublishSystemStateInfo& aInfo);
       
    57 	IMPORT_C static MSsmCommand* ConstructCreateSwpCommandLC(TCmdErrorSeverity aSeverity, const TSsmSwp& aSwp, TDesC& aFilename);
       
    58 	IMPORT_C static MSsmCommand* ConstructSetPAndSKeyCommandLC(TCmdErrorSeverity aSeverity, const TUid& aCategory, TUint aKey, TInt aValue);
       
    59 
       
    60 	// Construct a command of the specified type from a RReadStream
       
    61 	static CSsmCommandBase* ConstructCommandFromStreamLC(TSsmCommandType aType, RReadStream& aReadStream, TArray<MSsmCommand*>& aDeferredList);
       
    62 
       
    63 	// Construct a command of the specified type from resource
       
    64 	static CSsmCommandBase* ConstructCommandFromResourceLC(TSsmCommandType aType, TSsmCommandParameters& aCommandParameters);
       
    65 	
       
    66 	// Construct a command of the specified type from MSsmCommand object
       
    67     static CSsmCommandBase* ConstructCommandFromCommandLC(const MSsmCommand& aSsmCommand, TArray<MSsmCommand*>& aDeferredList, CSsmCommandUtilProvider* aUtilProvider);
       
    68 
       
    69 #ifdef SSM_CMD_TESTFRAMEWORK
       
    70 	static void DelegateTo(MSsmCommandFactory* aExternalFactory); 
       
    71 #endif //SSM_CMD_TESTFRAMEWORK
       
    72 	
       
    73 	//SYMBIAN_SSM_FLEXIBLE_MERGE
       
    74 	IMPORT_C static MSsmCommand* ConstructWaitForApparcInitCommandLC(TCmdErrorSeverity aSeverity, const TUint16 aPriority);
       
    75 	IMPORT_C static MSsmCommand* ConstructAMAStarterCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TUid& aDscId, const TUint16 aPriority);
       
    76 	IMPORT_C static MSsmCommand* ConstructStartApplicationCommandLC(TCmdErrorSeverity aSeverity, CSsmStartupProperties* aStartupProperties, const TUint16 aPriority);
       
    77 	IMPORT_C static MSsmCommand* ConstructStartProcessCommandLC(TCmdErrorSeverity aSeverity, CSsmStartupProperties* aStartupProperties, const TUint16 aPriority);
       
    78 	IMPORT_C static MSsmCommand* ConstructCustomCommandCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, CSsmCustomCommandInfo& aCustomInfo, const TUint16 aPriority);
       
    79 	IMPORT_C static MSsmCommand* ConstructLoadSupCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TInt aRetries, const TSsmSupInfo& aInfo, const TUint16 aPriority);
       
    80 	IMPORT_C static MSsmCommand* ConstructPublishSwpCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TSsmSwp& aSwp, const TUint16 aPriority);
       
    81 	IMPORT_C static MSsmCommand* ConstructReqSwpChangeCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TSsmSwp& aSwp, const TUint16 aPriority);
       
    82 	IMPORT_C static MSsmCommand* ConstructPublishSystemStateCommandLC(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TSsmPublishSystemStateInfo& aInfo, const TUint16 aPriority);
       
    83 	IMPORT_C static MSsmCommand* ConstructCreateSwpCommandLC(TCmdErrorSeverity aSeverity, const TSsmSwp& aSwp, TDesC& aFilename, const TUint16 aPriority);
       
    84 	IMPORT_C static MSsmCommand* ConstructSetPAndSKeyCommandLC(TCmdErrorSeverity aSeverity, const TUid& aCategory, TUint aKey, TInt aValue, const TUint16 aPriority);
       
    85 	IMPORT_C static MSsmCommand* ConstructMultipleWaitCommandLC(TInt32 aTimeout, const TUint16 aPriority);
       
    86 	
       
    87 	//SYMBIAN_SSM_FLEXIBLE_MERGE
       
    88 
       
    89 private:
       
    90 	SsmCommandFactory();
       
    91 	};
       
    92 	
       
    93 #endif // __SSMCOMMANDFACTORY_H__