/*
This file is part of GNUnet.
- (C) 2008--2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2008--2015 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
* @brief Interface for connection pooling subroutines
* @author Sree Harsha Totakura <sreeharsha@totakura.in>
*/
-
+#include "gnunet_ats_service.h"
+#include "gnunet_core_service.h"
+#include "gnunet_transport_service.h"
/**
* The request handle for obtaining a pooled connection
/**
* Core service
*/
- GST_CONNECTIONPOOL_SERVICE_CORE
+ GST_CONNECTIONPOOL_SERVICE_CORE,
+
+ /**
+ * ATS service
+ */
+ GST_CONNECTIONPOOL_SERVICE_ATS_CONNECTIVITY
};
* Cleanup the connection pool
*/
void
-GST_connection_pool_destroy ();
+GST_connection_pool_destroy (void);
/**
* Functions of this type are called when the needed handle is available for
* @param cls the closure passed to GST_connection_pool_get_handle()
* @param ch the handle to CORE. Can be NULL if it is not requested
* @param th the handle to TRANSPORT. Can be NULL if it is not requested
+ * @param ac the handle to ATS, can be NULL if it is not requested
* @param peer_id the identity of the peer. Will be NULL if ch is NULL. In other
* cases, its value being NULL means that CORE connection has failed.
*/
typedef void
(*GST_connection_pool_connection_ready_cb) (void *cls,
- struct GNUNET_CORE_Handle * ch,
- struct GNUNET_TRANSPORT_Handle * th,
- const struct GNUNET_PeerIdentity *
- peer_id);
+ struct GNUNET_CORE_Handle *ch,
+ struct GNUNET_TRANSPORT_Handle *th,
+ struct GNUNET_ATS_ConnectivityHandle *ac,
+ const struct GNUNET_PeerIdentity *peer_id);
/**
*/
typedef void
(*GST_connection_pool_peer_connect_notify) (void *cls,
- const struct GNUNET_PeerIdentity
- *target);
+ const struct GNUNET_PeerIdentity *target);
/**
*
* @note @a connect_notify_cb will not be called if @a target is
* already connected @a service level. Use
- * GNUNET_TRANSPORT_check_neighbour_connected() or a similar function from the
+ * GNUNET_TRANSPORT_check_peer_connected() or a similar function from the
* respective @a service's API to check if the target peer is already connected or
* not. @a connect_notify_cb will be called only once or never (in case @a target
* cannot be connected or is already connected).