Target Apps
Functions Index
| static 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) |
|
Ask this machine's hub to start the target app for one AR device. More... | |
| static 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) |
|
Ask this machine's hub to start the target app for one AR device. More... | |
| static QarResult | qar_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, whatever kind it is. More... | |
| static 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) |
|
Ask this machine's hub to stop a target app, without blocking. More... | |
| static QarResult | qar_target_app_connection_string_android (const char *host, char *buffer, size_t buffer_size) |
|
Build the connection string for a headset, spelled "android:<host>", an alias of "headset:<host>". Use it with qar_session_find_render_target to find a joined headset; an invite with it returns QAR_STATUS_HUB_TARGET_APP_DEVICE_NOT_INVITABLE (headsets pair themselves). More... | |
| static QarResult | qar_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 QarResult | qar_target_app_connection_string_quest (const char *host, char *buffer, size_t buffer_size) |
|
Build the connection string for a headset, spelled "quest:<host>", an alias of "headset:<host>". Use it with qar_session_find_render_target to find a joined headset; an invite with it returns QAR_STATUS_HUB_TARGET_APP_DEVICE_NOT_INVITABLE (headsets pair themselves). 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; the hub owns its whole lifecycle, and these calls ask the hub to act.
Android headsets (Meta Quest, METALENSE, Android XR) are never invited. A headset pairs itself once (Pair headset in the QAROS Visualizer, or a QR code) and from then on joins the session on its own; the hub serves it without an invite. Inviting one with "headset:", "quest:" or "android:" returns QAR_STATUS_HUB_TARGET_APP_DEVICE_NOT_INVITABLE.
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()
| 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 no host (a visualizer: connection, which only qar_session_find_render_target resolves) - rebuild it with a qar_target_app_connection_string_* helper.
QAR_STATUS_HUB_TARGET_APP_DEVICE_NOT_INVITABLE the connection string names an Android headset ("headset:", "quest:", "android:"), which pairs itself and is never invited - refused before the hub is asked; or the hub has no target app it can launch for the device family it names.
Only a HoloLens is invited ("hololens:<host>", or a bare "<host>").
Definition at line 4101 of file qar_streaming.h.
qar_session_invite_target_app_async()
| inline static |
Ask this machine's hub to start the target app for one AR device.
Non-blocking form of qar_session_invite_target_app. Only a HoloLens is invited ("hololens:<host>") - see QarSessionInviteTargetAppInit. An Android headset connection string ("headset:", "quest:", "android:") returns QAR_STATUS_HUB_TARGET_APP_DEVICE_NOT_INVITABLE from this call and the result callback never fires.
- Parameters
-
session Active session handle.
init Invite parameters; see QarSessionInviteTargetAppInit.
result_callback Fires exactly once with the outcome, see Async calls. 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 4126 of file qar_streaming.h.
qar_session_kill_target_app()
| inline static |
Ask this machine's hub to stop a target app, whatever kind it is.
What stopping means depends on the target app:
- A target app this machine's hub started (an invited HoloLens, remoted through the HoloLens OpenXR desktop app on the PC): the desktop app and the whole streaming pipeline feeding it are stopped.
- A headset that joined the session itself (Meta Quest and other Android headsets): the player application on the headset is asked to quit, and the Android streamer the hub runs on this PC to relay video to it is stopped. A headset player built before this call cannot be asked to quit: the relay still stops, and the player keeps running without a stream.
- A receiver of the QAROS Visualizer on this machine (a target app of the Visualizer category): the Visualizer stops the receiver the way its Stop button does, so nothing streams into it. The receiver stays in the Visualizer and starts again from there.
A stop is not remembered: nothing is revoked, forgotten or hidden. A target app that comes back - the receiver started again, the headset app relaunched, the HoloLens app restarted - appears in the session's target app list again. To forget or unpair a device, use the Visualizer's Forget or pair the device again with a new QR code.
The call succeeds once the target app has stopped. A target app that is none of the above - another hub's, one started outside QAROS that is neither a headset player nor a Visualizer receiver (for example an OpenXR desktop app started by hand), or one already gone - is refused with QAR_STATUS_HUB_TARGET_APP_NOT_HOSTED and nothing is stopped. A Visualizer that refuses to stop its receiver (it is being removed) fails the call with QAR_STATUS_ARGUMENT_NOT_SUPPORTED, and one that does not answer in time with QAR_STATUS_TIMEOUT; nothing changes then. An application can not act on another hub's target apps, and a hub on another machine never answers.
- Parameters
-
session Active session handle.
target_app Peer id of the target app, from qar_session_invite_target_app or the session's peer list.
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 4175 of file qar_streaming.h.
qar_session_kill_target_app_async()
| inline static |
Ask this machine's hub to stop a target app, without blocking.
Non-blocking form of qar_session_kill_target_app: stops any kind of target app and remembers nothing.
- Parameters
-
session Active session handle.
target_app Peer id of the target app.
result_callback Fires exactly once with the outcome, see Async calls. 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 4196 of file qar_streaming.h.
qar_target_app_connection_string_android()
| inline static |
Build the connection string for a headset, spelled "android:<host>", an alias of "headset:<host>". Use it with qar_session_find_render_target to find a joined headset; an invite with it returns QAR_STATUS_HUB_TARGET_APP_DEVICE_NOT_INVITABLE (headsets pair themselves).
- 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 4239 of file qar_streaming.h.
qar_target_app_connection_string_hololens()
| 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 4211 of file qar_streaming.h.
qar_target_app_connection_string_quest()
| inline static |
Build the connection string for a headset, spelled "quest:<host>", an alias of "headset:<host>". Use it with qar_session_find_render_target to find a joined headset; an invite with it returns QAR_STATUS_HUB_TARGET_APP_DEVICE_NOT_INVITABLE (headsets pair themselves).
- 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 4225 of file qar_streaming.h.
Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.9.8.