|
GnuCash 2.4.99
|
00001 /* 00002 * gnc-plugin-file-history.h -- 00003 * Copyright (C) 2003,2005 David Hampton <hampton@employees.org> 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License as 00007 * published by the Free Software Foundation; either version 2 of 00008 * the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, contact: 00017 * 00018 * Free Software Foundation Voice: +1-617-542-5942 00019 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 00020 * Boston, MA 02110-1301, USA gnu@gnu.org 00021 */ 00022 00035 #ifndef __GNC_PLUGIN_FILE_HISTORY_H 00036 #define __GNC_PLUGIN_FILE_HISTORY_H 00037 00038 #include "gnc-plugin.h" 00039 00040 G_BEGIN_DECLS 00041 00042 /* type macros */ 00043 #define GNC_TYPE_PLUGIN_FILE_HISTORY (gnc_plugin_file_history_get_type ()) 00044 #define GNC_PLUGIN_FILE_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_PLUGIN_FILE_HISTORY, GncPluginFileHistory)) 00045 #define GNC_PLUGIN_FILE_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN_FILE_HISTORY, GncPluginFileHistoryClass)) 00046 #define GNC_IS_PLUGIN_FILE_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_PLUGIN_FILE_HISTORY)) 00047 #define GNC_IS_PLUGIN_FILE_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN_FILE_HISTORY)) 00048 #define GNC_PLUGIN_FILE_HISTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_PLUGIN_FILE_HISTORY, GncPluginFileHistoryClass)) 00049 00050 #define GNC_PLUGIN_FILE_HISTORY_NAME "gnc-plugin-file-history" 00051 #define MAX_HISTORY_FILES 10 /* May be any number up to 10 */ 00052 #define HISTORY_STRING_SECTION "history" 00053 #define HISTORY_STRING_MAXFILES "maxfiles" 00054 #define HISTORY_STRING_FILE_N "file%d" 00055 00056 /* typedefs & structures */ 00057 00059 typedef struct 00060 { 00061 GncPlugin gnc_plugin; 00062 } GncPluginFileHistory; 00063 00064 00066 typedef struct 00067 { 00068 GncPluginClass gnc_plugin; 00069 } GncPluginFileHistoryClass; 00070 00071 /* function prototypes */ 00072 00073 00078 GType gnc_plugin_file_history_get_type (void); 00079 00080 00086 GncPlugin *gnc_plugin_file_history_new (void); 00087 00088 00096 void gnc_history_add_file (const char *filename); 00097 00103 void gnc_history_remove_file (const char *oldfile); 00104 00105 00114 char * gnc_history_get_last (void); 00115 00116 G_END_DECLS 00117 00118 #endif /* __GNC_PLUGIN_FILE_HISTORY_H */ 00119
1.7.4