3 /* datadesc - describing the data to exchange */
5 /* module's public interface exported within GRAS, but not to end user. */
7 /* Authors: Olivier Aumage, Martin Quinson */
8 /* Copyright (C) 2003, 2004 the GRAS posse. */
10 /* This program is free software; you can redistribute it and/or modify it
11 under the terms of the license (GNU LGPL) which comes with this package. */
13 #ifndef GRAS_DATADESC_INTERFACE_H
14 #define GRAS_DATADESC_INTERFACE_H
16 void gras_datadesc_init(void);
17 void gras_datadesc_exit(void);
19 gras_error_t gras_datadesc_by_id (long int code,
20 gras_datadesc_type_t **type);
23 void gras_datadesc_type_dump(const gras_datadesc_type_t *ddt);
24 const char *gras_datadesc_arch_name(int code);
26 /* compare two data type description */
28 gras_datadesc_type_cmp(const gras_datadesc_type_t *d1,
29 const gras_datadesc_type_t *d2);
32 int gras_datadesc_size(gras_datadesc_type_t *type);
33 /* Described data exchanges */
35 gras_datadesc_cpy(gras_datadesc_type_t *type, void *src, void **dst);
37 gras_datadesc_send(gras_socket_t *sock, gras_datadesc_type_t *type, void *src);
39 gras_datadesc_recv(gras_socket_t *sock, gras_datadesc_type_t *type,
40 int r_arch, void *dst);
42 /* Indicate (lack of) interest in datatype */
43 void gras_datadesc_addref(gras_datadesc_type_t *type);
44 void gras_datadesc_unref(gras_datadesc_type_t *type);
46 #endif /* GRAS_DATADESC_INTERFACE_H */