Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
J'en ai marre de faire des messages detailles. 'Current state' ;)
[simgrid.git] / src / gras / DataDesc / datadesc_interface.h
index 53a7df4..85fb1d7 100644 (file)
@@ -1,6 +1,8 @@
 /* $Id$ */
 
-/* datadesc_interface - declarations visible within GRAS, but not public    */
+/* datadesc - describing the data to exchange                               */
+
+/* module's public interface exported within GRAS, but not to end user.     */
 
 /* Authors: Olivier Aumage, Martin Quinson                                  */
 /* Copyright (C) 2003, 2004 the GRAS posse.                                 */
 void gras_datadesc_init(void);
 void gras_datadesc_exit(void);
 
+/* - main functions - */
+/* compare two data type description */
+int
+gras_datadesc_type_cmp(const gras_datadesc_type_t *d1,
+                      const gras_datadesc_type_t *d2);
+
+
+/* Copy a described data in memory */
+gras_error_t 
+gras_datadesc_cpy(gras_datadesc_type_t *type, void *src, void **dst);
+
+/* Send stuff */
+gras_error_t 
+gras_datadesc_send(gras_socket_t *sock, gras_datadesc_type_t *type, void *src);
+
+/* Receive (and convert) stuff */
+gras_error_t
+gras_datadesc_recv(gras_socket_t *sock, gras_datadesc_type_t *type, void **dst);
+
+
+/* -- */
 
 /* free a given ddt */
 void gras_ddt_free(gras_datadesc_type_t **type);
 
 /* declare in the given set, and retrieve afterward */
-gras_error_t gras_ddt_register(gras_set_t           *set,
-                              gras_datadesc_type_t *type);
-gras_error_t gras_ddt_get_by_name(gras_set_t            *set,
-                                 const char            *name,
+gras_error_t gras_ddt_register(gras_datadesc_type_t *type);
+gras_error_t gras_ddt_get_by_name(const char            *name,
+                                 gras_datadesc_type_t **type);
+gras_error_t gras_ddt_get_by_code(int                    code,
                                  gras_datadesc_type_t **type);
-
-
-/* create a type set, and bootstrap it by declaring all basic types in it */
-gras_error_t
-gras_dd_typeset_create(int gras_arch,
-                      gras_set_t **set);
 
 
 #endif /* GRAS_DATADESC_INTERFACE_H */