epoc32/include/smsuact.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 
    17 
    18 /**
    19  @file
    20 */
    21 
    22 #ifndef __SMSUACT_H__
    23 #define __SMSUACT_H__
    24 
    25 #include <e32base.h>
    26 
    27 class CSmsuTimeout;
    28 
    29 
    30 /**
    31  *  Base class for SMS active objects.
    32  *  
    33  *  @publishedAll
    34  *  @released 
    35  */
    36 class CSmsuActiveBase : public CActive
    37 	{
    38 	friend class CSmsuTimeout;
    39 	
    40 public:
    41 	IMPORT_C ~CSmsuActiveBase();
    42 
    43 protected:
    44 	IMPORT_C CSmsuActiveBase(TInt aPriority);
    45 
    46 	IMPORT_C virtual void Complete(TInt aStatus);
    47 
    48 	IMPORT_C void   ConstructTimeoutL();
    49 
    50 	IMPORT_C void   CompleteMyself(TInt aStatus, TBool aSetActive = ETrue);
    51 	IMPORT_C void   CompleteMyselfAfterTimeout(TInt aStatus);
    52 
    53 	IMPORT_C void   TimedSetActive(const TTimeIntervalMicroSeconds32& aTimeIntervalMicroSeconds32);
    54 	IMPORT_C void   TimedSetActiveCancel();
    55 	IMPORT_C TBool  TimedOut() const;
    56 
    57 	IMPORT_C void   Queue(TRequestStatus& aStatus);
    58 
    59 	IMPORT_C TInt   RunError(TInt aError); ///< Calls complete
    60 
    61 	/**
    62 	 *  Implements derived-class specified RunL() behaviour.
    63 	 *  
    64 	 *  This is called from RunL(). 
    65 	 */
    66     virtual void DoRunL()=0;
    67 
    68 	/**
    69 	 *  Implements derived-class specified Complete() behaviour.
    70 	 *  
    71 	 *  This is called from Complete().
    72 	 *  
    73 	 *  @param Active object status word 
    74 	 */
    75 	inline virtual void DoComplete(TInt&) {};
    76 
    77     IMPORT_C void RunL();
    78 
    79 protected:
    80 	/**
    81 	 *  Timer, to be activated by TimedSetActive().
    82 	 */
    83 	CSmsuTimeout* iSmsuTimeout;
    84 
    85 	/**
    86 	 *  Observer, set by Queue().
    87 	 */
    88 	TRequestStatus* iReport;
    89 	};
    90 
    91 #endif // __SMSUACT_H__