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 | * |
| 5 | * Permission to use, copy, modify, distribute, and sell this software and |
| 6 | * its documentation for any purpose is hereby granted without fee, provided |
| 7 | * that the above copyright notice appear in all copies and that both that |
| 8 | * copyright notice and this permission notice appear in supporting |
| 9 | * documentation, and that the name of the copyright holders not be used in |
| 10 | * advertising or publicity pertaining to distribution of the software |
| 11 | * without specific, written prior permission. The copyright holders make |
| 12 | * no representations about the suitability of this software for any |
| 13 | * purpose. It is provided "as is" without express or implied warranty. |
| 14 | * |
| 15 | * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS |
| 16 | * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
| 17 | * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 18 | * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER |
| 19 | * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF |
| 20 | * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
| 21 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 22 | */ |
| 23 | |
| 24 | #ifndef WESTON_TIMELINE_OBJECT_H |
| 25 | #define WESTON_TIMELINE_OBJECT_H |
| 26 | |
| 27 | /* |
| 28 | * This struct can be embedded in objects related to timeline output. |
| 29 | * It must be initialized to all-zero. Afterwards, the timeline code |
| 30 | * will handle it alone. No clean-up is necessary. |
| 31 | */ |
| 32 | struct weston_timeline_object { |
| 33 | /* |
| 34 | * Timeline series gets bumped every time a new log is opened. |
| 35 | * This triggers id allocation and object info emission. |
| 36 | * 0 is an invalid series value. |
| 37 | */ |
| 38 | unsigned series; |
| 39 | |
| 40 | /* Object id in the timeline JSON output. 0 is invalid. */ |
| 41 | unsigned id; |
| 42 | |
| 43 | /* |
| 44 | * If non-zero, forces a re-emission of object description. |
| 45 | * Should be set to non-zero, when changing long-lived |
| 46 | * object state that is not emitted on normal timeline |
| 47 | * events. |
| 48 | */ |
| 49 | unsigned force_refresh; |
| 50 | }; |
| 51 | |
| 52 | #endif /* WESTON_TIMELINE_OBJECT_H */ |