telephonyserverplugins/simatktsy/src/CTsyDelegates.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".
    14 //
    14 //
    15 
    15 
    16 
    16 
    17 
    17 
    18 //  INCLUDE FILES
    18 //  INCLUDE FILES
    19 
       
    20 #include "OstTraceDefinitions.h"
       
    21 #ifdef OST_TRACE_COMPILER_IN_USE
       
    22 #include "CTsyDelegatesTraces.h"
       
    23 #endif
       
    24 
       
    25 #include "ctsydelegates.h"
    19 #include "ctsydelegates.h"
    26 #include "cmmmessagemanagerbase.h"
    20 #include "cmmmessagemanagerbase.h"
       
    21 #include "tflogger.h" 
    27 
    22 
    28 // ======== MEMBER FUNCTIONS ========
    23 // ======== MEMBER FUNCTIONS ========
    29 
    24 
    30 CTsyDelegates* CTsyDelegates::NewL()
    25 CTsyDelegates* CTsyDelegates::NewL()
    31     {
    26     {
    47 // ---------------------------------------------------------------------------
    42 // ---------------------------------------------------------------------------
    48 //
    43 //
    49 CBase* CTsyDelegates::GetTsyObject( 
    44 CBase* CTsyDelegates::GetTsyObject( 
    50     CMmMessageManagerBase::TTsyObjects aObject )
    45     CMmMessageManagerBase::TTsyObjects aObject )
    51 	{
    46 	{
    52 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTSYDELEGATES_GETTSYOBJECT_1, "TSY: CTsyDelegates::GetTsyObject object=%d", aObject );
    47 TFLOGSTRING2("TSY: CTsyDelegates::GetTsyObject object=%d", aObject );
    53 	
    48 	
    54 	CBase* object = NULL;	
    49 	CBase* object = NULL;	
    55  	object = iTsyObjectArray.At( aObject );	
    50  	object = iTsyObjectArray.At( aObject );	
    56  	return object ; 	
    51  	return object ; 	
    57 	}
    52 	}
    64 //
    59 //
    65 void CTsyDelegates::RegisterTsyObject(
    60 void CTsyDelegates::RegisterTsyObject(
    66     CMmMessageManagerBase::TTsyObjects aTsyObjectType,
    61     CMmMessageManagerBase::TTsyObjects aTsyObjectType,
    67     CBase* aTsyObject )
    62     CBase* aTsyObject )
    68     {
    63     {
    69 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTSYDELEGATES_REGISTERTSYOBJECT_1, "TSY: CTsyDelegates::RegisterTsyObject type=%d address=0x%x", TInt( aTsyObjectType ), aTsyObject );
    64 TFLOGSTRING3("TSY: CTsyDelegates::RegisterTsyObject type=%d address=0x%x", TInt( aTsyObjectType ), aTsyObject );
    70 
    65 
    71     iTsyObjectArray[ aTsyObjectType ] = aTsyObject;
    66     iTsyObjectArray[ aTsyObjectType ] = aTsyObject;
    72     }
    67     }
    73 
    68 
    74 // ---------------------------------------------------------------------------
    69 // ---------------------------------------------------------------------------
    77 // (other items were commented in a header).
    72 // (other items were commented in a header).
    78 // ---------------------------------------------------------------------------
    73 // ---------------------------------------------------------------------------
    79 //
    74 //
    80 void CTsyDelegates::DeregisterTsyObject( CBase* aTsyObject )
    75 void CTsyDelegates::DeregisterTsyObject( CBase* aTsyObject )
    81     {
    76     {
    82 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CTSYDELEGATES_DEREGISTERTSYOBJECT_1, "TSY: CTsyDelegates::DeregisterTsyObject address=0x%x", aTsyObject );
    77 TFLOGSTRING2("TSY: CTsyDelegates::DeregisterTsyObject address=0x%x", aTsyObject );
    83 
    78 
    84     for( TInt i = 0; i < TInt( 
    79     for( TInt i = 0; i < TInt( 
    85         CMmMessageManagerBase::EMaxNumOfTsyObjects ); i++ )
    80         CMmMessageManagerBase::EMaxNumOfTsyObjects ); i++ )
    86         {
    81         {
    87         if( iTsyObjectArray[ i ] == aTsyObject )
    82         if( iTsyObjectArray[ i ] == aTsyObject )