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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
20 #if !defined (__SMSULOG_H__)
27 #include <logsmspdudata.h>
34 * Logs SMS-related events.
36 * The class uses the log engine functionality provided by the Log Engine (CLogWrapper
42 class CSmsEventLogger : public CSmsuActiveBase
45 IMPORT_C static CSmsEventLogger* NewL(RFs& aFs,TInt aPriority=CActive::EPriorityStandard);
46 IMPORT_C ~CSmsEventLogger();
48 IMPORT_C void AddEvent(TRequestStatus& aStatus,const CSmsMessage& aSmsMessage,const TLogSmsPduData& aData,TInt* aStatusId=NULL);
49 IMPORT_C void GetEvent(TRequestStatus& aStatus,TLogId aId);
50 IMPORT_C void ChangeEvent(TRequestStatus& aStatus,const CSmsMessage& aSmsMessage,const TLogSmsPduData& aData,TInt* aStatusId=NULL);
51 IMPORT_C void ChangeEvent(TRequestStatus& aStatus,const CSmsMessage& aSmsMessage, const TTime* aTime, const TLogSmsPduData& aData, TInt* aStatusId=NULL);
52 IMPORT_C void DeleteEvent(TRequestStatus& aStatus);
54 inline TBool ClientAvailable() const;
55 inline TInt GetString(TDes& aString,TInt aId) const;
56 inline CLogEvent& Event();
57 inline const CLogEvent& Event() const;
58 inline const TLogSmsPduData& SmsPDUData() const;
65 CSmsEventLogger(TInt aPriority);
66 void ConstructL(RFs& aFs);
68 void DoAddEventL(const CSmsMessage& aSmsMessage,TInt* aStatusId);
69 void SetDataL(const CSmsMessage& aSmsMessage,TInt* aStatusId, const TTime* aDischargeTime);
70 void DoComplete(TInt& aStatus);
71 inline void GetStringL(TDes& aString,TInt aId) const;
74 enum TSmsEventLoggerState
77 ESmsEventLoggerGettingEvent,
78 ESmsEventLoggerAddingEvent,
79 ESmsEventLoggerChangingEvent,
80 ESmsEventLoggerDeletingEvent
83 TSmsEventLoggerState iState;
85 CLogWrapper* iLogWrapper;
88 TLogSmsPduData iSmsPDUData;
91 #include "smsulog.inl"