aboutsummaryrefslogtreecommitdiff
path: root/easy-tg.h
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2021-10-12 14:12:27 -0700
committerTrumeet <yuuta@yuuta.moe>2021-10-12 14:12:27 -0700
commit612fa53409ae24bf4b17e87a0c52e63658b59014 (patch)
treef05554fb57ea2162333d8918b0a3498550707fb7 /easy-tg.h
parent5eb340686e89c77411dc9c2b301db02b69739676 (diff)
downloadeasy-tg-612fa53409ae24bf4b17e87a0c52e63658b59014.tar
easy-tg-612fa53409ae24bf4b17e87a0c52e63658b59014.tar.gz
easy-tg-612fa53409ae24bf4b17e87a0c52e63658b59014.tar.bz2
easy-tg-612fa53409ae24bf4b17e87a0c52e63658b59014.zip
handle updateConnectionState
Diffstat (limited to 'easy-tg.h')
-rw-r--r--easy-tg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/easy-tg.h b/easy-tg.h
index fd66314..64e2649 100644
--- a/easy-tg.h
+++ b/easy-tg.h
@@ -16,12 +16,19 @@
#define TG_PARAMS 11 /* Need to provide TDLib parameters. */
#define TG_ERROR 12 /* TDLib returns an error. td_errno = code, r1 = extra, r2 = msg. */
#define TG_SYSERR 13 /* EasyTD encounters an error. */
+#define TG_CONNECTION 14 /* Telegram connection state update. tg_errno = code, r1 = raw type */
#define TG_REQ_SET_PARAMS "set_params"
#define TG_REQ_LOGIN_PHONE "login_phone"
#define TG_REQ_LOGIN_CODE "login_code"
#define TG_REQ_LOGIN_PASS "login_pass"
+#define TG_CONNECTION_CONNECTING 1
+#define TG_CONNECTION_CONNECTING_PROXY 2
+#define TG_CONNECTION_READY 3
+#define TG_CONNECTION_UPDATING 4
+#define TG_CONNECTION_WAITING_NETWORK 5
+
#include <json-c/json_object.h>
#include <stdint.h>
#include <stdbool.h>