Local App Onboarding
What You Will Learn
- Load the runtime of the QAROS installed on this PC
- Join it with QarOnboardLocalAppExt (no code; QAROS asks the user once)
- Tell the user, in plain words, why joining failed
Build and Run
cmake --build --preset x64-windows-debug --target local_app_onboarding
./build/x64-windows/Debug/local_app_onboarding.exe [approval-timeout-ms]
The first run opens "Allow local_app_onboarding.exe to join QAROS?" in the QAROS Visualizer or as a QAROS tray window; later runs join silently while the executable is unchanged.
Exit codes (scripts and the QAROS install tests rely on them):
| Code | Meaning |
|---|---|
| 0 | joined |
| 1 | other error |
| 2 | QAROS is not installed (runtime not loaded) |
| 3 | no QAROS hub running on this PC (1802) |
| 4 | approval denied or revoked (1805) |
| 5 | nobody answered the approval in time (1806) |
| 6 | the hub is not the installed QAROS (1807) |
| 7 | the app no longer matches its approval (1808) |
Join as a Local App
QarOnboardInit init = qar_onboard_init_default();
init.presentation.display_name = "Local App Onboarding Example";
local.approval_timeout_ms = approval_timeout_ms;
QarOnboardingId onboarding_id;
memset(&onboarding_id, 0, sizeof(onboarding_id));
QarSession* session = NULL;
QarResult joined =
qar_runtime_onboard(runtime, &init, on_progress, NULL, NULL, &onboarding_id, &session);
Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.9.8.