Documentation ¶
Index ¶
- Constants
- func NewTimeBuffer(cl *Client, d *ChPlayback) *timeBuffer
- 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
- type ClipboardData
- type Connector
- type DisplayBase
- type Driver
- 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 ¶
View Source
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 )
View Source
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 )
View Source
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 )
View Source
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 )
View Source
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 )
View Source
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 )
View Source
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 )
View Source
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 )
View Source
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 )
View Source
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 )
View Source
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 )
View Source
const ( SPICE_MSG_RECORD_START = 101 SPICE_MSG_RECORD_STOP = 102 SPICE_MSG_RECORD_VOLUME = 103 SPICE_MSG_RECORD_MUTE = 104 SPICE_MSGC_RECORD_DATA = 101 SPICE_MSGC_RECORD_MODE = 102 SPICE_MSGC_RECORD_START_MARK = 103 SPICE_RECORD_CAP_CELT_0_5_1 = 0 SPICE_RECORD_CAP_VOLUME = 1 SPICE_RECORD_CAP_OPUS = 2 )
View Source
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 )
View Source
const VD_AGENT_MAX_DATA_SIZE = 2048
View Source
const VD_AGENT_SERVER_TOKEN_AMOUNT = 10
Variables ¶
This section is empty.
Functions ¶
func NewTimeBuffer ¶
func NewTimeBuffer(cl *Client, d *ChPlayback) *timeBuffer
Types ¶
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 Client ¶
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 DisplayBase ¶
type Driver ¶
type Driver interface { DisplayInit(image.Image) DisplayRefresh() SetEventsTarget(*ChInputs) SetMainTarget(*ChMain) SetCursor(img image.Image, x, y uint16) // clipboard related ClipboardGrabbed(selection SpiceClipboardSelection, clipboardTypes []SpiceClipboardFormat) ClipboardFetch(selection SpiceClipboardSelection, clType SpiceClipboardFormat) ([]byte, error) ClipboardRelease(selection SpiceClipboardSelection) }
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
}
func (*SpiceConn) WriteMessage ¶
type SpiceDisplay ¶
type SpiceDisplay struct {
// contains filtered or unexported fields
}
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
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.