plugin datastore mysql
[oweals/gnunet.git] / src / psycstore / plugin_psycstore_sqlite.c
index 4ad3b151723cc36af0c9f41a04fd5493c8138cfe..46bdfa1bd52f62ead2baa5697dfea6f7302d027b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of GNUnet
- * Copyright (C) 2013 Christian Grothoff (and other contributing authors)
+ * Copyright (C) 2013 GNUnet e.V.
  *
  * GNUnet is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published
@@ -35,7 +35,7 @@
 #include "gnunet_psycstore_service.h"
 #include "gnunet_multicast_service.h"
 #include "gnunet_crypto_lib.h"
-#include "gnunet_env_lib.h"
+#include "gnunet_psyc_util_lib.h"
 #include "psycstore.h"
 #include <sqlite3.h>
 
@@ -813,13 +813,13 @@ slave_key_store (struct Plugin *plugin,
  * @return #GNUNET_OK on success, else #GNUNET_SYSERR
  */
 static int
-membership_store (void *cls,
-                  const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
-                  const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key,
-                  int did_join,
-                  uint64_t announced_at,
-                  uint64_t effective_since,
-                  uint64_t group_generation)
+sqlite_membership_store (void *cls,
+                         const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
+                         const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key,
+                         int did_join,
+                         uint64_t announced_at,
+                         uint64_t effective_since,
+                         uint64_t group_generation)
 {
   struct Plugin *plugin = cls;
   sqlite3_stmt *stmt = plugin->insert_membership;
@@ -1564,7 +1564,7 @@ state_modify_begin (void *cls,
 static int
 state_modify_op (void *cls,
                  const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
-                 enum GNUNET_ENV_Operator op,
+                 enum GNUNET_PSYC_Operator op,
                  const char *name, const void *value, size_t value_size)
 {
   struct Plugin *plugin = cls;
@@ -1572,7 +1572,7 @@ state_modify_op (void *cls,
 
   switch (op)
   {
-  case GNUNET_ENV_OP_ASSIGN:
+  case GNUNET_PSYC_OP_ASSIGN:
     return state_assign (plugin, plugin->insert_state_current, channel_key,
                          name, value, value_size);
 
@@ -1898,7 +1898,7 @@ libgnunet_plugin_psycstore_sqlite_init (void *cls)
   }
   api = GNUNET_new (struct GNUNET_PSYCSTORE_PluginFunctions);
   api->cls = &plugin;
-  api->membership_store = &membership_store;
+  api->membership_store = &sqlite_membership_store;
   api->membership_test = &membership_test;
   api->fragment_store = &fragment_store;
   api->message_add_flags = &message_add_flags;