os/persistentdata/loggingservices/eventlogger/LogCli/inc/LOGCLI.INL
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// CLogEventType
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
/** Gets the UID identifying the event type.
sl@0
    19
sl@0
    20
@return The UID. */
sl@0
    21
inline TUid CLogEventType::Uid() const
sl@0
    22
	{
sl@0
    23
	return iUid;
sl@0
    24
	}
sl@0
    25
sl@0
    26
/** Sets the UID identifying the event type.
sl@0
    27
sl@0
    28
@param aUid The Uid. */
sl@0
    29
inline void CLogEventType::SetUid(TUid aUid)
sl@0
    30
	{
sl@0
    31
	iUid = aUid;
sl@0
    32
	}
sl@0
    33
sl@0
    34
/** Gets the human readable and localised name of the event type.
sl@0
    35
sl@0
    36
@return A non-modifiable descriptor containing the name. */
sl@0
    37
inline const TDesC& CLogEventType::Description() const
sl@0
    38
	{
sl@0
    39
	return *iDescription;
sl@0
    40
	}
sl@0
    41
sl@0
    42
/** Sets the human readable and localised name of the event type.
sl@0
    43
sl@0
    44
For example, Email.
sl@0
    45
sl@0
    46
@param aDescription The name. */
sl@0
    47
inline void CLogEventType::SetDescription(const TDesC& aDescription)
sl@0
    48
	{
sl@0
    49
	iDescription->Des().Copy(aDescription);
sl@0
    50
	}
sl@0
    51
sl@0
    52
/** Determines whether logging for this event type is enabled.
sl@0
    53
sl@0
    54
@return ETrue, if logging is enabled. EFalse, if logging is disabled. */
sl@0
    55
inline TBool CLogEventType::LoggingEnabled() const
sl@0
    56
	{
sl@0
    57
	return iLoggingEnabled;
sl@0
    58
	}
sl@0
    59
sl@0
    60
/** Enables or disables logging for this event type.
sl@0
    61
sl@0
    62
Note that disabling the logging of an event type causes a CLogClient::AddEventL() 
sl@0
    63
request for an event of that type to complete with an appropriate error.
sl@0
    64
sl@0
    65
@param aEnable ETrue, to enable logging for this event type.EFalse, to disable 
sl@0
    66
logging for this event type.
sl@0
    67
@see CLogClient::AddEvent() */
sl@0
    68
inline void CLogEventType::SetLoggingEnabled(TBool aEnable)
sl@0
    69
	{
sl@0
    70
	iLoggingEnabled = aEnable;
sl@0
    71
	}
sl@0
    72
sl@0
    73
//**********************************
sl@0
    74
// CLogFilter
sl@0
    75
//**********************************
sl@0
    76
sl@0
    77
/** Gets the event type used by the filter.
sl@0
    78
sl@0
    79
@return The event type UID.
sl@0
    80
@see CLogEvent::EventType() */
sl@0
    81
inline TUid CLogFilter::EventType() const
sl@0
    82
	{
sl@0
    83
	return iEventType;
sl@0
    84
	}
sl@0
    85
sl@0
    86
/** Sets the event type to be used by the filter.
sl@0
    87
sl@0
    88
@param aType The event type UID.
sl@0
    89
@see CLogEvent::SetEventType() */
sl@0
    90
inline void CLogFilter::SetEventType(TUid aType)
sl@0
    91
	{
sl@0
    92
	iEventType = aType;
sl@0
    93
	}
sl@0
    94
sl@0
    95
/** Gets the remote party string used by the filter.
sl@0
    96
sl@0
    97
@return A non-modifiable descriptor containing the remote party string.
sl@0
    98
@see CLogEvent::RemoteParty() */
sl@0
    99
inline const TDesC& CLogFilter::RemoteParty() const
sl@0
   100
	{
sl@0
   101
	return *iRemoteParty;
sl@0
   102
	}
sl@0
   103
sl@0
   104
/** Sets the remote party string to be used by the filter.
sl@0
   105
sl@0
   106
@param aRemote The remote party string.
sl@0
   107
@see CLogEvent::SetRemoteParty() */
sl@0
   108
inline void CLogFilter::SetRemoteParty(const TDesC& aRemote)
sl@0
   109
	{
sl@0
   110
	iRemoteParty->Des().Copy(aRemote);
sl@0
   111
	}
sl@0
   112
sl@0
   113
/** Gets the direction string used by the filter.
sl@0
   114
sl@0
   115
@return A non-modifiable descriptor containing the direction string.
sl@0
   116
@see CLogEvent::Direction() */
sl@0
   117
inline const TDesC& CLogFilter::Direction() const
sl@0
   118
	{
sl@0
   119
	return *iDirection;
sl@0
   120
	}
sl@0
   121
sl@0
   122
/** Sets the direction string to be used by the filter.
sl@0
   123
sl@0
   124
@param aDirection The direction string.
sl@0
   125
@see CLogEvent::SetDirection() */
sl@0
   126
inline void CLogFilter::SetDirection(const TDesC& aDirection)
sl@0
   127
	{
sl@0
   128
	iDirection->Des().Copy(aDirection);
sl@0
   129
	}
sl@0
   130
sl@0
   131
/** Gets the duration type used by the filter.
sl@0
   132
sl@0
   133
@return The duration type.
sl@0
   134
@see CLogEvent::DurationType() */
sl@0
   135
inline TLogDurationType CLogFilter::DurationType() const
sl@0
   136
	{
sl@0
   137
	return iDurationType;
sl@0
   138
	}
sl@0
   139
sl@0
   140
/** Sets the duration type to be used by the filter.
sl@0
   141
sl@0
   142
@param aType The duration type.
sl@0
   143
@see CLogEvent::SetDurationType() */
sl@0
   144
inline void CLogFilter::SetDurationType(TLogDurationType aType)
sl@0
   145
	{
sl@0
   146
	iDurationType = aType;
sl@0
   147
	}
sl@0
   148
sl@0
   149
/** Gets the delivery status used by the filter.
sl@0
   150
sl@0
   151
@return A non-modifiable descriptor containing the delivery status.
sl@0
   152
@see CLogEvent::Status() */
sl@0
   153
inline const TDesC& CLogFilter::Status() const
sl@0
   154
	{
sl@0
   155
	return *iStatus;
sl@0
   156
	}
sl@0
   157
sl@0
   158
/** Sets the delivery status to be used by the filter.
sl@0
   159
sl@0
   160
@param aStatus The delivery status.
sl@0
   161
@see CLogEvent::SetStatus() */
sl@0
   162
inline void CLogFilter::SetStatus(const TDesC& aStatus)
sl@0
   163
	{
sl@0
   164
	iStatus->Des().Copy(aStatus);
sl@0
   165
	}
sl@0
   166
sl@0
   167
/** Gets the contact ID used by the filter.
sl@0
   168
sl@0
   169
@return The contact ID.
sl@0
   170
@see CLogEvent::Contact() */
sl@0
   171
inline TLogContactItemId  CLogFilter::Contact() const
sl@0
   172
	{
sl@0
   173
	return iContact;
sl@0
   174
	}
sl@0
   175
sl@0
   176
/** Sets the contact ID to be used by the filter.
sl@0
   177
sl@0
   178
@param aContact The contact ID.
sl@0
   179
@see CLogEvent::SetContact() */
sl@0
   180
inline void CLogFilter::SetContact(TLogContactItemId  aContact)
sl@0
   181
	{
sl@0
   182
	iContact = aContact;
sl@0
   183
	}
sl@0
   184
sl@0
   185
/** Gets the phone number used by the filter.
sl@0
   186
sl@0
   187
@return A non-modifiable descriptor containing the phone number.
sl@0
   188
@see CLogEvent::Number() */
sl@0
   189
inline const TDesC& CLogFilter::Number() const
sl@0
   190
	{
sl@0
   191
	return *iNumber;
sl@0
   192
	}
sl@0
   193
sl@0
   194
/** Sets the phone number to be used by the filter.
sl@0
   195
sl@0
   196
@param aNumber The phone number.
sl@0
   197
@see CLogEvent::SetNumber() */
sl@0
   198
inline void CLogFilter::SetNumber(const TDesC& aNumber)
sl@0
   199
	{
sl@0
   200
	iNumber->Des().Copy(aNumber);
sl@0
   201
	}
sl@0
   202
sl@0
   203
/** Identifies the fields defined as NULL in the filter. These are the fields that 
sl@0
   204
the filter expects to be NULL in the database. A NULL field is one that has 
sl@0
   205
no value.
sl@0
   206
sl@0
   207
@return Bit values defining the null fields.
sl@0
   208
@see SetNullFields() */
sl@0
   209
inline TUint32 CLogFilter::NullFields() const
sl@0
   210
	{
sl@0
   211
	return iNullFields;
sl@0
   212
	}
sl@0
   213
sl@0
   214
/** Defines NULL fields to the filter. These are the fields that the filter expects 
sl@0
   215
to be NULL in the database. A NULL field is one that has no value.
sl@0
   216
sl@0
   217
Each field is identified by a bit value. The bit values may be ORd together 
sl@0
   218
in any combination.
sl@0
   219
 
sl@0
   220
Note that setting a flag and explicitly setting a value for the corresponding 
sl@0
   221
field generates an OR condition in the SQL WHERE clause.
sl@0
   222
sl@0
   223
@param aFields Bit values defining the null fields. These are one or more 
sl@0
   224
of the following values defined in logwrap.hrh: ELogContactField, ELogDirectionField, 
sl@0
   225
ELogDurationTypeField, ELogEventTypeField, ELogNumberField, ELogRemotePartyField, 
sl@0
   226
ELogStatusField, ELogFlagsField, ELogSubjectField, ELogLinkField, ELogDataField, ELogSimIdField. */
sl@0
   227
inline void CLogFilter::SetNullFields(TUint32 aFields)
sl@0
   228
	{
sl@0
   229
	iNullFields = aFields;
sl@0
   230
	}
sl@0
   231
sl@0
   232
/** Gets the UTC start time used by the filter.
sl@0
   233
sl@0
   234
@return The UTC start time. */
sl@0
   235
inline const TTime& CLogFilter::StartTime() const
sl@0
   236
	{
sl@0
   237
	return iStartTime;
sl@0
   238
	}
sl@0
   239
sl@0
   240
/** Sets the specified UTC start time to be used by the filter.
sl@0
   241
sl@0
   242
@param aStartTime The UTC start time to be set. */
sl@0
   243
inline void CLogFilter::SetStartTime(const TTime& aStartTime)
sl@0
   244
	{
sl@0
   245
	iStartTime = aStartTime; 
sl@0
   246
	}
sl@0
   247
	
sl@0
   248
/** Gets the UTC end time used by the filter.
sl@0
   249
sl@0
   250
@return The UTC end time. */
sl@0
   251
inline const TTime& CLogFilter::EndTime() const
sl@0
   252
	{
sl@0
   253
	return iEndTime;
sl@0
   254
	}
sl@0
   255
sl@0
   256
/** Sets the specified UTC end time to be used by the filter.
sl@0
   257
sl@0
   258
@param aEndTime The UTC end time to be set. */
sl@0
   259
inline void CLogFilter::SetEndTime(const TTime& aEndTime)
sl@0
   260
	{
sl@0
   261
	iEndTime = aEndTime;
sl@0
   262
	}
sl@0
   263
sl@0
   264
/** Gets the flags used by the filter.
sl@0
   265
sl@0
   266
@return The flags. */
sl@0
   267
inline TLogFlags CLogFilter::Flags() const
sl@0
   268
	{
sl@0
   269
	return iFlags;
sl@0
   270
	}
sl@0
   271
sl@0
   272
/** Sets the specified flags to be used by the filter.
sl@0
   273
sl@0
   274
@param aFlags The flags to be set. */
sl@0
   275
inline void CLogFilter::SetFlags(TLogFlags aFlags)
sl@0
   276
	{
sl@0
   277
	__ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant());
sl@0
   278
	iFlags = (TLogFlags)(iFlags | aFlags);
sl@0
   279
	}
sl@0
   280
sl@0
   281
/** Clears the specified flags to be used by the filter. 
sl@0
   282
sl@0
   283
The constant KLogFlagsMask can be used to clear all the flags.
sl@0
   284
sl@0
   285
@param aFlags The flags to be cleared */
sl@0
   286
inline void CLogFilter::ClearFlags(TLogFlags aFlags)
sl@0
   287
	{
sl@0
   288
	__ASSERT_DEBUG(aFlags <= KLogFlagsMask, User::Invariant());
sl@0
   289
	iFlags = (TLogFlags)(iFlags & ~aFlags);
sl@0
   290
	}