forked from nemomobile/mce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mce-dbus.h
72 lines (64 loc) · 2.64 KB
/
mce-dbus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* @file mce-dbus.h
* Headers for the D-Bus handling code for the Mode Control Entity
* <p>
* Copyright © 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
* <p>
* @author David Weinehall <david.weinehall@nokia.com>
*
* mce is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* mce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY 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 mce. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MCE_DBUS_H_
#define _MCE_DBUS_H_
#include <glib.h>
#include <dbus/dbus.h>
#include <mce/dbus-names.h>
DBusMessage *dbus_new_signal(const gchar *const path,
const gchar *const interface,
const gchar *const name);
DBusMessage *dbus_new_method_call(const gchar *const service,
const gchar *const path,
const gchar *const interface,
const gchar *const name);
DBusMessage *dbus_new_method_reply(DBusMessage *const message);
gboolean dbus_send_message(DBusMessage *const msg);
gboolean dbus_send_message_with_reply_handler(DBusMessage *const msg,
DBusPendingCallNotifyFunction callback);
gboolean dbus_send(const gchar *const service, const gchar *const path,
const gchar *const interface, const gchar *const name,
DBusPendingCallNotifyFunction callback,
int first_arg_type, ...);
DBusMessage *dbus_send_with_block(const gchar *const service,
const gchar *const path,
const gchar *const interface,
const gchar *const name,
gint timeout, int first_arg_type, ...);
pid_t dbus_get_pid_from_bus_name(const gchar *const bus_name);
gconstpointer mce_dbus_handler_add(const gchar *const interface,
const gchar *const name,
const gchar *const rules,
const guint type,
gboolean (*callback)(DBusMessage *const msg));
void mce_dbus_handler_remove(gconstpointer cookie);
gboolean mce_dbus_is_owner_monitored(const gchar *service,
GSList *monitor_list);
gssize mce_dbus_owner_monitor_add(const gchar *service,
gboolean (*callback)(DBusMessage *const msg),
GSList **monitor_list,
gssize max_num);
gssize mce_dbus_owner_monitor_remove(const gchar *service,
GSList **monitor_list);
void mce_dbus_owner_monitor_remove_all(GSList **monitor_list);
gboolean mce_dbus_init(const gboolean systembus);
void mce_dbus_exit(void);
#endif /* _MCE_DBUS_H_ */