contextframework/cfw/inc/basicoperationsplugin/cfsourcecommandaction.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2008-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:  CCFSourceCommandAction class declaration.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CFSOURCECOMMANDACTION_H
       
    20 #define C_CFSOURCECOMMANDACTION_H
       
    21 
       
    22 
       
    23 // SYSTEM INCLUDE FILES
       
    24 #include <e32base.h>
       
    25 
       
    26 // USER INCLUDE FILES
       
    27 #include "cfscriptaction.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class MCFOperationServices;
       
    31 class CCFContextSourceCommand;
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38  * Source command action to send commands to context sources, e.g. to activate
       
    39  * or deactivate the context source.
       
    40  *
       
    41  * @lib BasicOperationsPlugIn
       
    42  * @since S60 5.0
       
    43  */
       
    44 NONSHARABLE_CLASS( CCFSourceCommandAction ) : public CCFScriptAction
       
    45 {
       
    46 public:
       
    47 
       
    48     /**
       
    49      * Symbian two phased constructors.
       
    50      *
       
    51      * @since S60 5.0
       
    52      * @param aServices is a reference to script operation services.
       
    53      * @param aCommand is the context source command. Ownership is transferred.
       
    54      * @return CCFSourceCommandAction
       
    55      */
       
    56     static CCFSourceCommandAction* NewL( MCFOperationServices& aServices, 
       
    57             CCFContextSourceCommand* aCommand );
       
    58 
       
    59     static CCFSourceCommandAction* NewLC( MCFOperationServices& aServices, 
       
    60             CCFContextSourceCommand* aCommand );
       
    61 
       
    62     /**
       
    63      * C++ destructor.
       
    64      */
       
    65     virtual ~CCFSourceCommandAction();
       
    66 
       
    67 public: // Functions from CCFScriptAction
       
    68 
       
    69     /**
       
    70     * Notifies the action handler about new action.
       
    71     * @see CCFScriptAction::ActL
       
    72     */
       
    73     void ActL();
       
    74 
       
    75     // @see CCFScriptAction::GetSecurityPolicy
       
    76     TInt GetSecurityPolicy( TSecurityPolicy& aPolicy );
       
    77 
       
    78 private:
       
    79 
       
    80     CCFSourceCommandAction( MCFOperationServices& aServices );
       
    81     void ConstructL( CCFContextSourceCommand* aCommand );
       
    82 
       
    83 private: // Data
       
    84 
       
    85     // Context source command; owned.
       
    86     CCFContextSourceCommand* iCommand;
       
    87     };
       
    88 
       
    89 #endif // C_CFSOURCECOMMANDACTION_H