GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Files | Data Structures

Files

file  qofbackend-p.h
 private api for data storage backend
 
file  qofobject-p.h
 the Core Object Registration/Lookup Private Interface
 

Data Structures

struct  QofBackendProvider_s
 
struct  QofBackend_s
 

Backend_Private

Pseudo-object defining how the engine can interact with different back-ends (which may be SQL databases, or network interfaces to remote QOF servers. File-io is just one type of backend).

The callbacks will be called at the appropriate times during a book session to allow the backend to store the data as needed.

enum  QofBackendLoadType { LOAD_TYPE_INITIAL_LOAD, LOAD_TYPE_LOAD_ALL }
 
void qof_backend_register_provider (QofBackendProvider *)
 
void qof_backend_set_message (QofBackend *be, const char *format,...)
 
char * qof_backend_get_message (QofBackend *be)
 
void qof_backend_init (QofBackend *be)
 
void qof_backend_destroy (QofBackend *be)
 
gchar qof_book_get_open_marker (const QofBook *book)
 
gint32 qof_book_get_version (const QofBook *book)
 
void qof_book_set_version (QofBook *book, gint32 version)
 

Book_Private

void qof_book_set_backend (QofBook *book, QofBackend *be)
 
gboolean qof_book_register (void)
 
gchar * qof_book_validate_counter_format_internal (const gchar *p, const gchar *gint64_format)
 
void qof_book_print_dirty (const QofBook *book)
 
#define qof_book_set_guid(book, guid)   qof_instance_set_guid(QOF_INSTANCE(book), guid)
 

Class_Private

void qof_class_init (void)
 
void qof_class_shutdown (void)
 
QofSortFunc qof_class_get_default_sort (QofIdTypeConst obj_name)
 

Entity_Private

void qof_collection_insert_entity (QofCollection *, QofInstance *)
 
void qof_collection_mark_clean (QofCollection *)
 
void qof_collection_mark_dirty (QofCollection *)
 
void qof_collection_print_dirty (const QofCollection *col, gpointer dummy)
 

Objects_Private

void qof_object_book_begin (QofBook *book)
 
void qof_object_book_end (QofBook *book)
 
gboolean qof_object_is_dirty (const QofBook *book)
 
void qof_object_mark_clean (QofBook *book)
 
gboolean qof_object_compliance (QofIdTypeConst type_name, gboolean warn)
 check an object can be created and supports iteration More...
 

Detailed Description

Private interfaces, not meant to be used by applications.

Macro Definition Documentation

#define qof_book_set_guid (   book,
  guid 
)    qof_instance_set_guid(QOF_INSTANCE(book), guid)
Deprecated:
use qof_instance_set_guid instead but only in backends (when reading the GncGUID from the data source).

Definition at line 66 of file qofbook-p.h.

Function Documentation

char* qof_backend_get_message ( QofBackend be)

The qof_backend_get_message() pops the error message string from the Backend. This string should be freed with g_free().

void qof_backend_register_provider ( QofBackendProvider )

Let the sytem know about a new provider of backends. This function is typically called by the provider library at library load time. This function allows the backend library to tell the QOF infrastructure that it can handle URL's of a certain type. Note that a single backend library may register more than one provider, if it is capable of handling more than one URL access method.

void qof_backend_set_message ( QofBackend be,
const char *  format,
  ... 
)

The qof_backend_set_message() assigns a string to the backend error message.

gchar qof_book_get_open_marker ( const QofBook book)

Allow backends to see if the book is open

Returns
'y' if book is open, otherwise 'n'.
gint32 qof_book_get_version ( const QofBook book)

get the book version

used for tracking multiuser updates in backends.

Returns
-1 if no book exists, 0 if the book is new, otherwise the book version number.
void qof_book_print_dirty ( const QofBook book)

This debugging function can be used to traverse the book structure and all subsidiary structures, printing out which structures have been marked dirty.

gchar* qof_book_validate_counter_format_internal ( const gchar *  p,
const gchar *  gint64_format 
)

Validate a counter format string with the given G_GINT64_FORMAT. Returns an error message if the format string was invalid, or NULL if it is ok. The caller should free the error message with g_free.

void qof_collection_insert_entity ( QofCollection *  ,
QofInstance  
)

Take entity, remove it from whatever collection its currently in, and place it in a new collection. To be used only for moving entity from one book to another.

void qof_collection_mark_clean ( QofCollection *  )

reset value of dirty flag

void qof_object_book_begin ( QofBook book)

To be called from within the book

gboolean qof_object_compliance ( QofIdTypeConst  type_name,
gboolean  warn 
)

check an object can be created and supports iteration

Parameters
type_nameobject to check
warnIf called only once per operation, pass TRUE to log objects that fail the compliance check. To prevent repeated log messages when calling more than once, pass FALSE.
Returns
TRUE if object can be created and supports iteration, else FALSE.