spice

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package spice provides SPICE agent integration helpers.

It is intended to grow the current clipboard-focused support into a broader wrapper for SPICE agent capability negotiation, session lifecycle, and pasteboard state management for host-guest integration features.

The package should focus on:

Console port configuration
Capability and session state wrappers
Clipboard-oriented integration helpers

Higher-level packages may offer narrower convenience APIs built on top of this lower-level SPICE surface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPasswordObject

func BuildPasswordObject(password string) objectivec.IObject

BuildPasswordObject converts a password to an Objective-C string object.

func ClipboardConfig

func ClipboardConfig() (pvz.VZVirtioConsoleDeviceConfiguration, error)

ClipboardConfig is a compatibility helper for the current clipboard package.

func ConsoleConfig

func ConsoleConfig(sharesClipboard bool) (pvz.VZVirtioConsoleDeviceConfiguration, error)

ConsoleConfig creates a virtio console device configured for SPICE agent use.

func MakePasteboardItemState

func MakePasteboardItemState() pvz.VZSpiceAgentCorePasteboardItemState

MakePasteboardItemState returns a new pasteboard item state object.

func MakePasteboardState

func MakePasteboardState() pvz.VZSpiceAgentCorePasteboardState

MakePasteboardState returns a new pasteboard state object.

func PortName

func PortName() string

PortName returns the console port name for the SPICE agent attachment.

Types

type Capabilities

type Capabilities struct {
	// contains filtered or unexported fields
}

Capabilities wraps SPICE agent core capabilities.

func MakeClipboardCapabilities

func MakeClipboardCapabilities() Capabilities

MakeClipboardCapabilities returns capabilities with clipboard sharing enabled.

func NewCapabilities

func NewCapabilities(clipboard bool) Capabilities

NewCapabilities creates a default SPICE capability set.

func (Capabilities) Raw

Raw returns the underlying capabilities object.

type Core

type Core struct {
	// contains filtered or unexported fields
}

Core wraps the private SPICE core object.

func NewCore

func NewCore(pasteboard objectivec.IObject, queue *vm.Queue, caps Capabilities, input, output unsafe.Pointer) Core

NewCore creates a SPICE core object.

func (Core) IsValid

func (c Core) IsValid() bool

IsValid reports whether the core is currently valid.

func (Core) Pause

func (c Core) Pause()

Pause pauses the SPICE core.

func (Core) Resume

func (c Core) Resume()

Resume resumes the SPICE core.

func (Core) Stop

func (c Core) Stop()

Stop stops the SPICE core.

type PortAttachment

type PortAttachment struct {
	// contains filtered or unexported fields
}

PortAttachment wraps the private SPICE agent port attachment.

func NewPortAttachment

func NewPortAttachment(sharesClipboard bool) PortAttachment

NewPortAttachment creates a SPICE agent port attachment.

func PortAttachmentForClipboard

func PortAttachmentForClipboard() PortAttachment

PortAttachmentForClipboard returns a clipboard-enabled port attachment.

func (PortAttachment) Raw

Raw returns the underlying attachment.

func (PortAttachment) SetSharesClipboard

func (p PortAttachment) SetSharesClipboard(sharesClipboard bool)

SetSharesClipboard toggles host clipboard sharing.

func (PortAttachment) SharesClipboard

func (p PortAttachment) SharesClipboard() bool

SharesClipboard reports whether host clipboard sharing is enabled.

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session wraps a SPICE session object.

func NewSession

func NewSession() Session

NewSession creates a session wrapper.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL