merchant

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

select_wirewatch_accounts.h (2136B)


      1 /*
      2    This file is part of TALER
      3    Copyright (C) 2022 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/select_wirewatch_accounts.h
     18  * @brief implementation of the select_wirewatch_accounts function for Postgres
     19  * @author Christian Grothoff
     20  */
     21 #ifndef MERCHANT_DATABASE_SELECT_WIREWATCH_ACCOUNTS_H
     22 #define MERCHANT_DATABASE_SELECT_WIREWATCH_ACCOUNTS_H
     23 
     24 #include <taler/taler_util.h>
     25 #include <taler/taler_json_lib.h>
     26 #include "merchantdb_lib.h"
     27 
     28 
     29 /**
     30  * Function called with information about a accounts
     31  * the wirewatcher should monitor.
     32  *
     33  * @param cls closure
     34  * @param instance instance that owns the account
     35  * @param payto_uri account URI
     36  * @param credit_facade_url URL for the credit facade
     37  * @param credit_facade_credentials account access credentials
     38  * @param last_serial last transaction serial (inclusive) we have seen from this account
     39  */
     40 typedef void
     41 (*TALER_MERCHANTDB_WirewatchWorkCallback)(
     42   void *cls,
     43   const char *instance,
     44   struct TALER_FullPayto payto_uri,
     45   const char *credit_facade_url,
     46   const json_t *credit_facade_credentials,
     47   uint64_t last_serial);
     48 
     49 /**
     50  * Select information about progress made by taler-merchant-wirewatch.
     51  *
     52  * @param pg database context
     53  * @param cb function to call with results
     54  * @param cb_cls closure for @a cb
     55  * @return transaction status
     56  */
     57 enum GNUNET_DB_QueryStatus
     58 TALER_MERCHANTDB_select_wirewatch_accounts (
     59   struct TALER_MERCHANTDB_PostgresContext *pg,
     60   TALER_MERCHANTDB_WirewatchWorkCallback cb,
     61   void *cb_cls);
     62 
     63 
     64 #endif