*/
#define LIST_GROW_STEP 10
-/**
- * Default timeout for operations which may take some time
- */
-#define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 15)
-
/**
* A routing entry
*/
extern struct OperationQueue *GST_opq_openfds;
+/**
+ * Timeout for operations which may take some time
+ */
+const extern struct GNUNET_TIME_Relative GST_timeout;
+
/**
* The size of the peer list
*/
/**
- * Callback from cache with needed handles set
+ * Functions of this type are called when the needed handle is available for
+ * usage. These functions are to be registered with either of the functions
+ * GST_cache_get_handle_transport() or GST_cache_get_handle_core(). The
+ * corresponding handles will be set and if they are not, then it signals an
+ * error while opening the handles.
*
- * @param cls the closure passed to GST_cache_get_handle_transport()
+ * @param cls the closure passed to GST_cache_get_handle_transport() or
+ * GST_cache_get_handle_core()
* @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 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_cache_callback) (void *cls, struct GNUNET_CORE_Handle *ch,
- struct GNUNET_TRANSPORT_Handle *th,
- const struct GNUNET_PeerIdentity *peer_id);
+typedef void (*GST_cache_handle_ready_cb) (void *cls,
+ struct GNUNET_CORE_Handle * ch,
+ struct GNUNET_TRANSPORT_Handle * th,
+ const struct GNUNET_PeerIdentity *
+ peer_id);
/**
* valid until GST_cache_get_handle_done() is called.
*/
typedef void (*GST_cache_peer_connect_notify) (void *cls,
- const struct GNUNET_PeerIdentity *target);
+ const struct GNUNET_PeerIdentity
+ * target);
/**
struct GSTCacheGetHandle *
GST_cache_get_handle_transport (unsigned int peer_id,
const struct GNUNET_CONFIGURATION_Handle *cfg,
- GST_cache_callback cb,
- void *cb_cls,
+ GST_cache_handle_ready_cb cb, void *cb_cls,
const struct GNUNET_PeerIdentity *target,
GST_cache_peer_connect_notify connect_notify_cb,
void *connect_notify_cb_cls);
struct GSTCacheGetHandle *
GST_cache_get_handle_core (unsigned int peer_id,
const struct GNUNET_CONFIGURATION_Handle *cfg,
- GST_cache_callback cb,
- void *cb_cls,
+ GST_cache_handle_ready_cb cb, void *cb_cls,
const struct GNUNET_PeerIdentity *target,
GST_cache_peer_connect_notify connect_notify_cb,
void *connect_notify_cb_cls);