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