|
1 /* |
|
2 * Copyright (c) 2006-2007 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: Capsulating Rule parameters |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef __CMPARAM_H |
|
24 #define __CMPARAM_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class RWriteStream; |
|
31 class RReadStream; |
|
32 |
|
33 /** |
|
34 * CCmParam class |
|
35 * Capsulating rule params |
|
36 * @lib cmcommon.lib |
|
37 * @since S60 v3.0 |
|
38 */ |
|
39 NONSHARABLE_CLASS( CCmParam ): public CBase |
|
40 { |
|
41 |
|
42 public: |
|
43 |
|
44 /* Constructors and destructor. */ |
|
45 |
|
46 /** |
|
47 * Creates new CCmParam class. |
|
48 * @return pointer to CCmParam class |
|
49 */ |
|
50 static CCmParam* NewL(); |
|
51 |
|
52 /** |
|
53 * Creates new CCmParam class and |
|
54 * leaves the instance in the cleanup stack. |
|
55 * @return pointer to CCmParam class |
|
56 */ |
|
57 static CCmParam* NewLC(); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CCmParam(); |
|
63 |
|
64 public: |
|
65 |
|
66 /** |
|
67 * Param |
|
68 * @since Series 60 3.1 |
|
69 * @param aParam, on return parameter value |
|
70 * @return None |
|
71 */ |
|
72 void Param( TPtrC8* aParam ); |
|
73 |
|
74 /** |
|
75 * Param |
|
76 * @since Series 60 3.1 |
|
77 * @param aParam, on return parameter value |
|
78 * @return None |
|
79 */ |
|
80 void Param( TInt& aParam ); |
|
81 |
|
82 /** |
|
83 * SetComparisonDataL |
|
84 * @since Series 60 3.1 |
|
85 * @param aComparisonData, datafield value |
|
86 * @return None |
|
87 */ |
|
88 void SetComparisonDataL( const TDesC8& aComparisonData ); |
|
89 |
|
90 /** |
|
91 * SetComparisonData (indexed) |
|
92 * @since Series 60 3.1 |
|
93 * @param aComparisonData, datafield value |
|
94 * @return None |
|
95 */ |
|
96 void SetComparisonData( TInt aComparisonData ); |
|
97 |
|
98 /** |
|
99 * ComparisonData |
|
100 * @since Series 60 3.1 |
|
101 * @param None |
|
102 * @return returns datafield |
|
103 */ |
|
104 const TDesC8& ComparisonData() const; |
|
105 |
|
106 /** |
|
107 * Externalizes container information to stream. |
|
108 * Leaves in case of errors. |
|
109 * @since Series 60 3.1 |
|
110 * @param reference to RWriteStream |
|
111 * @return none |
|
112 */ |
|
113 void ExternalizeL( RWriteStream& aStream ) const; |
|
114 |
|
115 /** |
|
116 * Internalizes container information from stream. |
|
117 * Leaves in case of errors. |
|
118 * @since Series 60 3.1 |
|
119 * @param reference to RReadStream |
|
120 * @return none |
|
121 */ |
|
122 void InternalizeL( RReadStream& aStream ); |
|
123 |
|
124 private: |
|
125 |
|
126 /** |
|
127 * Constructor. |
|
128 */ |
|
129 CCmParam(); |
|
130 |
|
131 /** |
|
132 * Second-phase constructor. |
|
133 */ |
|
134 void ConstructL(); |
|
135 |
|
136 |
|
137 private: // data |
|
138 |
|
139 /** datafield */ |
|
140 HBufC8* iDataField; // owned |
|
141 |
|
142 /** indexed data field */ |
|
143 TInt iDataFieldIndexed; |
|
144 |
|
145 }; |
|
146 |
|
147 #endif // __CMPARAM_H |