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