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);
void **tunnel_ctx);
+/**
+ * Type for an application. Values defined in gnunet_applications.h
+ */
+typedef uint32_t GNUNET_MESH_ApplicationType;
+
+
/**
* Connect to the mesh service.
*
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
*
* @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
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);
struct
GNUNET_TIME_Relative
maxdelay,
- // const struct GNUNET_PeerIdentity *target,
+ const struct GNUNET_PeerIdentity *target,
size_t
notify_size,
GNUNET_CONNECTION_TransmitReadyNotify