-
Notifications
You must be signed in to change notification settings - Fork 0
/
Parser.h
64 lines (56 loc) · 859 Bytes
/
Parser.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "Main.h"
enum ImgType
{
JPEG,
GIF,
PNG,
APNG,
TIFF,
BMP,
PDF,
XCF,
INVALID=0
};
struct imgur_image_info
{
char hash[8];
char deletehash[16];
char datetime[32];
ImgType img_type;
bool animated;
unsigned int width;
unsigned int height;
unsigned int size;
unsigned int views;
unsigned int bandwidth;
};
struct imgur_links_info
{
char original[32];
char imgur_page[32];
char delete_page[48];
char small_square[32];
char large_square[32];
};
struct imgur_upload_info
{
imgur_image_info image;
imgur_links_info links;
};
struct imgur_error_info
{
char message[128];
char request[32];
char method[4];
char format[4];
};
struct imgur_xml_obj
{
char root[32];
union
{
imgur_upload_info upload;
imgur_error_info error;
};
};
bool parse_imgur_xml( char *xml_str, unsigned int xml_strlen, imgur_xml_obj *presponse );