summaryrefslogtreecommitdiff
path: root/tdutils.h
blob: db2f6de4be034b74e99799bbc51707ff8ed8255a (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
29
30
#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);

int handle_inline_chosen(struct TdUpdateNewChosenInlineResult *);

#endif /* _TDUTILS_H */