1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #if !defined (__SMSULOG_H__)
35 * Logs SMS-related events.
37 * The class uses the log engine functionality provided by the Log Engine (CLogWrapper
43 class CSmsEventLogger : public CSmsuActiveBase
46 IMPORT_C static CSmsEventLogger* NewL(RFs& aFs,TInt aPriority=CActive::EPriorityStandard);
47 IMPORT_C ~CSmsEventLogger();
49 IMPORT_C void AddEvent(TRequestStatus& aStatus,const CSmsMessage& aSmsMessage,const TLogSmsPduData& aData,TInt* aStatusId=NULL);
50 IMPORT_C void GetEvent(TRequestStatus& aStatus,TLogId aId);
51 IMPORT_C void ChangeEvent(TRequestStatus& aStatus,const CSmsMessage& aSmsMessage,const TLogSmsPduData& aData,TInt* aStatusId=NULL);
52 IMPORT_C void ChangeEvent(TRequestStatus& aStatus,const CSmsMessage& aSmsMessage, const TTime* aTime, const TLogSmsPduData& aData, TInt* aStatusId=NULL);
53 IMPORT_C void DeleteEvent(TRequestStatus& aStatus);
55 inline TBool ClientAvailable() const;
56 inline TInt GetString(TDes& aString,TInt aId) const;
57 inline CLogEvent& Event();
58 inline const CLogEvent& Event() const;
59 inline const TLogSmsPduData& SmsPDUData() const;
66 CSmsEventLogger(TInt aPriority);
67 void ConstructL(RFs& aFs);
69 void DoAddEventL(const CSmsMessage& aSmsMessage,TInt* aStatusId);
70 void SetDataL(const CSmsMessage& aSmsMessage,TInt* aStatusId, const TTime* aDischargeTime);
71 void DoComplete(TInt& aStatus);
72 inline void GetStringL(TDes& aString,TInt aId) const;
75 enum TSmsEventLoggerState
78 ESmsEventLoggerGettingEvent,
79 ESmsEventLoggerAddingEvent,
80 ESmsEventLoggerChangingEvent,
81 ESmsEventLoggerDeletingEvent
84 TSmsEventLoggerState iState;
86 CLogWrapper* iLogWrapper;
89 TLogSmsPduData iSmsPDUData;
92 #include "smsulog.inl"