GnuCash 2.4.99
gnc-backend-xml.h
Go to the documentation of this file.
00001 /********************************************************************
00002  * gnc-backend-xml.h: load and save data to XML files               *
00003  *                                                                  *
00004  * This program is free software; you can redistribute it and/or    *
00005  * modify it under the terms of the GNU General Public License as   *
00006  * published by the Free Software Foundation; either version 2 of   *
00007  * the License, or (at your option) any later version.              *
00008  *                                                                  *
00009  * This program is distributed in the hope that it will be useful,  *
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00012  * GNU General Public License for more details.                     *
00013  *                                                                  *
00014  * You should have received a copy of the GNU General Public License*
00015  * along with this program; if not, contact:                        *
00016  *                                                                  *
00017  * Free Software Foundation           Voice:  +1-617-542-5942       *
00018  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
00019  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
00020 \********************************************************************/
00031 #ifndef GNC_BACKEND_XML_H_
00032 #define GNC_BACKEND_XML_H_
00033 
00034 #include "qof.h"
00035 #include <gmodule.h>
00036 
00037 #include "qofbackend-p.h"
00038 
00039 typedef enum
00040 {
00041     XML_RETAIN_NONE,
00042     XML_RETAIN_DAYS,
00043     XML_RETAIN_ALL
00044 } XMLFileRetentionType;
00045 
00046 typedef enum
00047 {
00048     GNC_BOOK_NOT_OURS,
00049     GNC_BOOK_BIN_FILE,
00050     GNC_BOOK_XML1_FILE,
00051     GNC_BOOK_XML2_FILE,
00052     GNC_BOOK_XML2_FILE_NO_ENCODING,
00053     GNC_BOOK_POST_XML2_0_0_FILE
00054 } QofBookFileType;
00055 
00056 struct FileBackend_struct
00057 {
00058     QofBackend be;
00059 
00060     char *dirname;
00061     char *fullpath;  /* Fully qualified path to book */
00062     char *lockfile;
00063     char *linkfile;
00064     int lockfd;
00065 
00066     QofBook *book;  /* The primary, main open book */
00067 
00068     XMLFileRetentionType file_retention_type;
00069     int file_retention_days;
00070     gboolean file_compression;
00071 };
00072 
00073 typedef struct FileBackend_struct FileBackend;
00074 
00075 // This is now a static inside the module
00076 //QofBackend * libgncmod_backend_file_LTX_gnc_backend_new(void);
00077 
00080 void gnc_module_init_backend_xml(void);
00081 
00082 #ifndef GNC_NO_LOADABLE_MODULES
00083 
00087 G_MODULE_EXPORT
00088 void qof_backend_module_init(void);
00089 #endif
00090 
00091 #endif /* GNC_BACKEND_XML_H_ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines