Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <LOGWRAP.H>
Link against: logwrap.lib

Class CLogEvent

class CLogEvent : public CBase;

Description

Encapsulates the details of an event.

Where time is used, it must be specified as UTC rather than local time.

Derivation

Members

Defined in CLogEvent:

Inherited from CBase:


Construction and destruction


NewL()

IMPORT_C static CLogEvent* NewL();

Description

Creates a new log event detail object.

Return value

CLogEvent *

Pointer to the new log event detail object.


~CLogEvent()

IMPORT_C ~CLogEvent();

Description

Frees all resources owned by the log event detail object.

[Top]


Member functions


Id()const

inline TLogId Id() const;

Description

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.

Return value

TLogId

The unique event ID.

See also:


SetId(TLogId)

inline void SetId(TLogId aId);

Description

Sets the unique event ID.

Parameters

TLogId aId

The unique event ID.


EventType()const

inline TUid EventType() const;

Description

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

Return value

TUid

The event type UID.

See also:


SetEventType(TUid)

inline void SetEventType(TUid aId);

Description

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

Parameters

TUid aId

The event type UID.

See also:


RemoteParty()const

inline const TDesC& RemoteParty() const;

Description

Gets the remote party associated with this event.

Return value

const TDesC16 &

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


SetRemoteParty(const TDesC &)

inline void SetRemoteParty(const TDesC &aRemote);

Description

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 KLogMaxRemoteLength. If the length of the specified descriptor is greater than KLogMaxRemoteLength, then the data is truncated.

Parameters

const TDesC16 &aRemote

The remote party.


Direction()const

inline const TDesC& Direction() const;

Description

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

const TDesC16 &

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


SetDirection(const TDesC &)

inline void SetDirection(const TDesC &aDirection);

Description

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.

Parameters

const TDesC16 &aDirection

The readable name.

See also:


Time()const

inline const TTime& Time() const;

Description

Gets the UTC time that this event was created.

Return value

const TTime &

The time of the event.


SetTime(const TTime &)

inline void SetTime(const TTime &aTime);

Description

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

const TTime &aTime

The UTC time of the event.


DurationType()const

inline TLogDurationType DurationType() const;

Description

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.

Return value

TLogDurationType

The duration type.


SetDurationType(TLogDurationType)

inline void SetDurationType(TLogDurationType aDurationType);

Description

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

Parameters

TLogDurationType aDurationType

The duration type.


Duration()const

inline TLogDuration Duration() const;

Description

Gets the duration of the event.

Return value

TLogDuration

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


SetDuration(TLogDuration)

inline void SetDuration(TLogDuration aDuration);

Description

Sets the duration of the event.

Parameters

TLogDuration aDuration

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


Status()const

inline const TDesC& Status() const;

Description

Gets the delivery status of this event.

Return value

const TDesC16 &

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


SetStatus(const TDesC &)

inline void SetStatus(const TDesC &aStatus);

Description

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.

Parameters

const TDesC16 &aStatus

The delivery status.

See also:


Subject()const

inline const TDesC& Subject() const;

Description

Gets the subject of this event.

Return value

const TDesC16 &

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


SetSubject(const TDesC &)

inline void SetSubject(const TDesC &aSubject);

Description

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

const TDesC16 &aSubject

The subject.


Number()const

inline const TDesC& Number() const;

Description

Gets the phone number associated with the event.

Return value

const TDesC16 &

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


SetNumber(const TDesC &)

inline void SetNumber(const TDesC &aNumber);

Description

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

const TDesC16 &aNumber

The number.


Contact()const

inline TLogContactItemId Contact() const;

Description

Gets the contact ID associated with the event.

Return value

TLogContactItemId

The contact ID.


SetContact(TLogContactItemId)

inline void SetContact(TLogContactItemId aContact);

Description

Sets the contact ID associated with the event.

Parameters

TLogContactItemId aContact

The contact ID.


Link()const

inline TLogLink Link() const;

Description

Gets the link value.

Return value

TLogLink

The link value.


SetLink(TLogLink)

inline void SetLink(TLogLink aLink);

Description

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

TLogLink aLink

The link value.


Description()const

inline const TDesC& Description() const;

Description

Gets the human readable name describing the event type.

Note that this is set automatically by the Log Engine.

Return value

const TDesC16 &

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


SetDescription(const TDesC &)

inline void SetDescription(const TDesC &aDescription);

Description

Parameters

const TDesC16 &aDescription


Flags()const

inline TLogFlags Flags() const;

Description

Gets the flags set for this event.

Return value

TLogFlags

The flags.


SetFlags(TLogFlags)

inline void SetFlags(TLogFlags aFlags);

Description

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

TLogFlags aFlags

The flags to be set.


ClearFlags(TLogFlags)

inline void ClearFlags(TLogFlags aFlags);

Description

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

TLogFlags aFlags

The flags to be cleared.


Data()const

inline const TDesC8& Data() const;

Description

Gets event specific data.

Return value

const TDesC8 &

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


SetDataL(RReadStream &,TInt)

IMPORT_C void SetDataL(RReadStream &aStream, TInt aLen);

Description

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

RReadStream &aStream

The stream containing the event specific data.

TInt aLen

The length of data to be read from the stream.


SetDataL(const TDesC8 &)

IMPORT_C void SetDataL(const TDesC8 &aData);

Description

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

const TDesC8 &aData

The event specific data.


CopyL(const CLogEvent &)

IMPORT_C void CopyL(const CLogEvent &aEvent);

Description

Makes a copy of the specified log event.

Parameters

const CLogEvent &aEvent

The log event to be copied.


InternalizeL(RReadStream &)

IMPORT_C void InternalizeL(RReadStream &aStream);

Description

Parameters

RReadStream &aStream


ExternalizeL(RWriteStream &)const

IMPORT_C void ExternalizeL(RWriteStream &aStream) const;

Description

Parameters

RWriteStream &aStream