|
1 /* |
|
2 * Copyright (c) 2006 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: Channel condition object implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SENSRVCHANNELCONDITIONIMPL_H |
|
20 #define SENSRVCHANNELCONDITIONIMPL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "sensrvchannelcondition.h" |
|
24 |
|
25 class CSensrvChannelConditionSetImpl; |
|
26 |
|
27 /** |
|
28 * CSensrvChannelConditionImpl is an implementation of CSensrvChannelCondition |
|
29 * interface. |
|
30 */ |
|
31 NONSHARABLE_CLASS(CSensrvChannelConditionImpl) : public CSensrvChannelCondition |
|
32 { |
|
33 |
|
34 friend class CSensrvChannelCondition; |
|
35 friend class CSensrvChannelConditionSetImpl; |
|
36 |
|
37 public: |
|
38 |
|
39 virtual ~CSensrvChannelConditionImpl(); |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Return condition type |
|
45 * |
|
46 * @since S60 5.0 |
|
47 * @return TSensrvConditionType Type of the condition |
|
48 */ |
|
49 virtual TInt ConditionType() const; |
|
50 |
|
51 /** |
|
52 * Return condition operator |
|
53 * |
|
54 * @since S60 5.0 |
|
55 * @return TSensrvConditionOperators Condition operator |
|
56 */ |
|
57 virtual TInt ConditionOperator() const; |
|
58 |
|
59 /** |
|
60 * Return condition item index |
|
61 * |
|
62 * @since S60 5.0 |
|
63 * @return TInt Condition item index |
|
64 */ |
|
65 virtual TInt ConditionItemIndex() const; |
|
66 |
|
67 /** |
|
68 * Return condition value |
|
69 * |
|
70 * @since S60 5.0 |
|
71 * @param[out] aValue Reference to descriptor where condition limit value |
|
72 * should be copied to. |
|
73 * Typically this is a package buffer defined for data type of |
|
74 * this channel. |
|
75 * @return TInt KErrOverflow if aData is wrong size for data item. |
|
76 */ |
|
77 virtual TInt GetConditionValue( TDes8& aValue ) const; |
|
78 |
|
79 /** |
|
80 * Get condition value as descriptor. |
|
81 * |
|
82 * @since S60 5.0 |
|
83 * @return TDescC8& Reference to condition value descriptor. |
|
84 */ |
|
85 virtual const TDesC8& ConditionValue() const; |
|
86 |
|
87 private: |
|
88 |
|
89 CSensrvChannelConditionImpl |
|
90 ( TInt aConditionType, |
|
91 TInt aConditionOperator, |
|
92 TInt aItemIndex ); |
|
93 |
|
94 void ConstructL(TDesC8& aValue); |
|
95 |
|
96 private: |
|
97 |
|
98 /** |
|
99 * Type of this condition. |
|
100 */ |
|
101 TInt iType; |
|
102 |
|
103 /** |
|
104 * Operator type of this condition. |
|
105 */ |
|
106 TInt iOperator; |
|
107 |
|
108 /** |
|
109 * Index of the data item this condition is for. |
|
110 */ |
|
111 TInt iIndex; |
|
112 |
|
113 /** |
|
114 * Data item specifying the limit value. |
|
115 * Own. |
|
116 */ |
|
117 HBufC8* iValue; |
|
118 }; |
|
119 |
|
120 |
|
121 #endif //SENSRVCHANNELCONDITIONIMPL_H |
|
122 |
|
123 // End of File |
|
124 |
|
125 |