summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2014-02-03 15:56:31 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2014-02-21 12:23:16 +0100
commit8cbdc3d2d6ca6d8f9b8e75c0c11f0e89f4427eb2 (patch)
tree44ca328087f86c0bdfc2b9c3d4177c924a8d6332
parent3edcc04f20b8e2360a05e16c337b26404f636081 (diff)
session: add spice_session_get_proxy_uri()
Learn to return the currently configured proxy, to allow client to tweak parameters, such as username and password.
-rw-r--r--doc/reference/spice-gtk-sections.txt1
-rw-r--r--gtk/map-file1
-rw-r--r--gtk/spice-glib-sym-file1
-rw-r--r--gtk/spice-session.c14
-rw-r--r--gtk/spice-session.h1
5 files changed, 18 insertions, 0 deletions
diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt
index 9f0cf67..08b1b4e 100644
--- a/doc/reference/spice-gtk-sections.txt
+++ b/doc/reference/spice-gtk-sections.txt
@@ -28,6 +28,7 @@ spice_session_disconnect
spice_session_get_channels
spice_session_get_read_only
spice_session_has_channel_type
+spice_session_get_proxy_uri
<SUBSECTION>
SpiceSessionMigration
SpiceSessionVerify
diff --git a/gtk/map-file b/gtk/map-file
index d9e596b..f98680c 100644
--- a/gtk/map-file
+++ b/gtk/map-file
@@ -90,6 +90,7 @@ spice_session_migration_get_type;
spice_session_new;
spice_session_open_fd;
spice_session_verify_get_type;
+spice_session_get_proxy_uri;
spice_set_session_option;
spice_smartcard_channel_get_type;
spice_smartcard_manager_get;
diff --git a/gtk/spice-glib-sym-file b/gtk/spice-glib-sym-file
index b90736b..2aa17cb 100644
--- a/gtk/spice-glib-sym-file
+++ b/gtk/spice-glib-sym-file
@@ -105,3 +105,4 @@ spice_uri_set_port
spice_uri_set_scheme
spice_uri_set_user
spice_uri_to_string
+spice_session_get_proxy_uri
diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 859f3cd..09556dc 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -2189,3 +2189,17 @@ guint32 spice_session_get_playback_latency(SpiceSession *session)
return 0;
}
}
+
+/**
+ * spice_session_get_proxy_uri:
+ * @session: a #SpiceSession
+ *
+ * Returns: (transfer none): the session proxy #SpiceURI or %NULL.
+ * Since: 0.24
+ **/
+SpiceURI *spice_session_get_proxy_uri(SpiceSession *session)
+{
+ SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
+
+ return s->proxy;
+}
diff --git a/gtk/spice-session.h b/gtk/spice-session.h
index 4ea645e..665c609 100644
--- a/gtk/spice-session.h
+++ b/gtk/spice-session.h
@@ -93,6 +93,7 @@ void spice_session_disconnect(SpiceSession *session);
GList *spice_session_get_channels(SpiceSession *session);
gboolean spice_session_has_channel_type(SpiceSession *session, gint type);
gboolean spice_session_get_read_only(SpiceSession *session);
+SpiceURI *spice_session_get_proxy_uri(SpiceSession *session);
G_END_DECLS