blob: 6558fabc0d575079fb30bf5d8a3c4eebff19d64b (
plain) (
blame)
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
|
/* Contains a structure, which contains functions to back-call into
* the harness code. */
#ifndef __FOREIGN_INTERFACE
#define __FOREIGN_INTERFACE
#define EXPORT(a) a
typedef void *ctx_t;
typedef struct FOREIGN_INTERFACE {
/* DO NOT ADD ANY UNEXPORTED VARIABLES HERE */
/* The context, which needs to be passed to each function. This context is
* opaque to the plugin and should not be changed. */
EXPORT(ctx_t ctx);
/* Requests the harness hot reload the current plugin. */
EXPORT(void (*request_hot_reload)(ctx_t ctx));
/* Requests the harness hot reload the current plugin. */
EXPORT(void (*do_log)(ctx_t ctx, const char *str));
/* Requestes that the whole system exit. Exits with the given return code. */
EXPORT(void (*request_exit)(ctx_t ctx, int rc));
/* Returns the seat associated with the server. */
EXPORT(void *(*get_seat)(ctx_t ctx));
} foreign_interface_t;
#undef EXPORT
#endif /* __FOREIGN_INTERFACE */
|