370 mServiceSearchStatus); |
370 mServiceSearchStatus); |
371 return mServiceSearchStatus; |
371 return mServiceSearchStatus; |
372 } |
372 } |
373 |
373 |
374 int DiscoveryAgent::PopulateServiceRecordAttrValue(JNIEnv* aJni, |
374 int DiscoveryAgent::PopulateServiceRecordAttrValue(JNIEnv* aJni, |
375 jobject& aPeer, TInt64 aRemoteAddress, long aHandle, |
375 TInt64 aRemoteAddress, long aHandle, |
376 TPtrC16 aAttrIdsDes, jobject aServiceRecordImpl, |
376 TPtrC16 aAttrIdsDes, jobject aServiceRecordImpl, |
377 java::util::Monitor* aMonitor) |
377 java::util::Monitor* aMonitor) |
378 { |
378 { |
379 JELOG2(EJavaBluetooth); |
379 JELOG2(EJavaBluetooth); |
380 |
380 |
381 mServiceSearchMonitor = aMonitor; |
381 mServiceSearchMonitor = aMonitor; |
382 |
|
383 jclass peerClass = (*aJni).GetObjectClass(aPeer); |
|
384 |
382 |
385 LOG(EJavaBluetooth, EInfo, |
383 LOG(EJavaBluetooth, EInfo, |
386 " DiscoveryAgent::PopulateServiceRecord: Starting populating service records "); |
384 " DiscoveryAgent::PopulateServiceRecord: Starting populating service records "); |
387 TRAPD(err, CallMethodL(this, |
385 TRAPD(err, CallMethodL(this, |
388 &java::bluetooth::DiscoveryAgent::populateServiceRecordAttrValueFs, |
386 &java::bluetooth::DiscoveryAgent::populateServiceRecordAttrValueFsL, |
389 aRemoteAddress, aHandle, aAttrIdsDes, aServiceRecordImpl, |
387 aRemoteAddress, aHandle, aAttrIdsDes, aServiceRecordImpl, |
390 mFunctionServer)); |
388 mFunctionServer)); |
391 |
389 |
392 return err; |
390 return err; |
393 } |
391 } |
394 |
392 |
395 void DiscoveryAgent::populateServiceRecordAttrValueFs(TInt64 aRemoteAddress, |
393 void DiscoveryAgent::populateServiceRecordAttrValueFsL(TInt64 aRemoteAddress, |
396 long aHandle, TPtrC16 aAttrIdsDes, jobject aServiceRecordImpl) |
394 long aHandle, TPtrC16 aAttrIdsDes, jobject aServiceRecordImpl) |
397 { |
395 { |
398 mServiceSearcher = BluetoothServiceSearcher::New(this, mFunctionServer); |
396 mServiceSearcher = BluetoothServiceSearcher::New(this, mFunctionServer); |
399 mServiceSearcher->PopulateServiceRecordsL(aRemoteAddress, aHandle, |
397 mServiceSearcher->PopulateServiceRecordsL(aRemoteAddress, aHandle, |
400 aAttrIdsDes, aServiceRecordImpl); |
398 aAttrIdsDes, aServiceRecordImpl); |