13 // Description: |
13 // Description: |
14 // CLogEventType |
14 // CLogEventType |
15 // |
15 // |
16 // |
16 // |
17 |
17 |
|
18 /** Gets the UID identifying the event type. |
|
19 |
|
20 @return The UID. */ |
18 inline TUid CLogEventType::Uid() const |
21 inline TUid CLogEventType::Uid() const |
19 /** Gets the UID identifying the event type. |
|
20 |
|
21 @return The UID. */ |
|
22 { |
22 { |
23 return iUid; |
23 return iUid; |
24 } |
24 } |
25 |
25 |
|
26 /** Sets the UID identifying the event type. |
|
27 |
|
28 @param aUid The Uid. */ |
26 inline void CLogEventType::SetUid(TUid aUid) |
29 inline void CLogEventType::SetUid(TUid aUid) |
27 /** Sets the UID identifying the event type. |
|
28 |
|
29 @param aUid The Uid. */ |
|
30 { |
30 { |
31 iUid = aUid; |
31 iUid = aUid; |
32 } |
32 } |
33 |
33 |
|
34 /** Gets the human readable and localised name of the event type. |
|
35 |
|
36 @return A non-modifiable descriptor containing the name. */ |
34 inline const TDesC& CLogEventType::Description() const |
37 inline const TDesC& CLogEventType::Description() const |
35 /** Gets the human readable and localised name of the event type. |
|
36 |
|
37 @return A non-modifiable descriptor containing the name. */ |
|
38 { |
38 { |
39 return *iDescription; |
39 return *iDescription; |
40 } |
40 } |
41 |
41 |
|
42 /** Sets the human readable and localised name of the event type. |
|
43 |
|
44 For example, Email. |
|
45 |
|
46 @param aDescription The name. */ |
42 inline void CLogEventType::SetDescription(const TDesC& aDescription) |
47 inline void CLogEventType::SetDescription(const TDesC& aDescription) |
43 /** Sets the human readable and localised name of the event type. |
|
44 |
|
45 For example, Email. |
|
46 |
|
47 @param aDescription The name. */ |
|
48 { |
48 { |
49 iDescription->Des().Copy(aDescription); |
49 iDescription->Des().Copy(aDescription); |
50 } |
50 } |
51 |
51 |
|
52 /** Determines whether logging for this event type is enabled. |
|
53 |
|
54 @return ETrue, if logging is enabled. EFalse, if logging is disabled. */ |
52 inline TBool CLogEventType::LoggingEnabled() const |
55 inline TBool CLogEventType::LoggingEnabled() const |
53 /** Determines whether logging for this event type is enabled. |
|
54 |
|
55 @return ETrue, if logging is enabled. EFalse, if logging is disabled. */ |
|
56 { |
56 { |
57 return iLoggingEnabled; |
57 return iLoggingEnabled; |
58 } |
58 } |
59 |
59 |
60 inline void CLogEventType::SetLoggingEnabled(TBool aEnable) |
|
61 /** Enables or disables logging for this event type. |
60 /** Enables or disables logging for this event type. |
62 |
61 |
63 Note that disabling the logging of an event type causes a CLogClient::AddEventL() |
62 Note that disabling the logging of an event type causes a CLogClient::AddEventL() |
64 request for an event of that type to complete with an appropriate error. |
63 request for an event of that type to complete with an appropriate error. |
65 |
64 |
66 @param aEnable ETrue, to enable logging for this event type.EFalse, to disable |
65 @param aEnable ETrue, to enable logging for this event type.EFalse, to disable |
67 logging for this event type. |
66 logging for this event type. |
68 @see CLogClient::AddEvent() */ |
67 @see CLogClient::AddEvent() */ |
|
68 inline void CLogEventType::SetLoggingEnabled(TBool aEnable) |
69 { |
69 { |
70 iLoggingEnabled = aEnable; |
70 iLoggingEnabled = aEnable; |
71 } |
71 } |
72 |
72 |
73 //********************************** |
73 //********************************** |
74 // CLogFilter |
74 // CLogFilter |
75 //********************************** |
75 //********************************** |
76 |
76 |
77 inline TUid CLogFilter::EventType() const |
|
78 /** Gets the event type used by the filter. |
77 /** Gets the event type used by the filter. |
79 |
78 |
80 @return The event type UID. |
79 @return The event type UID. |
81 @see CLogEvent::EventType() */ |
80 @see CLogEvent::EventType() */ |
|
81 inline TUid CLogFilter::EventType() const |
82 { |
82 { |
83 return iEventType; |
83 return iEventType; |
84 } |
84 } |
85 |
85 |
86 inline void CLogFilter::SetEventType(TUid aType) |
|
87 /** Sets the event type to be used by the filter. |
86 /** Sets the event type to be used by the filter. |
88 |
87 |
89 @param aType The event type UID. |
88 @param aType The event type UID. |
90 @see CLogEvent::SetEventType() */ |
89 @see CLogEvent::SetEventType() */ |
|
90 inline void CLogFilter::SetEventType(TUid aType) |
91 { |
91 { |
92 iEventType = aType; |
92 iEventType = aType; |
93 } |
93 } |
94 |
94 |
95 inline const TDesC& CLogFilter::RemoteParty() const |
|
96 /** Gets the remote party string used by the filter. |
95 /** Gets the remote party string used by the filter. |
97 |
96 |
98 @return A non-modifiable descriptor containing the remote party string. |
97 @return A non-modifiable descriptor containing the remote party string. |
99 @see CLogEvent::RemoteParty() */ |
98 @see CLogEvent::RemoteParty() */ |
|
99 inline const TDesC& CLogFilter::RemoteParty() const |
100 { |
100 { |
101 return *iRemoteParty; |
101 return *iRemoteParty; |
102 } |
102 } |
103 |
103 |
104 inline void CLogFilter::SetRemoteParty(const TDesC& aRemote) |
|
105 /** Sets the remote party string to be used by the filter. |
104 /** Sets the remote party string to be used by the filter. |
106 |
105 |
107 @param aRemote The remote party string. |
106 @param aRemote The remote party string. |
108 @see CLogEvent::SetRemoteParty() */ |
107 @see CLogEvent::SetRemoteParty() */ |
|
108 inline void CLogFilter::SetRemoteParty(const TDesC& aRemote) |
109 { |
109 { |
110 iRemoteParty->Des().Copy(aRemote); |
110 iRemoteParty->Des().Copy(aRemote); |
111 } |
111 } |
112 |
112 |
113 inline const TDesC& CLogFilter::Direction() const |
|
114 /** Gets the direction string used by the filter. |
113 /** Gets the direction string used by the filter. |
115 |
114 |
116 @return A non-modifiable descriptor containing the direction string. |
115 @return A non-modifiable descriptor containing the direction string. |
117 @see CLogEvent::Direction() */ |
116 @see CLogEvent::Direction() */ |
|
117 inline const TDesC& CLogFilter::Direction() const |
118 { |
118 { |
119 return *iDirection; |
119 return *iDirection; |
120 } |
120 } |
121 |
121 |
122 inline void CLogFilter::SetDirection(const TDesC& aDirection) |
|
123 /** Sets the direction string to be used by the filter. |
122 /** Sets the direction string to be used by the filter. |
124 |
123 |
125 @param aDirection The direction string. |
124 @param aDirection The direction string. |
126 @see CLogEvent::SetDirection() */ |
125 @see CLogEvent::SetDirection() */ |
|
126 inline void CLogFilter::SetDirection(const TDesC& aDirection) |
127 { |
127 { |
128 iDirection->Des().Copy(aDirection); |
128 iDirection->Des().Copy(aDirection); |
129 } |
129 } |
130 |
130 |
131 inline TLogDurationType CLogFilter::DurationType() const |
|
132 /** Gets the duration type used by the filter. |
131 /** Gets the duration type used by the filter. |
133 |
132 |
134 @return The duration type. |
133 @return The duration type. |
135 @see CLogEvent::DurationType() */ |
134 @see CLogEvent::DurationType() */ |
|
135 inline TLogDurationType CLogFilter::DurationType() const |
136 { |
136 { |
137 return iDurationType; |
137 return iDurationType; |
138 } |
138 } |
139 |
139 |
140 inline void CLogFilter::SetDurationType(TLogDurationType aType) |
|
141 /** Sets the duration type to be used by the filter. |
140 /** Sets the duration type to be used by the filter. |
142 |
141 |
143 @param aType The duration type. |
142 @param aType The duration type. |
144 @see CLogEvent::SetDurationType() */ |
143 @see CLogEvent::SetDurationType() */ |
|
144 inline void CLogFilter::SetDurationType(TLogDurationType aType) |
145 { |
145 { |
146 iDurationType = aType; |
146 iDurationType = aType; |
147 } |
147 } |
148 |
148 |
149 inline const TDesC& CLogFilter::Status() const |
|
150 /** Gets the delivery status used by the filter. |
149 /** Gets the delivery status used by the filter. |
151 |
150 |
152 @return A non-modifiable descriptor containing the delivery status. |
151 @return A non-modifiable descriptor containing the delivery status. |
153 @see CLogEvent::Status() */ |
152 @see CLogEvent::Status() */ |
|
153 inline const TDesC& CLogFilter::Status() const |
154 { |
154 { |
155 return *iStatus; |
155 return *iStatus; |
156 } |
156 } |
157 |
157 |
158 inline void CLogFilter::SetStatus(const TDesC& aStatus) |
|
159 /** Sets the delivery status to be used by the filter. |
158 /** Sets the delivery status to be used by the filter. |
160 |
159 |
161 @param aStatus The delivery status. |
160 @param aStatus The delivery status. |
162 @see CLogEvent::SetStatus() */ |
161 @see CLogEvent::SetStatus() */ |
|
162 inline void CLogFilter::SetStatus(const TDesC& aStatus) |
163 { |
163 { |
164 iStatus->Des().Copy(aStatus); |
164 iStatus->Des().Copy(aStatus); |
165 } |
165 } |
166 |
166 |
167 inline TLogContactItemId CLogFilter::Contact() const |
|
168 /** Gets the contact ID used by the filter. |
167 /** Gets the contact ID used by the filter. |
169 |
168 |
170 @return The contact ID. |
169 @return The contact ID. |
171 @see CLogEvent::Contact() */ |
170 @see CLogEvent::Contact() */ |
|
171 inline TLogContactItemId CLogFilter::Contact() const |
172 { |
172 { |
173 return iContact; |
173 return iContact; |
174 } |
174 } |
175 |
175 |
176 inline void CLogFilter::SetContact(TLogContactItemId aContact) |
|
177 /** Sets the contact ID to be used by the filter. |
176 /** Sets the contact ID to be used by the filter. |
178 |
177 |
179 @param aContact The contact ID. |
178 @param aContact The contact ID. |
180 @see CLogEvent::SetContact() */ |
179 @see CLogEvent::SetContact() */ |
|
180 inline void CLogFilter::SetContact(TLogContactItemId aContact) |
181 { |
181 { |
182 iContact = aContact; |
182 iContact = aContact; |
183 } |
183 } |
184 |
184 |
185 inline const TDesC& CLogFilter::Number() const |
|
186 /** Gets the phone number used by the filter. |
185 /** Gets the phone number used by the filter. |
187 |
186 |
188 @return A non-modifiable descriptor containing the phone number. |
187 @return A non-modifiable descriptor containing the phone number. |
189 @see CLogEvent::Number() */ |
188 @see CLogEvent::Number() */ |
|
189 inline const TDesC& CLogFilter::Number() const |
190 { |
190 { |
191 return *iNumber; |
191 return *iNumber; |
192 } |
192 } |
193 |
193 |
194 inline void CLogFilter::SetNumber(const TDesC& aNumber) |
|
195 /** Sets the phone number to be used by the filter. |
194 /** Sets the phone number to be used by the filter. |
196 |
195 |
197 @param aNumber The phone number. |
196 @param aNumber The phone number. |
198 @see CLogEvent::SetNumber() */ |
197 @see CLogEvent::SetNumber() */ |
|
198 inline void CLogFilter::SetNumber(const TDesC& aNumber) |
199 { |
199 { |
200 iNumber->Des().Copy(aNumber); |
200 iNumber->Des().Copy(aNumber); |
201 } |
201 } |
202 |
202 |
203 inline TUint32 CLogFilter::NullFields() const |
|
204 /** Identifies the fields defined as NULL in the filter. These are the fields that |
203 /** Identifies the fields defined as NULL in the filter. These are the fields that |
205 the filter expects to be NULL in the database. A NULL field is one that has |
204 the filter expects to be NULL in the database. A NULL field is one that has |
206 no value. |
205 no value. |
207 |
206 |
208 @return Bit values defining the null fields. |
207 @return Bit values defining the null fields. |
209 @see SetNullFields() */ |
208 @see SetNullFields() */ |
|
209 inline TUint32 CLogFilter::NullFields() const |
210 { |
210 { |
211 return iNullFields; |
211 return iNullFields; |
212 } |
212 } |
213 |
213 |
214 inline void CLogFilter::SetNullFields(TUint32 aFields) |
|
215 /** Defines NULL fields to the filter. These are the fields that the filter expects |
214 /** Defines NULL fields to the filter. These are the fields that the filter expects |
216 to be NULL in the database. A NULL field is one that has no value. |
215 to be NULL in the database. A NULL field is one that has no value. |
217 |
216 |
218 Each field is identified by a bit value. The bit values may be ORd together |
217 Each field is identified by a bit value. The bit values may be ORd together |
219 in any combination. |
218 in any combination. |
222 field generates an OR condition in the SQL WHERE clause. |
221 field generates an OR condition in the SQL WHERE clause. |
223 |
222 |
224 @param aFields Bit values defining the null fields. These are one or more |
223 @param aFields Bit values defining the null fields. These are one or more |
225 of the following values defined in logwrap.hrh: ELogContactField, ELogDirectionField, |
224 of the following values defined in logwrap.hrh: ELogContactField, ELogDirectionField, |
226 ELogDurationTypeField, ELogEventTypeField, ELogNumberField, ELogRemotePartyField, |
225 ELogDurationTypeField, ELogEventTypeField, ELogNumberField, ELogRemotePartyField, |
227 ELogStatusField, ELogFlagsField, ELogSubjectField, ELogLinkField and ELogDataField. */ |
226 ELogStatusField, ELogFlagsField, ELogSubjectField, ELogLinkField, ELogDataField, ELogSimIdField. */ |
|
227 inline void CLogFilter::SetNullFields(TUint32 aFields) |
228 { |
228 { |
229 iNullFields = aFields; |
229 iNullFields = aFields; |
230 } |
230 } |
231 |
231 |
|
232 /** Gets the UTC start time used by the filter. |
|
233 |
|
234 @return The UTC start time. */ |
232 inline const TTime& CLogFilter::StartTime() const |
235 inline const TTime& CLogFilter::StartTime() const |
233 /** Gets the UTC start time used by the filter. |
|
234 |
|
235 @since 7.0s |
|
236 @return The UTC start time. */ |
|
237 { |
236 { |
238 return iStartTime; |
237 return iStartTime; |
239 } |
238 } |
240 |
239 |
|
240 /** Sets the specified UTC start time to be used by the filter. |
|
241 |
|
242 @param aStartTime The UTC start time to be set. */ |
241 inline void CLogFilter::SetStartTime(const TTime& aStartTime) |
243 inline void CLogFilter::SetStartTime(const TTime& aStartTime) |
242 /** Sets the specified UTC start time to be used by the filter. |
|
243 |
|
244 @since 7.0s |
|
245 @param aStartTime The UTC start time to be set. */ |
|
246 { |
244 { |
247 iStartTime = aStartTime; |
245 iStartTime = aStartTime; |
248 } |
246 } |
249 |
247 |
|
248 /** Gets the UTC end time used by the filter. |
|
249 |
|
250 @return The UTC end time. */ |
250 inline const TTime& CLogFilter::EndTime() const |
251 inline const TTime& CLogFilter::EndTime() const |
251 /** Gets the UTC end time used by the filter. |
|
252 |
|
253 @since 7.0s |
|
254 @return The UTC end time. */ |
|
255 { |
252 { |
256 return iEndTime; |
253 return iEndTime; |
257 } |
254 } |
258 |
255 |
|
256 /** Sets the specified UTC end time to be used by the filter. |
|
257 |
|
258 @param aEndTime The UTC end time to be set. */ |
259 inline void CLogFilter::SetEndTime(const TTime& aEndTime) |
259 inline void CLogFilter::SetEndTime(const TTime& aEndTime) |
260 /** Sets the specified UTC end time to be used by the filter. |
|
261 |
|
262 @since 7.0s |
|
263 @param aEndTime The UTC end time to be set. */ |
|
264 { |
260 { |
265 iEndTime = aEndTime; |
261 iEndTime = aEndTime; |
266 } |
262 } |
267 |
263 |
|
264 /** Gets the flags used by the filter. |
|
265 |
|
266 @return The flags. */ |
268 inline TLogFlags CLogFilter::Flags() const |
267 inline TLogFlags CLogFilter::Flags() const |
269 /** Gets the flags used by the filter. |
|
270 |
|
271 @return The flags. */ |
|
272 { |
268 { |
273 return iFlags; |
269 return iFlags; |
274 } |
270 } |
275 |
271 |
|
272 /** Sets the specified flags to be used by the filter. |
|
273 |
|
274 @param aFlags The flags to be set. */ |
276 inline void CLogFilter::SetFlags(TLogFlags aFlags) |
275 inline void CLogFilter::SetFlags(TLogFlags aFlags) |
277 /** Sets the specified flags to be used by the filter. |
|
278 |
|
279 @param aFlags The flags to be set. */ |
|
280 { |
276 { |
281 __ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant()); |
277 __ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant()); |
282 iFlags = (TLogFlags)(iFlags | aFlags); |
278 iFlags = (TLogFlags)(iFlags | aFlags); |
283 } |
279 } |
284 |
280 |
|
281 /** Clears the specified flags to be used by the filter. |
|
282 |
|
283 The constant KLogFlagsMask can be used to clear all the flags. |
|
284 |
|
285 @param aFlags The flags to be cleared */ |
285 inline void CLogFilter::ClearFlags(TLogFlags aFlags) |
286 inline void CLogFilter::ClearFlags(TLogFlags aFlags) |
286 /** Clears the specified flags to be used by the filter. |
|
287 |
|
288 The constant KLogFlagsMask can be used to clear all the flags. |
|
289 |
|
290 @param aFlags The flags to be cleared */ |
|
291 { |
287 { |
292 __ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant()); |
288 __ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant()); |
293 iFlags = (TLogFlags)(iFlags & ~aFlags); |
289 iFlags = (TLogFlags)(iFlags & ~aFlags); |
294 } |
290 } |