GnuCash
2.6.99
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
libqof
qof
qofsession-p.h
1
/********************************************************************\
2
* qofsession-p.h -- private functions for QOF sessions. *
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
[email protected]
*
20
* *
21
\********************************************************************/
22
23
/*
24
* HISTORY:
25
* Copyright (c) 2001 Linux Developers Group
26
* Copyright (c) 1998-2003 Linas Vepstas <
[email protected]
>
27
*/
28
29
#ifndef QOF_SESSION_P_H
30
#define QOF_SESSION_P_H
31
32
#include "
qofbook.h
"
33
#include "
qofsession.h
"
34
35
struct
_QofSession
36
{
37
/* This is just a "fake" entry point to allow me to pass a Session as
38
* an Entity. NOTE: THIS IS NOT AN ENTITY! THE ONLY PART OF ENTITY
39
* THAT IS VALID IS E_TYPE!
40
*/
41
QofInstance
entity;
42
43
/* A book holds pointers to the various types of datasets.
44
* A session has exactly one book. */
45
QofBook
*book;
46
47
/* The requested book id, in the form or a URI, such as
48
* file:/some/where, or sql:server.host.com:555
49
*/
50
char
*book_id;
51
52
/* If any book subroutine failed, this records the failure reason
53
* (file not found, etc).
54
* This is a 'stack' that is one deep. (Should be deeper ??)
55
* FIXME: Each backend has its own error stack. The session
56
* and the backends should all be using (or making it look like)
57
* there is only one stack.
58
*/
59
QofBackendError
last_err;
60
char
*error_message;
61
62
/* ---------------------------------------------------- */
63
/* Pointer to the backend that is actually used to move data
64
* between the persistant store and the local engine. */
65
QofBackend
*backend;
66
gint lock;
67
};
68
69
typedef
struct
qof_instance_copy_data
70
{
71
QofInstance
*from;
72
QofInstance
*to;
73
QofParam
*param;
74
GList *referenceList;
75
GSList *param_list;
76
QofSession
*new_session;
77
gboolean error;
78
}
QofInstanceCopyData
;
79
80
#ifdef __cplusplus
81
extern
"C"
82
{
83
#endif
84
85
QofBackend
* qof_session_get_backend (
const
QofSession
*session);
86
87
void
qof_session_push_error (
QofSession
*session,
QofBackendError
err,
88
const
char
*message);
89
#ifdef __cplusplus
90
}
91
#endif
92
93
#endif
qofsession.h
Encapsulates a connection to a backend (persistent store)
QofInstance_s
Definition:
qofinstance.h:65
_QofParam
Definition:
qofclass.h:211
QofBackendError
QofBackendError
The errors that can be reported to the GUI & other front-end users.
Definition:
qofbackend.h:59
_QofSession
Definition:
qofsession-p.h:35
qof_instance_copy_data
Definition:
qofsession-p.h:69
qofbook.h
Encapsulate all the information about a dataset.
_QofBook
Definition:
qofbook.h:78
QofBackend_s
Definition:
qofbackend-p.h:284
Generated by
1.8.6