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