summaryrefslogtreecommitdiff
path: root/gtk/spice-session-priv.h
AgeCommit message (Collapse)AuthorFilesLines
2015-04-24agent: sync guest audio with client valuesVictor Toso1-1/+1
Functions to sync volume and mute value when necessary. In this patch, only one sync is allowed after agent connect. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1012868
2014-12-01session: remove channels on disconnectMarc-André Lureau1-1/+0
A channel is considered to be part of a session as long as it is alive. However, this model is problematic, since library user may hold channel references, and thus the channel will remain in the session. Calling spice_session_disconnect() several time will end up calling spice_channel_destroy(), releasing references that aren't owned by the session. This usually causes crashes, in particular with language bindings that do not deal well with a library model where objects can't be referenced at will.
2014-12-01session: move SpiceSessionPrivate out of headersMarc-André Lureau1-82/+0
Make sure none of the SpiceSessionPrivate fields are accessed directly anymore
2014-12-01gtk: do not require glib session private fieldsMarc-André Lureau1-2/+0
Use GObject object association for session helpers. GtkSession and DesktopIntegration are in the gtk library SpiceSession is in glib one. So far we had the SessionPriv structure shared between the two libraries, so they could fit their pointers there. But this is no longer possible when moving the private structure in .c. We could add more accessors, but they would need to be in public API, and this isn't supposed to be accessed by API users.
2014-12-01webdav: move initialization to sessionMarc-André Lureau1-0/+2
Use session accessors to initialize the webdav server
2014-12-01Rename display_channels_count/n_display_channelsMarc-André Lureau1-3/+3
2014-12-01session: add and use internal accessorsMarc-André Lureau1-1/+9
Avoid dereferencing session private data directly, and use accessors instead.
2014-12-01session: rename migration_copy/for_migrationMarc-André Lureau1-1/+1
2014-12-01audio: add accessor to check if audio is enabledMarc-André Lureau1-0/+1
2014-11-21migration: set session migration during connectMarc-André Lureau1-3/+2
Track the migration session earlier, so that disconnecting before migration finished will abort and release it.
2014-10-10Add "username" property to SpiceSessionDietmar Maurer1-0/+2
2014-04-02Make phodav an optional external dependencyMarc-André Lureau1-1/+9
Now that upstream provides a stable/versioned API, it will be easier to deal with than with submodules.
2014-03-19session: add shared-dir property and optionMarc-André Lureau1-0/+3
Allow to specify the shared directory from the command line, or at runtime via properties. (still default to xdg public share, if none specified)
2014-03-19Add webdav channelMarc-André Lureau1-0/+3
See spice-common for protocol details. phodav, a webdav server library, is imported thanks to a submodule, until this project has a stable API and releases. The webdav channel is reponsible for handling port events and multiplexing the request streams. Extra care has been made to avoid blocking and to enable some fairness between concurrent streams, however this has been particularly tricky and is likely to have some issues left. The webdav server is run in a seperate thread, using libsoup. The client communication is done via a local tcp socket, but protected to only accept local connection and with a pretty strong password. The home directory is exported for the remote to browse, which seems to be a sensible default atm.
2014-02-21channel: add spice_channel_get_error()Marc-André Lureau1-1/+1
Add a function to retrieve the last GError from a channel, this may be useful to provide additional error details to the client.
2014-02-21Make SpiceURI a public APIMarc-André Lureau1-2/+1
Generalize a little bit SpiceProxy to allow easy URI manipulation by clients.
2013-09-13display: unshare the palette cacheMarc-André Lureau1-1/+0
As pointed out by Yonit on the ML: > (1) the palette cache shouldn't be shared among the display channels. I.e., > there should be one instance per channel, and not one instance in > spice-session.
2013-09-13gtk: use GHashTable in display_cacheMarc-André Lureau1-2/+2
The cache code isn't very quick, it shows up in profilers. Using GHashTable allows to simplify the code while making it faster.
2013-04-22playback: support syncing the playback latency via sessionYonit Halperin1-0/+1
2013-04-22channel-playback: provide access to playback properties via the sessionYonit Halperin1-0/+3
Support checking whether an audio playback is active and what its latency is.
2013-04-11session: enforce secure channelsMarc-André Lureau1-1/+1
2013-04-11session: add secure-channels propertyMarc-André Lureau1-0/+1
2013-03-27Keep GSocketConnection around after initial connectChristophe Fergeau1-2/+2
There has been reports of recent spice-gtk versions not working on RHEL6 or Ubuntu 10.04. This happens because these systems have an older glib version without: commit a0e1b226a21ca498b301981b0c89e89ad9a31eb1 Author: Dan Winship <danw@gnome.org> Date: Fri Apr 23 08:47:18 2010 -0400 GSocketConnection: don't close the socket if it's still reffed When disposing a GSocketConnection, don't explicitly close the underlying GSocket. The GSocket will close itself if it gets destroyed, and if it doesn't get destroyed, that presumably means the app still wants to use it. Eg, this lets you use GSocketClient to create a GSocketConnection, and then take the GSocket and destroy the GSocketConnection. https://bugzilla.gnome.org/show_bug.cgi?id=616855 and spice-gtk commit 0f9a432c "session: allow to connect via HTTP CONNECT proxy" changed spice_session_channel_open_host to get its socket by doing: open_host->socket = g_socket_connection_get_socket(connection); g_object_ref(open_host->socket); g_object_unref(connection); (see socket_client_connect_ready) If glib does not have the commit mentioned above, then this won't work as expected as open_host->socket will get closed when 'connection' gets destroyed. This commit changes spice_session_channel_open_host to return a GSocketConnection rather than a GSocket so that we can keep the socket open even on older glib versions. Huge thanks go to Brad Campbell <brad@fnarfbargle.com> for doing all the spice-gtk/glib bisecting work.
2013-01-28proxy: initialize proxy at session construct timeMarc-André Lureau1-0/+2
2012-11-22Add SpiceSession:ca propertyMarc-André Lureau1-0/+2
2012-08-28channel-smartcard: do not attach temporary migration channel to smartcardYonit Halperin1-0/+1
During migration, the smartcard channel that belongs to the temporary copied session shouldn't be active.
2012-08-28seamless migration: don't reset messages data when swapping channelsYonit Halperin1-1/+4
When swapping the src and dest channels's, we need to keep the xmit_queue and msg serials. Their state is expected to stay the same after migration.
2012-07-06Add a desktop-integration helper classHans de Goede1-0/+2
We need to integrate closely with the desktop environment of the user in several cases. Some examples are disabling auto-mounting when auto-usbredir is active (rhbz#812972), and disabling the screensaver when fullscreen (fdo#34793). Unfortuntely these kinds of things require desktop environment specific handling. Therefor this patch introduces a desktop-integration helper class, which is to server as a container for all sort of desktop environment specific functions. For now it just supports disabling automounting under Gnome, but this will be extended in the future. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-05Support name & uuidMarc-André Lureau1-1/+4
Allows a client to identify the server it is connected to.
2012-01-24Change the setting of the images cache size and the glz window sizeYonit Halperin1-0/+12
Set the default sizes to be the same as in the old linux spice client. cache_size=20M pixels (instead of 32M), window_size=8M pixels for a 64MB dev ram (instead of 16M pixels).
2012-01-12Remove the non-interruptible version g_io_wait()Marc-André Lureau1-1/+2
Use the common g_coroutine_socket_wait() https://bugs.freedesktop.org/show_bug.cgi?id=44570
2012-01-08Implement SPICE_MSG_WAIT_FOR_CHANNELSMarc-André Lureau1-0/+1
https://bugs.freedesktop.org/show_bug.cgi?id=44179
2011-12-19Support semi-seamless migrationMarc-André Lureau1-0/+4
Yonit Halperin described the flow, that I followed: (1) when client_migrate_info is called SPICE_MSG_MAIN_MIGRATE_BEGIN is sent to the client. Then, the client should link to the target server (SpiceLinkMess), i.e., connect all the channels, but it shouldn't poll from the target, only from the source. You can refer to RedClient::Migrate class. The connection id in the link message should be the id of the connection to the source server. (2) The client sends to the source server SPICE_MSGC_MAIN_MIGRATE_(CONNECTED|CONNECT_ERROR) (3) When migration completes SPICE_MSG_MAIN_MIGRATE_(END|CANCEL) is sent to the client. (3.1) In case of SPICE_MSG_MAIN_MIGRATE_CANCEL, the client closes the connections to the target. (3.2) In case of SPICE_MSG_MAIN_MIGRATE_END, the client should reset all the data that is related to the connection to the source and complete the transition to the target server (without sending ATTACH_CHANNELS, and without guest display initialization via agent). Then, the client sends SPICE_MSG_MAIN_MIGRATE_END to the target.
2011-11-23Add read-only property on sessionsMarc-André Lureau1-0/+1
It is useful to have a way to prevent sending commands in read-only sessions (think of multi-client) No clipboard sharing allowed in this case in gtk-session.
2011-11-21Release our keyboard grab when we're going to invoke the usb acl helperHans de Goede1-0/+4
The usb acl helper asks policykit, which may want to interact with the user through the policykit agent, which wants to grab the keyboard, if we then have the keyboard grabbed, the agent says authentication has failed, policykit rejects the helper opening up the acl and usbredir won't work. Unfortunately the only way to work around this is to temporarily release our own keyboard grab, not pretty but as discussed on irc, this is the "best" solution. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-11-07Remove g_object_{set,get}_data() usageMarc-André Lureau1-0/+58
This is not really clean, as it may conflict with client usage
2011-10-04Fixup some headers so that they include headers the depend up on.Hans de Goede1-0/+1
Otherwise they cannot be included unless other headers are included first (and in the right order). Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-05-24gtk: add SSL ciphers session propertyMarc-André Lureau1-0/+2
2011-04-03gtk: the caches are shared with the sessionMarc-André Lureau1-0/+9
2011-02-19gtk: add private spice_session_get_{password,host,cert_subject}()Marc-André Lureau1-0/+3
2011-01-26gtk: add "migration-state" enum to make it easier to track migrationsMarc-André Lureau1-1/+2
2011-01-25gtk: move channel verification parameter to sessionMarc-André Lureau1-0/+1
2011-01-25gtk: add 'pubkey' and 'cert-subject' propertiesMarc-André Lureau1-0/+1
2011-01-24gtk: implement MIGRATE_CANCELMarc-André Lureau1-0/+1
2011-01-21gtk: handle seamless migrationsMarc-André Lureau1-0/+3
2011-01-21gtk: add spice_session_new_from_session()Marc-André Lureau1-0/+2
A light copy constructor for migration.
2011-01-21gtk: add spice_session_set_port() private API, use itMarc-André Lureau1-0/+1
2011-01-12gtk: handle MIGRATE_SWITCH_HOSTMarc-André Lureau1-0/+2
2010-12-06gtk: remove old tcp.c codeMarc-André Lureau1-1/+0
2010-12-05gtk: WIP use coroutines and GSocket to connectMarc-André Lureau1-0/+4