2010-09-09 08:24:42 +04:00
|
|
|
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
|
2009-02-05 05:39:56 +03:00
|
|
|
/* vim:set et sts=4: */
|
|
|
|
/* IBus - The Input Bus
|
2010-01-09 22:29:59 +03:00
|
|
|
* Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
|
|
|
|
* Copyright (C) 2008-2010 Red Hat, Inc.
|
2009-02-05 05:39:56 +03:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2013-08-09 08:48:17 +04:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2009-02-05 05:39:56 +03:00
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2013-08-09 08:48:17 +04:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2009-02-05 05:39:56 +03:00
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2013-08-09 08:48:17 +04:00
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
|
|
|
* USA
|
2009-02-05 05:39:56 +03:00
|
|
|
*/
|
2010-06-16 19:47:09 +04:00
|
|
|
#ifndef __BUS_MATCH_RULE_H_
|
|
|
|
#define __BUS_MATCH_RULE_H_
|
2009-02-05 05:39:56 +03:00
|
|
|
|
|
|
|
#include <ibus.h>
|
2012-01-23 21:27:10 +04:00
|
|
|
|
2009-02-05 05:39:56 +03:00
|
|
|
#include "connection.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Type macros.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* define GOBJECT macros */
|
|
|
|
#define BUS_TYPE_MATCH_RULE \
|
|
|
|
(bus_match_rule_get_type ())
|
|
|
|
#define BUS_MATCH_RULE(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), BUS_TYPE_MATCH_RULE, BusMatchRule))
|
|
|
|
#define BUS_MATCH_RULE_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST ((klass), BUS_TYPE_MATCH_RULE, BusMatchRuleClass))
|
|
|
|
#define BUS_IS_MATCH_RULE(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUS_TYPE_MATCH_RULE))
|
|
|
|
#define BUS_IS_MATCH_RULE_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE ((klass), BUS_TYPE_MATCH_RULE))
|
|
|
|
#define BUS_MATCH_RULE_GET_CLASS(obj) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), BUS_TYPE_MATCH_RULE, BusMatchRuleClass))
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef struct _BusMatchRule BusMatchRule;
|
|
|
|
typedef struct _BusMatchRuleClass BusMatchRuleClass;
|
|
|
|
|
|
|
|
GType bus_match_rule_get_type (void);
|
2010-06-16 19:47:09 +04:00
|
|
|
BusMatchRule *bus_match_rule_new (const gchar *text);
|
|
|
|
BusMatchRule *bus_match_rule_ref (BusMatchRule *rule);
|
|
|
|
void bus_match_rule_unref (BusMatchRule *rule);
|
|
|
|
void bus_match_rule_free (BusMatchRule *rule);
|
2009-02-05 05:39:56 +03:00
|
|
|
gboolean bus_match_rule_set_message_type
|
2010-06-16 19:47:09 +04:00
|
|
|
(BusMatchRule *rule,
|
|
|
|
gint type);
|
|
|
|
gboolean bus_match_rule_set_sender (BusMatchRule *rule,
|
|
|
|
const gchar *sender);
|
2009-02-05 05:39:56 +03:00
|
|
|
gboolean bus_match_rule_set_interface
|
2010-06-16 19:47:09 +04:00
|
|
|
(BusMatchRule *rule,
|
|
|
|
const gchar *interface);
|
|
|
|
gboolean bus_match_rule_set_member (BusMatchRule *rule,
|
|
|
|
const gchar *member);
|
|
|
|
gboolean bus_match_rule_set_path (BusMatchRule *rule,
|
|
|
|
const gchar *path);
|
2009-02-05 05:39:56 +03:00
|
|
|
gboolean bus_match_rule_set_destination
|
2010-06-16 19:47:09 +04:00
|
|
|
(BusMatchRule *rule,
|
|
|
|
const gchar *dest);
|
|
|
|
gboolean bus_match_rule_set_arg (BusMatchRule *rule,
|
|
|
|
guint arg_i,
|
|
|
|
const gchar *arg);
|
|
|
|
gboolean bus_match_rule_match (BusMatchRule *rule,
|
|
|
|
GDBusMessage *message);
|
|
|
|
gboolean bus_match_rule_is_equal (BusMatchRule *a,
|
|
|
|
BusMatchRule *b);
|
2009-02-05 05:39:56 +03:00
|
|
|
void bus_match_rule_add_recipient
|
2010-06-16 19:47:09 +04:00
|
|
|
(BusMatchRule *rule,
|
|
|
|
BusConnection *connection);
|
2009-02-05 05:39:56 +03:00
|
|
|
void bus_match_rule_remove_recipient
|
2010-06-16 19:47:09 +04:00
|
|
|
(BusMatchRule *rule,
|
|
|
|
BusConnection *connection);
|
2009-02-27 02:01:02 +03:00
|
|
|
GList *bus_match_rule_get_recipients
|
2009-02-05 05:39:56 +03:00
|
|
|
(BusMatchRule *rule,
|
2010-06-16 19:47:09 +04:00
|
|
|
GDBusMessage *message);
|
2009-02-05 05:39:56 +03:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
#endif
|
|
|
|
|