Skip to main content
Version: 0.9.0

Target Apps

Functions Index​

static QarResultqar_session_invite_target_app (QarSession *session, const QarSessionInviteTargetAppInit *init, qar_progress_callback_t on_progress, void *progress_state, QarCancelToken *cancel, QarPeerId *out_peer)

Ask this machine's hub to start the target app for one AR device. More...

static QarResultqar_session_invite_target_app_async (QarSession *session, const QarSessionInviteTargetAppInit *init, qar_target_app_invite_result_callback_t result_callback, qar_progress_callback_t update_callback, void *user_state, QarCancelToken *cancel)

Ask this machine's hub to start the target app for one AR device. More...

static QarResultqar_session_kill_target_app (QarSession *session, const QarPeerId *target_app, qar_progress_callback_t on_progress, void *progress_state, QarCancelToken *cancel)

Ask this machine's hub to stop a target app it started. More...

static QarResultqar_session_kill_target_app_async (QarSession *session, const QarPeerId *target_app, qar_target_app_kill_result_callback_t result_callback, qar_progress_callback_t update_callback, void *user_state, QarCancelToken *cancel)

Ask this machine's hub to stop a target app it started. More...

static QarResultqar_target_app_connection_string_android (const char *host, char *buffer, size_t buffer_size)

Build the connection string for an Android streamer target app. More...

static QarResultqar_target_app_connection_string_hololens (const char *host, char *buffer, size_t buffer_size)

Build the connection string for a HoloLens target app. More...

static QarResultqar_target_app_connection_string_quest (const char *host, char *buffer, size_t buffer_size)

Build the connection string for a Meta Quest target app. More...

Description​

Starting and stopping the target app for one AR device. A target app is the process a hub runs on this machine to drive a HoloLens or an Android headset; the hub owns its whole lifecycle, and these calls ask the hub to act.

Two rules hold for every call in this group.

  • Only this machine's hub answers. Both the invite and the kill carry this machine's hardware id, and every other hub in the session ignores them. An application can start and stop target apps on its own hub and no other. An operator working in the QAROS Visualizer can reach any hub; an application cannot, by construction.
  • An invite is one-time. The hub remembers the device so it shows up in the visualizer's device list, but never marks it for automatic re-invite. Only an operator in the visualizer can do that.

A device is served by one hub at a time. Inviting a device that another hub is already hosting stops it there first, then starts it here.

Functions​

qar_session_invite_target_app()​

QarResult qar_session_invite_target_app (QarSession * session, const QarSessionInviteTargetAppInit * init, qar_progress_callback_t on_progress, void * progress_state, QarCancelToken * cancel, QarPeerId * out_peer)
inline static

Ask this machine's hub to start the target app for one AR device.

Blocking form of qar_session_invite_target_app_async. Returns once the hub has started the target app and its peer has joined the session.

Parameters
session

Active session handle.

init

Invite parameters; see QarSessionInviteTargetAppInit.

on_progress

Optional progress callback (can be NULL). Never fires after this call returns.

progress_state

User pointer passed to on_progress unchanged.

cancel

Optional cancellation token (can be NULL).

out_peer

Receives the target app's peer id. Untouched on failure.

Return Values
QAR_STATUS_ARGUMENT_NOT_SUPPORTED

the connection string is malformed, or names a device kind that cannot be invited - rebuild it with a qar_target_app_connection_string_* helper.

Definition at line 2684 of file qar_streaming.h.

qar_session_invite_target_app_async()​

QarResult qar_session_invite_target_app_async (QarSession * session, const QarSessionInviteTargetAppInit * init, qar_target_app_invite_result_callback_t result_callback, qar_progress_callback_t update_callback, void * user_state, QarCancelToken * cancel)
inline static

Ask this machine's hub to start the target app for one AR device.

Parameters
session

Active session handle.

init

Invite parameters; see QarSessionInviteTargetAppInit.

result_callback

Fires exactly once with the outcome. Required.

update_callback

Optional progress callback (can be NULL).

user_state

User pointer passed to both callbacks unchanged.

cancel

Optional cancellation token (can be NULL).

Definition at line 2702 of file qar_streaming.h.

qar_session_kill_target_app()​

QarResult qar_session_kill_target_app (QarSession * session, const QarPeerId * target_app, qar_progress_callback_t on_progress, void * progress_state, QarCancelToken * cancel)
inline static

Ask this machine's hub to stop a target app it started.

Stops the target app and the whole streaming pipeline feeding it. A request for a target app this machine's hub did not start is not served by any hub, so it ends in a timeout rather than an authorization error - there is deliberately no way for an application to learn about, or act on, another hub's target apps.

Parameters
session

Active session handle.

target_app

Peer id returned by qar_session_invite_target_app.

on_progress

Optional progress callback (can be NULL).

progress_state

User pointer passed to on_progress unchanged.

cancel

Optional cancellation token (can be NULL).

Definition at line 2726 of file qar_streaming.h.

qar_session_kill_target_app_async()​

QarResult qar_session_kill_target_app_async (QarSession * session, const QarPeerId * target_app, qar_target_app_kill_result_callback_t result_callback, qar_progress_callback_t update_callback, void * user_state, QarCancelToken * cancel)
inline static

Ask this machine's hub to stop a target app it started.

Parameters
session

Active session handle.

target_app

Peer id returned by qar_session_invite_target_app.

result_callback

Fires exactly once with the outcome. Required.

update_callback

Optional progress callback (can be NULL).

user_state

User pointer passed to both callbacks unchanged.

cancel

Optional cancellation token (can be NULL).

Definition at line 2743 of file qar_streaming.h.

qar_target_app_connection_string_android()​

QarResult qar_target_app_connection_string_android (const char * host, char * buffer, size_t buffer_size)
inline static

Build the connection string for an Android streamer target app.

Parameters
host

Device hostname or IP address. Must not be NULL or empty.

buffer

Output buffer for the NUL-terminated connection string.

buffer_size

Size of buffer in bytes.

Definition at line 2778 of file qar_streaming.h.

qar_target_app_connection_string_hololens()​

QarResult qar_target_app_connection_string_hololens (const char * host, char * buffer, size_t buffer_size)
inline static

Build the connection string for a HoloLens target app.

Parameters
host

Device hostname or IP address. Must not be NULL or empty.

buffer

Output buffer for the NUL-terminated connection string.

buffer_size

Size of buffer in bytes.

Definition at line 2758 of file qar_streaming.h.

qar_target_app_connection_string_quest()​

QarResult qar_target_app_connection_string_quest (const char * host, char * buffer, size_t buffer_size)
inline static

Build the connection string for a Meta Quest target app.

Parameters
host

Device hostname or IP address. Must not be NULL or empty.

buffer

Output buffer for the NUL-terminated connection string.

buffer_size

Size of buffer in bytes.

Definition at line 2768 of file qar_streaming.h.


Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.9.8.