break;
}
+ /* Tell solver about update */
switch (ats_mode)
{
case MODE_MLP:
return GNUNET_SYSERR;
}
old->used = in_use;
-#if HAVE_LIBGLPK
- if (ats_mode == MODE_MLP)
- GAS_mlp_address_update (solver, addresses, old);
-#endif
+
+ /* Tell solver about update */
+ switch (ats_mode)
+ {
+ case MODE_MLP:
+ GAS_mlp_address_update (solver, addresses, old);
+ break;
+ case MODE_SIMPLISTIC:
+ GAS_simplistic_address_update (solver, addresses, old);
+ break;
+ default:
+ GNUNET_break (0);
+ break;
+ }
return GNUNET_OK;
}
{
if (GNUNET_NO == running)
return;
-#if HAVE_LIBGLPK
- if (ats_mode == MODE_MLP)
- GAS_mlp_address_change_preference (solver, peer, kind, score);
-#endif
+
+
+ /* Tell solver about update */
+ switch (ats_mode)
+ {
+ case MODE_MLP:
+ GAS_mlp_address_change_preference (solver, peer, kind, score);
+ break;
+ case MODE_SIMPLISTIC:
+ GAS_simplistic_address_change_preference (solver, peer, kind, score);
+ break;
+ default:
+ GNUNET_break (0);
+ break;
+ }
}
}
+/**
+ * Changes the preferences for a peer in the problem
+ *
+ * @param solver the solver handle
+ * @param peer the peer
+ * @param kind the kind to change the preference
+ * @param score the score
+ */
+void
+GAS_simplistic_address_change_preference (struct GAS_SIMPLISTIC_Handle *solver,
+ const struct GNUNET_PeerIdentity *peer,
+ enum GNUNET_ATS_PreferenceKind kind,
+ float score)
+{
+
+}
+
/* end of gnunet-service-ats_addresses_simplistic.c */
void
GAS_simplistic_address_update (struct GAS_SIMPLISTIC_Handle *solver, struct GNUNET_CONTAINER_MultiHashMap * addresses, struct ATS_Address *address);
+/**
+ * Changes the preferences for a peer in the problem
+ *
+ * @param solver the solver handle
+ * @param peer the peer
+ * @param kind the kind to change the preference
+ * @param score the score
+ */
+void
+GAS_simplistic_address_change_preference (struct GAS_SIMPLISTIC_Handle *solver,
+ const struct GNUNET_PeerIdentity *peer,
+ enum GNUNET_ATS_PreferenceKind kind,
+ float score);
+
+
/* end of gnunet-service-ats_addresses_simplistic.h */