fakebank_common_lookup.h (1845B)
1 /* 2 This file is part of TALER 3 (C) 2016-2023 Taler Systems SA 4 5 TALER is free software; you can redistribute it and/or 6 modify it under the terms of the GNU General Public License 7 as published by the Free Software Foundation; either version 3, 8 or (at your option) any later version. 9 10 TALER is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public 16 License along with TALER; see the file COPYING. If not, 17 see <http://www.gnu.org/licenses/> 18 */ 19 /** 20 * @file bank-lib/fakebank_common_lookup.h 21 * @brief common helper functions related to lookups 22 * @author Christian Grothoff <christian@grothoff.org> 23 */ 24 25 #ifndef FAKEBANK_COMMON_LOOKUP_H 26 #define FAKEBANK_COMMON_LOOKUP_H 27 28 #include "taler/taler_fakebank_lib.h" 29 #include <gnunet/gnunet_mhd_compat.h> 30 #include "fakebank.h" 31 32 33 /** 34 * Lookup account with @a name, and if it does not exist, create it. 35 * 36 * @param[in,out] h bank to lookup account at 37 * @param name account name to resolve 38 * @param receiver_name receiver name in payto:// URI, 39 * NULL if the account must already exist 40 * @return account handle, NULL if account does not yet exist 41 */ 42 struct Account * 43 TALER_FAKEBANK_lookup_account_ ( 44 struct TALER_FAKEBANK_Handle *h, 45 const char *name, 46 const char *receiver_name); 47 48 49 /** 50 * Find withdrawal operation @a wopid in @a h. 51 * 52 * @param h fakebank handle 53 * @param wopid withdrawal operation ID as a string 54 * @return NULL if operation was not found 55 */ 56 struct WithdrawalOperation * 57 TALER_FAKEBANK_lookup_withdrawal_operation_ (struct TALER_FAKEBANK_Handle *h, 58 const char *wopid); 59 60 #endif