summaryrefslogtreecommitdiff
path: root/cesar/interface/fcall/interface_fcall.h
blob: f683098ae19568534c1d5f0a0880809a682f7c80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef interface_fcall_interface_fcall_h
#define interface_fcall_interface_fcall_h
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    interface/fcall/interface_fcall.h
 * \brief   Public interface fcall module functions.
 * \ingroup interface/fcall
 *
 */
#include "interface/fcall/inc/context.h"

/**
 * initialise the interface fcall module and the callback functions
 * \param  send_cb  the function to call when the interface fcall needs to send an INTERFACE message
 * \param  send_done_cb  the function to call when the interface fcall needs to send a SEND DONE message
 * \param  buffer_get_cb  the function to call back to get a buffer.
 * \param  user_data  the data to provide on callback function
 */
interface_fcall_t*
interface_fcall_init (interface_fcall_send_message_cb_t send_cb,
                      interface_fcall_send_done_message_cb_t send_done_cb,
                      interface_fcall_get_buffer_cb_t buffer_get_cb,
                      void *user_data);

/**
 * uninitalise the interface fcall module
 * \param  ctx  the interface fcall context
 */
void
interface_fcall_uninit (interface_fcall_t *ctx);

/**
 * process a received MME and request the interface module to send the MME response
 * \param  data  pointer to the interface fcall context
 * \param  mme  the MME buffer
 * \param  buffer  an empty allocated buffer for fcall response
 */
void
interface_fcall_mme_recv (void *data, u8 *mme);

#endif /* interface_fcall_interface_fcall_h */