wlan_bearer/wlannwif/etherpkt/sender_common.cpp
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-2009 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:  Implements sender class
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 12 %
       
    20 */
       
    21 
       
    22 #include "am_debug.h"
       
    23 #include "carddrv.h"
       
    24 #include "sender_hw.h"
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CSender::CSender()
       
    30 // -----------------------------------------------------------------------------
       
    31 //
       
    32 CSender::CSender() :
       
    33     CActive( CActive::EPriorityHigh )
       
    34 	{
       
    35 	}
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CSender::~CSender()
       
    39 // -----------------------------------------------------------------------------
       
    40 //
       
    41 CSender::~CSender()
       
    42 	{
       
    43 	DEBUG("CSender::~CSender()");
       
    44 	Cancel();
       
    45 	}
       
    46 
       
    47 // -----------------------------------------------------------------------------
       
    48 // CSender::NewL()
       
    49 // -----------------------------------------------------------------------------
       
    50 //
       
    51 CSender* CSender::NewL( CPcCardPktDrv* aParent )
       
    52     {
       
    53     DEBUG("CSender::NewL()");
       
    54 
       
    55     CSender *sd = new(ELeave) CSender;
       
    56     CleanupStack::PushL( sd );
       
    57     sd->InitL(aParent);
       
    58     CActiveScheduler::Add( sd );
       
    59     CleanupStack::Pop( sd );
       
    60     return sd;
       
    61     }
       
    62 
       
    63 // -----------------------------------------------------------------------------
       
    64 // CSender::InitL()
       
    65 // -----------------------------------------------------------------------------
       
    66 //
       
    67 void CSender::InitL( CPcCardPktDrv* aParent )
       
    68     {
       
    69     DEBUG("CSender::InitL()");
       
    70 
       
    71 	iParent = aParent;
       
    72 	iStopSending = EFalse;
       
    73 	iReqPending = EFalse;
       
    74 
       
    75     }
       
    76 
       
    77 // -----------------------------------------------------------------------------
       
    78 // CSender::DoCancel()
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 void CSender::DoCancel()
       
    82 	{
       
    83 	DEBUG("CSender::DoCancel()");
       
    84 	iParent->iCard.ResumeTxCancel();
       
    85 	}