18public abstract class Wifi {
49 private static final class CppProxy
extends Wifi
51 private final long nativeRef;
52 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
54 private CppProxy(
long nativeRef)
56 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
57 this.nativeRef = nativeRef;
60 private native
void nativeDestroy(
long nativeRef);
61 public void _djinni_private_destroy()
63 boolean destroyed = this.destroyed.getAndSet(
true);
64 if (!destroyed) nativeDestroy(this.nativeRef);
66 protected void finalize() throws
java.lang.Throwable
68 _djinni_private_destroy();
75 public Point getPoint()
77 assert !this.destroyed.get() :
"trying to use a destroyed object";
78 return native_getPoint(this.nativeRef);
80 private native
Point native_getPoint(
long _nativeRef);
83 public int getLocationId()
85 assert !this.destroyed.get() :
"trying to use a destroyed object";
86 return native_getLocationId(this.nativeRef);
88 private native
int native_getLocationId(
long _nativeRef);
91 public int getSublocationId()
93 assert !this.destroyed.get() :
"trying to use a destroyed object";
94 return native_getSublocationId(this.nativeRef);
96 private native
int native_getSublocationId(
long _nativeRef);
99 public String getName()
101 assert !this.destroyed.get() :
"trying to use a destroyed object";
102 return native_getName(this.nativeRef);
104 private native String native_getName(
long _nativeRef);
107 public String getMac()
109 assert !this.destroyed.get() :
"trying to use a destroyed object";
110 return native_getMac(this.nativeRef);
112 private native String native_getMac(
long _nativeRef);
115 public TransmitterStatus getStatus()
117 assert !this.destroyed.get() :
"trying to use a destroyed object";
118 return native_getStatus(this.nativeRef);
120 private native TransmitterStatus native_getStatus(
long _nativeRef);