113
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
1 |
DOCUMENTATION:
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
2 |
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
3 |
I: Jingle
|
132
|
4 |
Jingle is a module whose purpose is to allow other modules to work together.
|
|
5 |
There are two sorts of modules jingle can work with: application modules
|
|
6 |
handle or produce data (e.g. File Transfer, Voice) and transport modules
|
|
7 |
transport the data using some method/protocol (e.g In-Band Bytestreams, SOCKS5
|
|
8 |
Bytestreams).
|
|
9 |
The "sub-modules" must implement a set of functions and register to the jingle
|
|
10 |
module.
|
|
11 |
The jingle module will catch and dispatch incoming jingle iqs and also offer an
|
|
12 |
interface between apps and trans modules. The module also keep track of all
|
|
13 |
initialized sessions in a linked list of JingleSession structures. This
|
|
14 |
structure contains all the relevant informations about a session together with a
|
|
15 |
linked list of SessionContent, a structure containing information about a
|
|
16 |
specific content.
|
|
17 |
SessionContent contains pointer to fonctions in the application and transport
|
|
18 |
modules and opaque pointers to the internal representation of the app and
|
|
19 |
transport by the corresponding app and transport modules.
|
113
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
20 |
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
21 |
An application module must provide:
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
22 |
- check: check if the description of a JingleContent is correct;
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
23 |
- handle: each application have some options not conventional, so handle is the
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
24 |
less option. We give him all the jingle iqs than other function doesn't
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
25 |
handle;
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
26 |
- tomessage: add the gconstpointer to a given node;
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
27 |
- handle_data: when the peer send data to us, the trans module catch it and
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
28 |
give it to jingle. After jingle give it to the apps via this
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
29 |
function;
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
30 |
- start: the session have been accepted we can init our transfer;
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
31 |
- send: it's call until there is datas to send;
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
32 |
- stop: we've got a session-terminate, we need to close transfer, files, ...
|
136
|
33 |
- info: give printable informations to show before accept content.
|
113
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
34 |
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
35 |
An transport module must provide:
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
36 |
- check: the same as application;
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
37 |
- tomessage: idem;
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
38 |
- xmlns: util when we got only funcs, to know who are we;
|
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
39 |
- new: to create a new transport node, with default options;
|
136
|
40 |
- send: to send data given by apps via jingle;
|
|
41 |
- info: give printable informations to show before accept content.
|
|
42 |
|
|
43 |
More over the sub-modules can handle jingle.
|
|
44 |
The applications modules would handle jingle to send theirs data and the
|
|
45 |
transports modules to say they handle data.
|
|
46 |
|
|
47 |
II: Jingle File Transfer (JFT)
|
|
48 |
JFT is an application module design for the file transfer (XEP 234).
|
|
49 |
It provides 1 commande (/jft) with several options.
|
|
50 |
Options are :
|
|
51 |
- send: to send a file.
|
|
52 |
- info: to see a list of files incoming and outgoing.
|
|
53 |
- flush: to remove error / rejected / ended file.
|
|
54 |
|
|
55 |
III: Jingle In Band Bytestream (JIBB)
|
|
56 |
Nothing to say on this module. He send and got data.
|