CLogEvent Class Reference

class CLogEvent : public CBase

Encapsulates the details of an event.

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

Inherits from

Public Member Functions
~CLogEvent ()
void ClearFlags ( TLogFlags )
TLogContactItemId Contact ()
IMPORT_C void CopyL (const CLogEvent &)
const TDesC8 & Data ()
const TDesC & Description ()
const TDesC & Direction ()
TLogDuration Duration ()
TLogDurationType DurationType ()
TUid EventType ()
IMPORT_C void ExternalizeL ( RWriteStream &)
TLogFlags Flags ()
TLogId Id ()
IMPORT_C void InternalizeL ( RReadStream &)
TLogLink Link ()
IMPORT_C CLogEvent * NewL ()
const TDesC & Number ()
const TDesC & RemoteParty ()
void SetContact ( TLogContactItemId )
IMPORT_C void SetDataL ( RReadStream &, TInt )
IMPORT_C void SetDataL (const TDesC8 &)
void SetDescription (const TDesC &)
void SetDirection (const TDesC &)
void SetDuration ( TLogDuration )
void SetDurationType ( TLogDurationType )
void SetEventType ( TUid )
void SetFlags ( TLogFlags )
void SetId ( TLogId )
void SetLink ( TLogLink )
void SetNumber (const TDesC &)
void SetRemoteParty (const TDesC &)
IMPORT_C void SetSimId ( TSimId )
void SetStatus (const TDesC &)
void SetSubject (const TDesC &)
void SetTime (const TTime &)
IMPORT_C TSimId SimId ()
const TDesC & Status ()
const TDesC & Subject ()
const TTime & Time ()
Private Member Functions
CLogEvent ()
void ConstructL ()
void InternalizeBufL ( RReadStream &, HBufC *&)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
TLogContactItemId iContact
HBufC8 * iData
HBufC * iDescription
HBufC * iDirection
TLogDuration iDuration
TLogDurationType iDurationType
TUid iEventType
TLogFlags iFlags
TLogId iId
TLogLink iLink
HBufC * iNumber
HBufC * iRemoteParty
HBufC * iStatus
HBufC * iSubject
TTime iTime

Constructor & Destructor Documentation

CLogEvent()

CLogEvent ( ) [private]

~CLogEvent()

IMPORT_C ~CLogEvent ( )

Frees all resources owned by the log event detail object.

Member Functions Documentation

ClearFlags(TLogFlags)

void ClearFlags ( TLogFlags aFlags ) [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

TLogFlags aFlags The flags to be cleared.

ConstructL()

void ConstructL ( ) [private]

Contact()

TLogContactItemId Contact ( ) const [inline]

Gets the contact ID associated with the event.

CopyL(const CLogEvent &)

IMPORT_C void CopyL ( const CLogEvent & aEvent )

Makes a copy of the specified log event.

Parameters

const CLogEvent & aEvent The log event to be copied.

Data()

const TDesC8 & Data ( ) const [inline]

Gets event specific 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.

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.

Duration()

TLogDuration Duration ( ) const [inline]

Gets the duration 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.

EventType()

TUid EventType ( ) const [inline]

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

CLogEvent::Description()

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aStream ) const

Parameters

RWriteStream & aStream

Flags()

TLogFlags Flags ( ) const [inline]

Gets the flags set for this event.

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.

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

InternalizeBufL(RReadStream &, HBufC *&)

void InternalizeBufL ( RReadStream & aStream,
HBufC *& aDes
) [private]

Parameters

RReadStream & aStream
HBufC *& aDes

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )

Parameters

RReadStream & aStream

Link()

TLogLink Link ( ) const [inline]

Gets the link value.

NewL()

IMPORT_C CLogEvent * NewL ( ) [static]

Creates a new log event detail object.

Number()

const TDesC & Number ( ) const [inline]

Gets the phone number associated with the event.

RemoteParty()

const TDesC & RemoteParty ( ) const [inline]

Gets the remote party associated with this event.

SetContact(TLogContactItemId)

void SetContact ( TLogContactItemId aContact ) [inline]

Sets the contact ID associated with the event.

Parameters

TLogContactItemId aContact The contact ID.

SetDataL(RReadStream &, TInt)

IMPORT_C void SetDataL ( RReadStream & aStream,
TInt aLen
)

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 )

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.

SetDescription(const TDesC &)

void SetDescription ( const TDesC & aDescription ) [inline]

Parameters

const TDesC & aDescription

SetDirection(const TDesC &)

void SetDirection ( 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.

CLogClient::GetString()

Parameters

const TDesC & aDirection The readable name.

SetDuration(TLogDuration)

void SetDuration ( TLogDuration aDuration ) [inline]

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.

SetDurationType(TLogDurationType)

void SetDurationType ( TLogDurationType aDurationType ) [inline]

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

Parameters

TLogDurationType aDurationType The duration type.

SetEventType(TUid)

void SetEventType ( TUid aId ) [inline]

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

CLogEvent::Description()

Parameters

TUid aId The event type UID.

SetFlags(TLogFlags)

void SetFlags ( TLogFlags aFlags ) [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

TLogFlags aFlags The flags to be set.

SetId(TLogId)

void SetId ( TLogId aId ) [inline]

Sets the unique event ID.

Parameters

TLogId aId The unique event ID.

SetLink(TLogLink)

void SetLink ( TLogLink aLink ) [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

TLogLink aLink The link value.

SetNumber(const TDesC &)

void SetNumber ( 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

const TDesC & aNumber The number.

SetRemoteParty(const TDesC &)

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

Parameters

const TDesC & aRemote The remote party.

SetSimId(TSimId)

IMPORT_C void SetSimId ( TSimId aSimId )

Not supported.

Parameters

TSimId aSimId

SetStatus(const TDesC &)

void SetStatus ( 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.

CLogClient::GetString()

Parameters

const TDesC & aStatus The delivery status.

SetSubject(const TDesC &)

void SetSubject ( 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

const TDesC & aSubject The subject.

SetTime(const TTime &)

void SetTime ( 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

const TTime & aTime The UTC time of the event.

SimId()

IMPORT_C TSimId SimId ( ) const

Not supported.

Status()

const TDesC & Status ( ) const [inline]

Gets the delivery status of this event.

Subject()

const TDesC & Subject ( ) const [inline]

Gets the subject of this event.

Time()

const TTime & Time ( ) const [inline]

Gets the UTC time that this event was created.

Member Data Documentation

TLogContactItemId iContact

TLogContactItemId iContact [private]

HBufC8 * iData

HBufC8 * iData [private]

HBufC * iDescription

HBufC * iDescription [private]

HBufC * iDirection

HBufC * iDirection [private]

TLogDuration iDuration

TLogDuration iDuration [private]

TLogDurationType iDurationType

TLogDurationType iDurationType [private]

TUid iEventType

TUid iEventType [private]

TLogFlags iFlags

TLogFlags iFlags [private]

TLogId iId

TLogId iId [private]

TLogLink iLink

TLogLink iLink [private]

HBufC * iNumber

HBufC * iNumber [private]

HBufC * iRemoteParty

HBufC * iRemoteParty [private]

HBufC * iStatus

HBufC * iStatus [private]

HBufC * iSubject

HBufC * iSubject [private]

TTime iTime

TTime iTime [private]