Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename BEGIN_DECL since we changed the usual definition to a macro with arguments...
[simgrid.git] / include / gras / messages.h
index f5be19d..d704834 100644 (file)
@@ -15,7 +15,7 @@
 #include "gras/transport.h"
 #include "gras/datadesc.h"
 
-BEGIN_DECL()
+SG_BEGIN_DECL()
 
 /** @addtogroup GRAS_msg
  *  @brief Defining messages and callbacks, and exchanging messages (Communication facility) 
@@ -47,7 +47,7 @@ BEGIN_DECL()
  *  to add a version number to the message (by default, the version is set to 0). Any messages of the 
  *  wrong version will be ignored by the applications not providing any specific callback for them.
  *  
- *  This mecanism (stolen from the dynamic loader one) should ensure you to change the semantic of a given
+ *  This mechanism (stolen from the dynamic loader one) should ensure you to change the semantic of a given
  *  message while still understanding the old one.
  */
 /** @{ */  
@@ -62,6 +62,7 @@ typedef struct s_gras_msgtype *gras_msgtype_t;
 
   gras_msgtype_t gras_msgtype_by_name (const char *name);
   gras_msgtype_t gras_msgtype_by_namev(const char *name, short int version);
+  gras_msgtype_t gras_msgtype_by_id(int id);
 
 /** @} */  
 /** @name 2. Callback declaration and use
@@ -103,18 +104,18 @@ typedef struct s_gras_msgtype *gras_msgtype_t;
 /** @name 3. Message exchange */
 /** @{ */
 
-  xbt_error_t gras_msg_send(gras_socket_t   sock,
-                           gras_msgtype_t  msgtype,
-                           void           *payload);
-  xbt_error_t gras_msg_wait(double          timeout,    
-                           gras_msgtype_t  msgt_want,
-                           gras_socket_t  *expeditor,
-                           void           *payload);
-  xbt_error_t gras_msg_handle(double timeOut);
+  void gras_msg_send(gras_socket_t   sock,
+                    gras_msgtype_t  msgtype,
+                    void           *payload);
+  void gras_msg_wait(double          timeout,    
+                    gras_msgtype_t  msgt_want,
+                    gras_socket_t  *expeditor,
+                    void           *payload);
+  void gras_msg_handle(double timeOut);
 
-/*@}*/
+/* @} */
 
-END_DECL()
+SG_END_DECL()
 
 #endif /* GRAS_MSG_H */