rename auction_brandt -> policy_auction

This commit is contained in:
Özgür Kesim 2022-10-04 21:31:19 +02:00
parent 0ad6a8cbfb
commit 0a089db4ef
Signed by: oec
GPG Key ID: 3D76A56D79EDD9D7
7 changed files with 27 additions and 29 deletions

View File

@ -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

View File

@ -32,7 +32,7 @@ SUBDIRS = \
auditor \
lib \
exchange-tools \
extensions/auction_brandt \
extensions/policy_auction \
extensions/age_restriction \
testing \
benchmark

View File

@ -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 \

View File

@ -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 \

View File

@ -14,8 +14,8 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @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 <microhttpd.h>
#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 */

View File

@ -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
};

View File

@ -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"