Dawn Framework 1.0
Universal data acquisition framework for embedded systems
inotifier.hxx
1// dawn/include/dawn/io/inotifier.hxx
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#pragma once
7
8#include "dawn/porting/config.hxx"
9
10namespace dawn
11{
12// Forward declaration
13
14class CIOCommon;
15struct io_ddata_t;
16
25{
26public:
37 typedef int (*notifier_cb_t)(void *priv, io_ddata_t *data);
38
45 struct
46 {
53 void *priv;
54
63
70 int (*cb)(void *priv, io_ddata_t *data);
71
78 int prio;
79 } typedef SIONotifier;
80
90 virtual int regNotifier(SIONotifier n) = 0;
91
103 virtual int notifyData(CIOCommon *io, io_ddata_t *data)
104 {
105 (void)io;
106 (void)data;
107 return -ENOTSUP;
108 }
109};
110
111} // Namespace dawn
Base class for all I/O objects.
Definition common.hxx:27
Abstract interface for registering asynchronous I/O notification.
Definition inotifier.hxx:25
int(* notifier_cb_t)(void *priv, io_ddata_t *data)
Notifier callback function type.
Definition inotifier.hxx:37
virtual int notifyData(CIOCommon *io, io_ddata_t *data)
Emit an immediate notification for already-available data.
virtual int regNotifier(SIONotifier n)=0
Register I/O notification callback.
Out-of-tree user-extension hooks for Dawn.
Definition bindable.hxx:13
Notifier registration structure.
Definition inotifier.hxx:46
CIOCommon * io
I/O object pointer.
Definition inotifier.hxx:62
void * priv
Private context pointer.
Definition inotifier.hxx:53
int prio
Notification callback priority.
Definition inotifier.hxx:78
Heap-allocated dynamic I/O data buffer.
Definition ddata.hxx:21