GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
engine-helpers-guile.h
1 /********************************************************************\
2  * engine-helpers.h -- gnucash engine helper functions *
3  * Copyright (C) 2000 Linas Vepstas <[email protected]> *
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 [email protected] *
22  * *
23 \********************************************************************/
24 
25 #ifndef ENGINE_HELPERS_GUILE_H
26 #define ENGINE_HELPERS_GUILE_H
27 
28 #include <glib.h>
29 #include <libguile.h>
30 
31 #include "gnc-engine.h"
32 
33 /* Helpers for various conversions to and from guile */
34 
35 SCM gnc_timespec2timepair(Timespec t);
36 Timespec gnc_timepair2timespec(SCM x);
37 GDate gnc_timepair_to_GDate(SCM x);
38 int gnc_timepair_p(SCM x);
39 
40 SCM gnc_guid2scm(GncGUID guid);
41 GncGUID gnc_scm2guid(SCM guid_scm);
42 int gnc_guid_p(SCM guid_scm);
43 
44 /* for a list of strings */
45 GSList * gnc_query_scm2path (SCM path_scm);
46 
47 /* These two functions convert a query object into a scheme
48  * representation of the query and vice-versa. They do not
49  * simply convert a query pointer to a guile query pointer! */
50 SCM gnc_query2scm (QofQuery * q);
51 QofQuery * gnc_scm2query (SCM query_scm);
52 
53 int gnc_gh_gint64_p(SCM num);
54 
55 SCM gnc_numeric_to_scm(gnc_numeric arg);
56 gnc_numeric gnc_scm_to_numeric(SCM arg);
57 int gnc_numeric_p(SCM arg);
58 gnc_commodity * gnc_scm_to_commodity(SCM scm);
59 SCM gnc_commodity_to_scm (const gnc_commodity *commodity);
60 SCM gnc_book_to_scm (const QofBook *book);
61 
62 #endif
Use a 64-bit unsigned int timespec.
Definition: gnc-date.h:299
struct _QofQuery QofQuery
Definition: qofquery.h:90
Definition: guid.h:65
All type declarations for the whole Gnucash engine.