1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/smsuact.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,91 @@
1.4 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +
1.20 +
1.21 +/**
1.22 + @file
1.23 +*/
1.24 +
1.25 +#ifndef __SMSUACT_H__
1.26 +#define __SMSUACT_H__
1.27 +
1.28 +#include <e32base.h>
1.29 +
1.30 +class CSmsuTimeout;
1.31 +
1.32 +
1.33 +/**
1.34 + * Base class for SMS active objects.
1.35 + *
1.36 + * @publishedAll
1.37 + * @released
1.38 + */
1.39 +class CSmsuActiveBase : public CActive
1.40 + {
1.41 + friend class CSmsuTimeout;
1.42 +
1.43 +public:
1.44 + IMPORT_C ~CSmsuActiveBase();
1.45 +
1.46 +protected:
1.47 + IMPORT_C CSmsuActiveBase(TInt aPriority);
1.48 +
1.49 + IMPORT_C virtual void Complete(TInt aStatus);
1.50 +
1.51 + IMPORT_C void ConstructTimeoutL();
1.52 +
1.53 + IMPORT_C void CompleteMyself(TInt aStatus, TBool aSetActive = ETrue);
1.54 + IMPORT_C void CompleteMyselfAfterTimeout(TInt aStatus);
1.55 +
1.56 + IMPORT_C void TimedSetActive(const TTimeIntervalMicroSeconds32& aTimeIntervalMicroSeconds32);
1.57 + IMPORT_C void TimedSetActiveCancel();
1.58 + IMPORT_C TBool TimedOut() const;
1.59 +
1.60 + IMPORT_C void Queue(TRequestStatus& aStatus);
1.61 +
1.62 + IMPORT_C TInt RunError(TInt aError); ///< Calls complete
1.63 +
1.64 + /**
1.65 + * Implements derived-class specified RunL() behaviour.
1.66 + *
1.67 + * This is called from RunL().
1.68 + */
1.69 + virtual void DoRunL()=0;
1.70 +
1.71 + /**
1.72 + * Implements derived-class specified Complete() behaviour.
1.73 + *
1.74 + * This is called from Complete().
1.75 + *
1.76 + * @param Active object status word
1.77 + */
1.78 + inline virtual void DoComplete(TInt&) {};
1.79 +
1.80 + IMPORT_C void RunL();
1.81 +
1.82 +protected:
1.83 + /**
1.84 + * Timer, to be activated by TimedSetActive().
1.85 + */
1.86 + CSmsuTimeout* iSmsuTimeout;
1.87 +
1.88 + /**
1.89 + * Observer, set by Queue().
1.90 + */
1.91 + TRequestStatus* iReport;
1.92 + };
1.93 +
1.94 +#endif // __SMSUACT_H__