From b1800fd11ab5297585e0c2beb12b7fc058430bc1 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 22 Oct 2017 21:26:00 +0200 Subject: Fork from unity-greeter-session-broadcast. --- .bzr-builddeb/default.conf | 2 - CMakeLists.txt | 5 +- data/CMakeLists.txt | 14 ++-- .../ayatana-greeter-session-broadcast-session.conf | 31 +++++++ data/com.canonical.Unity.Greeter.Broadcast.conf | 21 ----- ...m.canonical.Unity.Greeter.Broadcast.gschema.xml | 13 --- ...om.canonical.Unity.Greeter.Broadcast.service.in | 4 - data/com.canonical.Unity.Greeter.Broadcast.xml | 50 ------------ data/org.ayatana.Desktop.Greeter.Broadcast.conf | 21 +++++ ...g.ayatana.Desktop.Greeter.Broadcast.gschema.xml | 13 +++ ...rg.ayatana.Desktop.Greeter.Broadcast.service.in | 4 + data/org.ayatana.Desktop.Greeter.Broadcast.xml | 50 ++++++++++++ data/unity-greeter-session-broadcast-session.conf | 31 ------- debian/changelog | 94 +-------------------- debian/control | 44 ++++------ ...libunity-greeter-session-broadcast1-dev.install | 3 - debian/libunity-greeter-session-broadcast1.install | 1 - debian/rules | 4 + debian/unity-greeter-session-broadcast.install | 5 -- .../CMakeLists.txt | 95 ++++++++++++++++++++++ .../ayatana-greeter-session-broadcast.c | 24 ++++++ .../ayatana-greeter-session-broadcast.h | 35 ++++++++ .../ayatana-greeter-session-broadcast.pc.in | 11 +++ libunity-greeter-session-broadcast/CMakeLists.txt | 95 ---------------------- .../unity-greeter-session-broadcast.c | 27 ------ .../unity-greeter-session-broadcast.h | 35 -------- .../unity-greeter-session-broadcast.pc.in | 11 --- service/CMakeLists.txt | 8 +- service/service.c | 42 +++++----- test-call.sh | 2 +- tests/manual | 4 +- 31 files changed, 348 insertions(+), 451 deletions(-) delete mode 100644 .bzr-builddeb/default.conf create mode 100644 data/ayatana-greeter-session-broadcast-session.conf delete mode 100644 data/com.canonical.Unity.Greeter.Broadcast.conf delete mode 100644 data/com.canonical.Unity.Greeter.Broadcast.gschema.xml delete mode 100644 data/com.canonical.Unity.Greeter.Broadcast.service.in delete mode 100644 data/com.canonical.Unity.Greeter.Broadcast.xml create mode 100644 data/org.ayatana.Desktop.Greeter.Broadcast.conf create mode 100644 data/org.ayatana.Desktop.Greeter.Broadcast.gschema.xml create mode 100644 data/org.ayatana.Desktop.Greeter.Broadcast.service.in create mode 100644 data/org.ayatana.Desktop.Greeter.Broadcast.xml delete mode 100644 data/unity-greeter-session-broadcast-session.conf delete mode 100644 debian/libunity-greeter-session-broadcast1-dev.install delete mode 100644 debian/libunity-greeter-session-broadcast1.install delete mode 100644 debian/unity-greeter-session-broadcast.install create mode 100644 libayatana-greeter-session-broadcast/CMakeLists.txt create mode 100644 libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.c create mode 100644 libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.h create mode 100644 libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.pc.in delete mode 100644 libunity-greeter-session-broadcast/CMakeLists.txt delete mode 100644 libunity-greeter-session-broadcast/unity-greeter-session-broadcast.c delete mode 100644 libunity-greeter-session-broadcast/unity-greeter-session-broadcast.h delete mode 100644 libunity-greeter-session-broadcast/unity-greeter-session-broadcast.pc.in diff --git a/.bzr-builddeb/default.conf b/.bzr-builddeb/default.conf deleted file mode 100644 index 6c96a98..0000000 --- a/.bzr-builddeb/default.conf +++ /dev/null @@ -1,2 +0,0 @@ -[BUILDDEB] -split = True diff --git a/CMakeLists.txt b/CMakeLists.txt index 37fdccd..a460784 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,9 @@ -project(unity-greeter-session-broadcast C) +project(ayatana-greeter-session-broadcast C) cmake_minimum_required(VERSION 2.8.9) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") +set (PROJECT_VERSION "0.1.1") set(PACKAGE ${CMAKE_PROJECT_NAME}) set(GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME}) @@ -67,7 +68,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -fPIC") add_subdirectory(data) add_subdirectory(service) -#add_subdirectory(libunity-greeter-session-broadcast) +#add_subdirectory(libayatana-greeter-session-broadcast) # TODO # enable_testing() diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index d00c9ef..33bae7f 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -5,7 +5,7 @@ install( FILES -com.canonical.Unity.Greeter.Broadcast.xml +org.ayatana.Desktop.Greeter.Broadcast.xml DESTINATION ${DBUSIFACEDIR} ) @@ -15,7 +15,7 @@ DESTINATION ${DBUSIFACEDIR} install( FILES -com.canonical.Unity.Greeter.Broadcast.conf +org.ayatana.Desktop.Greeter.Broadcast.conf DESTINATION ${DBUSSYSCONFDIR}/dbus-1/system.d ) @@ -24,11 +24,11 @@ DESTINATION ${DBUSSYSCONFDIR}/dbus-1/system.d ########################### set(BROADCAST_SERVICE -"${CMAKE_CURRENT_BINARY_DIR}/com.canonical.Unity.Greeter.Broadcast.service" +"${CMAKE_CURRENT_BINARY_DIR}/org.ayatana.Desktop.Greeter.Broadcast.service" ) -set(pkglibexecdir "${CMAKE_INSTALL_FULL_LIBEXECDIR}/unity-greeter-session-broadcast") -configure_file("com.canonical.Unity.Greeter.Broadcast.service.in" +set(pkglibexecdir "${CMAKE_INSTALL_FULL_LIBEXECDIR}/ayatana-greeter-session-broadcast") +configure_file("org.ayatana.Desktop.Greeter.Broadcast.service.in" "${BROADCAST_SERVICE}" @ONLY ) @@ -44,7 +44,7 @@ DESTINATION ${DBUSSERVICEDIR} ########################### set(SESSION_UPSTART -"${CMAKE_CURRENT_SOURCE_DIR}/unity-greeter-session-broadcast-session.conf" +"${CMAKE_CURRENT_SOURCE_DIR}/ayatana-greeter-session-broadcast-session.conf" ) install( @@ -57,4 +57,4 @@ DESTINATION "/usr/share/upstart/sessions" # GSettings ########################### -add_schema ("com.canonical.Unity.Greeter.Broadcast.gschema.xml") +add_schema ("org.ayatana.Desktop.Greeter.Broadcast.gschema.xml") diff --git a/data/ayatana-greeter-session-broadcast-session.conf b/data/ayatana-greeter-session-broadcast-session.conf new file mode 100644 index 0000000..db4257c --- /dev/null +++ b/data/ayatana-greeter-session-broadcast-session.conf @@ -0,0 +1,31 @@ +description "Desktop Greeter Session Broadcast Session Component" +author "Ted Gould " + +task + +#TODO: Check GSettings Key +start on dbus BUS=system SIGNAL="StartUrl" INTERFACE="org.ayatana.Desktop.Greeter.Broadcast" OBJPATH="/org/ayatana/Desktop/Greeter/Broadcast" + +pre-start script + if [ -z $ARG0 ] ; then + stop + exit 1 + fi + if [ $ARG0 != $USER ] ; then + stop + exit 1 + fi + + OWNER=`gdbus call --system --dest org.freedesktop.DBus --object-path / --method org.freedesktop.DBus.GetNameOwner org.ayatana.Desktop.Greeter.Broadcast | cut -d "'" -f 2` + + if [ -z $OWNER ] ; then + stop + exit 1 + fi + if [ $OWNER != $SENDER ] ; then + stop + exit 1 + fi +end script + +exec url-dispatcher ${ARG1} diff --git a/data/com.canonical.Unity.Greeter.Broadcast.conf b/data/com.canonical.Unity.Greeter.Broadcast.conf deleted file mode 100644 index 8a8cfe6..0000000 --- a/data/com.canonical.Unity.Greeter.Broadcast.conf +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/data/com.canonical.Unity.Greeter.Broadcast.gschema.xml b/data/com.canonical.Unity.Greeter.Broadcast.gschema.xml deleted file mode 100644 index f9fbf22..0000000 --- a/data/com.canonical.Unity.Greeter.Broadcast.gschema.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - Allow the Greeter to start URLs in this session - - The key controls whether the service in the session will listen - for and react to the request from the greeter to start an url - from the greeter. - - true - - - diff --git a/data/com.canonical.Unity.Greeter.Broadcast.service.in b/data/com.canonical.Unity.Greeter.Broadcast.service.in deleted file mode 100644 index 9cfe989..0000000 --- a/data/com.canonical.Unity.Greeter.Broadcast.service.in +++ /dev/null @@ -1,4 +0,0 @@ -[D-BUS Service] -Name=com.canonical.Unity.Greeter.Broadcast -Exec=@pkglibexecdir@/unity-greeter-session-broadcast-service -User=root diff --git a/data/com.canonical.Unity.Greeter.Broadcast.xml b/data/com.canonical.Unity.Greeter.Broadcast.xml deleted file mode 100644 index 5a4276a..0000000 --- a/data/com.canonical.Unity.Greeter.Broadcast.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/data/org.ayatana.Desktop.Greeter.Broadcast.conf b/data/org.ayatana.Desktop.Greeter.Broadcast.conf new file mode 100644 index 0000000..3e42f6b --- /dev/null +++ b/data/org.ayatana.Desktop.Greeter.Broadcast.conf @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/data/org.ayatana.Desktop.Greeter.Broadcast.gschema.xml b/data/org.ayatana.Desktop.Greeter.Broadcast.gschema.xml new file mode 100644 index 0000000..2ea105d --- /dev/null +++ b/data/org.ayatana.Desktop.Greeter.Broadcast.gschema.xml @@ -0,0 +1,13 @@ + + + + Allow the Greeter to start URLs in this session + + The key controls whether the service in the session will listen + for and react to the request from the greeter to start an url + from the greeter. + + true + + + diff --git a/data/org.ayatana.Desktop.Greeter.Broadcast.service.in b/data/org.ayatana.Desktop.Greeter.Broadcast.service.in new file mode 100644 index 0000000..9ba7a60 --- /dev/null +++ b/data/org.ayatana.Desktop.Greeter.Broadcast.service.in @@ -0,0 +1,4 @@ +[D-BUS Service] +Name=org.ayatana.Desktop.Greeter.Broadcast +Exec=@pkglibexecdir@/ayatana-greeter-session-broadcast-service +User=root diff --git a/data/org.ayatana.Desktop.Greeter.Broadcast.xml b/data/org.ayatana.Desktop.Greeter.Broadcast.xml new file mode 100644 index 0000000..af9393a --- /dev/null +++ b/data/org.ayatana.Desktop.Greeter.Broadcast.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/unity-greeter-session-broadcast-session.conf b/data/unity-greeter-session-broadcast-session.conf deleted file mode 100644 index 7f45187..0000000 --- a/data/unity-greeter-session-broadcast-session.conf +++ /dev/null @@ -1,31 +0,0 @@ -description "Unity Greeter Session Broadcast Session Component" -author "Ted Gould " - -task - -#TODO: Check GSettings Key -start on dbus BUS=system SIGNAL="StartUrl" INTERFACE="com.canonical.Unity.Greeter.Broadcast" OBJPATH="/com/canonical/Unity/Greeter/Broadcast" - -pre-start script - if [ -z $ARG0 ] ; then - stop - exit 1 - fi - if [ $ARG0 != $USER ] ; then - stop - exit 1 - fi - - OWNER=`gdbus call --system --dest org.freedesktop.DBus --object-path / --method org.freedesktop.DBus.GetNameOwner com.canonical.Unity.Greeter.Broadcast | cut -d "'" -f 2` - - if [ -z $OWNER ] ; then - stop - exit 1 - fi - if [ $OWNER != $SENDER ] ; then - stop - exit 1 - fi -end script - -exec url-dispatcher ${ARG1} diff --git a/debian/changelog b/debian/changelog index 9d64069..b21d873 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,92 +1,6 @@ -unity-greeter-session-broadcast (0.1+14.10.20140601-0ubuntu1) utopic; urgency=low +ayatana-greeter-session-broadcast (0.1.1-0) UNRELEASED; urgency=low - [ Ted Gould ] - * UAL name change + * Upstream-provided Debian package for ayatana-greeter-session-broadcast. + See upstream ChangeLog for recent changes. - -- Ubuntu daily release Sun, 01 Jun 2014 21:36:48 +0000 - -unity-greeter-session-broadcast (0.1+14.04.20140324-0ubuntu1) trusty; urgency=low - - [ Michael Terry ] - * Switch to handling URLs instead of AppIDs. - - [ Ted Gould ] - * Sound menu action support - - -- Ubuntu daily release Mon, 24 Mar 2014 14:57:45 +0000 - -unity-greeter-session-broadcast (0.1+14.04.20140217.1-0ubuntu1) trusty; urgency=low - - [ Ted Gould ] - * Use new Upstart dbus syntax. - * Merge policy and manual test. - * Flushing trunk with a release - - [ Didier Roche ] - * Add libupstart-app-launch2-dev build-dep, which isn't needed itself - but it enables to not build on archs unsupported by upstart-app- - launch (which is a binary dep). - - -- Ubuntu daily release Mon, 17 Feb 2014 18:05:24 +0000 - -unity-greeter-session-broadcast (0.1+13.10.20130924.1-0ubuntu1) saucy; urgency=low - - [ Michael Terry ] - * Add a RequestHomeShown method and ShowHome signal for when we want - the dash to show itself and hide the applications. - - [ Ubuntu daily release ] - * Automatic snapshot from revision 25 - - -- Ubuntu daily release Tue, 24 Sep 2013 06:03:43 +0000 - -unity-greeter-session-broadcast (0.1+13.10.20130902-0ubuntu1) saucy; urgency=low - - [ Michael Terry ] - * Don't build or install the library right now. It's not finished and - isn't used yet. - - [ Ted Gould ] - * Get name owner and make sure it matches the sender. - - [ Ubuntu daily release ] - * Automatic snapshot from revision 23 - - -- Ubuntu daily release Mon, 02 Sep 2013 02:04:14 +0000 - -unity-greeter-session-broadcast (0.1+13.10.20130830.2-0ubuntu1) saucy; urgency=low - - * Automatic snapshot from revision 20 - - -- Ubuntu daily release Fri, 30 Aug 2013 10:04:18 +0000 - -unity-greeter-session-broadcast (0.1+13.10.20130830.1-0ubuntu1) saucy; urgency=low - - [ Łukasz 'sil2100' Zemczak ] - * Remove debian/watch - * debian/control: - - Modifications related to compliance with our packaging standards - * Added copyright info in the source code - * Automatic snapshot from revision 14 (bootstrap) - - [ Michael Terry ] - * Implement the basic service. Adds RequestApplicationStart method - which sends out a StartApplication signal. - * Fix licensing to specify GPL-3 or LGPL-3 as appropriate. - - [ Ted Gould ] - * Signal the start instead of starting it directly. - - [ Łukasz 'sil2100' Zemczak ] - * The name for copyright is COPYING, not COPYRIGHT in our projects - - [ Ubuntu daily release ] - * Automatic snapshot from revision 19 - - -- Ubuntu daily release Fri, 30 Aug 2013 06:04:22 +0000 - -unity-greeter-session-broadcast (0.1-0ubuntu1) saucy; urgency=low - - * Start - - -- Ted Gould Thu, 27 Jun 2013 11:36:18 -0500 + -- Mike Gabriel Sun, 22 Oct 2017 21:36:48 +0200 diff --git a/debian/control b/debian/control index 0faec98..76cb1cd 100644 --- a/debian/control +++ b/debian/control @@ -1,49 +1,41 @@ -Source: unity-greeter-session-broadcast -Section: gnome +Source: ayatana-greeter-session-broadcast +Section: x11 Priority: optional -Maintainer: Ubuntu Developers +Maintainer: Mike Gabriel Build-Depends: cmake, dbus-test-runner, debhelper (>= 9), + dpkg-dev (>= 1.16.1.1), dh-autoreconf, - gtester2xunit, intltool, libdbus-1-dev, libdbustest1-dev, libglib2.0-bin, python3-dbusmock, -# This build-dep isn't needed as per itself, but it enables to not build -# on archs unsupported by ubuntu-app-launch which is a binary dep - libubuntu-app-launch2-dev, -Standards-Version: 3.9.4 -Homepage: http://launchpad.net/unity-greeter-session-broadcast -# If you aren't a member of ~indicator-applet-developers but need to upload -# packaging changes, just go ahead. ~indicator-applet-developers will notice -# and sync up the code again. -Vcs-Bzr: http://bazaar.launchpad.net/~indicator-applet-developers/unity-greeter-session-broadcast/ -Vcs-Browser: https://code.launchpad.net/~indicator-applet-developers/unity-greeter-session-broadcast/ +Standards-Version: 4.1.1 +Homepage: https://github.com/AyatanaIndicators/ayatana-greeter-session-broadcast +Vcs-Git: git://cgit.arctica-project.org/ayatana/ayatana-ido.git +Vcs-Browser: https://cgit.arctica-project.org/ayatana/ayatana-ido.git/ -Package: unity-greeter-session-broadcast +Package: ayatana-greeter-session-broadcast Architecture: any -Depends: upstart (>= 1.10-0ubuntu2), - url-dispatcher-tools, - ${misc:Depends}, +Depends: ${misc:Depends}, ${shlibs:Depends}, -Description: Service to allow the greeter to communicate to sessions - Allows for the greeter to send events that can be picked up by the user's - session and acted on if allowed by the user. +Description: Service to allow a LightDM greeter to communicate to a desktop session + Allows for the LightDM greeter to send events that can be picked up by + the user's session and acted upon if allowed by the user. . - This package provides a service for Unity's Greeter Session Broadcast + This package provides the Ayatana Greeter Session Broadcast service. -#Package: libunity-greeter-session-broadcast1 +#Package: libayatana-greeter-session-broadcast1 #Section: libs #Architecture: any #Depends: ${misc:Depends}, # ${shlibs:Depends}, #Pre-Depends: ${misc:Pre-Depends}, #Multi-Arch: same -#Recommends: unity-greeter-session-broadcast (= ${binary:Version}), -#Description: library for sending requests to the user session +#Recommends: ayatana-greeter-session-broadcast (= ${binary:Version}), +#Description: Library for sending requests to the user session # Sends requests to the broadcast service so that they can be seen # by the user session. # . @@ -57,7 +49,7 @@ Description: Service to allow the greeter to communicate to sessions # ${misc:Depends}, # ${shlibs:Depends}, #Multi-Arch: same -#Description: library for sending requests to the user session +#Description: Library for sending requests to the user session (development files) # Sends requests to the broadcast service so that they can be seen # by the user session. # . diff --git a/debian/libunity-greeter-session-broadcast1-dev.install b/debian/libunity-greeter-session-broadcast1-dev.install deleted file mode 100644 index f66ca7a..0000000 --- a/debian/libunity-greeter-session-broadcast1-dev.install +++ /dev/null @@ -1,3 +0,0 @@ -debian/tmp/usr/include/libunity-greeter-session-broadcast-1/* -debian/tmp/usr/lib/*/libunity-greeter-session-broadcast.so -debian/tmp/usr/lib/*/pkgconfig/unity-greeter-session-broadcast-1.pc diff --git a/debian/libunity-greeter-session-broadcast1.install b/debian/libunity-greeter-session-broadcast1.install deleted file mode 100644 index 28cc930..0000000 --- a/debian/libunity-greeter-session-broadcast1.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/lib/*/libunity-greeter-session-broadcast.so.1* diff --git a/debian/rules b/debian/rules index 621e27b..717d80b 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,10 @@ export DPKG_GENSYMBOLS_CHECK_LEVEL = 4 export G_MESSAGES_DEBUG=all +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + %: dh $@ diff --git a/debian/unity-greeter-session-broadcast.install b/debian/unity-greeter-session-broadcast.install deleted file mode 100644 index 4a7f626..0000000 --- a/debian/unity-greeter-session-broadcast.install +++ /dev/null @@ -1,5 +0,0 @@ -etc/dbus-1 -usr/lib/*/unity-greeter-session-broadcast -usr/share/dbus-1 -usr/share/glib-2.0 -usr/share/upstart/sessions diff --git a/libayatana-greeter-session-broadcast/CMakeLists.txt b/libayatana-greeter-session-broadcast/CMakeLists.txt new file mode 100644 index 0000000..4ecaff7 --- /dev/null +++ b/libayatana-greeter-session-broadcast/CMakeLists.txt @@ -0,0 +1,95 @@ + +########################### +# Version Information +########################### + +set(API_VERSION 1) +set(ABI_VERSION 1) + +########################### +# Generated Lib +########################### + +set(GENERATED_HEADERS +service-iface.h +) + +set(GENERATED_SOURCES +service-iface.c +) + +add_gdbus_codegen( +OUTFILES GENERATED_SOURCES +NAME service-iface +PREFIX org.ayatana.Desktop.Greeter.Broadcast. +NAMESPACE _ServiceIface +SERVICE_XML ${CMAKE_CURRENT_SOURCE_DIR}/../data/org.ayatana.Desktop.Greeter.Broadcast.xml +) + +add_library(generated STATIC ${GENERATED_SOURCES}) + +target_link_libraries(generated +${GLIB2_LIBRARIES} +${GOBJECT2_LIBRARIES} +${GIO2_LIBRARIES} +) + +########################### +# Lib +########################### + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") + +set(BROADCAST_HEADERS +ayatana-greeter-session-broadcast.h +) + +set(BROADCAST_SOURCES +ayatana-greeter-session-broadcast.c +) + +add_library(broadcast SHARED ${BROADCAST_SOURCES}) + +set_target_properties(broadcast PROPERTIES + VERSION ${API_VERSION}.0.0 + SOVERSION ${ABI_VERSION} + OUTPUT_NAME "ayatana-greeter-session-broadcast" +) + +target_link_libraries(broadcast +generated +${GLIB2_LIBRARIES} +${GOBJECT2_LIBRARIES} +-Wl,--no-undefined +) + +########################### +# Pkg Config +########################### + +set(BROADCAST_PC "ayatana-greeter-session-broadcast-${API_VERSION}.pc") +set(apiversion "${API_VERSION}") +set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") +set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") +set(VERSION "${ABI_VERSION}") + +configure_file("ayatana-greeter-session-broadcast.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/${BROADCAST_PC}" @ONLY) + +########################### +# Installation +########################### + +install( + FILES ${BROADCAST_HEADERS} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libayatana-greeter-session-broadcast-${API_VERSION}" +) + +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/${BROADCAST_PC}" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" +) + +install( + TARGETS broadcast + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) diff --git a/libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.c b/libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.c new file mode 100644 index 0000000..f603efc --- /dev/null +++ b/libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.c @@ -0,0 +1,24 @@ +/** + * Copyright (C) 2013 Canonical, Ltd. + * + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License version 3, as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, + * SATISFACTORY QUALITY, 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 program. If not, see . + * + */ + +#include "ayatana-greeter-session-broadcast.h" + +void +ayatana_session_greeter_broadcast_request_app_start (const gchar * username, const gchar * app_id) +{ + return; +} diff --git a/libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.h b/libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.h new file mode 100644 index 0000000..0f00e27 --- /dev/null +++ b/libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.h @@ -0,0 +1,35 @@ +/** + * Copyright (C) 2013 Canonical, Ltd. + * + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License version 3, as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, + * SATISFACTORY QUALITY, 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 program. If not, see . + * + */ + +#include + +#ifndef __AYATANA_GREETER_SESSION_BROADCAST_H__ +#define __AYATANA_GREETER_SESSION_BROADCAST_H__ 1 + +#pragma GCC visibility push(default) + +G_BEGIN_DECLS + +void +ayatana_session_greeter_broadcast_request_app_start (const gchar * username, + const gchar * app_id); + +G_END_DECLS + +#pragma GCC visibility pop + +#endif /* __AYATANA_GREETER_SESSION_BROADCAST_H__ */ diff --git a/libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.pc.in b/libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.pc.in new file mode 100644 index 0000000..3932a85 --- /dev/null +++ b/libayatana-greeter-session-broadcast/ayatana-greeter-session-broadcast.pc.in @@ -0,0 +1,11 @@ +libdir=@libdir@ +includedir=@includedir@ + +Cflags: -I${includedir}/libayatana-greeter-session-broadcast-@apiversion@ +Requires: glib-2.0 gio-2.0 +Libs: -L${libdir} -layatana-greeter-session-broadcast + +Name: libayatana-greeter-session-broadcast +Description: Library to let a LightDM greeter request a session to do something. +Version: @VERSION@ + diff --git a/libunity-greeter-session-broadcast/CMakeLists.txt b/libunity-greeter-session-broadcast/CMakeLists.txt deleted file mode 100644 index 7db1f6d..0000000 --- a/libunity-greeter-session-broadcast/CMakeLists.txt +++ /dev/null @@ -1,95 +0,0 @@ - -########################### -# Version Information -########################### - -set(API_VERSION 1) -set(ABI_VERSION 1) - -########################### -# Generated Lib -########################### - -set(GENERATED_HEADERS -service-iface.h -) - -set(GENERATED_SOURCES -service-iface.c -) - -add_gdbus_codegen( -OUTFILES GENERATED_SOURCES -NAME service-iface -PREFIX com.canonical.Unity.Greeter.Broadcast. -NAMESPACE _ServiceIface -SERVICE_XML ${CMAKE_CURRENT_SOURCE_DIR}/../data/com.canonical.Unity.Greeter.Broadcast.xml -) - -add_library(generated STATIC ${GENERATED_SOURCES}) - -target_link_libraries(generated -${GLIB2_LIBRARIES} -${GOBJECT2_LIBRARIES} -${GIO2_LIBRARIES} -) - -########################### -# Lib -########################### - -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") - -set(BROADCAST_HEADERS -unity-greeter-session-broadcast.h -) - -set(BROADCAST_SOURCES -unity-greeter-session-broadcast.c -) - -add_library(broadcast SHARED ${BROADCAST_SOURCES}) - -set_target_properties(broadcast PROPERTIES - VERSION ${API_VERSION}.0.0 - SOVERSION ${ABI_VERSION} - OUTPUT_NAME "unity-greeter-session-broadcast" -) - -target_link_libraries(broadcast -generated -${GLIB2_LIBRARIES} -${GOBJECT2_LIBRARIES} --Wl,--no-undefined -) - -########################### -# Pkg Config -########################### - -set(BROADCAST_PC "unity-greeter-session-broadcast-${API_VERSION}.pc") -set(apiversion "${API_VERSION}") -set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") -set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") -set(VERSION "${ABI_VERSION}") - -configure_file("unity-greeter-session-broadcast.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/${BROADCAST_PC}" @ONLY) - -########################### -# Installation -########################### - -install( - FILES ${BROADCAST_HEADERS} - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libunity-greeter-session-broadcast-${API_VERSION}" -) - -install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/${BROADCAST_PC}" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" -) - -install( - TARGETS broadcast - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -) diff --git a/libunity-greeter-session-broadcast/unity-greeter-session-broadcast.c b/libunity-greeter-session-broadcast/unity-greeter-session-broadcast.c deleted file mode 100644 index b684b3b..0000000 --- a/libunity-greeter-session-broadcast/unity-greeter-session-broadcast.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (C) 2013 Canonical, Ltd. - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License version 3, as published by - * the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, - * SATISFACTORY QUALITY, 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 program. If not, see . - * - */ - -#include "unity-greeter-session-broadcast.h" - -void -unity_session_greeter_broadcast_request_app_start (const gchar * username, const gchar * app_id) -{ - - - return; -} - diff --git a/libunity-greeter-session-broadcast/unity-greeter-session-broadcast.h b/libunity-greeter-session-broadcast/unity-greeter-session-broadcast.h deleted file mode 100644 index 55512cc..0000000 --- a/libunity-greeter-session-broadcast/unity-greeter-session-broadcast.h +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (C) 2013 Canonical, Ltd. - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License version 3, as published by - * the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, - * SATISFACTORY QUALITY, 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 program. If not, see . - * - */ - -#include - -#ifndef __UNITY_GREETER_SESSION_BROADCAST_H__ -#define __UNITY_GREETER_SESSION_BROADCAST_H__ 1 - -#pragma GCC visibility push(default) - -G_BEGIN_DECLS - -void -unity_session_greeter_broadcast_request_app_start (const gchar * username, - const gchar * app_id); - -G_END_DECLS - -#pragma GCC visibility pop - -#endif /* __UNITY_GREETER_SESSION_BROADCAST_H__ */ diff --git a/libunity-greeter-session-broadcast/unity-greeter-session-broadcast.pc.in b/libunity-greeter-session-broadcast/unity-greeter-session-broadcast.pc.in deleted file mode 100644 index eb4ea23..0000000 --- a/libunity-greeter-session-broadcast/unity-greeter-session-broadcast.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -libdir=@libdir@ -includedir=@includedir@ - -Cflags: -I${includedir}/libunity-greeter-session-broadcast-@apiversion@ -Requires: glib-2.0 gio-2.0 -Libs: -L${libdir} -lunity-greeter-session-broadcast - -Name: libunity-greeter-session-broadcast -Description: A library to request the session to do something -Version: @VERSION@ - diff --git a/service/CMakeLists.txt b/service/CMakeLists.txt index 7e336d5..5bf7fd6 100644 --- a/service/CMakeLists.txt +++ b/service/CMakeLists.txt @@ -14,9 +14,9 @@ service-iface.c add_gdbus_codegen( OUTFILES SERVICE_GENERATED_SOURCES NAME service-iface -PREFIX com.canonical.Unity.Greeter.Broadcast. +PREFIX org.ayatana.Desktop.Greeter.Broadcast. NAMESPACE ServiceIface -SERVICE_XML ${CMAKE_CURRENT_SOURCE_DIR}/../data/com.canonical.Unity.Greeter.Broadcast.xml +SERVICE_XML ${CMAKE_CURRENT_SOURCE_DIR}/../data/org.ayatana.Desktop.Greeter.Broadcast.xml ) add_library(service-generated STATIC ${SERVICE_GENERATED_SOURCES}) @@ -37,7 +37,7 @@ include_directories( add_executable(service-exec service.c) -set_target_properties(service-exec PROPERTIES OUTPUT_NAME "unity-greeter-session-broadcast-service") +set_target_properties(service-exec PROPERTIES OUTPUT_NAME "ayatana-greeter-session-broadcast-service") target_link_libraries(service-exec service-generated @@ -50,5 +50,5 @@ ${GIO2_LIBRARIES} install( TARGETS service-exec - RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/unity-greeter-session-broadcast" + RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/ayatana-greeter-session-broadcast" ) diff --git a/service/service.c b/service/service.c index 88f0ffa..7d2751c 100644 --- a/service/service.c +++ b/service/service.c @@ -20,68 +20,68 @@ #include "service-iface.h" static gboolean -on_handle_request_url_start (ServiceIfaceComCanonicalUnityGreeterBroadcast *object, +on_handle_request_url_start (ServiceIfaceOrgAyatanaDesktopGreeterBroadcast *object, GDBusMethodInvocation *invocation, const gchar *arg_username, const gchar *arg_url) { /* Simply pass the request on */ - service_iface_com_canonical_unity_greeter_broadcast_emit_start_url (object, + service_iface_org_ayatana_desktop_greeter_broadcast_emit_start_url (object, arg_username, arg_url); - service_iface_com_canonical_unity_greeter_broadcast_complete_request_url_start (object, + service_iface_org_ayatana_desktop_greeter_broadcast_complete_request_url_start (object, invocation); return TRUE; } static gboolean -on_handle_request_home_shown (ServiceIfaceComCanonicalUnityGreeterBroadcast *object, +on_handle_request_home_shown (ServiceIfaceOrgAyatanaDesktopGreeterBroadcast *object, GDBusMethodInvocation *invocation, const gchar *arg_username) { /* Simply pass the request on */ - service_iface_com_canonical_unity_greeter_broadcast_emit_show_home (object, + service_iface_org_ayatana_desktop_greeter_broadcast_emit_show_home (object, arg_username); - service_iface_com_canonical_unity_greeter_broadcast_complete_request_home_shown (object, + service_iface_org_ayatana_desktop_greeter_broadcast_complete_request_home_shown (object, invocation); return TRUE; } static gboolean -on_handle_request_sound_play_pause (ServiceIfaceComCanonicalUnityGreeterBroadcast *object, +on_handle_request_sound_play_pause (ServiceIfaceOrgAyatanaDesktopGreeterBroadcast *object, GDBusMethodInvocation *invocation, const gchar *arg_username) { /* Simply pass the request on */ - service_iface_com_canonical_unity_greeter_broadcast_emit_sound_play_pause (object, + service_iface_org_ayatana_desktop_greeter_broadcast_emit_sound_play_pause (object, arg_username); - service_iface_com_canonical_unity_greeter_broadcast_complete_request_sound_play_pause (object, + service_iface_org_ayatana_desktop_greeter_broadcast_complete_request_sound_play_pause (object, invocation); return TRUE; } static gboolean -on_handle_request_sound_next (ServiceIfaceComCanonicalUnityGreeterBroadcast *object, +on_handle_request_sound_next (ServiceIfaceOrgAyatanaDesktopGreeterBroadcast *object, GDBusMethodInvocation *invocation, const gchar *arg_username) { /* Simply pass the request on */ - service_iface_com_canonical_unity_greeter_broadcast_emit_sound_next (object, + service_iface_org_ayatana_desktop_greeter_broadcast_emit_sound_next (object, arg_username); - service_iface_com_canonical_unity_greeter_broadcast_complete_request_sound_next (object, + service_iface_org_ayatana_desktop_greeter_broadcast_complete_request_sound_next (object, invocation); return TRUE; } static gboolean -on_handle_request_sound_prev (ServiceIfaceComCanonicalUnityGreeterBroadcast *object, +on_handle_request_sound_prev (ServiceIfaceOrgAyatanaDesktopGreeterBroadcast *object, GDBusMethodInvocation *invocation, const gchar *arg_username) { /* Simply pass the request on */ - service_iface_com_canonical_unity_greeter_broadcast_emit_sound_prev (object, + service_iface_org_ayatana_desktop_greeter_broadcast_emit_sound_prev (object, arg_username); - service_iface_com_canonical_unity_greeter_broadcast_complete_request_sound_prev (object, + service_iface_org_ayatana_desktop_greeter_broadcast_complete_request_sound_prev (object, invocation); return TRUE; } @@ -92,13 +92,13 @@ on_bus_acquired (GDBusConnection *connection, gpointer user_data) { GError *error = NULL; - ServiceIfaceComCanonicalUnityGreeterBroadcast *interface; + ServiceIfaceOrgAyatanaDesktopGreeterBroadcast *interface; - interface = (ServiceIfaceComCanonicalUnityGreeterBroadcast *)user_data; + interface = (ServiceIfaceOrgAyatanaDesktopGreeterBroadcast *)user_data; if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (interface), connection, - "/com/canonical/Unity/Greeter/Broadcast", + "/org/ayatana/Desktop/Greeter/Broadcast", &error)) { g_error ("Unable to export interface: %s, exiting", error->message); @@ -118,9 +118,9 @@ main (int argc, char * argv[]) { guint owner_id; GMainLoop *loop; - ServiceIfaceComCanonicalUnityGreeterBroadcast *interface; + ServiceIfaceOrgAyatanaDesktopGreeterBroadcast *interface; - interface = service_iface_com_canonical_unity_greeter_broadcast_skeleton_new (); + interface = service_iface_org_ayatana_desktop_greeter_broadcast_skeleton_new (); /* Application Launching */ g_signal_connect (interface, @@ -147,7 +147,7 @@ main (int argc, char * argv[]) NULL); owner_id = g_bus_own_name (G_BUS_TYPE_SYSTEM, - "com.canonical.Unity.Greeter.Broadcast", + "org.ayatana.Desktop.Greeter.Broadcast", G_BUS_NAME_OWNER_FLAGS_NONE, on_bus_acquired, NULL, diff --git a/test-call.sh b/test-call.sh index 5ad9b9e..8625c4c 100755 --- a/test-call.sh +++ b/test-call.sh @@ -1,3 +1,3 @@ #!/bin/bash -gdbus call --system --dest com.canonical.Unity.Greeter.Broadcast --object-path /com/canonical/Unity/Greeter/Broadcast --method com.canonical.Unity.Greeter.Broadcast.RequestUrlStart $1 $2 +gdbus call --system --dest org.ayatana.Desktop.Greeter.Broadcast --object-path /org/ayatana/Desktop/Greeter/Broadcast --method org.ayatana.Desktop.Greeter.Broadcast.RequestUrlStart $1 $2 diff --git a/tests/manual b/tests/manual index b98e06b..47b8a4a 100644 --- a/tests/manual +++ b/tests/manual @@ -1,4 +1,4 @@ -Test-case unity-greeter-session-broadcast/application-on-greeter +Test-case ayatana-greeter-session-broadcast/application-on-greeter
NOTE: This test requires the separated greeter to land before it can be executed
Go to the home screen of the shell
@@ -12,7 +12,7 @@ Test-case unity-greeter-session-broadcast/application-on-greeter
The session should open with the selected app in focus
-Test-case unity-greeter-session-broadcast/sound-control-relay +Test-case ayatana-greeter-session-broadcast/sound-control-relay
NOTE: This test requires the separated greeter to land before it can be executed
Start Music playing using the music app (may require copying music to the device)
-- cgit v1.2.3