Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
209950296c32b5294e873e9df680666b705dd723
[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 /* Authors: Olivier Aumage, Martin Quinson                                  */
8 /* Copyright (C) 2003, 2004 the GRAS posse.                                 */
9
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. */
12
13 #ifndef GRAS_DATADESC_INTERFACE_H
14 #define GRAS_DATADESC_INTERFACE_H
15
16 gras_error_t gras_datadesc_by_id  (long int code,
17                                    gras_datadesc_type_t **type);
18
19 /* to debug */
20 void gras_datadesc_type_dump(const gras_datadesc_type_t *ddt);
21 const char *gras_datadesc_arch_name(int code);
22
23 /* compare two data type description */
24 int
25 gras_datadesc_type_cmp(const gras_datadesc_type_t *d1,
26                        const gras_datadesc_type_t *d2);
27
28 /* Access function */
29 int  gras_datadesc_size(gras_datadesc_type_t *type);
30 /* Described data exchanges */
31 gras_error_t 
32 gras_datadesc_cpy(gras_datadesc_type_t *type, void *src, void **dst);
33 gras_error_t 
34 gras_datadesc_send(gras_socket_t *sock, gras_datadesc_type_t *type, void *src);
35 gras_error_t
36 gras_datadesc_recv(gras_socket_t *sock, gras_datadesc_type_t *type, 
37                    int r_arch, void *dst);
38
39 /* Indicate (lack of) interest in datatype */
40 void gras_datadesc_addref(gras_datadesc_type_t *type);
41 void gras_datadesc_unref(gras_datadesc_type_t *type);
42    
43 #endif /* GRAS_DATADESC_INTERFACE_H */