author | Gu1 <gu1@aeroxteam.fr> |
Fri, 27 Aug 2010 11:19:32 +0200 | |
changeset 163 | a4c75fe75869 |
parent 161 | fa1d993d05b6 |
child 164 | 6866328b34bd |
permissions | -rw-r--r-- |
154
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
1 |
#ifndef __JINGLESOCKS5_H__ |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
2 |
#define __JINGLESOCKS5_H__ 1 |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
3 |
|
161
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
4 |
#include <glib.h> |
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
5 |
#include <gio/gio.h> |
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
6 |
|
154
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
7 |
#define NS_JINGLE_TRANSPORT_SOCKS5 "urn:xmpp:jingle:transports:s5b:1" |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
8 |
|
161
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
9 |
|
154
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
10 |
typedef enum { |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
11 |
JINGLE_S5B_DIRECT, |
161
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
12 |
JINGLE_S5B_ASSISTED, |
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
13 |
JINGLE_S5B_TUNNEL, |
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
14 |
JINGLE_S5B_PROXY |
154
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
15 |
} JingleS5BType; |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
16 |
|
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
17 |
typedef enum { |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
18 |
JINGLE_S5B_TCP, |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
19 |
JINGLE_S5B_UDP |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
20 |
} JingleS5BModes; |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
21 |
|
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
22 |
typedef struct { |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
23 |
JingleS5BModes mode; |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
24 |
|
158
a068e5714120
JS5B: Start the handle function
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
157
diff
changeset
|
25 |
const gchar *sid; |
154
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
26 |
|
161
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
27 |
GSocketConnection *sock; |
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
28 |
|
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
29 |
GSocketListener *listener; |
154
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
30 |
|
157
8ec7ce3ecaac
S5B: Start the "new" function that create a new JingleS5B.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
154
diff
changeset
|
31 |
/** |
8ec7ce3ecaac
S5B: Start the "new" function that create a new JingleS5B.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
154
diff
changeset
|
32 |
* This is the list of the other client's candidates. |
8ec7ce3ecaac
S5B: Start the "new" function that create a new JingleS5B.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
154
diff
changeset
|
33 |
*/ |
154
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
34 |
GSList *candidates; |
157
8ec7ce3ecaac
S5B: Start the "new" function that create a new JingleS5B.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
154
diff
changeset
|
35 |
|
8ec7ce3ecaac
S5B: Start the "new" function that create a new JingleS5B.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
154
diff
changeset
|
36 |
/** |
8ec7ce3ecaac
S5B: Start the "new" function that create a new JingleS5B.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
154
diff
changeset
|
37 |
* This is our list of candidates, the one we sent during a |
8ec7ce3ecaac
S5B: Start the "new" function that create a new JingleS5B.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
154
diff
changeset
|
38 |
* session-initiate or session-accept. |
8ec7ce3ecaac
S5B: Start the "new" function that create a new JingleS5B.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
154
diff
changeset
|
39 |
*/ |
8ec7ce3ecaac
S5B: Start the "new" function that create a new JingleS5B.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
154
diff
changeset
|
40 |
GSList *ourcandidates; |
154
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
41 |
} JingleS5B; |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
42 |
|
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
43 |
typedef struct { |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
44 |
const gchar *cid; |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
45 |
|
161
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
46 |
GInetAddress *host; |
154
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
47 |
|
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
48 |
const gchar *jid; |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
49 |
|
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
50 |
guint16 port; |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
51 |
|
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
52 |
guint64 priority; |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
53 |
|
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
54 |
JingleS5BType type; |
161
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
55 |
|
fa1d993d05b6
S5B: Use a GSocketListener to manage listener sockets.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
158
diff
changeset
|
56 |
GSocket *sock; |
154
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
57 |
} S5BCandidate; |
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
58 |
|
1ffa1733d4b6
Add a function to find local ips in S5B
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
59 |
#endif |