31#include <glib/gi18n.h>
32#include <glib/gstdio.h>
58# define mktemp _mktemp
77#include <gnc-backend-prov.hpp>
79#include <qof-backend.hpp>
80#include "gnc-xml-backend.hpp"
81#include "gnc-xml-helper.h"
85#include "gnc-address-xml-v2.h"
86#include "gnc-bill-term-xml-v2.h"
87#include "gnc-customer-xml-v2.h"
88#include "gnc-employee-xml-v2.h"
89#include "gnc-entry-xml-v2.h"
90#include "gnc-invoice-xml-v2.h"
91#include "gnc-job-xml-v2.h"
92#include "gnc-order-xml-v2.h"
93#include "gnc-owner-xml-v2.h"
94#include "gnc-tax-table-xml-v2.h"
95#include "gnc-vendor-xml-v2.h"
97static QofLogModule log_module = GNC_MOD_BACKEND;
121 QofBookFileType xml_type;
130 t = g_fopen (filename,
"r");
138 rc = g_stat (filename, &sbuf);
144 if (sbuf.st_size == 0)
146 PINFO (
" empty file");
150 xml_type = gnc_is_xml_data_file_v2 (filename, NULL);
151 if ((xml_type == GNC_BOOK_XML2_FILE) ||
152 (xml_type == GNC_BOOK_XML1_FILE) ||
153 (xml_type == GNC_BOOK_POST_XML2_0_0_FILE))
158 PINFO (
" %s is not a gnc XML file", filename);
169business_core_xml_init (
void)
172 gnc_address_xml_initialize ();
173 gnc_billterm_xml_initialize ();
174 gnc_customer_xml_initialize ();
175 gnc_employee_xml_initialize ();
176 gnc_entry_xml_initialize ();
177 gnc_invoice_xml_initialize ();
178 gnc_job_xml_initialize ();
179 gnc_order_xml_initialize ();
180 gnc_owner_xml_initialize ();
181 gnc_taxtable_xml_initialize ();
182 gnc_vendor_xml_initialize ();
185#ifndef GNC_NO_LOADABLE_MODULES
187qof_backend_module_init (
void)
189 gnc_module_init_backend_xml ();
194gnc_module_init_backend_xml (
void)
196 const char* name {
"GnuCash File Backend Version 2"};
199 qof_backend_register_provider(std::move(prov));
201 qof_backend_register_provider(std::move(prov));
204 business_core_xml_init ();
load and save data to files
All type declarations for the whole Gnucash engine.
Generic api to store and retrieve preferences.
Utility functions for convert uri in separate components and back.
#define PINFO(format, args...)
Print an informational note.
gchar * gnc_uri_get_path(const gchar *uri)
Extracts the path part from a uri.
api for GnuCash version 2 XML-based file format
api for Version 1 XML-based file format
bool type_check(const char *type)
Distinguish two providers with same access method.
QofBackend * create_backend(void)
Return a new, fully initialized backend.