2 * Copyright (C) 2008 Collabora Ltd.
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.
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.
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
18 * Authors: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
19 * Elliot Fairweather <elliot.fairweather@collabora.co.uk>
22 #ifndef __EMPATHY_TP_TUBE_H__
23 #define __EMPATHY_TP_TUBE_H__
25 #include <glib-object.h>
27 #include <telepathy-glib/channel.h>
29 #include "empathy-contact.h"
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))
45 typedef struct _EmpathyTpTube EmpathyTpTube;
46 typedef struct _EmpathyTpTubeClass EmpathyTpTubeClass;
48 struct _EmpathyTpTube {
52 struct _EmpathyTpTubeClass {
53 GObjectClass parent_class;
56 GType empathy_tp_tube_get_type (void) G_GNUC_CONST;
57 EmpathyTpTube *empathy_tp_tube_new (TpChannel *channel, guint tube_id);
58 void empathy_tp_tube_accept_ipv4_stream_tube (EmpathyTpTube *tube);
59 void empathy_tp_tube_accept_unix_stream_tube (EmpathyTpTube *tube);
60 void empathy_tp_tube_get_ipv4_socket (EmpathyTpTube *tube, gchar **hostname,
62 gchar * empathy_tp_tube_get_unix_socket (EmpathyTpTube *tube);
64 void empathy_offer_ipv4_stream_tube (EmpathyContact *contact,
65 const gchar *hostname, guint port, const gchar *service);
69 #endif /* __EMPATHY_TP_TUBE_H__ */