2019-06-25 14:52:38 +02:00
|
|
|
#ifndef DC_INTERNAL_H
|
|
|
|
#define DC_INTERNAL_H
|
2019-06-15 21:33:46 +02:00
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
#include <pthread.h>
|
|
|
|
|
|
|
|
#include <curl/curl.h>
|
|
|
|
|
|
|
|
#include <jansson.h>
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include <event.h>
|
|
|
|
#include <event2/thread.h>
|
|
|
|
|
2019-06-25 15:01:36 +02:00
|
|
|
#include <dc/util.h>
|
2019-07-04 19:25:38 +02:00
|
|
|
#include <dc/refable.h>
|
|
|
|
#include <dc/account.h>
|
2019-06-25 15:01:36 +02:00
|
|
|
|
2019-07-09 21:44:23 +02:00
|
|
|
#define DEBUG
|
2019-06-15 21:33:46 +02:00
|
|
|
|
|
|
|
#define return_if_true(v,r) do { if (v) return r; } while(0)
|
|
|
|
#define goto_if_true(v,l) do { if (v) goto l; } while(0)
|
2019-07-19 16:09:28 +02:00
|
|
|
#define continue_if_true(v) if (v) continue
|
2019-06-15 21:33:46 +02:00
|
|
|
|
2019-07-08 18:38:24 +02:00
|
|
|
#define TOKEN(l) (dc_account_token(l))
|
|
|
|
|
2019-07-09 21:44:23 +02:00
|
|
|
#define DISCORD_URL "https://discordapp.com/api/v6"
|
|
|
|
#define DISCORD_GATEWAY_URL "/?encoding=json&v=6"
|
|
|
|
#define DISCORD_GATEWAY_HOST "gateway.discord.gg"
|
|
|
|
#define DISCORD_GATEWAY "https://" DISCORD_GATEWAY_HOST DISCORD_GATEWAY_URL
|
|
|
|
|
|
|
|
#define DISCORD_USERAGENT "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
|
|
|
|
|
2019-06-15 21:33:46 +02:00
|
|
|
#endif
|