Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move datadesc and TCP sockets from GRAS to XBT.
[simgrid.git] / src / xbt / datadesc / datadesc_interface.h
1 /* datadesc - describing the data to exchange                               */
2
3 /* module's public interface exported within XBT, but not to end user.     */
4
5 /* Copyright (c) 2004, 2005, 2006, 2007, 2009, 2010. The SimGrid Team.
6  * All rights reserved.                                                     */
7
8 /* This program is free software; you can redistribute it and/or modify it
9  * under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #ifndef XBT_DATADESC_INTERFACE_H
12 #define XBT_DATADESC_INTERFACE_H
13
14 #include "xbt/datadesc.h"
15 #include "xbt/misc.h"
16 #include "xbt/socket.h"
17
18 XBT_PUBLIC(xbt_datadesc_type_t) xbt_datadesc_by_id(long int code);
19
20 /* to debug */
21 XBT_PUBLIC(void) xbt_datadesc_type_dump(const xbt_datadesc_type_t ddt);
22 XBT_PUBLIC(const char *) xbt_datadesc_arch_name(int code);
23
24 /* compare two data type description */
25 XBT_PUBLIC(int)
26 xbt_datadesc_type_cmp(const xbt_datadesc_type_t d1,
27                        const xbt_datadesc_type_t d2);
28
29 /* Access function */
30 XBT_PUBLIC(int) xbt_datadesc_size(xbt_datadesc_type_t type);
31 /* Described data exchanges: direct use */
32 XBT_PUBLIC(int) xbt_datadesc_memcpy(xbt_datadesc_type_t type, void *src,
33                                      void *dst);
34 XBT_PUBLIC(void) xbt_datadesc_send(xbt_socket_t sock,
35                                     xbt_datadesc_type_t type, void *src);
36 XBT_PUBLIC(void) xbt_datadesc_recv(xbt_socket_t sock,
37                                     xbt_datadesc_type_t type, int r_arch,
38                                     void *dst);
39
40 /* Described data exchanges: IDL compilation FIXME: not implemented*/
41 void xbt_datadesc_gen_cpy(xbt_datadesc_type_t type, void *src,
42                            void **dst);
43 void xbt_datadesc_gen_send(xbt_socket_t sock,
44                             xbt_datadesc_type_t type, void *src);
45 void xbt_datadesc_gen_recv(xbt_socket_t sock,
46                             xbt_datadesc_type_t type, int r_arch,
47                             void *dst);
48
49 #endif                          /* XBT_DATADESC_INTERFACE_H */