-improve UDP logging
[oweals/gnunet.git] / src / ats / gnunet-service-ats_preferences.h
index 9ed2b5f848944907864947b766a3deaaffb0ab56..4500dd0ff2ab0e60b02cf02eb56bf7afeea52b32 100644 (file)
@@ -1,6 +1,6 @@
 /*
  This file is part of GNUnet.
- (C) 2011-2014 Christian Grothoff (and other contributing authors)
Copyright (C) 2011-2014 Christian Grothoff (and other contributing authors)
 
  GNUnet is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published
 #include "gnunet_statistics_service.h"
 #include "ats.h"
 
-
-#define DEFAULT_ABS_PREFERENCE 0.0
-
-#define DEFAULT_REL_PREFERENCE 0.0
-
-
 /**
- * Get the normalized preference values for a specific peer.
- *
- * @param cls ignored
- * @param id the peer
- * @return pointer to the values, can be indexed
- *  with GNUNET_ATS_PreferenceKind, NULL if peer does not exist
+ * Default preference value we assume if we know nothing.
  */
-const double *
-GAS_normalization_get_preferences_by_peer (void *cls,
-                                          const struct GNUNET_PeerIdentity *id);
-
+#define DEFAULT_ABS_PREFERENCE 0.0
 
 /**
- * Normalize an updated preference value
- *
- * @param client the client with this preference
- * @param peer the peer to change the preference for
- * @param kind the kind to change the preference
- * @param score_abs the normalized score
+ * Default relative preference value we assume if we know nothing.
  */
-void
-GAS_normalization_normalize_preference (struct GNUNET_SERVER_Client *client,
-                                        const struct GNUNET_PeerIdentity *peer,
-                                        enum GNUNET_ATS_PreferenceKind kind,
-                                        float score_abs);
-
-
-/**
- * A performance client disconnected
- *
- * @param client the disconnecting client
- */
-void
-GAS_normalization_preference_client_disconnect (struct GNUNET_SERVER_Client *client);
+#define DEFAULT_REL_PREFERENCE 0.0
 
 
 /**
@@ -102,4 +70,26 @@ void
 GAS_preference_done (void);
 
 
+/**
+ * Get the normalized preference values for a specific peer.
+ *
+ * @param cls ignored
+ * @param id the peer
+ * @return pointer to the values, can be indexed
+ *  with `enum GNUNET_ATS_PreferenceKind`, never NULL
+ */
+const double *
+GAS_preference_get_by_peer (void *cls,
+                            const struct GNUNET_PeerIdentity *id);
+
+
+/**
+ * A performance client disconnected
+ *
+ * @param client the disconnecting client
+ */
+void
+GAS_preference_client_disconnect (struct GNUNET_SERVER_Client *client);
+
+
 #endif