sysstatemgmt/systemstatemgr/cmd/inc/cmdamastarter.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 __CMDAMASTARTER_H__
       
    17 #define __CMDAMASTARTER_H__
       
    18 
       
    19 #include "ssmdeferrablecommand.h"
       
    20 
       
    21 class RReadStream;
       
    22 class TSsmCommandParameters;
       
    23 class CSsmLoadAmaStart;
       
    24 
       
    25 /*
       
    26 Provides mechanism for starting AMAs from a DSC
       
    27 @internalComponent
       
    28 @released
       
    29 */
       
    30 NONSHARABLE_CLASS(CCmdAmaStarter) : public CSsmDeferrableCommand
       
    31 	{
       
    32 public:
       
    33 	static CCmdAmaStarter* NewL(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TUid aDscId);
       
    34 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
       
    35 	static CCmdAmaStarter* NewL(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TUid aDscId, const TUint16 aPriority);
       
    36 #endif
       
    37 	static CCmdAmaStarter* NewL(RReadStream& aReadStream);
       
    38 	static CCmdAmaStarter* NewL(TSsmCommandParameters& aCommandParameters);
       
    39 	//Must be used only by CLE to reconstruct the command
       
    40 	static CCmdAmaStarter* NewLC(const CCmdAmaStarter& aCmdAmaStarter);
       
    41 
       
    42 	~CCmdAmaStarter();
       
    43 
       
    44 	// from MSsmCommand
       
    45 	void Execute(TRequestStatus& aStatus);
       
    46 	void Release();		
       
    47 	void ExecuteCancel();
       
    48 	TSsmCommandType Type() const;
       
    49 	void ExternalizeL(RWriteStream& aWriteStream) const;
       
    50 	inline TUid DscId() const {return iDscId;}
       
    51 
       
    52 protected:
       
    53 	// from CActive
       
    54 	void RunL();
       
    55 	void DoCancel();
       
    56 	TInt RunError(TInt aError);
       
    57 
       
    58 private:
       
    59 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
       
    60 	CCmdAmaStarter(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TUid& aDscId, const TUint16 aPriority);
       
    61 #endif
       
    62 	CCmdAmaStarter(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TUid& aDscId);
       
    63 	CCmdAmaStarter();
       
    64 	void ConstructL(const CCmdAmaStarter& aCmdAmaStarter);
       
    65 	void ConstructL(RReadStream& aReadStream);
       
    66 	void ConstructL(TSsmCommandParameters& aCommandParameters);
       
    67 	void ConstructL();
       
    68 	void InternalizeL(RReadStream& aReadStream);
       
    69 	void ValidateL();//only used at the time of commandlist creation by SSM
       
    70 	static TInt MaxSupportedVersion();
       
    71 	void LoadAmaStartLibraryL();
       
    72 	
       
    73 private:
       
    74 	TUid iDscId;
       
    75 	CSsmLoadAmaStart* iAmaStart;
       
    76 	RLibrary iAmaStartLib;
       
    77 	};
       
    78 
       
    79 #endif // __CMDAMASTARTER_H__