tor_multipath_voip/src/evt_core.h
2019-02-11 18:56:52 +01:00

30 lines
590 B
C

#pragma once
#include <stdlib.h>
#include <stdio.h>
#include <sys/epoll.h>
#include <glib-2.0/glib.h>
#include <glib-2.0/gmodule.h>
#include <glib-2.0/glib-object.h>
struct evt_core_ctx;
struct evt_core_cat;
typedef void (*evt_core_free_app_ctx)(void*);
typedef void (*evt_core_cb)(struct evt_core_ctx*, struct evt_core_cat*);
struct evt_core_cat {
void* app_ctx;
evt_core_free_app_ctx free_app_ctx;
evt_core_cb cb;
char* name;
int flags;
};
struct evt_core_ctx {
int epollfd;
GHashTable* catlist;
GHashTable* socklist;
};
void evt_core_init(struct evt_core_ctx* ctx);