bluetoothengine/bteng/inc/btengactive.inl
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     1 /*
     1 /*
     2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    71 // Called by the active scheduler when the request has been cancelled.
    71 // Called by the active scheduler when the request has been cancelled.
    72 // ---------------------------------------------------------------------------
    72 // ---------------------------------------------------------------------------
    73 //
    73 //
    74 inline void CBTEngActive::DoCancel()
    74 inline void CBTEngActive::DoCancel()
    75     {
    75     {
    76     iObserver.CancelRequest( iRequestId );
       
    77     }
    76     }
       
    77 
       
    78 
    78 
    79 
    79 // -----------------------------------------------------------------------------
    80 // -----------------------------------------------------------------------------
    80 // Get the identifier of this instance.
    81 // Get the identifier of this instance.
    81 // -----------------------------------------------------------------------------
    82 // -----------------------------------------------------------------------------
    82 //
    83 //
   103 inline void CBTEngActive::GoActive()
   104 inline void CBTEngActive::GoActive()
   104     {
   105     {
   105     SetActive();
   106     SetActive();
   106     }
   107     }
   107 
   108 
       
   109 
       
   110 // -----------------------------------------------------------------------------
       
   111 // Cancel an outstanding request.
       
   112 // -----------------------------------------------------------------------------
       
   113 //
       
   114 inline void CBTEngActive::CancelRequest()
       
   115     {
       
   116     Cancel();
       
   117     }
       
   118 
       
   119 
   108 // -----------------------------------------------------------------------------
   120 // -----------------------------------------------------------------------------
   109 // Get a reference to the active object request status.
   121 // Get a reference to the active object request status.
   110 // -----------------------------------------------------------------------------
   122 // -----------------------------------------------------------------------------
   111 //
   123 //
   112 inline TRequestStatus& CBTEngActive::RequestStatus()
   124 inline TRequestStatus& CBTEngActive::RequestStatus()
   113     {
   125     {
   114     return iStatus;
   126     return iStatus;
   115     }
   127     }
   116 
   128 
       
   129 
   117 // ---------------------------------------------------------------------------
   130 // ---------------------------------------------------------------------------
   118 // From class CActive.
   131 // From class CActive.
   119 // Called by the active scheduler when the request has been completed.
   132 // Called by the active scheduler when the request has been completed.
   120 // ---------------------------------------------------------------------------
   133 // ---------------------------------------------------------------------------
   121 //
   134 //
   122 inline void CBTEngActive::RunL()
   135 inline void CBTEngActive::RunL()
   123     {
   136     {
   124     iObserver.RequestCompletedL( this, iStatus.Int() );
   137     iObserver.RequestCompletedL( this, iRequestId, iStatus.Int() );
   125     }
   138     }
   126 
   139 
   127 
   140 
   128 // ---------------------------------------------------------------------------
   141 // ---------------------------------------------------------------------------
   129 // From class CActive.
   142 // From class CActive.
   130 // Called by the active scheduler when an error in RunL has occurred.
   143 // Called by the active scheduler when an error in RunL has occurred.
   131 // ---------------------------------------------------------------------------
   144 // ---------------------------------------------------------------------------
   132 //
   145 //
   133 inline TInt CBTEngActive::RunError( TInt aError )
   146 inline TInt CBTEngActive::RunError( TInt aError )
   134     {
   147     {
   135     iObserver.HandleError( this, aError );
   148     iObserver.HandleError( this, iRequestId, aError );
   136     return KErrNone;
   149     return KErrNone;
   137     }
   150     }