1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/loggingservices/eventlogger/LogCli/inc/LOGCLI.INL Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,290 @@
1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// CLogEventType
1.18 +//
1.19 +//
1.20 +
1.21 +/** Gets the UID identifying the event type.
1.22 +
1.23 +@return The UID. */
1.24 +inline TUid CLogEventType::Uid() const
1.25 + {
1.26 + return iUid;
1.27 + }
1.28 +
1.29 +/** Sets the UID identifying the event type.
1.30 +
1.31 +@param aUid The Uid. */
1.32 +inline void CLogEventType::SetUid(TUid aUid)
1.33 + {
1.34 + iUid = aUid;
1.35 + }
1.36 +
1.37 +/** Gets the human readable and localised name of the event type.
1.38 +
1.39 +@return A non-modifiable descriptor containing the name. */
1.40 +inline const TDesC& CLogEventType::Description() const
1.41 + {
1.42 + return *iDescription;
1.43 + }
1.44 +
1.45 +/** Sets the human readable and localised name of the event type.
1.46 +
1.47 +For example, Email.
1.48 +
1.49 +@param aDescription The name. */
1.50 +inline void CLogEventType::SetDescription(const TDesC& aDescription)
1.51 + {
1.52 + iDescription->Des().Copy(aDescription);
1.53 + }
1.54 +
1.55 +/** Determines whether logging for this event type is enabled.
1.56 +
1.57 +@return ETrue, if logging is enabled. EFalse, if logging is disabled. */
1.58 +inline TBool CLogEventType::LoggingEnabled() const
1.59 + {
1.60 + return iLoggingEnabled;
1.61 + }
1.62 +
1.63 +/** Enables or disables logging for this event type.
1.64 +
1.65 +Note that disabling the logging of an event type causes a CLogClient::AddEventL()
1.66 +request for an event of that type to complete with an appropriate error.
1.67 +
1.68 +@param aEnable ETrue, to enable logging for this event type.EFalse, to disable
1.69 +logging for this event type.
1.70 +@see CLogClient::AddEvent() */
1.71 +inline void CLogEventType::SetLoggingEnabled(TBool aEnable)
1.72 + {
1.73 + iLoggingEnabled = aEnable;
1.74 + }
1.75 +
1.76 +//**********************************
1.77 +// CLogFilter
1.78 +//**********************************
1.79 +
1.80 +/** Gets the event type used by the filter.
1.81 +
1.82 +@return The event type UID.
1.83 +@see CLogEvent::EventType() */
1.84 +inline TUid CLogFilter::EventType() const
1.85 + {
1.86 + return iEventType;
1.87 + }
1.88 +
1.89 +/** Sets the event type to be used by the filter.
1.90 +
1.91 +@param aType The event type UID.
1.92 +@see CLogEvent::SetEventType() */
1.93 +inline void CLogFilter::SetEventType(TUid aType)
1.94 + {
1.95 + iEventType = aType;
1.96 + }
1.97 +
1.98 +/** Gets the remote party string used by the filter.
1.99 +
1.100 +@return A non-modifiable descriptor containing the remote party string.
1.101 +@see CLogEvent::RemoteParty() */
1.102 +inline const TDesC& CLogFilter::RemoteParty() const
1.103 + {
1.104 + return *iRemoteParty;
1.105 + }
1.106 +
1.107 +/** Sets the remote party string to be used by the filter.
1.108 +
1.109 +@param aRemote The remote party string.
1.110 +@see CLogEvent::SetRemoteParty() */
1.111 +inline void CLogFilter::SetRemoteParty(const TDesC& aRemote)
1.112 + {
1.113 + iRemoteParty->Des().Copy(aRemote);
1.114 + }
1.115 +
1.116 +/** Gets the direction string used by the filter.
1.117 +
1.118 +@return A non-modifiable descriptor containing the direction string.
1.119 +@see CLogEvent::Direction() */
1.120 +inline const TDesC& CLogFilter::Direction() const
1.121 + {
1.122 + return *iDirection;
1.123 + }
1.124 +
1.125 +/** Sets the direction string to be used by the filter.
1.126 +
1.127 +@param aDirection The direction string.
1.128 +@see CLogEvent::SetDirection() */
1.129 +inline void CLogFilter::SetDirection(const TDesC& aDirection)
1.130 + {
1.131 + iDirection->Des().Copy(aDirection);
1.132 + }
1.133 +
1.134 +/** Gets the duration type used by the filter.
1.135 +
1.136 +@return The duration type.
1.137 +@see CLogEvent::DurationType() */
1.138 +inline TLogDurationType CLogFilter::DurationType() const
1.139 + {
1.140 + return iDurationType;
1.141 + }
1.142 +
1.143 +/** Sets the duration type to be used by the filter.
1.144 +
1.145 +@param aType The duration type.
1.146 +@see CLogEvent::SetDurationType() */
1.147 +inline void CLogFilter::SetDurationType(TLogDurationType aType)
1.148 + {
1.149 + iDurationType = aType;
1.150 + }
1.151 +
1.152 +/** Gets the delivery status used by the filter.
1.153 +
1.154 +@return A non-modifiable descriptor containing the delivery status.
1.155 +@see CLogEvent::Status() */
1.156 +inline const TDesC& CLogFilter::Status() const
1.157 + {
1.158 + return *iStatus;
1.159 + }
1.160 +
1.161 +/** Sets the delivery status to be used by the filter.
1.162 +
1.163 +@param aStatus The delivery status.
1.164 +@see CLogEvent::SetStatus() */
1.165 +inline void CLogFilter::SetStatus(const TDesC& aStatus)
1.166 + {
1.167 + iStatus->Des().Copy(aStatus);
1.168 + }
1.169 +
1.170 +/** Gets the contact ID used by the filter.
1.171 +
1.172 +@return The contact ID.
1.173 +@see CLogEvent::Contact() */
1.174 +inline TLogContactItemId CLogFilter::Contact() const
1.175 + {
1.176 + return iContact;
1.177 + }
1.178 +
1.179 +/** Sets the contact ID to be used by the filter.
1.180 +
1.181 +@param aContact The contact ID.
1.182 +@see CLogEvent::SetContact() */
1.183 +inline void CLogFilter::SetContact(TLogContactItemId aContact)
1.184 + {
1.185 + iContact = aContact;
1.186 + }
1.187 +
1.188 +/** Gets the phone number used by the filter.
1.189 +
1.190 +@return A non-modifiable descriptor containing the phone number.
1.191 +@see CLogEvent::Number() */
1.192 +inline const TDesC& CLogFilter::Number() const
1.193 + {
1.194 + return *iNumber;
1.195 + }
1.196 +
1.197 +/** Sets the phone number to be used by the filter.
1.198 +
1.199 +@param aNumber The phone number.
1.200 +@see CLogEvent::SetNumber() */
1.201 +inline void CLogFilter::SetNumber(const TDesC& aNumber)
1.202 + {
1.203 + iNumber->Des().Copy(aNumber);
1.204 + }
1.205 +
1.206 +/** Identifies the fields defined as NULL in the filter. These are the fields that
1.207 +the filter expects to be NULL in the database. A NULL field is one that has
1.208 +no value.
1.209 +
1.210 +@return Bit values defining the null fields.
1.211 +@see SetNullFields() */
1.212 +inline TUint32 CLogFilter::NullFields() const
1.213 + {
1.214 + return iNullFields;
1.215 + }
1.216 +
1.217 +/** Defines NULL fields to the filter. These are the fields that the filter expects
1.218 +to be NULL in the database. A NULL field is one that has no value.
1.219 +
1.220 +Each field is identified by a bit value. The bit values may be ORd together
1.221 +in any combination.
1.222 +
1.223 +Note that setting a flag and explicitly setting a value for the corresponding
1.224 +field generates an OR condition in the SQL WHERE clause.
1.225 +
1.226 +@param aFields Bit values defining the null fields. These are one or more
1.227 +of the following values defined in logwrap.hrh: ELogContactField, ELogDirectionField,
1.228 +ELogDurationTypeField, ELogEventTypeField, ELogNumberField, ELogRemotePartyField,
1.229 +ELogStatusField, ELogFlagsField, ELogSubjectField, ELogLinkField, ELogDataField, ELogSimIdField. */
1.230 +inline void CLogFilter::SetNullFields(TUint32 aFields)
1.231 + {
1.232 + iNullFields = aFields;
1.233 + }
1.234 +
1.235 +/** Gets the UTC start time used by the filter.
1.236 +
1.237 +@return The UTC start time. */
1.238 +inline const TTime& CLogFilter::StartTime() const
1.239 + {
1.240 + return iStartTime;
1.241 + }
1.242 +
1.243 +/** Sets the specified UTC start time to be used by the filter.
1.244 +
1.245 +@param aStartTime The UTC start time to be set. */
1.246 +inline void CLogFilter::SetStartTime(const TTime& aStartTime)
1.247 + {
1.248 + iStartTime = aStartTime;
1.249 + }
1.250 +
1.251 +/** Gets the UTC end time used by the filter.
1.252 +
1.253 +@return The UTC end time. */
1.254 +inline const TTime& CLogFilter::EndTime() const
1.255 + {
1.256 + return iEndTime;
1.257 + }
1.258 +
1.259 +/** Sets the specified UTC end time to be used by the filter.
1.260 +
1.261 +@param aEndTime The UTC end time to be set. */
1.262 +inline void CLogFilter::SetEndTime(const TTime& aEndTime)
1.263 + {
1.264 + iEndTime = aEndTime;
1.265 + }
1.266 +
1.267 +/** Gets the flags used by the filter.
1.268 +
1.269 +@return The flags. */
1.270 +inline TLogFlags CLogFilter::Flags() const
1.271 + {
1.272 + return iFlags;
1.273 + }
1.274 +
1.275 +/** Sets the specified flags to be used by the filter.
1.276 +
1.277 +@param aFlags The flags to be set. */
1.278 +inline void CLogFilter::SetFlags(TLogFlags aFlags)
1.279 + {
1.280 + __ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant());
1.281 + iFlags = (TLogFlags)(iFlags | aFlags);
1.282 + }
1.283 +
1.284 +/** Clears the specified flags to be used by the filter.
1.285 +
1.286 +The constant KLogFlagsMask can be used to clear all the flags.
1.287 +
1.288 +@param aFlags The flags to be cleared */
1.289 +inline void CLogFilter::ClearFlags(TLogFlags aFlags)
1.290 + {
1.291 + __ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant());
1.292 + iFlags = (TLogFlags)(iFlags & ~aFlags);
1.293 + }