Update contrib.
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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 /** Gets the UID identifying the event type.
21 inline TUid CLogEventType::Uid() const
26 /** Sets the UID identifying the event type.
28 @param aUid The Uid. */
29 inline void CLogEventType::SetUid(TUid aUid)
34 /** Gets the human readable and localised name of the event type.
36 @return A non-modifiable descriptor containing the name. */
37 inline const TDesC& CLogEventType::Description() const
42 /** Sets the human readable and localised name of the event type.
46 @param aDescription The name. */
47 inline void CLogEventType::SetDescription(const TDesC& aDescription)
49 iDescription->Des().Copy(aDescription);
52 /** Determines whether logging for this event type is enabled.
54 @return ETrue, if logging is enabled. EFalse, if logging is disabled. */
55 inline TBool CLogEventType::LoggingEnabled() const
57 return iLoggingEnabled;
60 /** Enables or disables logging for this event type.
62 Note that disabling the logging of an event type causes a CLogClient::AddEventL()
63 request for an event of that type to complete with an appropriate error.
65 @param aEnable ETrue, to enable logging for this event type.EFalse, to disable
66 logging for this event type.
67 @see CLogClient::AddEvent() */
68 inline void CLogEventType::SetLoggingEnabled(TBool aEnable)
70 iLoggingEnabled = aEnable;
73 //**********************************
75 //**********************************
77 /** Gets the event type used by the filter.
79 @return The event type UID.
80 @see CLogEvent::EventType() */
81 inline TUid CLogFilter::EventType() const
86 /** Sets the event type to be used by the filter.
88 @param aType The event type UID.
89 @see CLogEvent::SetEventType() */
90 inline void CLogFilter::SetEventType(TUid aType)
95 /** Gets the remote party string used by the filter.
97 @return A non-modifiable descriptor containing the remote party string.
98 @see CLogEvent::RemoteParty() */
99 inline const TDesC& CLogFilter::RemoteParty() const
101 return *iRemoteParty;
104 /** Sets the remote party string to be used by the filter.
106 @param aRemote The remote party string.
107 @see CLogEvent::SetRemoteParty() */
108 inline void CLogFilter::SetRemoteParty(const TDesC& aRemote)
110 iRemoteParty->Des().Copy(aRemote);
113 /** Gets the direction string used by the filter.
115 @return A non-modifiable descriptor containing the direction string.
116 @see CLogEvent::Direction() */
117 inline const TDesC& CLogFilter::Direction() const
122 /** Sets the direction string to be used by the filter.
124 @param aDirection The direction string.
125 @see CLogEvent::SetDirection() */
126 inline void CLogFilter::SetDirection(const TDesC& aDirection)
128 iDirection->Des().Copy(aDirection);
131 /** Gets the duration type used by the filter.
133 @return The duration type.
134 @see CLogEvent::DurationType() */
135 inline TLogDurationType CLogFilter::DurationType() const
137 return iDurationType;
140 /** Sets the duration type to be used by the filter.
142 @param aType The duration type.
143 @see CLogEvent::SetDurationType() */
144 inline void CLogFilter::SetDurationType(TLogDurationType aType)
146 iDurationType = aType;
149 /** Gets the delivery status used by the filter.
151 @return A non-modifiable descriptor containing the delivery status.
152 @see CLogEvent::Status() */
153 inline const TDesC& CLogFilter::Status() const
158 /** Sets the delivery status to be used by the filter.
160 @param aStatus The delivery status.
161 @see CLogEvent::SetStatus() */
162 inline void CLogFilter::SetStatus(const TDesC& aStatus)
164 iStatus->Des().Copy(aStatus);
167 /** Gets the contact ID used by the filter.
169 @return The contact ID.
170 @see CLogEvent::Contact() */
171 inline TLogContactItemId CLogFilter::Contact() const
176 /** Sets the contact ID to be used by the filter.
178 @param aContact The contact ID.
179 @see CLogEvent::SetContact() */
180 inline void CLogFilter::SetContact(TLogContactItemId aContact)
185 /** Gets the phone number used by the filter.
187 @return A non-modifiable descriptor containing the phone number.
188 @see CLogEvent::Number() */
189 inline const TDesC& CLogFilter::Number() const
194 /** Sets the phone number to be used by the filter.
196 @param aNumber The phone number.
197 @see CLogEvent::SetNumber() */
198 inline void CLogFilter::SetNumber(const TDesC& aNumber)
200 iNumber->Des().Copy(aNumber);
203 /** Identifies the fields defined as NULL in the filter. These are the fields that
204 the filter expects to be NULL in the database. A NULL field is one that has
207 @return Bit values defining the null fields.
208 @see SetNullFields() */
209 inline TUint32 CLogFilter::NullFields() const
214 /** Defines NULL fields to the filter. These are the fields that the filter expects
215 to be NULL in the database. A NULL field is one that has no value.
217 Each field is identified by a bit value. The bit values may be ORd together
220 Note that setting a flag and explicitly setting a value for the corresponding
221 field generates an OR condition in the SQL WHERE clause.
223 @param aFields Bit values defining the null fields. These are one or more
224 of the following values defined in logwrap.hrh: ELogContactField, ELogDirectionField,
225 ELogDurationTypeField, ELogEventTypeField, ELogNumberField, ELogRemotePartyField,
226 ELogStatusField, ELogFlagsField, ELogSubjectField, ELogLinkField, ELogDataField, ELogSimIdField. */
227 inline void CLogFilter::SetNullFields(TUint32 aFields)
229 iNullFields = aFields;
232 /** Gets the UTC start time used by the filter.
234 @return The UTC start time. */
235 inline const TTime& CLogFilter::StartTime() const
240 /** Sets the specified UTC start time to be used by the filter.
242 @param aStartTime The UTC start time to be set. */
243 inline void CLogFilter::SetStartTime(const TTime& aStartTime)
245 iStartTime = aStartTime;
248 /** Gets the UTC end time used by the filter.
250 @return The UTC end time. */
251 inline const TTime& CLogFilter::EndTime() const
256 /** Sets the specified UTC end time to be used by the filter.
258 @param aEndTime The UTC end time to be set. */
259 inline void CLogFilter::SetEndTime(const TTime& aEndTime)
264 /** Gets the flags used by the filter.
266 @return The flags. */
267 inline TLogFlags CLogFilter::Flags() const
272 /** Sets the specified flags to be used by the filter.
274 @param aFlags The flags to be set. */
275 inline void CLogFilter::SetFlags(TLogFlags aFlags)
277 __ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant());
278 iFlags = (TLogFlags)(iFlags | aFlags);
281 /** Clears the specified flags to be used by the filter.
283 The constant KLogFlagsMask can be used to clear all the flags.
285 @param aFlags The flags to be cleared */
286 inline void CLogFilter::ClearFlags(TLogFlags aFlags)
288 __ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant());
289 iFlags = (TLogFlags)(iFlags & ~aFlags);