equal
deleted
inserted
replaced
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 "cmmlinelistTraces.h" |
|
23 #endif |
|
24 |
19 #include "cmmlinelist.h" |
25 #include "cmmlinelist.h" |
20 #include "cmmphonetsy.h" |
26 #include "cmmphonetsy.h" |
21 #include "cmmlinetsy.h" |
27 #include "cmmlinetsy.h" |
22 #include <ctsy/mmtsy_names.h> |
28 #include <ctsy/mmtsy_names.h> |
23 |
29 |
79 for ( TInt i = 0; i < KMmTsyNumOfSupportedLines; i++) |
85 for ( TInt i = 0; i < KMmTsyNumOfSupportedLines; i++) |
80 { |
86 { |
81 iIsLineInUse[ i ] = EFalse; |
87 iIsLineInUse[ i ] = EFalse; |
82 } |
88 } |
83 |
89 |
84 TFLOGSTRING2("TSY: CMmLineList::ConstructL:iObjectContainer->Count()=%d", iObjectContainer->Count()); |
90 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMLINELIST_CONSTRUCTL_1, "TSY: CMmLineList::ConstructL:iObjectContainer->Count()=%d", iObjectContainer->Count()); |
85 |
91 |
86 } |
92 } |
87 |
93 |
88 CMmLineList::~CMmLineList() |
94 CMmLineList::~CMmLineList() |
89 { |
95 { |
101 CMmLineTsy* CMmLineList::GetMmLineByMode( |
107 CMmLineTsy* CMmLineList::GetMmLineByMode( |
102 const RMobilePhone::TMobileService aLineMode ) const |
108 const RMobilePhone::TMobileService aLineMode ) const |
103 { |
109 { |
104 CMmLineTsy* mmLine = NULL; |
110 CMmLineTsy* mmLine = NULL; |
105 |
111 |
106 TFLOGSTRING("TSY: CMmLineList::GetMmLineByMode"); |
112 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMLINELIST_GETMMLINEBYMODE_1, "TSY: CMmLineList::GetMmLineByMode"); |
107 if ( iObjectContainer && iInitialised) |
113 if ( iObjectContainer && iInitialised) |
108 { |
114 { |
109 TFLOGSTRING2("TSY: CMmLineList::GetMmLineByMode::iObjectContainer->Count()=%d", iObjectContainer->Count()); |
115 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMLINELIST_GETMMLINEBYMODE_2, "TSY: CMmLineList::GetMmLineByMode::iObjectContainer->Count()=%d", iObjectContainer->Count()); |
110 |
116 |
111 for ( TInt i = 0; i < iObjectContainer->Count(); i++ ) |
117 for ( TInt i = 0; i < iObjectContainer->Count(); i++ ) |
112 { |
118 { |
113 if ( iIsLineInUse[ i ] != EFalse ) |
119 if ( iIsLineInUse[ i ] != EFalse ) |
114 { |
120 { |
135 // |
141 // |
136 CMmLineTsy* CMmLineList::GetMmLineByIndex( |
142 CMmLineTsy* CMmLineList::GetMmLineByIndex( |
137 TInt aIndex ) |
143 TInt aIndex ) |
138 { |
144 { |
139 CMmLineTsy* mmLine = NULL; |
145 CMmLineTsy* mmLine = NULL; |
140 TFLOGSTRING("TSY: CMmLineList::GetMmLineByIndex"); |
146 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMLINELIST_GETMMLINEBYINDEX_1, "TSY: CMmLineList::GetMmLineByIndex"); |
141 //This is for checking that return objects is right |
147 //This is for checking that return objects is right |
142 CTelObject* tempObject = |
148 CTelObject* tempObject = |
143 reinterpret_cast< CTelObject* >( this ); |
149 reinterpret_cast< CTelObject* >( this ); |
144 |
150 |
145 if ( iObjectContainer && iInitialised ) |
151 if ( iObjectContainer && iInitialised ) |
146 { |
152 { |
147 TFLOGSTRING2("TSY: CMmLineList::GetMmLineByIndex:iObjectContainer->Count()=%d", iObjectContainer->Count()); |
153 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMLINELIST_GETMMLINEBYINDEX_2, "TSY: CMmLineList::GetMmLineByIndex:iObjectContainer->Count()=%d", iObjectContainer->Count()); |
148 |
154 |
149 if ( aIndex >= 0 && aIndex < iObjectContainer->Count() ) |
155 if ( aIndex >= 0 && aIndex < iObjectContainer->Count() ) |
150 { |
156 { |
151 if( iObjectContainer->At( aIndex ) != tempObject ) |
157 if( iObjectContainer->At( aIndex ) != tempObject ) |
152 { |
158 { |
172 TInt CMmLineList::AddLineObject ( |
178 TInt CMmLineList::AddLineObject ( |
173 CTelObject* aTsyObject, const TName& aLineName ) |
179 CTelObject* aTsyObject, const TName& aLineName ) |
174 { |
180 { |
175 TInt ret ( KErrGeneral ); |
181 TInt ret ( KErrGeneral ); |
176 |
182 |
177 TFLOGSTRING("TSY: CMmLineList::AddLineObject"); |
183 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMLINELIST_ADDLINEOBJECT_1, "TSY: CMmLineList::AddLineObject"); |
178 if ( iObjectContainer ) |
184 if ( iObjectContainer ) |
179 { |
185 { |
180 TFLOGSTRING2("TSY: CMmLineList::AddLineObject:iObjectContainer->Count()=%d", iObjectContainer->Count()); |
186 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMLINELIST_ADDLINEOBJECT_2, "TSY: CMmLineList::AddLineObject:iObjectContainer->Count()=%d", iObjectContainer->Count()); |
181 |
187 |
182 |
188 |
183 TInt trapError( KErrNone ); |
189 TInt trapError( KErrNone ); |
184 |
190 |
185 if ( 0 == aLineName.CompareF( KMmTsyVoice1LineName ) ) |
191 if ( 0 == aLineName.CompareF( KMmTsyVoice1LineName ) ) |
293 CBase* CMmLineList::GetObjectByIndex ( |
299 CBase* CMmLineList::GetObjectByIndex ( |
294 TInt aIndex ) const |
300 TInt aIndex ) const |
295 { |
301 { |
296 CBase* mmObject = NULL; |
302 CBase* mmObject = NULL; |
297 |
303 |
298 TFLOGSTRING2("TSY: CMmLineList::GetObjectByIndex. aIndex=%d", aIndex ); |
304 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMLINELIST_GETOBJECTBYINDEX_1, "TSY: CMmLineList::GetObjectByIndex. aIndex=%d", aIndex ); |
299 if ( iObjectContainer ) |
305 if ( iObjectContainer ) |
300 { |
306 { |
301 TFLOGSTRING2("TSY: CMmLineList::GetObjectByIndex. iObjectContainer->Count()=%d", iObjectContainer->Count()); |
307 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMLINELIST_GETOBJECTBYINDEX_2, "TSY: CMmLineList::GetObjectByIndex. iObjectContainer->Count()=%d", iObjectContainer->Count()); |
302 |
308 |
303 if ( iIsLineInUse[ aIndex ] ) |
309 if ( iIsLineInUse[ aIndex ] ) |
304 { |
310 { |
305 mmObject = iObjectContainer->At( static_cast<TInt>( aIndex ) ); |
311 mmObject = iObjectContainer->At( static_cast<TInt>( aIndex ) ); |
306 } |
312 } |