CLogEvent Class Reference

#include <logwrap.h>

Link against: logstub.lib

class CLogEvent : public CBase

Inherits from

Detailed Description

Encapsulates the details of an event.

Events can be added, updated, deleted or retrieved by using the CLogClient methods.

The added events are stored in the EventLogger database (the log). See TLogConfig class for more details regarding the log size, the "most recent events" log size and the event age.

The events in the log can be viewed using an appropriate view class - CLogViewEvent, CLogViewRecent or CLogViewDuplicate.

If the contact matching is enabled and the contact id of the added or changed event is not set, then the EventLogger server will attempt to retrieve the contact id from the MLogCntModel interface. If a matching contact is found then the event contact property will be initialized with the found contact id. See CLogContact class for more details regarding the contact matching.

If the remote party property of the added or changed event is not set, and a matching contact was found as a result of the performed contact matching, then the EventLogger server will attempt to retrieve the contact name from the MLogCntModel interface and initialize the event remote party with the contact name.

Note that where time is used, it must be specified as UTC rather than local time.

See also: CLogClient TLogConfig CLogViewEvent CLogViewRecent CLogViewDuplicate CLogContact

Constructor & Destructor Documentation

~CLogEvent ( )

IMPORT_C~CLogEvent()

Frees all resources owned by the log event detail object.

Member Function Documentation

ClearFlags ( TLogFlags )

voidClearFlags(TLogFlagsaFlags)[inline]

Clears the specified flags for this event.

The function does not change any of the other flag bit settings.

The constant KLogFlagsMask may be used to clear all the flags in an event.

Parameters
aFlagsThe flags to be cleared.

Contact ( )

TLogContactItemId Contact()const [inline]

Gets the contact ID associated with the event.

Note that if the contact was not set at the time when the event was added or changed, the EventLogger server would perform then a contact matching (if the contact matching was enabled). If the contact matching was successful then, the EventLogger server would update the contact of the added or changed event.

See also: CLogEvent

Return Value
The contact ID.

CopyL ( const CLogEvent & )

IMPORT_C voidCopyL(const CLogEvent &aEvent)

Makes a copy of the specified log event.

Parameters
aEventThe log event to be copied.

Data ( )

const TDesC8 &Data()const [inline]

Gets event specific data.

Return Value
A reference to a non-modifiable descriptor containing the data that is specific to the event.KNullDesC8, if there is no data.

Description ( )

const TDesC &Description()const [inline]

Gets the human readable name describing the event type.

Note that this is set automatically by the Log Engine.

Return Value
A reference to a non-modifiable descriptor containing the readable name.

Direction ( )

const TDesC &Direction()const [inline]

Gets the direction of the call represented by this event. The direction of a call means incoming, outgoing etc.

The direction is represented by a string.

Return Value
A reference to a non-modifiable descriptor containing the string representing the direction of the call.

Duration ( )

TLogDuration Duration()const [inline]

Gets the duration of the event.

Return Value
The duration of the event, expressed as the number of seconds since the time of the event.

DurationType ( )

TLogDurationType DurationType()const [inline]

Gets the duration type.

This applies meaning to the idea of a duration.

The duration type is implemented as a UI variant-specific enumeration. The following duration types are generic: KLogDurationNone, KLogDurationValid and KLogDurationData.

See also: KLogDurationNone KLogDurationValid KLogDurationData

Return Value
The duration type.

EventType ( )

TUid EventType()const [inline]

Gets the type of this log event. Event types are identified by a UID.

See also: CLogEvent::Description()

Return Value
The event type UID.

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Flags ( )

TLogFlags Flags()const [inline]

Gets the flags set for this event.

Return Value
The flags.

Id ( )

TLogId Id()const [inline]

Gets the unique event ID associated with this log event.

Unique event IDs are allocated by the Log Engine when an event is added to the log.

See also: CLogClient::GetEvent() CLogClient::AddEvent() CLogClient::ChangeEvent() CLogClient::DeleteEvent()

Return Value
The unique event ID.

InternalizeL ( RReadStream & )

IMPORT_C voidInternalizeL(RReadStream &aStream)

Link ( )

TLogLink Link()const [inline]

Gets the link value.

Return Value
The link value.

NewL ( )

IMPORT_C CLogEvent *NewL()[static]

Creates a new log event detail object.

Return Value
Pointer to the new log event detail object.

Number ( )

const TDesC &Number()const [inline]

Gets the phone number associated with the event.

Return Value
A reference to a non-modifiable descriptor containing the phone number.

RemoteParty ( )

const TDesC &RemoteParty()const [inline]

Gets the remote party associated with this event.

Note that if the remote party was not set at the time when the event was added or changed, the EventLogger server would perform then a contact matching (if the contact matching was enabled). If the contact matching was successful, the EventLogger server would update the remote party of the added or changed event.

See also: CLogEvent

Return Value
A reference to a non-modifiable descriptor containing the remote party.

SetContact ( TLogContactItemId )

voidSetContact(TLogContactItemIdaContact)[inline]

Sets the contact ID associated with the event.

Parameters
aContactThe contact ID.

SetDataL ( RReadStream &, TInt )

IMPORT_C voidSetDataL(RReadStream &aStream,
TIntaLen
)

Sets event specific data from the specified stream.

The data can be used for any purpose. The data is copied into a heap descriptor allocated by this function; the amount of data is only limited by the available memory.

Parameters
aStreamThe stream containing the event specific data.
aLenThe length of data to be read from the stream.

SetDataL ( const TDesC8 & )

IMPORT_C voidSetDataL(const TDesC8 &aData)

Sets event specific data.

The data can be used for any purpose. The data is copied into a heap descriptor allocated by this function; the amount of data is only limited by the available memory.

Parameters
aDataThe event specific data.

SetDescription ( const TDesC & )

voidSetDescription(const TDesC &aDescription)[inline]

SetDirection ( const TDesC & )

voidSetDirection(const TDesC &aDirection)[inline]

Sets the direction of the call represented by this event. The direction of a call means incoming, outgoing etc.

The direction is represented by a string. Standard strings are available in the log wrapper resource file and can be accessed through the resource IDs: R_LOG_DIR_IN, R_LOG_DIR_OUT, R_LOG_DIR_IN_ALT, R_LOG_DIR_OUT_ALT, R_LOG_DIR_FETCHED and R_LOG_DIR_MISSED.

The string is copied into a pre-allocated heap descriptor that has a maximum length of KLogMaxDirectionLength. If the length of the specified descriptor is greater than KLogMaxDirectionLength, then the data is truncated.

See also: CLogClient::GetString()

Parameters
aDirectionThe readable name.

SetDuration ( TLogDuration )

voidSetDuration(TLogDurationaDuration)[inline]

Sets the duration of the event.

Parameters
aDurationThe duration of the event, expressed as the number of seconds since the time of the event.

SetDurationType ( TLogDurationType )

voidSetDurationType(TLogDurationTypeaDurationType)[inline]

Sets the duration type. This applies meaning to the idea of a duration.

Parameters
aDurationTypeThe duration type.

SetEventType ( TUid )

voidSetEventType(TUidaId)[inline]

Sets the type of this log event. Event types are identified by a UID.

See also: CLogEvent::Description()

Parameters
aIdThe event type UID.

SetFlags ( TLogFlags )

voidSetFlags(TLogFlagsaFlags)[inline]

Sets the specified flags for this event.

The function does not change any of the other flag bit settings.

Only the low order 4 bits are stored in the Log Engine Database; the constant KLogFlagsMask can be used as a mask.

Parameters
aFlagsThe flags to be set.

SetId ( TLogId )

voidSetId(TLogIdaId)[inline]

Sets the unique event ID.

Parameters
aIdThe unique event ID.

SetLink ( TLogLink )

voidSetLink(TLogLinkaLink)[inline]

Sets the link value.

The link can be used to relate this event to an entity in another application. For example, it can be used to associate the event with the call ID or the message ID for emails and faxes.

Parameters
aLinkThe link value.

SetNumber ( const TDesC & )

voidSetNumber(const TDesC &aNumber)[inline]

Sets the phone number associated with this event. This is used when the number cannot be stored in any other field.

The number is specified as a string and is copied into a pre-allocated heap descriptor that has a maximum length of KLogMaxNumberLength. If the length of the specified descriptor is greater than KLogMaxNumberLength, then the number is truncated.

Parameters
aNumberThe number.

SetRemoteParty ( const TDesC & )

voidSetRemoteParty(const TDesC &aRemote)[inline]

Sets the remote party associated with this event. This describes the destination of an outgoing event or the source of an incoming event.

The remote party is represented by a string.

The string is copied into a pre-allocated heap descriptor that has a maximum length of KLogMaxRemotePartyLength. If the length of the specified descriptor is greater than KLogMaxRemotePartyLength, then the data is truncated.

See also: KLogMaxRemotePartyLength

Parameters
aRemoteThe remote party.

SetSimId ( TSimId )

IMPORT_C voidSetSimId(TSimIdaSimId)

Not supported.

SetStatus ( const TDesC & )

voidSetStatus(const TDesC &aStatus)[inline]

Sets the delivery status of this event.

The delivery status is represented by a string. Standard strings are available in the log wrapper resource file and can be accessed through the resource IDs: R_LOG_DEL_PENDING, R_LOG_DEL_SENT, R_LOG_DEL_FAILED, R_LOG_DEL_NONE, R_LOG_DEL_DONE and R_LOG_DEL_NOT_SENT.

The string is copied into a pre-allocated heap descriptor that has a maximum length of KLogMaxStatusLength. If the length of the specified descriptor is greater than KLogMaxStatusLength, then the data is truncated.

See also: CLogClient::GetString()

Parameters
aStatusThe delivery status.

SetSubject ( const TDesC & )

voidSetSubject(const TDesC &aSubject)[inline]

Sets the subject of this event.

The subject is represented by a string.

The string is copied into a pre-allocated heap descriptor that has a maximum length of KLogMaxSubjectLength. If the length of the specified descriptor is greater than KLogMaxSubjectLength, then the data is truncated.

Parameters
aSubjectThe subject.

SetTime ( const TTime & )

voidSetTime(const TTime &aTime)[inline]

Sets the UTC time that this event was created.

Note that this field is used when ordering events in a view; changing this value may change the position of the event in a view.

Parameters
aTimeThe UTC time of the event.

SimId ( )

IMPORT_C TSimIdSimId()const

Not supported.

Status ( )

const TDesC &Status()const [inline]

Gets the delivery status of this event.

Return Value
A reference to a non-modifiable descriptor containing the delivery status.

Subject ( )

const TDesC &Subject()const [inline]

Gets the subject of this event.

Return Value
A reference to a non-modifiable descriptor containing the subject.

Time ( )

const TTime &Time()const [inline]

Gets the UTC time that this event was created.

Return Value
The time of the event.