check
[oweals/gnunet.git] / src / include / gnunet_mesh_service.h
index 738811950239459dbb327d4e5d9f66b4ad076c15..2835d0abd7a71b40e1a87fa111bd05cff868e016 100644 (file)
@@ -70,7 +70,7 @@ struct GNUNET_MESH_Tunnel;
 typedef int
   (*GNUNET_MESH_MessageCallback) (void *cls,
                                   struct GNUNET_MESH_Tunnel *tunnel,
-                                 void **tunnel_ctx, 
+                                 void **tunnel_ctx,
                                  const struct GNUNET_PeerIdentity *sender,
                                   const struct GNUNET_MessageHeader *message,
                                  const struct GNUNET_TRANSPORT_ATS_Information *atsi);
@@ -115,6 +115,12 @@ typedef void (GNUNET_MESH_TunnelEndHandler)(void *cls,
                                            void **tunnel_ctx);
 
 
+/**
+ * Type for an application.  Values defined in gnunet_applications.h
+ */
+typedef uint32_t GNUNET_MESH_ApplicationType;
+
+
 /**
  * Connect to the mesh service.
  *
@@ -132,8 +138,8 @@ struct GNUNET_MESH_Handle *
 GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
                      void *cls,
                     GNUNET_MESH_TunnelEndHandler cleaner,
-                     const struct GNUNET_MESH_MessageHandler *handlers);
-
+                     const struct GNUNET_MESH_MessageHandler *handlers
+                    const GNUNET_MESH_ApplicationType *stypes);
 
 /**
  * Get the peer on the other side of this tunnel if it is just one. Return NULL otherwise
@@ -268,7 +274,7 @@ GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
  *
  * @param h mesh handle
  * @param timeout how long to try to establish a connection
- * @param message_type message type that must be supported by the peer (MESH should
+ * @param app_type application type that must be supported by the peer (MESH should
  *                discover peer in proximity handling this type)
  * @param connect_handler function to call on successful connect (or timeout);
  *                will be called for EACH of the peers in the list and
@@ -282,7 +288,7 @@ GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
 struct GNUNET_MESH_Tunnel *
 GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Handle *h,
                                          struct GNUNET_TIME_Relative timeout,
-                                         uint16_t message_type,
+                                         GNUNET_MESH_ApplicationType app_type,
                                          GNUNET_MESH_TunnelConnectHandler connect_handler,
                                          GNUNET_MESH_TunnelDisconnectHandler disconnect_handler,
                                          void *handler_cls);
@@ -334,7 +340,7 @@ GNUNET_MESH_notify_transmit_ready (struct
                                   struct
                                   GNUNET_TIME_Relative
                                   maxdelay,
-                                  // const struct GNUNET_PeerIdentity *target,
+                                  const struct GNUNET_PeerIdentity *target,
                                   size_t
                                   notify_size,
                                   GNUNET_CONNECTION_TransmitReadyNotify