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