telephonyserverplugins/simtsy/src/CSimVoiceLine.cpp
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
equal deleted inserted replaced
19:630d2f34d719 20:07a122eea281
     1 // Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2001-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".
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 //
    14 //
    15 
    15 
    16 
       
    17 
       
    18 #include "OstTraceDefinitions.h"
       
    19 #ifdef OST_TRACE_COMPILER_IN_USE
       
    20 #include "CSimVoiceLineTraces.h"
       
    21 #endif
       
    22 
       
    23 #include "CSimPhone.h"
    16 #include "CSimPhone.h"
    24 #include "CSimVoiceCall.h"
    17 #include "CSimVoiceCall.h"
       
    18 #include "Simlog.h"
    25 #include "et_struct.h"
    19 #include "et_struct.h"
    26 
    20 
    27 _LIT(KCommonCallName,"VoiceCall%d");	// < Voice call name template.
    21 _LIT(KCommonCallName,"VoiceCall%d");	// < Voice call name template.
    28 const TInt KVoiceCallGranularity=2;		// < Granularity of voice call list array.
    22 const TInt KVoiceCallGranularity=2;		// < Granularity of voice call list array.
    29 
    23 
   112 * @param aName name of call to be opened
   106 * @param aName name of call to be opened
   113 * @return CTelObject pointer to the object opened by name
   107 * @return CTelObject pointer to the object opened by name
   114 * @leave Leaves if name given does not match the required name
   108 * @leave Leaves if name given does not match the required name
   115 */
   109 */
   116 	{
   110 	{
   117 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMVOICELINE_OPENNEWOBJECTBYNAMEL_1, ">>CSimVoiceLine::OpenNewObjectByNameL");
   111 	LOGVOICE1(">>CSimVoiceLine::OpenNewObjectByNameL");
   118 	TInt i;
   112 	TInt i;
   119 	TInt count=iCalls->Count();
   113 	TInt count=iCalls->Count();
   120 
   114 
   121 	for(i=0;i<count;i++)
   115 	for(i=0;i<count;i++)
   122 		{
   116 		{
   123 		OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMVOICELINE_OPENNEWOBJECTBYNAMEL_2, ">>CSimVoiceLine::OpenNewObjectByNameL %S", iCalls->At(i)->iName);
   117 		LOGVOICE2(">>CSimVoiceLine::OpenNewObjectByNameL %s",&(iCalls->At(i)->iName));
   124 		if(iCalls->At(i)->iName.MatchF(aName)==0)
   118 		if(iCalls->At(i)->iName.MatchF(aName)==0)
   125 			{
   119 			{
   126 			iCalls->At(i)->Open();			
   120 			iCalls->At(i)->Open();			
   127 			return iCalls->At(i);
   121 			return iCalls->At(i);
   128 			}
   122 			}
   129 		}
   123 		}
   130 
   124 
   131 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMVOICELINE_OPENNEWOBJECTBYNAMEL_3, "<<CSimVoiceLine::OpenNewObjectByNameL");
   125 	LOGVOICE1("<<CSimVoiceLine::OpenNewObjectByNameL");
   132 	User::Leave(KErrNotFound);
   126 	User::Leave(KErrNotFound);
   133 	return NULL;
   127 	return NULL;
   134 	}
   128 	}
   135 
   129 
   136 CTelObject* CSimVoiceLine::OpenNewObjectL(TDes& aNewName)
   130 CTelObject* CSimVoiceLine::OpenNewObjectL(TDes& aNewName)
   154 	iCalls->AppendL(newCall);
   148 	iCalls->AppendL(newCall);
   155 	if(aCallType!=ECallTypeSpareCall)
   149 	if(aCallType!=ECallTypeSpareCall)
   156 		{
   150 		{
   157 		HandleNewCallAddedNotification(aNewName);
   151 		HandleNewCallAddedNotification(aNewName);
   158 		}
   152 		}
   159 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMVOICELINE_CREATENEWCALLL_1, ">>CSimVoiceLine::CreateNewCallL 0x%08x",newCall);
   153 	LOGVOICE2(">>CSimVoiceLine::CreateNewCallL 0x%08x",newCall);
   160 	CleanupStack::Pop(newCall);
   154 	CleanupStack::Pop(newCall);
   161 	return newCall;
   155 	return newCall;
   162 	}
   156 	}
   163 
   157 
   164 TInt CSimVoiceLine::ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage)
   158 TInt CSimVoiceLine::ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage)