summaryrefslogtreecommitdiff
path: root/test/fake-reactor.h
blob: 04d8306955e207e3a7ad6b73529cfd19c6fce7c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "reactor.h"
#include <stdbool.h>
#include <stdint.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);