bluetoothengine/btsac/src/btsacStateAborting.cpp
changeset 0 f63038272f30
child 21 0ba996a9b75d
equal deleted inserted replaced
-1:000000000000 0:f63038272f30
       
     1 /*
       
     2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  In this state, BTSAC is waiting for a confirmation for abort
       
    15 *								 operation from GAVDP API. 
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include "btsacStateAborting.h"
       
    24 #include "btsacStateListening.h"
       
    25 #include "btsacactive.h"
       
    26 #include "btsacGavdp.h"
       
    27 #include "debug.h"
       
    28 
       
    29 
       
    30 // ================= MEMBER FUNCTIONS =======================
       
    31 // -----------------------------------------------------------------------------
       
    32 // CBtsacAborting::NewL
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 CBtsacAborting* CBtsacAborting::NewL(CBTSAController& aParent)
       
    36     {
       
    37     CBtsacAborting* self = new( ELeave ) CBtsacAborting(aParent);
       
    38     return self;
       
    39     }
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // CBtsacAborting::CBtsacAborting
       
    43 // -----------------------------------------------------------------------------
       
    44 //
       
    45 CBtsacAborting::CBtsacAborting(CBTSAController& aParent)
       
    46 :   CBtsacState(aParent, EStateAborting)
       
    47     {
       
    48     }
       
    49   
       
    50 // -----------------------------------------------------------------------------
       
    51 // CBtsacAborting::~CBtsacAborting
       
    52 // -----------------------------------------------------------------------------
       
    53 //    
       
    54 CBtsacAborting::~CBtsacAborting()
       
    55     {
       
    56     TRACE_FUNC
       
    57     }
       
    58 
       
    59 // -----------------------------------------------------------------------------
       
    60 // CBtsacAborting::EnterL
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 void CBtsacAborting::EnterL()
       
    64     {
       
    65 	TRACE_STATE(_L("[BTSAC State] Aborting"))
       
    66 	_LIT(KName, "CBtsacStateAborting");
       
    67 	const TDesC& Name = KName;
       
    68 	Parent().iGavdp->RegisterObserver(this, Name);
       
    69     }
       
    70 
       
    71 // -----------------------------------------------------------------------------
       
    72 // CBtsacAborting::HandleGavdpErrorL
       
    73 // -----------------------------------------------------------------------------
       
    74 //	
       
    75 void CBtsacAborting::HandleGavdpErrorL(TInt aError)
       
    76 	{
       
    77 	TRACE_FUNC
       
    78 	Parent().CompletePendingRequests(KCompleteAllReqs, aError);
       
    79 	Parent().ChangeStateL(CBtsacListening::NewL(Parent(), EGavdpResetReasonGeneral, KErrDisconnected));
       
    80 	}
       
    81 
       
    82 //  End of File