Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
daemon: Use gdbus-codegen for the org.mate.atril.Daemon interface
  • Loading branch information
Christian Persch authored and raveit65 committed Mar 21, 2018
1 parent f44500b commit 131b29e
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 164 deletions.
26 changes: 22 additions & 4 deletions shell/Makefile.am
Expand Up @@ -120,12 +120,21 @@ atril_LDADD= \
BUILT_SOURCES = ev-marshal.h ev-marshal.c

if ENABLE_DBUS
BUILT_SOURCES += ev-gdbus-generated.c ev-gdbus-generated.h
BUILT_SOURCES += \
ev-gdbus-generated.c \
ev-gdbus-generated.h \
ev-daemon-gdbus-generated.c \
ev-daemon-gdbus-generated.h
endif

if ENABLE_DBUS
atrild_SOURCES= \
ev-daemon.c
ev-daemon.c \
$(NULL)
nodist_atrild_SOURCES = \
ev-daemon-gdbus-generated.c \
ev-daemon-gdbus-generated.h
$(NULL)

atrild_CFLAGS= \
-DATRILDATADIR=\"$(pkgdatadir)\" \
Expand All @@ -144,7 +153,8 @@ endif

EXTRA_DIST = \
ev-marshal.list \
ev-gdbus.xml
ev-gdbus.xml \
ev-daemon-gdbus.xml

ev-marshal.h: $(srcdir)/ev-marshal.list
$(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=ev_marshal $(srcdir)/ev-marshal.list --header > ev-marshal.h
Expand All @@ -161,6 +171,14 @@ ev-gdbus-generated.c ev-gdbus-generated.h: ev-gdbus.xml Makefile
--generate-c-code ev-gdbus-generated \
$<

DISTCLEANFILES =
ev-daemon-gdbus-generated.c ev-daemon-gdbus-generated.h: ev-daemon-gdbus.xml Makefile
$(AM_V_GEN) $(GDBUS_CODEGEN) \
--interface-prefix=org.mate.atril \
--c-namespace=Ev \
--c-generate-object-manager \
--generate-c-code ev-daemon-gdbus-generated \
$<

DISTCLEANFILES = $(BUILT_SOURCES)

-include $(top_srcdir)/git.mk
19 changes: 19 additions & 0 deletions shell/ev-daemon-gdbus.xml
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Introspection 0.1//EN"
"http://www.freedesktop.org/software/dbus/introspection.dtd">
<node>
<interface name="org.mate.atril.Daemon">
<method name="RegisterDocument">
<arg type="s" name="uri" direction="in"/>
<arg type="s" name="owner" direction="out"/>
</method>
<method name="UnregisterDocument">
<arg type="s" name="uri" direction="in"/>
</method>
<method name="FindDocument">
<arg type="s" name="uri" direction="in"/>
<arg type="b" name="spawn" direction="in"/>
<arg type="s" name="owner" direction="out"/>
</method>
</interface>
</node>

0 comments on commit 131b29e

Please sign in to comment.