os/ossrv/ofdbus/dbus/bus/signals.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ofdbus/dbus/bus/signals.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,92 @@
     1.4 +/* -*- mode: C; c-file-style: "gnu" -*- */
     1.5 +/* signals.h  Bus signal connection implementation
     1.6 + *
     1.7 + * Copyright (C) 2003  Red Hat, Inc.
     1.8 + * Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
     1.9 + * Licensed under the Academic Free License version 2.1
    1.10 + *
    1.11 + * This program is free software; you can redistribute it and/or modify
    1.12 + * it under the terms of the GNU General Public License as published by
    1.13 + * the Free Software Foundation; either version 2 of the License, or
    1.14 + * (at your option) any later version.
    1.15 + *
    1.16 + * This program is distributed in the hope that it will be useful,
    1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.19 + * GNU General Public License for more details.
    1.20 + *
    1.21 + * You should have received a copy of the GNU General Public License
    1.22 + * along with this program; if not, write to the Free Software
    1.23 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.24 + *
    1.25 + */
    1.26 +
    1.27 +#ifndef BUS_SIGNALS_H
    1.28 +#define BUS_SIGNALS_H
    1.29 +
    1.30 +#include <dbus/dbus.h>
    1.31 +#ifndef __SYMBIAN32__
    1.32 +#include <dbus/dbus-string.h>
    1.33 +#include <dbus/dbus-sysdeps.h>
    1.34 +#else
    1.35 +#include "dbus-string.h"
    1.36 +#include "dbus-sysdeps.h"
    1.37 +#endif /* __SYMBIAN32__ */
    1.38 +#include "connection.h"
    1.39 +
    1.40 +typedef enum
    1.41 +{
    1.42 +  BUS_MATCH_MESSAGE_TYPE = 1 << 0,
    1.43 +  BUS_MATCH_INTERFACE    = 1 << 1,
    1.44 +  BUS_MATCH_MEMBER       = 1 << 2,
    1.45 +  BUS_MATCH_SENDER       = 1 << 3,
    1.46 +  BUS_MATCH_DESTINATION  = 1 << 4,
    1.47 +  BUS_MATCH_PATH         = 1 << 5,
    1.48 +  BUS_MATCH_ARGS         = 1 << 6
    1.49 +} BusMatchFlags;
    1.50 +
    1.51 +BusMatchRule* bus_match_rule_new   (DBusConnection *matches_go_to);
    1.52 +BusMatchRule* bus_match_rule_ref   (BusMatchRule   *rule);
    1.53 +void          bus_match_rule_unref (BusMatchRule   *rule);
    1.54 +
    1.55 +dbus_bool_t bus_match_rule_set_message_type (BusMatchRule *rule,
    1.56 +                                             int           type);
    1.57 +dbus_bool_t bus_match_rule_set_interface    (BusMatchRule *rule,
    1.58 +                                             const char   *interface);
    1.59 +dbus_bool_t bus_match_rule_set_member       (BusMatchRule *rule,
    1.60 +                                             const char   *member);
    1.61 +dbus_bool_t bus_match_rule_set_sender       (BusMatchRule *rule,
    1.62 +                                             const char   *sender);
    1.63 +dbus_bool_t bus_match_rule_set_destination  (BusMatchRule *rule,
    1.64 +                                             const char   *destination);
    1.65 +dbus_bool_t bus_match_rule_set_path         (BusMatchRule *rule,
    1.66 +                                             const char   *path);
    1.67 +dbus_bool_t bus_match_rule_set_arg          (BusMatchRule *rule,
    1.68 +                                             int           arg,
    1.69 +                                             const char   *value);
    1.70 +
    1.71 +BusMatchRule* bus_match_rule_parse (DBusConnection   *matches_go_to,
    1.72 +                                    const DBusString *rule_text,
    1.73 +                                    DBusError        *error);
    1.74 +
    1.75 +BusMatchmaker* bus_matchmaker_new   (void);
    1.76 +BusMatchmaker* bus_matchmaker_ref   (BusMatchmaker *matchmaker);
    1.77 +void           bus_matchmaker_unref (BusMatchmaker *matchmaker);
    1.78 +
    1.79 +dbus_bool_t bus_matchmaker_add_rule             (BusMatchmaker   *matchmaker,
    1.80 +                                                 BusMatchRule    *rule);
    1.81 +dbus_bool_t bus_matchmaker_remove_rule_by_value (BusMatchmaker   *matchmaker,
    1.82 +                                                 BusMatchRule    *value,
    1.83 +                                                 DBusError       *error);
    1.84 +void        bus_matchmaker_remove_rule          (BusMatchmaker   *matchmaker,
    1.85 +                                                 BusMatchRule    *rule);
    1.86 +void        bus_matchmaker_disconnected         (BusMatchmaker   *matchmaker,
    1.87 +                                                 DBusConnection  *disconnected);
    1.88 +dbus_bool_t bus_matchmaker_get_recipients       (BusMatchmaker   *matchmaker,
    1.89 +                                                 BusConnections  *connections,
    1.90 +                                                 DBusConnection  *sender,
    1.91 +                                                 DBusConnection  *addressed_recipient,
    1.92 +                                                 DBusMessage     *message,
    1.93 +                                                 DBusList       **recipients_p);
    1.94 +
    1.95 +#endif /* BUS_SIGNALS_H */