sync_database_lib.h (2409B)
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_block_hashes_TR.h> 34 #include <sync/sync-database/lookup_account_TR.h> 35 #include <sync/sync-database/lookup_block_TR.h> 36 #include <sync/sync-database/lookup_object.h> 37 #include <sync/sync-database/lookup_object_uid.h> 38 #include <sync/sync-database/lookup_pending_payments_by_account.h> 39 #include <sync/sync-database/store_payment_TR.h> 40 #include <sync/sync-database/store_object_TR.h> 41 42 /** 43 * Initialize the sync database subsystem. 44 * 45 * @param cfg configuration to use 46 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 47 */ 48 enum GNUNET_GenericReturnValue 49 SYNCDB_init ( 50 const struct GNUNET_CONFIGURATION_Handle *cfg); 51 52 53 /** 54 * Initialize the sync database subsystem for administration. 55 * Disables the check that the database schema is current. 56 * 57 * @param cfg configuration to use 58 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 59 */ 60 enum GNUNET_GenericReturnValue 61 SYNCDB_init_admin ( 62 const struct GNUNET_CONFIGURATION_Handle *cfg); 63 64 65 /** 66 * Shutdown the sync database subsystem. 67 */ 68 void 69 SYNCDB_fini (void); 70 71 72 #endif /* SYNC_DB_LIB_H */ 73 74 /* end of sync_database_lib.h */