18public abstract class Wifi {
109 private static final class CppProxy
extends Wifi
111 private final long nativeRef;
112 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
114 private CppProxy(
long nativeRef)
116 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
117 this.nativeRef = nativeRef;
120 private native
void nativeDestroy(
long nativeRef);
121 public void _djinni_private_destroy()
123 boolean destroyed = this.destroyed.getAndSet(
true);
124 if (!destroyed) nativeDestroy(this.nativeRef);
126 protected void finalize() throws
java.lang.Throwable
128 _djinni_private_destroy();
135 public Point getPoint()
137 assert !this.destroyed.get() :
"trying to use a destroyed object";
138 return native_getPoint(this.nativeRef);
140 private native
Point native_getPoint(
long _nativeRef);
143 public int getLocationId()
145 assert !this.destroyed.get() :
"trying to use a destroyed object";
146 return native_getLocationId(this.nativeRef);
148 private native
int native_getLocationId(
long _nativeRef);
151 public int getSublocationId()
153 assert !this.destroyed.get() :
"trying to use a destroyed object";
154 return native_getSublocationId(this.nativeRef);
156 private native
int native_getSublocationId(
long _nativeRef);
159 public String getName()
161 assert !this.destroyed.get() :
"trying to use a destroyed object";
162 return native_getName(this.nativeRef);
164 private native String native_getName(
long _nativeRef);
167 public String getMac()
169 assert !this.destroyed.get() :
"trying to use a destroyed object";
170 return native_getMac(this.nativeRef);
172 private native String native_getMac(
long _nativeRef);
175 public TransmitterStatus getStatus()
177 assert !this.destroyed.get() :
"trying to use a destroyed object";
178 return native_getStatus(this.nativeRef);
180 private native TransmitterStatus native_getStatus(
long _nativeRef);