summaryrefslogtreecommitdiffstats
path: root/include/afb-poll-itf.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-04-15 16:40:38 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-04-15 16:40:38 +0200
commit68a8eaafe5f43480f29308bfd2ec12ad54da43f1 (patch)
tree5c8782a09cb48df20695fa6ba562e00f523d22f3 /include/afb-poll-itf.h
parent67966a2f96613d833f493ef3773c442d35f8ed31 (diff)
use upoll for event loop
also add '#pragma once' in headers Change-Id: I90cc2d53ec60d4d1e66cf0f229109621e4019864 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'include/afb-poll-itf.h')
-rw-r--r--include/afb-poll-itf.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/include/afb-poll-itf.h b/include/afb-poll-itf.h
index 2c8889b6..b70eb993 100644
--- a/include/afb-poll-itf.h
+++ b/include/afb-poll-itf.h
@@ -15,17 +15,15 @@
* limitations under the License.
*/
-struct afb_poll_itf
-{
- int (*on_readable)(void *, void (*cb)(void *));
- int (*on_writable)(void *, void (*cb)(void *));
- int (*on_hangup)(void *, void (*cb)(void *));
- void (*close)(void *data);
-};
+#pragma once
-struct afb_poll
+struct afb_pollitf
{
- const struct afb_poll_itf *itf;
- void *data;
+ int (*wait)(int timeout, void *pollclosure);
+ void *(*open)(int fd, void *closure, void *pollclosure);
+ int (*on_readable)(void *hndl, void (*cb)(void *closure));
+ int (*on_writable)(void *hndl, void (*cb)(void *closure));
+ void (*on_hangup)(void *hndl, void (*cb)(void *closure));
+ void (*close)(void *hndl);
};