contextframework/cfw/inc/basicoperationsplugin/cfcountrepeating.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:  CCFCountRepeating class declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CFCOUNTREPEATING_H
       
    21 #define C_CFCOUNTREPEATING_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "cfcount.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CCFContextObject;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  This class implements count repeatInterval -operation on Context Framework
       
    33 *  Scripts.
       
    34 *
       
    35 *  @lib CFScriptEngine
       
    36 *  @since S60 v5.0
       
    37 */
       
    38 NONSHARABLE_CLASS( CCFCountRepeating ) : public CCFCount
       
    39     {
       
    40 public: // Constructors and destructor
       
    41 
       
    42     /**
       
    43     * Creates a CCFCountRepeating object.
       
    44     * @param aServices is the operation services interface for nodes.
       
    45     * @param aParent is parent node for this node.
       
    46     * @param aName is name of the context object this operation operates on.
       
    47     * @param aSource is the source of the context object this operation
       
    48     *   operates on.
       
    49     * @param aType is the interpretation of aCmpVal.
       
    50     * @param aCmpVal is a string representation of the comparison value.
       
    51     * @param aCount is the count required for this operation to get true.
       
    52     * @param aCountType is the type of the count.
       
    53     * @return a pointer to the created instance of CCFCountRepeating.
       
    54     */
       
    55     static CCFCountRepeating* NewL( MCFOperationServices& aServices,
       
    56             CCFOperationNode* aParent,
       
    57             TDesC& aName,
       
    58             TDesC& aSource,
       
    59             const CCFContextOperation::TCmpType aType,
       
    60             const TDesC& aCmpVal,
       
    61             const TUint aCount,
       
    62             const TCountType aCountType );
       
    63 
       
    64     /**
       
    65     * Creates a CCFCountRepeating object.
       
    66     * @param aServices is the operation services interface for nodes.
       
    67     * @param aParent is parent node for this node.
       
    68     * @param aName is name of the context object this operation operates on.
       
    69     * @param aSource is the source of the context object this operation
       
    70     *   operates on.
       
    71     * @param aType is the interpretation of aCmpVal.
       
    72     * @param aCmpVal is a string representation of the comparison value.
       
    73     * @param aCount is the count required for this operation to get true.
       
    74     * @param aCountType is the type of the count.
       
    75     * @return a pointer to the created instance of CCFCountRepeating.
       
    76     */
       
    77     static CCFCountRepeating* NewLC( MCFOperationServices& aServices,
       
    78             CCFOperationNode* aParent,
       
    79             TDesC& aName,
       
    80             TDesC& aSource,
       
    81             const CCFContextOperation::TCmpType aType,
       
    82             const TDesC& aCmpVal,
       
    83             const TUint aCount,
       
    84             const TCountType aCountType );
       
    85 
       
    86     /**
       
    87     * Creates and parses a CCFCountRepeating instance from an xml node.
       
    88     * @param aServices is the operation services interface for nodes.
       
    89     * @param aParent is the parent of this node or NULL if this is a root.
       
    90     *   The ownership of the parent is not transferred.
       
    91     * @param aNode is the node to be parsed.
       
    92     * @return a pointer to the created instance of CCFCountRepeating, or NULL if
       
    93     *   the node is not this count node. May leave with any system wide error
       
    94     *   code.
       
    95     */
       
    96     static CCFCountRepeating* ParseL( MCFOperationServices& aServices,
       
    97             CCFOperationNode* aParent,
       
    98             CMDXMLNode& aNode );
       
    99 
       
   100     /**
       
   101     * Destructor.
       
   102     */
       
   103     ~CCFCountRepeating();
       
   104 
       
   105 protected: // From CCFContextOperation
       
   106 
       
   107     /**
       
   108     * Returns ETrue if this operation is true
       
   109     */
       
   110     TBool IsTrueL( const CCFContextObject& aContext );
       
   111 
       
   112 protected:
       
   113 
       
   114     /**
       
   115     * C++ default constructor.
       
   116     */
       
   117     CCFCountRepeating( MCFOperationServices& aServices,
       
   118             CCFOperationNode* aParent,
       
   119             HBufC* aName,
       
   120             HBufC* aSource,
       
   121             const CCFContextOperation::TCmpType aType,
       
   122             const TUint aCount,
       
   123             const TCountType aCountType );
       
   124 
       
   125     /**
       
   126     * By default Symbian 2nd phase constructor is private.
       
   127     */
       
   128     void ConstructL( const TDesC& aCmpVal );
       
   129 
       
   130 private: // Data
       
   131 
       
   132     };
       
   133 
       
   134 
       
   135 #endif // C_CFCOUNTREPEATING_H