[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29036 - gnunet-gtk/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29036 - gnunet-gtk/src/fs |
Date: |
Thu, 5 Sep 2013 17:05:10 +0200 |
Author: grothoff
Date: 2013-09-05 17:05:10 +0200 (Thu, 05 Sep 2013)
New Revision: 29036
Modified:
gnunet-gtk/src/fs/gnunet-fs-gtk_common.c
gnunet-gtk/src/fs/gnunet-fs-gtk_common.h
Log:
-remove dead GNUNET_GTK_find_largest_namespace_rating and
GNUNET_GTK_set_largest_namespace_rating
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_common.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_common.c 2013-09-05 15:04:48 UTC (rev
29035)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_common.c 2013-09-05 15:05:10 UTC (rev
29036)
@@ -433,72 +433,7 @@
}
-/* Largest rating value among all namespaces. INT_MIN means "undefined" */
-static int largest_namespace_rating = INT_MIN;
-
-
/**
- * Helper function for finding the largest namespace rating.
- *
- * @param cls closure
- * @param pseudonym pseudonym hash
- * @param md metadata container
- * @param rating rating
- * @return GNUNET_OK to keep iterating
- */
-static int
-find_largest_namespace_rating_iterator (void *cls,
- const struct GNUNET_CRYPTO_EccPublicKey
*pseudonym,
- const char *name,
- const char *unique_name,
- const struct GNUNET_CONTAINER_MetaData
*md,
- int32_t rating)
-{
- int *largest = cls;
-
- if (*largest < rating)
- *largest = rating;
- return GNUNET_OK;
-}
-
-
-/**
- * Finds largest namespace rating.
- * Used to calculate a rating for newly discovered namespaces.
- * Returns from cache, if possible.
- *
- * @return largest namespace rating. Might be negative and even. INT_MIN means
- * that no namespaces are known.
- */
-int
-GNUNET_GTK_find_largest_namespace_rating ()
-{
- if (largest_namespace_rating != INT_MIN)
- return largest_namespace_rating;
- (void) GNUNET_FS_pseudonym_list_all (GNUNET_FS_GTK_get_configuration (),
- &find_largest_namespace_rating_iterator,
- &largest_namespace_rating);
- return largest_namespace_rating;
-}
-
-
-/**
- * Sets largest namespace rating.
- * Used to change cached largest namespace rating, when namespace list
- * was changed in a way that is easy to track.
- * If namespace list was changed in a way that makes it difficult to
- * decide upon the new value, set new value to INT_MIN.
- *
- * @param new_value new value for the rating.
- */
-void
-GNUNET_GTK_set_largest_namespace_rating (int new_value)
-{
- largest_namespace_rating = new_value;
-}
-
-
-/**
* Converts a GtkTreeRowReference to a GtkTreeIter.
*
* @param rr row reference
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_common.h
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_common.h 2013-09-05 15:04:48 UTC (rev
29035)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_common.h 2013-09-05 15:05:10 UTC (rev
29036)
@@ -151,31 +151,6 @@
/**
- * Finds largest namespace rating.
- * Used to calculate a rating for newly discovered namespaces.
- * Returns from cache, if possible.
- *
- * @return largest namespace rating. Might be negative and even. INT_MIN means
- * that no namespaces are known.
- */
-int
-GNUNET_GTK_find_largest_namespace_rating (void);
-
-
-/**
- * Sets largest namespace rating.
- * Used to change cached largest namespace rating, when namespace list
- * was changed in a way that is easy to track.
- * If namespace list was changed in a way that makes it difficult to
- * decide upon the new value, set new value to INT_MIN.
- *
- * @param new_value new value for the rating.
- */
-void
-GNUNET_GTK_set_largest_namespace_rating (int new_value);
-
-
-/**
* Converts a GtkTreeRowReference to a GtkTreeIter.
*
* @param rr row reference
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29036 - gnunet-gtk/src/fs,
gnunet <=