aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_preferences.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-05 20:15:02 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-05 20:15:02 +0000
commitd4cb0035c1248e050d906e9018d36a9f5d19eb73 (patch)
tree61992da6bc1c7b769f4db7dde10feace04486a89 /src/ats/gnunet-service-ats_preferences.h
parent04c43865242385b22cb8a399843680542009031a (diff)
downloadgnunet-d4cb0035c1248e050d906e9018d36a9f5d19eb73.tar.gz
gnunet-d4cb0035c1248e050d906e9018d36a9f5d19eb73.zip
starting with cleaning up gnunet-service-ats_preferences.c
Diffstat (limited to 'src/ats/gnunet-service-ats_preferences.h')
-rw-r--r--src/ats/gnunet-service-ats_preferences.h67
1 files changed, 33 insertions, 34 deletions
diff --git a/src/ats/gnunet-service-ats_preferences.h b/src/ats/gnunet-service-ats_preferences.h
index 9ed2b5f84..1715288d7 100644
--- a/src/ats/gnunet-service-ats_preferences.h
+++ b/src/ats/gnunet-service-ats_preferences.h
@@ -39,16 +39,30 @@
39 39
40 40
41/** 41/**
42 * Get the normalized preference values for a specific peer. 42 * Handle 'preference change' messages from clients.
43 * 43 *
44 * @param cls ignored 44 * @param cls unused, NULL
45 * @param id the peer 45 * @param client client that sent the request
46 * @return pointer to the values, can be indexed 46 * @param message the request message
47 * with GNUNET_ATS_PreferenceKind, NULL if peer does not exist
48 */ 47 */
49const double * 48void
50GAS_normalization_get_preferences_by_peer (void *cls, 49GAS_handle_preference_change (void *cls,
51 const struct GNUNET_PeerIdentity *id); 50 struct GNUNET_SERVER_Client *client,
51 const struct GNUNET_MessageHeader *message);
52
53
54/**
55 * Initialize preferences subsystem.
56 */
57void
58GAS_preference_init (void);
59
60
61/**
62 * Shutdown preferences subsystem.
63 */
64void
65GAS_preference_done (void);
52 66
53 67
54/** 68/**
@@ -65,41 +79,26 @@ GAS_normalization_normalize_preference (struct GNUNET_SERVER_Client *client,
65 enum GNUNET_ATS_PreferenceKind kind, 79 enum GNUNET_ATS_PreferenceKind kind,
66 float score_abs); 80 float score_abs);
67 81
68
69/** 82/**
70 * A performance client disconnected 83 * Get the normalized preference values for a specific peer.
71 * 84 *
72 * @param client the disconnecting client 85 * @param cls ignored
86 * @param id the peer
87 * @return pointer to the values, can be indexed
88 * with GNUNET_ATS_PreferenceKind, NULL if peer does not exist
73 */ 89 */
74void 90const double *
75GAS_normalization_preference_client_disconnect (struct GNUNET_SERVER_Client *client); 91GAS_normalization_get_preferences_by_peer (void *cls,
92 const struct GNUNET_PeerIdentity *id);
76 93
77 94
78/** 95/**
79 * Handle 'preference change' messages from clients. 96 * A performance client disconnected
80 * 97 *
81 * @param cls unused, NULL 98 * @param client the disconnecting client
82 * @param client client that sent the request
83 * @param message the request message
84 */
85void
86GAS_handle_preference_change (void *cls,
87 struct GNUNET_SERVER_Client *client,
88 const struct GNUNET_MessageHeader *message);
89
90
91/**
92 * Initialize preferences subsystem.
93 */
94void
95GAS_preference_init (void);
96
97
98/**
99 * Shutdown preferences subsystem.
100 */ 99 */
101void 100void
102GAS_preference_done (void); 101GAS_normalization_preference_client_disconnect (struct GNUNET_SERVER_Client *client);
103 102
104 103
105#endif 104#endif