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 "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.
29 * Base class for SMS active objects.
34 class CSmsuActiveBase : public CActive
36 friend class CSmsuTimeout;
39 IMPORT_C ~CSmsuActiveBase();
42 IMPORT_C CSmsuActiveBase(TInt aPriority);
44 IMPORT_C virtual void Complete(TInt aStatus);
46 IMPORT_C void ConstructTimeoutL();
48 IMPORT_C void CompleteMyself(TInt aStatus, TBool aSetActive = ETrue);
49 IMPORT_C void CompleteMyselfAfterTimeout(TInt aStatus);
51 IMPORT_C void TimedSetActive(const TTimeIntervalMicroSeconds32& aTimeIntervalMicroSeconds32);
52 IMPORT_C void TimedSetActiveCancel();
53 IMPORT_C TBool TimedOut() const;
55 IMPORT_C void Queue(TRequestStatus& aStatus);
57 IMPORT_C TInt RunError(TInt aError); //< Calls complete
60 * Implements derived-class specified RunL() behaviour.
62 * This is called from RunL().
64 virtual void DoRunL()=0;
67 * Implements derived-class specified Complete() behaviour.
69 * This is called from Complete().
71 * @param Active object status word
73 inline virtual void DoComplete(TInt&) {};
79 * Timer, to be activated by TimedSetActive().
81 CSmsuTimeout* iSmsuTimeout;
84 * Observer, set by Queue().
86 TRequestStatus* iReport;
89 #endif // __SMSUACT_H__