1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 inline TUid CLogEventType::Uid() const
19 /** Gets the UID identifying the event type.
26 inline void CLogEventType::SetUid(TUid aUid)
27 /** Sets the UID identifying the event type.
29 @param aUid The Uid. */
34 inline const TDesC& CLogEventType::Description() const
35 /** Gets the human readable and localised name of the event type.
37 @return A non-modifiable descriptor containing the name. */
42 inline void CLogEventType::SetDescription(const TDesC& aDescription)
43 /** Sets the human readable and localised name of the event type.
47 @param aDescription The name. */
49 iDescription->Des().Copy(aDescription);
52 inline TBool CLogEventType::LoggingEnabled() const
53 /** Determines whether logging for this event type is enabled.
55 @return ETrue, if logging is enabled. EFalse, if logging is disabled. */
57 return iLoggingEnabled;
60 inline void CLogEventType::SetLoggingEnabled(TBool aEnable)
61 /** Enables or disables logging for this event type.
63 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.
66 @param aEnable ETrue, to enable logging for this event type.EFalse, to disable
67 logging for this event type.
68 @see CLogClient::AddEvent() */
70 iLoggingEnabled = aEnable;
73 //**********************************
75 //**********************************
77 inline TUid CLogFilter::EventType() const
78 /** Gets the event type used by the filter.
80 @return The event type UID.
81 @see CLogEvent::EventType() */
86 inline void CLogFilter::SetEventType(TUid aType)
87 /** Sets the event type to be used by the filter.
89 @param aType The event type UID.
90 @see CLogEvent::SetEventType() */
95 inline const TDesC& CLogFilter::RemoteParty() const
96 /** Gets the remote party string used by the filter.
98 @return A non-modifiable descriptor containing the remote party string.
99 @see CLogEvent::RemoteParty() */
101 return *iRemoteParty;
104 inline void CLogFilter::SetRemoteParty(const TDesC& aRemote)
105 /** Sets the remote party string to be used by the filter.
107 @param aRemote The remote party string.
108 @see CLogEvent::SetRemoteParty() */
110 iRemoteParty->Des().Copy(aRemote);
113 inline const TDesC& CLogFilter::Direction() const
114 /** Gets the direction string used by the filter.
116 @return A non-modifiable descriptor containing the direction string.
117 @see CLogEvent::Direction() */
122 inline void CLogFilter::SetDirection(const TDesC& aDirection)
123 /** Sets the direction string to be used by the filter.
125 @param aDirection The direction string.
126 @see CLogEvent::SetDirection() */
128 iDirection->Des().Copy(aDirection);
131 inline TLogDurationType CLogFilter::DurationType() const
132 /** Gets the duration type used by the filter.
134 @return The duration type.
135 @see CLogEvent::DurationType() */
137 return iDurationType;
140 inline void CLogFilter::SetDurationType(TLogDurationType aType)
141 /** Sets the duration type to be used by the filter.
143 @param aType The duration type.
144 @see CLogEvent::SetDurationType() */
146 iDurationType = aType;
149 inline const TDesC& CLogFilter::Status() const
150 /** Gets the delivery status used by the filter.
152 @return A non-modifiable descriptor containing the delivery status.
153 @see CLogEvent::Status() */
158 inline void CLogFilter::SetStatus(const TDesC& aStatus)
159 /** Sets the delivery status to be used by the filter.
161 @param aStatus The delivery status.
162 @see CLogEvent::SetStatus() */
164 iStatus->Des().Copy(aStatus);
167 inline TLogContactItemId CLogFilter::Contact() const
168 /** Gets the contact ID used by the filter.
170 @return The contact ID.
171 @see CLogEvent::Contact() */
176 inline void CLogFilter::SetContact(TLogContactItemId aContact)
177 /** Sets the contact ID to be used by the filter.
179 @param aContact The contact ID.
180 @see CLogEvent::SetContact() */
185 inline const TDesC& CLogFilter::Number() const
186 /** Gets the phone number used by the filter.
188 @return A non-modifiable descriptor containing the phone number.
189 @see CLogEvent::Number() */
194 inline void CLogFilter::SetNumber(const TDesC& aNumber)
195 /** Sets the phone number to be used by the filter.
197 @param aNumber The phone number.
198 @see CLogEvent::SetNumber() */
200 iNumber->Des().Copy(aNumber);
203 inline TUint32 CLogFilter::NullFields() const
204 /** 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
208 @return Bit values defining the null fields.
209 @see SetNullFields() */
214 inline void CLogFilter::SetNullFields(TUint32 aFields)
215 /** 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.
218 Each field is identified by a bit value. The bit values may be ORd together
221 Note that setting a flag and explicitly setting a value for the corresponding
222 field generates an OR condition in the SQL WHERE clause.
224 @param aFields Bit values defining the null fields. These are one or more
225 of the following values defined in logwrap.hrh: ELogContactField, ELogDirectionField,
226 ELogDurationTypeField, ELogEventTypeField, ELogNumberField, ELogRemotePartyField,
227 ELogStatusField, ELogFlagsField, ELogSubjectField, ELogLinkField and ELogDataField. */
229 iNullFields = aFields;
232 inline const TTime& CLogFilter::StartTime() const
233 /** Gets the UTC start time used by the filter.
236 @return The UTC start time. */
241 inline void CLogFilter::SetStartTime(const TTime& aStartTime)
242 /** Sets the specified UTC start time to be used by the filter.
245 @param aStartTime The UTC start time to be set. */
247 iStartTime = aStartTime;
250 inline const TTime& CLogFilter::EndTime() const
251 /** Gets the UTC end time used by the filter.
254 @return The UTC end time. */
259 inline void CLogFilter::SetEndTime(const TTime& aEndTime)
260 /** Sets the specified UTC end time to be used by the filter.
263 @param aEndTime The UTC end time to be set. */
268 inline TLogFlags CLogFilter::Flags() const
269 /** Gets the flags used by the filter.
271 @return The flags. */
276 inline void CLogFilter::SetFlags(TLogFlags aFlags)
277 /** Sets the specified flags to be used by the filter.
279 @param aFlags The flags to be set. */
281 __ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant());
282 iFlags = (TLogFlags)(iFlags | aFlags);
285 inline void CLogFilter::ClearFlags(TLogFlags aFlags)
286 /** Clears the specified flags to be used by the filter.
288 The constant KLogFlagsMask can be used to clear all the flags.
290 @param aFlags The flags to be cleared */
292 __ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant());
293 iFlags = (TLogFlags)(iFlags & ~aFlags);