38 public abstract void startLogRecording();
42 public abstract void stopLogRecording();
44 public abstract void addLocationMeasurement(
GlobalPoint point,
float accuracy, String provider);
65 private final long nativeRef;
66 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
68 private CppProxy(
long nativeRef)
70 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
71 this.nativeRef = nativeRef;
74 private native
void nativeDestroy(
long nativeRef);
75 public void _djinni_private_destroy()
77 boolean destroyed = this.destroyed.getAndSet(
true);
78 if (!destroyed) nativeDestroy(this.nativeRef);
80 protected void finalize() throws
java.lang.Throwable
82 _djinni_private_destroy();
91 assert !this.destroyed.get() :
"trying to use a destroyed object";
92 native_addPositionListener(this.nativeRef, listener);
94 private native
void native_addPositionListener(
long _nativeRef,
PositionListener listener);
97 public void startLogRecording()
99 assert !this.destroyed.get() :
"trying to use a destroyed object";
100 native_startLogRecording(this.nativeRef);
102 private native
void native_startLogRecording(
long _nativeRef);
107 assert !this.destroyed.get() :
"trying to use a destroyed object";
108 native_addCheckPoint(this.nativeRef, point);
110 private native
void native_addCheckPoint(
long _nativeRef, LocationPoint point);
113 public void stopLogRecording()
115 assert !this.destroyed.get() :
"trying to use a destroyed object";
116 native_stopLogRecording(this.nativeRef);
118 private native
void native_stopLogRecording(
long _nativeRef);
121 public void addLocationMeasurement(GlobalPoint point,
float accuracy, String provider)
123 assert !this.destroyed.get() :
"trying to use a destroyed object";
124 native_addLocationMeasurement(this.nativeRef, point, accuracy, provider);
126 private native
void native_addLocationMeasurement(
long _nativeRef, GlobalPoint point,
float accuracy, String provider);
129 public void removePositionListener(PositionListener listener)
131 assert !this.destroyed.get() :
"trying to use a destroyed object";
132 native_removePositionListener(this.nativeRef, listener);
134 private native
void native_removePositionListener(
long _nativeRef, PositionListener listener);