#ifndef _LIB_BARRELFISH_UMP_BINDUNG_H
#define _LIB_BARRELFISH_UMP_BINDUNG_H

#include <aos/aos.h>

#define UMP_FRAME_SIZE (2 * BASE_PAGE_SIZE)

enum ump_server_id {
    UMP_SERVER_ECHO,
    UMP_SERVER_NET,
    UMP_SERVER_BLOCK_DRIVER,
    UMP_SERVER_COUNT // How many servers exist
};

typedef errval_t (*ump_binding_connect_callback_t)(void *arg, struct capref cap);

// fields are private
struct ump_binding_server {
    struct lmp_chan chan;
    ump_binding_connect_callback_t connect_callback;
    void *connect_callback_arg;
    errval_t ret_err;
};

errval_t ump_binding_register (
    struct ump_binding_server *server,
    enum ump_server_id server_id,
    ump_binding_connect_callback_t cb, void *cb_arg
);

#endif // _LIB_BARRELFISH_UMP_BINDUNG_H
