ArVpsAvailabilityFuture
An asynchronous operation checking VPS availability.
The availability of VPS in a given location helps to improve the quality of Geospatial localization and tracking accuracy. See ArSession_checkVpsAvailabilityAsync
for more details.
Summary
Enumerations
ArVpsAvailability
{
AR_VPS_AVAILABILITY_UNKNOWN
= 0,
AR_VPS_AVAILABILITY_AVAILABLE
= 1,
AR_VPS_AVAILABILITY_UNAVAILABLE
= 2,
AR_VPS_AVAILABILITY_ERROR_INTERNAL
= -1,
AR_VPS_AVAILABILITY_ERROR_NETWORK_CONNECTION
= -2,
AR_VPS_AVAILABILITY_ERROR_NOT_AUTHORIZED
= -3,
AR_VPS_AVAILABILITY_ERROR_RESOURCE_EXHAUSTED
= -4
}
ArSession_checkVpsAvailabilityAsync
, obtained by ArVpsAvailabilityFuture_getResult
or from an invocation of an ArVpsAvailabilityCallback
.Typedefs
ArVpsAvailabilityCallback
)(void *context, ArVpsAvailability availability)
struct ArVpsAvailabilityFuture_
Functions
ArVpsAvailabilityFuture_cancel
(const ArSession
*session, ArVpsAvailabilityFuture
*future, int32_t *out_was_cancelled)
void
ArVpsAvailabilityFuture_getResult
(const ArSession
*session, const ArVpsAvailabilityFuture
*future, ArVpsAvailability
*out_result_availability)
void
ArVpsAvailabilityFuture_getState
(const ArSession
*session, const ArVpsAvailabilityFuture
*future, ArFutureState
*out_state)
void
void
Enumerations
ArVpsAvailability
ArVpsAvailability
The result of ArSession_checkVpsAvailabilityAsync
, obtained by ArVpsAvailabilityFuture_getResult
or from an invocation of an ArVpsAvailabilityCallback
.
VPS is available at the requested location.
An internal error occurred while determining availability.
The external service could not be reached due to a network connection error.
An authorization error occurred when communicating with the Google Cloud ARCore API.
See Enable the Geospatial API for troubleshooting steps.
Too many requests were sent.
VPS is not available at the requested location.
The request to the remote service is not yet completed, so the availability is not yet known.
Typedefs
ArCheckVpsAvailabilityCallback
ArVpsAvailabilityCallback ArCheckVpsAvailabilityCallback
Deprecated alias of ArVpsAvailabilityCallback
.
Deprecated.
Deprecated in release 1.37.0. Use ArVpsAvailabilityCallback
instead.
ArVpsAvailabilityCallback
void(* ArVpsAvailabilityCallback)(void *context, ArVpsAvailability availability)
Callback definition for ArSession_checkVpsAvailabilityAsync
.
The context
argument will be the same as that passed to ArSession_checkVpsAvailabilityAsync
. The availability
argument will be the same as the result obtained from the future returned by ArSession_checkVpsAvailabilityAsync
.
It is a best practice to free context
memory provided to ArSession_checkVpsAvailabilityAsync
at the end of the callback implementation.
ArVpsAvailabilityFuture
struct ArVpsAvailabilityFuture_ ArVpsAvailabilityFuture
Handle to an asynchronous operation launched by ArSession_checkVpsAvailabilityAsync
.
Release with ArFuture_release
. ( reference type, long-lived
).
Functions
ArVpsAvailabilityFuture_cancel
void ArVpsAvailabilityFuture_cancel ( const ArSession * session , ArVpsAvailabilityFuture * future , int32_t * out_was_cancelled )
Tries to cancel execution of this operation.
out_was_cancelled
will be set to 1 if the operation was cancelled by this invocation, and in that case it is a best practice to free context
memory provided to ArSession_checkVpsAvailabilityAsync
.
session
|
The ARCore session.
|
future
|
The handle for the asynchronous operation.
|
out_was_cancelled
|
Set to 1 if this invocation successfully cancelled the operation, 0 otherwise. This may be null.
|
ArVpsAvailabilityFuture_getResult
void ArVpsAvailabilityFuture_getResult ( const ArSession * session , const ArVpsAvailabilityFuture * future , ArVpsAvailability * out_result_availability )
Returns the result of an asynchronous operation.
The returned result is only valid when ArFuture_getState
returns AR_FUTURE_STATE_DONE
.
session
|
The ARCore session.
|
future
|
The handle for the asynchronous operation.
|
out_result_availability
|
ArVpsAvailabilityFuture_getState
void ArVpsAvailabilityFuture_getState ( const ArSession * session , const ArVpsAvailabilityFuture * future , ArFutureState * out_state )
Gets the state of an asynchronous operation.
session
|
The ARCore session.
|
future
|
The handle for the asynchronous operation.
|
out_state
|
The state of the operation.
|
ArVpsAvailabilityFuture_release
void ArVpsAvailabilityFuture_release( ArVpsAvailabilityFuture *future )
Releases a reference to a future.
This does not mean that the operation will be terminated - see ArFuture_cancel
.
This function may safely be called with NULL
- it will do nothing.