#ifndef _RPC_SERVER_H_
#define _RPC_SERVER_H_

#include <aos/aos.h>

struct aos_rpc_server {
    struct lmp_chan *chan;
    void *shared_mem;

    struct capref ret_cap;
    errval_t ret_err;
    size_t ret_size;
    uintptr_t ret0;
    uintptr_t ret1;
};

/**
 * Initialize an aos_rpc_server struct.
 */
void rpc_server_init(struct aos_rpc_server *rpc, struct lmp_chan *chan, void *shared_mem);

/**
 * Start listening for RPCs.
 */
void rpc_server_register_recv(struct aos_rpc_server *rpc);

#endif /* _RPC_SERVER_H_ */
