gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r1305 - GNUnet/src/applications/advertising GNUnet/src/appl


From: grothoff
Subject: [GNUnet-SVN] r1305 - GNUnet/src/applications/advertising GNUnet/src/applications/chat GNUnet/src/applications/fs/module GNUnet/src/applications/getoption GNUnet/src/applications/stats GNUnet/src/applications/tbench GNUnet/src/applications/testbed GNUnet/src/applications/topology_default GNUnet/src/applications/tracekit GNUnet/src/applications/traffic gnunet-gtk gnunet-gtk/src/plugins/daemon
Date: Wed, 6 Jul 2005 17:24:23 -0700 (PDT)

Author: grothoff
Date: 2005-07-06 17:24:08 -0700 (Wed, 06 Jul 2005)
New Revision: 1305

Modified:
   GNUnet/src/applications/advertising/advertising.c
   GNUnet/src/applications/chat/chat.c
   GNUnet/src/applications/fs/module/fs.c
   GNUnet/src/applications/getoption/getoption.c
   GNUnet/src/applications/stats/statistics.c
   GNUnet/src/applications/tbench/tbench.c
   GNUnet/src/applications/testbed/testbed.c
   GNUnet/src/applications/topology_default/topology.c
   GNUnet/src/applications/tracekit/tracekit.c
   GNUnet/src/applications/traffic/traffic.c
   gnunet-gtk/TODO
   gnunet-gtk/src/plugins/daemon/daemon.c
Log:
app list

Modified: GNUnet/src/applications/advertising/advertising.c
===================================================================
--- GNUnet/src/applications/advertising/advertising.c   2005-07-07 00:00:41 UTC 
(rev 1304)
+++ GNUnet/src/applications/advertising/advertising.c   2005-07-07 00:24:08 UTC 
(rev 1305)
@@ -740,6 +740,10 @@
 #endif
 
   startBootstrap(capi);
+  setConfigurationString("ABOUT",
+                        "advertising",
+                        _("ensures that this peer is known by other"
+                          " peers and discovers other peers"));
   return OK;
 }
 

Modified: GNUnet/src/applications/chat/chat.c
===================================================================
--- GNUnet/src/applications/chat/chat.c 2005-07-07 00:00:41 UTC (rev 1304)
+++ GNUnet/src/applications/chat/chat.c 2005-07-07 00:24:08 UTC (rev 1305)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002 Christian Grothoff (and other contributing authors)
+     (C) 2001, 2002, 2005 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
@@ -205,6 +205,9 @@
   if (SYSERR == capi->registerClientHandler(CHAT_CS_PROTO_MSG,
                                            (CSHandler)&csHandleChatRequest))
     ok = SYSERR;
+  setConfigurationString("ABOUT",
+                        "chat",
+                        _("enables P2P-chat (incomplete)"));
   return ok;
 }
 

Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c      2005-07-07 00:00:41 UTC (rev 
1304)
+++ GNUnet/src/applications/fs/module/fs.c      2005-07-07 00:24:08 UTC (rev 
1305)
@@ -1023,6 +1023,9 @@
                gap, 
                dht,
                traffic);
+  setConfigurationString("ABOUT",
+                        "fs",
+                        _("enables (anonymous) file-sharing"));
   return OK;
 }
 

Modified: GNUnet/src/applications/getoption/getoption.c
===================================================================
--- GNUnet/src/applications/getoption/getoption.c       2005-07-07 00:00:41 UTC 
(rev 1304)
+++ GNUnet/src/applications/getoption/getoption.c       2005-07-07 00:24:08 UTC 
(rev 1305)
@@ -1,5 +1,6 @@
  /*
       This file is part of GNUnet
+      (C) 2005 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
@@ -76,6 +77,10 @@
       CS_PROTO_GET_OPTION_REQUEST);
   capi->registerClientHandler(CS_PROTO_GET_OPTION_REQUEST,
                              &handleGetOption);
+  setConfigurationString("ABOUT",
+                        "getoption",
+                        _("allows clients to determine gnunetd's"
+                          " configuration"));
   return OK;
 }
 

Modified: GNUnet/src/applications/stats/statistics.c
===================================================================
--- GNUnet/src/applications/stats/statistics.c  2005-07-07 00:00:41 UTC (rev 
1304)
+++ GNUnet/src/applications/stats/statistics.c  2005-07-07 00:24:08 UTC (rev 
1305)
@@ -365,6 +365,9 @@
                                &processGetConnectionCountRequest);
   capi->registerHandler(p2p_PROTO_NOISE,
                        &processNoise);
+  setConfigurationString("ABOUT",
+                        "stats",
+                        _("keeps statistics about gnunetd's operation"));
   return OK;
 }
 

Modified: GNUnet/src/applications/tbench/tbench.c
===================================================================
--- GNUnet/src/applications/tbench/tbench.c     2005-07-07 00:00:41 UTC (rev 
1304)
+++ GNUnet/src/applications/tbench/tbench.c     2005-07-07 00:24:08 UTC (rev 
1305)
@@ -442,6 +442,10 @@
   if (SYSERR == capi->registerClientHandler(TBENCH_CS_PROTO_REQUEST,
                                            &csHandleTBenchRequest))
     ok = SYSERR;
+  setConfigurationString("ABOUT",
+                        "tbench",
+                        _("allows profiling of direct "
+                          "peer-to-peer connections"));
   return ok;
 }
 

Modified: GNUnet/src/applications/testbed/testbed.c
===================================================================
--- GNUnet/src/applications/testbed/testbed.c   2005-07-07 00:00:41 UTC (rev 
1304)
+++ GNUnet/src/applications/testbed/testbed.c   2005-07-07 00:24:08 UTC (rev 
1305)
@@ -1352,6 +1352,10 @@
   GNUNET_ASSERT(SYSERR != capi->registerClientHandler(TESTBED_CS_PROTO_REQUEST,
                                                      
(CSHandler)&csHandleTestbedRequest));
   httpRegister("startup");
+  setConfigurationString("ABOUT",
+                        "testbed",
+                        _("allows construction of a P2P-testbed"
+                          " (incomplete)"));
   return OK;
 }
 

Modified: GNUnet/src/applications/topology_default/topology.c
===================================================================
--- GNUnet/src/applications/topology_default/topology.c 2005-07-07 00:00:41 UTC 
(rev 1304)
+++ GNUnet/src/applications/topology_default/topology.c 2005-07-07 00:24:08 UTC 
(rev 1305)
@@ -372,10 +372,10 @@
     if (0 != strncmp(PACKAGE_VERSION,
                     data,
                     len)) {
-      data[len-1] = '\0';
       LOG(LOG_FAILURE,
-         _("Version mismatch ('%s' vs. '%s'), run gnunet-update!\n"),
+         _("Version mismatch ('%s' vs. '%*.s'), run gnunet-update!\n"),
          PACKAGE_VERSION,
+         len,
          data);
       FREE(data);
       delCronJob(&cronCheckLiveness,

Modified: GNUnet/src/applications/tracekit/tracekit.c
===================================================================
--- GNUnet/src/applications/tracekit/tracekit.c 2005-07-07 00:00:41 UTC (rev 
1304)
+++ GNUnet/src/applications/tracekit/tracekit.c 2005-07-07 00:24:08 UTC (rev 
1305)
@@ -472,6 +472,9 @@
   if (SYSERR == capi->registerClientHandler(TRACEKIT_CS_PROTO_PROBE,
                                            (CSHandler)&csHandle))
     ok = SYSERR;
+  setConfigurationString("ABOUT",
+                        "tracekit",
+                        _("allows mapping of the network topology"));
   return ok;
 }
 

Modified: GNUnet/src/applications/traffic/traffic.c
===================================================================
--- GNUnet/src/applications/traffic/traffic.c   2005-07-07 00:00:41 UTC (rev 
1304)
+++ GNUnet/src/applications/traffic/traffic.c   2005-07-07 00:24:08 UTC (rev 
1305)
@@ -600,6 +600,9 @@
   }
   capi->registerClientHandler(CS_PROTO_TRAFFIC_QUERY,
                              &trafficQueryHandler);
+  setConfigurationString("ABOUT",
+                        "traffic",
+                        _("tracks bandwidth utilization by gnunetd"));
   return OK;                           
 }
 

Modified: gnunet-gtk/TODO
===================================================================
--- gnunet-gtk/TODO     2005-07-07 00:00:41 UTC (rev 1304)
+++ gnunet-gtk/TODO     2005-07-07 00:24:08 UTC (rev 1305)
@@ -15,10 +15,10 @@
     * need visual feedback for collection status!
   - stop collection [ easy, CG ]
     * enable start collection!
-* list available apps [ easy, CG ]
 
+
 Later (0.7.1):
-0) stats integration [ medium ]
+0) stats integration (daemon+own module for graphical stats) [ medium ]
 1) auto-rename downloaded files 
    to better names (user feedback!?) [ medium ]
 2) create directory from known file IDs [ medium ]

Modified: gnunet-gtk/src/plugins/daemon/daemon.c
===================================================================
--- gnunet-gtk/src/plugins/daemon/daemon.c      2005-07-07 00:00:41 UTC (rev 
1304)
+++ gnunet-gtk/src/plugins/daemon/daemon.c      2005-07-07 00:24:08 UTC (rev 
1305)
@@ -29,6 +29,78 @@
 #include <GNUnet/gnunet_getoption_lib.h>
 
 
+
+/**
+ * cron job that periodically updates the model for the
+ * application list.
+ */
+static void updateAppModelSafe(void * unused) {
+  GNUNET_TCP_SOCKET * sock;
+  GtkWidget * w;
+  GtkListStore * model;
+  GtkTreeIter iter;
+  char * apps;
+  char * next;
+  char * pos;
+  char * desc;
+ 
+  model = gtk_list_store_new(2,
+                            G_TYPE_STRING,
+                            G_TYPE_STRING);
+  sock = getClientSocket();
+  if (sock == NULL) {
+    apps = NULL;
+  } else {
+    apps
+      = getConfigurationOptionValue(sock,
+                                   "GNUNETD",
+                                   "APPLICATIONS");
+  }
+  if (apps != NULL) {    
+    next = apps;
+    do {
+      while (*next == ' ')
+       next++;
+      pos = next;
+      while ( (*next != '\0') &&
+             (*next != ' ') )
+       next++;
+      if (*next == '\0') {
+       next = NULL; /* terminate! */
+      } else {
+       *next = '\0'; /* add 0-termination for pos */
+       next++;
+      }
+      if (strlen(pos) > 0) {
+       desc
+         = getConfigurationOptionValue(sock,
+                                       "ABOUT",
+                                       pos);
+       
+       gtk_list_store_append(model,
+                             &iter);
+       gtk_list_store_set(model,
+                          &iter,
+                          0, pos,
+                          1, desc,
+                          -1);
+       FREENONNULL(desc);
+      }    
+    } while (next != NULL);    
+    FREE(apps);
+  }
+  w = glade_xml_get_widget(getMainXML(),
+                          "applicationList");
+  gtk_tree_view_set_model(GTK_TREE_VIEW(w),
+                         GTK_TREE_MODEL(model));
+  releaseClientSocket(sock);
+}
+
+static void updateAppModel(void * dummy) {
+  gtkSaveCall(&updateAppModelSafe, NULL);
+}
+
+
 static void doUpdateMenus(void * arg) {
   int ret = *(int*) arg;
   static GtkWidget * killEntry = NULL;
@@ -62,6 +134,7 @@
       isLocal = FALSE;
     FREENONNULL(host);
   }
+  updateAppModelSafe(NULL);
   if (ret == SYSERR) {
     gtk_widget_hide(statsEntryYes);
     gtk_widget_show_all(statsEntryNo);
@@ -102,7 +175,7 @@
     return;
   } else {     
     addLogEntry(_("Launching gnunetd..."));
-    if (OK == startGNUnetDaemon(YES)) {
+    if (SYSERR != startGNUnetDaemon(YES)) {
       addLogEntry(_("Launched gnunetd"));
     } else {
       addLogEntry(_("Launching gnunetd failed"));
@@ -140,67 +213,6 @@
   cronCheckDaemon(NULL);
 }
 
-
-/**
- * cron job that periodically updates the model for the
- * application list.
- */
-static void updateAppModelSafe(void * unused) {
-  GNUNET_TCP_SOCKET * sock;
-  GtkWidget * w;
-  GtkListStore * model;
-  GtkTreeIter iter;
-  char * apps;
-  char * next;
-  char * pos;
- 
-  model = gtk_list_store_new(1, G_TYPE_STRING);
-  sock = getClientSocket();
-  if (sock == NULL) {
-    apps = NULL;
-  } else {
-    apps
-      = getConfigurationOptionValue(sock,
-                                   "GNUNETD",
-                                   "APPLICATIONS");
-    releaseClientSocket(sock);
-  }
-  if (apps != NULL) {    
-    next = apps;
-    do {
-      while (*next == ' ')
-       next++;
-      pos = next;
-      while ( (*next != '\0') &&
-             (*next != ' ') )
-       next++;
-      if (*next == '\0') {
-       next = NULL; /* terminate! */
-      } else {
-       *next = '\0'; /* add 0-termination for pos */
-       next++;
-      }
-      if (strlen(pos) > 0) {
-       gtk_list_store_append(model,
-                             &iter);
-       gtk_list_store_set(model,
-                          &iter,
-                          0, pos,
-                          -1);
-      }    
-    } while (next != NULL);    
-    FREE(apps);
-  }
-  w = glade_xml_get_widget(getMainXML(),
-                          "applicationList");
-  gtk_tree_view_set_model(GTK_TREE_VIEW(w),
-                         GTK_TREE_MODEL(model));
-}
-
-static void updateAppModel(void * dummy) {
-  gtkSaveCall(&updateAppModelSafe, NULL);
-}
-
 void init_daemon() {
   GtkWidget * tab;
   GtkWidget * apps;
@@ -216,10 +228,17 @@
   renderer = gtk_cell_renderer_text_new();
   gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(apps),
                                              -1,
-                                             _("Applications"),
+                                             _("Application"),
                                              renderer,
                                              "text", 0,
                                              NULL);
+  renderer = gtk_cell_renderer_text_new();
+  gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(apps),
+                                             -1,
+                                             _("Description"),
+                                             renderer,
+                                             "text", 1,
+                                             NULL);
 
   updateAppModelSafe(NULL);
   tab





reply via email to

[Prev in Thread] Current Thread [Next in Thread]