Branch data Line data Source code
1 : : /********************************************************************
2 : : * gnc-recurrence-sql.h: load and save data to SQL *
3 : : * *
4 : : * This program is free software; you can redistribute it and/or *
5 : : * modify it under the terms of the GNU General Public License as *
6 : : * published by the Free Software Foundation; either version 2 of *
7 : : * the License, or (at your option) any later version. *
8 : : * *
9 : : * This program is distributed in the hope that it will be useful, *
10 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 : : * GNU General Public License for more details. *
13 : : * *
14 : : * You should have received a copy of the GNU General Public License*
15 : : * along with this program; if not, contact: *
16 : : * *
17 : : * Free Software Foundation Voice: +1-617-542-5942 *
18 : : * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19 : : * Boston, MA 02110-1301, USA gnu@gnu.org *
20 : : \********************************************************************/
21 : : /** @file gnc-recurrence-sql.h
22 : : * @brief load and save accounts data to SQL
23 : : * @author Copyright (c) 2006-2008 Phil Longstaff <plongstaff@rogers.com>
24 : : *
25 : : * This file implements the top-level QofBackend API for saving/
26 : : * restoring data to/from an SQL database
27 : : */
28 : :
29 : : #ifndef GNC_RECURRENCE_SQL_H
30 : : #define GNC_RECURRENCE_SQL_H
31 : :
32 : : #include <glib.h>
33 : :
34 : : #include "Recurrence.h"
35 : : #include "guid.h"
36 : : #include "gnc-sql-object-backend.hpp"
37 : :
38 : : class GncSqlRecurrenceBackend : public GncSqlObjectBackend
39 : : {
40 : : public:
41 : : GncSqlRecurrenceBackend();
42 : 0 : void load_all(GncSqlBackend*) override { return; }
43 : : void create_tables(GncSqlBackend*) override;
44 : 0 : bool commit(GncSqlBackend*, QofInstance*) override { return false; }
45 : : };
46 : :
47 : : gboolean gnc_sql_recurrence_save (GncSqlBackend* sql_be, const GncGUID* guid,
48 : : const Recurrence* pRecurrence);
49 : : void gnc_sql_recurrence_save_list (GncSqlBackend* sql_be, const GncGUID* guid,
50 : : GList* schedule);
51 : : gboolean gnc_sql_recurrence_delete (GncSqlBackend* sql_be, const GncGUID* guid);
52 : : Recurrence* gnc_sql_recurrence_load (GncSqlBackend* sql_be, const GncGUID* guid);
53 : : GList* gnc_sql_recurrence_load_list (GncSqlBackend* sql_be, const GncGUID* guid);
54 : :
55 : : #endif /* GNC_RECURRENCE_SQL_H */
|