sysstatemgmt/ssmcustcmds/ssmsystemcmds/inc/ssmsashutdown.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Declaration of CSsmSaShutdown class.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef SSMSASHUTDOWN_H
       
    20 #define SSMSASHUTDOWN_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <ssm/ssmcustomcommand.h>
       
    24 #include <ssm/ssmadaptationcli.h>
       
    25 
       
    26 /**
       
    27  *  Each command is implemented in a class derived from MSsmCustomCommand.
       
    28  *  It is also possible to implement multiple similar command in the same
       
    29  *  class and differentiate between them based on constructor parameters
       
    30  *  from the factory method.
       
    31  */
       
    32 NONSHARABLE_CLASS( CSsmSaShutdown ) : public CActive, public MSsmCustomCommand
       
    33     {
       
    34 
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Two-phased constructor
       
    39      */
       
    40 	static CSsmSaShutdown* NewL();
       
    41 
       
    42     /**
       
    43      * Destructor
       
    44      */
       
    45     virtual ~CSsmSaShutdown();
       
    46 
       
    47 private: // From MSsmCustomCommand
       
    48 
       
    49     /**
       
    50      * @see MSsmCustomCommand
       
    51      */
       
    52     TInt Initialize( CSsmCustomCommandEnv* aCmdEnv );
       
    53 
       
    54     /**
       
    55      * @see MSsmCustomCommand
       
    56      */
       
    57 	void Execute( const TDesC8& aParams, TRequestStatus& aRequest );
       
    58 
       
    59     /**
       
    60      * @see MSsmCustomCommand
       
    61      */
       
    62 	void ExecuteCancel();
       
    63 
       
    64     /**
       
    65      * @see MSsmCustomCommand
       
    66      */
       
    67 	void Close();
       
    68 
       
    69     /**
       
    70      * @see MSsmCustomCommand
       
    71      */
       
    72 	void Release();
       
    73 	
       
    74 private: // From CActive
       
    75     
       
    76     /**
       
    77      * @see CActive
       
    78      */
       
    79     void RunL();
       
    80     /**
       
    81      * @see CActive
       
    82      */
       
    83     void DoCancel();
       
    84 	
       
    85 private:
       
    86     CSsmSaShutdown();
       
    87 
       
    88 private: // data
       
    89 
       
    90     // Handle to adaptation.
       
    91     RSsmStateAdaptation iAdaptation;
       
    92     // Client request status.
       
    93     TRequestStatus* iClientStatus;
       
    94     };
       
    95 
       
    96 #endif // SSMSASHUTDOWN_H