# ArResolveAnchorOnRooftopFuture

Handle to an async operation launched by `https://developers.google.com/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync`.

See the [Rooftop anchors developer guide](https://developers.google.com/ar/develop/geospatial/c/anchors#rooftop-anchors) for more information.

## Summary

| ### Typedefs ||
|---|---|
| `https://developers.google.com/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopcallback)(void *context, ArAnchor *anchor, ArRooftopAnchorState rooftop_anchor_state)` | typedef `void(*` Callback definition for `https://developers.google.com/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync`. |
| `https://developers.google.com/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture` | typedef `struct ArResolveAnchorOnRooftopFuture_` Handle to an asynchronous operation launched by `https://developers.google.com/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync`. |

| ### Functions ||
|---|---|
| `https://developers.google.com/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture_acquireresultanchor(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, const https://developers.google.com/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture *future, https://developers.google.com/ar/reference/c/group/ar-anchor#aranchor **out_anchor)` | `void` Gets the resolved Rooftop anchor. |
| `https://developers.google.com/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture_getresultrooftopanchorstate(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, const https://developers.google.com/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture *future, https://developers.google.com/ar/reference/c/group/ar-anchor#arrooftopanchorstate *out_rooftop_anchor_state)` | `void` Gets the result status of the resolving operation, if the operation is done. |

## Typedefs

### ArResolveAnchorOnRooftopCallback

```
void(* ArResolveAnchorOnRooftopCallback)(void *context, ArAnchor *anchor, ArRooftopAnchorState rooftop_anchor_state)
```
Callback definition for `https://developers.google.com/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync`.

The `context` argument will be the same as that passed to `https://developers.google.com/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync`. The `anchor` argument will be the same as that returned by `https://developers.google.com/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture_acquireresultanchor` and must be released using `https://developers.google.com/ar/reference/c/group/ar-anchor#aranchor_release`. The `rooftop_anchor_state` argument will be the same as that returned by `https://developers.google.com/ar/reference/c/group/ar-resolve-anchor-on-rooftop-future#arresolveanchoronrooftopfuture_getresultrooftopanchorstate`.

It is a best practice to free `context` memory provided to `https://developers.google.com/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync` at the end of the callback implementation.

### ArResolveAnchorOnRooftopFuture

```
struct ArResolveAnchorOnRooftopFuture_ ArResolveAnchorOnRooftopFuture
```
Handle to an asynchronous operation launched by `https://developers.google.com/ar/reference/c/group/ar-earth#arearth_resolveanchoronrooftopasync`.

Release with `https://developers.google.com/ar/reference/c/group/ar-future#arfuture_release`. ([reference type, long-lived](https://developers.google.com/ar/reference/c/group/concepts#object-ownership)).

## Functions

### ArResolveAnchorOnRooftopFuture_acquireResultAnchor

```
void ArResolveAnchorOnRooftopFuture_acquireResultAnchor(
  const ArSession *session,
  const ArResolveAnchorOnRooftopFuture *future,
  ArAnchor **out_anchor
)
```
Gets the resolved Rooftop anchor.

If the operation isn't done yet or the operation failed, this will be `NULL`. The caller must release the anchor using `https://developers.google.com/ar/reference/c/group/ar-anchor#aranchor_release`.


Details Parameters `session` The ARCore session. `future` The handle for the asynchronous operation. `out_anchor` The anchor.

### ArResolveAnchorOnRooftopFuture_getResultRooftopAnchorState

```
void ArResolveAnchorOnRooftopFuture_getResultRooftopAnchorState(
  const ArSession *session,
  const ArResolveAnchorOnRooftopFuture *future,
  ArRooftopAnchorState *out_rooftop_anchor_state
)
```
Gets the result status of the resolving operation, if the operation is done.


Details Parameters `session` The ARCore session. `future` The handle for the asynchronous operation. `out_rooftop_anchor_state` The result status.