doc.txt
author Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
Sat, 14 Aug 2010 01:39:05 +0200
changeset 113 cb5adb25ad87
child 132 4fef4ced1e97
permissions -rw-r--r--
The start of doc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
113
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     1
DOCUMENTATION:
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     2
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     3
I: Jingle
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     4
Jingle is a module who can't work alone. His meaning of life is make working
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     5
others modules. There is two sorts of modules: applications (File Transfer, Voice)
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     6
and transports (IBB, socks5, ...).
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     7
The "sub-modules" must register in jingle and provide some generic function.
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     8
After the jingle module catch and dispatch all jingle's iqs. And offer an
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
     9
interface between apps and trans.
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    10
Jingle module keep a way of all sessions via JingleSession structures.
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    11
This JingleSession got all the informations and a list of SessionContent, which
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    12
are struct containing information about content and 2 gconstpointer. This pointer
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    13
are data from apps and trans.
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    14
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    15
An application module must provide:
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    16
- check: check if the description of a JingleContent is correct;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    17
- handle: each application have some options not conventional, so handle is the
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    18
          less option. We give him all the jingle iqs than other function doesn't
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    19
          handle;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    20
- tomessage: add the gconstpointer to a given node;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    21
- handle_data: when the peer send data to us, the trans module catch it and
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    22
               give it to jingle. After jingle give it to the apps via this
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    23
               function;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    24
- start: the session have been accepted we can init our transfer;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    25
- send: it's call until there is datas to send;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    26
- stop: we've got a session-terminate, we need to close transfer, files, ...
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    27
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    28
An transport module must provide:
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    29
- check: the same as application;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    30
- tomessage: idem;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    31
- cmp: to know if 2 transports are the same. Use by IBB, when we got
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    32
       a new data jingle must look the gconstpointer to got the ibb-id to know
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    33
       which apps is concerned;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    34
- xmlns: util when we got only funcs, to know who are we;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    35
- new: to create a new transport node, with default options;
cb5adb25ad87 The start of doc
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff changeset
    36
-send: to send data given by apps via jingle.