~ubuntu-branches/ubuntu/quantal/ibus/quantal

« back to all changes in this revision

Viewing changes to bus/matchrule.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry Warsaw
  • Date: 2011-08-11 17:00:57 UTC
  • mfrom: (6.2.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110811170057-6dmbfs4s3cchzl7x
Tags: 1.3.99.20110419-1ubuntu1
* Merge with Debian unstable.  Remaining Ubuntu changes:
  - Indicator support:
    + Add 05_appindicator.patch: Use an indicator rather than a notification
      icon.
    + debian/control: Recommend python-appindicator.
  - debian/control: Install im-switch instead of im-config by default.
  - debian/README.source: Removed, it was outdated and no longer correct
  - debian/patches/01_ubuntu_desktop: Fix "Desktop entry needs the
    X-Ubuntu-Gettext-Domain key"  (LP: #457632)
  - debian/patches/02_title_update.patch: Rename "IBus Preferences" to
    "Keyboard Input Methods"
  - debian/patches/06_locale_parser.patch: Cherry-picked from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
20
 * Boston, MA 02111-1307, USA.
21
21
 */
22
 
#ifndef __MATCH_RULE_H_
23
 
#define __MATCH_RULE_H_
 
22
#ifndef __BUS_MATCH_RULE_H_
 
23
#define __BUS_MATCH_RULE_H_
24
24
 
25
25
#include <ibus.h>
26
26
#include "connection.h"
48
48
typedef struct _BusMatchRule BusMatchRule;
49
49
typedef struct _BusMatchRuleClass BusMatchRuleClass;
50
50
 
51
 
typedef enum {
52
 
    MATCH_TYPE          = 1 << 0,
53
 
    MATCH_INTERFACE     = 1 << 1,
54
 
    MATCH_MEMBER        = 1 << 2,
55
 
    MATCH_SENDER        = 1 << 3,
56
 
    MATCH_DESTINATION   = 1 << 4,
57
 
    MATCH_PATH          = 1 << 5,
58
 
    MATCH_ARGS          = 1 << 6,
59
 
} BusMatchFlags;
60
 
 
61
 
typedef struct _BusRecipient BusRecipient;
62
 
struct _BusRecipient {
63
 
    BusConnection *connection;
64
 
    gint refcount;
65
 
};
66
 
 
67
 
struct _BusMatchRule {
68
 
    IBusObject parent;
69
 
    /* instance members */
70
 
    gint   flags;
71
 
    gint   message_type;
72
 
    gchar *interface;
73
 
    gchar *member;
74
 
    gchar *sender;
75
 
    gchar *destination;
76
 
    gchar *path;
77
 
    GArray *args;
78
 
    GList  *recipients;
79
 
};
80
 
 
81
 
struct _BusMatchRuleClass {
82
 
    IBusObjectClass parent;
83
 
    /* class members */
84
 
};
85
 
 
86
51
GType            bus_match_rule_get_type    (void);
87
 
BusMatchRule    *bus_match_rule_new         (const gchar    *text);
88
 
BusMatchRule    *bus_match_rule_ref         (BusMatchRule   *rule);
89
 
void             bus_match_rule_unref       (BusMatchRule   *rule);
90
 
void             bus_match_rule_free        (BusMatchRule   *rule);
 
52
BusMatchRule    *bus_match_rule_new         (const gchar        *text);
 
53
BusMatchRule    *bus_match_rule_ref         (BusMatchRule       *rule);
 
54
void             bus_match_rule_unref       (BusMatchRule       *rule);
 
55
void             bus_match_rule_free        (BusMatchRule       *rule);
91
56
gboolean         bus_match_rule_set_message_type
92
 
                                            (BusMatchRule   *rule,
93
 
                                             gint            type);
94
 
gboolean         bus_match_rule_set_sender  (BusMatchRule   *rule,
95
 
                                             const gchar    *sender);
 
57
                                            (BusMatchRule       *rule,
 
58
                                             gint                type);
 
59
gboolean         bus_match_rule_set_sender  (BusMatchRule       *rule,
 
60
                                             const gchar        *sender);
96
61
gboolean         bus_match_rule_set_interface
97
 
                                            (BusMatchRule   *rule,
98
 
                                             const gchar    *interface);
99
 
gboolean         bus_match_rule_set_member  (BusMatchRule   *rule,
100
 
                                             const gchar    *member);
101
 
gboolean         bus_match_rule_set_path    (BusMatchRule   *rule,
102
 
                                             const gchar    *path);
 
62
                                            (BusMatchRule       *rule,
 
63
                                             const gchar        *interface);
 
64
gboolean         bus_match_rule_set_member  (BusMatchRule       *rule,
 
65
                                             const gchar        *member);
 
66
gboolean         bus_match_rule_set_path    (BusMatchRule       *rule,
 
67
                                             const gchar        *path);
103
68
gboolean         bus_match_rule_set_destination
104
 
                                            (BusMatchRule   *rule,
105
 
                                             const gchar    *dest);
106
 
gboolean         bus_match_rule_set_arg     (BusMatchRule   *rule,
107
 
                                             guint           arg_i,
108
 
                                             const gchar    *arg);
109
 
gboolean         bus_match_rule_match       (BusMatchRule   *rule,
110
 
                                             IBusMessage    *message);
111
 
gboolean         bus_match_rule_is_equal    (BusMatchRule   *a,
112
 
                                             BusMatchRule   *b);
 
69
                                            (BusMatchRule       *rule,
 
70
                                             const gchar        *dest);
 
71
gboolean         bus_match_rule_set_arg     (BusMatchRule       *rule,
 
72
                                             guint               arg_i,
 
73
                                             const gchar        *arg);
 
74
gboolean         bus_match_rule_match       (BusMatchRule       *rule,
 
75
                                             GDBusMessage       *message);
 
76
gboolean         bus_match_rule_is_equal    (BusMatchRule       *a,
 
77
                                             BusMatchRule       *b);
113
78
void             bus_match_rule_add_recipient
114
 
                                            (BusMatchRule   *rule,
115
 
                                             BusConnection  *connection);
 
79
                                            (BusMatchRule       *rule,
 
80
                                             BusConnection      *connection);
116
81
void             bus_match_rule_remove_recipient
117
 
                                            (BusMatchRule   *rule,
118
 
                                             BusConnection  *connection);
 
82
                                            (BusMatchRule       *rule,
 
83
                                             BusConnection      *connection);
119
84
GList           *bus_match_rule_get_recipients
120
85
                                            (BusMatchRule   *rule,
121
 
                                             IBusMessage    *message);
 
86
                                             GDBusMessage   *message);
122
87
 
123
88
G_END_DECLS
124
89
#endif