18public abstract class Wifi {
103 private static final class CppProxy
extends Wifi
105 private final long nativeRef;
106 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
108 private CppProxy(
long nativeRef)
110 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
111 this.nativeRef = nativeRef;
114 private native
void nativeDestroy(
long nativeRef);
115 public void _djinni_private_destroy()
117 boolean destroyed = this.destroyed.getAndSet(
true);
118 if (!destroyed) nativeDestroy(this.nativeRef);
120 protected void finalize() throws
java.lang.Throwable
122 _djinni_private_destroy();
129 public Point getPoint()
131 assert !this.destroyed.get() :
"trying to use a destroyed object";
132 return native_getPoint(this.nativeRef);
134 private native
Point native_getPoint(
long _nativeRef);
137 public int getLocationId()
139 assert !this.destroyed.get() :
"trying to use a destroyed object";
140 return native_getLocationId(this.nativeRef);
142 private native
int native_getLocationId(
long _nativeRef);
145 public int getSublocationId()
147 assert !this.destroyed.get() :
"trying to use a destroyed object";
148 return native_getSublocationId(this.nativeRef);
150 private native
int native_getSublocationId(
long _nativeRef);
153 public String getName()
155 assert !this.destroyed.get() :
"trying to use a destroyed object";
156 return native_getName(this.nativeRef);
158 private native String native_getName(
long _nativeRef);
161 public String getMac()
163 assert !this.destroyed.get() :
"trying to use a destroyed object";
164 return native_getMac(this.nativeRef);
166 private native String native_getMac(
long _nativeRef);
169 public TransmitterStatus getStatus()
171 assert !this.destroyed.get() :
"trying to use a destroyed object";
172 return native_getStatus(this.nativeRef);
174 private native TransmitterStatus native_getStatus(
long _nativeRef);