8210c6be79
We now wait for the child process to send the first line before stopping it to use the signal which might be specified in the i3bar protocol header Since clients might use the same signal for both stop and cont, we also save the stopped state of the child to avoid stopping it while hidden!
27 lines
824 B
C
27 lines
824 B
C
/*
|
|
* vim:ts=4:sw=4:expandtab
|
|
*
|
|
* i3bar - an xcb-based status- and ws-bar for i3
|
|
* © 2010-2012 Axel Wagner and contributors (see also: LICENSE)
|
|
*
|
|
* parse_json_header.c: Parse the JSON protocol header to determine
|
|
* protocol version and features.
|
|
*
|
|
*/
|
|
#ifndef PARSE_JSON_HEADER_H_
|
|
#define PARSE_JSON_HEADER_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
/**
|
|
* Parse the JSON protocol header to determine protocol version and features.
|
|
* In case the buffer does not contain a valid header (invalid JSON, or no
|
|
* version field found), the 'correct' field of the returned header is set to
|
|
* false. The amount of bytes consumed by parsing the header is returned in
|
|
* *consumed (if non-NULL).
|
|
*
|
|
*/
|
|
void parse_json_header(i3bar_child *child, const unsigned char *buffer, int length, unsigned int *consumed);
|
|
|
|
#endif
|