88 public abstract String
addBeaconGenerator(String uuid,
int major,
int minor,
int power,
int timeout,
int rssiMin,
int rssiMax);
110 public abstract String
addEddystoneGenerator(String namespaceId, String instanceId,
int power,
int timeout,
int rssiMin,
int rssiMax);
161 public abstract String
addWifiGenerator(String mac,
int timeout,
int rssiMin,
int rssiMax);
216 public abstract String
addWifiRttGenerator(String mac,
int timeout,
int distMin,
int distMax,
int stdDevMin,
int stdDevMax,
int rssiMin,
int rssiMax);
270 public abstract String
addLocationGenerator(
double latMin,
double latMax,
double lonMin,
double lonMax,
float accMin,
float accMax,
int timeout);
305 private final long nativeRef;
306 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
308 private CppProxy(
long nativeRef)
310 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
311 this.nativeRef = nativeRef;
314 private native
void nativeDestroy(
long nativeRef);
315 public void _djinni_private_destroy()
317 boolean destroyed = this.destroyed.getAndSet(
true);
318 if (!destroyed) nativeDestroy(this.nativeRef);
320 protected void finalize() throws
java.lang.Throwable
322 _djinni_private_destroy();
331 assert !this.destroyed.get() :
"trying to use a destroyed object";
332 native_addMeasurementListener(this.nativeRef, listener);
334 private native
void native_addMeasurementListener(
long _nativeRef,
MeasurementListener listener);
339 assert !this.destroyed.get() :
"trying to use a destroyed object";
340 native_removeMeasurementListener(this.nativeRef, listener);
342 private native
void native_removeMeasurementListener(
long _nativeRef,
MeasurementListener listener);
345 public void setPublishIntervalMs(
int intervalMs)
347 assert !this.destroyed.get() :
"trying to use a destroyed object";
348 native_setPublishIntervalMs(this.nativeRef, intervalMs);
350 private native
void native_setPublishIntervalMs(
long _nativeRef,
int intervalMs);
353 public String addBeaconGenerator(String uuid,
int major,
int minor,
int power,
int timeout,
int rssiMin,
int rssiMax)
355 assert !this.destroyed.get() :
"trying to use a destroyed object";
356 return native_addBeaconGenerator(this.nativeRef, uuid, major, minor, power, timeout, rssiMin, rssiMax);
358 private native String native_addBeaconGenerator(
long _nativeRef, String uuid,
int major,
int minor,
int power,
int timeout,
int rssiMin,
int rssiMax);
361 public String addEddystoneGenerator(String namespaceId, String instanceId,
int power,
int timeout,
int rssiMin,
int rssiMax)
363 assert !this.destroyed.get() :
"trying to use a destroyed object";
364 return native_addEddystoneGenerator(this.nativeRef, namespaceId, instanceId, power, timeout, rssiMin, rssiMax);
366 private native String native_addEddystoneGenerator(
long _nativeRef, String namespaceId, String instanceId,
int power,
int timeout,
int rssiMin,
int rssiMax);
369 public void removeBleGenerators()
371 assert !this.destroyed.get() :
"trying to use a destroyed object";
372 native_removeBleGenerators(this.nativeRef);
374 private native
void native_removeBleGenerators(
long _nativeRef);
377 public void removeBleGenerator(String
id)
379 assert !this.destroyed.get() :
"trying to use a destroyed object";
380 native_removeBleGenerator(this.nativeRef,
id);
382 private native
void native_removeBleGenerator(
long _nativeRef, String
id);
385 public String addWifiGenerator(String mac,
int timeout,
int rssiMin,
int rssiMax)
387 assert !this.destroyed.get() :
"trying to use a destroyed object";
388 return native_addWifiGenerator(this.nativeRef, mac, timeout, rssiMin, rssiMax);
390 private native String native_addWifiGenerator(
long _nativeRef, String mac,
int timeout,
int rssiMin,
int rssiMax);
393 public void removeWifiGenerator(String
id)
395 assert !this.destroyed.get() :
"trying to use a destroyed object";
396 native_removeWifiGenerator(this.nativeRef,
id);
398 private native
void native_removeWifiGenerator(
long _nativeRef, String
id);
401 public void removeWifiGenerators()
403 assert !this.destroyed.get() :
"trying to use a destroyed object";
404 native_removeWifiGenerators(this.nativeRef);
406 private native
void native_removeWifiGenerators(
long _nativeRef);
409 public String addWifiRttGenerator(String mac,
int timeout,
int distMin,
int distMax,
int stdDevMin,
int stdDevMax,
int rssiMin,
int rssiMax)
411 assert !this.destroyed.get() :
"trying to use a destroyed object";
412 return native_addWifiRttGenerator(this.nativeRef, mac, timeout, distMin, distMax, stdDevMin, stdDevMax, rssiMin, rssiMax);
414 private native String native_addWifiRttGenerator(
long _nativeRef, String mac,
int timeout,
int distMin,
int distMax,
int stdDevMin,
int stdDevMax,
int rssiMin,
int rssiMax);
417 public void removeWifiRttGenerator(String hash)
419 assert !this.destroyed.get() :
"trying to use a destroyed object";
420 native_removeWifiRttGenerator(this.nativeRef, hash);
422 private native
void native_removeWifiRttGenerator(
long _nativeRef, String hash);
425 public void removeWifiRttGenerators()
427 assert !this.destroyed.get() :
"trying to use a destroyed object";
428 native_removeWifiRttGenerators(this.nativeRef);
430 private native
void native_removeWifiRttGenerators(
long _nativeRef);
433 public String addLocationGenerator(
double latMin,
double latMax,
double lonMin,
double lonMax,
float accMin,
float accMax,
int timeout)
435 assert !this.destroyed.get() :
"trying to use a destroyed object";
436 return native_addLocationGenerator(this.nativeRef, latMin, latMax, lonMin, lonMax, accMin, accMax, timeout);
438 private native String native_addLocationGenerator(
long _nativeRef,
double latMin,
double latMax,
double lonMin,
double lonMax,
float accMin,
float accMax,
int timeout);
441 public void removeLocationGenerator(String
id)
443 assert !this.destroyed.get() :
"trying to use a destroyed object";
444 native_removeLocationGenerator(this.nativeRef,
id);
446 private native
void native_removeLocationGenerator(
long _nativeRef, String
id);
449 public void removeLocationGenerators()
451 assert !this.destroyed.get() :
"trying to use a destroyed object";
452 native_removeLocationGenerators(this.nativeRef);
454 private native
void native_removeLocationGenerators(
long _nativeRef);