[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r20545 - gnunet-gtk/src/gns
From: |
gnunet |
Subject: |
[GNUnet-SVN] r20545 - gnunet-gtk/src/gns |
Date: |
Thu, 15 Mar 2012 18:14:29 +0100 |
Author: wachs
Date: 2012-03-15 18:14:29 +0100 (Thu, 15 Mar 2012)
New Revision: 20545
Modified:
gnunet-gtk/src/gns/gnunet-gns-gtk.c
gnunet-gtk/src/gns/gnunet-gns-gtk.h
gnunet-gtk/src/gns/gnunet-gns-gtk_zone.c
Log:
- clean up
Modified: gnunet-gtk/src/gns/gnunet-gns-gtk.c
===================================================================
--- gnunet-gtk/src/gns/gnunet-gns-gtk.c 2012-03-15 17:11:09 UTC (rev 20544)
+++ gnunet-gtk/src/gns/gnunet-gns-gtk.c 2012-03-15 17:14:29 UTC (rev 20545)
@@ -24,6 +24,7 @@
* @author Christian Grothoff
*/
#include "gnunet_gtk.h"
+#include "gnunet-gns-gtk.h"
#include <gnunet/gnunet_namestore_service.h>
/**
@@ -49,25 +50,6 @@
static GtkWidget *main_window;
-struct GNUNET_GNS_Context
-{
- /**
- * Handle to the namestore.
- */
- struct GNUNET_NAMESTORE_Handle *ns;
-
- GtkBuilder *builder;
-
- struct GNUNET_CRYPTO_RsaPrivateKey *pkey;
- struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
-
- GNUNET_HashCode zone;
-
-
-
-};
-
-
/**
* Get cfg.
*/
@@ -295,32 +277,6 @@
GNUNET_SCHEDULER_add_now (&shutdown_task, user_data);
}
-struct ZoneIteration_Context
-{
- GNUNET_HashCode zone;
- struct GNUNET_NAMESTORE_ZoneIterator * it;
-};
-
-void zone_iteration_proc (void *cls,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
*zone_key,
- struct GNUNET_TIME_Absolute expire,
- const char *name,
- unsigned int rd_len,
- const struct GNUNET_NAMESTORE_RecordData *rd,
- const struct GNUNET_CRYPTO_RsaSignature *signature)
-{
- struct ZoneIteration_Context * zc_ctx = cls;
- GNUNET_assert (zc_ctx != NULL);
- if ((NULL == zone_key) && (NULL == name))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Zone iteration done\n");
- return;
- }
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Zone iteration dummy\n");
-}
-
-
-
/**
* Actual main function run right after GNUnet's scheduler
* is initialized. Initializes up GTK and Glade.
Modified: gnunet-gtk/src/gns/gnunet-gns-gtk.h
===================================================================
--- gnunet-gtk/src/gns/gnunet-gns-gtk.h 2012-03-15 17:11:09 UTC (rev 20544)
+++ gnunet-gtk/src/gns/gnunet-gns-gtk.h 2012-03-15 17:14:29 UTC (rev 20545)
@@ -36,10 +36,15 @@
GtkBuilder *builder;
+ struct GNUNET_CRYPTO_RsaPrivateKey *pkey;
+ struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
+ GNUNET_HashCode zone;
};
+
+
/* end of gnunet-gns-gtk.h */
Modified: gnunet-gtk/src/gns/gnunet-gns-gtk_zone.c
===================================================================
--- gnunet-gtk/src/gns/gnunet-gns-gtk_zone.c 2012-03-15 17:11:09 UTC (rev
20544)
+++ gnunet-gtk/src/gns/gnunet-gns-gtk_zone.c 2012-03-15 17:14:29 UTC (rev
20545)
@@ -140,6 +140,32 @@
return FALSE;
}
+
+
+struct ZoneIteration_Context
+{
+ GNUNET_HashCode zone;
+ struct GNUNET_NAMESTORE_ZoneIterator * it;
+};
+
+void zone_iteration_proc (void *cls,
+ const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
*zone_key,
+ struct GNUNET_TIME_Absolute expire,
+ const char *name,
+ unsigned int rd_len,
+ const struct GNUNET_NAMESTORE_RecordData *rd,
+ const struct GNUNET_CRYPTO_RsaSignature *signature)
+{
+ struct ZoneIteration_Context * zc_ctx = cls;
+ GNUNET_assert (zc_ctx != NULL);
+ if ((NULL == zone_key) && (NULL == name))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Zone iteration done\n");
+ return;
+ }
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Zone iteration dummy\n");
+}
+
/**
* The zone treeview was realized. Setup the model.
*
@@ -165,15 +191,13 @@
/* Append a top level row and leave it empty */
gtk_tree_store_append(ts, &toplevel, NULL);
- /*
struct ZoneIteration_Context * zc_ctx = GNUNET_malloc (sizeof (struct
ZoneIteration_Context));
- zc_ctx->zone = zone;
- GNUNET_NAMESTORE_zone_iteration_start(gns->ns, &zone,
+ zc_ctx->zone = gns->zone;
+ GNUNET_NAMESTORE_zone_iteration_start(gns->ns, &gns->zone,
GNUNET_NAMESTORE_RF_NONE,
GNUNET_NAMESTORE_RF_NONE,
&zone_iteration_proc,
zc_ctx);
- */
GNUNET_break (0);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r20545 - gnunet-gtk/src/gns,
gnunet <=