Main Page   Modules   Data Structures   File List   Data Fields   Related Pages  

signals.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* signals.h  Bus signal connection implementation
00003  *
00004  * Copyright (C) 2003  Red Hat, Inc.
00005  *
00006  * Licensed under the Academic Free License version 1.2
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 /* BUS_SIGNALS_H */

Generated on Mon Sep 29 21:31:02 2003 for D-BUS by doxygen1.2.15