diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:46:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:46:35 +0000 |
commit | 502af2167f7c218366666ca4944bd7cc54b5b19a (patch) | |
tree | a91fec5cc9769d260640bd91c6633cb9cf395524 /src/include/gnunet_bandwidth_lib.h | |
parent | 03af5a603b7cc53432249d5854cd412aa90dde0d (diff) | |
download | gnunet-502af2167f7c218366666ca4944bd7cc54b5b19a.tar.gz gnunet-502af2167f7c218366666ca4944bd7cc54b5b19a.zip |
indentation
Diffstat (limited to 'src/include/gnunet_bandwidth_lib.h')
-rw-r--r-- | src/include/gnunet_bandwidth_lib.h | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/src/include/gnunet_bandwidth_lib.h b/src/include/gnunet_bandwidth_lib.h index 43e75ed0a..059a6696c 100644 --- a/src/include/gnunet_bandwidth_lib.h +++ b/src/include/gnunet_bandwidth_lib.h | |||
@@ -107,9 +107,20 @@ GNUNET_BANDWIDTH_value_init (uint32_t bytes_per_second); | |||
107 | * @param deadline when is the deadline | 107 | * @param deadline when is the deadline |
108 | * @return number of bytes available at bps until deadline | 108 | * @return number of bytes available at bps until deadline |
109 | */ | 109 | */ |
110 | uint64_t | 110 | uint64_t |
111 | GNUNET_BANDWIDTH_value_get_available_until (struct GNUNET_BANDWIDTH_Value32NBO bps, | 111 | |
112 | struct GNUNET_TIME_Relative deadline); | 112 | |
113 | |||
114 | |||
115 | |||
116 | |||
117 | |||
118 | |||
119 | |||
120 | GNUNET_BANDWIDTH_value_get_available_until (struct GNUNET_BANDWIDTH_Value32NBO | ||
121 | bps, | ||
122 | struct GNUNET_TIME_Relative | ||
123 | deadline); | ||
113 | 124 | ||
114 | 125 | ||
115 | /** | 126 | /** |
@@ -122,7 +133,7 @@ GNUNET_BANDWIDTH_value_get_available_until (struct GNUNET_BANDWIDTH_Value32NBO b | |||
122 | */ | 133 | */ |
123 | struct GNUNET_TIME_Relative | 134 | struct GNUNET_TIME_Relative |
124 | GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps, | 135 | GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps, |
125 | uint64_t size); | 136 | uint64_t size); |
126 | 137 | ||
127 | 138 | ||
128 | 139 | ||
@@ -135,7 +146,7 @@ GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps, | |||
135 | */ | 146 | */ |
136 | struct GNUNET_BANDWIDTH_Value32NBO | 147 | struct GNUNET_BANDWIDTH_Value32NBO |
137 | GNUNET_BANDWIDTH_value_min (struct GNUNET_BANDWIDTH_Value32NBO b1, | 148 | GNUNET_BANDWIDTH_value_min (struct GNUNET_BANDWIDTH_Value32NBO b1, |
138 | struct GNUNET_BANDWIDTH_Value32NBO b2); | 149 | struct GNUNET_BANDWIDTH_Value32NBO b2); |
139 | 150 | ||
140 | 151 | ||
141 | /** | 152 | /** |
@@ -154,8 +165,8 @@ GNUNET_BANDWIDTH_value_min (struct GNUNET_BANDWIDTH_Value32NBO b1, | |||
154 | */ | 165 | */ |
155 | void | 166 | void |
156 | GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av, | 167 | GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av, |
157 | struct GNUNET_BANDWIDTH_Value32NBO bytes_per_second_limit, | 168 | struct GNUNET_BANDWIDTH_Value32NBO |
158 | uint32_t max_carry_s); | 169 | bytes_per_second_limit, uint32_t max_carry_s); |
159 | 170 | ||
160 | 171 | ||
161 | /** | 172 | /** |
@@ -171,7 +182,7 @@ GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av, | |||
171 | */ | 182 | */ |
172 | int | 183 | int |
173 | GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av, | 184 | GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av, |
174 | ssize_t size); | 185 | ssize_t size); |
175 | 186 | ||
176 | 187 | ||
177 | /** | 188 | /** |
@@ -185,7 +196,7 @@ GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av, | |||
185 | */ | 196 | */ |
186 | struct GNUNET_TIME_Relative | 197 | struct GNUNET_TIME_Relative |
187 | GNUNET_BANDWIDTH_tracker_get_delay (struct GNUNET_BANDWIDTH_Tracker *av, | 198 | GNUNET_BANDWIDTH_tracker_get_delay (struct GNUNET_BANDWIDTH_Tracker *av, |
188 | size_t size); | 199 | size_t size); |
189 | 200 | ||
190 | 201 | ||
191 | /** | 202 | /** |
@@ -195,8 +206,15 @@ GNUNET_BANDWIDTH_tracker_get_delay (struct GNUNET_BANDWIDTH_Tracker *av, | |||
195 | * @param av tracker to query | 206 | * @param av tracker to query |
196 | * @return number of bytes available for consumption right now | 207 | * @return number of bytes available for consumption right now |
197 | */ | 208 | */ |
198 | int64_t | 209 | int64_t |
199 | GNUNET_BANDWIDTH_tracker_get_available (struct GNUNET_BANDWIDTH_Tracker *av); | 210 | |
211 | |||
212 | |||
213 | |||
214 | |||
215 | |||
216 | |||
217 | GNUNET_BANDWIDTH_tracker_get_available (struct GNUNET_BANDWIDTH_Tracker *av); | ||
200 | 218 | ||
201 | 219 | ||
202 | /** | 220 | /** |
@@ -207,7 +225,8 @@ GNUNET_BANDWIDTH_tracker_get_available (struct GNUNET_BANDWIDTH_Tracker *av); | |||
207 | */ | 225 | */ |
208 | void | 226 | void |
209 | GNUNET_BANDWIDTH_tracker_update_quota (struct GNUNET_BANDWIDTH_Tracker *av, | 227 | GNUNET_BANDWIDTH_tracker_update_quota (struct GNUNET_BANDWIDTH_Tracker *av, |
210 | struct GNUNET_BANDWIDTH_Value32NBO bytes_per_second_limit); | 228 | struct GNUNET_BANDWIDTH_Value32NBO |
229 | bytes_per_second_limit); | ||
211 | 230 | ||
212 | 231 | ||
213 | #if 0 /* keep Emacsens' auto-indent happy */ | 232 | #if 0 /* keep Emacsens' auto-indent happy */ |