| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#ifndef __GPIODGLIB_INFO_EVENT_H__ |
| 5 |
#define __GPIODGLIB_INFO_EVENT_H__ |
| 6 |
|
| 7 |
#if !defined(__INSIDE_GPIOD_GLIB_H__) && !defined(GPIODGLIB_COMPILATION) |
| 8 |
#error "Only <gpiod-glib.h> can be included directly." |
| 9 |
#endif |
| 10 |
|
| 11 |
#include <glib.h> |
| 12 |
#include <glib-object.h> |
| 13 |
|
| 14 |
#include "line-info.h" |
| 15 |
|
| 16 |
G_BEGIN_DECLS |
| 17 |
|
| 18 |
G_DECLARE_FINAL_TYPE(GpiodglibInfoEvent, gpiodglib_info_event, |
| 19 |
GPIODGLIB, INFO_EVENT, GObject); |
| 20 |
|
| 21 |
#define GPIODGLIB_INFO_EVENT_TYPE (gpiodglib_info_event_get_type()) |
| 22 |
#define GPIODGLIB_INFO_EVENT_OBJ(obj) \ |
| 23 |
(G_TYPE_CHECK_INSTANCE_CAST((obj), GPIODGLIB_INFO_EVENT_TYPE, \ |
| 24 |
GpiodglibInfoEvent)) |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
typedef enum { |
| 36 |
GPIODGLIB_INFO_EVENT_LINE_REQUESTED = 1, |
| 37 |
GPIODGLIB_INFO_EVENT_LINE_RELEASED, |
| 38 |
GPIODGLIB_INFO_EVENT_LINE_CONFIG_CHANGED, |
| 39 |
} GpiodglibInfoEventType; |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
GpiodglibInfoEventType |
| 52 |
gpiodglib_info_event_get_event_type(GpiodglibInfoEvent *self); |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
guint64 gpiodglib_info_event_get_timestamp_ns(GpiodglibInfoEvent *self); |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
GpiodglibLineInfo *gpiodglib_info_event_get_line_info(GpiodglibInfoEvent *self); |
| 73 |
|
| 74 |
G_END_DECLS |
| 75 |
|
| 76 |
#endif |