GnuCash  5.6-150-g038405b370+
gnc-engine-guile.h
1 /********************************************************************\
2  * gnc-engine-guile.h -- engine helper functions for guile *
3  * Copyright (C) 2000 Linas Vepstas <linas@linas.org> *
4  * Copyright (C) 2001 Linux Developers Group, Inc. *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA gnu@gnu.org *
22  * *
23 \********************************************************************/
24 
25 #ifndef GNC_ENGINE_GUILE_H
26 #define GNC_ENGINE_GUILE_H
27 
28 #include <glib.h>
29 #include <libguile.h>
30 
31 #include "gnc-engine.h"
32 #include <gncTaxTable.h> /* for GncAccountValue */
33 #include "gnc-hooks.h"
34 
35 #ifdef __cplusplus
36 extern "C"
37 {
38 #endif
39 /* Helpers for various conversions to and from guile */
40 
41 GDate gnc_time64_to_GDate(SCM x);
42 
43 SCM gnc_guid2scm(GncGUID guid);
44 
45 GncGUID gnc_scm2guid(SCM guid_scm);
46 
47 int gnc_guid_p(SCM guid_scm);
48 
49 /* for a list of strings */
50 GSList* gnc_query_scm2path(SCM path_scm);
51 
52 /* These two functions convert a query object into a scheme
53  * representation of the query and vice-versa. They do not
54  * simply convert a query pointer to a guile query pointer! */
55 SCM gnc_query2scm(QofQuery* q);
56 
57 QofQuery* gnc_scm2query(SCM query_scm);
58 
59 SCM gnc_numeric_to_scm(gnc_numeric arg);
60 
61 gnc_numeric gnc_scm_to_numeric(SCM arg);
62 
63 gnc_commodity* gnc_scm_to_commodity(SCM scm);
64 
65 SCM gnc_commodity_to_scm(const gnc_commodity* commodity);
66 
67 SCM gnc_book_to_scm(const QofBook* book);
68 
69 /* Conversion routines used with tax tables */
70 GncAccountValue* gnc_scm_to_account_value_ptr(SCM valuearg);
71 
72 SCM gnc_account_value_ptr_to_scm(GncAccountValue*);
73 
77 void gnc_hook_add_scm_dangler(const gchar* name, SCM proc);
78 
87 time64 gnc_parse_time_to_time64(const gchar* s, const gchar* format);
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 #endif
Tax Table programming interface.
All type declarations for the whole Gnucash engine.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition: gnc-date.h:87
The type used to store guids in C.
Definition: guid.h:75
A Query.
Definition: qofquery.cpp:74