00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef BUS_SIGNALS_H
00025 #define BUS_SIGNALS_H
00026
00027 #include <dbus/dbus.h>
00028 #include <dbus/dbus-string.h>
00029 #include <dbus/dbus-sysdeps.h>
00030 #include "connection.h"
00031
00032 typedef enum
00033 {
00034 BUS_MATCH_MESSAGE_TYPE = 1 << 0,
00035 BUS_MATCH_INTERFACE = 1 << 1,
00036 BUS_MATCH_MEMBER = 1 << 2,
00037 BUS_MATCH_SENDER = 1 << 3,
00038 BUS_MATCH_DESTINATION = 1 << 4,
00039 BUS_MATCH_PATH = 1 << 5
00040 } BusMatchFlags;
00041
00042 BusMatchRule* bus_match_rule_new (DBusConnection *matches_go_to);
00043 void bus_match_rule_ref (BusMatchRule *rule);
00044 void bus_match_rule_unref (BusMatchRule *rule);
00045
00046 dbus_bool_t bus_match_rule_set_message_type (BusMatchRule *rule,
00047 int type);
00048 dbus_bool_t bus_match_rule_set_interface (BusMatchRule *rule,
00049 const char *interface);
00050 dbus_bool_t bus_match_rule_set_member (BusMatchRule *rule,
00051 const char *member);
00052 dbus_bool_t bus_match_rule_set_sender (BusMatchRule *rule,
00053 const char *sender);
00054 dbus_bool_t bus_match_rule_set_destination (BusMatchRule *rule,
00055 const char *destination);
00056 dbus_bool_t bus_match_rule_set_path (BusMatchRule *rule,
00057 const char *path);
00058
00059 BusMatchRule* bus_match_rule_parse (DBusConnection *matches_go_to,
00060 const DBusString *rule_text,
00061 DBusError *error);
00062
00063 BusMatchmaker* bus_matchmaker_new (void);
00064 void bus_matchmaker_ref (BusMatchmaker *matchmaker);
00065 void bus_matchmaker_unref (BusMatchmaker *matchmaker);
00066
00067 dbus_bool_t bus_matchmaker_add_rule (BusMatchmaker *matchmaker,
00068 BusMatchRule *rule);
00069 dbus_bool_t bus_matchmaker_remove_rule_by_value (BusMatchmaker *matchmaker,
00070 BusMatchRule *value,
00071 DBusError *error);
00072 void bus_matchmaker_remove_rule (BusMatchmaker *matchmaker,
00073 BusMatchRule *rule);
00074 void bus_matchmaker_disconnected (BusMatchmaker *matchmaker,
00075 DBusConnection *disconnected);
00076 dbus_bool_t bus_matchmaker_get_recipients (BusMatchmaker *matchmaker,
00077 BusConnections *connections,
00078 DBusConnection *sender,
00079 DBusConnection *addressed_recipient,
00080 DBusMessage *message,
00081 DBusList **recipients_p);
00082
00083 #endif