Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add the prototypes for the upcoming IDL compilation. Useless for now, but I want...
[simgrid.git] / src / gras / DataDesc / datadesc_interface.h
1 /* $Id$ */
2
3 /* datadesc - describing the data to exchange                               */
4
5 /* module's public interface exported within GRAS, but not to end user.     */
6
7 /* Copyright (c) 2003 Olivier Aumage.                                       */
8 /* Copyright (c) 2003, 2004 Martin Quinson.                                 */
9 /* All rights reserved.                                                     */
10
11 /* This program is free software; you can redistribute it and/or modify it
12  * under the terms of the license (GNU LGPL) which comes with this package. */
13
14 #ifndef GRAS_DATADESC_INTERFACE_H
15 #define GRAS_DATADESC_INTERFACE_H
16
17 xbt_error_t gras_datadesc_by_id  (long int code,
18                                    gras_datadesc_type_t *type);
19
20 /* to debug */
21 void gras_datadesc_type_dump(const gras_datadesc_type_t ddt);
22 const char *gras_datadesc_arch_name(int code);
23
24 /* compare two data type description */
25 int
26 gras_datadesc_type_cmp(const gras_datadesc_type_t d1,
27                        const gras_datadesc_type_t d2);
28
29 /* Access function */
30 int  gras_datadesc_size(gras_datadesc_type_t type);
31 /* Described data exchanges: direct use */
32 xbt_error_t gras_datadesc_cpy(gras_datadesc_type_t type, void *src, void **dst);
33 xbt_error_t gras_datadesc_send(gras_socket_t sock, gras_datadesc_type_t type, void *src);
34 xbt_error_t gras_datadesc_recv(gras_socket_t sock, gras_datadesc_type_t type,
35                                 int r_arch, void *dst);
36
37 /* Described data exchanges: IDL compilation */
38 xbt_error_t gras_datadesc_gen_cpy(gras_datadesc_type_t type, void *src, void **dst);
39 xbt_error_t gras_datadesc_gen_send(gras_socket_t sock, gras_datadesc_type_t type, void *src);
40 xbt_error_t gras_datadesc_gen_recv(gras_socket_t sock, gras_datadesc_type_t type,
41                                    int r_arch, void *dst);
42
43    
44 #endif /* GRAS_DATADESC_INTERFACE_H */