contextframework/cfw/inc/cfserver/cfactioncmd.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2008 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:  CCFActionCmd class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CFACTIONCMD_H
       
    20 #define C_CFACTIONCMD_H
       
    21 
       
    22 
       
    23 // SYSTEM INCLUDE FILES
       
    24 #include <e32base.h>
       
    25 
       
    26 // USER INCLUDE FILES
       
    27 #include "cfcmd.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class MCFActionHandler;
       
    31 class CCFScriptEvent;
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38  * Action command.
       
    39  *
       
    40  * @lib CFServer
       
    41  * @since S60 5.0
       
    42  */
       
    43 NONSHARABLE_CLASS( CCFActionCmd ) : public CCFCmd
       
    44 {
       
    45 public:
       
    46 
       
    47     /**
       
    48      * Symbian two phased constructors.
       
    49      *
       
    50      * @since S60 5.0
       
    51      * @param aActionHandler is the action handler to process the action.
       
    52      * @param aEvent is the action. Ownership is transferred.
       
    53      * @return CCFActionCmd
       
    54      */
       
    55     static CCFActionCmd* NewL( MCFActionHandler& aActionHandler,
       
    56             CCFScriptEvent* aEvent );
       
    57     static CCFActionCmd* NewLC( MCFActionHandler& aActionHandler,
       
    58             CCFScriptEvent* aEvent );
       
    59 
       
    60     /**
       
    61      * C++ destructor.
       
    62      */
       
    63     virtual ~CCFActionCmd();
       
    64 
       
    65 public: // From CCFCmd
       
    66 
       
    67     /**
       
    68      * Executes the action command.
       
    69      *
       
    70      * @since S60 5.0
       
    71      * @param None.
       
    72      * @return None.
       
    73      */
       
    74     virtual void ExecuteL();
       
    75 
       
    76     /**
       
    77      * Logs the error using error trace macros.
       
    78      *
       
    79      * @since S60 5.0
       
    80      * @param aError is the leave code from a call to ExecuteL.
       
    81      * @return None.
       
    82      */
       
    83     virtual void LogError( TInt aError );
       
    84 
       
    85 private:
       
    86 
       
    87     CCFActionCmd( MCFActionHandler& aActionHandler,
       
    88             CCFScriptEvent* aEvent );
       
    89 
       
    90 private: // Data
       
    91 
       
    92     // Reference to the action handler.
       
    93     MCFActionHandler& iActionHandler;
       
    94 
       
    95     // The action (script event); owned.
       
    96     CCFScriptEvent* iEvent;
       
    97     };
       
    98 
       
    99 #endif // C_CFACTIONCMD_H