localconnectivityservice/obexsendservices/obexservicesendutils/src/BTSOPPController.cpp
equal
deleted
inserted
replaced
158 // |
158 // |
159 void CBTSOPPController::Send() |
159 void CBTSOPPController::Send() |
160 { |
160 { |
161 FLOG(_L("[BTSS]\t CBTSOPPController::Send()")); |
161 FLOG(_L("[BTSS]\t CBTSOPPController::Send()")); |
162 |
162 |
|
163 TInt error(KErrNone); |
163 |
164 |
164 if ( iListPtr->ObjectCount() > 0 && iFileIndex < iListPtr->ObjectCount() ) |
165 if ( iListPtr->ObjectCount() > 0 && iFileIndex < iListPtr->ObjectCount() ) |
165 { |
166 { |
166 RArray<CObexHeader*> headerList; // the array does not need to be closed |
167 RArray<CObexHeader*> headerList; // the array does not need to be closed |
167 TRAPD( error, iClient->PutObjectL( headerList, iListPtr->ObjectAtL( iFileIndex ) )); |
168 |
|
169 TRAP( error, { |
|
170 UpdateProgressNoteL(); |
|
171 iClient->PutObjectL( headerList, iListPtr->ObjectAtL( iFileIndex )); }); |
168 |
172 |
169 if ( error ) |
173 if ( error ) |
170 { |
174 { |
171 FTRACE(FPrint(_L("[BTSU]\t CBTSOPPController::Send() putting leaved with %d"), error )); |
175 FTRACE(FPrint(_L("[BTSU]\t CBTSOPPController::Send() putting leaved with %d"), error )); |
172 iObserverPtr->ControllerComplete( EBTSPuttingFailed ); |
176 iObserverPtr->ControllerComplete( EBTSPuttingFailed ); |
212 { |
216 { |
213 iListPtr->AddObjectL( imgparam.iFile); |
217 iListPtr->AddObjectL( imgparam.iFile); |
214 } |
218 } |
215 } |
219 } |
216 } |
220 } |
217 iObserverPtr->LaunchProgressNoteL( iClient, iListPtr->ObjectListSizeL() ); |
221 iObserverPtr->LaunchProgressNoteL( iClient, iListPtr->ObjectListSizeL(),iListPtr->ObjectCount() ); |
218 iFileIndex = 0; |
222 iFileIndex = 0; |
|
223 UpdateProgressNoteL(); |
219 Send(); |
224 Send(); |
220 } |
225 } |
221 |
226 |
|
227 |
|
228 void CBTSOPPController::UpdateProgressNoteL() |
|
229 { |
|
230 TInt size; |
|
231 RBuf filename; |
|
232 iListPtr->ObjectAtL( iFileIndex ).Size(size); |
|
233 filename.CreateL(255); |
|
234 iListPtr->ObjectAtL( iFileIndex ).Name(filename); |
|
235 iObserverPtr->UpdateProgressNoteL(size,iFileIndex,filename); |
|
236 filename.Close(); |
|
237 } |
|
238 |
222 // End of File |
239 // End of File |