diff --git a/configure.ac b/configure.ac index 5bdfcecde..389446946 100644 --- a/configure.ac +++ b/configure.ac @@ -533,7 +533,7 @@ AC_CONFIG_FILES([Makefile src/exchange-tools/Makefile src/extensions/Makefile src/extensions/age_restriction/Makefile - src/extensions/auction_brandt/Makefile + src/extensions/policy_auction/Makefile src/lib/Makefile src/kyclogic/Makefile src/testing/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 827740612..9f0646655 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,7 @@ SUBDIRS = \ auditor \ lib \ exchange-tools \ - extensions/auction_brandt \ + extensions/policy_auction \ extensions/age_restriction \ testing \ benchmark diff --git a/src/extensions/age_restriction/Makefile.am b/src/extensions/age_restriction/Makefile.am index c81fd0b95..e90c19622 100644 --- a/src/extensions/age_restriction/Makefile.am +++ b/src/extensions/age_restriction/Makefile.am @@ -24,7 +24,7 @@ libtaler_extension_age_restriction_la_LDFLAGS = \ libtaler_extension_age_restriction_la_SOURCES = \ extension_age_restriction.c -libtaler_extension_auctionbrandt_la_LIBADD = \ +libtaler_extension_age_restriction_la_LIBADD = \ $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libtalerutil.la \ -lgnunetjson \ diff --git a/src/extensions/auction_brandt/Makefile.am b/src/extensions/policy_auction/Makefile.am similarity index 63% rename from src/extensions/auction_brandt/Makefile.am rename to src/extensions/policy_auction/Makefile.am index f616c1646..cf44b95ee 100644 --- a/src/extensions/auction_brandt/Makefile.am +++ b/src/extensions/policy_auction/Makefile.am @@ -11,21 +11,21 @@ if USE_COVERAGE endif -# Auction of Brandt type as extension library +# Auction of Brandt type as an extension library plugindir = $(libdir)/taler plugin_LTLIBRARIES = \ - libtaler_extension_auction_brandt.la + libtaler_extension_policy_auction.la -libtaler_extension_auction_brandt_la_LDFLAGS = \ +libtaler_extension_policy_auction_la_LDFLAGS = \ -version-info 0:0:0 \ -no-undefined -libtaler_extension_auction_brandt_la_SOURCES = \ - extension_auction_brandt.c +libtaler_extension_policy_auction_la_SOURCES = \ + policy_auction.c -libtaler_extension_auction_brandt_la_LIBADD = \ +libtaler_extension_policy_auction_la_LIBADD = \ $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libtalerutil.la \ -lgnunetjson \ diff --git a/src/extensions/auction_brandt/extension_auction_brandt.c b/src/extensions/policy_auction/policy_auction.c similarity index 97% rename from src/extensions/auction_brandt/extension_auction_brandt.c rename to src/extensions/policy_auction/policy_auction.c index 358c6b7c6..d1c3237cc 100644 --- a/src/extensions/auction_brandt/extension_auction_brandt.c +++ b/src/extensions/policy_auction/policy_auction.c @@ -14,8 +14,8 @@ TALER; see the file COPYING. If not, see */ /** - * @file extension_auction_brandt.c - * @brief Extension for replay of auctions of type brandt + * @file policy_auction.c + * @brief Extension for replay of auctions of type Brandt * @author Özgür Kesim */ #include "platform.h" @@ -26,8 +26,8 @@ #include "stdint.h" #include -#define AUCTION_BRANDT "auction_brandt" -#define LOG_PREFIX "[auction_brandt] " +#define POLICY_AUCTION "policy_auction" +#define LOG_PREFIX "[policy_auction] " #define MAX_RESULT_SIZE 10 * 1024 /* Path to the replay program. */ @@ -622,8 +622,8 @@ auction_http_post_handler ( /* The extension struct for auctions of brandt-style */ struct TALER_Extension TE_auction_brandt = { - .type = TALER_Extension_AuctionBrandt, - .name = AUCTION_BRANDT, + .type = TALER_Extension_PolicyAuction, + .name = POLICY_AUCTION, .critical = false, .version = "0", .enabled = false, /* disabled per default */ @@ -639,8 +639,6 @@ struct TALER_Extension TE_auction_brandt = { }; -/* TODO: sql handler */ - /** * =========================================== * Handler for GNUNET_PLUGIN_load and _unload @@ -655,7 +653,7 @@ struct TALER_Extension TE_auction_brandt = { * @return Pointer to TE_auction_brandt */ struct TALER_Extension * -libtaler_extension_auction_brandt_init (void *arg) +libtaler_extension_policy_auction_init (void *arg) { const struct GNUNET_CONFIGURATION_Handle *cfg = arg; @@ -668,12 +666,12 @@ libtaler_extension_auction_brandt_init (void *arg) if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (cfg, TALER_EXTENSION_SECTION_PREFIX - AUCTION_BRANDT, + POLICY_AUCTION, "REPLAY_PROGRAM", &replay_program)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - TALER_EXTENSION_SECTION_PREFIX AUCTION_BRANDT, + TALER_EXTENSION_SECTION_PREFIX POLICY_AUCTION, "REPLAY_PROGRAM"); return NULL; } @@ -720,7 +718,7 @@ libtaler_extension_auction_brandt_init (void *arg) * @return null */ void * -libtaler_extension_auction_brandt_done (void *arg) +libtaler_extension_policy_auction_done (void *arg) { auction_disable (&TE_auction_brandt); GNUNET_free (replay_program); @@ -730,4 +728,4 @@ libtaler_extension_auction_brandt_done (void *arg) } -/* end of extension_auction_brandt.c */ +/* end of policy_auction.c */ diff --git a/src/include/taler_extensions.h b/src/include/taler_extensions.h index 1ae8ad1ed..f81b96539 100644 --- a/src/include/taler_extensions.h +++ b/src/include/taler_extensions.h @@ -31,12 +31,11 @@ enum TALER_Extension_Type { - TALER_Extension_Refund = 0, - TALER_Extension_AgeRestriction = 1, - TALER_Extension_P2P = 2, - TALER_Extension_AuctionBrandt = 3, - TALER_Extension_Escrow = 4, - TALER_Extension_MaxPredefined = 5 // Must be last of the predefined + TALER_Extension_AgeRestriction = 0, + TALER_Extension_PolicyRefund = 1, + TALER_Extension_PolicyAuction = 2, + TALER_Extension_PolicyEscrow = 3, + TALER_Extension_MaxPredefined = 4 // Must be last of the predefined }; diff --git a/src/testing/test_exchange_auction.conf b/src/testing/test_exchange_auction.conf index ee5ef7bc5..89345d974 100644 --- a/src/testing/test_exchange_auction.conf +++ b/src/testing/test_exchange_auction.conf @@ -92,7 +92,8 @@ HTTP_PORT = 9081 # default age groups: #AGE_GROUPS = "8:10:12:14:16:18:21" -[exchange-extension-auction_brandt] +# Enable policy of type auction for deposits. +[exchange-extension-policy_auction] ENABLED = YES REPLAY_PROGRAM = "/usr/local/bin/taler-exchange-auction_brandt-replay"