ofdbus/dbus/bus/signals.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /* -*- mode: C; c-file-style: "gnu" -*- */
       
     2 /* signals.h  Bus signal connection implementation
       
     3  *
       
     4  * Copyright (C) 2003  Red Hat, Inc.
       
     5  * Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
       
     6  * Licensed under the Academic Free License version 2.1
       
     7  *
       
     8  * This program is free software; you can redistribute it and/or modify
       
     9  * it under the terms of the GNU General Public License as published by
       
    10  * the Free Software Foundation; either version 2 of the License, or
       
    11  * (at your option) any later version.
       
    12  *
       
    13  * This program is distributed in the hope that it will be useful,
       
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    16  * GNU General Public License for more details.
       
    17  *
       
    18  * You should have received a copy of the GNU General Public License
       
    19  * along with this program; if not, write to the Free Software
       
    20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
       
    21  *
       
    22  */
       
    23 
       
    24 #ifndef BUS_SIGNALS_H
       
    25 #define BUS_SIGNALS_H
       
    26 
       
    27 #include <dbus/dbus.h>
       
    28 #ifndef __SYMBIAN32__
       
    29 #include <dbus/dbus-string.h>
       
    30 #include <dbus/dbus-sysdeps.h>
       
    31 #else
       
    32 #include "dbus-string.h"
       
    33 #include "dbus-sysdeps.h"
       
    34 #endif /* __SYMBIAN32__ */
       
    35 #include "connection.h"
       
    36 
       
    37 typedef enum
       
    38 {
       
    39   BUS_MATCH_MESSAGE_TYPE = 1 << 0,
       
    40   BUS_MATCH_INTERFACE    = 1 << 1,
       
    41   BUS_MATCH_MEMBER       = 1 << 2,
       
    42   BUS_MATCH_SENDER       = 1 << 3,
       
    43   BUS_MATCH_DESTINATION  = 1 << 4,
       
    44   BUS_MATCH_PATH         = 1 << 5,
       
    45   BUS_MATCH_ARGS         = 1 << 6
       
    46 } BusMatchFlags;
       
    47 
       
    48 BusMatchRule* bus_match_rule_new   (DBusConnection *matches_go_to);
       
    49 BusMatchRule* bus_match_rule_ref   (BusMatchRule   *rule);
       
    50 void          bus_match_rule_unref (BusMatchRule   *rule);
       
    51 
       
    52 dbus_bool_t bus_match_rule_set_message_type (BusMatchRule *rule,
       
    53                                              int           type);
       
    54 dbus_bool_t bus_match_rule_set_interface    (BusMatchRule *rule,
       
    55                                              const char   *interface);
       
    56 dbus_bool_t bus_match_rule_set_member       (BusMatchRule *rule,
       
    57                                              const char   *member);
       
    58 dbus_bool_t bus_match_rule_set_sender       (BusMatchRule *rule,
       
    59                                              const char   *sender);
       
    60 dbus_bool_t bus_match_rule_set_destination  (BusMatchRule *rule,
       
    61                                              const char   *destination);
       
    62 dbus_bool_t bus_match_rule_set_path         (BusMatchRule *rule,
       
    63                                              const char   *path);
       
    64 dbus_bool_t bus_match_rule_set_arg          (BusMatchRule *rule,
       
    65                                              int           arg,
       
    66                                              const char   *value);
       
    67 
       
    68 BusMatchRule* bus_match_rule_parse (DBusConnection   *matches_go_to,
       
    69                                     const DBusString *rule_text,
       
    70                                     DBusError        *error);
       
    71 
       
    72 BusMatchmaker* bus_matchmaker_new   (void);
       
    73 BusMatchmaker* bus_matchmaker_ref   (BusMatchmaker *matchmaker);
       
    74 void           bus_matchmaker_unref (BusMatchmaker *matchmaker);
       
    75 
       
    76 dbus_bool_t bus_matchmaker_add_rule             (BusMatchmaker   *matchmaker,
       
    77                                                  BusMatchRule    *rule);
       
    78 dbus_bool_t bus_matchmaker_remove_rule_by_value (BusMatchmaker   *matchmaker,
       
    79                                                  BusMatchRule    *value,
       
    80                                                  DBusError       *error);
       
    81 void        bus_matchmaker_remove_rule          (BusMatchmaker   *matchmaker,
       
    82                                                  BusMatchRule    *rule);
       
    83 void        bus_matchmaker_disconnected         (BusMatchmaker   *matchmaker,
       
    84                                                  DBusConnection  *disconnected);
       
    85 dbus_bool_t bus_matchmaker_get_recipients       (BusMatchmaker   *matchmaker,
       
    86                                                  BusConnections  *connections,
       
    87                                                  DBusConnection  *sender,
       
    88                                                  DBusConnection  *addressed_recipient,
       
    89                                                  DBusMessage     *message,
       
    90                                                  DBusList       **recipients_p);
       
    91 
       
    92 #endif /* BUS_SIGNALS_H */