diff -r 4255033c5d30 -r 988cddd6adbd bluetoothengine/bteng/inc/btengactive.inl --- a/bluetoothengine/bteng/inc/btengactive.inl Fri Apr 23 23:23:50 2010 +0300 +++ b/bluetoothengine/bteng/inc/btengactive.inl Fri Apr 23 23:38:44 2010 +0300 @@ -16,6 +16,66 @@ */ +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// C++ default constructor +// --------------------------------------------------------------------------- +// +inline CBTEngActive::CBTEngActive( MBTEngActiveObserver& aObserver, TInt aId, + TInt aPriority ) +: CActive( aPriority ), + iRequestId( aId ), + iObserver( aObserver ) + { + CActiveScheduler::Add( this ); + } + + +// --------------------------------------------------------------------------- +// Symbian 2nd-phase constructor +// --------------------------------------------------------------------------- +// +inline void CBTEngActive::ConstructL() + { + } + + +// --------------------------------------------------------------------------- +// NewLC +// --------------------------------------------------------------------------- +// +inline CBTEngActive* CBTEngActive::NewL( MBTEngActiveObserver& aObserver, + TInt aId, TInt aPriority ) + { + CBTEngActive* self = new( ELeave ) CBTEngActive( aObserver, aId, aPriority ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +inline CBTEngActive::~CBTEngActive() + { + Cancel(); + } + + +// --------------------------------------------------------------------------- +// From class CActive. +// Called by the active scheduler when the request has been cancelled. +// --------------------------------------------------------------------------- +// +inline void CBTEngActive::DoCancel() + { + } + + // ----------------------------------------------------------------------------- // Get the identifier of this instance. @@ -65,3 +125,26 @@ { return iStatus; } + + +// --------------------------------------------------------------------------- +// From class CActive. +// Called by the active scheduler when the request has been completed. +// --------------------------------------------------------------------------- +// +inline void CBTEngActive::RunL() + { + iObserver.RequestCompletedL( this, iRequestId, iStatus.Int() ); + } + + +// --------------------------------------------------------------------------- +// From class CActive. +// Called by the active scheduler when an error in RunL has occurred. +// --------------------------------------------------------------------------- +// +inline TInt CBTEngActive::RunError( TInt aError ) + { + iObserver.HandleError( this, iRequestId, aError ); + return KErrNone; + }