[gnome-settings-daemon] smartcard: add screensaver proxy



commit caf75452455fdf3b8e6b8dbdabc9f0da3e77fa7c
Author: Ray Strode <rstrode redhat com>
Date:   Sun Jul 28 22:19:18 2013 -0400

    smartcard: add screensaver proxy
    
    We're going to need to be able to lock the screen in some
    cases when a user removes their smartcard.
    
    This commit adds the goo needed to get access to the lock
    screen.

 plugins/smartcard/Makefile.am               |   14 ++++++++-
 plugins/smartcard/org.gnome.ScreenSaver.xml |   45 +++++++++++++++++++++++++++
 2 files changed, 58 insertions(+), 1 deletions(-)
---
diff --git a/plugins/smartcard/Makefile.am b/plugins/smartcard/Makefile.am
index 3ba5abd..62f85e7 100644
--- a/plugins/smartcard/Makefile.am
+++ b/plugins/smartcard/Makefile.am
@@ -2,8 +2,9 @@ plugin_name = smartcard
 libsmartcard_headers = gsd-smartcard-manager.h \
                       gsd-smartcard-utils.h
 dbus_built_sources = org.gnome.SettingsDaemon.Smartcard.c org.gnome.SettingsDaemon.Smartcard.h
+screensaver_dbus_built_sources = org.gnome.ScreenSaver.c org.gnome.ScreenSaver.h
 enum_built_sources = gsd-smartcard-enum-types.h gsd-smartcard-enum-types.c
-BUILT_SOURCES = $(dbus_built_sources) $(enum_built_sources)
+BUILT_SOURCES = $(dbus_built_sources) $(screensaver_dbus_built_sources) $(enum_built_sourcs)
 
 libexec_PROGRAMS = gsd-test-smartcard
 
@@ -18,6 +19,15 @@ $(dbus_built_sources) : Makefile.am org.gnome.SettingsDaemon.Smartcard.xml
        --generate-c-code org.gnome.SettingsDaemon.Smartcard \
        $(srcdir)/org.gnome.SettingsDaemon.Smartcard.xml
 
+$(screensaver_dbus_built_sources) : Makefile.am org.gnome.ScreenSaver.xml
+       gdbus-codegen                                           \
+               --interface-prefix org.gnome.ScreenSaver.       \
+               --generate-c-code org.gnome.ScreenSaver         \
+               --c-namespace Gsd                               \
+               --annotate "org.gnome.ScreenSaver"              \
+                          "org.gtk.GDBus.C.Name" ScreenSaver   \
+               $(srcdir)/org.gnome.ScreenSaver.xml
+
 gsd-smartcard-enum-types.h: gsd-smartcard-enum-types.h.in $(libsmartcard_headers)
        $(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@
 
@@ -26,6 +36,7 @@ gsd-smartcard-enum-types.c: gsd-smartcard-enum-types.c.in $(libsmartcard_headers
 
 gsd_test_smartcard_SOURCES =        \
        $(dbus_built_sources)   \
+       $(screensaver_dbus_built_sources) \
        $(enum_built_sources)   \
        gsd-smartcard-service.c \
        gsd-smartcard-manager.c \
@@ -60,6 +71,7 @@ gsd_test_smartcard_LDADD =                                      \
 libsmartcard_la_SOURCES = \
        $(libsmartcard_headers) \
        $(dbus_built_sources) \
+       $(screensaver_dbus_built_sources) \
        $(enum_built_sources) \
        gsd-smartcard-manager.c \
        gsd-smartcard-plugin.c  \
diff --git a/plugins/smartcard/org.gnome.ScreenSaver.xml b/plugins/smartcard/org.gnome.ScreenSaver.xml
new file mode 100644
index 0000000..7a6cf86
--- /dev/null
+++ b/plugins/smartcard/org.gnome.ScreenSaver.xml
@@ -0,0 +1,45 @@
+<!DOCTYPE node PUBLIC
+        "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+        "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd";>
+
+<!--
+        Copyright (C) 2013 Red Hat, Inc.
+
+        This library is free software; you can redistribute it and/or
+        modify it under the terms of the GNU Lesser General Public
+        License as published by the Free Software Foundation; either
+        version 2 of the License, or (at your option) any later version.
+
+        This library is distributed in the hope that it will be useful,
+        but WITHOUT ANY WARRANTY; without even the implied warranty of
+        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+        Lesser General Public License for more details.
+
+        You should have received a copy of the GNU Lesser General
+        Public License along with this library; if not, write to the
+        Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+        Boston, MA 02111-1307, USA.
+-->
+
+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd";>
+        <!--
+        org.gnome.ScreenSaver:
+
+        An interface used for managing the lock screen.
+        -->
+        <interface name="org.gnome.ScreenSaver">
+                <method name="Lock" />
+                <method name="GetActive">
+                        <arg name="active" direction="out" type="b" />
+                </method>
+                <method name="SetActive">
+                        <arg name="value" direction="in" type="b" />
+                </method>
+                <method name="GetActiveTime">
+                        <arg name="value" direction="out" type="u" />
+                </method>
+                <signal name="ActiveChanged">
+                        <arg name="new_value" type="b" />
+                </signal>
+        </interface>
+</node>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]