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
}
enum

Typedefs

ArCheckVpsAvailabilityCallback typedef Deprecated. Deprecated in release 1.37.0. Use ArVpsAvailabilityCallback instead.
Deprecated alias of ArVpsAvailabilityCallback.
ArVpsAvailabilityCallback)(void *context, ArVpsAvailability availability) typedef
void(*
Callback definition for ArSession_checkVpsAvailabilityAsync.
ArVpsAvailabilityFuture typedef
struct ArVpsAvailabilityFuture_
Handle to an asynchronous operation launched by ArSession_checkVpsAvailabilityAsync.

Functions

ArVpsAvailabilityFuture_cancel(const ArSession *session, ArVpsAvailabilityFuture *future, int32_t *out_was_cancelled)
void
Tries to cancel execution of this operation.
ArVpsAvailabilityFuture_getResult(const ArSession *session, const ArVpsAvailabilityFuture *future, ArVpsAvailability *out_result_availability)
void
Returns the result of an asynchronous operation.
ArVpsAvailabilityFuture_getState(const ArSession *session, const ArVpsAvailabilityFuture *future, ArFutureState *out_state)
void
Gets the state of an asynchronous operation.
ArVpsAvailabilityFuture_release(ArVpsAvailabilityFuture *future)
void
Releases a reference to a future.

Enumerations

ArVpsAvailability

 ArVpsAvailability

The result of ArSession_checkVpsAvailabilityAsync, obtained by ArVpsAvailabilityFuture_getResult or from an invocation of an ArVpsAvailabilityCallback.

Properties
AR_VPS_AVAILABILITY_AVAILABLE

VPS is available at the requested location.

AR_VPS_AVAILABILITY_ERROR_INTERNAL

An internal error occurred while determining availability.

AR_VPS_AVAILABILITY_ERROR_NETWORK_CONNECTION

The external service could not be reached due to a network connection error.

AR_VPS_AVAILABILITY_ERROR_NOT_AUTHORIZED

An authorization error occurred when communicating with the Google Cloud ARCore API.

See Enable the Geospatial API for troubleshooting steps.

AR_VPS_AVAILABILITY_ERROR_RESOURCE_EXHAUSTED

Too many requests were sent.

AR_VPS_AVAILABILITY_UNAVAILABLE

VPS is not available at the requested location.

AR_VPS_AVAILABILITY_UNKNOWN

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.

Details
Parameters
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.

Details
Parameters
session
The ARCore session.
future
The handle for the asynchronous operation.
out_result_availability
The result of the operation, if the Future's state is AR_FUTURE_STATE_DONE.

ArVpsAvailabilityFuture_getState

void ArVpsAvailabilityFuture_getState(
  const ArSession *session,
  const ArVpsAvailabilityFuture *future,
  ArFutureState *out_state
)

Gets the state of an asynchronous operation.

Details
Parameters
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.