[RFC,spice-vdagent,14/18] session-info: remove session_info_get_fd()

Submitted by Jakub Janku on Aug. 14, 2018, 6:53 p.m.

Details

Message ID 20180814185352.6080-15-jjanku@redhat.com
State New
Headers show
Series "GLib integration" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Jakub Janku Aug. 14, 2018, 6:53 p.m.
In console-kit.c, FD polling is handled internally by GDBus.

In systemd-login.c, FD is integrated into the GMainLoop
using GIOChannel.

Users of session-info.h are notified by ActiveSessionChangeCb
when the active session changes.

This renders the session_info_get_fd() obsolete.
---
 src/vdagentd/console-kit.c        | 5 -----
 src/vdagentd/dummy-session-info.c | 5 -----
 src/vdagentd/session-info.h       | 2 --
 src/vdagentd/systemd-login.c      | 5 -----
 4 files changed, 17 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/vdagentd/console-kit.c b/src/vdagentd/console-kit.c
index 4c02ebe..390491e 100644
--- a/src/vdagentd/console-kit.c
+++ b/src/vdagentd/console-kit.c
@@ -199,11 +199,6 @@  void session_info_destroy(struct session_info *info)
     free(info);
 }
 
-int session_info_get_fd(struct session_info *info)
-{
-    return -1;
-}
-
 /* Invoke a method on a remote object through DBus and wait for reply.
  *
  * Return type must be one of G_VARIANT_TYPE_STRING, G_VARIANT_TYPE_SIGNATURE,
diff --git a/src/vdagentd/dummy-session-info.c b/src/vdagentd/dummy-session-info.c
index b2306d7..d1a2435 100644
--- a/src/vdagentd/dummy-session-info.c
+++ b/src/vdagentd/dummy-session-info.c
@@ -30,11 +30,6 @@  void session_info_destroy(struct session_info *si)
 {
 }
 
-int session_info_get_fd(struct session_info *si)
-{
-    return -1;
-}
-
 const char *session_info_get_active_session(struct session_info *si)
 {
     return NULL;
diff --git a/src/vdagentd/session-info.h b/src/vdagentd/session-info.h
index 2f21347..70bf4a5 100644
--- a/src/vdagentd/session-info.h
+++ b/src/vdagentd/session-info.h
@@ -33,8 +33,6 @@  typedef void (*ActiveSessionChangeCb)(const gchar *session);
 struct session_info *session_info_create(int verbose, ActiveSessionChangeCb cb);
 void session_info_destroy(struct session_info *ck);
 
-int session_info_get_fd(struct session_info *ck);
-
 const char *session_info_get_active_session(struct session_info *ck);
 /* Note result must be free()-ed by caller */
 char *session_info_session_for_pid(struct session_info *ck, uint32_t pid);
diff --git a/src/vdagentd/systemd-login.c b/src/vdagentd/systemd-login.c
index 2afd0dd..0940230 100644
--- a/src/vdagentd/systemd-login.c
+++ b/src/vdagentd/systemd-login.c
@@ -143,11 +143,6 @@  void session_info_destroy(struct session_info *si)
     free(si);
 }
 
-int session_info_get_fd(struct session_info *si)
-{
-    return sd_login_monitor_get_fd(si->mon);
-}
-
 const char *session_info_get_active_session(struct session_info *si)
 {
     int r;