125 aASYCommand, |
125 aASYCommand, |
126 aPtrBuf ); |
126 aPtrBuf ); |
127 } |
127 } |
128 else |
128 else |
129 { |
129 { |
130 trID = StoreTransactionID( aCmdId, aASYCommand, aPtrBuf ); |
130 trID = StoreTransactionIDL( aCmdId, aASYCommand, aPtrBuf ); |
131 } |
131 } |
132 |
132 |
133 COM_TRACE_1( "[AccFW:AccServer] CAccSrvASYProxyHandler::HandleASYCommsL - return TrID=%d", trID ); |
133 COM_TRACE_1( "[AccFW:AccServer] CAccSrvASYProxyHandler::HandleASYCommsL - return TrID=%d", trID ); |
134 return trID; |
134 return trID; |
135 } |
135 } |
136 |
136 |
137 // ----------------------------------------------------------------------------- |
137 // ----------------------------------------------------------------------------- |
138 // CAccSrvASYProxyHandler::StoreTransactionID |
138 // CAccSrvASYProxyHandler::StoreTransactionIDL |
139 // ----------------------------------------------------------------------------- |
139 // ----------------------------------------------------------------------------- |
140 // |
140 // |
141 TInt CAccSrvASYProxyHandler::StoreTransactionID( |
141 TInt CAccSrvASYProxyHandler::StoreTransactionIDL( |
142 TProcessCmdId aCmdId, |
142 TProcessCmdId aCmdId, |
143 TASYCommandParamRecord& aASYCommand, |
143 TASYCommandParamRecord& aASYCommand, |
144 TPtr8* aPtrBuf ) |
144 TPtr8* aPtrBuf ) |
145 { |
145 { |
146 COM_TRACE_( "[AccFW:AccServer] CAccSrvASYProxyHandler::StoreTransactionID()" ); |
146 COM_TRACE_( "[AccFW:AccServer] CAccSrvASYProxyHandler::StoreTransactionIDL()" ); |
147 |
147 |
148 TInt trID( KErrNotFound ); |
148 TInt trID( KErrNotFound ); |
149 TInt count( iOngoingTransactions.Count() ); |
149 TInt count( iOngoingTransactions.Count() ); |
150 TUint32 nameFromOngoingTransactions; |
150 TUint32 nameFromOngoingTransactions; |
151 TUint32 nameFromRequest; |
151 TUint32 nameFromRequest; |
152 |
152 |
153 COM_TRACE_1( "[AccFW:AccServer] CAccSrvASYProxyHandler::StoreTransactionID - current count = %d", count ); |
153 COM_TRACE_1( "[AccFW:AccServer] CAccSrvASYProxyHandler::StoreTransactionIDL - current count = %d", count ); |
154 |
154 |
155 for ( TInt i( 0 ); i < count; ++i ) |
155 for ( TInt i( 0 ); i < count; ++i ) |
156 { |
156 { |
157 iOngoingTransactions.operator[](i).iNameRecord.GetName( nameFromOngoingTransactions ); |
157 iOngoingTransactions.operator[](i).iNameRecord.GetName( nameFromOngoingTransactions ); |
158 aASYCommand.iNameRecord.GetName( nameFromRequest ); |
158 aASYCommand.iNameRecord.GetName( nameFromRequest ); |
161 iOngoingTransactions.operator[](i).iCommand == aCmdId && |
161 iOngoingTransactions.operator[](i).iCommand == aCmdId && |
162 iOngoingTransactions.operator[](i).iUniqueID == aASYCommand.iGenericID.UniqueID() ) |
162 iOngoingTransactions.operator[](i).iUniqueID == aASYCommand.iGenericID.UniqueID() ) |
163 { |
163 { |
164 //Same command is under processing in ASY -> use existing trid |
164 //Same command is under processing in ASY -> use existing trid |
165 trID = iOngoingTransactions.operator[](i).iTransactionID; |
165 trID = iOngoingTransactions.operator[](i).iTransactionID; |
166 COM_TRACE_1( "[AccFW:AccServer] CAccSrvASYProxyHandler::StoreTransactionID - found trid = %d", trID ); |
166 COM_TRACE_1( "[AccFW:AccServer] CAccSrvASYProxyHandler::StoreTransactionIDL - found trid = %d", trID ); |
167 break; |
167 break; |
168 } |
168 } |
169 else |
169 else |
170 { |
170 { |
171 //keep on searching |
171 //keep on searching |
178 trID = GenerateNewTransactionID(); |
178 trID = GenerateNewTransactionID(); |
179 trIDRecord.iUniqueID = aASYCommand.iGenericID.UniqueID(); |
179 trIDRecord.iUniqueID = aASYCommand.iGenericID.UniqueID(); |
180 trIDRecord.iNameRecord = aASYCommand.iNameRecord; |
180 trIDRecord.iNameRecord = aASYCommand.iNameRecord; |
181 trIDRecord.iCommand = aASYCommand.iCmdValue; |
181 trIDRecord.iCommand = aASYCommand.iCmdValue; |
182 trIDRecord.iTransactionID = trID; |
182 trIDRecord.iTransactionID = trID; |
183 iOngoingTransactions.Append( trIDRecord ); |
183 iOngoingTransactions.AppendL( trIDRecord ); |
184 |
184 |
185 //Complete outstanding NotifyProcessCommand() |
185 //Complete outstanding NotifyProcessCommand() |
186 TRAP_IGNORE( iConnectionController->NotificationQueue().CompleteASYCmdL( |
186 TRAP_IGNORE( iConnectionController->NotificationQueue().CompleteASYCmdL( |
187 ENotifyProcessCommand, |
187 ENotifyProcessCommand, |
188 aCmdId, |
188 aCmdId, |
194 { |
194 { |
195 //No need to generate a new trid, existing is used. |
195 //No need to generate a new trid, existing is used. |
196 //This means also that ASY is not informed about this command. |
196 //This means also that ASY is not informed about this command. |
197 } |
197 } |
198 |
198 |
199 COM_TRACE_1( "[AccFW:AccServer] CAccSrvASYProxyHandler::StoreTransactionID - return %d", trID ); |
199 COM_TRACE_1( "[AccFW:AccServer] CAccSrvASYProxyHandler::StoreTransactionIDL - return %d", trID ); |
200 return trID; |
200 return trID; |
201 } |
201 } |
202 |
202 |
203 // ----------------------------------------------------------------------------- |
203 // ----------------------------------------------------------------------------- |
204 // CAccSrvASYProxyHandler::RemoveTransactionID |
204 // CAccSrvASYProxyHandler::RemoveTransactionID |
215 for ( TInt i( 0 ); i < count; ++i ) |
215 for ( TInt i( 0 ); i < count; ++i ) |
216 { |
216 { |
217 if ( iOngoingTransactions.operator[]( i ).iTransactionID == aTransactionID ) |
217 if ( iOngoingTransactions.operator[]( i ).iTransactionID == aTransactionID ) |
218 { |
218 { |
219 iOngoingTransactions.Remove( i ); |
219 iOngoingTransactions.Remove( i ); |
220 COM_TRACE_1( "[AccFW:AccServer] CAccSrvASYProxyHandler::StoreTransactionID - removed index = %d",i ); |
220 COM_TRACE_1( "[AccFW:AccServer] CAccSrvASYProxyHandler::StoreTransactionIDL - removed index = %d",i ); |
221 break; |
221 break; |
222 } |
222 } |
223 else |
223 else |
224 { |
224 { |
225 // Keep on searching. |
225 // Keep on searching. |