18 main (
int argc,
char *argv[])
21 char * fake_argv[] = {
"hello2", 0};
25 GList *split_list, *sl2, *node;
37 rc = gnc_book_begin (book,
"file:/tmp/demo.gnucash", FALSE);
40 int err = gnc_book_get_error (book);
41 printf (
"HTTP/1.1 500 Server Error\n");
43 printf (
"%d %s\n", err, strerror (err));
47 rc = gnc_book_load (book);
50 int err = gnc_book_get_error (book);
51 printf (
"HTTP/1.1 500 Server Error\n");
53 printf (
"%d %s\n", err, strerror (err));
58 root = gnc_book_get_root_account (book);
61 q = qof_query_create_for(GNC_ID_SPLIT);
62 xaccQuerySetGroup (q, root);
67 xaccQueryAddDateMatch (q, TRUE, 28, 2, 1982,
75 for (node = split_list; node; node = node->next)
81 gncxml_write_query_to_buf(q, &bufp, &sz);
82 qq = gncxml_read_query (bufp, sz);
84 xaccQuerySetGroup (qq, root);
89 for (node = sl2; node; node = node->next)
96 printf (
"HTTP/1.1 200 OK\n");
97 printf (
"Content-Type: text/xml\n");
98 printf (
"Content-Length: %d\n", sz);
103 printf (
" its %d and %d \n", i, ii);
void gnc_engine_shutdown(void)
QofBook * qof_book_new(void)
api for Version 1 XML-based file format
void qof_query_set_max_results(QofQuery *q, int n)
void qof_query_destroy(QofQuery *q)
void gnc_engine_init(int argc, char **argv)
All type declarations for the whole Gnucash engine.
GList * qof_query_run(QofQuery *query)
void qof_book_destroy(QofBook *book)