1 /* |
|
2 * roster.h - Headers for Gabble roster helper |
|
3 * |
|
4 * Copyright (C) 2006 Collabora Ltd. |
|
5 * |
|
6 * |
|
7 * This library is free software; you can redistribute it and/or |
|
8 * modify it under the terms of the GNU Lesser General Public |
|
9 * License as published by the Free Software Foundation; either |
|
10 * version 2.1 of the License, or (at your option) any later version. |
|
11 * |
|
12 * This library is distributed in the hope that it will be useful, |
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
15 * Lesser General Public License for more details. |
|
16 * |
|
17 * You should have received a copy of the GNU Lesser General Public |
|
18 * License along with this library; if not, write to the Free Software |
|
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
20 */ |
|
21 |
|
22 #ifndef __ROSTER_H__ |
|
23 #define __ROSTER_H__ |
|
24 |
|
25 #include <glib-object.h> |
|
26 |
|
27 #include "gabble-types.h" |
|
28 |
|
29 G_BEGIN_DECLS |
|
30 |
|
31 typedef struct _GabbleRosterClass GabbleRosterClass; |
|
32 |
|
33 IMPORT_C GType gabble_roster_get_type(void); |
|
34 |
|
35 /* TYPE MACROS */ |
|
36 #define GABBLE_TYPE_ROSTER \ |
|
37 (gabble_roster_get_type()) |
|
38 #define GABBLE_ROSTER(obj) \ |
|
39 (G_TYPE_CHECK_INSTANCE_CAST((obj), GABBLE_TYPE_ROSTER, GabbleRoster)) |
|
40 #define GABBLE_ROSTER_CLASS(klass) \ |
|
41 (G_TYPE_CHECK_CLASS_CAST((klass), GABBLE_TYPE_ROSTER, GabbleRosterClass)) |
|
42 #define GABBLE_IS_ROSTER(obj) \ |
|
43 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GABBLE_TYPE_ROSTER)) |
|
44 #define GABBLE_IS_ROSTER_CLASS(klass) \ |
|
45 (G_TYPE_CHECK_CLASS_TYPE((klass), GABBLE_TYPE_ROSTER)) |
|
46 #define GABBLE_ROSTER_GET_CLASS(obj) \ |
|
47 (G_TYPE_INSTANCE_GET_CLASS ((obj), GABBLE_TYPE_ROSTER, GabbleRosterClass)) |
|
48 |
|
49 struct _GabbleRosterClass { |
|
50 GObjectClass parent_class; |
|
51 }; |
|
52 |
|
53 struct _GabbleRoster { |
|
54 GObject parent; |
|
55 gpointer priv; |
|
56 }; |
|
57 |
|
58 typedef enum |
|
59 { |
|
60 GABBLE_ROSTER_SUBSCRIPTION_NONE = 0, |
|
61 GABBLE_ROSTER_SUBSCRIPTION_FROM = 1 << 0, |
|
62 GABBLE_ROSTER_SUBSCRIPTION_TO = 1 << 1, |
|
63 GABBLE_ROSTER_SUBSCRIPTION_BOTH = GABBLE_ROSTER_SUBSCRIPTION_FROM | |
|
64 GABBLE_ROSTER_SUBSCRIPTION_TO, |
|
65 GABBLE_ROSTER_SUBSCRIPTION_REMOVE = 1 << 2, |
|
66 } GabbleRosterSubscription; |
|
67 |
|
68 GabbleRoster *gabble_roster_new (GabbleConnection *); |
|
69 |
|
70 GabbleRosterSubscription gabble_roster_handle_get_subscription (GabbleRoster *, GabbleHandle); |
|
71 gboolean gabble_roster_handle_set_blocked (GabbleRoster *, GabbleHandle, gboolean, GError **); |
|
72 const gchar *gabble_roster_handle_get_name (GabbleRoster *, GabbleHandle); |
|
73 gboolean gabble_roster_handle_set_name (GabbleRoster *, GabbleHandle, const gchar *, GError **); |
|
74 gboolean gabble_roster_handle_remove (GabbleRoster *, GabbleHandle, GError **); |
|
75 gboolean gabble_roster_handle_add (GabbleRoster *, GabbleHandle, GError **); |
|
76 gboolean gabble_roster_handle_has_entry (GabbleRoster *, GabbleHandle); |
|
77 |
|
78 G_END_DECLS |
|
79 |
|
80 #endif /* __ROSTER_H__ */ |
|