CSmsEventLogger Class Reference

class CSmsEventLogger : public CSmsuActiveBase

Logs SMS-related events.

The class uses the log engine functionality provided by the Log Engine ( CLogWrapper etc.).

Inherits from

Public Member Functions
~CSmsEventLogger ()
IMPORT_C void AddEvent ( TRequestStatus &, const CSmsMessage &, const TLogSmsPduData &, TInt *)
IMPORT_C void ChangeEvent ( TRequestStatus &, const CSmsMessage &, const TLogSmsPduData &, TInt *)
IMPORT_C void ChangeEvent ( TRequestStatus &, const CSmsMessage &, const TTime *, const TLogSmsPduData &, TInt *)
TBool ClientAvailable ()
IMPORT_C void DeleteEvent ( TRequestStatus &)
CLogEvent & Event ()
const CLogEvent & Event ()
IMPORT_C void GetEvent ( TRequestStatus &, TLogId )
TInt GetString ( TDes &, TInt )
IMPORT_C CSmsEventLogger * NewL ( RFs &, TInt )
const TLogSmsPduData & SmsPDUData ()
Protected Member Functions
void DoCancel ()
Private Member Functions
CSmsEventLogger ( TInt )
void ConstructL ( RFs &)
void DoAddEventL (const CSmsMessage &, TInt *)
void DoComplete ( TInt &)
void DoRunL ()
void GetStringL ( TDes &, TInt )
void SetDataL (const CSmsMessage &, TInt *, const TTime *)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
CSmsuActiveBase::CSmsuActiveBase(TInt)
CSmsuActiveBase::Complete(TInt)
CSmsuActiveBase::CompleteMyself(TInt,TBool)
CSmsuActiveBase::CompleteMyselfAfterTimeout(TInt)
CSmsuActiveBase::ConstructTimeoutL()
CSmsuActiveBase::Queue(TRequestStatus &)
CSmsuActiveBase::RunError(TInt)
CSmsuActiveBase::RunL()
CSmsuActiveBase::TimedOut()const
CSmsuActiveBase::TimedSetActive(const TTimeIntervalMicroSeconds32 &)
CSmsuActiveBase::TimedSetActiveCancel()
CSmsuActiveBase::~CSmsuActiveBase()
Private Member Enumerations
enum TSmsEventLoggerState { ESmsEventLoggerIdle , ESmsEventLoggerGettingEvent , ESmsEventLoggerAddingEvent , ESmsEventLoggerChangingEvent , ESmsEventLoggerDeletingEvent }
Inherited Enumerations
CActive:TPriority
Private Attributes
CLogEvent * iLogEvent
CLogWrapper * iLogWrapper
TLogSmsPduData iSmsPDUData
TSmsEventLoggerState iState
Inherited Attributes
CActive::iStatus
CSmsuActiveBase::iReport
CSmsuActiveBase::iSmsuTimeout

Constructor & Destructor Documentation

CSmsEventLogger(TInt)

CSmsEventLogger ( TInt aPriority ) [private]

Parameters

TInt aPriority

~CSmsEventLogger()

IMPORT_C ~CSmsEventLogger ( )
Destructor.
capability
None

Member Functions Documentation

AddEvent(TRequestStatus &, const CSmsMessage &, const TLogSmsPduData &, TInt *)

IMPORT_C void AddEvent ( TRequestStatus & aStatus,
const CSmsMessage & aSmsMessage,
const TLogSmsPduData & aData,
TInt * aStatusId = NULL
)

Adds an event to the log database.

capability
WriteUserData

Parameters

TRequestStatus & aStatus Asynchronous status word to signal when the operation is complete
const CSmsMessage & aSmsMessage The SMS message that the event concerns
const TLogSmsPduData & aData SMS PDU information for the event
TInt * aStatusId = NULL Optional string to include in the log message, specified by resource ID

ChangeEvent(TRequestStatus &, const CSmsMessage &, const TLogSmsPduData &, TInt *)

IMPORT_C void ChangeEvent ( TRequestStatus & aStatus,
const CSmsMessage & aSmsMessage,
const TLogSmsPduData & aData,
TInt * aStatusId = NULL
)

Changes the details of an existing event.

Use GetEvent() to specify the event.

capability
WriteUserData

Parameters

TRequestStatus & aStatus Asynchronous status word to signal when the operation is complete
const CSmsMessage & aSmsMessage The SMS message that the event concerns
const TLogSmsPduData & aData SMS PDU information for the event
TInt * aStatusId = NULL Optional string to include in the log message, specified by resource ID

ChangeEvent(TRequestStatus &, const CSmsMessage &, const TTime *, const TLogSmsPduData &, TInt *)

IMPORT_C void ChangeEvent ( TRequestStatus & aStatus,
const CSmsMessage & aSmsMessage,
const TTime * aTime,
const TLogSmsPduData & aData,
TInt * aStatusId = NULL
)

Changes the details of an existing event.

Use GetEvent() to specify the event.

capability
WriteUserData

Parameters

TRequestStatus & aStatus Asynchronous status word to signal when the operation is complete
const CSmsMessage & aSmsMessage The SMS message that the event concerns
const TTime * aTime SMS delivery time
const TLogSmsPduData & aData SMS PDU information for the event
TInt * aStatusId = NULL Optional string to include in the log message, specified by resource ID

ClientAvailable()

TBool ClientAvailable ( ) const [inline]

ConstructL(RFs &)

void ConstructL ( RFs & aFs ) [private]

Parameters

RFs & aFs

DeleteEvent(TRequestStatus &)

IMPORT_C void DeleteEvent ( TRequestStatus & aStatus )

Deletes an event.

Use GetEvent() to specify the event.

capability
WriteUserData

Parameters

TRequestStatus & aStatus Asynchronous status word to signal when the operation is complete

DoAddEventL(const CSmsMessage &, TInt *)

void DoAddEventL ( const CSmsMessage & aSmsMessage,
TInt * aStatusId
) [private]

Parameters

const CSmsMessage & aSmsMessage
TInt * aStatusId

DoCancel()

void DoCancel ( ) [protected, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel() .

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel() .

CActive::Cancel

DoComplete(TInt &)

void DoComplete ( TInt & ) [private, virtual]

Implements derived-class specified Complete() behaviour.

This is called from Complete() .

Parameters

TInt &

DoRunL()

void DoRunL ( ) [private, virtual]

Implements derived-class specified RunL() behaviour.

This is called from RunL() .

Event()

CLogEvent & Event ( ) [inline]

Gets the current log event.

Event()

const CLogEvent & Event ( ) const [inline]

Gets the current (const) log event.

GetEvent(TRequestStatus &, TLogId)

IMPORT_C void GetEvent ( TRequestStatus & aStatus,
TLogId aId
)

Gets the specified event from the log.

The event itself can be obtained using a subsequent call to Event() .

capability
ReadUserData

Parameters

TRequestStatus & aStatus Asynchronous status word to signal when the operation is complete
TLogId aId Log event ID for the event

GetString(TDes &, TInt)

TInt GetString ( TDes & aString,
TInt aId
) const [inline]

Gets a standard string from the specified resource.

Parameters

TDes & aString On return, string read from resource
TInt aId Resource ID

GetStringL(TDes &, TInt)

void GetStringL ( TDes & aString,
TInt aId
) const [private, inline]

Gets the current event's SMS PDU data.

Parameters

TDes & aString
TInt aId

NewL(RFs &, TInt)

IMPORT_C CSmsEventLogger * NewL ( RFs & aFs,
TInt aPriority = CActive::EPriorityStandard
) [static]

Allocates and creates a logger.

capability
None

Parameters

RFs & aFs File server handle
TInt aPriority = CActive::EPriorityStandard Active object priority

SetDataL(const CSmsMessage &, TInt *, const TTime *)

void SetDataL ( const CSmsMessage & aSmsMessage,
TInt * aStatusId,
const TTime * aDischargeTime
) [private]

Parameters

const CSmsMessage & aSmsMessage
TInt * aStatusId
const TTime * aDischargeTime

SmsPDUData()

const TLogSmsPduData & SmsPDUData ( ) const [inline]

Gets the current event's SMS PDU data.

Member Enumerations Documentation

Enum TSmsEventLoggerState

Enumerators

ESmsEventLoggerIdle
ESmsEventLoggerGettingEvent
ESmsEventLoggerAddingEvent
ESmsEventLoggerChangingEvent
ESmsEventLoggerDeletingEvent

Member Data Documentation

CLogEvent * iLogEvent

CLogEvent * iLogEvent [private]

CLogWrapper * iLogWrapper

CLogWrapper * iLogWrapper [private]

TLogSmsPduData iSmsPDUData

TLogSmsPduData iSmsPDUData [private]

TSmsEventLoggerState iState

TSmsEventLoggerState iState [private]