tUpdate documentation with group-chats. - ratox - FIFO based tox client
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit e66d4bff86cb9e4832c98968f1751097ed57ede0
 (DIR) parent 0c97a43e51d3960d9d296438701c4e37f5472f77
 (HTM) Author: pranomostro <pranomestro@gmail.com>
       Date:   Thu, 16 Feb 2017 20:50:20 +0100
       
       Update documentation with group-chats.
       
       Diffstat:
         M README                              |      14 +++++++++++++-
         M ratox.1                             |      24 ++++++++++++++++++++++++
         M ratox.c                             |       2 +-
       
       3 files changed, 38 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/README b/README
       t@@ -53,6 +53,15 @@ to help explain the semantics of the individual files.
        |   |-- text_in                        # 'echo yo dude > text_in' to send a text to this friend
        |   `-- text_out                # 'tail -f text_out' to dump to stdout any text received
        |
       +|-- 00000000
       +|   |-- members                 # list of people in the conference
       +|   |-- invite                  # 'echo 0A734CBA717CEB7883D.... >invite' to invite
       +|   |-- leave                   # 'echo 1 >leave' to leave the conference
       +|   |-- title_in                # 'echo new-title >title_in' to update the conference title
       +|   |-- title_out               # contains the current title
       +|   |-- text_in                 # 'echo blablahumbla >text_in' to message the other conference members
       +|   |-- text_out                # contains the messages sent so far in the conference
       +|
        |-- id                                # 'cat id' to show your own ID, you can give this to your friends
        |
        |-- name                        # changing your nick
       t@@ -86,7 +95,7 @@ Features
        
        1 v 1 messaging: Yes
        File transfer: Yes
       -Group chat: No
       +Group chat: Yes
        Audio: Yes
        Video: No
        DNS discovery: No
       t@@ -115,6 +124,9 @@ NOTE: Some of these features are not intended to be developed
        in ratox itself but rather in external scripts[1] that are built upon
        ratox.
        
       +Group chats do not have file transfers or audio, but will be updated
       +in the near future.
       +
        
        Examples
        ========
 (DIR) diff --git a/ratox.1 b/ratox.1
       t@@ -58,6 +58,10 @@ Status message slot.
        Request slot. Send a friend request by piping the Tox ID to \fBin\fR.  Incoming
        requests are listed as FIFOs in \fBout/\fR. Echo \fB1\fR | \fB0\fR to
        accept | reject them.
       +.It Ar conf/
       +Conference management slot. A conference is created by writing it's title to in. Invites
       +to conferences are FIFOs in \fBout/\fR. Their name is id_cookie (the cookie is random data).
       +They behave like request FIFOs.
        .El
        .Ss Friend slots
        Each friend is represented with a folder in the base-directory named after
       t@@ -107,6 +111,26 @@ Send a text message by piping data to this FIFO.
        .It Ar text_out
        Contains text messages from the friend.
        .El
       +.Ss Conference slots
       +Each conference is represented with a folder in the directory named after the
       +8-digit conference number. The files in the conference folder are an interface
       +for the respective conference.
       +.Bl -tag -width 13n
       +.It Ar members
       +Contains a list of  members of the conference.
       +.It Ar invite
       +Write the ID of a friend to this FIFO to invite him to the conference.
       +.It Ar leave
       +Write to this file to leave the conference.
       +.It Ar title_in
       +Write here to change the title of the conference.
       +.It Ar title_out
       +Contains the title of the conference.
       +.It Ar text_in
       +Echo \fBmessage\fR to send a text message to the conference.
       +.It Ar text_out
       +Contains the messages send in the conference so far.
       +.El
        .Ss Misc files
        .Bl -tag -width 13n
        .It Ar id
 (DIR) diff --git a/ratox.c b/ratox.c
       t@@ -124,8 +124,8 @@ static struct file cfiles[] = {
                [CMEMBERS]    = { .type = STATIC, .name = "members",      .flags = O_WRONLY | O_TRUNC  | O_CREAT },
                [CINVITE]     = { .type = FIFO,          .name = "invite",          .flags = O_RDONLY | O_NONBLOCK         },
                [CLEAVE]      = { .type = FIFO,   .name = "leave",          .flags = O_RDONLY | O_NONBLOCK         },
       -        [CTITLE_OUT]  = { .type = STATIC, .name = "title_out",          .flags = O_WRONLY | O_TRUNC  | O_CREAT },
                [CTITLE_IN]   = { .type = FIFO,   .name = "title_in",          .flags = O_RDONLY | O_NONBLOCK         },
       +        [CTITLE_OUT]  = { .type = STATIC, .name = "title_out",          .flags = O_WRONLY | O_TRUNC  | O_CREAT },
                [CTEXT_IN]    = { .type = FIFO,          .name = "text_in",          .flags = O_RDONLY | O_NONBLOCK         },
                [CTEXT_OUT]   = { .type = STATIC, .name = "text_out",          .flags = O_WRONLY | O_APPEND | O_CREAT },
        };