Documentation
¶
Overview ¶
Package spice implements a client for the SPICE remote desktop protocol This file implements the display channel handling image rendering and updates
Package spice implements a client for the SPICE remote desktop protocol This file implements the record channel for audio recording functionality
Package spice implements a client for the SPICE remote desktop protocol commonly used with QEMU and libvirt virtualization systems.
Package spice implements a client for the SPICE remote desktop protocol This file implements the core connection handling and protocol-level operations
Index ¶
- Constants
- func NewTimeBuffer(cl *Client, d *ChPlayback) *timeBuffer
- type ActiveTransfer
- type BitmapImageType
- type ChCursor
- type ChInputs
- type ChMain
- func (m *ChMain) AgentWrite(typ uint32, data ...interface{}) error
- func (m *ChMain) DisplayConfig(flags, depth uint32) error
- func (m *ChMain) MonitorConfig(flags uint32, mons []SpiceMonitor) error
- func (m *ChMain) MouseModeRequest(mod uint32) error
- func (m *ChMain) RequestClipboard(selection SpiceClipboardSelection, clipboardType SpiceClipboardFormat) ([]byte, error)
- func (m *ChMain) SendGrabClipboard(selection SpiceClipboardSelection, formatTypes []SpiceClipboardFormat) error
- type ChPlayback
- type ChRecord
- type Channel
- type Client
- func (client *Client) GetFileTransfer() *SpiceWebdav
- func (client *Client) GetMute() bool
- func (client *Client) MediaTill(t uint32) time.Duration
- func (client *Client) MediaTime() uint32
- func (client *Client) SetMute(muted bool)
- func (client *Client) ToggleMute()
- func (client *Client) UpdateView(w, h int)
- type ClipboardData
- type Connector
- type DisplayBase
- type Driver
- type FileTransferCallback
- type FileTransferProgress
- type Image
- type ImageScaleMode
- type LzImageType
- type Point
- type QMask
- type Rect
- type Ropd
- type SpiceChannelInfo
- type SpiceClipboardFormat
- type SpiceClipboardSelection
- type SpiceConn
- func (c *SpiceConn) Close() error
- func (c *SpiceConn) Read(buf []byte) (int, error)
- func (c *SpiceConn) ReadData(cb func(typ uint16, data []byte) error) error
- func (c *SpiceConn) ReadError() error
- func (c *SpiceConn) ReadFull(buf []byte) error
- func (c *SpiceConn) ReadLoop()
- func (c *SpiceConn) String() string
- func (c *SpiceConn) Write(buf []byte) (int, error)
- func (c *SpiceConn) WriteMessage(typ uint16, data ...interface{}) error
- type SpiceDisplay
- type SpiceError
- type SpiceMonitor
- type SpiceWebdav
Constants ¶
const ( SPICE_MSG_CURSOR_INIT = 101 SPICE_MSG_CURSOR_RESET = 102 SPICE_MSG_CURSOR_SET = 103 SPICE_MSG_CURSOR_MOVE = 104 SPICE_MSG_CURSOR_HIDE = 105 SPICE_MSG_CURSOR_TRAIL = 106 SPICE_MSG_CURSOR_INVAL_ONE = 107 SPICE_MSG_CURSOR_INVAL_ALL = 108 SPICE_CURSOR_TYPE_ALPHA = 0 SPICE_CURSOR_TYPE_MONO = 1 SPICE_CURSOR_TYPE_COLOR4 = 2 SPICE_CURSOR_TYPE_COLOR8 = 3 SPICE_CURSOR_TYPE_COLOR16 = 4 SPICE_CURSOR_TYPE_COLOR24 = 5 SPICE_CURSOR_TYPE_COLOR32 = 6 )
const ( SPICE_MSG_DISPLAY_MODE = 101 SPICE_MSG_DISPLAY_MARK = 102 SPICE_MSG_DISPLAY_RESET = 103 SPICE_MSG_DISPLAY_COPY_BITS = 104 SPICE_MSG_DISPLAY_INVAL_LIST = 105 SPICE_MSG_DISPLAY_INVAL_ALL_PIXMAPS = 106 SPICE_MSG_DISPLAY_INVAL_PALETTE = 107 SPICE_MSG_DISPLAY_INVAL_ALL_PALETTES = 108 SPICE_MSG_DISPLAY_STREAM_CREATE = 122 SPICE_MSG_DISPLAY_STREAM_DATA = 123 SPICE_MSG_DISPLAY_STREAM_CLIP = 124 SPICE_MSG_DISPLAY_STREAM_DESTROY = 125 SPICE_MSG_DISPLAY_STREAM_DESTROY_ALL = 126 SPICE_MSG_DISPLAY_DRAW_FILL = 302 SPICE_MSG_DISPLAY_DRAW_OPAQUE = 303 SPICE_MSG_DISPLAY_DRAW_COPY = 304 SPICE_MSG_DISPLAY_DRAW_BLEND = 305 SPICE_MSG_DISPLAY_DRAW_BLACKNESS = 306 SPICE_MSG_DISPLAY_DRAW_WHITENESS = 307 SPICE_MSG_DISPLAY_DRAW_INVERS = 308 SPICE_MSG_DISPLAY_DRAW_ROP3 = 309 SPICE_MSG_DISPLAY_DRAW_STROKE = 310 SPICE_MSG_DISPLAY_DRAW_TEXT = 311 SPICE_MSG_DISPLAY_DRAW_TRANSPARENT = 312 SPICE_MSG_DISPLAY_DRAW_ALPHA_BLEND = 313 SPICE_MSG_DISPLAY_SURFACE_CREATE = 314 SPICE_MSG_DISPLAY_SURFACE_DESTROY = 315 SPICE_MSG_DISPLAY_STREAM_DATA_SIZED = 316 SPICE_MSG_DISPLAY_MONITORS_CONFIG = 317 SPICE_MSG_DISPLAY_DRAW_COMPOSITE = 318 SPICE_MSG_DISPLAY_STREAM_ACTIVATE_REPORT = 319 SPICE_MSG_DISPLAY_GL_SCANOUT_UNIX = 320 SPICE_MSG_DISPLAY_GL_DRAW = 321 SPICE_MSG_DISPLAY_QUALITY_INDICATOR = 322 SPICE_MSGC_DISPLAY_INIT = 101 SPICE_MSGC_DISPLAY_STREAM_REPORT = 102 SPICE_MSGC_DISPLAY_PREFERRED_COMPRESSION = 103 SPICE_MSGC_DISPLAY_GL_DRAW_DONE = 104 SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE = 105 )
const ( // 4178 = 1000001010010 SPICE_DISPLAY_CAP_SIZED_STREAM uint32 = iota SPICE_DISPLAY_CAP_MONITORS_CONFIG // X SPICE_DISPLAY_CAP_COMPOSITE SPICE_DISPLAY_CAP_A8_SURFACE SPICE_DISPLAY_CAP_STREAM_REPORT // X SPICE_DISPLAY_CAP_LZ4_COMPRESSION SPICE_DISPLAY_CAP_PREF_COMPRESSION // X SPICE_DISPLAY_CAP_GL_SCANOUT SPICE_DISPLAY_CAP_MULTI_CODEC SPICE_DISPLAY_CAP_CODEC_MJPEG SPICE_DISPLAY_CAP_CODEC_VP8 SPICE_DISPLAY_CAP_CODEC_H264 SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE // X SPICE_DISPLAY_CAP_CODEC_VP9 SPICE_DISPLAY_CAP_CODEC_H265 SPICE_DISPLAY_CAP_GL_SCANOUT2 )
const ( SPICE_IMAGE_COMPRESSION_INVALID uint8 = iota SPICE_IMAGE_COMPRESSION_OFF SPICE_IMAGE_COMPRESSION_AUTO_GLZ SPICE_IMAGE_COMPRESSION_AUTO_LZ SPICE_IMAGE_COMPRESSION_QUIC SPICE_IMAGE_COMPRESSION_GLZ SPICE_IMAGE_COMPRESSION_LZ SPICE_IMAGE_COMPRESSION_LZ4 )
const ( SPICE_MSGC_INPUTS_KEY_DOWN = 101 SPICE_MSGC_INPUTS_KEY_UP = 102 SPICE_MSGC_INPUTS_KEY_MODIFIERS = 103 SPICE_MSGC_INPUTS_MOUSE_MOTION = 111 SPICE_MSGC_INPUTS_MOUSE_POSITION = 112 SPICE_MSGC_INPUTS_MOUSE_PRESS = 113 SPICE_MSGC_INPUTS_MOUSE_RELEASE = 114 SPICE_MSG_INPUTS_INIT = 101 SPICE_MSG_INPUTS_KEY_MODIFIERS = 102 SPICE_MSG_INPUTS_MOUSE_MOTION_ACK = 111 // Keyboard led bits SPICE_SCROLL_LOCK_MODIFIER = 1 SPICE_NUM_LOCK_MODIFIER = 2 SPICE_CAPS_LOCK_MODIFIER = 4 SPICE_INPUTS_CAP_KEY_SCANCODE = 0 )
const ( SPICE_MSG_MAIN_MIGRATE_BEGIN = 101 SPICE_MSG_MAIN_MIGRATE_CANCEL = 102 SPICE_MSG_MAIN_INIT = 103 SPICE_MSG_MAIN_CHANNELS_LIST = 104 SPICE_MSG_MAIN_MOUSE_MODE = 105 SPICE_MSG_MAIN_MULTI_MEDIA_TIME = 106 SPICE_MSG_MAIN_AGENT_CONNECTED = 107 SPICE_MSG_MAIN_AGENT_DISCONNECTED = 108 SPICE_MSG_MAIN_AGENT_DATA = 109 SPICE_MSG_MAIN_AGENT_TOKEN = 110 SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST = 111 SPICE_MSG_MAIN_MIGRATE_END = 112 SPICE_MSG_MAIN_NAME = 113 SPICE_MSG_MAIN_UUID = 114 SPICE_MSG_MAIN_AGENT_CONNECTED_TOKENS = 115 SPICE_MSG_MAIN_MIGRATE_BEGIN_SEAMLESS = 116 SPICE_MSG_MAIN_MIGRATE_DST_SEAMLESS_ACK = 117 SPICE_MSG_MAIN_MIGRATE_DST_SEAMLESS_NACK = 118 SPICE_MSGC_MAIN_CLIENT_INFO = 101 SPICE_MSGC_MAIN_MIGRATE_CONNECTED = 102 SPICE_MSGC_MAIN_MIGRATE_CONNECT_ERROR = 103 SPICE_MSGC_MAIN_ATTACH_CHANNELS = 104 SPICE_MSGC_MAIN_MOUSE_MODE_REQUEST = 105 SPICE_MSGC_MAIN_AGENT_START = 106 SPICE_MSGC_MAIN_AGENT_DATA = 107 SPICE_MSGC_MAIN_AGENT_TOKEN = 108 VD_AGENT_PROTOCOL = 1 )
const ( SPICE_MAIN_CAP_SEMI_SEAMLESS_MIGRATE = iota SPICE_MAIN_CAP_NAME_AND_UUID SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS SPICE_MAIN_CAP_SEAMLESS_MIGRATE )
const ( VD_AGENT_MOUSE_STATE = iota + 1 VD_AGENT_MONITORS_CONFIG VD_AGENT_REPLY VD_AGENT_CLIPBOARD VD_AGENT_DISPLAY_CONFIG VD_AGENT_ANNOUNCE_CAPABILITIES VD_AGENT_CLIPBOARD_GRAB VD_AGENT_CLIPBOARD_REQUEST VD_AGENT_CLIPBOARD_RELEASE VD_AGENT_FILE_XFER_START VD_AGENT_FILE_XFER_STATUS VD_AGENT_FILE_XFER_DATA VD_AGENT_CLIENT_DISCONNECTED VD_AGENT_MAX_CLIPBOARD VD_AGENT_AUDIO_VOLUME_SYNC VD_AGENT_GRAPHICS_DEVICE_INFO )
const ( VD_AGENT_FILE_XFER_STATUS_CAN_SEND_DATA = iota VD_AGENT_FILE_XFER_STATUS_CANCELLED VD_AGENT_FILE_XFER_STATUS_ERROR VD_AGENT_FILE_XFER_STATUS_SUCCESS VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED VD_AGENT_FILE_XFER_STATUS_VDAGENT_NOT_CONNECTED VD_AGENT_FILE_XFER_STATUS_DISABLED )
const ( // caps from server: 36327 = 1000110111100111 // caps from server (win32): 1719 = 11010110111 VD_AGENT_CAP_MOUSE_STATE uint32 = iota // X VD_AGENT_CAP_MONITORS_CONFIG // X VD_AGENT_CAP_REPLY // X VD_AGENT_CAP_CLIPBOARD // (unused) VD_AGENT_CAP_DISPLAY_CONFIG // (unused) win only VD_AGENT_CAP_CLIPBOARD_BY_DEMAND // X VD_AGENT_CAP_CLIPBOARD_SELECTION // X linux only VD_AGENT_CAP_SPARSE_MONITORS_CONFIG // X VD_AGENT_CAP_GUEST_LINEEND_LF // X VD_AGENT_CAP_GUEST_LINEEND_CRLF // (windows only?) VD_AGENT_CAP_MAX_CLIPBOARD // X VD_AGENT_CAP_AUDIO_VOLUME_SYNC // X VD_AGENT_CAP_MONITORS_CONFIG_POSITION // (unused) VD_AGENT_CAP_FILE_XFER_DISABLED // (unused) VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS // (unused) VD_AGENT_CAP_GRAPHICS_DEVICE_INFO // X VD_AGENT_CAP_CLIPBOARD_NO_RELEASE_ON_REGRAB VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL )
const ( SPICE_MSG_PLAYBACK_DATA = 101 SPICE_MSG_PLAYBACK_MODE = 102 SPICE_MSG_PLAYBACK_START = 103 SPICE_MSG_PLAYBACK_STOP = 104 SPICE_MSG_PLAYBACK_VOLUME = 105 SPICE_MSG_PLAYBACK_MUTE = 106 SPICE_MSG_PLAYBACK_LATENCY = 107 SPICE_AUDIO_DATA_MODE_RAW = 1 SPICE_AUDIO_DATA_MODE_CELT_0_5_1 = 2 SPICE_AUDIO_DATA_MODE_OPUS = 3 // need to send capabilities SPICE_PLAYBACK_CAP_CELT_0_5_1 = 0 SPICE_PLAYBACK_CAP_VOLUME = 1 SPICE_PLAYBACK_CAP_LATENCY = 2 SPICE_PLAYBACK_CAP_OPUS = 3 )
const ( // Messages from server to client SPICE_MSG_RECORD_START = 101 // Start audio recording SPICE_MSG_RECORD_STOP = 102 // Stop audio recording SPICE_MSG_RECORD_VOLUME = 103 // Set recording volume SPICE_MSG_RECORD_MUTE = 104 // Mute/unmute recording // Messages from client to server SPICE_MSGC_RECORD_DATA = 101 // Send recorded audio data SPICE_MSGC_RECORD_MODE = 102 // Set audio recording mode SPICE_MSGC_RECORD_START_MARK = 103 // Mark recording start time // Capability flags for record channel SPICE_RECORD_CAP_CELT_0_5_1 = 0 // Support for CELT 0.5.1 codec (deprecated) SPICE_RECORD_CAP_VOLUME = 1 // Support for volume control SPICE_RECORD_CAP_OPUS = 2 // Support for Opus audio codec )
const ( SPICE_VERSION_MAJOR = 2 SPICE_VERSION_MINOR = 2 SPICE_TICKET_PUBKEY_BYTES = 162 // bytes needed to store 1024bits RSA key in PKIX format SPICE_WARN_GENERAL = 0 SPICE_INFO_GENERAL = 0 SPICE_MAGIC = "REDQ" // magic bytes. can feel the redhat // common messages SPICE_MSG_MIGRATE = 1 SPICE_MSG_MIGRATE_DATA = 2 SPICE_MSG_SET_ACK = 3 SPICE_MSG_PING = 4 SPICE_MSG_WAIT_FOR_CHANNELS = 5 SPICE_MSG_DISCONNECTING = 6 SPICE_MSG_NOTIFY = 7 SPICE_MSG_FIRST_AVAIL = 101 // SPICE_MSGC_ACK_SYNC = 1 SPICE_MSGC_ACK = 2 SPICE_MSGC_PONG = 3 SPICE_MSGC_MIGRATE_FLUSH_MARK = 4 SPICE_MSGC_MIGRATE_DATA = 5 SPICE_MSGC_DISCONNECTING = 6 SPICE_MSGC_FIRST_AVAIL = 101 SPICE_MOUSE_MODE_SERVER = 1 SPICE_MOUSE_MODE_CLIENT = 2 SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION = 0 SPICE_COMMON_CAP_AUTH_SPICE = 1 SPICE_COMMON_CAP_AUTH_SASL = 2 SPICE_COMMON_CAP_MINI_HEADER = 3 )
const ( SPICE_WEBDAV_MSG_INVALID = 0 SPICE_WEBDAV_MSG_FILE_XFER_START = 1 SPICE_WEBDAV_MSG_FILE_XFER_DATA = 2 SPICE_WEBDAV_MSG_FILE_XFER_STATUS = 3 )
WebDAV message types
const VD_AGENT_MAX_DATA_SIZE = 2048
const VD_AGENT_SERVER_TOKEN_AMOUNT = 10
Variables ¶
This section is empty.
Functions ¶
func NewTimeBuffer ¶
func NewTimeBuffer(cl *Client, d *ChPlayback) *timeBuffer
Types ¶
type ActiveTransfer ¶ added in v0.0.4
type ActiveTransfer struct {
ID uint32 // Unique transfer ID
File *os.File // File handle
FileName string // File name (used in progress reporting)
OriginalPath string // Original path on the host
TotalSize int64 // Total file size
BytesSent int64 // Bytes sent so far
Callback FileTransferCallback // Progress callback
}
ActiveTransfer represents an active file transfer
type BitmapImageType ¶
type BitmapImageType uint8
const ( BITMAP_IMAGE_TYPE_INVALID BitmapImageType = iota BITMAP_IMAGE_TYPE_1BIT_LE BITMAP_IMAGE_TYPE_1BIT_BE BITMAP_IMAGE_TYPE_4BIT_LE BITMAP_IMAGE_TYPE_4BIT_BE BITMAP_IMAGE_TYPE_8BIT BITMAP_IMAGE_TYPE_16BIT BITMAP_IMAGE_TYPE_24BIT BITMAP_IMAGE_TYPE_32BIT BITMAP_IMAGE_TYPE_RGBA BITMAP_IMAGE_TYPE_8BIT_A )
type ChInputs ¶
type ChInputs struct {
// contains filtered or unexported fields
}
func (*ChInputs) MousePosition ¶
type ChMain ¶
type ChMain struct {
// contains filtered or unexported fields
}
func (*ChMain) AgentWrite ¶
func (*ChMain) DisplayConfig ¶
func (*ChMain) MonitorConfig ¶
func (m *ChMain) MonitorConfig(flags uint32, mons []SpiceMonitor) error
func (*ChMain) MouseModeRequest ¶
func (*ChMain) RequestClipboard ¶
func (m *ChMain) RequestClipboard(selection SpiceClipboardSelection, clipboardType SpiceClipboardFormat) ([]byte, error)
func (*ChMain) SendGrabClipboard ¶
func (m *ChMain) SendGrabClipboard(selection SpiceClipboardSelection, formatTypes []SpiceClipboardFormat) error
type ChPlayback ¶
type ChPlayback struct {
// contains filtered or unexported fields
}
type ChRecord ¶ added in v0.0.3
type ChRecord struct {
// contains filtered or unexported fields
}
ChRecord handles the audio recording channel for capturing audio from the client and sending it to the SPICE server
type Client ¶
type Client struct {
Debug *log.Logger // Optional logger for debug information
// contains filtered or unexported fields
}
Client represents a SPICE protocol client connection It manages all channel connections and coordinates communication
func New ¶
New creates a new SPICE client and establishes connection to all available channels It requires a Connector for network access, a Driver for GUI interaction, and the password for SPICE authentication
func (*Client) GetFileTransfer ¶ added in v0.0.4
func (client *Client) GetFileTransfer() *SpiceWebdav
GetFileTransfer returns the WebDAV file transfer interface if available
func (*Client) ToggleMute ¶
func (client *Client) ToggleMute()
func (*Client) UpdateView ¶
type ClipboardData ¶
type ClipboardData struct {
// contains filtered or unexported fields
}
ClipboardData identifies one specific request
type Connector ¶
Connector is an interface that can establish network connections to a SPICE server with optional compression for the display channel
type DisplayBase ¶
type Driver ¶
type Driver interface {
// DisplayInit initializes the display with the given image
DisplayInit(image.Image)
// DisplayRefresh triggers a refresh of the display
DisplayRefresh()
// SetEventsTarget sets the input events channel for sending user input
SetEventsTarget(*ChInputs)
// SetMainTarget sets the main channel for server communication
SetMainTarget(*ChMain)
// SetCursor updates the cursor image and position
SetCursor(img image.Image, x, y uint16)
// Clipboard related methods
// ClipboardGrabbed is called when the server grabs the clipboard
ClipboardGrabbed(selection SpiceClipboardSelection, clipboardTypes []SpiceClipboardFormat)
// ClipboardFetch retrieves clipboard data from the client
ClipboardFetch(selection SpiceClipboardSelection, clType SpiceClipboardFormat) ([]byte, error)
// ClipboardRelease is called when the server releases the clipboard
ClipboardRelease(selection SpiceClipboardSelection)
}
Driver is the interface that must be implemented by clients to handle display updates, input events, cursor changes and clipboard operations
type FileTransferCallback ¶ added in v0.0.4
type FileTransferCallback func(progress FileTransferProgress)
FileTransferCallback is called when file transfer status changes
type FileTransferProgress ¶ added in v0.0.4
type FileTransferProgress struct {
FileName string // Name of the file being transferred
TotalSize int64 // Total file size in bytes
BytesSent int64 // Bytes sent so far
Percentage float64 // Progress percentage (0-100)
Status uint32 // Current status (one of VD_AGENT_FILE_XFER_STATUS_*)
Error error // Error if any
}
FileTransferProgress represents the progress of a file transfer
type Image ¶
type Image struct {
image.Image
ID uint64
Type uint8 // 0=bitmap 1=quic 2=reserved 100=lz_plt 101=lz_rgb 102=glz_rgb 103=from_cache 104=surface 105=jpeg 106=from_cache_lossless 107=ZLIB_GLZ_RGB 108=jpeg_alpha 109=lz4
Flags uint8 // 1=cache_me 2=high_bits_set 4=cache_replace_me
Width uint32
Height uint32
}
func DecodeImage ¶
type ImageScaleMode ¶
type ImageScaleMode uint8
const ( ImageScaleModeInterpolate ImageScaleMode = iota ImageScaleModeNearest )
type LzImageType ¶
type LzImageType uint32
const ( LZ_IMAGE_TYPE_INVALID LzImageType = iota LZ_IMAGE_TYPE_PLT1_LE LZ_IMAGE_TYPE_PLT1_BE // PLT stands for palette LZ_IMAGE_TYPE_PLT4_LE LZ_IMAGE_TYPE_PLT4_BE LZ_IMAGE_TYPE_PLT8 LZ_IMAGE_TYPE_RGB16 LZ_IMAGE_TYPE_RGB24 LZ_IMAGE_TYPE_RGB32 LZ_IMAGE_TYPE_RGBA LZ_IMAGE_TYPE_XXXA LZ_IMAGE_TYPE_A8 )
func (LzImageType) String ¶
func (t LzImageType) String() string
type SpiceChannelInfo ¶
type SpiceChannelInfo struct {
// contains filtered or unexported fields
}
type SpiceClipboardFormat ¶
type SpiceClipboardFormat uint32
const ( VD_AGENT_CLIPBOARD_NONE SpiceClipboardFormat = iota VD_AGENT_CLIPBOARD_UTF8_TEXT VD_AGENT_CLIPBOARD_IMAGE_PNG VD_AGENT_CLIPBOARD_IMAGE_BMP VD_AGENT_CLIPBOARD_IMAGE_TIFF VD_AGENT_CLIPBOARD_IMAGE_JPG )
type SpiceClipboardSelection ¶
type SpiceClipboardSelection uint8
const ( VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD SpiceClipboardSelection = iota VD_AGENT_CLIPBOARD_SELECTION_PRIMARY VD_AGENT_CLIPBOARD_SELECTION_SECONDARY )
type SpiceConn ¶
type SpiceConn struct {
// contains filtered or unexported fields
}
SpiceConn represents a connection to a specific SPICE channel It handles the protocol-level communication including message framing, authentication, and capability negotiation
func (*SpiceConn) ReadLoop ¶
func (c *SpiceConn) ReadLoop()
ReadLoop continuously reads and processes incoming messages from the SPICE server It handles message acknowledgment according to the server's requirements and dispatches messages to the appropriate handlers
func (*SpiceConn) WriteMessage ¶
type SpiceDisplay ¶
type SpiceDisplay struct {
// contains filtered or unexported fields
}
SpiceDisplay handles the display channel for rendering remote desktop content It processes drawing commands and updates the local display image
type SpiceError ¶
type SpiceError uint32
const ( ErrSpiceLinkOk SpiceError = iota ErrSpiceLinkError ErrSpiceLinkInvalidMagic ErrSpiceLinkInvalidData ErrSpiceLinkVersionMismatch ErrSpiceLinkNeedSecured ErrSpiceLinkNeedUnsecured ErrSpiceLinkPermissionDenied ErrSpiceLinkBadConnectionId ErrSpiceLinkChannelNotAvailable )
func (SpiceError) Error ¶
func (e SpiceError) Error() string
type SpiceMonitor ¶
type SpiceWebdav ¶
type SpiceWebdav struct {
// contains filtered or unexported fields
}
SpiceWebdav handles the WebDAV channel communication for file transfers
func (*SpiceWebdav) CancelTransfer ¶ added in v0.0.4
func (d *SpiceWebdav) CancelTransfer(id uint32) error
CancelTransfer cancels an active file transfer
func (*SpiceWebdav) SendFile ¶ added in v0.0.4
func (d *SpiceWebdav) SendFile(filePath string, callback FileTransferCallback) (uint32, error)
SendFile initiates a file transfer to the guest
func (*SpiceWebdav) SendFiles ¶ added in v0.0.4
func (d *SpiceWebdav) SendFiles(filePaths []string, callback FileTransferCallback) ([]uint32, error)
SendFiles sends multiple files to the guest