public abstract class LocationAccessController extends Object
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static interface |
LocationAccessController.Response |
Responds to the request to access geographical location information.
|
| 构造器 | 说明 |
|---|---|
LocationAccessController() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
abstract void |
checkOriginAllowed(String origin,
AsyncCallback<Boolean> callback) |
Obtains the asynchronous callback indicating whether the specified origin is allowed to access the geographical
location information.
|
abstract void |
disallowAll() |
Prohibits all origins from accessing the geographical location information.
|
abstract void |
getAllOrigins(AsyncCallback<Set<String>> callback) |
Obtains the asynchronous callback containing all origins.
|
static LocationAccessController |
getInstance() |
Obtains a singleton
LocationAccessController instance. |
abstract void |
setOriginAllow(String origin,
boolean isAllow) |
Sets whether the specified origin is allowed to access the geographical location information.
|
public static LocationAccessController getInstance()
LocationAccessController instance.LocationAccessController instance.public abstract void setOriginAllow(String origin, boolean isAllow)
origin - Indicates the specified origin.isAllow - Specifies whether the origin is allowed to access the geographical location information. Value
true indicates that the origin is allowed to access the geographical location information, and
false indicates the opposite.public abstract void disallowAll()
public abstract void checkOriginAllowed(String origin, AsyncCallback<Boolean> callback)
origin - Indicates the specified origin.callback - Indicates the asynchronous callback object.public abstract void getAllOrigins(AsyncCallback<Set<String>> callback)
callback - Indicates the asynchronous callback object.