sysstatemgmt/systemstatemgr/cmd/inc/cmdreqswpchange.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 __CMDREQSWPCHANGE_H__
       
    17 #define __CMDREQSWPCHANGE_H__
       
    18 
       
    19 #include "ssmdeferrablecommand.h"
       
    20 #include <ssm/ssmstatemanager.h>
       
    21 
       
    22 class TSsmCommandParameters;
       
    23 class RReadStream;
       
    24 
       
    25 /**
       
    26 Built-in command for requesting a system-wide property change
       
    27 @internalComponent
       
    28 @released
       
    29 @see RSsmStateManager
       
    30 @see TSsmSwp
       
    31 */
       
    32 NONSHARABLE_CLASS (CCmdReqSwpChange) : public CSsmDeferrableCommand
       
    33 	{
       
    34 public: 
       
    35 	static CCmdReqSwpChange* NewL(RReadStream& aReadStream);
       
    36 	static CCmdReqSwpChange* NewL(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TSsmSwp& aSwpInfo);
       
    37 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
       
    38 	static CCmdReqSwpChange* NewL(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TSsmSwp& aSwpInfo, const TUint16 aPriority);
       
    39 #endif
       
    40 	static CCmdReqSwpChange* NewL(TSsmCommandParameters& aCommandParameters);
       
    41 	//Must be used only by CLE to reconstruct the command
       
    42 	static CCmdReqSwpChange* NewLC(const CCmdReqSwpChange& aCmdReqSwpChange);
       
    43 	~CCmdReqSwpChange();
       
    44 
       
    45 	// from MSsmCommand
       
    46 	TSsmCommandType Type() const;
       
    47 	void ExternalizeL(RWriteStream& aWriteStream) const;
       
    48 	void Execute(TRequestStatus& aStatus);
       
    49 	void ExecuteCancel();
       
    50 	void Release();
       
    51 	inline TSsmSwp SsmSwpInfo() const {return iSwpInfo;}
       
    52 	
       
    53 protected:
       
    54 	// from CActive
       
    55 	void RunL();
       
    56 	void DoCancel();
       
    57 
       
    58 private:	
       
    59 	CCmdReqSwpChange();
       
    60 	CCmdReqSwpChange(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TSsmSwp aSwpInfo);
       
    61 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
       
    62 	CCmdReqSwpChange(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, TSsmSwp aSwpInfo, const TUint16 aPriority);
       
    63 #endif
       
    64 	void InternalizeL(RReadStream& aReadStream);
       
    65 	void ConstructL(RReadStream& aReadStream);
       
    66 	void ConstructL(TSsmCommandParameters& aCommandParameters);
       
    67 	void ConstructL();
       
    68 	void ConstructL(const CCmdReqSwpChange& aCmdReqSwpChange);
       
    69 	static TInt MaxSupportedVersion();
       
    70 
       
    71 private:
       
    72 	RSsmStateManager iSsmStateManager;	// interface to State Management Server
       
    73 	TSsmSwp iSwpInfo;					// property info
       
    74 	};
       
    75 
       
    76 #endif // __CMDREQSWPROPCHANGE_H__