1 /* |
|
2 * gabble-im-channel.h - Header for GabbleIMChannel |
|
3 * Copyright (C) 2005 Collabora Ltd. |
|
4 * |
|
5 * |
|
6 * This library is free software; you can redistribute it and/or |
|
7 * modify it under the terms of the GNU Lesser General Public |
|
8 * License as published by the Free Software Foundation; either |
|
9 * version 2.1 of the License, or (at your option) any later version. |
|
10 * |
|
11 * This library is distributed in the hope that it will be useful, |
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
14 * Lesser General Public License for more details. |
|
15 * |
|
16 * You should have received a copy of the GNU Lesser General Public |
|
17 * License along with this library; if not, write to the Free Software |
|
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
19 */ |
|
20 |
|
21 #ifndef __GABBLE_IM_CHANNEL_H__ |
|
22 #define __GABBLE_IM_CHANNEL_H__ |
|
23 |
|
24 #include <glib-object.h> |
|
25 #include <time.h> |
|
26 |
|
27 #include "handles.h" |
|
28 #include "telepathy-constants.h" |
|
29 #include "text-mixin.h" |
|
30 |
|
31 G_BEGIN_DECLS |
|
32 |
|
33 typedef struct _GabbleIMChannel GabbleIMChannel; |
|
34 typedef struct _GabbleIMChannelClass GabbleIMChannelClass; |
|
35 |
|
36 struct _GabbleIMChannelClass { |
|
37 GObjectClass parent_class; |
|
38 |
|
39 GabbleTextMixinClass text_class; |
|
40 }; |
|
41 |
|
42 struct _GabbleIMChannel { |
|
43 GObject parent; |
|
44 |
|
45 GabbleTextMixin text; |
|
46 |
|
47 gpointer priv; |
|
48 }; |
|
49 |
|
50 IMPORT_C GType gabble_im_channel_get_type(void); |
|
51 |
|
52 /* TYPE MACROS */ |
|
53 #define GABBLE_TYPE_IM_CHANNEL \ |
|
54 (gabble_im_channel_get_type()) |
|
55 #define GABBLE_IM_CHANNEL(obj) \ |
|
56 (G_TYPE_CHECK_INSTANCE_CAST((obj), GABBLE_TYPE_IM_CHANNEL, GabbleIMChannel)) |
|
57 #define GABBLE_IM_CHANNEL_CLASS(klass) \ |
|
58 (G_TYPE_CHECK_CLASS_CAST((klass), GABBLE_TYPE_IM_CHANNEL, GabbleIMChannelClass)) |
|
59 #define GABBLE_IS_IM_CHANNEL(obj) \ |
|
60 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GABBLE_TYPE_IM_CHANNEL)) |
|
61 #define GABBLE_IS_IM_CHANNEL_CLASS(klass) \ |
|
62 (G_TYPE_CHECK_CLASS_TYPE((klass), GABBLE_TYPE_IM_CHANNEL)) |
|
63 #define GABBLE_IM_CHANNEL_GET_CLASS(obj) \ |
|
64 (G_TYPE_INSTANCE_GET_CLASS ((obj), GABBLE_TYPE_IM_CHANNEL, GabbleIMChannelClass)) |
|
65 |
|
66 gboolean _gabble_im_channel_receive (GabbleIMChannel *chan, TpChannelTextMessageType type, GabbleHandle sender, const char *from, time_t timestamp, const char *text); |
|
67 |
|
68 gboolean |
|
69 gabble_im_channel_acknowledge_pending_messages (GabbleIMChannel *self, |
|
70 const GArray *ids, |
|
71 GError **error); |
|
72 |
|
73 gboolean |
|
74 gabble_im_channel_close (GabbleIMChannel *self, |
|
75 GError **error); |
|
76 |
|
77 gboolean |
|
78 gabble_im_channel_get_channel_type (GabbleIMChannel *self, |
|
79 gchar **ret, |
|
80 GError **error); |
|
81 |
|
82 gboolean |
|
83 gabble_im_channel_get_handle (GabbleIMChannel *self, |
|
84 guint *ret, |
|
85 guint *ret1, |
|
86 GError **error); |
|
87 |
|
88 gboolean |
|
89 gabble_im_channel_get_interfaces (GabbleIMChannel *self, |
|
90 gchar ***ret, |
|
91 GError **error); |
|
92 |
|
93 gboolean |
|
94 gabble_im_channel_get_message_types (GabbleIMChannel *self, |
|
95 GArray **ret, |
|
96 GError **error); |
|
97 |
|
98 gboolean |
|
99 gabble_im_channel_list_pending_messages (GabbleIMChannel *self, |
|
100 gboolean clear, |
|
101 GPtrArray **ret, |
|
102 GError **error); |
|
103 |
|
104 gboolean |
|
105 gabble_im_channel_send (GabbleIMChannel *self, |
|
106 guint type, |
|
107 const gchar *text, |
|
108 GError **error); |
|
109 |
|
110 |
|
111 |
|
112 G_END_DECLS |
|
113 |
|
114 #endif /* #ifndef __GABBLE_IM_CHANNEL_H__*/ |
|