ngfd-plugin: /build/ngfd/src/ngfd-1.4.1/src/include/ngf/core-dbus.h Source File

ngfd-plugin

core-dbus.h
Go to the documentation of this file.
1/*
2 * ngfd - Non-graphic feedback daemon
3 *
4 * Copyright (C) 2017 Jolla Ltd
5 * Contact: Juho Hämäläinen <juho.hamalainen@jolla.com>
6 *
7 * This work is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This work is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this work; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifndef N_DBUS_HELPER_H
23#define N_DBUS_HELPER_H
24
25#include <ngf/core.h>
26#include <dbus/dbus.h>
27
28 typedef DBusHandlerResult (*NDBusFilterFunc) (NCore *core,
29 DBusConnection *connection,
30 DBusMessage *msg,
31 void *userdata);
32
33 typedef void (*NDBusReplyFunc) (NCore *core,
34 DBusMessage *msg,
35 void *userdata);
36
48guint n_dbus_add_match (NCore *core,
49 NDBusFilterFunc cb,
50 void *userdata,
51 DBusBusType type,
52 const char *iface,
53 const char *path,
54 const char *member);
55
60 void n_dbus_remove_match_by_id (NCore *core, guint match_id);
61
66 void n_dbus_remove_match_by_cb (NCore *core, NDBusFilterFunc cb);
67
82gboolean n_dbus_async_call (NCore *core,
83 NDBusReplyFunc cb,
84 void *userdata,
85 DBusBusType type,
86 const char *destination,
87 const char *path,
88 const char *iface,
89 const char *method);
90
102gboolean n_dbus_async_call_full (NCore *core,
103 NDBusReplyFunc cb,
104 void *userdata,
105 DBusBusType type,
106 DBusMessage *msg);
107
108#endif
NDBusFilterFunc
DBusHandlerResult(* NDBusFilterFunc)(NCore *core, DBusConnection *connection, DBusMessage *msg, void *userdata)
Definition core-dbus.h:28
n_dbus_remove_match_by_cb
void n_dbus_remove_match_by_cb(NCore *core, NDBusFilterFunc cb)
Remove DBus signal listening.
n_dbus_add_match
guint n_dbus_add_match(NCore *core, NDBusFilterFunc cb, void *userdata, DBusBusType type, const char *iface, const char *path, const char *member)
Start listening for DBus signal.
n_dbus_remove_match_by_id
void n_dbus_remove_match_by_id(NCore *core, guint match_id)
Remove DBus signal listening.
NDBusReplyFunc
void(* NDBusReplyFunc)(NCore *core, DBusMessage *msg, void *userdata)
Definition core-dbus.h:33
n_dbus_async_call_full
gboolean n_dbus_async_call_full(NCore *core, NDBusReplyFunc cb, void *userdata, DBusBusType type, DBusMessage *msg)
Make an asynchronous DBus call.
n_dbus_async_call
gboolean n_dbus_async_call(NCore *core, NDBusReplyFunc cb, void *userdata, DBusBusType type, const char *destination, const char *path, const char *iface, const char *method)
Make an asynchronous DBus call.
core.h
NCore
struct _NCore NCore
Internal core structure.
Definition core.h:26