traceservices/commsdebugutility/INC/comsdbg.inl
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __COMSDBG_INL__
       
    17 #define __COMSDBG_INL__
       
    18 
       
    19 #include <comms-infras/commsdebugutility.h>
       
    20 
       
    21 //
       
    22 // Inline functions
       
    23 //
       
    24 
       
    25 inline RFileLoggerBody::RFileLoggerBody() : RSessionBase()
       
    26 	{
       
    27 	iLoggingOnPckg()=KLoggingOnOffDefault;
       
    28 	}
       
    29 
       
    30 inline TInt RFileLoggerBody::DoCreateSession(const TDesC& aServer,const TVersion& aVersion,TInt aAsyncMessageSlots)
       
    31 	{
       
    32 	return CreateSession(aServer,aVersion,aAsyncMessageSlots);
       
    33 	}
       
    34 
       
    35 inline TInt RFileLoggerBody::DoSendReceive(TInt aFunction,const TIpcArgs& aArgs) const
       
    36 	{
       
    37 	return SendReceive(aFunction,aArgs);
       
    38 	}
       
    39 
       
    40 inline TInt RFileLoggerBody::DoSendReceive(TInt aFunction) const
       
    41 	{
       
    42 	return SendReceive(aFunction);
       
    43 	}
       
    44 
       
    45 inline void RFileLoggerBody::Close()
       
    46 	{
       
    47 	RSessionBase::Close();
       
    48 	}
       
    49 	
       
    50 inline TBool RFileLogger::IsLogging()
       
    51 	{
       
    52 	if (iLoggerBody)
       
    53 		{
       
    54 		return iLoggerBody->iLoggingOnPckg();
       
    55 		}
       
    56 	else
       
    57 		{
       
    58 		return EFalse;	
       
    59 		}
       
    60 	}
       
    61 
       
    62 inline void CSecondaryThread::SignalRequestSemaphore()
       
    63 /**
       
    64  * Increment the semaphore count to match the number of msgs in the queue.
       
    65  *
       
    66  * We need to signal to the slave thread that we now have work for it.
       
    67  * We could have added a semaphore to do this, but there is already one
       
    68  * in the second thread that isn't being used: the request semaphore.
       
    69  * So, instead we will use that since it is also faster. But the code
       
    70  * looks a bit back-to-front since we are calling "RequestComplete" when
       
    71  * we are making the request. We also have to pass in a dummy status object
       
    72  * since in normal practice this would be part of the request completion process.
       
    73  */
       
    74 	{
       
    75 	TRequestStatus dummy;
       
    76 	TRequestStatus* p = &dummy;
       
    77 	iSecondaryThread.RequestComplete(p,KErrNone);
       
    78 	}
       
    79 
       
    80 #endif // __COMSDBG_INL__
       
    81