1 // Copyright (c) 2001-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.
31 * Base class for SMS active objects.
36 class CSmsuActiveBase : public CActive
38 friend class CSmsuTimeout;
41 IMPORT_C ~CSmsuActiveBase();
44 IMPORT_C CSmsuActiveBase(TInt aPriority);
46 IMPORT_C virtual void Complete(TInt aStatus);
48 IMPORT_C void ConstructTimeoutL();
50 IMPORT_C void CompleteMyself(TInt aStatus, TBool aSetActive = ETrue);
51 IMPORT_C void CompleteMyselfAfterTimeout(TInt aStatus);
53 IMPORT_C void TimedSetActive(const TTimeIntervalMicroSeconds32& aTimeIntervalMicroSeconds32);
54 IMPORT_C void TimedSetActiveCancel();
55 IMPORT_C TBool TimedOut() const;
57 IMPORT_C void Queue(TRequestStatus& aStatus);
59 IMPORT_C TInt RunError(TInt aError); ///< Calls complete
62 * Implements derived-class specified RunL() behaviour.
64 * This is called from RunL().
66 virtual void DoRunL()=0;
69 * Implements derived-class specified Complete() behaviour.
71 * This is called from Complete().
73 * @param Active object status word
75 inline virtual void DoComplete(TInt&) {};
81 * Timer, to be activated by TimedSetActive().
83 CSmsuTimeout* iSmsuTimeout;
86 * Observer, set by Queue().
88 TRequestStatus* iReport;
91 #endif // __SMSUACT_H__