]> git.sur5r.net Git - i3/i3/blob - i3bar/include/parse_json_header.h
Merge branch 'master' into next
[i3/i3] / i3bar / include / parse_json_header.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3bar - an xcb-based status- and ws-bar for i3
5  * © 2010-2012 Axel Wagner and contributors (see also: LICENSE)
6  *
7  * parse_json_header.c: Parse the JSON protocol header to determine
8  *                      protocol version and features.
9  *
10  */
11 #ifndef PARSE_JSON_HEADER_H_
12 #define PARSE_JSON_HEADER_H_
13
14 #include <stdint.h>
15
16 /**
17  * Parse the JSON protocol header to determine protocol version and features.
18  * In case the buffer does not contain a valid header (invalid JSON, or no
19  * version field found), the 'correct' field of the returned header is set to
20  * false. The amount of bytes consumed by parsing the header is returned in
21  * *consumed (if non-NULL).
22  *
23  */
24 void parse_json_header(i3bar_child *child, const unsigned char *buffer, int length, unsigned int *consumed);
25
26 #endif