]> git.0d.be Git - empathy.git/blob - libempathy/empathy-tp-tube.h
Keep a priv pointer in the object struct instead of using G_TYPE_INSTANCE_GET_PRIVATE...
[empathy.git] / libempathy / empathy-tp-tube.h
1 /*
2  * Copyright (C) 2008 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: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
19  *          Elliot Fairweather <elliot.fairweather@collabora.co.uk>
20  */
21
22 #ifndef __EMPATHY_TP_TUBE_H__
23 #define __EMPATHY_TP_TUBE_H__
24
25 #include <glib-object.h>
26
27 #include <telepathy-glib/channel.h>
28
29 #include "empathy-contact.h"
30
31 G_BEGIN_DECLS
32
33 #define EMPATHY_TYPE_TP_TUBE (empathy_tp_tube_get_type ())
34 #define EMPATHY_TP_TUBE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), \
35     EMPATHY_TYPE_TP_TUBE, EmpathyTpTube))
36 #define EMPATHY_TP_TUBE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
37     EMPATHY_TYPE_TP_TUBE, EmpathyTpTubeClass))
38 #define EMPATHY_IS_TP_TUBE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), \
39     EMPATHY_TYPE_TP_TUBE))
40 #define EMPATHY_IS_TP_TUBE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
41     EMPATHY_TYPE_TP_TUBE))
42 #define EMPATHY_TP_TUBE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), \
43     EMPATHY_TYPE_TP_TUBE, EmpathyTpTubeClass))
44
45 typedef struct _EmpathyTpTube EmpathyTpTube;
46 typedef struct _EmpathyTpTubeClass EmpathyTpTubeClass;
47
48 struct _EmpathyTpTube {
49   GObject parent;
50   gpointer priv;
51 };
52
53 struct _EmpathyTpTubeClass {
54   GObjectClass parent_class;
55 };
56
57 GType empathy_tp_tube_get_type (void) G_GNUC_CONST;
58 EmpathyTpTube *empathy_tp_tube_new (TpChannel *channel, guint tube_id);
59 EmpathyTpTube *empathy_tp_tube_new_stream_tube (EmpathyContact *contact,
60     TpSocketAddressType type, const gchar *hostname, guint port,
61     const gchar *service);
62 void empathy_tp_tube_accept_stream_tube (EmpathyTpTube *tube,
63     TpSocketAddressType type);
64 void empathy_tp_tube_get_socket (EmpathyTpTube *tube, gchar **hostname,
65     guint *port);
66
67 G_END_DECLS
68
69 #endif /* __EMPATHY_TP_TUBE_H__ */