contextframework/cfw/inc/basicoperationsplugin/cfnotoperation.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2004-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:  CCFNotOperation class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CFNOTOPERATION_H
       
    21 #define C_CFNOTOPERATION_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 #include "cfoperationnode.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  This class implements NotOperation XML node of CFW script on Context
       
    34 * Framework Scripts.
       
    35 *
       
    36 *  @lib CFScriptEngine
       
    37 *  @since S60 v5.0
       
    38 */
       
    39 NONSHARABLE_CLASS( CCFNotOperation ) : public CCFOperationNode
       
    40     {
       
    41 public: // Constructors and destructor
       
    42 
       
    43     /**
       
    44     * Creates a CCFNotOperation object.
       
    45     * @param aServices is the operation services interface for nodes.
       
    46     * @param aParent is parent node for this node. The ownership of the parent
       
    47     *   is not transffered.
       
    48     * @return A pointer to the created instance of CCFNotOperation.
       
    49     */
       
    50     static CCFNotOperation* NewL( MCFOperationServices& aServices,
       
    51             CCFOperationNode* aParent );
       
    52 
       
    53     /**
       
    54     * Creates a CCFNotOperation object.
       
    55     * @param aServices is the operation services interface for nodes.
       
    56     * @param aParent is parent node for this node. The ownership of the parent
       
    57     *   is not transffered.
       
    58     * @return A pointer to the created instance of CCFNotOperation.
       
    59     */
       
    60     static CCFNotOperation* NewLC( MCFOperationServices& aServices,
       
    61             CCFOperationNode* aParent );
       
    62 
       
    63     /**
       
    64     * Creates and parses a CCFNotOperation instance from an xml node.
       
    65     * @param aServices is the operation services interface for nodes.
       
    66     * @param aParent is the parent of this node or NULL if this is a root.
       
    67     *   The ownership of the parent is not transferred.
       
    68     * @param aNode is the node to be parsed.
       
    69     * @return a pointer to the created instance of CCFNotOperation, or NULL if
       
    70     *   the node is not this or node. May leave with any system wide error code.
       
    71     */
       
    72     static CCFNotOperation* ParseL( MCFOperationServices& aServices,
       
    73             CCFOperationNode* aParent,
       
    74             CMDXMLNode& aNode );
       
    75 
       
    76     /**
       
    77     * Destructor.
       
    78     */
       
    79     ~CCFNotOperation();
       
    80 
       
    81 protected: // Functions from CCFOperationNode
       
    82 
       
    83     /**
       
    84     * Activates this node by passing the activate call to its' child.
       
    85     */
       
    86     void ActivateL();
       
    87 
       
    88     /**
       
    89     * Deactivates this node by passing the deactivate call to its' child.
       
    90     */
       
    91     void Deactivate();
       
    92 
       
    93     /**
       
    94     * Asks this node to check its security (via services interface). For
       
    95     * example, the security of contexts to be subscribed.
       
    96     * @return KErrNone if security check passed, otherwise any of the system
       
    97     *   wide error codes.
       
    98     */
       
    99     TInt CheckSecurity();
       
   100 
       
   101     /**
       
   102     * Called by child node, to ask the parent to re-evaluate its value,
       
   103     * since the child's value has changed.
       
   104     * @return None.
       
   105     */
       
   106     void Evaluate();
       
   107 
       
   108     /**
       
   109     * Cleanup long term resources like persistent data files.
       
   110     * This is called by the context framework when the script is uninstalled
       
   111     * from the system.
       
   112     */ 
       
   113     void Cleanup();
       
   114 
       
   115 private:
       
   116 
       
   117     /**
       
   118     * C++ default constructor.
       
   119     * @param aServices is the operation services interface for nodes.
       
   120     * @param aParent is parent node for this node. The ownership of the parent
       
   121     *   is not transffered.
       
   122     */
       
   123     CCFNotOperation( MCFOperationServices& aServices,
       
   124             CCFOperationNode* aParent );
       
   125 
       
   126     /**
       
   127     * By default Symbian 2nd phase constructor is private.
       
   128     */
       
   129     void ConstructL();
       
   130 
       
   131 private: // Data
       
   132 
       
   133     // May have one operation as a child.
       
   134     CCFOperationNode* iChild;
       
   135     };
       
   136 
       
   137 
       
   138 #endif // C_CFNOTOPERATION_H