GnuCash  5.6-150-g038405b370+
gnc-state.h
Go to the documentation of this file.
1 /********************************************************************\
2  * gnc-state.h -- functions to manage gui state *
3  * Copyright (C) 1997 Robin D. Clark *
4  * Copyright (C) 1998 Linas Vepstas *
5  * Copyright (C) 1998 Rob Browning *
6  * Copyright (C) 2004 Derek Atkins <derek@ihtfp.com> *
7  * Copyright (C) 2013 Geert Janssens <geert@kobaltwit.be> *
8  * *
9  * This program is free software; you can redistribute it and/or *
10  * modify it under the terms of the GNU General Public License as *
11  * published by the Free Software Foundation; either version 2 of *
12  * the License, or (at your option) any later version. *
13  * *
14  * This program is distributed in the hope that it will be useful, *
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17  * GNU General Public License for more details. *
18  * *
19  * You should have received a copy of the GNU General Public License*
20  * along with this program; if not, write to the Free Software *
21  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
22  * *
23  * Author: Rob Clark *
24  * Internet: rclark@cs.hmc.edu *
25  * Address: 609 8th Street *
26  * Huntington Beach, CA 92648-4632 *
27 \********************************************************************/
28 
52 #ifndef GNC_STATE_H
53 #define GNC_STATE_H
54 
55 #include "qof.h"
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 /* Definitions shared by file-utils.c and gnc-main-window.c */
62 #define STATE_FILE_TOP "Top"
63 #define STATE_FILE_BOOK_GUID "BookGuid"
64 #define STATE_FILE_EXT ".gcm"
65 
75 GKeyFile *gnc_state_load (const QofSession *session);
76 
81 void gnc_state_save (const QofSession *session);
82 
90 GKeyFile *gnc_state_get_current (void);
91 
107 gint gnc_state_drop_sections_for (const gchar *partial_name);
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif /* GNC_STATE_H */
114 
void gnc_state_save(const QofSession *session)
Save the state to a state file on disk for the given session.
Definition: gnc-state.c:223
gint gnc_state_drop_sections_for(const gchar *partial_name)
Drop all sections from the state file whose name contains partial_name.
Definition: gnc-state.c:260
GKeyFile * gnc_state_get_current(void)
Returns a pointer to the most recently loaded state.
Definition: gnc-state.c:248
GKeyFile * gnc_state_load(const QofSession *session)
Load the state from a state file on disk for the given session.
Definition: gnc-state.c:202