telephonyprotocols/rawipnif/src/BinderBase.cpp
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
equal deleted inserted replaced
19:630d2f34d719 20:07a122eea281
     1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    17 
    17 
    18 /**
    18 /**
    19  @file
    19  @file
    20 */
    20 */
    21 
    21 
    22 
       
    23 #include "OstTraceDefinitions.h"
       
    24 #ifdef OST_TRACE_COMPILER_IN_USE
       
    25 #include "BinderBaseTraces.h"
       
    26 #endif
       
    27 
       
    28 #include <nifmbuf.h>
    22 #include <nifmbuf.h>
    29 #include "BinderBase.h"
    23 #include "BinderBase.h"
    30 #include "RawIPFlow.h"
    24 #include "RawIPFlow.h"
    31 
    25 
    32 using namespace ESock;
    26 using namespace ESock;
    33 
    27 
    34 CBinderBase::CBinderBase(CRawIPFlow& aFlow)
    28 CBinderBase::CBinderBase(CRawIPFlow& aFlow, CBttLogger* aTheLogger)
    35 /**
    29 /**
    36  * Constructor
    30  * Constructor
    37  *
    31  *
    38  * @param aNifMain A pointer to CRawIPFlow
    32  * @param aNifMain A pointer to CRawIPFlow
    39  */
    33  */
    40 	:iFlow(&aFlow)
    34 	:iFlow(&aFlow),
       
    35 	 iTheLogger(aTheLogger)
    41 	{
    36 	{
    42 	}
    37 	}
    43 
    38 
    44 CBinderBase::~CBinderBase()
    39 CBinderBase::~CBinderBase()
    45 /**
    40 /**
    66  *
    61  *
    67  * @param aUpperReceiver A pointer to Upper layer Receive class
    62  * @param aUpperReceiver A pointer to Upper layer Receive class
    68  * @param aUpperControl A pointer to Upper layer control class
    63  * @param aUpperControl A pointer to Upper layer control class
    69  */
    64  */
    70 	{
    65 	{
    71     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CBINDERBASE_BIND_1, "CBinderBase:\tBind()");
    66     _LOG_L1C1(_L8("CBinderBase:\tBind()"));
    72 
    67 
    73 	iUpperReceiver = aUpperReceiver;
    68 	iUpperReceiver = aUpperReceiver;
    74 	iUpperControl = aUpperControl;
    69 	iUpperControl = aUpperControl;
    75 	return this;
    70 	return this;
    76 	}
    71 	}
    77 
    72 
    78 void CBinderBase::Unbind(MUpperDataReceiver* aUpperReceiver, MUpperControl* aUpperControl)
    73 void CBinderBase::Unbind(MUpperDataReceiver* aUpperReceiver, MUpperControl* aUpperControl)
    79     {
    74     {
    80 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CBINDERBASE_UNBIND_1, "CBinderBase:\tUnbind()");
    75 	_LOG_L1C1(_L8("CBinderBase:\tUnbind()"));
    81 	
    76 	
    82 #ifndef _DEBUG
    77 #ifndef _DEBUG
    83 	(void) aUpperReceiver;
    78 	(void) aUpperReceiver;
    84 	(void) aUpperControl;
    79 	(void) aUpperControl;
    85 #endif
    80 #endif
    95  * Indicates to the protocol layer that the NIF is ready to send packets.
    90  * Indicates to the protocol layer that the NIF is ready to send packets.
    96  *
    91  *
    97  * @param aProtocol A pointer to a protocol
    92  * @param aProtocol A pointer to a protocol
    98  */
    93  */
    99 	{
    94 	{
   100 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CBINDERBASE_STARTSENDING_1, "CBinderBase:\tStartSending()");
    95 	_LOG_L1C1(_L8("CBinderBase:\tStartSending()"));
   101 
    96 
   102 	// Default implementation.
    97 	// Default implementation.
   103 	// Uses iProtocol instead aProtocol.
    98 	// Uses iProtocol instead aProtocol.
   104 	iUpperControl->StartSending();
    99 	iUpperControl->StartSending();
   105 	}
   100 	}