1 /*
2  * tp-channel-iface.h - Headers for Telepathy Channel interface
3  *
4  * Copyright (C) 2006 Collabora Ltd.
5  * Copyright (C) 2006 Nokia Corporation
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 #if defined (TP_DISABLE_SINGLE_INCLUDE) && !defined (_TP_IN_META_HEADER) && !defined (_TP_COMPILATION)
23 #error "Only <telepathy-glib/telepathy-glib.h> and <telepathy-glib/telepathy-glib-dbus.h> can be included directly."
24 #endif
25 
26 #ifndef __TP_CHANNEL_IFACE_H__
27 #define __TP_CHANNEL_IFACE_H__
28 
29 #include <glib-object.h>
30 
31 G_BEGIN_DECLS
32 
33 #define TP_TYPE_CHANNEL_IFACE (tp_channel_iface_get_type ())
34 
35 #define TP_CHANNEL_IFACE(obj) \
36   (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
37   TP_TYPE_CHANNEL_IFACE, TpChannelIface))
38 
39 #define TP_IS_CHANNEL_IFACE(obj) \
40   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
41   TP_TYPE_CHANNEL_IFACE))
42 
43 #define TP_CHANNEL_IFACE_GET_CLASS(obj) \
44   (G_TYPE_INSTANCE_GET_INTERFACE ((obj), \
45   TP_TYPE_CHANNEL_IFACE, TpChannelIfaceClass))
46 
47 /**
48  * TpChannelIface:
49  *
50  * Opaque typedef representing a channel.
51  */
52 typedef struct _TpChannelIface TpChannelIface;
53 
54 typedef struct _TpChannelIfaceClass TpChannelIfaceClass;
55 
56 /**
57  * TpChannelFunc:
58  * @self: An object implementing the channel interface
59  * @userdata: Arbitrary user-supplied data
60  *
61  * A callback for functions which act on channels.
62  */
63 typedef void (* TpChannelFunc) (TpChannelIface *self, gpointer userdata);
64 
65 /**
66  * TpChannelIfaceClass:
67  * @parent_class: The parent interface
68  *
69  * The class of the #TpChannelIface interface.
70  */
71 struct _TpChannelIfaceClass {
72   GTypeInterface parent_class;
73 };
74 
75 GType tp_channel_iface_get_type (void);
76 
77 G_END_DECLS
78 
79 #endif /* __TP_CHANNEL_IFACE_H__ */
80