Overview
SpiceClientGLib Overview
SpiceClientGLib is the core SPICE client library. It provides a GObject-based API for connecting to SPICE servers, managing sessions, and communicating over various channel types.
Architecture
A SPICE client application typically follows this pattern:
- Create a
SpiceSessionand configure connection parameters - Connect to the server with
spice_session_connect() - Listen for
SpiceSession::channel-newto discover channels - Interact with each channel according to its type
Channel Types
All channels inherit from SpiceChannel. The available
channel types are:
| Channel | Purpose |
|---|---|
SpiceMainChannel |
Agent communication, clipboard, file transfer, display configuration |
SpiceDisplayChannel |
Framebuffer updates and GL scanouts |
SpiceInputsChannel |
Keyboard and mouse input |
SpiceCursorChannel |
Mouse cursor shape and position |
SpicePlaybackChannel |
Audio playback from the server |
SpiceRecordChannel |
Audio recording to the server |
SpiceUsbredirChannel |
USB device redirection |
SpiceSmartcardChannel |
Smartcard passthrough |
SpicePortChannel |
Generic named data channels |
SpiceWebdavChannel |
Shared folder access via WebDAV |
Helper Objects
Several singleton-style objects provide application-level services:
SpiceAudio— Automatic audio playback and recordingSpiceSmartcardManager— Smartcard reader managementSpiceUsbDeviceManager— USB device redirection managementSpiceQmpPort— QEMU Machine Protocol over a SPICE port channel