epoc32/include/logcli.inl
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 logcli.inl
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // CLogEventType
       
    15 // 
       
    16 //
       
    17 
       
    18 inline TUid CLogEventType::Uid() const
       
    19 /** Gets the UID identifying the event type.
       
    20 
       
    21 @return The UID. */
       
    22 	{
       
    23 	return iUid;
       
    24 	}
       
    25 
       
    26 inline void CLogEventType::SetUid(TUid aUid)
       
    27 /** Sets the UID identifying the event type.
       
    28 
       
    29 @param aUid The Uid. */
       
    30 	{
       
    31 	iUid = aUid;
       
    32 	}
       
    33 
       
    34 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 	{
       
    39 	return *iDescription;
       
    40 	}
       
    41 
       
    42 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 	{
       
    49 	iDescription->Des().Copy(aDescription);
       
    50 	}
       
    51 
       
    52 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 	{
       
    57 	return iLoggingEnabled;
       
    58 	}
       
    59 
       
    60 inline void CLogEventType::SetLoggingEnabled(TBool aEnable)
       
    61 /** Enables or disables logging for this event type.
       
    62 
       
    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.
       
    65 
       
    66 @param aEnable ETrue, to enable logging for this event type.EFalse, to disable 
       
    67 logging for this event type.
       
    68 @see CLogClient::AddEvent() */
       
    69 	{
       
    70 	iLoggingEnabled = aEnable;
       
    71 	}
       
    72 
       
    73 //**********************************
       
    74 // CLogFilter
       
    75 //**********************************
       
    76 
       
    77 inline TUid CLogFilter::EventType() const
       
    78 /** Gets the event type used by the filter.
       
    79 
       
    80 @return The event type UID.
       
    81 @see CLogEvent::EventType() */
       
    82 	{
       
    83 	return iEventType;
       
    84 	}
       
    85 
       
    86 inline void CLogFilter::SetEventType(TUid aType)
       
    87 /** Sets the event type to be used by the filter.
       
    88 
       
    89 @param aType The event type UID.
       
    90 @see CLogEvent::SetEventType() */
       
    91 	{
       
    92 	iEventType = aType;
       
    93 	}
       
    94 
       
    95 inline const TDesC& CLogFilter::RemoteParty() const
       
    96 /** Gets the remote party string used by the filter.
       
    97 
       
    98 @return A non-modifiable descriptor containing the remote party string.
       
    99 @see CLogEvent::RemoteParty() */
       
   100 	{
       
   101 	return *iRemoteParty;
       
   102 	}
       
   103 
       
   104 inline void CLogFilter::SetRemoteParty(const TDesC& aRemote)
       
   105 /** Sets the remote party string to be used by the filter.
       
   106 
       
   107 @param aRemote The remote party string.
       
   108 @see CLogEvent::SetRemoteParty() */
       
   109 	{
       
   110 	iRemoteParty->Des().Copy(aRemote);
       
   111 	}
       
   112 
       
   113 inline const TDesC& CLogFilter::Direction() const
       
   114 /** Gets the direction string used by the filter.
       
   115 
       
   116 @return A non-modifiable descriptor containing the direction string.
       
   117 @see CLogEvent::Direction() */
       
   118 	{
       
   119 	return *iDirection;
       
   120 	}
       
   121 
       
   122 inline void CLogFilter::SetDirection(const TDesC& aDirection)
       
   123 /** Sets the direction string to be used by the filter.
       
   124 
       
   125 @param aDirection The direction string.
       
   126 @see CLogEvent::SetDirection() */
       
   127 	{
       
   128 	iDirection->Des().Copy(aDirection);
       
   129 	}
       
   130 
       
   131 inline TLogDurationType CLogFilter::DurationType() const
       
   132 /** Gets the duration type used by the filter.
       
   133 
       
   134 @return The duration type.
       
   135 @see CLogEvent::DurationType() */
       
   136 	{
       
   137 	return iDurationType;
       
   138 	}
       
   139 
       
   140 inline void CLogFilter::SetDurationType(TLogDurationType aType)
       
   141 /** Sets the duration type to be used by the filter.
       
   142 
       
   143 @param aType The duration type.
       
   144 @see CLogEvent::SetDurationType() */
       
   145 	{
       
   146 	iDurationType = aType;
       
   147 	}
       
   148 
       
   149 inline const TDesC& CLogFilter::Status() const
       
   150 /** Gets the delivery status used by the filter.
       
   151 
       
   152 @return A non-modifiable descriptor containing the delivery status.
       
   153 @see CLogEvent::Status() */
       
   154 	{
       
   155 	return *iStatus;
       
   156 	}
       
   157 
       
   158 inline void CLogFilter::SetStatus(const TDesC& aStatus)
       
   159 /** Sets the delivery status to be used by the filter.
       
   160 
       
   161 @param aStatus The delivery status.
       
   162 @see CLogEvent::SetStatus() */
       
   163 	{
       
   164 	iStatus->Des().Copy(aStatus);
       
   165 	}
       
   166 
       
   167 inline TLogContactItemId  CLogFilter::Contact() const
       
   168 /** Gets the contact ID used by the filter.
       
   169 
       
   170 @return The contact ID.
       
   171 @see CLogEvent::Contact() */
       
   172 	{
       
   173 	return iContact;
       
   174 	}
       
   175 
       
   176 inline void CLogFilter::SetContact(TLogContactItemId  aContact)
       
   177 /** Sets the contact ID to be used by the filter.
       
   178 
       
   179 @param aContact The contact ID.
       
   180 @see CLogEvent::SetContact() */
       
   181 	{
       
   182 	iContact = aContact;
       
   183 	}
       
   184 
       
   185 inline const TDesC& CLogFilter::Number() const
       
   186 /** Gets the phone number used by the filter.
       
   187 
       
   188 @return A non-modifiable descriptor containing the phone number.
       
   189 @see CLogEvent::Number() */
       
   190 	{
       
   191 	return *iNumber;
       
   192 	}
       
   193 
       
   194 inline void CLogFilter::SetNumber(const TDesC& aNumber)
       
   195 /** Sets the phone number to be used by the filter.
       
   196 
       
   197 @param aNumber The phone number.
       
   198 @see CLogEvent::SetNumber() */
       
   199 	{
       
   200 	iNumber->Des().Copy(aNumber);
       
   201 	}
       
   202 
       
   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 
       
   206 no value.
       
   207 
       
   208 @return Bit values defining the null fields.
       
   209 @see SetNullFields() */
       
   210 	{
       
   211 	return iNullFields;
       
   212 	}
       
   213 
       
   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.
       
   217 
       
   218 Each field is identified by a bit value. The bit values may be ORd together 
       
   219 in any combination.
       
   220  
       
   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.
       
   223 
       
   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. */
       
   228 	{
       
   229 	iNullFields = aFields;
       
   230 	}
       
   231 
       
   232 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 	{
       
   238 	return iStartTime;
       
   239 	}
       
   240 
       
   241 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 	{
       
   247 	iStartTime = aStartTime; 
       
   248 	}
       
   249 	
       
   250 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 	{
       
   256 	return iEndTime;
       
   257 	}
       
   258 
       
   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 	{
       
   265 	iEndTime = aEndTime;
       
   266 	}
       
   267 
       
   268 inline TLogFlags CLogFilter::Flags() const
       
   269 /** Gets the flags used by the filter.
       
   270 
       
   271 @return The flags. */
       
   272 	{
       
   273 	return iFlags;
       
   274 	}
       
   275 
       
   276 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 	{
       
   281 	__ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant());
       
   282 	iFlags = (TLogFlags)(iFlags | aFlags);
       
   283 	}
       
   284 
       
   285 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 	{
       
   292 	__ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant());
       
   293 	iFlags = (TLogFlags)(iFlags & ~aFlags);
       
   294 	}