Delta Chat Core C-API
|
This document describes how to handle the Delta Chat core library.For general information about Delta Chat itself, see https://delta.chat and https://github.com/deltachat.
Let's start.
First of all, you have to define a function that is called by the library on specific events (eg. when the configuration is done or when fresh messages arrive). Your function should look like the following:
After that, you can create and configure a mrmailbox_t object easily as follows:
mrmailbox_configure_and_connect() may take a while and saves the result in the database. On subsequent starts, you can call mrmailbox_connect() instead if mrmailbox_is_configured() returns true.
However, now you can send your first message:
Now, go to the testing address (bob) and you should have received a normal email. Answer this email in any email program with "Got it!" and you will get the message from delta as follows:
This will output the following two lines:
I think, you got the idea. For further reading, please dive into the mrmailbox_t class.
For a class reference, see the "Classes" link atop.
Here are some additional, unsorted hints that may be useful. If you need any further assistance, please do not hesitate to contact us at r10s@. b44t .com
get
-functions, you have to unref the return value in some way.pthread_*
functions)The following points are important mainly for the authors of the library itself:
LF
, 0x0A
or \n
)Please keep in mind, that your derived work must be released under a GPL-compatible licence. For details, please have a look at the LICENSE file accompanying the source code.
See you.