]> git.0d.be Git - empathy.git/blob - libempathy/empathy-handler.h
Updated Polish translation
[empathy.git] / libempathy / empathy-handler.h
1 /*
2  * Copyright (C) 2007-2009 Collabora Ltd.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17  *
18  * Authors: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
19  */
20
21 #ifndef __EMPATHY_HANDLER_H__
22 #define __EMPATHY_HANDLER_H__
23
24 #include <glib.h>
25
26 #include <telepathy-glib/channel.h>
27 #include <telepathy-glib/dbus-properties-mixin.h>
28
29 G_BEGIN_DECLS
30
31 #define EMPATHY_TYPE_HANDLER         (empathy_handler_get_type ())
32 #define EMPATHY_HANDLER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), \
33   EMPATHY_TYPE_HANDLER, EmpathyHandler))
34 #define EMPATHY_HANDLER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), \
35   EMPATHY_TYPE_HANDLER, EmpathyHandlerClass))
36 #define EMPATHY_IS_HANDLER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
37   EMPATHY_TYPE_HANDLER))
38 #define EMPATHY_IS_HANDLER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), \
39   EMPATHY_TYPE_HANDLER))
40 #define EMPATHY_HANDLER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
41   EMPATHY_TYPE_HANDLER, EmpathyHandlerClass))
42
43 GType empathy_handler_get_type (void) G_GNUC_CONST;
44
45 typedef struct _EmpathyHandler      EmpathyHandler;
46 typedef struct _EmpathyHandlerClass EmpathyHandlerClass;
47
48 struct _EmpathyHandler
49 {
50   GObject parent;
51   gpointer priv;
52 };
53
54 struct _EmpathyHandlerClass
55 {
56   GObjectClass parent_class;
57   TpDBusPropertiesMixinClass dbus_props_class;
58 };
59
60
61 EmpathyHandler * empathy_handler_new (const gchar *name,
62     GPtrArray *filters,
63     GStrv capabilities);
64
65 const gchar *empathy_handler_get_busname (EmpathyHandler *handler);
66
67 typedef gboolean (EmpathyHandlerHandleChannelsFunc) (EmpathyHandler *handler,
68     const gchar *account_path,
69     const gchar *connection_path,
70     const GPtrArray *channels,
71     const GPtrArray *requests_satisfied,
72     guint64 timestamp,
73     GHashTable *handler_info,
74     gpointer user_data,
75     GError **error);
76
77 void empathy_handler_set_handle_channels_func (EmpathyHandler *handler,
78     EmpathyHandlerHandleChannelsFunc *func,
79     gpointer user_data);
80
81 typedef GList * (EmpathyHandlerChannelsFunc) (
82     EmpathyHandler *handler,
83     gpointer user_data);
84
85 void empathy_handler_set_channels_func (EmpathyHandler *handler,
86     EmpathyHandlerChannelsFunc func,
87     gpointer user_data);
88
89 G_END_DECLS
90
91 #endif /* __EMPATHY_HANDLER_H__ */