SpiceClientGLib.Session¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The CA certificates data |
||
r/w |
File holding the CA certificates |
||
r/w |
Images cache size (bytes) |
||
r/w |
Certificate subject to check |
||
r/w |
SSL cipher list |
||
r/w |
Sockets are provided by the client |
||
d/r/w |
Display channel color depth |
||
[ |
r/w |
Comma-separated effects to disable |
|
r/w/c |
Enable audio channels |
||
r/w |
Forward smartcard events to the SPICE server |
||
r/w/c |
Forward USB devices to the SPICE server |
||
r/w/c |
Enable GL scanout support |
||
r/w |
Glz window size (bytes) |
||
r/w/c |
Remote host |
||
r/w |
Request that SpiceDisplays don’t grab the keyboard |
||
r |
Migration state |
||
r |
Spice server name |
||
r/w |
|||
r/w |
Remote port (plaintext) |
||
r/w/c |
Spice protocol major version |
||
r/w |
The proxy server |
||
r/w |
Public key to check |
||
r/w/c |
Whether this connection is read-only mode |
||
[ |
r/w |
Array of channel type to secure |
|
r/w/c |
Share directory read-only |
||
r/w/c |
Shared directory |
||
[ |
r/w |
Smartcard certificates for software-based smartcards |
|
r/w |
Path to the database for smartcard certificates |
||
r/w |
Remote port (encrypted) |
||
r/w/c |
Unix path |
||
r/w |
Spice connection URI |
||
r/w |
Username used for SASL connections |
||
r |
Spice server uuid |
||
r/w/c |
Certificate verification parameters |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
|
The |
|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class SpiceClientGLib.Session(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
SpiceClientGLib.Session
struct is opaque and should not be accessed directly.- classmethod new()¶
- Returns:
a new
SpiceClientGLib.Session
- Return type:
Creates a new Spice session.
- connect()¶
- Returns:
False
if the session state is invalid for connection request.True
if the connection is initiated. To know whether the connection is established, you must watch for channels creation (SpiceClientGLib.Session
::channel-new
) and the channels state (SpiceClientGLib.Channel
::channel-event
).- Return type:
Open the session using the
SpiceClientGLib.Session
:host
andSpiceClientGLib.Session
:port
.
- disconnect()¶
Disconnect the self, and destroy all channels.
- get_channels()¶
- Returns:
a
GLib.List
of unownedSpiceClientGLib.Channel
channels.- Return type:
Get the list of current channels associated with this self.
- get_proxy_uri()¶
- Returns:
the session proxy
SpiceClientGLib.URI
orNone
.- Return type:
Gets the self proxy uri.
New in version 0.24.
- get_read_only()¶
- Returns:
whether the self is in read-only mode.
- Return type:
Checks whether the self is read-only.
- has_channel_type(type)¶
- Parameters:
type (
int
) – aSpiceClientGLib.Channel
:channel-type
- Returns:
- Return type:
See if there is a type channel in the channels associated with this self.
- is_for_migration()¶
-
During seamless migration, channels may be created to establish a connection with the target, but they are temporary and should only handle migration steps. In order to avoid other interactions with the client, channels should check this value.
New in version 0.27.
- open_fd(fd)¶
-
Open the session using the provided fd socket file descriptor. This is useful if you create the fd yourself, for example to setup a SSH tunnel.
Note however that additional sockets will be needed by all the channels created for self so users of this API should hook into
SpiceClientGLib.Channel
::open-fd
signal for each channel they are interested in, and create and pass a new socket to the channel usingSpiceClientGLib.Channel.open_fd
, in the signal callback.If fd is -1, a valid fd will be requested later via the
SpiceClientGLib.Channel
::open-fd
signal. Typically, you would want to just pass -1 as fd this call since you will have to hook toSpiceClientGLib.Channel
::open-fd
signal anyway.
- do_channel_destroy(channel) virtual¶
- Parameters:
channel (
SpiceClientGLib.Channel
) –
- do_channel_new(channel) virtual¶
- Parameters:
channel (
SpiceClientGLib.Channel
) –
Signal Details¶
- SpiceClientGLib.Session.signals.channel_destroy(session, channel)¶
- Signal Name:
channel-destroy
- Flags:
- Parameters:
session (
SpiceClientGLib.Session
) – The object which received the signalchannel (
SpiceClientGLib.Channel
) – the destroyedSpiceClientGLib.Channel
The
SpiceClientGLib.Session
::channel-destroy
signal is emitted each time aSpiceClientGLib.Channel
is destroyed.
- SpiceClientGLib.Session.signals.channel_new(session, channel)¶
- Signal Name:
channel-new
- Flags:
- Parameters:
session (
SpiceClientGLib.Session
) – The object which received the signalchannel (
SpiceClientGLib.Channel
) – the newSpiceClientGLib.Channel
The
SpiceClientGLib.Session
::channel-new
signal is emitted each time aSpiceClientGLib.Channel
is created.
- SpiceClientGLib.Session.signals.disconnected(session)¶
- Signal Name:
disconnected
- Flags:
- Parameters:
session (
SpiceClientGLib.Session
) – The object which received the signal
The
SpiceClientGLib.Session
::disconnected
signal is emitted when all channels have been destroyed.New in version 0.35.
- SpiceClientGLib.Session.signals.mm_time_reset(session)¶
- Signal Name:
mm-time-reset
- Flags:
- Parameters:
session (
SpiceClientGLib.Session
) – The object which received the signal
The
SpiceClientGLib.Session
::mm-time-reset
is emitted when we identify discontinuity in mm-timeNew in version 0.20.
Property Details¶
- SpiceClientGLib.Session.props.ca¶
- Name:
ca
- Type:
- Default Value:
- Flags:
CA certificates in PEM format. The text data can contain several CA certificates identified by:
—–BEGIN CERTIFICATE—– … (CA certificate in base64 encoding) … —–END CERTIFICATE—–
New in version 0.15.
- SpiceClientGLib.Session.props.ca_file¶
-
File holding the CA certificates for the host the client is connecting to
- SpiceClientGLib.Session.props.cache_size¶
-
Images cache size. If 0, don’t set.
New in version 0.9.
- SpiceClientGLib.Session.props.cert_subject¶
-
Certificate subject to check
- SpiceClientGLib.Session.props.ciphers¶
-
SSL cipher list
- SpiceClientGLib.Session.props.client_sockets¶
-
Sockets are provided by the client
- SpiceClientGLib.Session.props.color_depth¶
- Name:
color-depth
- Type:
- Default Value:
0
- Flags:
Display color depth to set on new display channels. If 0, don’t set.
New in version 0.7.
Deprecated since version 0.37: Deprecated due lack of support in drivers, only Windows 7 and older. This option is currently ignored.
- SpiceClientGLib.Session.props.disable_effects¶
-
A string array of effects to disable. The settings will be applied on new display channels. The following effets can be disabled “wallpaper”, “font-smooth”, “animation”, and “all”, which will disable all the effects. If
None
, don’t apply changes.New in version 0.7.
- SpiceClientGLib.Session.props.enable_audio¶
-
If set to
True
, the audio channels will be enabled for playback and recording.New in version 0.8.
- SpiceClientGLib.Session.props.enable_smartcard¶
-
If set to
True
, the smartcard channel will be enabled and smartcard events will be forwarded to the guestNew in version 0.7.
- SpiceClientGLib.Session.props.enable_usbredir¶
-
If set to
True
, the usbredir channel will be enabled and USB devices can be redirected to the guestNew in version 0.8.
- SpiceClientGLib.Session.props.gl_scanout¶
-
Whether to enable gl-scanout (Unix only). Set to
True
by default on EGL-enabled host, unless SPICE_DISABLE_GL_SCANOUT environment variable is set.New in version 0.36.
- SpiceClientGLib.Session.props.glz_window_size¶
-
Glz window size. If 0, don’t set.
New in version 0.9.
- SpiceClientGLib.Session.props.host¶
-
URL of the SPICE host to connect to
- SpiceClientGLib.Session.props.inhibit_keyboard_grab¶
-
Request that SpiceDisplays don’t grab the keyboard
- SpiceClientGLib.Session.props.migration_state¶
- Name:
migration-state
- Type:
- Default Value:
- Flags:
SpiceClientGLib.SessionMigration
bit field indicating if a migration is in progress
- SpiceClientGLib.Session.props.name¶
-
Spice server name.
New in version 0.11.
- SpiceClientGLib.Session.props.password¶
-
TLS password to use
- SpiceClientGLib.Session.props.port¶
-
Port to connect to for unencrypted sessions
- SpiceClientGLib.Session.props.protocol¶
-
Version of the SPICE protocol to use
- SpiceClientGLib.Session.props.proxy¶
-
URI to the proxy server to use when doing network connection. of the form [protocol://]<host>[
:port
]New in version 0.17.
- SpiceClientGLib.Session.props.pubkey¶
- Name:
pubkey
- Type:
- Default Value:
- Flags:
Public key to check
- SpiceClientGLib.Session.props.read_only¶
-
Whether this connection is read-only mode.
New in version 0.8.
- SpiceClientGLib.Session.props.secure_channels¶
-
A string array of channel types to be secured.
New in version 0.20.
-
Whether to share the directory read-only.
New in version 0.28.
-
Location of the shared directory
New in version 0.24.
- SpiceClientGLib.Session.props.smartcard_certificates¶
-
This property is used when one wants to simulate a smartcard with no hardware smartcard reader. If it’s set to a
None
-terminated string array containing the names of 3 valid certificates, these will be used to simulate a smartcard in the guest See alsoSpiceClientGLib.SmartcardManager.insert_card
()New in version 0.7.
- SpiceClientGLib.Session.props.smartcard_db¶
-
Path to the NSS certificate database containing the certificates to use to simulate a software smartcard
New in version 0.7.
- SpiceClientGLib.Session.props.tls_port¶
-
Port to connect to for TLS sessions
- SpiceClientGLib.Session.props.unix_path¶
-
Path of the Unix socket to connect to
New in version 0.28.
- SpiceClientGLib.Session.props.uri¶
-
URI of the SPICE host to connect to. The URI is of the form spice://hostname?port=XXX or spice://hostname?tls_port=XXX
- SpiceClientGLib.Session.props.username¶
-
Username to use
- SpiceClientGLib.Session.props.uuid¶
-
Spice server uuid.
New in version 0.11.
- SpiceClientGLib.Session.props.verify¶
- Name:
verify
- Type:
- Default Value:
- Flags:
SpiceClientGLib.SessionVerify
bit field indicating which parts of the peer certificate should be checked