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