Pekka Paalanen | b502654 | 2014-11-12 15:09:24 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright © 2014 Pekka Paalanen <pq@iki.fi> |
| 3 | * Copyright © 2014 Collabora, Ltd. |
| 4 | * |
Bryce Harrington | a0bbfea | 2015-06-11 15:35:43 -0700 | [diff] [blame] | 5 | * Permission is hereby granted, free of charge, to any person obtaining |
| 6 | * a copy of this software and associated documentation files (the |
| 7 | * "Software"), to deal in the Software without restriction, including |
| 8 | * without limitation the rights to use, copy, modify, merge, publish, |
| 9 | * distribute, sublicense, and/or sell copies of the Software, and to |
| 10 | * permit persons to whom the Software is furnished to do so, subject to |
| 11 | * the following conditions: |
Pekka Paalanen | b502654 | 2014-11-12 15:09:24 +0200 | [diff] [blame] | 12 | * |
Bryce Harrington | a0bbfea | 2015-06-11 15:35:43 -0700 | [diff] [blame] | 13 | * The above copyright notice and this permission notice (including the |
| 14 | * next paragraph) shall be included in all copies or substantial |
| 15 | * portions of the Software. |
| 16 | * |
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 20 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
| 21 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
| 22 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 23 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 24 | * SOFTWARE. |
Pekka Paalanen | b502654 | 2014-11-12 15:09:24 +0200 | [diff] [blame] | 25 | */ |
| 26 | |
| 27 | #ifndef WESTON_TIMELINE_OBJECT_H |
| 28 | #define WESTON_TIMELINE_OBJECT_H |
| 29 | |
| 30 | /* |
| 31 | * This struct can be embedded in objects related to timeline output. |
| 32 | * It must be initialized to all-zero. Afterwards, the timeline code |
| 33 | * will handle it alone. No clean-up is necessary. |
| 34 | */ |
| 35 | struct weston_timeline_object { |
| 36 | /* |
| 37 | * Timeline series gets bumped every time a new log is opened. |
| 38 | * This triggers id allocation and object info emission. |
| 39 | * 0 is an invalid series value. |
| 40 | */ |
| 41 | unsigned series; |
| 42 | |
| 43 | /* Object id in the timeline JSON output. 0 is invalid. */ |
| 44 | unsigned id; |
| 45 | |
| 46 | /* |
| 47 | * If non-zero, forces a re-emission of object description. |
| 48 | * Should be set to non-zero, when changing long-lived |
| 49 | * object state that is not emitted on normal timeline |
| 50 | * events. |
| 51 | */ |
| 52 | unsigned force_refresh; |
| 53 | }; |
| 54 | |
| 55 | #endif /* WESTON_TIMELINE_OBJECT_H */ |