#ifndef SWIFT_EVENT_SOURCE_H
#define SWIFT_EVENT_SOURCE_H

#include <swift/stdlib.h>
#include <swift/thread.h>

#include <swift/event/api.h>

typedef void (* swift_poll_ev_fn_t)(void *user_data);

enum swift_ev_src_flags_t {
	SWIFT_MAIN_THREAD = (1 << 0),
	SWIFT_WORKER_THREAD = (1 << 1),
};

SWIFT_EVENT_API bool swift_add_ev_src(swift_poll_ev_fn_t poll_ev,
	void *user_data, unsigned int flags);
SWIFT_EVENT_API void swift_remove_ev_src(swift_poll_ev_fn_t poll_ev);

#endif /* SWIFT_EVENT_SOURCE_H */
