sysstatemgmt/systemstatemgr/cmd/inc/ssmdeferrablecommand.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 __SSMDEFERRABLECOMMAND_H__
       
    17 #define __SSMDEFERRABLECOMMAND_H__
       
    18 
       
    19 #include "ssmcommandbase.h"
       
    20 
       
    21 /** Abstract interface to a built-in command.
       
    22 	All commands that support MultipleWait should derive from this interface.
       
    23 @internalComponent
       
    24 @released
       
    25 */
       
    26 NONSHARABLE_CLASS (CSsmDeferrableCommand) : public CSsmCommandBase
       
    27 	{
       
    28 public:
       
    29 	~CSsmDeferrableCommand();
       
    30 
       
    31 	// from MSsmCommand
       
    32 	TBool IsDeferred() const;
       
    33 	TInt CompletionStatus() const;
       
    34 	void RegisterCompletionObserver(TRequestStatus& aStatus);
       
    35 	void RegisterCompletionObserverCancel();
       
    36 	TBool EvaluateCondition(MSsmConditionalCallback* aCallback, CResourceFile* aResourceFile);
       
    37 
       
    38 	TSsmExecutionBehaviour ExecutionBehaviour() const;
       
    39 protected:
       
    40 	CSsmDeferrableCommand();
       
    41 	CSsmDeferrableCommand(TCmdErrorSeverity aSeverity);
       
    42 	CSsmDeferrableCommand(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour);
       
    43 #ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
       
    44 	CSsmDeferrableCommand(TCmdErrorSeverity aSeverity, TSsmExecutionBehaviour aExecutionBehaviour, const TUint16 aPriority);
       
    45 	CSsmDeferrableCommand(TCmdErrorSeverity aSeverity, const TUint16 aPriority);
       
    46 #endif
       
    47 	void CompleteDeferredExecuteRequest(TInt aReason);
       
    48 	virtual	void ValidateL();
       
    49 
       
    50 protected:
       
    51 	TInt iCompletionStatus;					// contains the ongoing status of the deferred command
       
    52 	TRequestStatus* iCompletionObserver; 	// Notifies command completion if registered through RegisterCompletionObserver().
       
    53 	TSsmExecutionBehaviour iExecutionBehaviour;
       
    54 	};
       
    55 
       
    56 #endif // __SSMDEFERRABLECOMMAND_H__