Definition in file qof-address.c.
#include <glib.h>
#include <glib/gprintf.h>
#include <qof.h>
#include "pi-address.h"
#include "qof-address.h"
#include "qof-main.h"
#include "pilot-qof.h"
Go to the source code of this file.
Data Structures | |
struct | QofAddress |
Example of QOF wrapping an existing object. More... | |
Defines | |
#define | ADDRESS_VERSION address_v1 |
#define | QOF_ADDRESS_DESC "Pilot-link QOF address" |
Functions | |
static QofAddress * | address_create (QofBook *book) |
create a new address | |
static gchar * | addr_getLastname (QofAddress *a) |
static gchar * | addr_getFirstname (QofAddress *a) |
static gchar * | addr_getCompany (QofAddress *a) |
static gchar * | addr_getPhoneOne (QofAddress *a) |
static gchar * | addr_getPhoneTwo (QofAddress *a) |
static gchar * | addr_getPhoneThree (QofAddress *a) |
static gchar * | addr_getPhoneFour (QofAddress *a) |
static gchar * | addr_getPhoneFive (QofAddress *a) |
static gchar * | addr_getCity (QofAddress *a) |
static gchar * | addr_getState (QofAddress *a) |
static gchar * | addr_getZip (QofAddress *a) |
static gchar * | addr_getCountry (QofAddress *a) |
static gchar * | addr_getTitle (QofAddress *a) |
static gchar * | addr_getAddress (QofAddress *a) |
static gchar * | addr_getCustomOne (QofAddress *a) |
static gchar * | addr_getCustomTwo (QofAddress *a) |
static gchar * | addr_getCustomThree (QofAddress *a) |
static gchar * | addr_getCustomFour (QofAddress *a) |
static gchar * | addr_getNote (QofAddress *a) |
static gchar * | addr_getCategory (QofAddress *a) |
static void | addr_setLastname (QofAddress *a, gchar *h) |
static void | addr_setFirstname (QofAddress *a, gchar *h) |
static void | addr_setCompany (QofAddress *a, gchar *h) |
static void | addr_setPhoneOne (QofAddress *a, gchar *h) |
static void | addr_setPhoneTwo (QofAddress *a, gchar *h) |
static void | addr_setPhoneThree (QofAddress *a, gchar *h) |
static void | addr_setPhoneFour (QofAddress *a, gchar *h) |
static void | addr_setPhoneFive (QofAddress *a, gchar *h) |
static void | addr_setAddress (QofAddress *a, gchar *h) |
static void | addr_setCity (QofAddress *a, gchar *h) |
static void | addr_setState (QofAddress *a, gchar *h) |
static void | addr_setZip (QofAddress *a, gchar *h) |
static void | addr_setCountry (QofAddress *a, gchar *h) |
static void | addr_setTitle (QofAddress *a, gchar *h) |
static void | addr_setCustomOne (QofAddress *a, gchar *h) |
static void | addr_setCustomTwo (QofAddress *a, gchar *h) |
static void | addr_setCustomThree (QofAddress *a, gchar *h) |
static void | addr_setCustomFour (QofAddress *a, gchar *h) |
static void | addr_setNote (QofAddress *a, gchar *h) |
static void | addr_setCategory (QofAddress *a, gchar *h) |
static const gchar * | addressPrintable (gpointer instance) |
gboolean | AddressRegister (void) |
Extended for pilot-link. | |
Packing and unpacking objects. | |
Each pilot-link object has a structure that reflects the relevant database on the Palm in a binary form that can be easily manipulated. This binary format needs to be converted (packed) before it can be understood by the Palm and converted back (unpacked) before to be usable in pilot-qof. Each object therefore needs to be packed (prior to writing to the Palm) and unpacked (after reading from the Palm) using it's own specialised functions. QOF uses a generic function pointer to call the correct function for the current QOF object and this function then calls the correct pack or unpack function for the underlying pilot-link object. | |
static gint | address_pack (QofEntity *ent, gpointer user_data) |
Pack an Address object for the Palm. | |
static gint | address_unpack (QofEntity *ent, gpointer user_data) |
Unpack and Address object from the Palm. | |
static gint | addr_appinfo_unpack (QofEntity *ent, gpointer user_data) |
unpack the application information from the Palm database. | |
static gint | qof_address_free (QofEntity *ent, gpointer user_data) |
free the memory associated with the pilot-link object. | |
Variables | |
static QofLogModule | log_module = "pilotqof-objects" |
static QofObject | address_object_def |
static PQPack | address_pack_def |
QofObject address_object_def [static] |
Initial value:
{ interface_version: 3 , e_type: "pilot_address" , type_label: "Pilot-link QOF address" , create:(gpointer) address_create, book_begin:NULL, book_end:NULL, is_dirty:qof_collection_is_dirty, mark_clean:qof_collection_mark_clean, foreach:qof_collection_foreach, printable:addressPrintable, version_cmp:(gint (*)(gpointer, gpointer)) qof_instance_version_cmp, }
Definition at line 639 of file qof-address.c.
Referenced by AddressRegister().
PQPack address_pack_def [static] |
Initial value:
{ e_type: "pilot_address" , pack_func:address_pack, unpack_func:address_unpack, free_pack_func:qof_address_free, palm_db_name:"AddressDB", app_info_unpack:addr_appinfo_unpack, }
Definition at line 653 of file qof-address.c.
Referenced by AddressRegister().