gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r12288 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r12288 - gnunet/src/dht
Date: Tue, 20 Jul 2010 16:38:30 +0200

Author: nevans
Date: 2010-07-20 16:38:30 +0200 (Tue, 20 Jul 2010)
New Revision: 12288

Modified:
   gnunet/src/dht/Makefile.am
   gnunet/src/dht/dhtlog.h
Log:


Modified: gnunet/src/dht/Makefile.am
===================================================================
--- gnunet/src/dht/Makefile.am  2010-07-20 13:23:21 UTC (rev 12287)
+++ gnunet/src/dht/Makefile.am  2010-07-20 14:38:30 UTC (rev 12288)
@@ -3,6 +3,12 @@
  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols -lole32 -lshell32 
-liconv -lstdc++ -lcomdlg32 -lgdi32
 endif
 
+plugindir = $(libdir)/gnunet
+
+if HAVE_MYSQL
+ MYSQL_PLUGIN = libgnunet_plugin_dhtlog_mysql.la
+endif
+
 if HAVE_ZLIB
  ZLIB_LNK = -lz
 endif
@@ -12,19 +18,37 @@
   XLIB = -lgcov
 endif
 
-lib_LTLIBRARIES = libgnunetdht.la
-#  libgnunetdhtlog.la
+lib_LTLIBRARIES = libgnunetdht.la \
+ libgnunetdhtlog.la
+ 
+plugin_LTLIBRARIES = \
+ libgnunet_plugin_dhtlog_dummy.la $(MYSQL_PLUGIN)
 
-#libgnunetdhtlog_la_SOURCES = \
-#  dhtlog_mysql.c dhtlog.h
-#libgnunetdhtlog_la_LIBADD = \
-#  $(top_builddir)/src/util/libgnunetutil.la \
-#  $(XLIB)
-#libgnunetdhtlog_la_LDFLAGS = \
-#  $(GN_LIB_LDFLAGS) $(WINFLAGS) \
-#  -lmysqlclient $(ZLIB_LNK) \
-#  -version-info 0:0:0
+libgnunet_plugin_dhtlog_dummy_la_SOURCES = \
+  plugin_dhtlog_dummy.c
+libgnunet_plugin_dhtlog_dummy_la_LIBADD = \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(XLIB)
+libgnunet_plugin_dhtlog_dummy_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
 
+if HAVE_MYSQL
+libgnunet_plugin_dhtlog_mysql_la_SOURCES = \
+  plugin_dhtlog_mysql.c
+libgnunet_plugin_dhtlog_mysql_la_LIBADD = \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(XLIB)
+libgnunet_plugin_dhtlog_mysql_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS) -lmysqlclient $(ZLIB_LNK)
+endif 
+ 
+libgnunetdhtlog_la_SOURCES = \
+  dhtlog.c dhtlog.h
+libgnunetdhtlog_la_LIBADD = \
+  $(top_builddir)/src/util/libgnunetutil.la
+libgnunetdhtlog_la_LDFLAGS = \
+  $(GN_LIB_LDFLAGS) $(WINFLAGS) \
+  -version-info 0:0:0
 
 libgnunetdht_la_SOURCES = \
   dht_api.c dht.h
@@ -41,10 +65,8 @@
  gnunet-dht-get-peer \
  gnunet-dht-put 
 
-if HAVE_MYSQL
 noinst_PROGRAMS = \
  gnunet-dht-driver
-endif
 
 gnunet_service_dht_SOURCES = \
  gnunet-service-dht.c         
@@ -54,19 +76,9 @@
   $(top_builddir)/src/transport/libgnunettransport.la \
   $(top_builddir)/src/hello/libgnunethello.la \
   $(top_builddir)/src/datacache/libgnunetdatacache.la \
-  $(top_builddir)/src/util/libgnunetutil.la 
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(top_builddir)/src/dht/libgnunetdhtlog.la
 
-#gnunet_service_dht_new_SOURCES = \
-# gnunet-service-dht-new.c         
-#gnunet_service_dht_new_LDADD = \
-#  $(top_builddir)/src/statistics/libgnunetstatistics.la \
-#  $(top_builddir)/src/core/libgnunetcore.la \
-#  $(top_builddir)/src/transport/libgnunettransport.la \
-#  $(top_builddir)/src/hello/libgnunethello.la \
-#  $(top_builddir)/src/datacache/libgnunetdatacache.la \
-#  $(top_builddir)/src/util/libgnunetutil.la \
-#  $(top_builddir)/src/dht/libgnunetdhtlog.la
-
 gnunet_dht_get_SOURCES = \
  gnunet-dht-get.c         
 gnunet_dht_get_LDADD = \

Modified: gnunet/src/dht/dhtlog.h
===================================================================
--- gnunet/src/dht/dhtlog.h     2010-07-20 13:23:21 UTC (rev 12287)
+++ gnunet/src/dht/dhtlog.h     2010-07-20 14:38:30 UTC (rev 12288)
@@ -30,7 +30,6 @@
 #define GNUNET_DHTLOG_SERVICE_H
 
 #include "gnunet_util_lib.h"
-#include <mysql/mysql.h>
 
 #ifdef __cplusplus
 extern "C"
@@ -157,6 +156,13 @@
 
 };
 
+struct GNUNET_DHTLOG_Plugin
+{
+  const struct GNUNET_CONFIGURATION_Handle *cfg;
+
+  struct GNUNET_DHTLOG_Handle *dhtlog_api;
+};
+
 /**
  * Connect to mysql server using the DHT log plugin.
  *
@@ -171,18 +177,6 @@
 void
 GNUNET_DHTLOG_disconnect (struct GNUNET_DHTLOG_Handle *api);
 
-/**
- * Type of a callback that will be called for each
- * data set returned from MySQL.
- *
- * @param cls user-defined argument
- * @param num_values number of elements in values
- * @param values values returned by MySQL
- * @return GNUNET_OK to continue iterating, GNUNET_SYSERR to abort
- */
-typedef int (*GNUNET_MysqlDataProcessor) (void *cls,
-                                          unsigned int num_values,
-                                          MYSQL_BIND * values);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {




reply via email to

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