Skip to main content
Version: Dev (main)

Concepts

This guide is self-contained: you do not need the User Guide to integrate QAROS. This page maps the QAROS world onto the API objects you actually call. The prose is language-neutral; only the name table at the end is paired C <-> C#. How the Rust binding maps the C API is in Language Bindings.

The objects you work with​

  • Library - process-wide initialization and logging. You initialize it once at startup and tear it down last. It owns no session state; it is the entry point that makes every other call valid.
  • Runtime - your process's QAROS context: its identity store, its connection to a Hub, and the factory for sessions. One runtime per logical QAROS instance; local-app instances in one process with the same app tag share one session (see several API instances in one process).
  • Session - the developer/runtime representation of a Hub's Shared Space, always obtained through onboarding, never created directly. Everything you do in the room hangs off the session: peers, panels, volumes, and render streams.
  • Peer - any participant in the session (a device or an application), described by an immutable snapshot you read or subscribe to. See Working with Peers.
  • App volume - your application's named 3-D box in the room; the unit of streaming and the anchor for grab/move/scale gestures. See App Volumes and Gestures.
  • GUI panel - a shared 2-D quad floating in room space, identified by a stable common name and idempotently created. See Custom GUI Panels.
  • Render sender - the object that carries your rendered frames into a volume, driven by a begin frame -> render -> show frame loop. See Rendering Streams.
  • Result - the value every fallible call returns; some of its status codes are expected control flow rather than errors.

How these relate in space (room -> volume -> content -> panels) is the subject of Coordinate Systems.

Identity, naming, and persistence​

The User Guide keeps these details high-level. For integration work, the important concrete rules are:

  • Peers have stable IDs. A local app, its companion processes and a remote app through a member hub get their peer ID back on every start: the hub remembers it per approval and app tag, and the app stores nothing. See Choosing an Onboarding Mode.
  • App volumes and GUI panels are identified by stable common names and are created idempotently by those names. See App Volumes and GUI Panels.
  • Streams are runtime objects recreated per run; they are not the same kind of persisted session object as peers, panels, or volumes. See Rendering Streams.
  • Target app is the broad runtime term for a stream consumer. A player is the device-side companion app variant of a target app; the desktop visualizer is a target app too, but not a player. In the API a target app is a peer whose role is TARGET; your application is always a SOURCE. See what a peer is.

C <-> C# object map​

The C# binding lives in the Quaternar.Qaros namespace and drops the Qar prefix from type names. Operations on the things inside a session (peers, panels, volumes, senders) are reached through properties on the session object rather than free functions.

ConceptCC# (Quaternar.Qaros)Covered in
Library init/loggingqar_library_*Library (static)Getting Started
Process contextQarRuntime*Runtime : IDisposableOnboarding & Sessions
Room membershipQarSession*Session : IDisposableOnboarding & Sessions
Onboarding inviteQarOnboardingInvite*OnboardingInvite : IDisposableOnboarding & Sessions
Participant snapshotQarPeerSpec*PeerSpec (DTO); ops via session.PeersPeers
Shared 2-D panelQarGuiPanel*GuiPanel (DTO); ops via session.GuiPanelsGUI Panels
Application's 3-D boxQarAppVolume*AppVolume (DTO); ops via session.AppVolumesApp Volumes
Frame streamrender senderRenderSender; ops via session.RenderSendersRendering Streams
Frame handleQarRenderFrameInfo*RenderFrameInfo : IDisposableRendering Streams
Call resultQarResult (by value)Result<T> / Result<Unit> / ResultInfoAPI Conventions
CancellationQarCancelToken*System.Threading.CancellationTokenAPI Conventions
Value IDsQarPeerId, QarSessionId, QarGuiPanelId, QarAppVolumeId, QarStreamIdPeerId, SessionId, GuiPanelId, AppVolumeId, StreamId (readonly structs)API Conventions
Extensible initQarStructureHeader{type,next} chainStructure / StructureTypeAPI Conventions

The precise idioms behind these mappings - how handles, results, extension chains, async pairs, enumeration, and ownership differ between languages - are the subject of API Conventions.