QOF
0.7.5
|
Encapsulate a connection to a storage backend. More...
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <glib.h>
#include <libintl.h>
#include "qof.h"
#include "qoferror-p.h"
#include "qofbackend-p.h"
#include "qofbook-p.h"
#include "qofsession-p.h"
#include "qofobject-p.h"
Go to the source code of this file.
Macros | |
#define | _(String) dgettext (GETTEXT_PACKAGE, String) |
Typedefs | |
typedef struct qof_entity_copy_data | QofEntityCopyData |
Functions | |
void | qof_backend_register_provider (QofBackendProvider *prov) |
void | qof_session_add_close_hook (GFunc fn, gpointer data) |
void | qof_session_call_close_hooks (QofSession *session) |
static void | qof_session_init (QofSession *session) |
QofSession * | qof_session_new (void) |
QofBook * | qof_session_get_book (QofSession *session) |
void | qof_session_add_book (QofSession *session, QofBook *addbook) |
QofBackend * | qof_session_get_backend (QofSession *session) |
const gchar * | qof_session_get_file_path (QofSession *session) |
const gchar * | qof_session_get_url (QofSession *session) |
static void | qof_book_set_partial (QofBook *book) |
void | qof_session_update_reference_list (QofSession *session, QofEntityReference *reference) |
Adds a new reference to the partial book data hash. More... | |
static void | qof_entity_param_cb (QofParam *param, gpointer data) |
static void | col_ref_cb (QofEntity *ref_ent, gpointer user_data) |
static void | qof_entity_foreach_copy (gpointer data, gpointer user_data) |
static gboolean | qof_entity_guid_match (QofSession *new_session, QofEntity *original) |
static void | qof_entity_list_foreach (gpointer data, gpointer user_data) |
static void | qof_entity_coll_foreach (QofEntity *original, gpointer user_data) |
static void | qof_entity_coll_copy (QofEntity *original, gpointer user_data) |
gboolean | qof_entity_copy_to_session (QofSession *new_session, QofEntity *original) |
Copy a single QofEntity to another session. More... | |
gboolean | qof_entity_copy_list (QofSession *new_session, GList *entity_list) |
Copy a GList of entities to another session. More... | |
gboolean | qof_entity_copy_coll (QofSession *new_session, QofCollection *entity_coll) |
Copy a QofCollection of entities. More... | |
static void | recurse_collection_cb (QofEntity *ent, gpointer user_data) |
static void | recurse_ent_cb (QofEntity *ent, gpointer user_data) |
gboolean | qof_entity_copy_coll_r (QofSession *new_session, QofCollection *coll) |
Recursively copy a collection of entities to a session. More... | |
gboolean | qof_entity_copy_one_r (QofSession *new_session, QofEntity *ent) |
Recursively copy a single entity to a new session. More... | |
static void | qof_session_load_backend (QofSession *session, gchar *access_method) |
static void | qof_session_destroy_backend (QofSession *session) |
void | qof_session_begin (QofSession *session, const gchar *book_id, gboolean ignore_lock, gboolean create_if_nonexistent) |
void | qof_session_load (QofSession *session, QofPercentageFunc percentage_func) |
gboolean | qof_session_save_may_clobber_data (QofSession *session) |
void | qof_session_save (QofSession *session, QofPercentageFunc percentage_func) |
void | qof_session_end (QofSession *session) |
void | qof_session_destroy (QofSession *session) |
void | qof_session_swap_data (QofSession *session_1, QofSession *session_2) |
gboolean | qof_session_events_pending (QofSession *session) |
gboolean | qof_session_process_events (QofSession *session) |
Variables | |
static GHookList * | session_closed_hooks = NULL |
static QofLogModule | log_module = "qof-session" |
static GSList * | provider_list = NULL |
struct backend_providers | backend_list [] |
Encapsulate a connection to a storage backend.
HISTORY: Created by Linas Vepstas December 1998
Definition in file qofsession.c.
|
static |
< secondary collections are used for one-to-many references between entities and are implemented using QofCollection. These are NOT the same as the main collections in the QofBook. -# Each QofCollection contains one or many entities - all of a single type. -# The entity type within the collection can be determined at run time. -# Easy conversions to GList or whatever in the param_setfcn handler. -# Each parameter can have its own collection. -# Each entity can have a different type of collection to its siblings, provided that it is acceptable to the set function. -# Each object decides which types are acceptable for which parameter in the set functions. This is then part of the API for that object. QOF_TYPE_COLLECT has two functions, both related to one-to-many links: - Represent a reference between 2 entities with a list of acceptable types. (one object linked to many types of single entities) - Represent a reference between one entity and many entities of another type. (one object linked to many entities of a single type.) If the set function can handle it, it could also be used for true one-to-many links: one object linked to many entities of many types. n.b. Always subject to each collection holding only one type at runtime. (otherwise use books).
Definition at line 299 of file qofsession.c.
|
static |
< secondary collections are used for one-to-many references between entities and are implemented using QofCollection. These are NOT the same as the main collections in the QofBook. -# Each QofCollection contains one or many entities - all of a single type. -# The entity type within the collection can be determined at run time. -# Easy conversions to GList or whatever in the param_setfcn handler. -# Each parameter can have its own collection. -# Each entity can have a different type of collection to its siblings, provided that it is acceptable to the set function. -# Each object decides which types are acceptable for which parameter in the set functions. This is then part of the API for that object. QOF_TYPE_COLLECT has two functions, both related to one-to-many links: - Represent a reference between 2 entities with a list of acceptable types. (one object linked to many types of single entities) - Represent a reference between one entity and many entities of another type. (one object linked to many entities of a single type.) If the set function can handle it, it could also be used for true one-to-many links: one object linked to many entities of many types. n.b. Always subject to each collection holding only one type at runtime. (otherwise use books).
Definition at line 766 of file qofsession.c.
struct backend_providers backend_list[] |
Definition at line 953 of file qofsession.c.