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 voidAddEvent(TRequestStatus &, const CSmsMessage &, const TLogSmsPduData &, TInt *)
IMPORT_C voidChangeEvent(TRequestStatus &, const CSmsMessage &, const TLogSmsPduData &, TInt *)
IMPORT_C voidChangeEvent(TRequestStatus &, const CSmsMessage &, const TTime *, const TLogSmsPduData &, TInt *)
TBool ClientAvailable()
IMPORT_C voidDeleteEvent(TRequestStatus &)
CLogEvent &Event()
const CLogEvent &Event()
IMPORT_C voidGetEvent(TRequestStatus &, TLogId)
TInt GetString(TDes &, TInt)
IMPORT_C CSmsEventLogger *NewL(RFs &, TInt)
const TLogSmsPduData &SmsPDUData()
Protected Member Functions
voidDoCancel()
Private Member Functions
CSmsEventLogger(TInt)
voidConstructL(RFs &)
voidDoAddEventL(const CSmsMessage &, TInt *)
voidDoComplete(TInt &)
voidDoRunL()
voidGetStringL(TDes &, TInt)
voidSetDataL(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
enumTSmsEventLoggerState { 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(TIntaPriority)[private]

Parameters

TInt aPriority

~CSmsEventLogger()

IMPORT_C~CSmsEventLogger()
Destructor.
capability
None

Member Functions Documentation

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

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

Adds an event to the log database.

capability
WriteUserData

Parameters

TRequestStatus & aStatusAsynchronous status word to signal when the operation is complete
const CSmsMessage & aSmsMessageThe SMS message that the event concerns
const TLogSmsPduData & aDataSMS PDU information for the event
TInt * aStatusId = NULLOptional string to include in the log message, specified by resource ID

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

IMPORT_C voidChangeEvent(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 & aStatusAsynchronous status word to signal when the operation is complete
const CSmsMessage & aSmsMessageThe SMS message that the event concerns
const TLogSmsPduData & aDataSMS PDU information for the event
TInt * aStatusId = NULLOptional string to include in the log message, specified by resource ID

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

IMPORT_C voidChangeEvent(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 & aStatusAsynchronous status word to signal when the operation is complete
const CSmsMessage & aSmsMessageThe SMS message that the event concerns
const TTime * aTimeSMS delivery time
const TLogSmsPduData & aDataSMS PDU information for the event
TInt * aStatusId = NULLOptional string to include in the log message, specified by resource ID

ClientAvailable()

TBool ClientAvailable()const [inline]

ConstructL(RFs &)

voidConstructL(RFs &aFs)[private]

Parameters

RFs & aFs

DeleteEvent(TRequestStatus &)

IMPORT_C voidDeleteEvent(TRequestStatus &aStatus)

Deletes an event.

Use GetEvent() to specify the event.

capability
WriteUserData

Parameters

TRequestStatus & aStatusAsynchronous status word to signal when the operation is complete

DoAddEventL(const CSmsMessage &, TInt *)

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

Parameters

const CSmsMessage & aSmsMessage
TInt * aStatusId

DoCancel()

voidDoCancel()[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 &)

voidDoComplete(TInt &)[private, virtual]

Implements derived-class specified Complete() behaviour.

This is called from Complete().

Parameters

TInt &

DoRunL()

voidDoRunL()[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 voidGetEvent(TRequestStatus &aStatus,
TLogIdaId
)

Gets the specified event from the log.

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

capability
ReadUserData

Parameters

TRequestStatus & aStatusAsynchronous status word to signal when the operation is complete
TLogId aIdLog event ID for the event

GetString(TDes &, TInt)

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

Gets a standard string from the specified resource.

Parameters

TDes & aStringOn return, string read from resource
TInt aIdResource ID

GetStringL(TDes &, TInt)

voidGetStringL(TDes &aString,
TIntaId
)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,
TIntaPriority = CActive::EPriorityStandard
)[static]

Allocates and creates a logger.

capability
None

Parameters

RFs & aFsFile server handle
TInt aPriority = CActive::EPriorityStandardActive object priority

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

voidSetDataL(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]