Skip to content

Commit

Permalink
[libmce-glib] Split MCE request and signal specs
Browse files Browse the repository at this point in the history
  • Loading branch information
monich committed Nov 12, 2016
1 parent 3749522 commit 6356120
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -41,7 +41,8 @@ SRC = \
mce_display.c \
mce_proxy.c
GEN_SRC = \
com.nokia.mce.c
com.nokia.mce.request.c \
com.nokia.mce.signal.c

#
# Directories
Expand Down
11 changes: 11 additions & 0 deletions spec/com.nokia.mce.request.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
"http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
<node name="/com/nokia/mce/request">
<interface name="com.nokia.mce.request">
<method name="get_display_status">
<arg direction="out" name="display_state" type="s"/>
</method>
</interface>
</node>
7 changes: 0 additions & 7 deletions spec/com.nokia.mce.xml → spec/com.nokia.mce.signal.xml
Expand Up @@ -3,13 +3,6 @@
"-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
"http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
<node name="/com/nokia/mce/signal">
<!-- com.nokia.mce.request -->
<interface name="com.nokia.mce.request">
<method name="get_display_status">
<arg direction="out" name="display_state" type="s"/>
</method>
</interface>
<!-- com.nokia.mce.signal -->
<interface name="com.nokia.mce.signal">
<signal name="display_status_ind">
<arg name="display_state" type="s"/>
Expand Down
6 changes: 4 additions & 2 deletions src/mce_display.c
Expand Up @@ -38,10 +38,12 @@
#include "mce_proxy.h"
#include "mce_log_p.h"

#include "mce/dbus-names.h"
#include "mce/mode-names.h"

/* Generated headers */
#include "com.nokia.mce.h"
#include "com.nokia.mce.request.h"
#include "com.nokia.mce.signal.h"

struct mce_display_priv {
MceProxy* proxy;
Expand Down Expand Up @@ -251,7 +253,7 @@ mce_display_init(
priv->proxy_valid_id = mce_proxy_add_valid_changed_handler(priv->proxy,
mce_display_valid_changed, self);
priv->display_status_ind_id = g_signal_connect(priv->proxy->signal,
"display_status_ind", G_CALLBACK(mce_display_status_ind), self);
MCE_DISPLAY_SIG, G_CALLBACK(mce_display_status_ind), self);
}

static
Expand Down
3 changes: 2 additions & 1 deletion src/mce_proxy.c
Expand Up @@ -40,7 +40,8 @@
#include "mce/dbus-names.h"

/* Generated headers */
#include "com.nokia.mce.h"
#include "com.nokia.mce.request.h"
#include "com.nokia.mce.signal.h"

GLOG_MODULE_DEFINE("mce");

Expand Down

0 comments on commit 6356120

Please sign in to comment.