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