Data Structures | |
| struct | QofAddress |
| Example of QOF wrapping an existing object. More... | |
Files | |
| file | qof-address.c |
QOF address definitions for pilot-link. | |
| file | qof-address.h |
QOF address definitions for pilot-link. | |
Defines | |
| #define | QOF_ADDRESS_DESC "Pilot-link QOF address" |
| #define | ADDRESS_VERSION address_v1 |
| #define | PQ_MOD_ADDRESS "pilotqof-address" |
| #define | PILOT_LINK_QOF_ADDRESS "pilot_address" |
| #define | ADDR_LAST_NAME "entryLastname" |
| #define | ADDR_FIRST_NAME "entryFirstname" |
| #define | ADDR_COMPANY "entryCompany" |
| #define | ADDR_PHONE_ONE "entryPhone1" |
| #define | ADDR_PHONE_TWO "entryPhone2" |
| #define | ADDR_PHONE_THREE "entryPhone3" |
| #define | ADDR_PHONE_FOUR "entryPhone4" |
| #define | ADDR_PHONE_FIVE "entryPhone5" |
| #define | ADDR_ADDRESS "entryAddress" |
| #define | ADDR_CITY "entryCity" |
| #define | ADDR_STATE "entryState" |
| #define | ADDR_ZIP "entryZip" |
| #define | ADDR_COUNTRY "entryCountry" |
| #define | ADDR_TITLE "entryTitle" |
| #define | ADDR_CUSTOM_ONE "entryCustom1" |
| #define | ADDR_CUSTOM_TWO "entryCustom2" |
| #define | ADDR_CUSTOM_THREE "entryCustom3" |
| #define | ADDR_CUSTOM_FOUR "entryCustom4" |
| #define | ADDR_NOTE "entryNote" |
| #define | ADDR_CATEGORY "category" |
Functions | |
| static QofAddress * | address_create (QofBook *book) |
| create a new address | |
| Address_t * | address_get_pilot (QofInstance *inst) |
| 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. | |
Variables | |
| static G_GNUC_UNUSED QofLogModule | log_module = "pilotqof-objects" |
| static QofObject | address_object_def |
Addresses is probably the easiest QOF object to understand - all the entries are simple strings. QOF does provide a cache that could be used here but until pilot-qof has an interactive shell, creating and then populating the cache is considered not worthwhile.
| #define ADDR_LAST_NAME "entryLastname" |
Hack alert: Because these are strings (for QOF), the macros CANNOT be used directly in the enum!
Definition at line 46 of file qof-address.h.
| static QofAddress* address_create | ( | QofBook * | book | ) | [static] |
create a new address
Hack alert: This routine specifically sets a blank value in entry[18] - using g_new0() externally is not the same.
Definition at line 61 of file qof-address.c.
{
Address_t *qa;
QofAddress *obj;
QofCollection *coll;
GList *all;
obj = g_new0 (QofAddress, 1);
qof_instance_init (&obj->inst, PILOT_LINK_QOF_ADDRESS, book);
coll = qof_book_get_collection (book, PILOT_LINK_QOF_ADDRESS);
all = qof_collection_get_data (coll);
all = g_list_prepend (all, obj);
qof_collection_set_data (coll, all);
qa = &obj->wrap;
qa->entry[18] = strdup ("");
return obj;
}
| gboolean AddressRegister | ( | void | ) |
Extended for pilot-link.
Uses the standard QOF registration but adds a pilot_pack registration that tells QOF how to deal with the pilot-link objects contained within the QOF objects.
QofObject address_object_def [static] |
{
interface_version:QOF_OBJECT_VERSION,
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 527 of file qof-address.c.
1.7.1