Loading...
Searching...
No Matches
LocationManagerBinding.java
Go to the documentation of this file.
1package com.navigine.idl.java.internal;
2
3import com.navigine.common.NativeObject;
4import com.navigine.common.Subscription;
5import com.navigine.idl.java.LocationListener;
6import com.navigine.idl.java.LocationManager;
7
13{
14 private final NativeObject nativeObject;
15
19 protected LocationManagerBinding(NativeObject nativeObject)
20 {
21 this.nativeObject = nativeObject;
22 }
23
24 protected Subscription<LocationListener> weakLocationListenerSubscription = new Subscription<LocationListener>() {
25 @Override
26 public NativeObject createNativeListener(LocationListener listener) {
27 return createLocationListener(listener);
28 }
29 };
30 private static native NativeObject createLocationListener(LocationListener listener);
31
32 // LocationManager methods
33
34 @Override
36 {
37 native_addLocationListener(listener);
38 }
39 private native void native_addLocationListener(LocationListener listener);
40
41 @Override
43 {
44 native_removeLocationListener(listener);
45 }
46 private native void native_removeLocationListener(LocationListener listener);
47
48 @Override
49 public void setLocationId(int locationId)
50 {
51 native_setLocationId(locationId);
52 }
53 private native void native_setLocationId(int locationId);
54
55 @Override
56 public int getLocationId()
57 {
58 return native_getLocationId();
59 }
60 private native int native_getLocationId();
61
62 @Override
63 public void commitChanges()
64 {
65 native_commitChanges();
66 }
67 private native void native_commitChanges();
68
69 @Override
70 public void revertChanges()
71 {
72 native_revertChanges();
73 }
74 private native void native_revertChanges();
75
76 @Override
77 public void setLocationUpdateInterval(int interval)
78 {
79 native_setLocationUpdateInterval(interval);
80 }
81 private native void native_setLocationUpdateInterval(int interval);
82}