summaryrefslogtreecommitdiff
path: root/test/fake-reactor.h
blob: 33d1fbc968a8acff303c99e20b3a3821dd3b937f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdbool.h>
#include <stdint.h>

#include "dged/reactor.h"

struct fake_reactor_impl {
  bool (*poll_event)(void *userdata, uint32_t ev_id);
  uint32_t (*register_interest)(void *userdata, int fd, enum interest interest);
  void (*unregister_interest)(void *userdata, uint32_t ev_id);
  void *userdata;
};

struct reactor *fake_reactor_create(struct fake_reactor_impl *impl);
void set_reactor_impl(struct reactor *reactor, struct fake_reactor_impl *impl);