|
1 /* |
|
2 * Copyright (c) 2002-2009 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: common query and condition definitions for MdE |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MDCQUERY_H__ |
|
19 #define __MDCQUERY_H__ |
|
20 |
|
21 #include "mdscommoninternal.h" |
|
22 #include "mdcserializationtype.h" |
|
23 |
|
24 |
|
25 NONSHARABLE_CLASS(TMdCCondition) : protected TMdCSerializationType |
|
26 { |
|
27 protected: |
|
28 TMdCCondition(TMdCStructTypes aType) : TMdCSerializationType( aType ) |
|
29 { |
|
30 } |
|
31 |
|
32 public: |
|
33 /** |
|
34 * Get condition reference from buffer. Doesn't change position of the |
|
35 * buffer. Doesn't do type check. |
|
36 * |
|
37 * @param aBuffer serialization buffer |
|
38 * |
|
39 * @return reference to condition |
|
40 */ |
|
41 IMPORT_C static const TMdCCondition& GetFromBufferL( |
|
42 CMdCSerializationBuffer& aBuffer ); |
|
43 |
|
44 public: |
|
45 TInt16 iConditionType; |
|
46 TInt16 iNegated; |
|
47 }; |
|
48 |
|
49 |
|
50 NONSHARABLE_CLASS(TMdCLogicCondition) : public TMdCCondition |
|
51 { |
|
52 public: |
|
53 IMPORT_C TMdCLogicCondition(); |
|
54 |
|
55 IMPORT_C static const TMdCLogicCondition& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
56 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
57 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
58 |
|
59 public: |
|
60 TInt16 iOperator; |
|
61 TUint32 iOptimizationFlags; |
|
62 TMdCValueUnion iChildConditions; |
|
63 }; |
|
64 |
|
65 NONSHARABLE_CLASS(TMdCObjectCondition) : public TMdCCondition |
|
66 { |
|
67 public: |
|
68 IMPORT_C TMdCObjectCondition(); |
|
69 |
|
70 IMPORT_C static const TMdCObjectCondition& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
71 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
72 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
73 |
|
74 public: |
|
75 TInt16 iConfidentialityLevel; |
|
76 TInt16 iCompareMethod; |
|
77 TUint32 iFlags; |
|
78 TMdCOffset iCondition; |
|
79 }; |
|
80 |
|
81 NONSHARABLE_CLASS(TMdCEventCondition) : public TMdCCondition |
|
82 { |
|
83 public: |
|
84 IMPORT_C TMdCEventCondition(); |
|
85 |
|
86 IMPORT_C static const TMdCEventCondition& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
87 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
88 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
89 |
|
90 public: |
|
91 TInt16 iCompareMethod; |
|
92 TItemId iEventId; |
|
93 TDefId iEventDefId; |
|
94 TMdCOffset iCreationTimeRange; |
|
95 TMdCOffset iObjectCondition; |
|
96 TMdCOffset iSourceCondition; |
|
97 TMdCOffset iParticipantCondition; |
|
98 TMdCOffset iUriCondition; |
|
99 }; |
|
100 |
|
101 NONSHARABLE_CLASS(TMdCPropertyCondition) : public TMdCCondition |
|
102 { |
|
103 public: |
|
104 IMPORT_C TMdCPropertyCondition(); |
|
105 |
|
106 IMPORT_C static const TMdCPropertyCondition& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
107 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
108 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
109 |
|
110 public: |
|
111 TDefId iObjectDefId; |
|
112 TDefId iPropertyDefId; |
|
113 TMdCOffset iCondition; |
|
114 }; |
|
115 |
|
116 NONSHARABLE_CLASS(TMdCRelationCondition) : public TMdCCondition |
|
117 { |
|
118 public: |
|
119 IMPORT_C TMdCRelationCondition(); |
|
120 |
|
121 IMPORT_C static const TMdCRelationCondition& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
122 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
123 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
124 |
|
125 public: |
|
126 TUint16 iObjectSide; |
|
127 TDefId iRelationDefId; |
|
128 TItemId iRelationId; |
|
129 TMdCValueUnion iRelationIds; // IN |
|
130 TMdCOffset iGuid; |
|
131 TMdCOffset iParameterRange; |
|
132 TMdCOffset iLeftObjectCondition; |
|
133 TMdCOffset iRightObjectCondition; |
|
134 TMdCOffset iLastModifiedDateRange; |
|
135 }; |
|
136 |
|
137 NONSHARABLE_CLASS(TMdCSearchCriteria) : protected TMdCSerializationType |
|
138 { |
|
139 public: |
|
140 IMPORT_C TMdCSearchCriteria(); |
|
141 |
|
142 IMPORT_C static const TMdCSearchCriteria& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
143 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
144 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
145 |
|
146 public: |
|
147 TInt16 iQueryResultType; |
|
148 TInt16 iQueryType; |
|
149 TDefId iNamespaceDefId; |
|
150 TDefId iObjectDefId; |
|
151 TMdCValueUnion iObjectDefIds; |
|
152 TUint32 iLimit; |
|
153 TUint32 iOffset; |
|
154 TUint32 iOptimizationFlags; |
|
155 TMdCOffset iRootCondition; |
|
156 TMdCValueUnion iOrderRules; |
|
157 TMdCValueUnion iPropertyFilters; |
|
158 }; |
|
159 |
|
160 NONSHARABLE_CLASS(TMdCOrderRule) : protected TMdCSerializationType |
|
161 { |
|
162 public: |
|
163 IMPORT_C TMdCOrderRule(); |
|
164 |
|
165 IMPORT_C static const TMdCOrderRule& GetFromBufferL( CMdCSerializationBuffer& aBuffer ); |
|
166 IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer); |
|
167 IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer); |
|
168 |
|
169 public: |
|
170 TInt16 iOrderRule; |
|
171 TBool iAscending; |
|
172 TBool iCaseSensitive; |
|
173 TDefId iPropertyDefId; |
|
174 }; |
|
175 |
|
176 |
|
177 |
|
178 #endif /*__MDCQUERY_H__*/ |