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;
49 TpSocketAddressType type;
51 struct socket_address_t {
54 struct inet_address_t {
59 } EmpathyTpTubeAddress;
61 struct _EmpathyTpTube {
66 struct _EmpathyTpTubeClass {
67 GObjectClass parent_class;
70 GType empathy_tp_tube_get_type (void) G_GNUC_CONST;
71 EmpathyTpTube *empathy_tp_tube_new (TpChannel *channel);
72 EmpathyTpTube *empathy_tp_tube_new_stream_tube (EmpathyContact *contact,
73 TpSocketAddressType type, const gchar *hostname, guint port,
74 const gchar *service, GHashTable *parameters);
76 typedef void (EmpatyTpTubeAcceptStreamTubeCb) (EmpathyTpTube *tube,
77 const EmpathyTpTubeAddress *address, const GError *error,
80 void empathy_tp_tube_accept_stream_tube (EmpathyTpTube *tube,
81 TpSocketAddressType type, EmpatyTpTubeAcceptStreamTubeCb *callback,
86 #endif /* __EMPATHY_TP_TUBE_H__ */