merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

update_instance_password_reset.h (1955B)


      1 /*
      2    This file is part of TALER
      3    Copyright (C) 2026 Taler Systems SA
      4 
      5    TALER is free software; you can redistribute it and/or modify it under the
      6    terms of the GNU General Public License as published by the Free Software
      7    Foundation; either version 3, or (at your option) any later version.
      8 
      9    TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11    A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     12 
     13    You should have received a copy of the GNU General Public License along with
     14    TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15  */
     16 /**
     17  * @file src/include/merchant-database/update_instance_password_reset.h
     18  * @brief implementation of the update_instance_password_reset function for Postgres
     19  */
     20 #ifndef MERCHANT_DATABASE_UPDATE_INSTANCE_PASSWORD_RESET_H
     21 #define MERCHANT_DATABASE_UPDATE_INSTANCE_PASSWORD_RESET_H
     22 
     23 #include <taler/taler_util.h>
     24 #include "merchantdb_lib.h"
     25 
     26 
     27 struct TALER_MERCHANTDB_PostgresContext;
     28 /**
     29  * Start a password reset of an instance if the last one was started
     30  * long enough ago: if the earliest time for the next password reset
     31  * of @a merchant_id is not after @a now, set it to @a next_reset.
     32  *
     33  * @param pg database context
     34  * @param merchant_id identity of the instance
     35  * @param now current time
     36  * @param next_reset earliest time at which the password reset after
     37  *        this one may be started
     38  * @return #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT if the password reset
     39  *         may be started now,
     40  *         #GNUNET_DB_STATUS_SUCCESS_NO_RESULTS if it is too early
     41  *         (or the instance does not exist)
     42  */
     43 enum GNUNET_DB_QueryStatus
     44 TALER_MERCHANTDB_update_instance_password_reset (
     45   struct TALER_MERCHANTDB_PostgresContext *pg,
     46   const char *merchant_id,
     47   struct GNUNET_TIME_Absolute now,
     48   struct GNUNET_TIME_Absolute next_reset);
     49 
     50 #endif