sync_database_lib.h (2354B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2014-2017 Inria & GNUnet e.V. 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 include/sync/sync_database_lib.h 18 * @brief sync database library interface 19 */ 20 #ifndef SYNC_DB_LIB_H 21 #define SYNC_DB_LIB_H 22 23 #include <taler/taler_util.h> 24 #include <sync/sync-database/drop_tables.h> 25 #include <sync/sync-database/create_tables.h> 26 #include <sync/sync-database/preflight.h> 27 #include <sync/sync-database/gc.h> 28 #include <sync/sync-database/append_block_TR.h> 29 #include <sync/sync-database/delete_block_TR.h> 30 #include <sync/sync-database/update_block_TR.h> 31 #include <sync/sync-database/increment_lifetime_TR.h> 32 #include <sync/sync-database/lookup_block_range_TR.h> 33 #include <sync/sync-database/lookup_account_TR.h> 34 #include <sync/sync-database/lookup_block_TR.h> 35 #include <sync/sync-database/lookup_object.h> 36 #include <sync/sync-database/lookup_object_uid.h> 37 #include <sync/sync-database/lookup_pending_payments_by_account.h> 38 #include <sync/sync-database/store_payment_TR.h> 39 #include <sync/sync-database/store_object_TR.h> 40 41 /** 42 * Initialize the sync database subsystem. 43 * 44 * @param cfg configuration to use 45 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 46 */ 47 enum GNUNET_GenericReturnValue 48 SYNCDB_init ( 49 const struct GNUNET_CONFIGURATION_Handle *cfg); 50 51 52 /** 53 * Initialize the sync database subsystem for administration. 54 * Disables the check that the database schema is current. 55 * 56 * @param cfg configuration to use 57 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 58 */ 59 enum GNUNET_GenericReturnValue 60 SYNCDB_init_admin ( 61 const struct GNUNET_CONFIGURATION_Handle *cfg); 62 63 64 /** 65 * Shutdown the sync database subsystem. 66 */ 67 void 68 SYNCDB_fini (void); 69 70 71 #endif /* SYNC_DB_LIB_H */ 72 73 /* end of sync_database_lib.h */