30 public abstract void startLogRecording();
34 public abstract void stopLogRecording();
36 public abstract void addLocationMeasurement(
GlobalPoint point,
double accuracy, String provider);
49 private final long nativeRef;
50 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
52 private CppProxy(
long nativeRef)
54 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
55 this.nativeRef = nativeRef;
58 private native
void nativeDestroy(
long nativeRef);
59 public void _djinni_private_destroy()
61 boolean destroyed = this.destroyed.getAndSet(
true);
62 if (!destroyed) nativeDestroy(this.nativeRef);
64 protected void finalize() throws
java.lang.Throwable
66 _djinni_private_destroy();
75 assert !this.destroyed.get() :
"trying to use a destroyed object";
76 native_addPositionListener(this.nativeRef, listener);
78 private native
void native_addPositionListener(
long _nativeRef,
PositionListener listener);
81 public void startLogRecording()
83 assert !this.destroyed.get() :
"trying to use a destroyed object";
84 native_startLogRecording(this.nativeRef);
86 private native
void native_startLogRecording(
long _nativeRef);
91 assert !this.destroyed.get() :
"trying to use a destroyed object";
92 native_addCheckPoint(this.nativeRef, point);
94 private native
void native_addCheckPoint(
long _nativeRef, LocationPoint point);
97 public void stopLogRecording()
99 assert !this.destroyed.get() :
"trying to use a destroyed object";
100 native_stopLogRecording(this.nativeRef);
102 private native
void native_stopLogRecording(
long _nativeRef);
105 public void addLocationMeasurement(GlobalPoint point,
double accuracy, String provider)
107 assert !this.destroyed.get() :
"trying to use a destroyed object";
108 native_addLocationMeasurement(this.nativeRef, point, accuracy, provider);
110 private native
void native_addLocationMeasurement(
long _nativeRef, GlobalPoint point,
double accuracy, String provider);
113 public void removePositionListener(PositionListener listener)
115 assert !this.destroyed.get() :
"trying to use a destroyed object";
116 native_removePositionListener(this.nativeRef, listener);
118 private native
void native_removePositionListener(
long _nativeRef, PositionListener listener);