telephonyprotocols/rawipnif/src/BinderBase.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2006-2010 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 
    22 #include <nifmbuf.h>
    28 #include <nifmbuf.h>
    23 #include "BinderBase.h"
    29 #include "BinderBase.h"
    24 #include "RawIPFlow.h"
    30 #include "RawIPFlow.h"
    25 
    31 
    26 using namespace ESock;
    32 using namespace ESock;
    27 
    33 
    28 CBinderBase::CBinderBase(CRawIPFlow& aFlow, CBttLogger* aTheLogger)
    34 CBinderBase::CBinderBase(CRawIPFlow& aFlow)
    29 /**
    35 /**
    30  * Constructor
    36  * Constructor
    31  *
    37  *
    32  * @param aNifMain A pointer to CRawIPFlow
    38  * @param aNifMain A pointer to CRawIPFlow
    33  */
    39  */
    34 	:iFlow(&aFlow),
    40 	:iFlow(&aFlow)
    35 	 iTheLogger(aTheLogger)
       
    36 	{
    41 	{
    37 	}
    42 	}
    38 
    43 
    39 CBinderBase::~CBinderBase()
    44 CBinderBase::~CBinderBase()
    40 /**
    45 /**
    61  *
    66  *
    62  * @param aUpperReceiver A pointer to Upper layer Receive class
    67  * @param aUpperReceiver A pointer to Upper layer Receive class
    63  * @param aUpperControl A pointer to Upper layer control class
    68  * @param aUpperControl A pointer to Upper layer control class
    64  */
    69  */
    65 	{
    70 	{
    66     _LOG_L1C1(_L8("CBinderBase:\tBind()"));
    71     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CBINDERBASE_BIND_1, "CBinderBase:\tBind()");
    67 
    72 
    68 	iUpperReceiver = aUpperReceiver;
    73 	iUpperReceiver = aUpperReceiver;
    69 	iUpperControl = aUpperControl;
    74 	iUpperControl = aUpperControl;
    70 	return this;
    75 	return this;
    71 	}
    76 	}
    72 
    77 
    73 void CBinderBase::Unbind(MUpperDataReceiver* aUpperReceiver, MUpperControl* aUpperControl)
    78 void CBinderBase::Unbind(MUpperDataReceiver* aUpperReceiver, MUpperControl* aUpperControl)
    74     {
    79     {
    75 	_LOG_L1C1(_L8("CBinderBase:\tUnbind()"));
    80 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CBINDERBASE_UNBIND_1, "CBinderBase:\tUnbind()");
    76 	
    81 	
    77 #ifndef _DEBUG
    82 #ifndef _DEBUG
    78 	(void) aUpperReceiver;
    83 	(void) aUpperReceiver;
    79 	(void) aUpperControl;
    84 	(void) aUpperControl;
    80 #endif
    85 #endif
    90  * Indicates to the protocol layer that the NIF is ready to send packets.
    95  * Indicates to the protocol layer that the NIF is ready to send packets.
    91  *
    96  *
    92  * @param aProtocol A pointer to a protocol
    97  * @param aProtocol A pointer to a protocol
    93  */
    98  */
    94 	{
    99 	{
    95 	_LOG_L1C1(_L8("CBinderBase:\tStartSending()"));
   100 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CBINDERBASE_STARTSENDING_1, "CBinderBase:\tStartSending()");
    96 
   101 
    97 	// Default implementation.
   102 	// Default implementation.
    98 	// Uses iProtocol instead aProtocol.
   103 	// Uses iProtocol instead aProtocol.
    99 	iUpperControl->StartSending();
   104 	iUpperControl->StartSending();
   100 	}
   105 	}