[gnome-flashback/wip/muktupavels/test: 12/15] bluetooth-applet: move D-Bus interface files to libdbus
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/wip/muktupavels/test: 12/15] bluetooth-applet: move D-Bus interface files to libdbus
- Date: Tue, 17 Dec 2019 14:45:19 +0000 (UTC)
commit 21ace8ef5dd0490d092fdff851986deeae5e709c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Dec 17 15:53:34 2019 +0200
bluetooth-applet: move D-Bus interface files to libdbus
dbus/Makefile.am | 9 ++++++++
.../org.gnome.SettingsDaemon.Rfkill.xml | 6 +++--
gnome-flashback/libbluetooth-applet/Makefile.am | 26 ++--------------------
.../libbluetooth-applet/gf-bluetooth-applet.c | 26 +++++++++++++---------
4 files changed, 30 insertions(+), 37 deletions(-)
---
diff --git a/dbus/Makefile.am b/dbus/Makefile.am
index cd49c04..f9bf35b 100644
--- a/dbus/Makefile.am
+++ b/dbus/Makefile.am
@@ -129,6 +129,12 @@ gf-screenshot-gen.c: org.gnome.Shell.Screenshot.xml
--generate-c-code gf-screenshot-gen \
$(srcdir)/org.gnome.Shell.Screenshot.xml
+gf-sd-rfkill-gen.h:
+gf-sd-rfkill-gen.c: org.gnome.SettingsDaemon.Rfkill.xml
+ $(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Gf \
+ --generate-c-code gf-sd-rfkill-gen \
+ $(srcdir)/org.gnome.SettingsDaemon.Rfkill.xml
+
gf-shell-gen.h:
gf-shell-gen.c: org.gnome.Shell.xml
$(AM_V_GEN) $(GDBUS_CODEGEN) --c-namespace Gf \
@@ -182,6 +188,8 @@ BUILT_SOURCES = \
gf-screensaver-gen.h \
gf-screenshot-gen.c \
gf-screenshot-gen.h \
+ gf-sd-rfkill-gen.c \
+ gf-sd-rfkill-gen.h \
gf-shell-gen.c \
gf-shell-gen.h \
gf-sm-presence-gen.c \
@@ -205,6 +213,7 @@ EXTRA_DIST = \
org.gnome.Nautilus.FileOperations.xml \
org.gnome.ScreenSaver.xml \
org.gnome.SessionManager.Presence.xml \
+ org.gnome.SettingsDaemon.Rfkill.xml \
org.gnome.Shell.AudioDeviceSelection.xml \
org.gnome.Shell.Screencast.xml \
org.gnome.Shell.Screenshot.xml \
diff --git a/gnome-flashback/libbluetooth-applet/org.gnome.SettingsDaemon.Rfkill.xml
b/dbus/org.gnome.SettingsDaemon.Rfkill.xml
similarity index 69%
rename from gnome-flashback/libbluetooth-applet/org.gnome.SettingsDaemon.Rfkill.xml
rename to dbus/org.gnome.SettingsDaemon.Rfkill.xml
index 258c082..fb4bebe 100644
--- a/gnome-flashback/libbluetooth-applet/org.gnome.SettingsDaemon.Rfkill.xml
+++ b/dbus/org.gnome.SettingsDaemon.Rfkill.xml
@@ -1,7 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.gnome.SettingsDaemon.Rfkill">
-
- <annotation name="org.gtk.GDBus.C.Name" value="SdRfkill" />
+ <annotation name="org.gtk.GDBus.C.Name" value="SdRfkillGen" />
<property name="AirplaneMode" type="b" access="readwrite" />
<property name="HardwareAirplaneMode" type="b" access="read" />
diff --git a/gnome-flashback/libbluetooth-applet/Makefile.am b/gnome-flashback/libbluetooth-applet/Makefile.am
index 20e2dcf..1dc8510 100644
--- a/gnome-flashback/libbluetooth-applet/Makefile.am
+++ b/gnome-flashback/libbluetooth-applet/Makefile.am
@@ -7,8 +7,7 @@ noinst_LTLIBRARIES = \
libbluetooth_applet_la_CPPFLAGS = \
-DG_LOG_DOMAIN=\"bluetooth-applet\" \
-DG_LOG_USE_STRUCTURED=1 \
- -I$(top_builddir)/gnome-flashback/libbluetooth-applet \
- -I$(top_srcdir) \
+ $(AM_CPPFLAGS) \
$(NULL)
libbluetooth_applet_la_CFLAGS = \
@@ -20,7 +19,6 @@ libbluetooth_applet_la_CFLAGS = \
libbluetooth_applet_la_SOURCES = \
gf-bluetooth-applet.c \
gf-bluetooth-applet.h \
- $(BUILT_SOURCES) \
$(NULL)
libbluetooth_applet_la_LDFLAGS = \
@@ -29,28 +27,8 @@ libbluetooth_applet_la_LDFLAGS = \
$(NULL)
libbluetooth_applet_la_LIBADD = \
+ $(top_builddir)/dbus/libdbus.la \
$(BLUETOOTH_APPLET_LIBS) \
$(NULL)
-gf-sd-rfkill.h:
-gf-sd-rfkill.c: org.gnome.SettingsDaemon.Rfkill.xml
- $(AM_V_GEN) gdbus-codegen \
- --interface-prefix org.gnome.SettingsDaemon.Rfkill. \
- --c-namespace Gf \
- --generate-c-code gf-sd-rfkill \
- $(srcdir)/org.gnome.SettingsDaemon.Rfkill.xml
-
-BUILT_SOURCES = \
- gf-sd-rfkill.c \
- gf-sd-rfkill.h \
- $(NULL)
-
-EXTRA_DIST = \
- org.gnome.SettingsDaemon.Rfkill.xml \
- $(NULL)
-
-CLEANFILES = \
- $(BUILT_SOURCES) \
- $(NULL)
-
-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.c
b/gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.c
index b3ec1df..6e98efe 100644
--- a/gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.c
+++ b/gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.c
@@ -16,13 +16,13 @@
*/
#include "config.h"
+#include "gf-bluetooth-applet.h"
#include <bluetooth-client.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include "gf-bluetooth-applet.h"
-#include "gf-sd-rfkill.h"
+#include "dbus/gf-sd-rfkill-gen.h"
#define GSM_DBUS_NAME "org.gnome.SettingsDaemon.Rfkill"
#define GSM_DBUS_PATH "/org/gnome/SettingsDaemon/Rfkill"
@@ -34,7 +34,7 @@ struct _GfBluetoothApplet
gint bus_name_id;
GtkStatusIcon *status_icon;
- GfSdRfkill *rfkill;
+ GfSdRfkillGen *rfkill;
BluetoothClient *client;
GtkTreeModel *model;
};
@@ -52,7 +52,7 @@ turn_off_cb (GtkMenuItem *item,
if (applet->rfkill == NULL)
return;
- gf_sd_rfkill_set_bluetooth_airplane_mode (applet->rfkill, TRUE);
+ gf_sd_rfkill_gen_set_bluetooth_airplane_mode (applet->rfkill, TRUE);
}
static void
@@ -99,7 +99,7 @@ turn_on_cb (GtkMenuItem *item,
if (applet->rfkill == NULL)
return;
- gf_sd_rfkill_set_bluetooth_airplane_mode (applet->rfkill, FALSE);
+ gf_sd_rfkill_gen_set_bluetooth_airplane_mode (applet->rfkill, FALSE);
}
static void
@@ -153,7 +153,7 @@ popup_menu_cb (GtkStatusIcon *status_icon,
airplane_mode = FALSE;
if (applet->rfkill != NULL)
- airplane_mode = gf_sd_rfkill_get_bluetooth_airplane_mode (applet->rfkill);
+ airplane_mode = gf_sd_rfkill_gen_get_bluetooth_airplane_mode (applet->rfkill);
if (!airplane_mode)
{
@@ -264,7 +264,7 @@ gf_bluetooth_applet_sync (GfBluetoothApplet *applet)
airplane_mode = FALSE;
if (applet->rfkill != NULL)
- airplane_mode = gf_sd_rfkill_get_bluetooth_airplane_mode (applet->rfkill);
+ airplane_mode = gf_sd_rfkill_gen_get_bluetooth_airplane_mode (applet->rfkill);
if (!airplane_mode)
{
@@ -332,7 +332,7 @@ rfkill_proxy_ready_cb (GObject *source_object,
applet = GF_BLUETOOTH_APPLET (user_data);
error = NULL;
- applet->rfkill = gf_sd_rfkill_proxy_new_for_bus_finish (res, &error);
+ applet->rfkill = gf_sd_rfkill_gen_proxy_new_for_bus_finish (res, &error);
if (error != NULL)
{
@@ -392,9 +392,13 @@ name_appeared_handler (GDBusConnection *connection,
const gchar *name_owner,
gpointer user_data)
{
- gf_sd_rfkill_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE,
- GSM_DBUS_NAME, GSM_DBUS_PATH, NULL,
- rfkill_proxy_ready_cb, user_data);
+ gf_sd_rfkill_gen_proxy_new_for_bus (G_BUS_TYPE_SESSION,
+ G_DBUS_PROXY_FLAGS_NONE,
+ GSM_DBUS_NAME,
+ GSM_DBUS_PATH,
+ NULL,
+ rfkill_proxy_ready_cb,
+ user_data);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]