38 public abstract void startLogRecording();
42 public abstract void stopLogRecording();
44 public abstract void addLocationMeasurement(
GlobalPoint point,
float accuracy, String provider);
67 private final long nativeRef;
68 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
70 private CppProxy(
long nativeRef)
72 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
73 this.nativeRef = nativeRef;
76 private native
void nativeDestroy(
long nativeRef);
77 public void _djinni_private_destroy()
79 boolean destroyed = this.destroyed.getAndSet(
true);
80 if (!destroyed) nativeDestroy(this.nativeRef);
82 protected void finalize() throws
java.lang.Throwable
84 _djinni_private_destroy();
93 assert !this.destroyed.get() :
"trying to use a destroyed object";
94 native_addPositionListener(this.nativeRef, listener);
96 private native
void native_addPositionListener(
long _nativeRef,
PositionListener listener);
99 public void startLogRecording()
101 assert !this.destroyed.get() :
"trying to use a destroyed object";
102 native_startLogRecording(this.nativeRef);
104 private native
void native_startLogRecording(
long _nativeRef);
109 assert !this.destroyed.get() :
"trying to use a destroyed object";
110 native_addCheckPoint(this.nativeRef, point);
112 private native
void native_addCheckPoint(
long _nativeRef, LocationPoint point);
115 public void stopLogRecording()
117 assert !this.destroyed.get() :
"trying to use a destroyed object";
118 native_stopLogRecording(this.nativeRef);
120 private native
void native_stopLogRecording(
long _nativeRef);
123 public void addLocationMeasurement(GlobalPoint point,
float accuracy, String provider)
125 assert !this.destroyed.get() :
"trying to use a destroyed object";
126 native_addLocationMeasurement(this.nativeRef, point, accuracy, provider);
128 private native
void native_addLocationMeasurement(
long _nativeRef, GlobalPoint point,
float accuracy, String provider);
131 public void removePositionListener(PositionListener listener)
133 assert !this.destroyed.get() :
"trying to use a destroyed object";
134 native_removePositionListener(this.nativeRef, listener);
136 private native
void native_removePositionListener(
long _nativeRef, PositionListener listener);