X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2396255a8ff979d90dc0b389ac11bad36cb73b7f..78cad3370246d59acae7d4723d3209616f0497ed:/src/gras/DataDesc/datadesc_interface.h diff --git a/src/gras/DataDesc/datadesc_interface.h b/src/gras/DataDesc/datadesc_interface.h index 53a7df45da..242cbf7e07 100644 --- a/src/gras/DataDesc/datadesc_interface.h +++ b/src/gras/DataDesc/datadesc_interface.h @@ -1,37 +1,43 @@ /* $Id$ */ -/* datadesc_interface - declarations visible within GRAS, but not public */ +/* datadesc - describing the data to exchange */ -/* Authors: Olivier Aumage, Martin Quinson */ -/* Copyright (C) 2003, 2004 the GRAS posse. */ +/* module's public interface exported within GRAS, but not to end user. */ + +/* Copyright (c) 2003 Olivier Aumage. */ +/* Copyright (c) 2003, 2004 Martin Quinson. */ +/* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it - under the terms of the license (GNU LGPL) which comes with this package. */ + * under the terms of the license (GNU LGPL) which comes with this package. */ #ifndef GRAS_DATADESC_INTERFACE_H #define GRAS_DATADESC_INTERFACE_H -#include "gras_private.h" - -void gras_datadesc_init(void); -void gras_datadesc_exit(void); - - -/* free a given ddt */ -void gras_ddt_free(gras_datadesc_type_t **type); +XBT_PUBLIC gras_datadesc_type_t gras_datadesc_by_id (long int code); -/* 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_datadesc_type_t **type); +/* to debug */ +XBT_PUBLIC void gras_datadesc_type_dump(const gras_datadesc_type_t ddt); +XBT_PUBLIC const char *gras_datadesc_arch_name(int code); +/* compare two data type description */ +XBT_PUBLIC int +gras_datadesc_type_cmp(const gras_datadesc_type_t d1, + const gras_datadesc_type_t d2); -/* 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); +/* Access function */ +XBT_PUBLIC int gras_datadesc_size(gras_datadesc_type_t type); +/* Described data exchanges: direct use */ +XBT_PUBLIC int gras_datadesc_copy(gras_datadesc_type_t type, void *src, void *dst); +XBT_PUBLIC void gras_datadesc_send(gras_socket_t sock, gras_datadesc_type_t type, void *src); +XBT_PUBLIC void gras_datadesc_recv(gras_socket_t sock, gras_datadesc_type_t type, + int r_arch, void *dst); +/* Described data exchanges: IDL compilation FIXME: not implemented*/ +XBT_PUBLIC void gras_datadesc_gen_cpy(gras_datadesc_type_t type, void *src, void **dst); +XBT_PUBLIC void gras_datadesc_gen_send(gras_socket_t sock, gras_datadesc_type_t type, void *src); +XBT_PUBLIC void gras_datadesc_gen_recv(gras_socket_t sock, gras_datadesc_type_t type, + int r_arch, void *dst); + #endif /* GRAS_DATADESC_INTERFACE_H */