- * Callback to call from solver when bandwidth for address has changed
- *
- * @param address the with changed bandwidth assigned
- */
-
-typedef void
- (*GAS_bandwidth_changed_cb) (void *cls, struct ATS_Address *address);
-
-typedef const double *
- (*GAS_get_preferences) (void *cls, const struct GNUNET_PeerIdentity *id);
-
-
-typedef const double *
- (*GAS_get_properties) (void *cls, const struct ATS_Address *address);
-
-
-
-/*
- * Solver API
- * ----------
- */
-
-/**
- * Init the simplistic problem solving component
- *==32673== by 0x40571F: GAS_addresses_request_address (gnunet-service-ats_addresses.c:1261)
- *
- * Quotas:
- * network[i] contains the network type as type GNUNET_ATS_NetworkType[i]
- * out_quota[i] contains outbound quota for network type i
- * in_quota[i] contains inbound quota for network type i
- *
- * Example
- * network = {GNUNET_ATS_NET_UNSPECIFIED, GNUNET_ATS_NET_LOOPBACK, GNUNET_ATS_NET_LAN, GNUNET_ATS_NET_WAN, GNUNET_ATS_NET_WLAN}
- * network[2] == GNUNET_ATS_NET_LAN
- * out_quota[2] == 65353
- * in_quota[2] == 65353
- *
- * @param cfg configuration handle
- * @param stats the GNUNET_STATISTICS handle
- * @param addresses hashmap containing all addresses
- * @param network array of GNUNET_ATS_NetworkType with length dest_length
- * @param out_quota array of outbound quotas
- * @param in_quota array of outbound quota
- * @param bw_changed_cb callback to call when assigned changes
- * @return handle for the solver on success, NULL on fail
- */
-typedef void *
- (*GAS_solver_init) (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const struct GNUNET_STATISTICS_Handle *stats,
- const struct GNUNET_CONTAINER_MultiHashMap *addresses,
- int *network,
- unsigned long long *out_quota,
- unsigned long long *in_quota,
- int dest_length,
- GAS_bandwidth_changed_cb bw_changed_cb,
- void *bw_changed_cb_cls,
- GAS_get_preferences get_preference,
- void *get_preference_cls,
- GAS_get_properties get_properties,
- void *get_properties_cls);
-
-
-/**
- * Change the preference for a peer
- *
- * @param handle the solver handle
- * @param client the client sending this request
- * @param peer the peer id
- * @param kind the preference kind to change
- * @param score the new preference score
- * @param pref_rel the normalized preference value for this kind over all clients
- */
-typedef void
-(*GAS_solver_address_change_preference) (void *solver,
- const struct GNUNET_PeerIdentity *peer,
- enum GNUNET_ATS_PreferenceKind kind,
- double pref_rel);
-
-typedef void
-(*GAS_solver_bulk_start) (void *solver);
-
-typedef void
-(*GAS_solver_bulk_stop) (void *solver);
-
-/**
- * Add a single address within a network to the solver
- *
- * @param solver the solver Handle
- * @param addresses the address hashmap containing all addresses
- * @param address the address to add
- * @param network network type of this address
- */
-typedef void
-(*GAS_solver_address_add) (void *solver,
- struct ATS_Address *address,
- uint32_t network);
-
-
-/**
- * Delete an address or just the session from the solver
- *
- * @param solver the solver Handle
- * @param addresses the address hashmap containing all addresses
- * @param address the address to delete
- * @param session_only remove address or just session
- */
-typedef void
- (*GAS_solver_address_delete) (void *solver,
- struct ATS_Address *address,
- int session_only);
-
-/**
- * Notify the solver about an update for an address
- *
- * @param solver the solver to use
- * @param addresses the address hashmap containing all addresses
- * @param address the address
- * @param session the previous session
- * @param in_use previous address used state: yes or no
- * @param atsi ats previous performance information
- * @param atsi_count previous number of ats performance information
- *
- */
-typedef void
-(*GAS_solver_address_update) (void *solver,
- struct ATS_Address *address,
- uint32_t prev_session,
- int in_use,
- const struct GNUNET_ATS_Information *prev_atsi,
- uint32_t prev_atsi_count);
-
-
-/**
- * Get the prefered address for a peer from solver
- *
- * @param solver the solver to use
- * @param addresses the address hashmap containing all addresses
- * @param peer the peer
- */
-typedef const struct ATS_Address *
-(*GAS_solver_get_preferred_address) (void *solver,
- const struct GNUNET_PeerIdentity *peer);
-
-
-/**
- * Stop getting the prefered address for a peer from solver
- *
- * @param solver the solver to use
- * @param addresses the address hashmap containing all addresses
- * @param peer the peer