doc.txt
author Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
Sun, 12 Sep 2010 18:20:53 +0200
changeset 167 97f93fa3cd95
parent 136 405f99d8f3c5
permissions -rw-r--r--
Change socks5.c to s5b.c in the headers and cmakelist

DOCUMENTATION:

I: Jingle
Jingle is a module whose purpose is to allow other modules to work together.
There are two sorts of modules jingle can work with: application modules
handle or produce data (e.g. File Transfer, Voice) and transport modules
transport the data using some method/protocol (e.g In-Band Bytestreams, SOCKS5
Bytestreams).
The "sub-modules" must implement a set of functions and register to the jingle
module.
The jingle module will catch and dispatch incoming jingle iqs and also offer an
interface between apps and trans modules. The module also keep track of all
initialized sessions in a linked list of JingleSession structures. This
structure contains all the relevant informations about a session together with a
linked list of SessionContent, a structure containing information about a
specific content.
SessionContent contains pointer to fonctions in the application and transport
modules and opaque pointers to the internal representation of the app and
transport by the corresponding app and transport modules.

An application module must provide:
- check: check if the description of a JingleContent is correct;
- handle: each application have some options not conventional, so handle is the
          less option. We give him all the jingle iqs than other function doesn't
          handle;
- tomessage: add the gconstpointer to a given node;
- handle_data: when the peer send data to us, the trans module catch it and
               give it to jingle. After jingle give it to the apps via this
               function;
- start: the session have been accepted we can init our transfer;
- send: it's call until there is datas to send;
- stop: we've got a session-terminate, we need to close transfer, files, ...
- info: give printable informations to show before accept content.

An transport module must provide:
- check: the same as application;
- tomessage: idem;
- xmlns: util when we got only funcs, to know who are we;
- new: to create a new transport node, with default options;
- send: to send data given by apps via jingle;
- info: give printable informations to show before accept content.

More over the sub-modules can handle jingle.
The applications modules would handle jingle to send theirs data and the
transports modules to say they handle data.

II: Jingle File Transfer (JFT)
JFT is an application module design for the file transfer (XEP 234).
It provides 1 commande (/jft) with several options.
Options are :
- send: to send a file.
- info: to see a list of files incoming and outgoing.
- flush: to remove error / rejected / ended file.

III: Jingle In Band Bytestream (JIBB)
Nothing to say on this module. He send and got data.