bluetooth/btstack/rfcomm/AsyncErrorKicker.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 2000-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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef ASYNCERRORKICKER_H
       
    17 #define ASYNCERRORKICKER_H
       
    18 
       
    19 
       
    20 //	Class used by (currently RFCOMM) SAPs to asynchronously
       
    21 //	error themselves during writes and reads which do not
       
    22 //	allow for synchronous errors.
       
    23 //
       
    24 //	The error kicker should last for the lifetime of the SAP, 
       
    25 //	and no longer
       
    26 
       
    27 
       
    28 #include <e32base.h>
       
    29 
       
    30 class CRfcommSAP;
       
    31 
       
    32 NONSHARABLE_CLASS(CAsyncErrorKicker) : public CAsyncOneShot
       
    33 	{
       
    34 public:
       
    35 	//	Construction
       
    36 	CAsyncErrorKicker(CRfcommSAP& aSAP, TInt aPriority);
       
    37 	void SetError(TInt aErrorCode, TInt aErrorType);	//	aType used for TErrorTypes, 
       
    38 														//	trying to keep this vaguely generic.
       
    39 private:
       
    40 	void RunL();
       
    41 
       
    42 	CRfcommSAP& iSAP;
       
    43 	TInt iErrorCode;
       
    44 	TInt iErrorType;
       
    45 	};
       
    46 
       
    47 #endif //ASYNCERRORKICKER_H