-
Notifications
You must be signed in to change notification settings - Fork 0
/
notify.h
77 lines (66 loc) · 2.3 KB
/
notify.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
65
66
67
68
69
70
71
72
73
74
75
76
77
/* --*- c -*--
* Copyright (C) 2016 Enrico Scholz <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef H_ENSC_STREAMGEN_NOTIFY_H
#define H_ENSC_STREAMGEN_NOTIFY_H
#ifndef __packed
# define __packed __attribute__((__packed__))
#endif
/* sent exactly once when starting to read the stream */
struct notify_msg_start {
uint8_t op; /* 'S' */
} __packed;
/* sent optionally after 'S' and tells that a boolean flag ('is_flag' is true)
* or a keyval parameter has been sent */
struct notify_msg_param {
uint8_t op; /* 'P' */
uint8_t is_flag;
} __packed;
/* sent exactly once immediately after 'S' or 'P' and tells number of
* uncompressed octets */
struct notify_msg_length {
uint8_t op; /* 'L' */
be64_t length;
} __packed;
/* reports total number of read octets; sent everytime when a block of
* uncompressed data has been read; */
struct notify_msg_read {
uint8_t op; /* 'R' */
be64_t count;
} __packed;
/* signals start of a component; in usually case (no errors) it will be
* followed by an arbitrary number of 'R' events, one 'w' event and an 'e'
* event. */
struct notify_msg_substart {
uint8_t op; /* 's' */
} __packed;
/* signals that all data of a component has been read and that there will be
* waited for processing them; will be followed by 'e' without any 'R'
* events */
struct notify_msg_subwait {
uint8_t op; /* 'w' */
} __packed;
/* signals that a component has been processed completely */
struct notify_msg_subexit {
uint8_t op; /* 'e' */
uint8_t failed;
} __packed;
/* signals that stream has been processed completely or that processing will
* be terminated due to an error */
struct notify_msg_exit {
uint8_t op; /* 'E' */
be32_t code;
} __packed;
#endif /* H_ENSC_STREAMGEN_NOTIFY_H */