summaryrefslogtreecommitdiff
path: root/tdutils.h
blob: c0653d5ced00fedab7da141d8b6ce129eb6116e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _TDUTILS_H
#define _TDUTILS_H

#include <td/telegram/td_c_client.h>
#include <stdbool.h>

extern long long my_id;
extern bool closing;

void td_init();

void td_free();

void td_loop();

void tg_close();

int td_send(void *func, void (*cb)(bool, struct TdObject *, struct TdError *, void *), void *cb_arg);

void fetal_cb(bool successful, struct TdObject *result, struct TdError *error, void *cb_arg);

int post_auth();

int handle_message(struct TdUpdateNewMessage *update);

int handle_inline(struct TdUpdateNewInlineQuery * update);

#endif /* _TDUTILS_H */