Created by: juniorz
At the moment we have two sets of API:
Protocol API (
This is the API for "Off-the-Record Messaging Protocol version 4". A protocol manages a connection that allows different versions of the wire protocols defined in the spec (version 3 and version 4). Once two running protocols decide on a wire protocol version, they use it to start a connection by running a key-exchange algorithm.
A connection is able to process incoming zero-terminated
*char messages ("strings") from the IM network and decide how to respond to it. Incoming messages may cause a zero-terminated
*char message (OTR-encoded "strings") to be send as a response, or contain a
*uint8_t plaintext message (array of bytes).
A connection is able to process
*uint8_t plaintext message (array of bytes) into a zero-terminated
*char message (either OTR-encoded or plaintext message "strings") before sending to the IM network.
Client API (
This is a "messaging client". A client manages multiple conversations with other recipients/senders, identified by a identity ("email@example.com", for example).
A client knows which conversation to use in order to send/receive zero-terminated
*char messages ("strings") to/from a recipient/sender.