#### 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:

1. Create a `SpiceSession` and configure connection parameters
2. Connect to the server with `spice_session_connect()`
3. Listen for `SpiceSession::channel-new` to discover channels
4. 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 recording
- `SpiceSmartcardManager` — Smartcard reader management
- `SpiceUsbDeviceManager` — USB device redirection management
- `SpiceQmpPort` — QEMU Machine Protocol over a SPICE port channel