2018-05-02 01:31:18 +01:00
|
|
|
#ifndef DELTA_CONNECTION_H
|
|
|
|
#define DELTA_CONNECTION_H
|
|
|
|
|
|
|
|
#include <glib.h>
|
2019-01-05 23:39:06 +00:00
|
|
|
#include <deltachat/deltachat.h>
|
2019-01-06 01:16:15 +00:00
|
|
|
#include <pthread.h>
|
2018-05-02 01:31:18 +01:00
|
|
|
|
|
|
|
struct _PurpleConnection;
|
|
|
|
|
|
|
|
typedef struct _DeltaConnectionData {
|
|
|
|
struct _PurpleConnection *pc;
|
2019-01-05 23:39:06 +00:00
|
|
|
dc_context_t *mailbox;
|
2019-01-06 01:16:15 +00:00
|
|
|
|
|
|
|
// Set to 0 to convince threads to exit
|
|
|
|
int runthreads;
|
|
|
|
|
2021-01-10 15:56:07 +00:00
|
|
|
pthread_t event_thread;
|
2018-05-02 01:31:18 +01:00
|
|
|
} DeltaConnectionData;
|
|
|
|
|
2019-01-06 01:16:15 +00:00
|
|
|
#define MAX_DELTA_CONFIGURE 1000
|
2018-05-02 02:09:59 +01:00
|
|
|
|
2018-05-02 01:31:18 +01:00
|
|
|
void delta_connection_new(struct _PurpleConnection *pc);
|
|
|
|
void delta_connection_free(struct _PurpleConnection *pc);
|
|
|
|
|
2018-05-02 02:09:59 +01:00
|
|
|
void delta_connection_start_login(PurpleConnection *pc);
|
|
|
|
|
|
|
|
int delta_send_im(PurpleConnection *pc, const char *who, const char *message, PurpleMessageFlags flags);
|
|
|
|
|
2018-05-02 01:31:18 +01:00
|
|
|
#endif
|
|
|
|
|