QOF: qofsession.h Source File

QOF 0.7.5

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

qofsession.h
Go to the documentation of this file.
1 /********************************************************************\
2 * qofsession.h -- session access (connection to backend) *
3 * *
4 * This program is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU General Public License as *
6 * published by the Free Software Foundation; either version 2 of *
7 * the License, or (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License*
15 * along with this program; if not, contact: *
16 * *
17 * Free Software Foundation Voice: +1-617-542-5942 *
18 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19 * Boston, MA 02110-1301, USA gnu@gnu.org *
20 * *
21 \********************************************************************/
22
101 #ifndef QOF_SESSION_H
102 #define QOF_SESSION_H
103
104 #include "qofbackend.h"
105 #include "qofbook.h"
106 #include "qofclass.h"
107 #include "qofobject.h"
108
109 #define QOF_MOD_SESSION "qof-session"
110
111 /* PROTOTYPES ******************************************************/
112
113 typedef struct _QofSession QofSession;
114
115 QofSession *qof_session_new (void);
116
117 void qof_session_destroy (QofSession * session);
118
122 void
123 qof_session_swap_data (QofSession * session_1, QofSession * session_2);
124
152 void qof_session_begin (QofSession * session, const gchar *book_id,
153 gboolean ignore_lock, gboolean create_if_nonexistent);
154
168 typedef void (*QofPercentageFunc) (const gchar *message, gdouble percent);
169 void qof_session_load (QofSession * session,
170 QofPercentageFunc percentage_func);
171
179 void
180 qof_session_add_book (QofSession * session, QofBook * book);
181
182 QofBook *
183 qof_session_get_book (QofSession * session);
184
199 const gchar *qof_session_get_file_path (QofSession * session);
200
201 const gchar *qof_session_get_url (QofSession * session);
202
207 gboolean qof_session_not_saved (QofSession * session);
208
210 gboolean qof_session_save_may_clobber_data (QofSession * session);
211
218 void qof_session_save (QofSession * session,
219 QofPercentageFunc percentage_func);
228 void qof_session_end (QofSession * session);
229
277 gboolean qof_entity_copy_to_session (QofSession * new_session,
278 QofEntity * original);
279
298 gboolean qof_entity_copy_list (QofSession * new_session, GList * entity_list);
299
313 gboolean qof_entity_copy_coll (QofSession * new_session,
314 QofCollection * entity_coll);
315
344 gboolean
345 qof_entity_copy_coll_r (QofSession * new_session, QofCollection * coll);
346
366 gboolean qof_entity_copy_one_r (QofSession * new_session, QofEntity * ent);
367
386 #define QOF_STDOUT "file:"
387
395 gboolean qof_session_events_pending (QofSession * session);
396
401 gboolean qof_session_process_events (QofSession * session);
410 void qof_session_add_close_hook (GFunc fn, gpointer data);
411
416 void qof_session_call_close_hooks (QofSession * session);
417
421 #endif /* QOF_SESSION_H */
qof_session_call_close_hooks
void qof_session_call_close_hooks(QofSession *session)
Definition: qofsession.c:89
qof_entity_copy_coll
gboolean qof_entity_copy_coll(QofSession *new_session, QofCollection *entity_coll)
Copy a QofCollection of entities.
Definition: qofsession.c:710
qofbackend.h
API for data storage Backend.
qof_entity_copy_one_r
gboolean qof_entity_copy_one_r(QofSession *new_session, QofEntity *ent)
Recursively copy a single entity to a new session.
Definition: qofsession.c:908
_QofSession
Definition: qofsession-p.h:35
qof_session_events_pending
gboolean qof_session_events_pending(QofSession *session)
Definition: qofsession.c:1492
qofobject.h
the Core Object Description Interface
QofEntity_s
Definition: qofid.h:147
qof_session_add_book
void qof_session_add_book(QofSession *session, QofBook *book)
Definition: qofsession.c:148
qof_session_process_events
gboolean qof_session_process_events(QofSession *session)
Definition: qofsession.c:1505
qof_session_swap_data
void qof_session_swap_data(QofSession *session_1, QofSession *session_2)
Definition: qofsession.c:1458
QofCollection
struct QofCollection_s QofCollection
Definition: qofid.h:138
QofPercentageFunc
void(* QofPercentageFunc)(const gchar *message, gdouble percent)
Definition: qofsession.h:168
qof_entity_copy_coll_r
gboolean qof_entity_copy_coll_r(QofSession *new_session, QofCollection *coll)
Recursively copy a collection of entities to a session.
Definition: qofsession.c:884
qof_session_save_may_clobber_data
gboolean qof_session_save_may_clobber_data(QofSession *session)
Definition: qofsession.c:1232
qof_session_begin
void qof_session_begin(QofSession *session, const gchar *book_id, gboolean ignore_lock, gboolean create_if_nonexistent)
Definition: qofsession.c:1057
qof_entity_copy_list
gboolean qof_entity_copy_list(QofSession *new_session, GList *entity_list)
Copy a GList of entities to another session.
Definition: qofsession.c:688
qof_session_get_file_path
const gchar * qof_session_get_file_path(QofSession *session)
Definition: qofsession.c:192
qof_entity_copy_to_session
gboolean qof_entity_copy_to_session(QofSession *new_session, QofEntity *original)
Copy a single QofEntity to another session.
Definition: qofsession.c:656
qof_session_not_saved
gboolean qof_session_not_saved(QofSession *session)
qofbook.h
Encapsulate all the information about a dataset.
qof_session_add_close_hook
void qof_session_add_close_hook(GFunc fn, gpointer data)
Definition: qofsession.c:69
qofclass.h
API for registering paramters on objects.
qof_session_save
void qof_session_save(QofSession *session, QofPercentageFunc percentage_func)
Definition: qofsession.c:1245
qof_session_end
void qof_session_end(QofSession *session)
Definition: qofsession.c:1399
_QofBook
Definition: qofbook-p.h:48