r18969 - gnucash/trunk/src - Rename the type GUID into GncGUID because on Windows, the system headers have a type GUID which clashes with ours.

Christian Stimming cstim at code.gnucash.org
Sat Mar 27 17:01:23 EDT 2010


Author: cstim
Date: 2010-03-27 17:01:21 -0400 (Sat, 27 Mar 2010)
New Revision: 18969
Trac: http://svn.gnucash.org/trac/changeset/18969

Modified:
   gnucash/trunk/src/app-utils/file-utils.c
   gnucash/trunk/src/app-utils/gnc-component-manager.c
   gnucash/trunk/src/app-utils/gnc-component-manager.h
   gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
   gnucash/trunk/src/app-utils/guile-util.c
   gnucash/trunk/src/app-utils/guile-util.h
   gnucash/trunk/src/backend/sql/gnc-account-sql.c
   gnucash/trunk/src/backend/sql/gnc-backend-sql.c
   gnucash/trunk/src/backend/sql/gnc-backend-sql.h
   gnucash/trunk/src/backend/sql/gnc-book-sql.c
   gnucash/trunk/src/backend/sql/gnc-budget-sql.c
   gnucash/trunk/src/backend/sql/gnc-commodity-sql.c
   gnucash/trunk/src/backend/sql/gnc-lots-sql.c
   gnucash/trunk/src/backend/sql/gnc-recurrence-sql.c
   gnucash/trunk/src/backend/sql/gnc-recurrence-sql.h
   gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c
   gnucash/trunk/src/backend/sql/gnc-slots-sql.c
   gnucash/trunk/src/backend/sql/gnc-slots-sql.h
   gnucash/trunk/src/backend/sql/gnc-transaction-sql.c
   gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-backend-xml.c
   gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-budget-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-lot-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-pricedb-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-schedxaction-xml-v2.c
   gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c
   gnucash/trunk/src/backend/xml/io-gncxml-v1.c
   gnucash/trunk/src/backend/xml/sixtp-dom-generators.c
   gnucash/trunk/src/backend/xml/sixtp-dom-generators.h
   gnucash/trunk/src/backend/xml/sixtp-dom-parsers.c
   gnucash/trunk/src/backend/xml/sixtp-dom-parsers.h
   gnucash/trunk/src/backend/xml/sixtp-utils.c
   gnucash/trunk/src/backend/xml/test/test-dom-converters1.c
   gnucash/trunk/src/backend/xml/test/test-file-stuff.c
   gnucash/trunk/src/backend/xml/test/test-file-stuff.h
   gnucash/trunk/src/backend/xml/test/test-xml-transaction.c
   gnucash/trunk/src/base-typemaps.i
   gnucash/trunk/src/business/business-core/business-core.i
   gnucash/trunk/src/business/business-core/gncBillTerm.h
   gnucash/trunk/src/business/business-core/gncCustomer.h
   gnucash/trunk/src/business/business-core/gncEmployee.h
   gnucash/trunk/src/business/business-core/gncEntry.h
   gnucash/trunk/src/business/business-core/gncEntryP.h
   gnucash/trunk/src/business/business-core/gncInvoice.c
   gnucash/trunk/src/business/business-core/gncInvoice.h
   gnucash/trunk/src/business/business-core/gncJob.h
   gnucash/trunk/src/business/business-core/gncOrder.h
   gnucash/trunk/src/business/business-core/gncOwner.c
   gnucash/trunk/src/business/business-core/gncOwner.h
   gnucash/trunk/src/business/business-core/gncTaxTable.h
   gnucash/trunk/src/business/business-core/gncVendor.h
   gnucash/trunk/src/business/business-core/sql/gnc-bill-term-sql.c
   gnucash/trunk/src/business/business-core/sql/gnc-customer-sql.c
   gnucash/trunk/src/business/business-core/sql/gnc-employee-sql.c
   gnucash/trunk/src/business/business-core/sql/gnc-entry-sql.c
   gnucash/trunk/src/business/business-core/sql/gnc-invoice-sql.c
   gnucash/trunk/src/business/business-core/sql/gnc-job-sql.c
   gnucash/trunk/src/business/business-core/sql/gnc-order-sql.c
   gnucash/trunk/src/business/business-core/sql/gnc-owner-sql.c
   gnucash/trunk/src/business/business-core/sql/gnc-tax-table-sql.c
   gnucash/trunk/src/business/business-core/sql/gnc-vendor-sql.c
   gnucash/trunk/src/business/business-core/test/test-customer.c
   gnucash/trunk/src/business/business-core/test/test-employee.c
   gnucash/trunk/src/business/business-core/test/test-job.c
   gnucash/trunk/src/business/business-core/test/test-vendor.c
   gnucash/trunk/src/business/business-core/xml/gnc-bill-term-xml-v2.c
   gnucash/trunk/src/business/business-core/xml/gnc-bill-term-xml-v2.h
   gnucash/trunk/src/business/business-core/xml/gnc-customer-xml-v2.c
   gnucash/trunk/src/business/business-core/xml/gnc-employee-xml-v2.c
   gnucash/trunk/src/business/business-core/xml/gnc-entry-xml-v2.c
   gnucash/trunk/src/business/business-core/xml/gnc-invoice-xml-v2.c
   gnucash/trunk/src/business/business-core/xml/gnc-job-xml-v2.c
   gnucash/trunk/src/business/business-core/xml/gnc-order-xml-v2.c
   gnucash/trunk/src/business/business-core/xml/gnc-owner-xml-v2.c
   gnucash/trunk/src/business/business-core/xml/gnc-tax-table-xml-v2.c
   gnucash/trunk/src/business/business-core/xml/gnc-vendor-xml-v2.c
   gnucash/trunk/src/business/business-gnome/business-urls.c
   gnucash/trunk/src/business/business-gnome/dialog-customer.c
   gnucash/trunk/src/business/business-gnome/dialog-employee.c
   gnucash/trunk/src/business/business-gnome/dialog-invoice.c
   gnucash/trunk/src/business/business-gnome/dialog-job.c
   gnucash/trunk/src/business/business-gnome/dialog-order.c
   gnucash/trunk/src/business/business-gnome/dialog-payment.c
   gnucash/trunk/src/business/business-gnome/dialog-vendor.c
   gnucash/trunk/src/business/business-gnome/search-owner.c
   gnucash/trunk/src/business/business-ledger/gncEntryLedger.c
   gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h
   gnucash/trunk/src/engine/Account.c
   gnucash/trunk/src/engine/Account.h
   gnucash/trunk/src/engine/AccountP.h
   gnucash/trunk/src/engine/GNCId.h
   gnucash/trunk/src/engine/Period.c
   gnucash/trunk/src/engine/Period.h
   gnucash/trunk/src/engine/Query.c
   gnucash/trunk/src/engine/Query.h
   gnucash/trunk/src/engine/QueryP.h
   gnucash/trunk/src/engine/SX-book.c
   gnucash/trunk/src/engine/SchedXaction.c
   gnucash/trunk/src/engine/Scrub2.c
   gnucash/trunk/src/engine/Split.c
   gnucash/trunk/src/engine/Split.h
   gnucash/trunk/src/engine/SplitP.h
   gnucash/trunk/src/engine/Transaction.c
   gnucash/trunk/src/engine/Transaction.h
   gnucash/trunk/src/engine/TransactionP.h
   gnucash/trunk/src/engine/cap-gains.c
   gnucash/trunk/src/engine/engine-common.i
   gnucash/trunk/src/engine/engine-helpers.c
   gnucash/trunk/src/engine/engine-helpers.h
   gnucash/trunk/src/engine/engine.i
   gnucash/trunk/src/engine/gnc-associate-account.c
   gnucash/trunk/src/engine/gnc-budget.c
   gnucash/trunk/src/engine/gnc-budget.h
   gnucash/trunk/src/engine/gnc-commodity.c
   gnucash/trunk/src/engine/gnc-commodity.h
   gnucash/trunk/src/engine/gnc-engine.h
   gnucash/trunk/src/engine/gnc-lot.c
   gnucash/trunk/src/engine/gnc-lot.h
   gnucash/trunk/src/engine/gnc-pricedb.c
   gnucash/trunk/src/engine/gnc-pricedb.h
   gnucash/trunk/src/engine/kvp-scm.c
   gnucash/trunk/src/engine/test-core/test-engine-stuff.c
   gnucash/trunk/src/engine/test-core/test-engine-stuff.h
   gnucash/trunk/src/engine/test/test-book-merge.c
   gnucash/trunk/src/engine/test/test-guid.c
   gnucash/trunk/src/experimental/cgi-bin/gnc-server.c
   gnucash/trunk/src/gnc-ui.h
   gnucash/trunk/src/gnc/GncInstance.hpp
   gnucash/trunk/src/gnome-search/dialog-search.c
   gnucash/trunk/src/gnome-search/dialog-search.h
   gnucash/trunk/src/gnome-search/gnc-general-search.c
   gnucash/trunk/src/gnome-search/search-account.c
   gnucash/trunk/src/gnome-utils/dialog-account.c
   gnucash/trunk/src/gnome-utils/dialog-query-list.c
   gnucash/trunk/src/gnome-utils/gnc-query-list.c
   gnucash/trunk/src/gnome-utils/gnc-tree-model-budget.c
   gnucash/trunk/src/gnome/dialog-chart-export.c
   gnucash/trunk/src/gnome/dialog-price-editor.c
   gnucash/trunk/src/gnome/dialog-print-check.c
   gnucash/trunk/src/gnome/dialog-sx-editor.c
   gnucash/trunk/src/gnome/dialog-sx-since-last-run.c
   gnucash/trunk/src/gnome/druid-merge.h
   gnucash/trunk/src/gnome/gnc-plugin-page-budget.c
   gnucash/trunk/src/gnome/gnc-plugin-page-register.c
   gnucash/trunk/src/gnome/gnc-split-reg.c
   gnucash/trunk/src/gnome/top-level.c
   gnucash/trunk/src/gnome/window-reconcile.c
   gnucash/trunk/src/import-export/import-account-matcher.h
   gnucash/trunk/src/import-export/import-match-map.c
   gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c
   gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c
   gnucash/trunk/src/libqof/backend/file/qsf-backend.c
   gnucash/trunk/src/libqof/backend/file/qsf-xml-map.c
   gnucash/trunk/src/libqof/backend/file/qsf-xml.c
   gnucash/trunk/src/libqof/backend/file/qsf-xml.h
   gnucash/trunk/src/libqof/qof/guid.c
   gnucash/trunk/src/libqof/qof/guid.h
   gnucash/trunk/src/libqof/qof/kvp-util-p.h
   gnucash/trunk/src/libqof/qof/kvp-util.c
   gnucash/trunk/src/libqof/qof/kvp_frame.c
   gnucash/trunk/src/libqof/qof/kvp_frame.h
   gnucash/trunk/src/libqof/qof/qofbook-p.h
   gnucash/trunk/src/libqof/qof/qofbook.h
   gnucash/trunk/src/libqof/qof/qofbookmerge.c
   gnucash/trunk/src/libqof/qof/qofbookmerge.h
   gnucash/trunk/src/libqof/qof/qofclass.h
   gnucash/trunk/src/libqof/qof/qofevent.h
   gnucash/trunk/src/libqof/qof/qofid.c
   gnucash/trunk/src/libqof/qof/qofid.h
   gnucash/trunk/src/libqof/qof/qofinstance.c
   gnucash/trunk/src/libqof/qof/qofinstance.h
   gnucash/trunk/src/libqof/qof/qofquery-deserial.c
   gnucash/trunk/src/libqof/qof/qofquery-serialize.c
   gnucash/trunk/src/libqof/qof/qofquery.c
   gnucash/trunk/src/libqof/qof/qofquery.h
   gnucash/trunk/src/libqof/qof/qofquerycore-p.h
   gnucash/trunk/src/libqof/qof/qofquerycore.c
   gnucash/trunk/src/libqof/qof/qofquerycore.h
   gnucash/trunk/src/libqof/qof/qofreference.c
   gnucash/trunk/src/libqof/qof/qofreference.h
   gnucash/trunk/src/libqof/qof/qofsession.c
   gnucash/trunk/src/libqof/qof/qofsession.h
   gnucash/trunk/src/libqof/qof/qofsql.c
   gnucash/trunk/src/libqof/qof/qofutil.c
   gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
   gnucash/trunk/src/register/ledger-core/split-register-load.c
   gnucash/trunk/src/register/ledger-core/split-register-model-save.c
   gnucash/trunk/src/register/ledger-core/split-register-model.c
   gnucash/trunk/src/register/ledger-core/split-register-p.h
   gnucash/trunk/src/register/ledger-core/split-register-util.c
   gnucash/trunk/src/register/ledger-core/split-register.c
Log:
Rename the type GUID into GncGUID because on Windows, the system headers have a type GUID which clashes with ours.

Note that only the type was renamed, but not any enums or function names.
Hence, the scheme wrappers should be unchanged completely (hopefully).

Discussed at http://lists.gnucash.org/pipermail/gnucash-devel/2010-March/027679.html

Modified: gnucash/trunk/src/app-utils/file-utils.c
===================================================================
--- gnucash/trunk/src/app-utils/file-utils.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/app-utils/file-utils.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -327,7 +327,7 @@
         file_guid = g_key_file_get_string(key_file,
                                           STATE_FILE_TOP, STATE_FILE_BOOK_GUID,
                                           NULL);
-        DEBUG("File GUID is %s", file_guid ? file_guid : "<not found>");
+        DEBUG("File GncGUID is %s", file_guid ? file_guid : "<not found>");
         if (safe_strcmp(guid, file_guid) == 0)
         {
             DEBUG("Matched !!!");

Modified: gnucash/trunk/src/app-utils/gnc-component-manager.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-component-manager.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/app-utils/gnc-component-manager.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -140,7 +140,7 @@
 static gboolean
 destroy_event_hash_helper (gpointer key, gpointer value, gpointer user_data)
 {
-    GUID *guid = key;
+    GncGUID *guid = key;
     EventInfo *ei = value;
 
     xaccGUIDFree (guid);
@@ -149,7 +149,7 @@
     return TRUE;
 }
 
-/* clear a hash table of the form GUID --> EventInfo, where
+/* clear a hash table of the form GncGUID --> EventInfo, where
  * both keys and values are g_malloced */
 static void
 clear_event_hash (GHashTable *hash)
@@ -178,7 +178,7 @@
 }
 
 static void
-add_event (ComponentEventInfo *cei, const GUID *entity,
+add_event (ComponentEventInfo *cei, const GncGUID *entity,
            QofEventId event_mask, gboolean or_in)
 {
     GHashTable *hash;
@@ -210,7 +210,7 @@
         ei = g_hash_table_lookup (hash, entity);
         if (ei == NULL)
         {
-            GUID *key;
+            GncGUID *key;
 
             key = xaccGUIDMalloc ();
             *key = *entity;
@@ -258,7 +258,7 @@
                       gpointer user_data,
                       gpointer event_data)
 {
-    const GUID *guid = qof_entity_get_guid(entity);
+    const GncGUID *guid = qof_entity_get_guid(entity);
 #if CM_DEBUG
     fprintf (stderr, "event_handler: event %d, entity %p, guid %s\n", event_type,
              entity, guid_to_string(guid));
@@ -448,7 +448,7 @@
 
 void
 gnc_gui_component_watch_entity (gint component_id,
-                                const GUID *entity,
+                                const GncGUID *entity,
                                 QofEventId event_mask)
 {
     ComponentInfo *ci;
@@ -468,7 +468,7 @@
 
 void
 gnc_gui_component_watch_entity_direct (gint component_id,
-                                       GUID entity,
+                                       GncGUID entity,
                                        QofEventId event_mask)
 {
     gnc_gui_component_watch_entity (component_id, &entity, event_mask);
@@ -492,7 +492,7 @@
 }
 
 const EventInfo *
-gnc_gui_get_entity_events (GHashTable *changes, const GUID *entity)
+gnc_gui_get_entity_events (GHashTable *changes, const GncGUID *entity)
 {
     if (!changes || !entity)
         return QOF_EVENT_NONE;
@@ -621,7 +621,7 @@
 static void
 match_helper (gpointer key, gpointer value, gpointer user_data)
 {
-    GUID *guid = key;
+    GncGUID *guid = key;
     EventInfo *ei_1 = value;
     EventInfo *ei_2;
     ComponentEventInfo *cei = user_data;

Modified: gnucash/trunk/src/app-utils/gnc-component-manager.h
===================================================================
--- gnucash/trunk/src/app-utils/gnc-component-manager.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/app-utils/gnc-component-manager.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -40,7 +40,7 @@
  *
  * changes: if NULL, the component should perform a refresh.
  *
- *          if non-NULL, changes is a GUID hash that maps
+ *          if non-NULL, changes is a GncGUID hash that maps
  *          GUIDs to EventInfo structs describing which
  *          events have been received. Entities not in
  *          the hash have not generated any events.
@@ -63,10 +63,10 @@
  * in the changes GHashTable may no longer exist.  So how can you
  * determine if this has happened?  Well, it's a good idea to check
  * for the QOF_EVENT_DESTROY bit in the EventInfo structure.  Of
- * course, that means you need the hash key (GUID) for the destroyed
- * entity.  How are you going to get the GUID from the entity if the
+ * course, that means you need the hash key (GncGUID) for the destroyed
+ * entity.  How are you going to get the GncGUID from the entity if the
  * entity has already been destroyed?  You're not.  So, you have to
- * save a COPY of the key (GUID) away beforehand.
+ * save a COPY of the key (GncGUID) away beforehand.
  *
  * user_data: user_data supplied when component was registered.
  */
@@ -170,7 +170,7 @@
  *               setting the mask to 0 turns off watching for the entity.
  */
 void gnc_gui_component_watch_entity (gint component_id,
-                                     const GUID *entity,
+                                     const GncGUID *entity,
                                      QofEventId event_mask);
 
 /* gnc_gui_component_watch_entity_direct
@@ -183,7 +183,7 @@
  *               setting the mask to 0 turns off watching for the entity.
  */
 void gnc_gui_component_watch_entity_direct (gint component_id,
-        GUID entity,
+        GncGUID entity,
         QofEventId event_mask);
 
 /* gnc_gui_component_watch_entity_type
@@ -204,13 +204,13 @@
  *   the given entity.
  *
  * changes: a hash of changes as in the refresh handler
- * entity:  the GUID of the entity to get the event mask for
+ * entity:  the GncGUID of the entity to get the event mask for
  *
  * Returns: the event info of the entity, or NULL
  *          if it is not found.
  */
 const EventInfo * gnc_gui_get_entity_events (GHashTable *changes,
-        const GUID *entity);
+        const GncGUID *entity);
 
 /* gnc_gui_component_clear_watches
  *   Clear all watches for the component.

Modified: gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-sx-instance-model.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/app-utils/gnc-sx-instance-model.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -190,7 +190,7 @@
     for ( ; split_list; split_list = split_list->next)
     {
         gnc_commodity *split_cmdty = NULL;
-        GUID *acct_guid;
+        GncGUID *acct_guid;
         Account *acct;
 
         s = (Split*)split_list->data;
@@ -903,7 +903,7 @@
 static gboolean
 _get_template_split_account(GncSxInstance *instance, Split *template_split, Account **split_acct, GList **creation_errors)
 {
-    GUID *acct_guid;
+    GncGUID *acct_guid;
     kvp_frame *split_kvpf;
     kvp_value *kvp_val;
 
@@ -931,7 +931,7 @@
     {
         char guid_str[GUID_ENCODING_LENGTH+1];
         GString *err;
-        guid_to_string_buff((const GUID*)acct_guid, guid_str);
+        guid_to_string_buff((const GncGUID*)acct_guid, guid_str);
         err = g_string_new("");
         g_string_printf(err, "Unknown account for guid [%s], cancelling SX [%s] creation.",
                         guid_str, xaccSchedXactionGetName(instance->parent->sx));

Modified: gnucash/trunk/src/app-utils/guile-util.c
===================================================================
--- gnucash/trunk/src/app-utils/guile-util.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/app-utils/guile-util.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -805,8 +805,8 @@
 void
 gnc_copy_trans_scm_onto_trans_swap_accounts(SCM trans_scm,
         Transaction *trans,
-        const GUID *guid_1,
-        const GUID *guid_2,
+        const GncGUID *guid_1,
+        const GncGUID *guid_2,
         gboolean do_commit,
         QofBook *book)
 {

Modified: gnucash/trunk/src/app-utils/guile-util.h
===================================================================
--- gnucash/trunk/src/app-utils/guile-util.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/app-utils/guile-util.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -72,8 +72,8 @@
                                      gboolean do_commit, QofBook *book);
 void   gnc_copy_trans_scm_onto_trans_swap_accounts(SCM trans_scm,
         Transaction *trans,
-        const GUID *guid_1,
-        const GUID *guid_2,
+        const GncGUID *guid_1,
+        const GncGUID *guid_2,
         gboolean do_commit,
         QofBook *book);
 

Modified: gnucash/trunk/src/backend/sql/gnc-account-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-account-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-account-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -88,7 +88,7 @@
 
 typedef struct {
 	/*@ dependent @*/ Account* pAccount;
-	GUID guid;
+	GncGUID guid;
 } account_parent_guid_struct;
 
 /* ================================================================= */
@@ -98,7 +98,7 @@
 {
     const Account* pAccount;
     const Account* pParent;
-    const GUID* parent_guid;
+    const GncGUID* parent_guid;
 
 	g_return_val_if_fail( pObject != NULL, NULL );
 	g_return_val_if_fail( GNC_IS_ACCOUNT(pObject), NULL );
@@ -119,7 +119,7 @@
 {
     Account* pAccount;
     QofBook* pBook;
-    GUID* guid = (GUID*)pValue;
+    GncGUID* guid = (GncGUID*)pValue;
     Account* pParent;
     
 	g_return_if_fail( pObject != NULL );
@@ -139,7 +139,7 @@
 set_parent_guid( gpointer pObject, /*@ null @*/ gpointer pValue )
 {
 	account_parent_guid_struct* s = (account_parent_guid_struct*)pObject;
-    GUID* guid = (GUID*)pValue;
+    GncGUID* guid = (GncGUID*)pValue;
 
 	g_return_if_fail( pObject != NULL );
 	g_return_if_fail( pValue != NULL );
@@ -151,7 +151,7 @@
 load_single_account( GncSqlBackend* be, GncSqlRow* row,
 					GList** l_accounts_needing_parents )
 {
-    const GUID* guid;
+    const GncGUID* guid;
 	Account* pAccount = NULL;
 
 	g_return_val_if_fail( be != NULL, NULL );
@@ -297,7 +297,7 @@
 gnc_sql_save_account( GncSqlBackend* be, QofInstance* inst )
 {
     Account* pAcc = GNC_ACCOUNT(inst);
-    const GUID* guid;
+    const GncGUID* guid;
 	gboolean is_infant;
 	gboolean is_ok = FALSE;
 	gnc_commodity* commodity;
@@ -357,7 +357,7 @@
             const GncSqlColumnTableEntry* table_row )
 {
     const GValue* val;
-    GUID guid;
+    GncGUID guid;
 	Account* account = NULL;
 
 	g_return_if_fail( be != NULL );

Modified: gnucash/trunk/src/backend/sql/gnc-backend-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-backend-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-backend-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -1471,8 +1471,8 @@
             const GncSqlColumnTableEntry* table_row )
 {
     const GValue* val;
-    GUID guid;
-    const GUID* pGuid;
+    GncGUID guid;
+    const GncGUID* pGuid;
 
 	g_return_if_fail( be != NULL );
 	g_return_if_fail( row != NULL );
@@ -1517,7 +1517,7 @@
 					const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
 {
     QofAccessFunc getter;
-    const GUID* guid = NULL;
+    const GncGUID* guid = NULL;
     gchar guid_buf[GUID_ENCODING_LENGTH+1];
 	GValue* value;
 
@@ -1557,7 +1557,7 @@
 						const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList )
 {
     QofAccessFunc getter;
-    const GUID* guid = NULL;
+    const GncGUID* guid = NULL;
     gchar guid_buf[GUID_ENCODING_LENGTH+1];
 	QofInstance* inst = NULL;
 	GValue* value;
@@ -2027,13 +2027,13 @@
 void 
 _retrieve_guid_( gpointer pObject, /*@ null @*/ gpointer pValue )
 {
-    GUID* pGuid = (GUID*)pObject;
-    GUID* guid = (GUID*)pValue;
+    GncGUID* pGuid = (GncGUID*)pObject;
+    GncGUID* guid = (GncGUID*)pValue;
 
 	g_return_if_fail( pObject != NULL );
 	g_return_if_fail( pValue != NULL );
 
-	memcpy( pGuid, guid, sizeof( GUID ) );
+	memcpy( pGuid, guid, sizeof( GncGUID ) );
 }
 
 
@@ -2046,10 +2046,10 @@
 	/*@ +full_init_block @*/
 };
 
-/*@ null @*/ const GUID*
+/*@ null @*/ const GncGUID*
 gnc_sql_load_guid( const GncSqlBackend* be, GncSqlRow* row )
 {
-	static GUID guid;
+	static GncGUID guid;
 
 	g_return_val_if_fail( be != NULL, NULL );
 	g_return_val_if_fail( row != NULL, NULL );
@@ -2068,10 +2068,10 @@
 	/*@ +full_init_block @*/
 };
 
-/*@ null @*//*@ dependent @*/ const GUID*
+/*@ null @*//*@ dependent @*/ const GncGUID*
 gnc_sql_load_tx_guid( const GncSqlBackend* be, GncSqlRow* row )
 {
-    static GUID guid;
+    static GncGUID guid;
 
 	g_return_val_if_fail( be != NULL, NULL );
 	g_return_val_if_fail( row != NULL, NULL );
@@ -2608,7 +2608,7 @@
 gnc_sql_commit_standard_item( GncSqlBackend* be, QofInstance* inst, const gchar* tableName,
                         	QofIdTypeConst obj_name, const GncSqlColumnTableEntry* col_table )
 {
-	const GUID* guid;
+	const GncGUID* guid;
 	gboolean is_infant;
 	gint op;
 	gboolean is_ok;

Modified: gnucash/trunk/src/backend/sql/gnc-backend-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-backend-sql.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-backend-sql.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -568,10 +568,10 @@
  *
  * @param be SQL backend struct
  * @param row Database row
- * @return GUID
+ * @return GncGUID
  */
 /*@ dependent @*//*@ null @*/
-const GUID* gnc_sql_load_guid( const GncSqlBackend* be, GncSqlRow* row );
+const GncGUID* gnc_sql_load_guid( const GncSqlBackend* be, GncSqlRow* row );
 
 /**
  * Loads the transaction guid from a database row.  The table must have a column
@@ -579,10 +579,10 @@
  *
  * @param be SQL backend struct
  * @param row Database row
- * @return GUID
+ * @return GncGUID
  */
 /*@ dependent @*//*@ null @*/
-const GUID* gnc_sql_load_tx_guid( const GncSqlBackend* be, GncSqlRow* row );
+const GncGUID* gnc_sql_load_tx_guid( const GncSqlBackend* be, GncSqlRow* row );
 
 /**
  * Creates a basic SELECT statement for a table.
@@ -604,7 +604,7 @@
 void gnc_sql_register_col_type_handler( const gchar* colType, const GncSqlColumnTypeHandler* handler );
 
 /**
- * Adds a GValue for an object reference GUID to the end of a GSList.
+ * Adds a GValue for an object reference GncGUID to the end of a GSList.
  *
  * @param be SQL backend struct
  * @param obj_name QOF object type name
@@ -617,7 +617,7 @@
         const GncSqlColumnTableEntry* table_row, GSList** pList );
 
 /**
- * Adds a column info structure for an object reference GUID to the end of a
+ * Adds a column info structure for an object reference GncGUID to the end of a
  * GList.
  *
  * @param be SQL backend struct

Modified: gnucash/trunk/src/backend/sql/gnc-book-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-book-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-book-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -86,7 +86,7 @@
 {
     QofBook* book = QOF_BOOK(pObject);
     const Account* root;
-    GUID* guid = (GUID*)pValue;
+    GncGUID* guid = (GncGUID*)pValue;
 
 	g_return_if_fail( pObject != NULL );
 	g_return_if_fail( QOF_IS_BOOK(pObject) );
@@ -113,7 +113,7 @@
 set_root_template_guid( gpointer pObject, /*@ null @*/ gpointer pValue )
 {
     QofBook* book = QOF_BOOK(pObject);
-    GUID* guid = (GUID*)pValue;
+    GncGUID* guid = (GncGUID*)pValue;
     Account* root;
 
 	g_return_if_fail( pObject != NULL );
@@ -135,7 +135,7 @@
 static void
 load_single_book( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
+    const GncGUID* guid;
 	QofBook* pBook;
 
 	g_return_if_fail( be != NULL );

Modified: gnucash/trunk/src/backend/sql/gnc-budget-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-budget-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-budget-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -283,7 +283,7 @@
 static /*@ dependent @*//*@ null @*/ GncBudget*
 load_single_budget( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
+    const GncGUID* guid;
 	GncBudget* pBudget = NULL;
 	Recurrence* r;
 
@@ -369,7 +369,7 @@
 save_budget( GncSqlBackend* be, QofInstance* inst )
 {
     GncBudget* pBudget = GNC_BUDGET(inst);
-    const GUID* guid;
+    const GncGUID* guid;
 	gint op;
 	gboolean is_infant;
 	gboolean is_ok;
@@ -445,7 +445,7 @@
             const GncSqlColumnTableEntry* table_row )
 {
     const GValue* val;
-    GUID guid;
+    GncGUID guid;
 	GncBudget* budget = NULL;
 
 	g_return_if_fail( be != NULL );

Modified: gnucash/trunk/src/backend/sql/gnc-commodity-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-commodity-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-commodity-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -142,7 +142,7 @@
             pCommodity = load_single_commodity( be, row );
 
             if( pCommodity != NULL ) {
-                GUID guid;
+                GncGUID guid;
 
                 guid = *qof_instance_get_guid( QOF_INSTANCE(pCommodity) );
                 pCommodity = gnc_commodity_table_insert( pTable, pCommodity );
@@ -176,7 +176,7 @@
 static gboolean
 do_commit_commodity( GncSqlBackend* be, QofInstance* inst, gboolean force_insert )
 {
-	const GUID* guid;
+	const GncGUID* guid;
 	gboolean is_infant;
 	gint op;
 	gboolean is_ok;
@@ -247,7 +247,7 @@
             const GncSqlColumnTableEntry* table_row )
 {
     const GValue* val;
-    GUID guid;
+    GncGUID guid;
 	gnc_commodity* commodity = NULL;
 
 	g_return_if_fail( be != NULL );

Modified: gnucash/trunk/src/backend/sql/gnc-lots-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-lots-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-lots-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -207,7 +207,7 @@
             const GncSqlColumnTableEntry* table_row )
 {
     const GValue* val;
-    GUID guid;
+    GncGUID guid;
 	GNCLot* lot;
 
 	g_return_if_fail( be != NULL );

Modified: gnucash/trunk/src/backend/sql/gnc-recurrence-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-recurrence-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-recurrence-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -51,7 +51,7 @@
 
 typedef struct {
     /*@ dependent @*/ GncSqlBackend* be;
-    /*@ dependent @*/ const GUID* guid;
+    /*@ dependent @*/ const GncGUID* guid;
 	/*@ dependent @*/ Recurrence* pRecurrence;
 } recurrence_info_t;
 
@@ -106,7 +106,7 @@
 static void
 set_obj_guid( void )
 {
-    // Nowhere to put the GUID
+    // Nowhere to put the GncGUID
 }
 
 static gint
@@ -184,7 +184,7 @@
 /* ================================================================= */
 
 gboolean
-gnc_sql_recurrence_save( GncSqlBackend* be, const GUID* guid, const Recurrence* r )
+gnc_sql_recurrence_save( GncSqlBackend* be, const GncGUID* guid, const Recurrence* r )
 {
     recurrence_info_t recurrence_info;
 
@@ -202,7 +202,7 @@
 }
 
 void
-gnc_sql_recurrence_save_list( GncSqlBackend* be, const GUID* guid, GList* schedule )
+gnc_sql_recurrence_save_list( GncSqlBackend* be, const GncGUID* guid, GList* schedule )
 {
     recurrence_info_t recurrence_info;
 	GList* l;
@@ -222,7 +222,7 @@
 }
 
 gboolean
-gnc_sql_recurrence_delete( GncSqlBackend* be, const GUID* guid )
+gnc_sql_recurrence_delete( GncSqlBackend* be, const GncGUID* guid )
 {
     recurrence_info_t recurrence_info;
 
@@ -251,7 +251,7 @@
 }
 
 static /*@ null @*/ GncSqlResult*
-gnc_sql_set_recurrences_from_db( GncSqlBackend* be, const GUID* guid )
+gnc_sql_set_recurrences_from_db( GncSqlBackend* be, const GncGUID* guid )
 {
     gchar* buf;
     gchar guid_buf[GUID_ENCODING_LENGTH+1];
@@ -271,7 +271,7 @@
 }
 
 /*@ null @*/ Recurrence*
-gnc_sql_recurrence_load( GncSqlBackend* be, const GUID* guid )
+gnc_sql_recurrence_load( GncSqlBackend* be, const GncGUID* guid )
 {
 	GncSqlResult* result;
 	Recurrence* r = NULL;
@@ -300,7 +300,7 @@
 }
 
 /*@ null @*/ GList*
-gnc_sql_recurrence_load_list( GncSqlBackend* be, const GUID* guid )
+gnc_sql_recurrence_load_list( GncSqlBackend* be, const GncGUID* guid )
 {
 	GncSqlResult* result;
 	GList* list = NULL;

Modified: gnucash/trunk/src/backend/sql/gnc-recurrence-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-recurrence-sql.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-recurrence-sql.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -32,13 +32,13 @@
 #include "qof.h"
 #include <gmodule.h>
 
-gboolean gnc_sql_recurrence_save( GncSqlBackend* be, const GUID* guid, const Recurrence* pRecurrence );
-void gnc_sql_recurrence_save_list( GncSqlBackend* be, const GUID* guid, GList* schedule );
-gboolean gnc_sql_recurrence_delete( GncSqlBackend* be, const GUID* guid );
+gboolean gnc_sql_recurrence_save( GncSqlBackend* be, const GncGUID* guid, const Recurrence* pRecurrence );
+void gnc_sql_recurrence_save_list( GncSqlBackend* be, const GncGUID* guid, GList* schedule );
+gboolean gnc_sql_recurrence_delete( GncSqlBackend* be, const GncGUID* guid );
 /*@ null @*/
-Recurrence* gnc_sql_recurrence_load( GncSqlBackend* be, const GUID* guid );
+Recurrence* gnc_sql_recurrence_load( GncSqlBackend* be, const GncGUID* guid );
 /*@ null @*/
-GList* gnc_sql_recurrence_load_list( GncSqlBackend* be, const GUID* guid );
+GList* gnc_sql_recurrence_load_list( GncSqlBackend* be, const GncGUID* guid );
 
 void gnc_sql_init_recurrence_handler( void );
 

Modified: gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -80,7 +80,7 @@
 static /*@ null @*/ SchedXaction*
 load_single_sx( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
+    const GncGUID* guid;
 	SchedXaction* pSx;
 	GList* schedule;
 	GDate start_date;
@@ -161,7 +161,7 @@
 gnc_sql_save_schedxaction( GncSqlBackend* be, QofInstance* inst )
 {
     SchedXaction* pSx;
-    const GUID* guid;
+    const GncGUID* guid;
 	gint op;
 	gboolean is_infant;
 	gboolean is_ok;

Modified: gnucash/trunk/src/backend/sql/gnc-slots-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-slots-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-slots-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -48,7 +48,7 @@
 
 typedef struct {
     /*@ dependent @*/ GncSqlBackend* be;
-    /*@ dependent @*/ const GUID* guid;
+    /*@ dependent @*/ const GncGUID* guid;
 	gboolean is_ok;
     /*@ dependent @*/ KvpFrame* pKvpFrame;
     KvpValueType value_type;
@@ -129,7 +129,7 @@
 static void
 set_obj_guid( void )
 {
-    // Nowhere to put the GUID
+    // Nowhere to put the GncGUID
 }
 
 static /*@ null @*/ gpointer
@@ -302,7 +302,7 @@
 	g_return_if_fail( pObject != NULL );
 
     if( pInfo->value_type == KVP_TYPE_GUID && pValue != NULL ) {
-        kvp_frame_set_guid( pInfo->pKvpFrame, pInfo->path->str, (GUID*)pValue );
+        kvp_frame_set_guid( pInfo->pKvpFrame, pInfo->path->str, (GncGUID*)pValue );
     }
 }
 
@@ -368,7 +368,7 @@
 }
 
 gboolean
-gnc_sql_slots_save( GncSqlBackend* be, const GUID* guid, gboolean is_infant, KvpFrame* pFrame )
+gnc_sql_slots_save( GncSqlBackend* be, const GncGUID* guid, gboolean is_infant, KvpFrame* pFrame )
 {
     slot_info_t slot_info;
 
@@ -392,7 +392,7 @@
 }
 
 gboolean
-gnc_sql_slots_delete( GncSqlBackend* be, const GUID* guid )
+gnc_sql_slots_delete( GncSqlBackend* be, const GncGUID* guid )
 {
     slot_info_t slot_info;
 
@@ -435,7 +435,7 @@
     GncSqlResult* result;
     gchar guid_buf[GUID_ENCODING_LENGTH+1];
     GncSqlStatement* stmt;
-	const GUID* guid;
+	const GncGUID* guid;
 	KvpFrame* pFrame;
 
 	g_return_if_fail( be != NULL );
@@ -463,10 +463,10 @@
 	}
 }
 
-static /*@ dependent @*//*@ null @*/ const GUID*
+static /*@ dependent @*//*@ null @*/ const GncGUID*
 load_obj_guid( const GncSqlBackend* be, GncSqlRow* row )
 {
-    static GUID guid;
+    static GncGUID guid;
 
 	g_return_val_if_fail( be != NULL, NULL );
 	g_return_val_if_fail( row != NULL, NULL );
@@ -480,7 +480,7 @@
 load_slot_for_list_item( GncSqlBackend* be, GncSqlRow* row, QofCollection* coll )
 {
     slot_info_t slot_info;
-	const GUID* guid;
+	const GncGUID* guid;
 	QofInstance* inst;
 
 	g_return_if_fail( be != NULL );
@@ -558,7 +558,7 @@
 load_slot_for_book_object( GncSqlBackend* be, GncSqlRow* row, BookLookupFn lookup_fn )
 {
     slot_info_t slot_info;
-	const GUID* guid;
+	const GncGUID* guid;
 	QofInstance* inst;
 
 	g_return_if_fail( be != NULL );

Modified: gnucash/trunk/src/backend/sql/gnc-slots-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-slots-sql.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-slots-sql.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -41,7 +41,7 @@
  * @param pFrame Top-level KVP frame
  * @return TRUE if successful, FALSE if error
  */
-gboolean gnc_sql_slots_save( GncSqlBackend* be, const GUID* guid,
+gboolean gnc_sql_slots_save( GncSqlBackend* be, const GncGUID* guid,
                              gboolean is_infant, KvpFrame* pFrame );
 
 /**
@@ -51,7 +51,7 @@
  * @param guid Object guid
  * @return TRUE if successful, FALSE if error
  */
-gboolean gnc_sql_slots_delete( GncSqlBackend* be, const GUID* guid );
+gboolean gnc_sql_slots_delete( GncSqlBackend* be, const GncGUID* guid );
 
 /** Loads slots for an object from the db.
  *
@@ -70,7 +70,7 @@
 void gnc_sql_slots_load_for_list( GncSqlBackend* be, GList* list );
 
 
-typedef QofInstance* (*BookLookupFn)( const GUID* guid, const QofBook* book );
+typedef QofInstance* (*BookLookupFn)( const GncGUID* guid, const QofBook* book );
 
 /**
  * gnc_sql_slots_load_for_sql_subquery - Loads slots for all objects whose guid is

Modified: gnucash/trunk/src/backend/sql/gnc-transaction-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-transaction-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/sql/gnc-transaction-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -65,7 +65,7 @@
 
 typedef struct {
     /*@ dependent @*/ GncSqlBackend* be;
-    /*@ dependent @*/ const GUID* guid;
+    /*@ dependent @*/ const GncGUID* guid;
 	gboolean is_ok;
 } split_info_t;
 
@@ -193,8 +193,8 @@
 static /*@ null @*/ Split*
 load_single_split( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
-    GUID split_guid;
+    const GncGUID* guid;
+    GncGUID split_guid;
 	Split* pSplit;
 
 	g_return_val_if_fail( be != NULL, NULL );
@@ -263,8 +263,8 @@
 static /*@ null @*/ Transaction*
 load_single_tx( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
-    GUID tx_guid;
+    const GncGUID* guid;
+    GncGUID tx_guid;
 	Transaction* pTx;
 
 	g_return_val_if_fail( be != NULL, NULL );
@@ -626,7 +626,7 @@
 }
 
 static gboolean
-save_splits( GncSqlBackend* be, const GUID* tx_guid, SplitList* pSplitList )
+save_splits( GncSqlBackend* be, const GncGUID* tx_guid, SplitList* pSplitList )
 {
     split_info_t split_info;
 
@@ -645,7 +645,7 @@
 static gboolean
 save_transaction( GncSqlBackend* be, Transaction* pTx, gboolean do_save_splits )
 {
-    const GUID* guid;
+    const GncGUID* guid;
 	gint op;
 	gboolean is_infant;
 	QofInstance* inst;
@@ -713,7 +713,7 @@
 }
 
 /* ================================================================= */
-static /*@ dependent @*//*@ null @*/ const GUID*
+static /*@ dependent @*//*@ null @*/ const GncGUID*
 get_guid_from_query( QofQuery* pQuery )
 {
     GList* pOrTerms;
@@ -749,7 +749,7 @@
  */
 void gnc_sql_transaction_load_tx_for_account( GncSqlBackend* be, Account* account )
 {
-	const GUID* guid;
+	const GncGUID* guid;
     gchar guid_buf[GUID_ENCODING_LENGTH+1];
 	gchar* query_sql;
     GncSqlStatement* stmt;
@@ -853,7 +853,7 @@
 			break;
 
 		default:
-			PERR( "Unexpected GUID match type: %d\n", guid_data->options );
+			PERR( "Unexpected GncGUID match type: %d\n", guid_data->options );
 		}
 
 		for( guid_entry = guid_data->guids; guid_entry != NULL; guid_entry = guid_entry->next ) {
@@ -976,7 +976,7 @@
 static /*@ null @*/ gpointer
 compile_split_query( GncSqlBackend* be, QofQuery* query )
 {
-    const GUID* acct_guid;
+    const GncGUID* acct_guid;
     gchar guid_buf[GUID_ENCODING_LENGTH+1];
 	split_query_info_t* query_info = NULL;
 	gchar* query_sql;
@@ -1141,7 +1141,7 @@
 set_acct_bal_account_from_guid( gpointer pObject, gpointer pValue )
 {
     single_acct_balance_t* bal = (single_acct_balance_t*)pObject;
-	const GUID* guid = (const GUID*)pValue;
+	const GncGUID* guid = (const GncGUID*)pValue;
 
 	g_return_if_fail( pObject != NULL );
 	g_return_if_fail( pValue != NULL );
@@ -1283,7 +1283,7 @@
             const GncSqlColumnTableEntry* table_row )
 {
     const GValue* val;
-    GUID guid;
+    GncGUID guid;
 	Transaction* tx;
 	const gchar* guid_str;
 

Modified: gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/gnc-account-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -204,7 +204,7 @@
 account_id_handler (xmlNodePtr node, gpointer act_pdata)
 {
     struct account_pdata *pdata = act_pdata;
-    GUID *guid;
+    GncGUID *guid;
 
     guid = dom_tree_to_guid(node);
     g_return_val_if_fail(guid, FALSE);
@@ -363,7 +363,7 @@
 {
     struct account_pdata *pdata = act_pdata;
     Account *parent;
-    GUID *gid;
+    GncGUID *gid;
 
     gid = dom_tree_to_guid(node);
     g_return_val_if_fail(gid, FALSE);

Modified: gnucash/trunk/src/backend/xml/gnc-backend-xml.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-backend-xml.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/gnc-backend-xml.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -935,7 +935,7 @@
               "at least once before closing the books!\n");
     }
     /* XXX To be anal about it, we should really be checking to see
-     * if there already is a file with this book GUID, and disallowing
+     * if there already is a file with this book GncGUID, and disallowing
      * further progress.  This is because we are not allowed to
      * modify books that are closed (They should be treated as
      * 'read-only').

Modified: gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/gnc-book-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -186,7 +186,7 @@
 book_id_handler(xmlNodePtr node, gpointer book_pdata)
 {
     QofBook *book = book_pdata;
-    GUID *guid;
+    GncGUID *guid;
 
     guid = dom_tree_to_guid(node);
     qof_instance_set_guid(QOF_INSTANCE(book), guid);

Modified: gnucash/trunk/src/backend/xml/gnc-budget-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-budget-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/gnc-budget-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -64,7 +64,7 @@
     ret = xmlNewNode(NULL, BAD_CAST gnc_budget_string);
     xmlSetProp(ret, BAD_CAST "version", BAD_CAST budget_version_string);
 
-    /* field: GUID */
+    /* field: GncGUID */
     xmlAddChild(ret, guid_to_dom_tree(bgt_id_string,
                                       gnc_budget_get_guid(bgt)));
     /* field: char* name */
@@ -108,7 +108,7 @@
 static gboolean
 budget_id_handler (xmlNodePtr node, gpointer bgt)
 {
-    GUID *guid;
+    GncGUID *guid;
 
     guid = dom_tree_to_guid(node);
     g_return_val_if_fail(guid, FALSE);

Modified: gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/gnc-freqspec-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -410,7 +410,7 @@
 fs_guid_handler( xmlNodePtr node, gpointer data)
 {
     fsParseData *fspd = data;
-    GUID        *guid;
+    GncGUID        *guid;
     guid = dom_tree_to_guid( node );
     return TRUE;
 }

Modified: gnucash/trunk/src/backend/xml/gnc-lot-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-lot-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/gnc-lot-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -92,7 +92,7 @@
 lot_id_handler (xmlNodePtr node, gpointer p)
 {
     struct lot_pdata *pdata = p;
-    GUID *guid;
+    GncGUID *guid;
 
     ENTER("(lot=%p)", pdata->lot);
     guid = dom_tree_to_guid(node);

Modified: gnucash/trunk/src/backend/xml/gnc-pricedb-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-pricedb-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/gnc-pricedb-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -92,7 +92,7 @@
     gnc_price_begin_edit (p);
     if (safe_strcmp("price:id", (char*)sub_node->name) == 0)
     {
-        GUID *c = dom_tree_to_guid(sub_node);
+        GncGUID *c = dom_tree_to_guid(sub_node);
         if (!c) return FALSE;
         gnc_price_set_guid(p, c);
         g_free(c);

Modified: gnucash/trunk/src/backend/xml/gnc-schedxaction-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-schedxaction-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/gnc-schedxaction-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -85,7 +85,7 @@
     xmlNodePtr	ret;
     GDate	*date;
     gint        instCount;
-    const GUID        *templ_acc_guid;
+    const GncGUID        *templ_acc_guid;
     gboolean allow_2_2_incompat = TRUE;
 
     templ_acc_guid = xaccAccountGetGUID(sx->template_acct);
@@ -149,7 +149,7 @@
                                         xaccSchedXactionGetEndDate(sx) ) );
     }
 
-    /* output template account GUID */
+    /* output template account GncGUID */
     xmlAddChild( ret,
                  guid_to_dom_tree(SX_TEMPL_ACCT,
                                   templ_acc_guid));
@@ -218,7 +218,7 @@
 {
     struct sx_pdata *pdata = sx_pdata;
     SchedXaction *sx = pdata->sx;
-    GUID        *tmp = dom_tree_to_guid( node );
+    GncGUID        *tmp = dom_tree_to_guid( node );
 
     g_return_val_if_fail( tmp, FALSE );
     xaccSchedXactionSetGUID(sx, tmp);
@@ -588,7 +588,7 @@
 {
     struct sx_pdata *pdata = sx_pdata;
     SchedXaction *sx = pdata->sx;
-    GUID *templ_acct_guid = dom_tree_to_guid(node);
+    GncGUID *templ_acct_guid = dom_tree_to_guid(node);
     Account *account;
 
     if (!templ_acct_guid)
@@ -749,7 +749,7 @@
 
         /* We're dealing with a pre-200107<near-end-of-month> rgmerk
            change re: storing template accounts. */
-        /* Fix: get account with name of our GUID from the template
+        /* Fix: get account with name of our GncGUID from the template
            accounts.  Make that our template_acct pointer. */
         /* THREAD-UNSAFE */
         id = guid_to_string( xaccSchedXactionGetGUID( sx ) );
@@ -767,7 +767,7 @@
             xmlFreeNode( tree );
             return FALSE;
         }
-        g_debug("template account name [%s] for SX with GUID [%s]",
+        g_debug("template account name [%s] for SX with GncGUID [%s]",
                 xaccAccountGetName( acct ), id );
 
         /* FIXME: free existing template account.

Modified: gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/gnc-transaction-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -233,7 +233,7 @@
 spl_id_handler(xmlNodePtr node, gpointer data)
 {
     struct split_pdata *pdata = data;
-    GUID *tmp = dom_tree_to_guid(node);
+    GncGUID *tmp = dom_tree_to_guid(node);
     g_return_val_if_fail(tmp, FALSE);
 
     xaccSplitSetGUID(pdata->split, tmp);
@@ -304,7 +304,7 @@
 spl_account_handler(xmlNodePtr node, gpointer data)
 {
     struct split_pdata *pdata = data;
-    GUID *id = dom_tree_to_guid(node);
+    GncGUID *id = dom_tree_to_guid(node);
     Account *account;
 
     g_return_val_if_fail(id, FALSE);
@@ -330,7 +330,7 @@
 spl_lot_handler(xmlNodePtr node, gpointer data)
 {
     struct split_pdata *pdata = data;
-    GUID *id = dom_tree_to_guid(node);
+    GncGUID *id = dom_tree_to_guid(node);
     GNCLot *lot;
 
     g_return_val_if_fail(id, FALSE);
@@ -449,7 +449,7 @@
 {
     struct trans_pdata *pdata = trans_pdata;
     Transaction *trn = pdata->trans;
-    GUID *tmp = dom_tree_to_guid(node);
+    GncGUID *tmp = dom_tree_to_guid(node);
 
     g_return_val_if_fail(tmp, FALSE);
 

Modified: gnucash/trunk/src/backend/xml/io-gncxml-v1.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-gncxml-v1.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/io-gncxml-v1.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -613,7 +613,7 @@
                            const gchar *tag)
 {
     gchar *txt = NULL;
-    GUID val;
+    GncGUID val;
     kvp_value *kvpv;
     gboolean ok;
 
@@ -1503,7 +1503,7 @@
 
    start: NA
    characters: return string copy for accumulation in end handler.
-   end: concatenate all chars and set as account GUID if not duplicate.
+   end: concatenate all chars and set as account GncGUID if not duplicate.
 
    cleanup-result: NA
    cleanup-chars: g_free the result string.
@@ -1522,7 +1522,7 @@
     GNCParseStatus *pstatus = (GNCParseStatus *) global_data;
     Account *acc = (Account *) parent_data;
     gchar *txt = NULL;
-    GUID gid;
+    GncGUID gid;
     gboolean ok;
 
     g_return_val_if_fail(acc, FALSE);
@@ -1735,7 +1735,7 @@
     Account *acc = (Account *) parent_data;
     Account *parent;
     sixtp_child_result *child_result;
-    GUID gid;
+    GncGUID gid;
 
     g_return_val_if_fail(acc, FALSE);
 
@@ -1748,7 +1748,7 @@
         return(FALSE);
 
     /* otherwise this must be a good result - use it */
-    gid = *((GUID *) child_result->data);
+    gid = *((GncGUID *) child_result->data);
 
     parent = xaccAccountLookup(&gid, pstatus->book);
 
@@ -2839,7 +2839,7 @@
 
     if (!xaccTransGetGUID(trans))
     {
-        /* must at least have a GUID for a restore */
+        /* must at least have a GncGUID for a restore */
         xaccTransDestroy(trans);
         xaccTransCommitEdit(trans);
         return(FALSE);
@@ -2904,7 +2904,7 @@
    -----------
    start: NA
    characters: return string copy for accumulation in end handler.
-   end: concatenate all chars and set as transaction GUID if not duplicate.
+   end: concatenate all chars and set as transaction GncGUID if not duplicate.
 
    cleanup-result: NA
    cleanup-chars: g_free the result string.
@@ -2923,7 +2923,7 @@
     GNCParseStatus *pstatus = (GNCParseStatus *) global_data;
     Transaction *t = (Transaction *) parent_data;
     gchar *txt = NULL;
-    GUID gid;
+    GncGUID gid;
     gboolean ok;
 
     g_return_val_if_fail(t, FALSE);
@@ -3146,7 +3146,7 @@
 
     if (!xaccSplitGetGUID(s))
     {
-        /* must at least have a GUID for a restore */
+        /* must at least have a GncGUID for a restore */
         xaccSplitDestroy(s);
         return(FALSE);
     }
@@ -3221,7 +3221,7 @@
    -----------
    start: NA
    characters: return string copy for accumulation in end handler.
-   end: concatenate all chars and set as split GUID if not duplicate.
+   end: concatenate all chars and set as split GncGUID if not duplicate.
 
    cleanup-result: NA
    cleanup-chars: g_free the result string.
@@ -3240,7 +3240,7 @@
     GNCParseStatus *pstatus = (GNCParseStatus *) global_data;
     Split *s = (Split *) parent_data;
     gchar *txt = NULL;
-    GUID gid;
+    GncGUID gid;
     gboolean ok;
 
     g_return_val_if_fail(s, FALSE);
@@ -3431,7 +3431,7 @@
    -----------
    start: NA
    characters: return string copy for accumulation in end handler.
-   end: concatenate all chars and set as split account if GUID OK.
+   end: concatenate all chars and set as split account if GncGUID OK.
 
    cleanup-result: NA
    cleanup-chars: g_free the result string.
@@ -3451,7 +3451,7 @@
     Split *s = (Split *) parent_data;
     Account *acct;
     gchar *txt = NULL;
-    GUID gid;
+    GncGUID gid;
     gboolean ok;
 
     g_return_val_if_fail(s, FALSE);
@@ -3633,7 +3633,7 @@
 
     if (safe_strcmp("price:id", (char*)sub_node->name) == 0)
     {
-        GUID *c = dom_tree_to_guid(sub_node);
+        GncGUID *c = dom_tree_to_guid(sub_node);
         if (!c) return FALSE;
         gnc_price_set_guid(p, c);
         g_free(c);

Modified: gnucash/trunk/src/backend/xml/sixtp-dom-generators.c
===================================================================
--- gnucash/trunk/src/backend/xml/sixtp-dom-generators.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/sixtp-dom-generators.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -80,7 +80,7 @@
 
 
 xmlNodePtr
-guid_to_dom_tree(const char *tag, const GUID* gid)
+guid_to_dom_tree(const char *tag, const GncGUID* gid)
 {
     char guid_str[GUID_ENCODING_LENGTH + 1];
     xmlNodePtr ret;

Modified: gnucash/trunk/src/backend/xml/sixtp-dom-generators.h
===================================================================
--- gnucash/trunk/src/backend/xml/sixtp-dom-generators.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/sixtp-dom-generators.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -36,7 +36,7 @@
 xmlNodePtr text_to_dom_tree(const char *tag, const char *str);
 xmlNodePtr int_to_dom_tree(const char *tag, gint64 val);
 xmlNodePtr boolean_to_dom_tree(const char* tag, gboolean val);
-xmlNodePtr guid_to_dom_tree(const char *tag, const GUID* gid);
+xmlNodePtr guid_to_dom_tree(const char *tag, const GncGUID* gid);
 xmlNodePtr commodity_ref_to_dom_tree(const char *tag, const gnc_commodity *c);
 xmlNodePtr timespec_to_dom_tree(const char *tag, const Timespec *spec);
 gchar * timespec_nsec_to_string(const Timespec *ts);

Modified: gnucash/trunk/src/backend/xml/sixtp-dom-parsers.c
===================================================================
--- gnucash/trunk/src/backend/xml/sixtp-dom-parsers.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/sixtp-dom-parsers.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -33,7 +33,7 @@
 
 static QofLogModule log_module = GNC_MOD_IO;
 
-GUID*
+GncGUID*
 dom_tree_to_guid(xmlNodePtr node)
 {
     if (!node->properties)
@@ -57,7 +57,7 @@
         /* handle new and guid the same for the moment */
         if ((safe_strcmp("guid", type) == 0) || (safe_strcmp("new", type) == 0))
         {
-            GUID *gid = g_new(GUID, 1);
+            GncGUID *gid = g_new(GncGUID, 1);
             char *guid_str;
 
             guid_str = (char*)xmlNodeGetContent (node->xmlChildrenNode);
@@ -218,7 +218,7 @@
 kvp_value*
 dom_tree_to_guid_kvp_value(xmlNodePtr node)
 {
-    GUID *daguid;
+    GncGUID *daguid;
     kvp_value *ret = NULL;
 
     daguid = dom_tree_to_guid(node);

Modified: gnucash/trunk/src/backend/xml/sixtp-dom-parsers.h
===================================================================
--- gnucash/trunk/src/backend/xml/sixtp-dom-parsers.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/sixtp-dom-parsers.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -32,7 +32,7 @@
 #include "qof.h"
 #include "gnc-budget.h"
 
-GUID* dom_tree_to_guid(xmlNodePtr node);
+GncGUID* dom_tree_to_guid(xmlNodePtr node);
 
 gnc_commodity* dom_tree_to_commodity_ref(xmlNodePtr node, QofBook *book);
 gnc_commodity *dom_tree_to_commodity_ref_no_engine(xmlNodePtr node, QofBook *);

Modified: gnucash/trunk/src/backend/xml/sixtp-utils.c
===================================================================
--- gnucash/trunk/src/backend/xml/sixtp-utils.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/sixtp-utils.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -748,16 +748,16 @@
    and return it.
 
    input: NA
-   returns: GUID*
+   returns: GncGUID*
 
    start: NA
    characters: return string copy for accumulation in end handler.
-   end: concatenate all chars and create and return GUID*, if possible.
+   end: concatenate all chars and create and return GncGUID*, if possible.
 
-   cleanup-result: g_free the GUID*
+   cleanup-result: g_free the GncGUID*
    cleanup-chars: g_free the result string.
    fail: NA
-   result-fail: g_free the GUID*
+   result-fail: g_free the GncGUID*
    chars-fail: g_free the result string.
 
  */
@@ -769,13 +769,13 @@
                          gpointer *result, const gchar *tag)
 {
     gchar *txt = NULL;
-    GUID *gid;
+    GncGUID *gid;
     gboolean ok;
 
     txt = concatenate_child_result_chars(data_from_children);
     g_return_val_if_fail(txt, FALSE);
 
-    gid = g_new(GUID, 1);
+    gid = g_new(GncGUID, 1);
     if (!gid)
     {
         g_free(txt);
@@ -787,7 +787,7 @@
 
     if (!ok)
     {
-        PERR ("couldn't parse GUID");
+        PERR ("couldn't parse GncGUID");
         g_free(gid);
         return(FALSE);
     }

Modified: gnucash/trunk/src/backend/xml/test/test-dom-converters1.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-dom-converters1.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/test/test-dom-converters1.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -242,8 +242,8 @@
     int i;
     for (i = 0; i < 20; i++)
     {
-        GUID *test_guid1;
-        GUID *test_guid2;
+        GncGUID *test_guid1;
+        GncGUID *test_guid2;
         xmlNodePtr test_node;
 
         test_guid1 = get_random_guid();

Modified: gnucash/trunk/src/backend/xml/test/test-file-stuff.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-file-stuff.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/test/test-file-stuff.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -187,9 +187,9 @@
 }
 
 gboolean
-equals_node_val_vs_guid(xmlNodePtr node, const GUID *id)
+equals_node_val_vs_guid(xmlNodePtr node, const GncGUID *id)
 {
-    GUID *cmpid;
+    GncGUID *cmpid;
 
     g_return_val_if_fail(node, FALSE);
     g_return_val_if_fail(id, FALSE);

Modified: gnucash/trunk/src/backend/xml/test/test-file-stuff.h
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-file-stuff.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/test/test-file-stuff.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -27,7 +27,7 @@
 /**/
 gboolean check_dom_tree_version(xmlNodePtr node, gchar *verstr);
 gboolean equals_node_val_vs_string(xmlNodePtr node, const gchar* str);
-gboolean equals_node_val_vs_guid(xmlNodePtr node, const GUID *id);
+gboolean equals_node_val_vs_guid(xmlNodePtr node, const GncGUID *id);
 gboolean equals_node_val_vs_commodity(xmlNodePtr node,
                                       const gnc_commodity *com, QofBook *);
 gboolean equals_node_val_vs_kvp_frame(xmlNodePtr node, const kvp_frame *frm);

Modified: gnucash/trunk/src/backend/xml/test/test-xml-transaction.c
===================================================================
--- gnucash/trunk/src/backend/xml/test/test-xml-transaction.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/backend/xml/test/test-xml-transaction.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -81,7 +81,7 @@
             }
             else if (safe_strcmp((char*)mark2->name, "split:account") == 0)
             {
-                GUID *accid = dom_tree_to_guid(mark2);
+                GncGUID *accid = dom_tree_to_guid(mark2);
                 Account *account = xaccSplitGetAccount (spl);
 
                 if (guid_equal(accid, xaccAccountGetGUID(account)))
@@ -110,7 +110,7 @@
     {
         if (safe_strcmp((char*)mark->name, "split:id") == 0)
         {
-            GUID *id = dom_tree_to_guid(mark);
+            GncGUID *id = dom_tree_to_guid(mark);
 
             if (!guid_equal(id, xaccSplitGetGUID(spl)))
             {
@@ -184,7 +184,7 @@
         }
         else if (safe_strcmp((char*)mark->name, "split:account") == 0)
         {
-            GUID *id = dom_tree_to_guid(mark);
+            GncGUID *id = dom_tree_to_guid(mark);
             Account *account = xaccSplitGetAccount (spl);
 
             if (!guid_equal(id, xaccAccountGetGUID(account)))

Modified: gnucash/trunk/src/base-typemaps.i
===================================================================
--- gnucash/trunk/src/base-typemaps.i	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/base-typemaps.i	2010-03-27 21:01:21 UTC (rev 18969)
@@ -27,10 +27,10 @@
 %typemap(in) Timespec "$1 = gnc_timepair2timespec($input);"
 %typemap(out) Timespec "$result = gnc_timespec2timepair($1);"
 
-%typemap(in) GUID "$1 = gnc_scm2guid($input);"
-%typemap(out) GUID "$result = gnc_guid2scm($1);"
-%typemap(in) GUID * (GUID g) " g = gnc_scm2guid($input); $1 = &g; "
-%typemap(out) GUID * " $result = ($1) ? gnc_guid2scm(*($1)): SCM_BOOL_F; "
+%typemap(in) GncGUID "$1 = gnc_scm2guid($input);"
+%typemap(out) GncGUID "$result = gnc_guid2scm($1);"
+%typemap(in) GncGUID * (GncGUID g) " g = gnc_scm2guid($input); $1 = &g; "
+%typemap(out) GncGUID * " $result = ($1) ? gnc_guid2scm(*($1)): SCM_BOOL_F; "
 
 %typemap(in) gnc_numeric "$1 = gnc_scm_to_numeric($input);"
 %typemap(out) gnc_numeric "$result = gnc_numeric_to_scm($1);"

Modified: gnucash/trunk/src/business/business-core/business-core.i
===================================================================
--- gnucash/trunk/src/business/business-core/business-core.i	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/business-core.i	2010-03-27 21:01:21 UTC (rev 18969)
@@ -38,40 +38,40 @@
 %rename(gncOwnerReturnGUID) gncOwnerRetGUID;
 
 %inline %{
-static GUID gncTaxTableReturnGUID(GncTaxTable *x)
+static GncGUID gncTaxTableReturnGUID(GncTaxTable *x)
 { return (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null())); }
 
-static GUID gncInvoiceReturnGUID(GncInvoice *x)
+static GncGUID gncInvoiceReturnGUID(GncInvoice *x)
 { return (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null())); }
 
-static GUID gncJobReturnGUID(GncJob *x)
+static GncGUID gncJobReturnGUID(GncJob *x)
 { return (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null())); }
 
-static GUID gncVendorReturnGUID(GncVendor *x)
+static GncGUID gncVendorReturnGUID(GncVendor *x)
 { return (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null())); }
 
-static GUID gncCustomerReturnGUID(GncCustomer *x)
+static GncGUID gncCustomerReturnGUID(GncCustomer *x)
 { return (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null())); }
 
-static GUID gncEmployeeReturnGUID(GncEmployee *x)
+static GncGUID gncEmployeeReturnGUID(GncEmployee *x)
 { return (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null())); }
 
-static GncTaxTable * gncTaxTableLookupFlip(GUID g, QofBook *b)
+static GncTaxTable * gncTaxTableLookupFlip(GncGUID g, QofBook *b)
 { return gncTaxTableLookup(b, &g); }
 
-static GncInvoice * gncInvoiceLookupFlip(GUID g, QofBook *b)
+static GncInvoice * gncInvoiceLookupFlip(GncGUID g, QofBook *b)
 { return gncInvoiceLookup(b, &g); }
 
-static GncJob * gncJobLookupFlip(GUID g, QofBook *b)
+static GncJob * gncJobLookupFlip(GncGUID g, QofBook *b)
 { return gncJobLookup(b, &g); }
 
-static GncVendor * gncVendorLookupFlip(GUID g, QofBook *b)
+static GncVendor * gncVendorLookupFlip(GncGUID g, QofBook *b)
 { return gncVendorLookup(b, &g); }
 
-static GncCustomer * gncCustomerLookupFlip(GUID g, QofBook *b)
+static GncCustomer * gncCustomerLookupFlip(GncGUID g, QofBook *b)
 { return gncCustomerLookup(b, &g); }
 
-static GncEmployee * gncEmployeeLookupFlip(GUID g, QofBook *b)
+static GncEmployee * gncEmployeeLookupFlip(GncGUID g, QofBook *b)
 { return gncEmployeeLookup(b, &g); }
 
 %}

Modified: gnucash/trunk/src/business/business-core/gncBillTerm.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncBillTerm.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncBillTerm.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -117,9 +117,9 @@
  *  by the guid, and is residing in the book. Returns NULL if the
  *  instance can't be found.
  *  Equivalent function prototype is
- *  GncBillTerm * gncBillTermLookup (QofBook *book, const GUID *guid);
+ *  GncBillTerm * gncBillTermLookup (QofBook *book, const GncGUID *guid);
  */
-static inline GncBillTerm * gncBillTermLookup (const QofBook *book, const GUID *guid)
+static inline GncBillTerm * gncBillTermLookup (const QofBook *book, const GncGUID *guid)
 {
     QOF_BOOK_RETURN_ENTITY(book, guid,GNC_ID_BILLTERM, GncBillTerm);
 }

Modified: gnucash/trunk/src/business/business-core/gncCustomer.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncCustomer.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncCustomer.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -113,9 +113,9 @@
  *  by the guid, and is residing in the book. Returns NULL if the
  *  instance can't be found.
  *  Equivalent function prototype is
- *  GncCustomer * gncCustomerLookup (QofBook *book, const GUID *guid);
+ *  GncCustomer * gncCustomerLookup (QofBook *book, const GncGUID *guid);
  */
-static inline GncCustomer * gncCustomerLookup (const QofBook *book, const GUID *guid)
+static inline GncCustomer * gncCustomerLookup (const QofBook *book, const GncGUID *guid)
 {
     QOF_BOOK_RETURN_ENTITY(book, guid, GNC_ID_CUSTOMER, GncCustomer);
 }

Modified: gnucash/trunk/src/business/business-core/gncEmployee.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncEmployee.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncEmployee.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -97,9 +97,9 @@
  *  by the guid, and is residing in the book. Returns NULL if the
  *  instance can't be found.
  *  Equivalent function prototype is
- *  GncEmployee * gncEmployeeLookup (QofBook *book, const GUID *guid);
+ *  GncEmployee * gncEmployeeLookup (QofBook *book, const GncGUID *guid);
  */
-static inline GncEmployee * gncEmployeeLookup (const QofBook *book, const GUID *guid)
+static inline GncEmployee * gncEmployeeLookup (const QofBook *book, const GncGUID *guid)
 {
     QOF_BOOK_RETURN_ENTITY(book, guid, GNC_ID_EMPLOYEE, GncEmployee);
 }

Modified: gnucash/trunk/src/business/business-core/gncEntry.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncEntry.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncEntry.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -220,9 +220,9 @@
  *  by the guid, and is residing in the book. Returns NULL if the
  *  instance can't be found.
  *  Equivalent function prototype is
- *  GncEntry * gncEntryLookup (QofBook *book, const GUID *guid);
+ *  GncEntry * gncEntryLookup (QofBook *book, const GncGUID *guid);
  */
-static inline GncEntry * gncEntryLookup (const QofBook *book, const GUID *guid)
+static inline GncEntry * gncEntryLookup (const QofBook *book, const GncGUID *guid)
 {
     QOF_BOOK_RETURN_ENTITY(book, guid, GNC_ID_ENTRY, GncEntry);
 }

Modified: gnucash/trunk/src/business/business-core/gncEntryP.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncEntryP.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncEntryP.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -32,7 +32,7 @@
 #include "gncEntry.h"
 
 gboolean gncEntryRegister (void);
-void gncEntrySetGUID (GncEntry *entry, const GUID *guid);
+void gncEntrySetGUID (GncEntry *entry, const GncGUID *guid);
 void gncEntrySetOrder (GncEntry *entry, GncOrder *order);
 void gncEntrySetInvoice (GncEntry *entry, GncInvoice *invoice);
 void gncEntrySetBill (GncEntry *entry, GncInvoice *bill);

Modified: gnucash/trunk/src/business/business-core/gncInvoice.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncInvoice.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncInvoice.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -1040,7 +1040,7 @@
 {
     KvpFrame *kvp;
     KvpValue *value;
-    GUID *guid;
+    GncGUID *guid;
     QofBook *book;
 
     if (!lot) return NULL;
@@ -1080,7 +1080,7 @@
 {
     KvpFrame *kvp;
     KvpValue *value;
-    GUID *guid;
+    GncGUID *guid;
     QofBook *book;
 
     if (!txn) return NULL;

Modified: gnucash/trunk/src/business/business-core/gncInvoice.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncInvoice.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncInvoice.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -183,9 +183,9 @@
  *  by the guid, and is residing in the book. Returns NULL if the
  *  instance can't be found.
  *  Equivalent function prototype is
- *  GncInvoice * gncInvoiceLookup (QofBook *book, const GUID *guid);
+ *  GncInvoice * gncInvoiceLookup (QofBook *book, const GncGUID *guid);
  */
-static inline GncInvoice * gncInvoiceLookup (const QofBook *book, const GUID *guid)
+static inline GncInvoice * gncInvoiceLookup (const QofBook *book, const GncGUID *guid)
 {
     QOF_BOOK_RETURN_ENTITY(book, guid, GNC_ID_INVOICE, GncInvoice);
 }

Modified: gnucash/trunk/src/business/business-core/gncJob.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncJob.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncJob.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -88,9 +88,9 @@
  *  by the guid, and is residing in the book. Returns NULL if the
  *  instance can't be found.
  *  Equivalent function prototype is
- *  GncJob * gncJobLookup (QofBook *book, const GUID *guid);
+ *  GncJob * gncJobLookup (QofBook *book, const GncGUID *guid);
  */
-static inline GncJob * gncJobLookup (const QofBook *book, const GUID *guid)
+static inline GncJob * gncJobLookup (const QofBook *book, const GncGUID *guid)
 {
     QOF_BOOK_RETURN_ENTITY(book, guid, GNC_ID_JOB, GncJob);
 }

Modified: gnucash/trunk/src/business/business-core/gncOrder.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncOrder.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncOrder.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -99,9 +99,9 @@
  *  by the guid, and is residing in the book. Returns NULL if the
  *  instance can't be found.
  *  Equivalent function prototype is
- *  GncOrder * gncOrderLookup (QofBook *book, const GUID *guid);
+ *  GncOrder * gncOrderLookup (QofBook *book, const GncGUID *guid);
  */
-static inline GncOrder * gncOrderLookup (const QofBook *book, const GUID *guid)
+static inline GncOrder * gncOrderLookup (const QofBook *book, const GncGUID *guid)
 {
     QOF_BOOK_RETURN_ENTITY(book, guid, GNC_ID_ORDER, GncOrder);
 }

Modified: gnucash/trunk/src/business/business-core/gncOwner.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncOwner.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncOwner.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -336,7 +336,7 @@
     }
 }
 
-const GUID * gncOwnerGetGUID (const GncOwner *owner)
+const GncGUID * gncOwnerGetGUID (const GncOwner *owner)
 {
     if (!owner) return NULL;
 
@@ -357,9 +357,9 @@
     }
 }
 
-GUID gncOwnerRetGUID (GncOwner *owner)
+GncGUID gncOwnerRetGUID (GncOwner *owner)
 {
-    const GUID *guid = gncOwnerGetGUID (owner);
+    const GncGUID *guid = gncOwnerGetGUID (owner);
     if (guid)
         return *guid;
     return *guid_null ();
@@ -409,7 +409,7 @@
     }
 }
 
-const GUID * gncOwnerGetEndGUID (GncOwner *owner)
+const GncGUID * gncOwnerGetEndGUID (GncOwner *owner)
 {
     if (!owner) return NULL;
     owner = gncOwnerGetEndOwner (owner);
@@ -440,7 +440,7 @@
 {
     KvpFrame *kvp;
     KvpValue *value;
-    GUID *guid;
+    GncGUID *guid;
     QofBook *book;
     GncOwnerType type;
 
@@ -532,7 +532,7 @@
     qof_class_register (GNC_ID_LOT, NULL, params);
 }
 
-gboolean gncOwnerGetOwnerFromTypeGuid (QofBook *book, GncOwner *owner, QofIdType type, GUID *guid)
+gboolean gncOwnerGetOwnerFromTypeGuid (QofBook *book, GncOwner *owner, QofIdType type, GncGUID *guid)
 {
     if (!book || !owner || !type || !guid) return FALSE;
 

Modified: gnucash/trunk/src/business/business-core/gncOwner.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncOwner.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncOwner.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -118,18 +118,18 @@
 const char * gncOwnerGetName (const GncOwner *owner);
 gnc_commodity * gncOwnerGetCurrency (const GncOwner *owner);
 
-/** Get the GUID of the immediate owner */
-const GUID * gncOwnerGetGUID (const GncOwner *owner);
-GUID gncOwnerRetGUID (GncOwner *owner);
+/** Get the GncGUID of the immediate owner */
+const GncGUID * gncOwnerGetGUID (const GncOwner *owner);
+GncGUID gncOwnerRetGUID (GncOwner *owner);
 
 gboolean gncOwnerIsValid (const GncOwner *owner);
 
 /**
- * Get the "parent" Owner or GUID thereof.  The "parent" owner
+ * Get the "parent" Owner or GncGUID thereof.  The "parent" owner
  * is the Customer or Vendor, or the Owner of a Job
  */
 GncOwner * gncOwnerGetEndOwner (GncOwner *owner);
-const GUID * gncOwnerGetEndGUID (GncOwner *owner);
+const GncGUID * gncOwnerGetEndGUID (GncOwner *owner);
 
 /** attach an owner to a lot */
 void gncOwnerAttachToLot (const GncOwner *owner, GNCLot *lot);
@@ -139,7 +139,7 @@
  */
 gboolean gncOwnerGetOwnerFromLot (GNCLot *lot, GncOwner *owner);
 
-gboolean gncOwnerGetOwnerFromTypeGuid (QofBook *book, GncOwner *owner, QofIdType type, GUID *guid);
+gboolean gncOwnerGetOwnerFromTypeGuid (QofBook *book, GncOwner *owner, QofIdType type, GncGUID *guid);
 
 /** Get the kvp-frame from the underlying owner object */
 KvpFrame* gncOwnerGetSlots(GncOwner* owner);

Modified: gnucash/trunk/src/business/business-core/gncTaxTable.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncTaxTable.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncTaxTable.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -142,9 +142,9 @@
  *  by the guid, and is residing in the book. Returns NULL if the
  *  instance can't be found.
  *  Equivalent function prototype is
- *  GncTaxTable * gncTaxTableLookup (QofBook *book, const GUID *guid);
+ *  GncTaxTable * gncTaxTableLookup (QofBook *book, const GncGUID *guid);
  */
-static inline GncTaxTable *gncTaxTableLookup (const QofBook* book, const GUID *guid)
+static inline GncTaxTable *gncTaxTableLookup (const QofBook* book, const GncGUID *guid)
 {
     QOF_BOOK_RETURN_ENTITY(book, guid, GNC_ID_TAXTABLE, GncTaxTable);
 }

Modified: gnucash/trunk/src/business/business-core/gncVendor.h
===================================================================
--- gnucash/trunk/src/business/business-core/gncVendor.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/gncVendor.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -110,9 +110,9 @@
  *  by the guid, and is residing in the book. Returns NULL if the
  *  instance can't be found.
  *  Equivalent function prototype is
- *  GncVendor * gncVendorLookup (QofBook *book, const GUID *guid);
+ *  GncVendor * gncVendorLookup (QofBook *book, const GncGUID *guid);
  */
-static inline GncVendor * gncVendorLookup (const QofBook *book, const GUID *guid)
+static inline GncVendor * gncVendorLookup (const QofBook *book, const GncGUID *guid)
 {
     QOF_BOOK_RETURN_ENTITY(book, guid, GNC_ID_VENDOR, GncVendor);
 }

Modified: gnucash/trunk/src/business/business-core/sql/gnc-bill-term-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-bill-term-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/sql/gnc-bill-term-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -97,7 +97,7 @@
 
 typedef struct {
 	/*@ dependent @*/ GncBillTerm* billterm;
-	GUID guid;
+	GncGUID guid;
     gboolean have_guid;
 } billterm_parent_guid_struct;
 
@@ -119,7 +119,7 @@
 {
     const GncBillTerm* billterm;
     const GncBillTerm* pParent;
-    const GUID* parent_guid;
+    const GncGUID* parent_guid;
 
 	g_return_val_if_fail( pObject != NULL, NULL );
 	g_return_val_if_fail( GNC_IS_BILLTERM(pObject), NULL );
@@ -141,7 +141,7 @@
     GncBillTerm* billterm;
     GncBillTerm* parent;
     QofBook* pBook;
-    GUID* guid = (GUID*)value;
+    GncGUID* guid = (GncGUID*)value;
 
     g_return_if_fail( data != NULL );
     g_return_if_fail( GNC_IS_BILLTERM(data) );
@@ -162,7 +162,7 @@
 bt_set_parent_guid( gpointer pObject, /*@ null @*/ gpointer pValue )
 {
 	billterm_parent_guid_struct* s = (billterm_parent_guid_struct*)pObject;
-    GUID* guid = (GUID*)pValue;
+    GncGUID* guid = (GncGUID*)pValue;
 
 	g_return_if_fail( pObject != NULL );
 	g_return_if_fail( pValue != NULL );
@@ -175,7 +175,7 @@
 load_single_billterm( GncSqlBackend* be, GncSqlRow* row,
 					GList** l_billterms_needing_parents )
 {
-    const GUID* guid;
+    const GncGUID* guid;
     GncBillTerm* pBillTerm;
 
     g_return_val_if_fail( be != NULL, NULL );
@@ -191,7 +191,7 @@
 
     /* If the billterm doesn't have a parent, it might be because it hasn't been loaded yet.
        If so, add this billterm to the list of billterms with no parent, along with the parent
-       GUID so that after they are all loaded, the parents can be fixed up. */
+       GncGUID so that after they are all loaded, the parents can be fixed up. */
     if ( gncBillTermGetParent( pBillTerm ) == NULL )
     {
 		billterm_parent_guid_struct* s = g_malloc( (gsize)sizeof(billterm_parent_guid_struct) );
@@ -346,7 +346,7 @@
                     const GncSqlColumnTableEntry* table_row )
 {
     const GValue* val;
-    GUID guid;
+    GncGUID guid;
     GncBillTerm* term = NULL;
 
     g_return_if_fail( be != NULL );

Modified: gnucash/trunk/src/business/business-core/sql/gnc-customer-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-customer-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/sql/gnc-customer-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -87,7 +87,7 @@
 static GncCustomer*
 load_single_customer( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
+    const GncGUID* guid;
     GncCustomer* pCustomer;
 
     g_return_val_if_fail( be != NULL, NULL );

Modified: gnucash/trunk/src/business/business-core/sql/gnc-employee-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-employee-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/sql/gnc-employee-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -78,7 +78,7 @@
 static GncEmployee*
 load_single_employee( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
+    const GncGUID* guid;
     GncEmployee* pEmployee;
 
     g_return_val_if_fail( be != NULL, NULL );
@@ -162,7 +162,7 @@
 save_employee( GncSqlBackend* be, QofInstance* inst )
 {
     GncEmployee* emp;
-    const GUID* guid;
+    const GncGUID* guid;
     gint op;
     gboolean is_infant;
     gboolean is_ok = TRUE;

Modified: gnucash/trunk/src/business/business-core/sql/gnc-entry-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-entry-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/sql/gnc-entry-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -152,7 +152,7 @@
 static GncEntry*
 load_single_entry( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
+    const GncGUID* guid;
     GncEntry* pEntry;
 
     g_return_val_if_fail( be != NULL, NULL );

Modified: gnucash/trunk/src/business/business-core/sql/gnc-invoice-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-invoice-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/sql/gnc-invoice-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -95,7 +95,7 @@
 static GncInvoice*
 load_single_invoice( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
+    const GncGUID* guid;
     GncInvoice* pInvoice;
 
     g_return_val_if_fail( be != NULL, NULL );
@@ -179,7 +179,7 @@
 static gboolean
 save_invoice( GncSqlBackend* be, QofInstance* inst )
 {
-    const GUID* guid;
+    const GncGUID* guid;
     GncInvoice* invoice;
     gint op;
     gboolean is_infant;
@@ -286,7 +286,7 @@
                    const GncSqlColumnTableEntry* table_row )
 {
     const GValue* val;
-    GUID guid;
+    GncGUID guid;
     GncInvoice* invoice = NULL;
 
     g_return_if_fail( be != NULL );

Modified: gnucash/trunk/src/business/business-core/sql/gnc-job-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-job-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/sql/gnc-job-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -72,7 +72,7 @@
 static GncJob*
 load_single_job( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
+    const GncGUID* guid;
     GncJob* pJob;
 
     g_return_val_if_fail( be != NULL, NULL );

Modified: gnucash/trunk/src/business/business-core/sql/gnc-order-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-order-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/sql/gnc-order-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -69,7 +69,7 @@
 static GncOrder*
 load_single_order( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
+    const GncGUID* guid;
     GncOrder* pOrder;
 
     g_return_val_if_fail( be != NULL, NULL );
@@ -205,7 +205,7 @@
                  const GncSqlColumnTableEntry* table_row )
 {
     const GValue* val;
-    GUID guid;
+    GncGUID guid;
     GncOrder* order = NULL;
 
     g_return_if_fail( be != NULL );

Modified: gnucash/trunk/src/business/business-core/sql/gnc-owner-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-owner-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/sql/gnc-owner-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -55,10 +55,10 @@
     const GValue* val;
     gchar* buf;
     GncOwnerType type;
-    GUID guid;
+    GncGUID guid;
     QofBook* book;
     GncOwner owner;
-    GUID* pGuid = NULL;
+    GncGUID* pGuid = NULL;
 
     g_return_if_fail( be != NULL );
     g_return_if_fail( row != NULL );
@@ -215,7 +215,7 @@
     GValue* subfield_value;
     GncOwner* owner;
     gchar* buf;
-    const GUID* guid;
+    const GncGUID* guid;
     gchar guid_buf[GUID_ENCODING_LENGTH+1];
     GncOwnerType type;
     QofInstance* inst = NULL;

Modified: gnucash/trunk/src/business/business-core/sql/gnc-tax-table-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-tax-table-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/sql/gnc-tax-table-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -51,7 +51,7 @@
 typedef struct
 {
     GncSqlBackend* be;
-    const GUID* guid;
+    const GncGUID* guid;
 } guid_info_t;
 
 static gpointer get_obj_guid( gpointer pObject, const QofParam* param );
@@ -123,7 +123,7 @@
 
 typedef struct {
 	/*@ dependent @*/ GncTaxTable* tt;
-	GUID guid;
+	GncGUID guid;
     gboolean have_guid;
 } taxtable_parent_guid_struct;
 
@@ -140,7 +140,7 @@
 static void
 set_obj_guid( gpointer pObject, gpointer pValue )
 {
-    // Nowhere to put the GUID
+    // Nowhere to put the GncGUID
 }
 
 static void
@@ -173,7 +173,7 @@
 {
     const GncTaxTable* tt;
     const GncTaxTable* pParent;
-    const GUID* parent_guid;
+    const GncGUID* parent_guid;
 
 	g_return_val_if_fail( pObject != NULL, NULL );
 	g_return_val_if_fail( GNC_IS_TAXTABLE(pObject), NULL );
@@ -195,7 +195,7 @@
     GncTaxTable* tt;
     GncTaxTable* parent;
     QofBook* pBook;
-    GUID* guid = (GUID*)value;
+    GncGUID* guid = (GncGUID*)value;
 
     g_return_if_fail( data != NULL );
     g_return_if_fail( GNC_IS_TAXTABLE(data) );
@@ -216,7 +216,7 @@
 tt_set_parent_guid( gpointer pObject, /*@ null @*/ gpointer pValue )
 {
 	taxtable_parent_guid_struct* s = (taxtable_parent_guid_struct*)pObject;
-    GUID* guid = (GUID*)pValue;
+    GncGUID* guid = (GncGUID*)pValue;
 
 	g_return_if_fail( pObject != NULL );
 	g_return_if_fail( pValue != NULL );
@@ -278,7 +278,7 @@
 load_single_taxtable( GncSqlBackend* be, GncSqlRow* row,
 					GList** l_tt_needing_parents )
 {
-    const GUID* guid;
+    const GncGUID* guid;
     GncTaxTable* tt;
 
     g_return_if_fail( be != NULL );
@@ -296,7 +296,7 @@
 
     /* If the tax table doesn't have a parent, it might be because it hasn't been loaded yet.
        If so, add this tax table to the list of tax tables with no parent, along with the parent
-       GUID so that after they are all loaded, the parents can be fixed up. */
+       GncGUID so that after they are all loaded, the parents can be fixed up. */
     if( gncTaxTableGetParent( tt ) == NULL ) {
 		taxtable_parent_guid_struct* s = g_malloc( (gsize)sizeof(taxtable_parent_guid_struct) );
 		g_assert( s != NULL );
@@ -398,7 +398,7 @@
 
 /* ================================================================= */
 static gboolean
-delete_all_tt_entries( GncSqlBackend* be, const GUID* guid )
+delete_all_tt_entries( GncSqlBackend* be, const GncGUID* guid )
 {
     guid_info_t guid_info;
 
@@ -412,7 +412,7 @@
 }
 
 static gboolean
-save_tt_entries( GncSqlBackend* be, const GUID* guid, GList* entries )
+save_tt_entries( GncSqlBackend* be, const GncGUID* guid, GList* entries )
 {
     GList* entry;
     gboolean is_ok;
@@ -440,7 +440,7 @@
 save_taxtable( GncSqlBackend* be, QofInstance* inst )
 {
     GncTaxTable* tt;
-    const GUID* guid;
+    const GncGUID* guid;
     gint op;
     gboolean is_infant;
     gboolean is_ok;
@@ -524,7 +524,7 @@
                     const GncSqlColumnTableEntry* table_row )
 {
     const GValue* val;
-    GUID guid;
+    GncGUID guid;
     GncTaxTable* taxtable = NULL;
 
     g_return_if_fail( be != NULL );

Modified: gnucash/trunk/src/business/business-core/sql/gnc-vendor-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-vendor-sql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/sql/gnc-vendor-sql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -86,7 +86,7 @@
 static GncVendor*
 load_single_vendor( GncSqlBackend* be, GncSqlRow* row )
 {
-    const GUID* guid;
+    const GncGUID* guid;
     GncVendor* pVendor;
 
     g_return_val_if_fail( be != NULL, NULL );
@@ -162,7 +162,7 @@
 save_vendor( GncSqlBackend* be, QofInstance* inst )
 {
     GncVendor* v;
-    const GUID* guid;
+    const GncGUID* guid;
     gint op;
     gboolean is_infant;
     gboolean is_ok = TRUE;

Modified: gnucash/trunk/src/business/business-core/test/test-customer.c
===================================================================
--- gnucash/trunk/src/business/business-core/test/test-customer.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/test/test-customer.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -83,7 +83,7 @@
 
     /* Test setting/getting routines; does the active flag get set right? */
     {
-        GUID guid;
+        GncGUID guid;
 
         test_string_fcn (book, "Id", gncCustomerSetID, gncCustomerGetID);
         test_string_fcn (book, "Name", gncCustomerSetName, gncCustomerGetName);
@@ -137,7 +137,7 @@
 
     /* Test the Entity Table */
     {
-        const GUID *guid;
+        const GncGUID *guid;
 
         guid = gncCustomerGetGUID (customer);
         do_test (gncCustomerLookup (book, guid) == customer, "Entity Table");

Modified: gnucash/trunk/src/business/business-core/test/test-employee.c
===================================================================
--- gnucash/trunk/src/business/business-core/test/test-employee.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/test/test-employee.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -88,7 +88,7 @@
 
     /* Test setting/getting routines; does the active flag get set right? */
     {
-        GUID guid;
+        GncGUID guid;
 
         test_string_fcn (book, "Id", gncEmployeeSetID, gncEmployeeGetID);
         test_string_fcn (book, "Username", gncEmployeeSetUsername, gncEmployeeGetUsername);

Modified: gnucash/trunk/src/business/business-core/test/test-job.c
===================================================================
--- gnucash/trunk/src/business/business-core/test/test-job.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/test/test-job.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -92,7 +92,7 @@
 
     /* Test setting/getting routines; does the active flag get set right? */
     {
-        GUID guid;
+        GncGUID guid;
 
         test_string_fcn (book, "Id", gncJobSetID, gncJobGetID);
         test_string_fcn (book, "Name", gncJobSetName, gncJobGetName);

Modified: gnucash/trunk/src/business/business-core/test/test-vendor.c
===================================================================
--- gnucash/trunk/src/business/business-core/test/test-vendor.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/test/test-vendor.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -91,7 +91,7 @@
 
     /* Test setting/getting routines; does the active flag get set right? */
     {
-        GUID guid;
+        GncGUID guid;
 
         test_string_fcn (book, "Id", gncVendorSetID, gncVendorGetID);
         test_string_fcn (book, "Name", gncVendorSetName, gncVendorGetName);

Modified: gnucash/trunk/src/business/business-core/xml/gnc-bill-term-xml-v2.c
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-bill-term-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-bill-term-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -265,7 +265,7 @@
 set_parent_child (xmlNodePtr node, struct billterm_pdata *pdata,
                   void (*func)(GncBillTerm *, GncBillTerm *))
 {
-    GUID *guid;
+    GncGUID *guid;
     GncBillTerm *term;
 
     guid = dom_tree_to_guid(node);
@@ -300,7 +300,7 @@
 billterm_guid_handler (xmlNodePtr node, gpointer billterm_pdata)
 {
     struct billterm_pdata *pdata = billterm_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncBillTerm *term;
 
     guid = dom_tree_to_guid(node);
@@ -769,7 +769,7 @@
 }
 
 GncBillTerm *
-gnc_billterm_xml_find_or_create(QofBook *book, GUID *guid)
+gnc_billterm_xml_find_or_create(QofBook *book, GncGUID *guid)
 {
     GncBillTerm *term;
 

Modified: gnucash/trunk/src/business/business-core/xml/gnc-bill-term-xml-v2.h
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-bill-term-xml-v2.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-bill-term-xml-v2.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -26,6 +26,6 @@
 
 #include "gncBillTerm.h"
 void gnc_billterm_xml_initialize (void);
-GncBillTerm *gnc_billterm_xml_find_or_create(QofBook *book, GUID *guid);
+GncBillTerm *gnc_billterm_xml_find_or_create(QofBook *book, GncGUID *guid);
 
 #endif /* GNC_BILLTERM_XML_V2_H */

Modified: gnucash/trunk/src/business/business-core/xml/gnc-customer-xml-v2.c
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-customer-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-customer-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -187,7 +187,7 @@
 customer_guid_handler (xmlNodePtr node, gpointer cust_pdata)
 {
     struct customer_pdata *pdata = cust_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncCustomer *cust;
 
     guid = dom_tree_to_guid(node);
@@ -229,7 +229,7 @@
 customer_terms_handler (xmlNodePtr node, gpointer cust_pdata)
 {
     struct customer_pdata *pdata = cust_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncBillTerm *term;
 
     guid = dom_tree_to_guid(node);
@@ -335,7 +335,7 @@
 customer_taxtable_handler (xmlNodePtr node, gpointer cust_pdata)
 {
     struct customer_pdata *pdata = cust_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncTaxTable *taxtable;
 
     guid = dom_tree_to_guid (node);

Modified: gnucash/trunk/src/business/business-core/xml/gnc-employee-xml-v2.c
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-employee-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-employee-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -159,7 +159,7 @@
 employee_guid_handler (xmlNodePtr node, gpointer employee_pdata)
 {
     struct employee_pdata *pdata = employee_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncEmployee *employee;
 
     guid = dom_tree_to_guid(node);
@@ -275,7 +275,7 @@
 employee_ccard_handler (xmlNodePtr node, gpointer employee_pdata)
 {
     struct employee_pdata *pdata = employee_pdata;
-    GUID *guid;
+    GncGUID *guid;
     Account *ccard_acc;
 
     guid = dom_tree_to_guid(node);

Modified: gnucash/trunk/src/business/business-core/xml/gnc-entry-xml-v2.c
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-entry-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-entry-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -274,7 +274,7 @@
 set_account(xmlNodePtr node, struct entry_pdata *pdata,
             void (*func)(GncEntry *entry, Account *acc))
 {
-    GUID *guid;
+    GncGUID *guid;
     Account * acc;
 
     guid = dom_tree_to_guid (node);
@@ -294,7 +294,7 @@
 set_taxtable (xmlNodePtr node, struct entry_pdata *pdata,
               void (*func)(GncEntry *entry, GncTaxTable *taxtable))
 {
-    GUID *guid;
+    GncGUID *guid;
     GncTaxTable *taxtable;
 
     guid = dom_tree_to_guid (node);
@@ -319,7 +319,7 @@
 entry_guid_handler (xmlNodePtr node, gpointer entry_pdata)
 {
     struct entry_pdata *pdata = entry_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncEntry *entry;
 
     guid = dom_tree_to_guid(node);
@@ -561,7 +561,7 @@
 entry_order_handler (xmlNodePtr node, gpointer entry_pdata)
 {
     struct entry_pdata *pdata = entry_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncOrder *order;
 
     guid = dom_tree_to_guid (node);
@@ -586,7 +586,7 @@
 entry_invoice_handler (xmlNodePtr node, gpointer entry_pdata)
 {
     struct entry_pdata *pdata = entry_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncInvoice *invoice;
 
     guid = dom_tree_to_guid (node);
@@ -611,7 +611,7 @@
 entry_bill_handler (xmlNodePtr node, gpointer entry_pdata)
 {
     struct entry_pdata *pdata = entry_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncInvoice *invoice;
 
     guid = dom_tree_to_guid (node);

Modified: gnucash/trunk/src/business/business-core/xml/gnc-invoice-xml-v2.c
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-invoice-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-invoice-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -195,7 +195,7 @@
 invoice_guid_handler (xmlNodePtr node, gpointer invoice_pdata)
 {
     struct invoice_pdata *pdata = invoice_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncInvoice *invoice;
 
     guid = dom_tree_to_guid(node);
@@ -289,7 +289,7 @@
 invoice_terms_handler (xmlNodePtr node, gpointer invoice_pdata)
 {
     struct invoice_pdata *pdata = invoice_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncBillTerm *term;
 
     guid = dom_tree_to_guid(node);
@@ -306,7 +306,7 @@
 invoice_posttxn_handler (xmlNodePtr node, gpointer invoice_pdata)
 {
     struct invoice_pdata *pdata = invoice_pdata;
-    GUID *guid;
+    GncGUID *guid;
     Transaction *txn;
 
     guid = dom_tree_to_guid(node);
@@ -323,7 +323,7 @@
 invoice_postlot_handler (xmlNodePtr node, gpointer invoice_pdata)
 {
     struct invoice_pdata *pdata = invoice_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GNCLot *lot;
 
     guid = dom_tree_to_guid(node);
@@ -340,7 +340,7 @@
 invoice_postacc_handler (xmlNodePtr node, gpointer invoice_pdata)
 {
     struct invoice_pdata *pdata = invoice_pdata;
-    GUID *guid;
+    GncGUID *guid;
     Account *acc;
 
     guid = dom_tree_to_guid(node);

Modified: gnucash/trunk/src/business/business-core/xml/gnc-job-xml-v2.c
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-job-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-job-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -124,7 +124,7 @@
 job_guid_handler (xmlNodePtr node, gpointer job_pdata)
 {
     struct job_pdata *pdata = job_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncJob *job;
 
     guid = dom_tree_to_guid(node);

Modified: gnucash/trunk/src/business/business-core/xml/gnc-order-xml-v2.c
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-order-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-order-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -141,7 +141,7 @@
 order_guid_handler (xmlNodePtr node, gpointer order_pdata)
 {
     struct order_pdata *pdata = order_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncOrder *order;
 
     guid = dom_tree_to_guid(node);

Modified: gnucash/trunk/src/business/business-core/xml/gnc-owner-xml-v2.c
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-owner-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-owner-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -128,7 +128,7 @@
 owner_id_handler (xmlNodePtr node, gpointer owner_pdata)
 {
     struct owner_pdata *pdata = owner_pdata;
-    GUID *guid;
+    GncGUID *guid;
 
     guid = dom_tree_to_guid(node);
     g_return_val_if_fail (guid, FALSE);

Modified: gnucash/trunk/src/business/business-core/xml/gnc-tax-table-xml-v2.c
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-tax-table-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-tax-table-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -145,7 +145,7 @@
 ttentry_acct_handler (xmlNodePtr node, gpointer ttentry_pdata)
 {
     struct ttentry_pdata *pdata = ttentry_pdata;
-    GUID *guid;
+    GncGUID *guid;
     Account * acc;
 
     guid = dom_tree_to_guid (node);
@@ -232,7 +232,7 @@
 set_parent_child (xmlNodePtr node, struct taxtable_pdata *pdata,
                   void (*func)(GncTaxTable *, GncTaxTable *))
 {
-    GUID *guid;
+    GncGUID *guid;
     GncTaxTable *table;
 
     guid = dom_tree_to_guid(node);
@@ -264,7 +264,7 @@
 taxtable_guid_handler (xmlNodePtr node, gpointer taxtable_pdata)
 {
     struct taxtable_pdata *pdata = taxtable_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncTaxTable *table;
 
     guid = dom_tree_to_guid(node);

Modified: gnucash/trunk/src/business/business-core/xml/gnc-vendor-xml-v2.c
===================================================================
--- gnucash/trunk/src/business/business-core/xml/gnc-vendor-xml-v2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-core/xml/gnc-vendor-xml-v2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -173,7 +173,7 @@
 vendor_guid_handler (xmlNodePtr node, gpointer vendor_pdata)
 {
     struct vendor_pdata *pdata = vendor_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncVendor *vendor;
 
     guid = dom_tree_to_guid(node);
@@ -215,7 +215,7 @@
 vendor_terms_handler (xmlNodePtr node, gpointer vendor_pdata)
 {
     struct vendor_pdata *pdata = vendor_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncBillTerm *term;
 
     guid = dom_tree_to_guid(node);
@@ -281,7 +281,7 @@
 vendor_taxtable_handler (xmlNodePtr node, gpointer vendor_pdata)
 {
     struct vendor_pdata *pdata = vendor_pdata;
-    GUID *guid;
+    GncGUID *guid;
     GncTaxTable *taxtable;
 
     guid = dom_tree_to_guid (node);

Modified: gnucash/trunk/src/business/business-gnome/business-urls.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/business-urls.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-gnome/business-urls.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -55,7 +55,7 @@
 
 #define HANDLE_TYPE(URL_TYPE_STR,OBJ_TYPE) {                                 \
   QofBook *book;                                                             \
-  GUID guid;                                                                 \
+  GncGUID guid;                                                                 \
   QofCollection *coll;                                                       \
                                                                              \
   g_return_val_if_fail (location != NULL, FALSE);                            \
@@ -177,7 +177,7 @@
 {
     const char *ownerptr;
     const char *acctptr;
-    GUID guid;
+    GncGUID guid;
     GncOwner owner;
     GncOwnerType type;
     char *etype = NULL;

Modified: gnucash/trunk/src/business/business-gnome/dialog-customer.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-customer.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-gnome/dialog-customer.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -115,7 +115,7 @@
     GncTaxIncluded taxincluded;
     GncBillTerm *	terms;
     CustomerDialogType	dialog_type;
-    GUID		customer_guid;
+    GncGUID		customer_guid;
     gint		component_id;
     QofBook *	book;
     GncCustomer *	created_customer;
@@ -428,7 +428,7 @@
 static gboolean
 find_handler (gpointer find_data, gpointer user_data)
 {
-    const GUID *customer_guid = find_data;
+    const GncGUID *customer_guid = find_data;
     CustomerWindow *cw = user_data;
 
     return(cw && guid_equal(&cw->customer_guid, customer_guid));
@@ -449,7 +449,7 @@
      */
     if (cust)
     {
-        GUID customer_guid;
+        GncGUID customer_guid;
 
         customer_guid = *gncCustomerGetGUID(cust);
         cw = gnc_find_first_gui_component (DIALOG_EDIT_CUSTOMER_CM_CLASS,

Modified: gnucash/trunk/src/business/business-gnome/dialog-employee.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-employee.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-gnome/dialog-employee.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -100,7 +100,7 @@
     /* ACL? */
 
     EmployeeDialogType	dialog_type;
-    GUID		employee_guid;
+    GncGUID		employee_guid;
     gint		component_id;
     QofBook *	book;
     GncEmployee *	created_employee;
@@ -382,7 +382,7 @@
 static gboolean
 find_handler (gpointer find_data, gpointer user_data)
 {
-    const GUID *employee_guid = find_data;
+    const GncGUID *employee_guid = find_data;
     EmployeeWindow *ew = user_data;
 
     return(ew && guid_equal(&ew->employee_guid, employee_guid));
@@ -406,7 +406,7 @@
      */
     if (employee)
     {
-        GUID employee_guid;
+        GncGUID employee_guid;
 
         employee_guid = *gncEmployeeGetGUID (employee);
         ew = gnc_find_first_gui_component (DIALOG_EDIT_EMPLOYEE_CM_CLASS,

Modified: gnucash/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -172,7 +172,7 @@
     invoice_sort_type_t	last_sort;
 
     InvoiceDialogType	dialog_type;
-    GUID		invoice_guid;
+    GncGUID		invoice_guid;
     gint		component_id;
     QofBook *	book;
     GncInvoice *	created_invoice;
@@ -1786,7 +1786,7 @@
 static gboolean
 find_handler (gpointer find_data, gpointer user_data)
 {
-    const GUID *invoice_guid = find_data;
+    const GncGUID *invoice_guid = find_data;
     InvoiceWindow *iw = user_data;
 
     return(iw && guid_equal(&iw->invoice_guid, invoice_guid));
@@ -1810,7 +1810,7 @@
      */
     if (invoice)
     {
-        GUID invoice_guid;
+        GncGUID invoice_guid;
 
         invoice_guid = *gncInvoiceGetGUID (invoice);
         iw = gnc_find_first_gui_component (DIALOG_VIEW_INVOICE_CM_CLASS,
@@ -1869,7 +1869,7 @@
     char *tmp_string = NULL, *owner_type = NULL;
     InvoiceDialogType type;
     GncInvoice *invoice;
-    GUID guid;
+    GncGUID guid;
     QofBook *book;
     GncOwner owner = { 0 };
 
@@ -1885,7 +1885,7 @@
     type = InvoiceDialogTypefromString(tmp_string);
     g_free(tmp_string);
 
-    /* Get Invoice GUID */
+    /* Get Invoice GncGUID */
     tmp_string = g_key_file_get_string(key_file, group_name,
                                        KEY_INVOICE_GUID, &error);
     if (error)
@@ -1918,7 +1918,7 @@
         goto give_up;
     }
 
-    /* Get Owner GUID */
+    /* Get Owner GncGUID */
     tmp_string = g_key_file_get_string(key_file, group_name,
                                        KEY_OWNER_GUID, &error);
     if (error)
@@ -2173,7 +2173,7 @@
          * Try to find an existing window for this invoice.  If found,
          * bring it to the front.
          */
-        GUID invoice_guid;
+        GncGUID invoice_guid;
 
         invoice_guid = *gncInvoiceGetGUID (invoice);
         iw = gnc_find_first_gui_component (DIALOG_NEW_INVOICE_CM_CLASS,
@@ -2537,7 +2537,7 @@
      * owner.  If a Job is supplied, search for all invoices for that
      * job, but if a Customer is supplied, search for all invoices owned
      * by that Customer or any of that Customer's Jobs.  In other words,
-     * match on <supplied-owner's guid> == Invoice->Owner->GUID or
+     * match on <supplied-owner's guid> == Invoice->Owner->GncGUID or
      * Invoice->owner->parentGUID.
      */
     if (owner)

Modified: gnucash/trunk/src/business/business-gnome/dialog-job.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-job.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-gnome/dialog-job.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -78,7 +78,7 @@
     GtkWidget *	active_check;
 
     JobDialogType	dialog_type;
-    GUID		job_guid;
+    GncGUID		job_guid;
     gint		component_id;
     QofBook *	book;
     GncJob *	created_job;
@@ -289,7 +289,7 @@
 static gboolean
 find_handler (gpointer find_data, gpointer user_data)
 {
-    const GUID *job_guid = find_data;
+    const GncGUID *job_guid = find_data;
     JobWindow *jw = user_data;
 
     return(jw && guid_equal(&jw->job_guid, job_guid));
@@ -308,7 +308,7 @@
      */
     if (job)
     {
-        GUID job_guid;
+        GncGUID job_guid;
 
         job_guid = *gncJobGetGUID (job);
         jw = gnc_find_first_gui_component (DIALOG_EDIT_JOB_CM_CLASS,

Modified: gnucash/trunk/src/business/business-gnome/dialog-order.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-order.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-gnome/dialog-order.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -95,7 +95,7 @@
     GncEntryLedger *	ledger;
 
     OrderDialogType	dialog_type;
-    GUID		order_guid;
+    GncGUID		order_guid;
     gint		component_id;
     QofBook *	book;
     GncOrder *	created_order;
@@ -539,7 +539,7 @@
 static gboolean
 find_handler (gpointer find_data, gpointer user_data)
 {
-    const GUID *order_guid = find_data;
+    const GncGUID *order_guid = find_data;
     OrderWindow *ow = user_data;
 
     return(ow && guid_equal(&ow->order_guid, order_guid));
@@ -572,7 +572,7 @@
      */
     if (order)
     {
-        GUID order_guid;
+        GncGUID order_guid;
 
         order_guid = *gncOrderGetGUID(order);
         ow = gnc_find_first_gui_component (class_name, find_handler,

Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-payment.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-gnome/dialog-payment.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -120,7 +120,7 @@
 gnc_payment_dialog_owner_changed(PaymentWindow *pw)
 {
     Account *last_acct = NULL;
-    GUID *guid = NULL;
+    GncGUID *guid = NULL;
     KvpValue* value;
     KvpFrame* slots;
 

Modified: gnucash/trunk/src/business/business-gnome/dialog-vendor.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-vendor.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-gnome/dialog-vendor.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -99,7 +99,7 @@
     GncTaxIncluded taxincluded;
     GncBillTerm *	terms;
     VendorDialogType	dialog_type;
-    GUID		vendor_guid;
+    GncGUID		vendor_guid;
     gint		component_id;
     QofBook *	book;
     GncVendor *	created_vendor;
@@ -347,7 +347,7 @@
 static gboolean
 find_handler (gpointer find_data, gpointer user_data)
 {
-    const GUID *vendor_guid = find_data;
+    const GncGUID *vendor_guid = find_data;
     VendorWindow *vw = user_data;
 
     return(vw && guid_equal(&vw->vendor_guid, vendor_guid));
@@ -367,7 +367,7 @@
      */
     if (vendor)
     {
-        GUID vendor_guid;
+        GncGUID vendor_guid;
 
         vendor_guid = *gncVendorGetGUID (vendor);
         vw = gnc_find_first_gui_component (DIALOG_EDIT_VENDOR_CM_CLASS,

Modified: gnucash/trunk/src/business/business-gnome/search-owner.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/search-owner.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-gnome/search-owner.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -306,7 +306,7 @@
 {
     GNCSearchOwner *fi = (GNCSearchOwner *)fe;
     GNCSearchOwnerPrivate *priv;
-    const GUID *guid;
+    const GncGUID *guid;
     GList *l = NULL;
 
     g_return_val_if_fail (fi, NULL);

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedger.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedger.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedger.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -209,7 +209,7 @@
 GncEntry * gnc_entry_ledger_get_entry (GncEntryLedger *ledger,
                                        VirtualCellLocation vcell_loc)
 {
-    GUID *guid;
+    GncGUID *guid;
 
     if (!ledger) return NULL;
 
@@ -467,7 +467,7 @@
             gncOwnerGetEndGUID (gncInvoiceGetOwner (ledger->invoice)) != NULL)
     {
 
-        const GUID *invoice_parent =
+        const GncGUID *invoice_parent =
             gncOwnerGetGUID (gncInvoiceGetOwner (ledger->invoice));
         QueryNew *q2 = gncQueryCreateFor (GNC_ENTRY_MODULE_NAME);
 

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -30,7 +30,7 @@
 
 struct GncEntryLedger_s
 {
-    GUID		blank_entry_guid;
+    GncGUID		blank_entry_guid;
     gboolean	blank_entry_edited;
     gboolean      traverse_to_new;
 

Modified: gnucash/trunk/src/engine/Account.c
===================================================================
--- gnucash/trunk/src/engine/Account.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Account.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -1629,7 +1629,7 @@
 \********************************************************************/
 
 void
-xaccAccountSetGUID (Account *acc, const GUID *guid)
+xaccAccountSetGUID (Account *acc, const GncGUID *guid)
 {
     g_return_if_fail(GNC_IS_ACCOUNT(acc));
     g_return_if_fail(guid);
@@ -1646,7 +1646,7 @@
 \********************************************************************/
 
 Account *
-xaccAccountLookup (const GUID *guid, QofBook *book)
+xaccAccountLookup (const GncGUID *guid, QofBook *book)
 {
     QofCollection *col;
     if (!guid || !book) return NULL;

Modified: gnucash/trunk/src/engine/Account.h
===================================================================
--- gnucash/trunk/src/engine/Account.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Account.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -174,7 +174,7 @@
 Account * gnc_account_create_root (QofBook *book);
 
 /** The xaccCloneAccount() does the same as xaccCloneAccountSimple(),
- *    except that it also also places a pair of GUID-pointers
+ *    except that it also also places a pair of GncGUID-pointers
  *    of each account to the other, in the other's kvp slot.
  *    The guid pointers are stored under the under the kvp
  *    path "gemini".
@@ -224,7 +224,7 @@
 
 /* ------------------ */
 
-/** @name Account lookup and GUID routines
+/** @name Account lookup and GncGUID routines
  @{ */
 
 /** Returns the account separation character chosen by the user.
@@ -246,7 +246,7 @@
 /** The xaccAccountLookup() subroutine will return the
  *    account associated with the given id, or NULL
  *    if there is no such account. */
-/*@ dependent @*/ Account * xaccAccountLookup (const GUID *guid, QofBook *book);
+/*@ dependent @*/ Account * xaccAccountLookup (const GncGUID *guid, QofBook *book);
 #define xaccAccountLookupDirect(g,b) xaccAccountLookup(&(g),b)
 
 /** @} */

Modified: gnucash/trunk/src/engine/AccountP.h
===================================================================
--- gnucash/trunk/src/engine/AccountP.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/AccountP.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -55,10 +55,10 @@
     QofInstance inst;
 };
 
-/* Set the account's GUID. This should only be done when reading
+/* Set the account's GncGUID. This should only be done when reading
  * an account from a datafile, or some other external source. Never
  * call this on an existing account! */
-void xaccAccountSetGUID (Account *account, const GUID *guid);
+void xaccAccountSetGUID (Account *account, const GncGUID *guid);
 
 /* Register Accounts with the engine */
 gboolean xaccAccountRegister (void);

Modified: gnucash/trunk/src/engine/GNCId.h
===================================================================
--- gnucash/trunk/src/engine/GNCId.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/GNCId.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -2,7 +2,7 @@
 #include "qof.h"
 
 /* Equivalent function prototype:
- * void xaccGUIDNew (GUID *guid, QofBook *book)
+ * void xaccGUIDNew (GncGUID *guid, QofBook *book)
  */
 #define xaccGUIDNew(guid,book)     \
       qof_instance_guid_new (qof_book_get_entity_table (book), (guid))

Modified: gnucash/trunk/src/engine/Period.c
===================================================================
--- gnucash/trunk/src/engine/Period.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Period.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -122,7 +122,7 @@
 
 /* ================================================================ */
 /* Reparent transaction to new book.  This routine does this by
- * moving GUID's to the new book's entity tables.
+ * moving GncGUID's to the new book's entity tables.
  */
 
 void
@@ -202,7 +202,7 @@
 
 /* ================================================================ */
 /* Reparent lot to new book.  This routine does this by
- * moving GUID's to the new book's entity tables.
+ * moving GncGUID's to the new book's entity tables.
  */
 
 void

Modified: gnucash/trunk/src/engine/Period.h
===================================================================
--- gnucash/trunk/src/engine/Period.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Period.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -43,7 +43,7 @@
  *    closed book.  The guid's of the old transactions will not
  *    be changed in the move.  Note, however, that the closed
  *    book will have a copy of every account in the open book,
- *    and that these copies will have new GUID's issued to them.
+ *    and that these copies will have new GncGUID's issued to them.
  *    Thus, every account has a 'twin' in the other book.
  *
  *    This routine will also create 'equity transactions' in
@@ -79,24 +79,24 @@
  *    Implemented in the closed book:
  *    /book/close-date       Latest date in this book. Must not change.
  *    /book/log-date         Date on which user called this routine.
- *    /book/next-book        GUID of next book (the still-open book).
+ *    /book/next-book        GncGUID of next book (the still-open book).
  *
  *    Implemented in still-open book:
  *    /book/open-date        Earliest date in this book.
- *    /book/prev-book        GUID of previous book (the closed book).
+ *    /book/prev-book        GncGUID of previous book (the closed book).
  *
  *    Implemented in the balancing transaction:
- *    /book/closed-acct      GUID of account whose balance was brought forward
- *    /book/closed-book      GUID of book whose balance was brought forward
+ *    /book/closed-acct      GncGUID of account whose balance was brought forward
+ *    /book/closed-book      GncGUID of book whose balance was brought forward
  *
  *    Implemented in the closed account:
- *    /book/balancing-trans  GUID of equity-balancing transaction.
- *    /book/next-book        GUID of equity-balancing book.
- *    /book/next-acct        GUID of twin of this account in the open book.
+ *    /book/balancing-trans  GncGUID of equity-balancing transaction.
+ *    /book/next-book        GncGUID of equity-balancing book.
+ *    /book/next-acct        GncGUID of twin of this account in the open book.
  *
  *    Implemented in the still-open account:
- *    /book/prev-acct         GUID of twin of this account in the closed book.
- *    /book/prev-book         GUID of previous book (the closed book)
+ *    /book/prev-acct         GncGUID of twin of this account in the closed book.
+ *    /book/prev-book         GncGUID of previous book (the closed book)
  *
  */
 QofBook * gnc_book_close_period (QofBook *, Timespec,
@@ -127,10 +127,10 @@
  *    a 'general purpose' function.  The way to fix this would be to
  *    weed out open lots by constructing the query correctly.
  *
- *    When an account is copied, the copy is issued a new GUID.
- *    The GUID of its sibling is placed in the 'gemini' KVP value
+ *    When an account is copied, the copy is issued a new GncGUID.
+ *    The GncGUID of its sibling is placed in the 'gemini' KVP value
  *    (See kvp_doc.txt for more detail).   Transactions and splits
- *    are moved without reassigning them a new GUID.  Note they
+ *    are moved without reassigning them a new GncGUID.  Note they
  *    are removed from one book's entity table and placed into the
  *    other book:  Once moved, they won't be findable in the entity
  *    table of the old book.
@@ -155,7 +155,7 @@
  *    another book.  It moves all of the splits as well.  In the
  *    course of the move, the transaction is literally deleted
  *    from the first book as its placed into the second.  The
- *    transaction and split GUID's are not changed in the move.
+ *    transaction and split GncGUID's are not changed in the move.
  *    This routine assumes that twin accounts already exist in
  *    both books (and can be located with the standard twining
  *    proceedure).
@@ -168,7 +168,7 @@
  *
  * The gnc_book_insert_trans() routine does the same as the above,
  *    except that it doesn't actually clobber the transaction: it
- *    merely moves the transaction and split GUID's to the new
+ *    merely moves the transaction and split GncGUID's to the new
  *    books' entity tables, and not much else.
  *
  * The gnc_book_insert_lot() routine, as above, but for lots ...

Modified: gnucash/trunk/src/engine/Query.c
===================================================================
--- gnucash/trunk/src/engine/Query.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Query.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -243,7 +243,7 @@
     for (; acct_list; acct_list = acct_list->next)
     {
         Account *acc = acct_list->data;
-        const GUID *guid;
+        const GncGUID *guid;
 
         if (!acc)
         {
@@ -254,7 +254,7 @@
         guid = qof_entity_get_guid (QOF_INSTANCE(acc));
         if (!guid)
         {
-            PWARN ("acct returns NULL GUID");
+            PWARN ("acct returns NULL GncGUID");
             continue;
         }
 
@@ -298,7 +298,7 @@
 xaccQueryAddSingleAccountMatch(Query *q, Account *acc, QofQueryOp op)
 {
     GList *list;
-    const GUID *guid;
+    const GncGUID *guid;
 
     if (!q || !acc)
         return;
@@ -536,7 +536,7 @@
 }
 
 void
-xaccQueryAddGUIDMatch(Query * q, const GUID *guid,
+xaccQueryAddGUIDMatch(Query * q, const GncGUID *guid,
                       QofIdType id_type, QofQueryOp op)
 {
     GSList *param_list = NULL;

Modified: gnucash/trunk/src/engine/Query.h
===================================================================
--- gnucash/trunk/src/engine/Query.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Query.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -196,7 +196,7 @@
 } cleared_match_t;
 
 void xaccQueryAddClearedMatch(Query * q, cleared_match_t how, QofQueryOp op);
-void xaccQueryAddGUIDMatch(Query * q, const GUID *guid,
+void xaccQueryAddGUIDMatch(Query * q, const GncGUID *guid,
                            QofIdType id_type, QofQueryOp op);
 
 /** given kvp value is on right side of comparison */

Modified: gnucash/trunk/src/engine/QueryP.h
===================================================================
--- gnucash/trunk/src/engine/QueryP.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/QueryP.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -86,7 +86,7 @@
     pd_type_t       type;
     pr_type_t       term_type;
     int             sense;
-    GUID            guid;
+    GncGUID            guid;
     QofIdType       id_type;
 } GUIDPredicateData;
 

Modified: gnucash/trunk/src/engine/SX-book.c
===================================================================
--- gnucash/trunk/src/engine/SX-book.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/SX-book.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -361,7 +361,7 @@
 gnc_sx_get_sxes_referencing_account(QofBook *book, Account *acct)
 {
     GList *rtn = NULL;
-    const GUID *acct_guid = qof_entity_get_guid(QOF_INSTANCE(acct));
+    const GncGUID *acct_guid = qof_entity_get_guid(QOF_INSTANCE(acct));
     GList *sx_list = gnc_book_get_schedxactions(book)->sx_list;
     for (; sx_list != NULL; sx_list = sx_list->next)
     {
@@ -371,7 +371,7 @@
         {
             Split *s = (Split*)splits->data;
             KvpFrame *frame = kvp_frame_get_frame(xaccSplitGetSlots(s), GNC_SX_ID);
-            GUID *sx_split_acct_guid = kvp_frame_get_guid(frame, GNC_SX_ACCOUNT);
+            GncGUID *sx_split_acct_guid = kvp_frame_get_guid(frame, GNC_SX_ACCOUNT);
             if (guid_equal(acct_guid, sx_split_acct_guid))
             {
                 rtn = g_list_append(rtn, sx);

Modified: gnucash/trunk/src/engine/SchedXaction.c
===================================================================
--- gnucash/trunk/src/engine/SchedXaction.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/SchedXaction.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -367,7 +367,7 @@
 xaccSchedXactionInit(SchedXaction *sx, QofBook *book)
 {
     Account        *ra;
-    const GUID *guid;
+    const GncGUID *guid;
 
     qof_instance_init_data (&sx->inst, GNC_ID_SCHEDXACTION, book);
 
@@ -962,7 +962,7 @@
     Split *split;
     KvpFrame *split_frame;
     KvpValue *tmp_value;
-    const GUID *acc_guid;
+    const GncGUID *acc_guid;
 
     split = xaccMallocSplit(book);
 

Modified: gnucash/trunk/src/engine/Scrub2.c
===================================================================
--- gnucash/trunk/src/engine/Scrub2.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Scrub2.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -399,7 +399,7 @@
     Transaction *txn;
     SplitList *node;
     GNCLot *lot;
-    const GUID *guid;
+    const GncGUID *guid;
 
     if (FALSE == is_subsplit (split)) return FALSE;
 

Modified: gnucash/trunk/src/engine/Split.c
===================================================================
--- gnucash/trunk/src/engine/Split.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Split.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -818,7 +818,7 @@
 \********************************************************************/
 
 Split *
-xaccSplitLookup (const GUID *guid, QofBook *book)
+xaccSplitLookup (const GncGUID *guid, QofBook *book)
 {
     QofCollection *col;
     if (!guid || !book) return NULL;

Modified: gnucash/trunk/src/engine/Split.h
===================================================================
--- gnucash/trunk/src/engine/Split.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Split.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -342,7 +342,7 @@
 /** The xaccSplitLookup() subroutine will return the
  *    split associated with the given id, or NULL
  *    if there is no such split. */
-Split      * xaccSplitLookup (const GUID *guid, QofBook *book);
+Split      * xaccSplitLookup (const GncGUID *guid, QofBook *book);
 #define      xaccSplitLookupDirect(g,b) xaccSplitLookup(&(g),b)
 
 

Modified: gnucash/trunk/src/engine/SplitP.h
===================================================================
--- gnucash/trunk/src/engine/SplitP.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/SplitP.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -133,7 +133,7 @@
 };
 
 
-/* Set the split's GUID. This should only be done when reading
+/* Set the split's GncGUID. This should only be done when reading
  * a split from a datafile, or some other external source. Never
  * call this on an existing split! */
 #define xaccSplitSetGUID(s,g) qof_instance_set_guid(QOF_INSTANCE(s),g)

Modified: gnucash/trunk/src/engine/Transaction.c
===================================================================
--- gnucash/trunk/src/engine/Transaction.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Transaction.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -836,7 +836,7 @@
 \********************************************************************/
 
 Transaction *
-xaccTransLookup (const GUID *guid, QofBook *book)
+xaccTransLookup (const GncGUID *guid, QofBook *book)
 {
     QofCollection *col;
     if (!guid || !book) return NULL;
@@ -2149,7 +2149,7 @@
 Transaction *
 xaccTransGetReversedBy(const Transaction *trans)
 {
-    GUID *guid;
+    GncGUID *guid;
 
     g_return_val_if_fail(trans, NULL);
     guid = kvp_frame_get_guid(trans->inst.kvp_data, TRANS_REVERSED_BY);

Modified: gnucash/trunk/src/engine/Transaction.h
===================================================================
--- gnucash/trunk/src/engine/Transaction.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/Transaction.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -175,7 +175,7 @@
  *
  * @param assume_ordered If TRUE, assume that the splits in each
  * transaction appear in the same order.  This saves some time looking
- * up splits by GUID, and is required for checking duplicated
+ * up splits by GncGUID, and is required for checking duplicated
  * transactions because all the splits have new GUIDs.
  */
 gboolean xaccTransEqual(const Transaction *ta,
@@ -216,7 +216,7 @@
     transaction associated with the given id, or NULL
     if there is no such transaction. */
 /*@ dependent @*//*@ null @*/
-Transaction * xaccTransLookup (const GUID *guid, QofBook *book);
+Transaction * xaccTransLookup (const GncGUID *guid, QofBook *book);
 #define xaccTransLookupDirect(g,b) xaccTransLookup(&(g),b)
 
 Split * xaccTransFindSplitByAccount(const Transaction *trans,
@@ -417,7 +417,7 @@
  *      num field (compare as an integer)
  *      date entered (compare as a date)
  *      description field (comcpare as a string using strcmp())
- *      GUID (compare as a guid)
+ *      GncGUID (compare as a guid)
  *    Finally, it returns zero if all of the above match.
  *    Note that it does *NOT* compare its member splits.
  */

Modified: gnucash/trunk/src/engine/TransactionP.h
===================================================================
--- gnucash/trunk/src/engine/TransactionP.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/TransactionP.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -117,7 +117,7 @@
     QofInstanceClass parent_class;
 };
 
-/* Set the transaction's GUID. This should only be done when reading
+/* Set the transaction's GncGUID. This should only be done when reading
  * a transaction from a datafile, or some other external source. Never
  * call this on an existing transaction! */
 #define xaccTransSetGUID(t,g) qof_instance_set_guid(QOF_INSTANCE(t),g)
@@ -127,7 +127,7 @@
  * is wrong in many ways: it is not issued a unique guid, and thus
  * not a properly registered Entity.  The splits are copied, but
  * these are also funny: they aren't inserted into the accounts
- * they claim to be in.  The splits also have bogus GUID's.
+ * they claim to be in.  The splits also have bogus GncGUID's.
  * Another 'feature': the splits point at the old transaction
  * as the parent, not the new transaction.
  */

Modified: gnucash/trunk/src/engine/cap-gains.c
===================================================================
--- gnucash/trunk/src/engine/cap-gains.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/cap-gains.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -296,7 +296,7 @@
     Account *gain_acct = NULL;
     KvpFrame *cwd;
     KvpValue *vvv;
-    GUID * gain_acct_guid;
+    GncGUID * gain_acct_guid;
     const char * cur_name;
 
     if (!acc || !currency) return NULL;
@@ -326,7 +326,7 @@
     Account *gain_acct = NULL;
     KvpFrame *cwd;
     KvpValue *vvv;
-    GUID * gain_acct_guid;
+    GncGUID * gain_acct_guid;
     const char * cur_name;
 
     cwd = xaccAccountGetSlots (acc);
@@ -630,7 +630,7 @@
 xaccSplitGetCapGainsSplit (const Split *split)
 {
     KvpValue *val;
-    GUID *gains_guid;
+    GncGUID *gains_guid;
     Split *gains_split;
 
     if (!split) return NULL;
@@ -653,7 +653,7 @@
 xaccSplitGetGainsSourceSplit (const Split *split)
 {
     KvpValue *val;
-    GUID *source_guid;
+    GncGUID *source_guid;
     Split *source_split;
 
     if (!split) return NULL;

Modified: gnucash/trunk/src/engine/engine-common.i
===================================================================
--- gnucash/trunk/src/engine/engine-common.i	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/engine-common.i	2010-03-27 21:01:21 UTC (rev 18969)
@@ -1,9 +1,9 @@
 %inline %{
-static const GUID * gncSplitGetGUID(Split *x)
+static const GncGUID * gncSplitGetGUID(Split *x)
 { return qof_instance_get_guid(QOF_INSTANCE(x)); }
-static const GUID * gncTransGetGUID(Transaction *x)
+static const GncGUID * gncTransGetGUID(Transaction *x)
 { return qof_instance_get_guid(QOF_INSTANCE(x)); }
-static const GUID * gncAccountGetGUID(Account *x)
+static const GncGUID * gncAccountGetGUID(Account *x)
 { return qof_instance_get_guid(QOF_INSTANCE(x)); }
 %}
 

Modified: gnucash/trunk/src/engine/engine-helpers.c
===================================================================
--- gnucash/trunk/src/engine/engine-helpers.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/engine-helpers.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -120,7 +120,7 @@
 }
 
 SCM
-gnc_guid2scm(GUID guid)
+gnc_guid2scm(GncGUID guid)
 {
     char string[GUID_ENCODING_LENGTH + 1];
 
@@ -130,10 +130,10 @@
     return scm_makfrom0str(string);
 }
 
-GUID
+GncGUID
 gnc_scm2guid(SCM guid_scm)
 {
-    GUID guid;
+    GncGUID guid;
     const gchar * str;
 
     if (GUID_ENCODING_LENGTH != scm_i_string_length (guid_scm))
@@ -148,7 +148,7 @@
 int
 gnc_guid_p(SCM guid_scm)
 {
-    GUID guid;
+    GncGUID guid;
     const gchar * str;
 
     if (!scm_is_string(guid_scm))
@@ -394,7 +394,7 @@
 
     for (node = account_guids; node; node = node->next)
     {
-        GUID *guid = node->data;
+        GncGUID *guid = node->data;
 
         if (guid)
             guids = scm_cons (gnc_guid2scm (*guid), guids);
@@ -414,7 +414,7 @@
     while (!scm_is_null (guids_scm))
     {
         SCM guid_scm = SCM_CAR (guids_scm);
-        GUID *guid = NULL;
+        GncGUID *guid = NULL;
 
         if (guid_scm != SCM_BOOL_F)
         {
@@ -677,7 +677,7 @@
     {
         if (val_scm != SCM_BOOL_F)
         {
-            GUID guid = gnc_scm2guid (val_scm);
+            GncGUID guid = gnc_scm2guid (val_scm);
             value = kvp_value_new_guid (&guid);
         }
         else
@@ -1413,7 +1413,7 @@
         }
         else if (!safe_strcmp (pd_type, "pd-guid"))
         {
-            GUID guid;
+            GncGUID guid;
             QofIdType id_type;
 
             /* guid */

Modified: gnucash/trunk/src/engine/engine-helpers.h
===================================================================
--- gnucash/trunk/src/engine/engine-helpers.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/engine-helpers.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -49,8 +49,8 @@
 Timespec gnc_timepair2timespec(SCM x);
 int      gnc_timepair_p(SCM x);
 
-SCM  gnc_guid2scm(GUID guid);
-GUID gnc_scm2guid(SCM guid_scm);
+SCM  gnc_guid2scm(GncGUID guid);
+GncGUID gnc_scm2guid(SCM guid_scm);
 int  gnc_guid_p(SCM guid_scm);
 
 /* for a list of strings */

Modified: gnucash/trunk/src/engine/engine.i
===================================================================
--- gnucash/trunk/src/engine/engine.i	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/engine.i	2010-03-27 21:01:21 UTC (rev 18969)
@@ -43,9 +43,9 @@
 %include "engine-common.i"
 
 %inline %{
-static const GUID * gncPriceGetGUID(GNCPrice *x)
+static const GncGUID * gncPriceGetGUID(GNCPrice *x)
 { return qof_instance_get_guid(QOF_INSTANCE(x)); }
-static const GUID * gncBudgetGetGUID(GncBudget *x)
+static const GncGUID * gncBudgetGetGUID(GncBudget *x)
 { return qof_instance_get_guid(QOF_INSTANCE(x)); }
 %}
 
@@ -92,7 +92,7 @@
 extern const char *gnc_default_strftime_date_format;
 const char *gnc_print_date (Timespec ts);
 
-GUID guid_new_return(void);
+GncGUID guid_new_return(void);
 
 %inline {
 static QofQuery * qof_query_create_for_splits(void) {
@@ -102,7 +102,7 @@
 %typemap(in) GSList * "$1 = gnc_query_scm2path($input);"
 
 void qof_query_add_guid_match (QofQuery *q, GSList *param_list,
-                           const GUID *guid, QofQueryOp op);
+                           const GncGUID *guid, QofQueryOp op);
 void qof_query_set_sort_order (QofQuery *q, GSList *params1,
                            GSList *params2, GSList *params3);
 

Modified: gnucash/trunk/src/engine/gnc-associate-account.c
===================================================================
--- gnucash/trunk/src/engine/gnc-associate-account.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/gnc-associate-account.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -77,8 +77,8 @@
 {
     KvpFrame *acc_frame;
     KvpValue *val, *stock_acc_guid_kvpval, *stock_acc_category_kvpval;
-    const GUID *stock_acc_guid;
-    const GUID *existing_acc_guid;
+    const GncGUID *stock_acc_guid;
+    const GncGUID *existing_acc_guid;
 
     stock_acc_guid = xaccAccountGetGUID(stock_account);
     stock_acc_guid_kvpval = kvp_value_new_guid(stock_acc_guid);
@@ -110,8 +110,8 @@
 {
     KvpFrame *acc_frame;
     KvpValue *val, *stock_acc_guid_kvpval, *stock_acc_category_kvpval;
-    const GUID *stock_acc_guid;
-    const GUID *existing_acc_guid;
+    const GncGUID *stock_acc_guid;
+    const GncGUID *existing_acc_guid;
 
     stock_acc_guid = xaccAccountGetGUID(stock_account);
     stock_acc_guid_kvpval = kvp_value_new_guid(stock_acc_guid);
@@ -142,7 +142,7 @@
     KvpValue *retval;
     KvpValue *guid_kvp;
     GList  *kvp_acc_list = NULL;
-    const GUID *acc_id;
+    const GncGUID *acc_id;
 
     for (iter = account_list; iter; iter = g_list_next(iter))
     {
@@ -420,7 +420,7 @@
     KvpFrame *stock_account_kvpframe, *assoc_acc_kvpframe;
     KvpFrame *current_account_kvpframe;
     KvpValue *stock_account_kvpval, *acc_list_kvpval, *category_kvpval;
-    const GUID *stock_account_guid, *inc_or_expense_account_guid, *current_guid;
+    const GncGUID *stock_account_guid, *inc_or_expense_account_guid, *current_guid;
     Account *stock_account;
     char *category_name;
     GList *assoc_acc_list, *assoc_acc_list_start;

Modified: gnucash/trunk/src/engine/gnc-budget.c
===================================================================
--- gnucash/trunk/src/engine/gnc-budget.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/gnc-budget.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -379,7 +379,7 @@
     return (&GET_PRIVATE(budget)->recurrence);
 }
 
-const GUID*
+const GncGUID*
 gnc_budget_get_guid(GncBudget* budget)
 {
     g_return_val_if_fail(budget, NULL);
@@ -421,7 +421,7 @@
 gnc_budget_unset_account_period_value(GncBudget *budget, Account *account,
                                       guint period_num)
 {
-    const GUID *guid;
+    const GncGUID *guid;
     KvpFrame *frame;
     gchar path[BUF_SIZE];
     gchar *bufend;
@@ -446,7 +446,7 @@
 gnc_budget_set_account_period_value(GncBudget *budget, Account *account,
                                     guint period_num, gnc_numeric val)
 {
-    const GUID *guid;
+    const GncGUID *guid;
     KvpFrame *frame;
     gchar path[BUF_SIZE];
     gchar *bufend;
@@ -575,7 +575,7 @@
 }
 
 GncBudget*
-gnc_budget_lookup (const GUID *guid, QofBook *book)
+gnc_budget_lookup (const GncGUID *guid, QofBook *book)
 {
     QofCollection *col;
 

Modified: gnucash/trunk/src/engine/gnc-budget.h
===================================================================
--- gnucash/trunk/src/engine/gnc-budget.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/gnc-budget.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -105,7 +105,7 @@
 void gnc_budget_commit_edit(GncBudget *bgt);
 
 /*@ dependent @*/
-const GUID* gnc_budget_get_guid(GncBudget* budget);
+const GncGUID* gnc_budget_get_guid(GncBudget* budget);
 #define gnc_budget_return_guid(X) \
   (X ? *(qof_entity_get_guid(QOF_INSTANCE(X))) : *(guid_null()))
 
@@ -153,9 +153,9 @@
 /* Returns some budget in the book, or NULL. */
 GncBudget* gnc_budget_get_default(QofBook *book);
 
-/* Get the budget associated with the given GUID from the given book. */
+/* Get the budget associated with the given GncGUID from the given book. */
 /*@ dependent @*/
-GncBudget* gnc_budget_lookup (const GUID *guid, QofBook *book);
+GncBudget* gnc_budget_lookup (const GncGUID *guid, QofBook *book);
 #define  gnc_budget_lookup_direct(g,b) gnc_budget_lookup(&(g),(b))
 
 #endif // __BUDGET_H__

Modified: gnucash/trunk/src/engine/gnc-commodity.c
===================================================================
--- gnucash/trunk/src/engine/gnc-commodity.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/gnc-commodity.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -2132,7 +2132,7 @@
 
 
 gnc_commodity *
-gnc_commodity_find_commodity_by_guid(const GUID *guid, QofBook *book)
+gnc_commodity_find_commodity_by_guid(const GncGUID *guid, QofBook *book)
 {
     QofCollection *col;
     if (!guid || !book) return NULL;
@@ -2141,7 +2141,7 @@
 }
 
 gnc_commodity_namespace *
-gnc_commodity_find_namespace_by_guid(const GUID *guid, QofBook *book)
+gnc_commodity_find_namespace_by_guid(const GncGUID *guid, QofBook *book)
 {
     QofCollection *col;
     if (!guid || !book) return NULL;

Modified: gnucash/trunk/src/engine/gnc-commodity.h
===================================================================
--- gnucash/trunk/src/engine/gnc-commodity.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/gnc-commodity.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -31,7 +31,7 @@
     must identify the commodity that is being traded.
 
     @warning The system used here does not follow the object
-    handling and identification system (GUID's, Entities, etc.)
+    handling and identification system (GncGUID's, Entities, etc.)
     that the other parts of GnuCash use.  The API really should be
     ported over.  This would allow us to get rid of the
     commodity table routines defined below.
@@ -723,8 +723,8 @@
         const char * fullname);
 
 /*@ dependent @*/
-gnc_commodity * gnc_commodity_find_commodity_by_guid(const GUID *guid, QofBook *book);
-gnc_commodity_namespace * gnc_commodity_find_namespace_by_guid(const GUID *guid, QofBook *book);
+gnc_commodity * gnc_commodity_find_commodity_by_guid(const GncGUID *guid, QofBook *book);
+gnc_commodity_namespace * gnc_commodity_find_namespace_by_guid(const GncGUID *guid, QofBook *book);
 
 /** @} */
 /* ---------------------------------------------------------- */

Modified: gnucash/trunk/src/engine/gnc-engine.h
===================================================================
--- gnucash/trunk/src/engine/gnc-engine.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/gnc-engine.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -68,9 +68,9 @@
 //@}
 
 /** @brief IDENTIFIERS
- *  GUID Identifiers can be used to reference Accounts, Transactions,
+ *  GncGUID Identifiers can be used to reference Accounts, Transactions,
  *  Splits and other objects. These Gnucash types are referred to as Gnucash
- *  entities. GUID Identifiers are globally-unique and permanent, i.e., once
+ *  entities. GncGUID Identifiers are globally-unique and permanent, i.e., once
  *  an entity has been assigned an identifier, it retains that same
  *  identifier for its lifetime.
  *  -

Modified: gnucash/trunk/src/engine/gnc-lot.c
===================================================================
--- gnucash/trunk/src/engine/gnc-lot.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/gnc-lot.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -276,7 +276,7 @@
 /* ============================================================= */
 
 GNCLot *
-gnc_lot_lookup (const GUID *guid, QofBook *book)
+gnc_lot_lookup (const GncGUID *guid, QofBook *book)
 {
     QofCollection *col;
     if (!guid || !book) return NULL;

Modified: gnucash/trunk/src/engine/gnc-lot.h
===================================================================
--- gnucash/trunk/src/engine/gnc-lot.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/gnc-lot.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -91,7 +91,7 @@
 void gnc_lot_destroy (GNCLot *);
 
 /*@ dependent @*/
-GNCLot * gnc_lot_lookup (const GUID *guid, QofBook *book);
+GNCLot * gnc_lot_lookup (const GncGUID *guid, QofBook *book);
 QofBook * gnc_lot_get_book (GNCLot *);
 
 void gnc_lot_begin_edit (GNCLot *lot);

Modified: gnucash/trunk/src/engine/gnc-pricedb.c
===================================================================
--- gnucash/trunk/src/engine/gnc-pricedb.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/gnc-pricedb.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -480,7 +480,7 @@
 /* getters */
 
 GNCPrice *
-gnc_price_lookup (const GUID *guid, QofBook *book)
+gnc_price_lookup (const GncGUID *guid, QofBook *book)
 {
     QofCollection *col;
 

Modified: gnucash/trunk/src/engine/gnc-pricedb.h
===================================================================
--- gnucash/trunk/src/engine/gnc-pricedb.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/gnc-pricedb.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -213,7 +213,7 @@
     to the GNCPrice, not copies, so don't free these values.
     @{ */
 
-GNCPrice *      gnc_price_lookup (const GUID *guid, QofBook *book);
+GNCPrice *      gnc_price_lookup (const GncGUID *guid, QofBook *book);
 /*@ dependent @*/
 gnc_commodity * gnc_price_get_commodity(const GNCPrice *p);
 /*@ dependent @*/

Modified: gnucash/trunk/src/engine/kvp-scm.c
===================================================================
--- gnucash/trunk/src/engine/kvp-scm.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/kvp-scm.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -41,7 +41,7 @@
     }
     else if (gnc_guid_p(val))
     {
-        GUID tmpguid = gnc_scm2guid(val);
+        GncGUID tmpguid = gnc_scm2guid(val);
         return kvp_value_new_guid(&tmpguid);
     }
     else if (gnc_timepair_p(val))
@@ -89,7 +89,7 @@
         break;
     case KVP_TYPE_GUID:
     {
-        GUID *tempguid = kvp_value_get_guid(val);
+        GncGUID *tempguid = kvp_value_get_guid(val);
         return gnc_guid2scm(*tempguid);
     }
     break;

Modified: gnucash/trunk/src/engine/test/test-book-merge.c
===================================================================
--- gnucash/trunk/src/engine/test/test-book-merge.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/test/test-book-merge.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -50,7 +50,7 @@
     QofInstance inst;
     char     	*Name;
     gnc_numeric	Amount;
-    const GUID 	*obj_guid;
+    const GncGUID 	*obj_guid;
     Timespec 	date;
     double 		discount; /* cheap pun, I know. */
     gboolean 	active;
@@ -67,7 +67,7 @@
 
 /* obvious setter functions */
 void obj_setName(myobj*,	char*);
-void obj_setGUID(myobj*,	const GUID*);
+void obj_setGUID(myobj*,	const GncGUID*);
 void obj_setAmount(myobj*,  gnc_numeric);
 void obj_setDate(myobj*,	Timespec h);
 void obj_setDiscount(myobj*, double);
@@ -77,7 +77,7 @@
 
 /* obvious getter functions */
 char*		obj_getName(myobj*);
-const GUID*	obj_getGUID(myobj*);
+const GncGUID*	obj_getGUID(myobj*);
 gnc_numeric obj_getAmount(myobj*);
 Timespec   	obj_getDate(myobj*);
 double		obj_getDiscount(myobj*);
@@ -208,13 +208,13 @@
 }
 
 void
-obj_setGUID(myobj* g, const GUID* h)
+obj_setGUID(myobj* g, const GncGUID* h)
 {
     if (!g) return;
     g->obj_guid = h;
 }
 
-const GUID*
+const GncGUID*
 obj_getGUID(myobj *g)
 {
     if (!g) return NULL;

Modified: gnucash/trunk/src/engine/test/test-guid.c
===================================================================
--- gnucash/trunk/src/engine/test/test-guid.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/test/test-guid.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -22,7 +22,7 @@
  */
 
 /* Test file created by Linas Vepstas <linas at linas.org>
- * Try to create duplicate GUID's, which should never happen.
+ * Try to create duplicate GncGUID's, which should never happen.
  *
  */
 
@@ -38,8 +38,8 @@
 
 static void test_null_guid(void)
 {
-    GUID g;
-    GUID *gp;
+    GncGUID g;
+    GncGUID *gp;
 
     g = guid_new_return();
     gp = guid_malloc();
@@ -58,7 +58,7 @@
     QofInstance *ent, *eblk[NENT];
     QofCollection *col;
     QofIdType type;
-    GUID guid;
+    GncGUID guid;
 
     sess = get_random_session ();
     book = qof_session_get_book (sess);

Modified: gnucash/trunk/src/engine/test-core/test-engine-stuff.c
===================================================================
--- gnucash/trunk/src/engine/test-core/test-engine-stuff.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/test-core/test-engine-stuff.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -207,7 +207,7 @@
 }
 
 /* ========================================================== */
-/* Time/Date, GUID, binary data stuff */
+/* Time/Date, GncGUID, binary data stuff */
 
 Timespec*
 get_random_timespec(void)
@@ -236,12 +236,12 @@
     return ret;
 }
 
-GUID*
+GncGUID*
 get_random_guid(void)
 {
-    GUID *ret;
+    GncGUID *ret;
 
-    ret = g_new(GUID, 1);
+    ret = g_new(GncGUID, 1);
     guid_new(ret);
 
     return ret;
@@ -324,7 +324,7 @@
 
     case KVP_TYPE_GUID:
     {
-        GUID *tmp_guid;
+        GncGUID *tmp_guid;
         tmp_guid = get_random_guid();
         ret = kvp_value_new_guid(tmp_guid);
         g_free(tmp_guid);
@@ -972,7 +972,7 @@
 
 typedef struct
 {
-    GUID guid;
+    GncGUID guid;
 } TransInfo;
 
 void
@@ -1732,7 +1732,7 @@
         GList *guids;
         GSList *path;
         char *string;
-        GUID *guid;
+        GncGUID *guid;
 
         pr_type = get_random_int_in_range (1, 20);
         if (gnc_engine_debug_random) printf("\n pr_type = %d ", pr_type);
@@ -2153,7 +2153,7 @@
 
         /* GUID_MATCH_ANY */
         {
-            GUID * guid = get_random_guid ();
+            GncGUID * guid = get_random_guid ();
             *guid = *xaccAccountGetGUID (a);
             list = g_list_prepend (list, guid);
         }

Modified: gnucash/trunk/src/engine/test-core/test-engine-stuff.h
===================================================================
--- gnucash/trunk/src/engine/test-core/test-engine-stuff.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/engine/test-core/test-engine-stuff.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -29,7 +29,7 @@
 
 kvp_frame* get_random_kvp_frame(void);
 gnc_numeric get_random_gnc_numeric(void);
-GUID* get_random_guid(void);
+GncGUID* get_random_guid(void);
 GList* get_random_glist(void);
 
 void random_glist_strings_only (gboolean strings_only);

Modified: gnucash/trunk/src/experimental/cgi-bin/gnc-server.c
===================================================================
--- gnucash/trunk/src/experimental/cgi-bin/gnc-server.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/experimental/cgi-bin/gnc-server.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -90,7 +90,7 @@
 /* XXX -- hack alert -- cheesy user authentication and tracking 
  * this should be replaced by something more professional
  *
- * This implementation uses gnucash GUID's to track sessions, 
+ * This implementation uses gnucash GncGUID's to track sessions, 
  * but the API is designed so that anything that can be converted
  * to a string & back will work.
  */
@@ -107,7 +107,7 @@
 static const char *
 auth_user (const char * name, const char *passwd)
 {
-  GUID *guid;
+  GncGUID *guid;
   const char *session_auth_string;
 
   /* hack alert - XXX - we do no authentication whatsoever,
@@ -115,7 +115,7 @@
    */
   if (!name || !passwd) return NULL;
 
-  guid = g_new (GUID, 1);
+  guid = g_new (GncGUID, 1);
   guid_new (guid);
   logged_in_users = g_list_prepend (logged_in_users, guid);
   session_auth_string = guid_to_string (guid); /* THREAD UNSAFE */
@@ -131,7 +131,7 @@
 static gboolean
 have_session (const char *session_auth_string)
 {
-   GUID guid;
+   GncGUID guid;
    GList *next = logged_in_users;
 
    string_to_guid (session_auth_string, &guid);

Modified: gnucash/trunk/src/gnc/GncInstance.hpp
===================================================================
--- gnucash/trunk/src/gnc/GncInstance.hpp	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnc/GncInstance.hpp	2010-03-27 21:01:21 UTC (rev 18969)
@@ -55,7 +55,7 @@
     { }
 
     GncInstance< ::QofBook > getBook() const { return qof_instance_get_book (QOF_INSTANCE(base_class::get())); }
-    ::GUID getGUID() const { return qof_entity_get_guid(QOF_INSTANCE(base_class::get())); }
+    ::GncGUID getGUID() const { return qof_entity_get_guid(QOF_INSTANCE(base_class::get())); }
 
     bool is_dirty() const { return qof_instance_get_dirty(QOF_INSTANCE(base_class::get())); }
     void set_dirty() { return qof_instance_set_dirty(QOF_INSTANCE(base_class::get())); }

Modified: gnucash/trunk/src/gnc-ui.h
===================================================================
--- gnucash/trunk/src/gnc-ui.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnc-ui.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -114,7 +114,7 @@
 
 void gnc_price_edit_dialog (gncUIWidget parent, QofSession *session,
                             GNCPrice *price, GNCPriceEditType type);
-GNCPrice* gnc_price_edit_by_guid (GtkWidget * parent, const GUID * guid);
+GNCPrice* gnc_price_edit_by_guid (GtkWidget * parent, const GncGUID * guid);
 void     gnc_prices_dialog (gncUIWidget parent);
 void     gnc_commodities_dialog (gncUIWidget parent);
 

Modified: gnucash/trunk/src/gnome/dialog-chart-export.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-chart-export.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/dialog-chart-export.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -63,7 +63,7 @@
     chart_data *data;
     Account *acc;
     gboolean success;
-    const GUID *guid;
+    const GncGUID *guid;
     QofCollection *copy_coll;
     QofBook *book;
 
@@ -114,7 +114,7 @@
     gnc_numeric balance;
     QofBook *book;
     QofCollection *coll;
-    const GUID *guid;
+    const GncGUID *guid;
     time_t trans_time;
     GList *ref;
     QofInstanceReference *ent_ref;

Modified: gnucash/trunk/src/gnome/dialog-price-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-price-editor.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/dialog-price-editor.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -562,7 +562,7 @@
  * Return: nothing                                                  *
 \********************************************************************/
 GNCPrice *
-gnc_price_edit_by_guid (GtkWidget * parent, const GUID * guid)
+gnc_price_edit_by_guid (GtkWidget * parent, const GncGUID * guid)
 {
     GNCPrice *price;
     QofSession *session;

Modified: gnucash/trunk/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/dialog-print-check.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -755,7 +755,7 @@
     GtkWidget *dialog;
     gdouble multip;
     gint i = 1;
-    GUID guid;
+    GncGUID guid;
     char buf[GUID_ENCODING_LENGTH+1];
     gchar *filename, *pathname;
     GtkTreeModel *model;

Modified: gnucash/trunk/src/gnome/dialog-sx-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-editor.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/dialog-sx-editor.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -610,7 +610,7 @@
 
             for ( ; splitList; splitList = splitList->next )
             {
-                GUID *acct_guid;
+                GncGUID *acct_guid;
                 Account *acct;
                 gnc_commodity *split_cmdty;
                 txnCreditDebitSums *tcds;

Modified: gnucash/trunk/src/gnome/dialog-sx-since-last-run.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-since-last-run.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/dialog-sx-since-last-run.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -1005,7 +1005,7 @@
     xaccQuerySetBook(book_query, gnc_get_current_book());
     for (guid_iter = created_txn_guids; guid_iter != NULL; guid_iter = guid_iter->next)
     {
-        xaccQueryAddGUIDMatch(guid_query, (GUID*)guid_iter->data, GNC_ID_TRANS, QUERY_OR);
+        xaccQueryAddGUIDMatch(guid_query, (GncGUID*)guid_iter->data, GNC_ID_TRANS, QUERY_OR);
     }
     query = xaccQueryMerge(book_query, guid_query, QUERY_AND);
 

Modified: gnucash/trunk/src/gnome/druid-merge.h
===================================================================
--- gnucash/trunk/src/gnome/druid-merge.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/druid-merge.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -37,22 +37,22 @@
 of the new book (created with QofSession) with the existing QofBook
 (loaded by the user), with user intervention and collision handling.
 
-	-# Always check for a ::GUID first and compare. qof_book_merge only accepts valid ::QofBook
-	data  and therefore ALL objects in the import book will	include valid GUID's.
-	-# If the original import data did not contain a GUID (e.g. an external non-GnuCash source)
-	the GUID values will have been created by QofSession and will not match any existing
-	GUID's in the target book so objects that do not have a GUID match cannot be assumed to
+	-# Always check for a ::GncGUID first and compare. qof_book_merge only accepts valid ::QofBook
+	data  and therefore ALL objects in the import book will	include valid GncGUID's.
+	-# If the original import data did not contain a GncGUID (e.g. an external non-GnuCash source)
+	the GncGUID values will have been created by QofSession and will not match any existing
+	GncGUID's in the target book so objects that do not have a GncGUID match cannot be assumed to
 	be ::MERGE_NEW - parameter values must be checked.
 
-- If a GUID match exists, set QofBookMergeRule::mergeAbsolute to \a TRUE.
-	-# If ALL parameters in the import object match the target object with the same \a GUID,
+- If a GncGUID match exists, set QofBookMergeRule::mergeAbsolute to \a TRUE.
+	-# If ALL parameters in the import object match the target object with the same \a GncGUID,
 	set ::QofBookMergeResult to \a MERGE_ABSOLUTE.
 	-# If any parameters differ, set ::MERGE_UPDATE.
-- If the import object \a GUID does not match an existing object,
+- If the import object \a GncGUID does not match an existing object,
 mergeAbsolute is unchanged from the default \a FALSE
 The parameter values of the object are compared to other objects of the same
 type in the target book.
-	-# If the same data exists in the target book with a different GUID, the object
+	-# If the same data exists in the target book with a different GncGUID, the object
 	is tagged as DUPLICATE.
 	-# If the data has changed, the object is tagged as REPORT.
 	-# If the data does not match, the object is tagged as NEW

Modified: gnucash/trunk/src/gnome/gnc-plugin-page-budget.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-budget.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-budget.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -194,7 +194,7 @@
     gint component_id;
 
     GncBudget* budget;
-    GUID key;
+    GncGUID key;
     GncDialog* d;
 
     GList *period_col_list;
@@ -478,7 +478,7 @@
     LEAVE("widget destroyed");
 }
 
-#define BUDGET_GUID "Budget GUID"
+#define BUDGET_GUID "Budget GncGUID"
 
 /** Save enough information about this plugin page that it can
  *  be recreated next time the user starts gnucash.
@@ -536,7 +536,7 @@
     GncPluginPage *page;
     GError *error = NULL;
     char *guid_str;
-    GUID guid;
+    GncGUID guid;
     GncBudget *bgt;
     QofBook *book;
 

Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -462,7 +462,7 @@
 
     gint event_handler_id;
     gint component_manager_id;
-    GUID key;  /* The guid of the Account we're watching */
+    GncGUID key;  /* The guid of the Account we're watching */
 
     const char *lines_opt_section;
     const char *lines_opt_name;
@@ -3186,7 +3186,7 @@
     GncPluginPageRegister *page;
     GncPluginPageRegisterPrivate *priv;
     GNCLedgerDisplayType ledger_type;
-    const GUID *acct_guid;
+    const GncGUID *acct_guid;
     const GList *citem;
     GList *item, *kill = NULL;
 

Modified: gnucash/trunk/src/gnome/gnc-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-split-reg.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/gnc-split-reg.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -1205,7 +1205,7 @@
             kvp_val = kvp_frame_get_slot( txn_frame, "from-sched-xaction" );
             if ( kvp_val )
             {
-                GUID *fromSXId = kvp_value_get_guid( kvp_val );
+                GncGUID *fromSXId = kvp_value_get_guid( kvp_val );
                 SchedXaction *theSX = NULL;
                 GList *sxElts;
 

Modified: gnucash/trunk/src/gnome/top-level.c
===================================================================
--- gnucash/trunk/src/gnome/top-level.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/top-level.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -80,7 +80,7 @@
 #define IF_TYPE(URL_TYPE_STR,ENTITY_TYPE)                                   \
   if (strncmp (URL_TYPE_STR, location, strlen (URL_TYPE_STR)) == 0)         \
   {                                                                         \
-    GUID guid;                                                              \
+    GncGUID guid;                                                              \
     QofCollection *col;                                                     \
     QofInstance *entity;                                                      \
     if (!string_to_guid (location + strlen(URL_TYPE_STR), &guid))           \
@@ -216,7 +216,7 @@
 {
     GKeyFile *keyfile = NULL;
     QofBook *book;
-    const GUID *guid;
+    const GncGUID *guid;
     const gchar *url, *guid_string;
     gchar *file_guid, *filename = NULL;
     GError *error = NULL;
@@ -229,7 +229,7 @@
         return;
     }
 
-    /* Get the book GUID */
+    /* Get the book GncGUID */
     book = qof_session_get_book(session);
     guid = qof_entity_get_guid(QOF_INSTANCE(book));
     guid_string = guid_to_string(guid);
@@ -307,7 +307,7 @@
     QofBook *book;
     const char *url, *guid_string;
     gchar *filename;
-    const GUID *guid;
+    const GncGUID *guid;
     GError *error = NULL;
     GKeyFile *keyfile = NULL;
 
@@ -320,7 +320,7 @@
         return;
     }
 
-    /* Get the book GUID */
+    /* Get the book GncGUID */
     book = qof_session_get_book(session);
     guid = qof_entity_get_guid(QOF_INSTANCE(book));
     guid_string = guid_to_string(guid);

Modified: gnucash/trunk/src/gnome/window-reconcile.c
===================================================================
--- gnucash/trunk/src/gnome/window-reconcile.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome/window-reconcile.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -57,7 +57,7 @@
 /** STRUCTS *********************************************************/
 struct _RecnWindow
 {
-    GUID account;             /* The account that we are reconciling  */
+    GncGUID account;             /* The account that we are reconciling  */
     gnc_numeric new_ending;   /* The new ending balance               */
     time_t statement_date;    /* The statement date                   */
 

Modified: gnucash/trunk/src/gnome-search/dialog-search.c
===================================================================
--- gnucash/trunk/src/gnome-search/dialog-search.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome-search/dialog-search.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -519,7 +519,7 @@
 
     if (res)
     {
-        const GUID *guid = (const GUID *) ((sw->get_guid->param_getfcn)(res, sw->get_guid));
+        const GncGUID *guid = (const GncGUID *) ((sw->get_guid->param_getfcn)(res, sw->get_guid));
         QueryOp op = QUERY_OR;
 
         if (!sw->q)

Modified: gnucash/trunk/src/gnome-search/dialog-search.h
===================================================================
--- gnucash/trunk/src/gnome-search/dialog-search.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome-search/dialog-search.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -48,7 +48,7 @@
 /*
  * This callback will create a new item and return a handle to the
  * newly created item (even if it is not completely finished).  It
- * will be added to the query, but not selected.  This means the GUID
+ * will be added to the query, but not selected.  This means the GncGUID
  * must be set.
  */
 typedef gpointer (*GNCSearchNewItemCB) (gpointer user_data);

Modified: gnucash/trunk/src/gnome-search/gnc-general-search.c
===================================================================
--- gnucash/trunk/src/gnome-search/gnc-general-search.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome-search/gnc-general-search.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -67,7 +67,7 @@
 
 struct _GNCGeneralSearchPrivate
 {
-    GUID			guid;
+    GncGUID			guid;
     GNCIdTypeConst		type;
     GNCSearchCB		search_cb;
     gpointer		user_data;
@@ -537,7 +537,7 @@
     if (selection)
     {
         const QofParam *get_guid = priv->get_guid;
-        priv->guid = * ((GUID *)(get_guid->param_getfcn
+        priv->guid = * ((GncGUID *)(get_guid->param_getfcn
                                  (gsl->selected_item, get_guid)));
         gnc_gui_component_watch_entity
         (priv->component_id, &(priv->guid),

Modified: gnucash/trunk/src/gnome-search/search-account.c
===================================================================
--- gnucash/trunk/src/gnome-search/search-account.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome-search/search-account.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -328,7 +328,7 @@
     for (node = priv->selected_accounts; node; node = node->next)
     {
         Account *acc = node->data;
-        const GUID *guid = xaccAccountGetGUID (acc);
+        const GncGUID *guid = xaccAccountGetGUID (acc);
         l = g_list_prepend (l, (gpointer)guid);
     }
     l = g_list_reverse (l);

Modified: gnucash/trunk/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-account.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome-utils/dialog-account.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -78,7 +78,7 @@
 
     AccountDialogType dialog_type;
 
-    GUID    account;
+    GncGUID    account;
     Account *created_account;
 
     gchar **subaccount_names;

Modified: gnucash/trunk/src/gnome-utils/dialog-query-list.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-query-list.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome-utils/dialog-query-list.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -57,7 +57,7 @@
     g_return_if_fail (dql);
 
     for (node = dql->books; node; node = node->next)
-        xaccGUIDFree ((GUID*)node->data);
+        xaccGUIDFree ((GncGUID*)node->data);
     g_list_free (dql->books);
     dql->books = NULL;
 }
@@ -72,7 +72,7 @@
     for (node = gncQueryGetBooks(q); node; node = node->next)
     {
         QofBook *book = node->data;
-        GUID *guid = xaccGUIDMalloc();
+        GncGUID *guid = xaccGUIDMalloc();
         *guid = *(qof_book_get_guid(book));
         dql->books = g_list_prepend(dql->books, guid);
     }
@@ -159,7 +159,7 @@
     {
         for (node = dql->books; node; node = node->next)
         {
-            info = gnc_gui_get_entity_events (changes, (const GUID*)(node->data));
+            info = gnc_gui_get_entity_events (changes, (const GncGUID*)(node->data));
             if (info && (info->event_mask & QOF_EVENT_DESTROY))
             {
                 gnc_close_gui_component (dql->component_id);
@@ -229,7 +229,7 @@
 
     /* and register the books */
     for (node = dql->books; node; node = node->next)
-        gnc_gui_component_watch_entity (dql->component_id, (GUID*)node->data,
+        gnc_gui_component_watch_entity (dql->component_id, (GncGUID*)node->data,
                                         QOF_EVENT_DESTROY);
 
     return dql;

Modified: gnucash/trunk/src/gnome-utils/gnc-query-list.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-query-list.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome-utils/gnc-query-list.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -786,7 +786,7 @@
     GNCQueryListPriv *priv;
     gchar *strings[list->num_columns + 1];
     GList *entries, *item;
-    const GUID *guid;
+    const GncGUID *guid;
     gint i;
 
     /* Clear all watches */
@@ -857,7 +857,7 @@
 
         /* and set a watcher on this item */
         gup = priv->get_guid;
-        guid = (const GUID*)((gup->param_getfcn)(item->data, gup));
+        guid = (const GncGUID*)((gup->param_getfcn)(item->data, gup));
         gnc_gui_component_watch_entity (priv->component_id, guid,
                                         QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
 

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-budget.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-budget.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-budget.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -61,7 +61,7 @@
  * consequences, I still think there must be some better way than
  * re-implementing GtkTreeModel.  One idea I'm toying with is to
  * implement a GtkTreeModel for QofCollections, which would offer only
- * the GUID as a field.  Then, TreeViews could add their own columns
+ * the GncGUID as a field.  Then, TreeViews could add their own columns
  * with custom CellDataFuncs to display the object-specific fields.
  * Or, something like that.  :)
  *
@@ -109,10 +109,10 @@
 {
     GncBudget *bgt;
     GValue gv = { 0 };
-    GUID *guid;
+    GncGUID *guid;
 
     gtk_tree_model_get_value(tm, iter, BUDGET_GUID_COLUMN, &gv);
-    guid = (GUID *) g_value_get_pointer(&gv);
+    guid = (GncGUID *) g_value_get_pointer(&gv);
     g_value_unset(&gv);
 
     bgt = gnc_budget_lookup(guid, gnc_get_current_book());
@@ -124,8 +124,8 @@
         GncBudget *bgt)
 {
     GValue gv = { 0 };
-    const GUID *guid1;
-    GUID *guid2;
+    const GncGUID *guid1;
+    GncGUID *guid2;
 
     g_return_val_if_fail(GNC_BUDGET(bgt), FALSE);
 
@@ -135,7 +135,7 @@
     while (gtk_list_store_iter_is_valid(GTK_LIST_STORE(tm), iter))
     {
         gtk_tree_model_get_value(tm, iter, BUDGET_GUID_COLUMN, &gv);
-        guid2 = (GUID *) g_value_get_pointer(&gv);
+        guid2 = (GncGUID *) g_value_get_pointer(&gv);
         g_value_unset(&gv);
 
         if (guid_equal(guid1, guid2))

Modified: gnucash/trunk/src/import-export/import-account-matcher.h
===================================================================
--- gnucash/trunk/src/import-export/import-account-matcher.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/import-export/import-account-matcher.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -44,7 +44,7 @@
     normal mode of operation. Can be NULL.
 
     If account_online_id_value==NULL, you basically end up with an account
-    selector that allows you to select an account whose GUID will be
+    selector that allows you to select an account whose GncGUID will be
     remembered elsewhere.  You would fill account_human_description to tell
     the user what he is looking for.  In this mode, the  online_id
     kvp_frame of the found account will not be touched.  To use this mode,

Modified: gnucash/trunk/src/import-export/import-match-map.c
===================================================================
--- gnucash/trunk/src/import-export/import-match-map.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/import-export/import-match-map.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -122,7 +122,7 @@
                                  const char *key)
 {
     kvp_value *value;
-    GUID * guid;
+    GncGUID * guid;
 
     if (!imap || !key) return NULL;
     if (!category)

Modified: gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c
===================================================================
--- gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -65,9 +65,9 @@
 {
     enum _enum_action {LOG_BEGIN_EDIT, LOG_ROLLBACK, LOG_COMMIT, LOG_DELETE} log_action;
     int log_action_present;
-    GUID trans_guid;
+    GncGUID trans_guid;
     int trans_guid_present;
-    GUID split_guid;
+    GncGUID split_guid;
     int  split_guid_present;
     Timespec log_date;
     int log_date_present;
@@ -75,7 +75,7 @@
     int date_entered_present;
     Timespec date_posted;
     int date_posted_present;
-    GUID acc_guid;
+    GncGUID acc_guid;
     int acc_guid_present;
     char acc_name[STRING_FIELD_SIZE];
     int acc_name_present;
@@ -282,11 +282,11 @@
     }
     if (record.trans_guid_present)
     {
-        DEBUG("Transaction GUID: %s", guid_to_string (&(record.trans_guid)));
+        DEBUG("Transaction GncGUID: %s", guid_to_string (&(record.trans_guid)));
     }
     if (record.split_guid_present)
     {
-        DEBUG("Split GUID: %s", guid_to_string (&(record.split_guid)));
+        DEBUG("Split GncGUID: %s", guid_to_string (&(record.split_guid)));
     }
     if (record.log_date_present)
     {
@@ -305,7 +305,7 @@
     }
     if (record.acc_guid_present)
     {
-        DEBUG("Account GUID: %s", guid_to_string (&(record.acc_guid)));
+        DEBUG("Account GncGUID: %s", guid_to_string (&(record.acc_guid)));
     }
     if (record.acc_name_present)
     {

Modified: gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c
===================================================================
--- gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -108,7 +108,7 @@
     Account *income_account = NULL;
     kvp_frame * acc_frame;
     kvp_value * kvp_val;
-    const GUID * income_acc_guid;
+    const GncGUID * income_acc_guid;
     gchar *investment_account_text;
     gnc_commodity *currency = NULL;
     gnc_commodity *investment_commodity = NULL;

Modified: gnucash/trunk/src/libqof/backend/file/qsf-backend.c
===================================================================
--- gnucash/trunk/src/libqof/backend/file/qsf-backend.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/backend/file/qsf-backend.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -853,7 +853,7 @@
     QofParam *ref_param;
     QofInstanceReference *reference, *starter;
     qsf_param  *params;
-    const GUID *guid;
+    const GncGUID *guid;
     xmlNodePtr node, object_node;
     xmlNsPtr ns;
     GList *copy_list;
@@ -925,7 +925,7 @@
     QofCollection *qsf_coll;
     gint        param_count;
     gboolean   own_guid;
-    const GUID *cm_guid;
+    const GncGUID *cm_guid;
     gchar       cm_sa[GUID_ENCODING_LENGTH + 1];
 
     g_return_if_fail(ent != NULL);
@@ -1067,7 +1067,7 @@
     xmlNodePtr top_node, node;
     xmlDocPtr doc;
     gchar buffer[GUID_ENCODING_LENGTH + 1];
-    const GUID *book_guid;
+    const GncGUID *book_guid;
 
     g_return_val_if_fail(book != NULL, NULL);
     params->book = book;
@@ -1158,7 +1158,7 @@
     gint64      cm_i64;
     double      cm_double;
     gnc_numeric cm_numeric;
-    GUID        *cm_guid;
+    GncGUID        *cm_guid;
     struct tm   kvp_time;
     time_t      kvp_time_t;
     Timespec    cm_date;
@@ -1189,7 +1189,7 @@
         return kvp_value_new_string(content);
         break;
     case KVP_TYPE_GUID:
-        cm_guid = g_new(GUID, 1);
+        cm_guid = g_new(GncGUID, 1);
         if (TRUE == string_to_guid(content, cm_guid))
         {
             return kvp_value_new_guid(cm_guid);
@@ -1247,7 +1247,7 @@
     gint64         cm_i64;
     Timespec       cm_date;
     gchar          *cm_char,  *(*char_getter)  (xmlNodePtr);
-    GUID           *cm_guid;
+    GncGUID           *cm_guid;
     KvpFrame       *cm_kvp;
     KvpValue       *cm_value;
     KvpValueType   cm_type;
@@ -1316,7 +1316,7 @@
     }
     if (safe_strcmp(qof_type, QOF_TYPE_GUID) == 0)
     {
-        cm_guid = g_new(GUID, 1);
+        cm_guid = g_new(GncGUID, 1);
         if (TRUE != string_to_guid((char*)xmlNodeGetContent(node), cm_guid))
         {
             qof_backend_set_error(params->be, ERR_QSF_BAD_OBJ_GUID);
@@ -1423,16 +1423,16 @@
         /* retrieve the *type* of the collection, ignore any contents. */
         qsf_coll = cm_param->param_getfcn(qsf_ent, cm_param);
         type = qof_collection_get_type(qsf_coll);
-        cm_guid = g_new(GUID, 1);
+        cm_guid = g_new(GncGUID, 1);
         if (TRUE != string_to_guid((gchar*)xmlNodeGetContent(node), cm_guid))
         {
             qof_backend_set_error(params->be, ERR_QSF_BAD_OBJ_GUID);
             PINFO (" string to guid collect failed for %s", xmlNodeGetContent(node));
             return;
         }
-        /* create a QofInstanceReference with this type and GUID.
+        /* create a QofInstanceReference with this type and GncGUID.
          there is only one entity each time.
-         cm_guid contains the GUID of the reference.
+         cm_guid contains the GncGUID of the reference.
          type is the type of the reference. */
         reference = g_new0(QofInstanceReference, 1);
         reference->type = g_strdup(qsf_ent->e_type);

Modified: gnucash/trunk/src/libqof/backend/file/qsf-xml-map.c
===================================================================
--- gnucash/trunk/src/libqof/backend/file/qsf-xml-map.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/backend/file/qsf-xml-map.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -506,7 +506,7 @@
                               xmlNodeGetContent(cur_node));
                 content = (gchar*)xmlGetProp(lookup_node, BAD_CAST MAP_VALUE_ATTR);
                 /** \todo FIXME: do the lookup. type is defined by output object. */
-                /* Find by name, get GUID, return GUID as string. */
+                /* Find by name, get GncGUID, return GncGUID as string. */
                 g_message("Lookup %s in the receiving application\n", content );
                 LEAVE (" todo");
                 return content;

Modified: gnucash/trunk/src/libqof/backend/file/qsf-xml.c
===================================================================
--- gnucash/trunk/src/libqof/backend/file/qsf-xml.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/backend/file/qsf-xml.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -381,7 +381,7 @@
     xmlNodePtr child_node;
     struct qsf_node_iterate iter;
     gchar *buffer;
-    GUID book_guid;
+    GncGUID book_guid;
 
     g_return_if_fail(child);
     g_return_if_fail(params);
@@ -399,7 +399,7 @@
         child_node = child->children->next;
         if (qsf_is_element(child_node, ns, QSF_BOOK_GUID))
         {
-            DEBUG (" trying to set book GUID");
+            DEBUG (" trying to set book GncGUID");
             buffer = g_strdup((gchar*)xmlNodeGetContent(child_node));
             g_return_if_fail(TRUE == string_to_guid(buffer, &book_guid));
             qof_instance_set_guid(QOF_INSTANCE(params->book), &book_guid);

Modified: gnucash/trunk/src/libqof/backend/file/qsf-xml.h
===================================================================
--- gnucash/trunk/src/libqof/backend/file/qsf-xml.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/backend/file/qsf-xml.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -78,7 +78,7 @@
 
         MAX_DATE_LENGTH itself is defined in gnc-date.h */
 #define QSF_BOOK_TAG	"book"      /**< First level child: book tag - the ::QofBook. */
-#define QSF_BOOK_GUID	"book-guid" /**< QOF GUID tag for the QofBook
+#define QSF_BOOK_GUID	"book-guid" /**< QOF GncGUID tag for the QofBook
         described by this QSF object file */
 #define QSF_BOOK_COUNT	"count"     /**< Sequential counter of each book in this file */
 #define QSF_OBJECT_TAG	"object"    /**< Second level child: object tag */
@@ -91,7 +91,7 @@
 /** @name Representing KVP as XML
 
 &lt;kvp type="kvp" path="/from-sched-xaction" value="guid"&gt;c858b9a3235723b55bc1179f0e8c1322&lt;/kvp&gt;
-A kvp type KVP parameter located at $path containing a GUID $value.
+A kvp type KVP parameter located at $path containing a GncGUID $value.
 
 The relevance of type="kvp" won't be evident in GnuCash, they all use "kvp".
 
@@ -162,14 +162,14 @@
                                                         sources, the map must deal with entities that need to be referenced in
                                                         the target QofBook but which simply do not exist in the QofBook used to generate
                                                             the QSF. e.g. pilot-link knows nothing of Accounts yet when QSF creates
-                                                            a gncInvoice from qof-datebook, gncInvoice needs to know the GUID of
+                                                            a gncInvoice from qof-datebook, gncInvoice needs to know the GncGUID of
                                                             certain accounts in the target QofBook. This is handled in the map
                                                         by specifying the name of the account as a default for that map. When imported,
                                                                     the QSF QofBackend looks up the object required using the name of
                                                                     the parameter to obtain the parameter type. This is the only situation
                                                                     where QSF converts between QOF data types. A string description of the
-                                                                    required object is converted to the GUID for that specific entity. The
-                                                                        map cannot contain the GUID as it is generic and used by multiple users.
+                                                                    required object is converted to the GncGUID for that specific entity. The
+                                                                        map cannot contain the GncGUID as it is generic and used by multiple users.
 
                                                                         \attention Using enumerators
                                                                         - enum types are the only defaults that are allowed to use the same name value
@@ -632,7 +632,7 @@
 /** \brief Book and book-guid node handler.
 
 Reads the book count="" attribute (currently only 1 QofBook is supported per QSF object file)
-Sets the book-guid as the GUID of the current QofBackend QofBook in qsf_param.
+Sets the book-guid as the GncGUID of the current QofBackend QofBook in qsf_param.
 Calls the next handler, qsf_object_node_handler, with the child of the book tag.
 */
 void qsf_book_node_handler(xmlNodePtr child, xmlNsPtr qsf_ns, qsf_param *params);

Modified: gnucash/trunk/src/libqof/qof/guid.c
===================================================================
--- gnucash/trunk/src/libqof/qof/guid.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/guid.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -71,41 +71,41 @@
  *
  * @return the value stored in @a value
  */
-G_CONST_RETURN GUID*
+G_CONST_RETURN GncGUID*
 gnc_value_get_guid (const GValue *value)
 {
-    GUID *val;
+    GncGUID *val;
 
     g_return_val_if_fail (value && G_IS_VALUE (value), NULL);
     g_return_val_if_fail (GNC_VALUE_HOLDS_GUID (value), NULL);
 
-    val = (GUID*) g_value_get_boxed (value);
+    val = (GncGUID*) g_value_get_boxed (value);
 
     return val;
 }
 
 
 /* Memory management routines ***************************************/
-GUID *
+GncGUID *
 guid_malloc (void)
 {
-    return g_slice_new(GUID);
+    return g_slice_new(GncGUID);
 }
 
 void
-guid_free (GUID *guid)
+guid_free (GncGUID *guid)
 {
     if (!guid)
         return;
 
-    g_slice_free(GUID, guid);
+    g_slice_free(GncGUID, guid);
 }
 
 
-GUID *
-guid_copy (const GUID *guid)
+GncGUID *
+guid_copy (const GncGUID *guid)
 {
-    GUID *copy;
+    GncGUID *copy;
 
     g_return_val_if_fail(guid, NULL);
     copy = guid_malloc();
@@ -113,11 +113,11 @@
     return copy;
 }
 
-const GUID *
+const GncGUID *
 guid_null(void)
 {
     static int null_inited = 0;
-    static GUID null_guid;
+    static GncGUID null_guid;
 
     if (!null_inited)
     {
@@ -496,7 +496,7 @@
 #define GUID_PERIOD 5000
 
 void
-guid_new(GUID *guid)
+guid_new(GncGUID *guid)
 {
     static int counter = 0;
     struct md5_ctx ctx;
@@ -546,10 +546,10 @@
     counter--;
 }
 
-GUID
+GncGUID
 guid_new_return(void)
 {
-    GUID guid;
+    GncGUID guid;
 
     guid_new (&guid);
 
@@ -615,7 +615,7 @@
 /* Allocate the key */
 
 const char *
-guid_to_string(const GUID * guid)
+guid_to_string(const GncGUID * guid)
 {
 #ifdef G_THREADS_ENABLED
     static GStaticPrivate guid_buffer_key = G_STATIC_PRIVATE_INIT;
@@ -638,7 +638,7 @@
 }
 
 char *
-guid_to_string_buff(const GUID * guid, char *string)
+guid_to_string_buff(const GncGUID * guid, char *string)
 {
     if (!string || !guid) return NULL;
 
@@ -649,13 +649,13 @@
 }
 
 gboolean
-string_to_guid(const char * string, GUID * guid)
+string_to_guid(const char * string, GncGUID * guid)
 {
     return decode_md5_string(string, (guid != NULL) ? guid->data : NULL);
 }
 
 gboolean
-guid_equal(const GUID *guid_1, const GUID *guid_2)
+guid_equal(const GncGUID *guid_1, const GncGUID *guid_2)
 {
     if (guid_1 && guid_2)
         return (memcmp(guid_1, guid_2, GUID_DATA_SIZE) == 0);
@@ -664,7 +664,7 @@
 }
 
 gint
-guid_compare(const GUID *guid_1, const GUID *guid_2)
+guid_compare(const GncGUID *guid_1, const GncGUID *guid_2)
 {
     if (guid_1 == guid_2)
         return 0;
@@ -682,7 +682,7 @@
 guint
 guid_hash_to_guint (gconstpointer ptr)
 {
-    const GUID *guid = ptr;
+    const GncGUID *guid = ptr;
 
     if (!guid)
     {
@@ -729,7 +729,7 @@
 gnc_string_to_guid (const GValue *src, GValue *dest)
 {
     /* FIXME: add more checks*/
-    GUID *guid;
+    GncGUID *guid;
     const gchar *as_string;
 
     g_return_if_fail (G_VALUE_HOLDS_STRING (src) &&
@@ -737,7 +737,7 @@
 
     as_string = g_value_get_string (src);
 
-    guid = g_new0 (GUID, 1);
+    guid = g_new0 (GncGUID, 1);
     string_to_guid(as_string, guid);
 
     g_value_take_boxed (dest, guid);
@@ -763,7 +763,7 @@
 
     if (G_UNLIKELY (type == 0))
     {
-        type = g_boxed_type_register_static ("GUID",
+        type = g_boxed_type_register_static ("GncGUID",
                                              (GBoxedCopyFunc)guid_copy,
                                              (GBoxedFreeFunc)guid_free);
 

Modified: gnucash/trunk/src/libqof/qof/guid.h
===================================================================
--- gnucash/trunk/src/libqof/qof/guid.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/guid.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -29,19 +29,19 @@
 
 /** @addtogroup Entity
     @{ */
-/** @addtogroup GUID
+/** @addtogroup GncGUID
     Globally Unique ID's provide a way to uniquely identify
-    some thing.  A GUID is a unique, cryptographically
+    some thing.  A GncGUID is a unique, cryptographically
     random 128-bit value.  The identifier is so random that
     it is safe to assume that there is no other such item
     on the planet Earth, and indeed, not even in the Galaxy
     or beyond.
 
-    QOF GUID's can be used independently of any other subsystem
+    QOF GncGUID's can be used independently of any other subsystem
     in QOF. In particular, they do not require the use of
-    other parts of the object subsystem. New GUID's are usually
+    other parts of the object subsystem. New GncGUID's are usually
     created by initialising a new entity using qof_instance_init,
-    rather than calling GUID functions directly.
+    rather than calling GncGUID functions directly.
 
     @{ */
 /** @file guid.h
@@ -57,14 +57,14 @@
 
     gint __align_me; /* this just ensures that GUIDs are 32-bit
                    * aligned on systems that need them to be. */
-} GUID;
+} GncGUID;
 
 
 #define GNC_TYPE_GUID (gnc_guid_get_type())
 #define GNC_VALUE_HOLDS_GUID(value) G_VALUE_HOLDS(value, GNC_TYPE_GUID)
 
 GType gnc_guid_get_type (void);
-G_CONST_RETURN GUID* gnc_value_get_guid (const GValue *value);
+G_CONST_RETURN GncGUID* gnc_value_get_guid (const GValue *value);
 
 /** number of characters needed to encode a guid as a string
  * not including the null terminator. */
@@ -131,27 +131,27 @@
  * you'd still have less than a one-in-a-million chance of coming up
  * with a duplicate id.  2^128 == 10^38 is a really really big number.)
  */
-void guid_new(GUID *guid);
+void guid_new(GncGUID *guid);
 
 /** Generate a new id. If no initialization function has been called,
  *  guid_init() will be called before the id is created.
  *
- * @return guid A data structure containing a newly allocated GUID.
+ * @return guid A data structure containing a newly allocated GncGUID.
  *  Caller is responsible for calling guid_free().
  */
-GUID guid_new_return(void);
+GncGUID guid_new_return(void);
 
-/** Returns a GUID which is guaranteed
+/** Returns a GncGUID which is guaranteed
 to never reference any entity. */
-const GUID * guid_null (void);
+const GncGUID * guid_null (void);
 
 /** Efficiently allocate & free memory for GUIDs */
-GUID * guid_malloc (void);
+GncGUID * guid_malloc (void);
 
 /* Return a guid set to all zero's */
-void   guid_free (GUID *guid);
+void   guid_free (GncGUID *guid);
 
-GUID *guid_copy (const GUID *guid);
+GncGUID *guid_copy (const GncGUID *guid);
 
 /** The guid_to_string() routine returns a null-terminated string
  *  encoding of the id. String encodings of identifiers are hex
@@ -168,7 +168,7 @@
  *  returned memory is owned by this routine and may not be freed by
  *  the caller.
  */
-const gchar * guid_to_string (const GUID * guid);
+const gchar * guid_to_string (const GncGUID * guid);
 
 /** The guid_to_string_buff() routine puts a null-terminated string
  *  encoding of the id into the memory pointed at by buff.  The
@@ -183,7 +183,7 @@
  *
  *  @return A pointer to the terminating null character of the string.
  */
-gchar * guid_to_string_buff (const GUID * guid, /*@ out @*/ gchar *buff);
+gchar * guid_to_string_buff (const GncGUID * guid, /*@ out @*/ gchar *buff);
 
 
 /** Given a string, decode the id into the guid if guid is non-NULL.
@@ -191,15 +191,15 @@
  * hexadecimal number. This function accepts both upper and lower case
  * hex digits. If the return value is FALSE, the effect on guid is
  * undefined. */
-gboolean string_to_guid(const gchar * string, /*@ out @*/ GUID * guid);
+gboolean string_to_guid(const gchar * string, /*@ out @*/ GncGUID * guid);
 
 
 /** Given two GUIDs, return TRUE if they are non-NULL and equal.
  * Return FALSE, otherwise. */
-gboolean guid_equal(const GUID *guid_1, const GUID *guid_2);
-gint     guid_compare(const GUID *g1, const GUID *g2);
+gboolean guid_equal(const GncGUID *guid_1, const GncGUID *guid_2);
+gint     guid_compare(const GncGUID *g1, const GncGUID *g2);
 
-/** Given a GUID *, hash it to a guint */
+/** Given a GncGUID *, hash it to a guint */
 guint guid_hash_to_guint(gconstpointer ptr);
 
 GHashTable *guid_hash_table_new(void);

Modified: gnucash/trunk/src/libqof/qof/kvp-util-p.h
===================================================================
--- gnucash/trunk/src/libqof/qof/kvp-util-p.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/kvp-util-p.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -33,20 +33,20 @@
  * @brief misc odd-job kvp utils engine-private routines
  * @author Copyright (C) 2001, 2003 Linas Vepstas <linas at linas.org>               *
 */
-/** @name KvpBag Bags of GUID Pointers
+/** @name KvpBag Bags of GncGUID Pointers
  @{
 */
 
 /** The gnc_kvp_bag_add() routine is used to maintain a collection
  *  of pointers in a kvp tree.
  *
- *  The thing being pointed at is uniquely identified by its GUID.
+ *  The thing being pointed at is uniquely identified by its GncGUID.
  *  This routine is typically used to create a linked list, and/or
  *  a collection of pointers to objects that are 'related' to each
  *  other in some way.
  *
  *  The var-args should be pairs of strings (const char *) followed by
- *  the corresponding GUID pointer (const GUID *).  Terminate the varargs
+ *  the corresponding GncGUID pointer (const GncGUID *).  Terminate the varargs
  *  with a NULL as the last string argument.
  *
  *  The actual 'pointer' is stored in a subdirectory in a bag located at
@@ -88,7 +88,7 @@
  */
 
 KvpFrame * gnc_kvp_bag_find_by_guid (KvpFrame *root,  const char * path,
-                                     const char *guid_name, const GUID *desired_guid);
+                                     const char *guid_name, const GncGUID *desired_guid);
 
 
 /** Remove the given frame from the bag.  The frame is removed,

Modified: gnucash/trunk/src/libqof/qof/kvp-util.c
===================================================================
--- gnucash/trunk/src/libqof/qof/kvp-util.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/kvp-util.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -55,8 +55,8 @@
     name = first_name;
     while (name)
     {
-        const GUID *guid;
-        guid = va_arg (ap, const GUID *);
+        const GncGUID *guid;
+        guid = va_arg (ap, const GncGUID *);
 
         kvp_frame_set_guid (cwd, name, guid);
 
@@ -87,14 +87,14 @@
 #define MATCH_GUID(elt) {                                       \
   KvpFrame *fr = kvp_value_get_frame (elt);                     \
   if (fr) {                                                     \
-     GUID *guid = kvp_frame_get_guid (fr, guid_name);           \
+     GncGUID *guid = kvp_frame_get_guid (fr, guid_name);           \
      if (guid && guid_equal (desired_guid, guid)) return fr;    \
   }                                                             \
 }
 
 KvpFrame *
 gnc_kvp_bag_find_by_guid (KvpFrame *root, const char * path,
-                          const char *guid_name, const GUID *desired_guid)
+                          const char *guid_name, const GncGUID *desired_guid)
 {
     KvpValue *arr;
     KvpValueType valtype;

Modified: gnucash/trunk/src/libqof/qof/kvp_frame.c
===================================================================
--- gnucash/trunk/src/libqof/qof/kvp_frame.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/kvp_frame.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -57,7 +57,7 @@
         double dbl;
         gnc_numeric numeric;
         gchar *str;
-        GUID *guid;
+        GncGUID *guid;
         Timespec timespec;
         KvpValueBinaryData binary;
         GList *list;
@@ -427,7 +427,7 @@
 }
 
 void
-kvp_frame_set_guid(KvpFrame * frame, const char * path, const GUID *guid)
+kvp_frame_set_guid(KvpFrame * frame, const char * path, const GncGUID *guid)
 {
     KvpValue *value;
     value = kvp_value_new_guid (guid);
@@ -605,7 +605,7 @@
 }
 
 void
-kvp_frame_add_guid(KvpFrame * frame, const char * path, const GUID *guid)
+kvp_frame_add_guid(KvpFrame * frame, const char * path, const GncGUID *guid)
 {
     KvpValue *value;
     value = kvp_value_new_guid (guid);
@@ -895,7 +895,7 @@
     return kvp_value_get_string(kvp_frame_get_slot (frame, key));
 }
 
-GUID *
+GncGUID *
 kvp_frame_get_guid(const KvpFrame *frame, const char *path)
 {
     char *key = NULL;
@@ -1164,15 +1164,15 @@
 }
 
 KvpValue *
-kvp_value_new_guid(const GUID * value)
+kvp_value_new_guid(const GncGUID * value)
 {
     KvpValue * retval;
     if (!value) return NULL;
 
     retval = g_new0(KvpValue, 1);
     retval->type       = KVP_TYPE_GUID;
-    retval->value.guid = g_new0(GUID, 1);
-    memcpy(retval->value.guid, value, sizeof(GUID));
+    retval->value.guid = g_new0(GncGUID, 1);
+    memcpy(retval->value.guid, value, sizeof(GncGUID));
     return retval;
 }
 
@@ -1365,7 +1365,7 @@
     }
 }
 
-GUID *
+GncGUID *
 kvp_value_get_guid(const KvpValue * value)
 {
     if (!value) return NULL;

Modified: gnucash/trunk/src/libqof/qof/kvp_frame.h
===================================================================
--- gnucash/trunk/src/libqof/qof/kvp_frame.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/kvp_frame.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -186,7 +186,7 @@
  *    *NOT* copy the frame.
  */
 void kvp_frame_set_string(KvpFrame * frame, const gchar * path, const gchar* str);
-void kvp_frame_set_guid(KvpFrame * frame, const gchar * path, const GUID *guid);
+void kvp_frame_set_guid(KvpFrame * frame, const gchar * path, const GncGUID *guid);
 
 void kvp_frame_set_frame(KvpFrame *frame, const gchar *path, KvpFrame *chld);
 void kvp_frame_set_frame_nc(KvpFrame *frame, const gchar *path, KvpFrame *chld);
@@ -295,7 +295,7 @@
  *    *NOT* copy the frame.
  */
 void kvp_frame_add_string(KvpFrame * frame, const gchar * path, const gchar* str);
-void kvp_frame_add_guid(KvpFrame * frame, const gchar * path, const GUID *guid);
+void kvp_frame_add_guid(KvpFrame * frame, const gchar * path, const GncGUID *guid);
 
 void kvp_frame_add_frame(KvpFrame *frame, const gchar *path, KvpFrame *chld);
 void kvp_frame_add_frame_nc(KvpFrame *frame, const gchar *path, KvpFrame *chld);
@@ -332,7 +332,7 @@
   If any part of the path does not exist, then NULL or zero will be
   returned.
 
-  The values returned for GUID, binary, GList, KvpFrame and string
+  The values returned for GncGUID, binary, GList, KvpFrame and string
   are "non-copying" -- the returned item is the actual item stored.
   Do not delete this item unless you take the required care to avoid
   possible bad pointer derefrences (i.e. core dumps).  Also, be
@@ -351,7 +351,7 @@
 double      kvp_frame_get_double(const KvpFrame *frame, const gchar *path);
 gnc_numeric kvp_frame_get_numeric(const KvpFrame *frame, const gchar *path);
 const gchar * kvp_frame_get_string(const KvpFrame *frame, const gchar *path);
-GUID      * kvp_frame_get_guid(const KvpFrame *frame, const gchar *path);
+GncGUID      * kvp_frame_get_guid(const KvpFrame *frame, const gchar *path);
 void      * kvp_frame_get_binary(const KvpFrame *frame, const gchar *path,
                                  guint64 * size_return);
 Timespec    kvp_frame_get_timespec(const KvpFrame *frame, const gchar *path);
@@ -561,7 +561,7 @@
 #define kvp_value_new_gnc_numeric kvp_value_new_numeric
 KvpValue   * kvp_value_new_numeric(gnc_numeric value);
 KvpValue   * kvp_value_new_string(const gchar * value);
-KvpValue   * kvp_value_new_guid(const GUID * guid);
+KvpValue   * kvp_value_new_guid(const GncGUID * guid);
 KvpValue   * kvp_value_new_timespec(Timespec timespec);
 KvpValue   * kvp_value_new_binary(const void * data, guint64 datasize);
 KvpValue   * kvp_value_new_frame(const KvpFrame * value);
@@ -611,7 +611,7 @@
 KvpValueType kvp_value_get_type(const KvpValue * value);
 
 
-/** Value accessors. Those for GUID, binary, GList, KvpFrame and
+/** Value accessors. Those for GncGUID, binary, GList, KvpFrame and
  *   string are non-copying -- the caller can modify the value
  *   directly. Just don't free it, or you screw up everything.
  *   Note that if another value is stored at the key location
@@ -631,7 +631,7 @@
 
 /** Value accessor. This one is non-copying -- the caller can modify
  * the value directly. */
-GUID        * kvp_value_get_guid(const KvpValue * value);
+GncGUID        * kvp_value_get_guid(const KvpValue * value);
 
 /** Value accessor. This one is non-copying -- the caller can modify
  * the value directly. */

Modified: gnucash/trunk/src/libqof/qof/qofbook-p.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofbook-p.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofbook-p.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -57,7 +57,7 @@
 gboolean qof_book_register (void);
 
 /** @deprecated use qof_instance_set_guid instead but only in
-backends (when reading the GUID from the data source). */
+backends (when reading the GncGUID from the data source). */
 #define qof_book_set_guid(book,guid)    \
          qof_instance_set_guid(QOF_INSTANCE(book), guid)
 

Modified: gnucash/trunk/src/libqof/qof/qofbook.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofbook.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofbook.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -131,7 +131,7 @@
  * used for anchoring data.
  */
 
-/** This macro looks up an entity by GUID and returns a pointer to the
+/** This macro looks up an entity by GncGUID and returns a pointer to the
  * entity by ending with a "return" statement. Hence, this macro can
  * only be used as the last statement in the definition of a function,
  * but not somewhere inline in the code. */

Modified: gnucash/trunk/src/libqof/qof/qofbookmerge.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofbookmerge.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofbookmerge.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -101,7 +101,7 @@
     QofCollection *mergeColl, *targetColl;
     gchar      *stringImport, *stringTarget;
     QofInstance  *mergeEnt, *targetEnt, *referenceEnt;
-    const GUID *guidImport, *guidTarget;
+    const GncGUID *guidImport, *guidTarget;
     QofParam   *qtparam;
     KvpFrame   *kvpImport, *kvpTarget;
     QofIdType  mergeParamName;
@@ -549,7 +549,7 @@
     QofBookMergeRule *mergeRule, *currentRule;
     QofBookMergeData *mergeData;
     QofInstance *targetEnt, *best_matchEnt;
-    GUID *g;
+    GncGUID *g;
     double difference;
     GSList *c;
 
@@ -719,7 +719,7 @@
     g_return_if_fail(mergeData->targetBook != NULL);
     g_return_if_fail(rule->mergeResult == MERGE_NEW);
 
-    /* The new object takes the GUID from the import to retain an absolute match */
+    /* The new object takes the GncGUID from the import to retain an absolute match */
     inst = qof_object_new_instance(rule->importEnt->e_type, mergeData->targetBook);
     g_return_if_fail(inst != NULL);
     rule->targetEnt = inst;
@@ -782,7 +782,7 @@
     QofBookMergeMapCollectionIterate mapped_coll_iter;
     QofParam    *cm_param;
     gchar       *cm_string;
-    const GUID  *cm_guid;
+    const GncGUID  *cm_guid;
     KvpFrame    *cm_kvp;
     /* function pointers and variables for parameter getters that don't use pointers normally */
     gnc_numeric  cm_numeric, (*numeric_getter)  (QofInstance*, QofParam*);
@@ -796,7 +796,7 @@
     void (*string_setter)    (QofInstance*, const gchar*);
     void (*date_setter)      (QofInstance*, Timespec);
     void (*numeric_setter)   (QofInstance*, gnc_numeric);
-    void (*guid_setter)      (QofInstance*, const GUID*);
+    void (*guid_setter)      (QofInstance*, const GncGUID*);
     void (*double_setter)    (QofInstance*, double);
     void (*boolean_setter)   (QofInstance*, gboolean);
     void (*i32_setter)       (QofInstance*, gint32);
@@ -821,7 +821,7 @@
            guid_to_string(qof_instance_get_guid(rule->targetEnt)));
 
     /* currentRule->targetEnt is now set,
-    	1. by an absolute GUID match or
+    	1. by an absolute GncGUID match or
     	2. by best_matchEnt and difference or
     	3. by MERGE_NEW.
     */
@@ -871,7 +871,7 @@
         if (safe_strcmp(rule->mergeType, QOF_TYPE_GUID) == 0)
         {
             cm_guid = cm_param->param_getfcn(rule->importEnt, cm_param);
-            guid_setter = (void(*)(QofInstance*, const GUID*))cm_param->param_setfcn;
+            guid_setter = (void(*)(QofInstance*, const GncGUID*))cm_param->param_setfcn;
             if (guid_setter != NULL)
             {
                 guid_setter(rule->targetEnt, cm_guid);
@@ -1090,7 +1090,7 @@
     gchar       *param_string, param_date[QOF_DATE_STRING_LENGTH];
     gchar       param_sa[GUID_ENCODING_LENGTH + 1];
     QofType     paramType;
-    const GUID *param_guid;
+    const GncGUID *param_guid;
     time_t      param_t;
     gnc_numeric param_numeric,  (*numeric_getter) (QofInstance*, QofParam*);
     Timespec    param_ts,       (*date_getter)    (QofInstance*, QofParam*);

Modified: gnucash/trunk/src/libqof/qof/qofbookmerge.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofbookmerge.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofbookmerge.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -30,27 +30,27 @@
 
 <b>Collision handling principles.</b>\n
 \n
-	-# Always check for a ::GUID first and compare. qofbookmerge only accepts
+	-# Always check for a ::GncGUID first and compare. qofbookmerge only accepts
     valid ::QofBook	data and therefore ALL objects in the import book will
-    include valid GUID's.
-	-# If the original import data did not contain a GUID (e.g. an external
-    non-GnuCash source)	the GUID values will have been created during the
-    import and will not match any existing GUID's in the target book so objects
-    that do not have a GUID match cannot be assumed to be ::MERGE_NEW - parameter
+    include valid GncGUID's.
+	-# If the original import data did not contain a GncGUID (e.g. an external
+    non-GnuCash source)	the GncGUID values will have been created during the
+    import and will not match any existing GncGUID's in the target book so objects
+    that do not have a GncGUID match cannot be assumed to be ::MERGE_NEW - parameter
     values must be checked.
 	-# If import contains data from closed books, store the data from the closed
 	books in the current book as active. i.e. re-open the books.
 
-- If a GUID match exists, set qof_book_merge_rule::mergeAbsolute to \a TRUE.
+- If a GncGUID match exists, set qof_book_merge_rule::mergeAbsolute to \a TRUE.
 	-# If ALL parameters in the import object match the target object with
-    the same \a GUID,
+    the same \a GncGUID,
 	set ::qof_book_merge_result to \a MERGE_ABSOLUTE.
 	-# If any parameters differ, set ::MERGE_UPDATE.
-- If the import object \a GUID does not match an existing object,
+- If the import object \a GncGUID does not match an existing object,
 mergeAbsolute is unchanged from the default \a FALSE
 The parameter values of the object are compared to other objects of the same
 type in the target book.
-	-# If the same data exists in the target book with a different GUID, the object
+	-# If the same data exists in the target book with a different GncGUID, the object
 	is tagged as DUPLICATE.
 	-# If the data has changed, the object is tagged as REPORT.
 	-# If the data does not match, the object is tagged as NEW
@@ -123,12 +123,12 @@
 typedef enum
 {
     MERGE_UNDEF,     /**< default value before comparison is made. */
-    MERGE_ABSOLUTE,  /**< GUID exact match, no new data - \b ignore */
+    MERGE_ABSOLUTE,  /**< GncGUID exact match, no new data - \b ignore */
     MERGE_NEW,       /**< import object does \b not exist in the target
                         book - \b add */
     MERGE_REPORT,    /**< import object needs user intervention - \b report */
-    MERGE_DUPLICATE, /**< import object with different GUID exactly matches
-                        existing GUID - \b ignore */
+    MERGE_DUPLICATE, /**< import object with different GncGUID exactly matches
+                        existing GncGUID - \b ignore */
     MERGE_UPDATE,    /**< import object matches an existing entity but includes
                         new or modified parameter data - \b update */
     MERGE_INVALID    /**< import object didn't match registered object or
@@ -139,7 +139,7 @@
 
 All rules are stored in the GList QofBookMergeData::mergeList.
 
-If the ::GUID matches it's the always same semantic object,
+If the ::GncGUID matches it's the always same semantic object,
 regardless of whether other data fields are changed.
 \n
 The boolean value mergeAbsolute defaults to \c FALSE
@@ -162,10 +162,10 @@
 typedef struct
 {
     /* internal counters and reference variables */
-    gboolean mergeAbsolute;   /**< Only set if the GUID of the import matches
+    gboolean mergeAbsolute;   /**< Only set if the GncGUID of the import matches
                                 the target */
     double difference;       /**< used to find best match in a book where no
-                                GUID matches */
+                                GncGUID matches */
     gboolean updated;        /**< prevent the mergeResult from being
                                 overwritten. */
     /* rule objects set from or by external calls */
@@ -255,12 +255,12 @@
 	-# Use ::qof_object_foreach to invoke the callback ::qof_book_merge_foreach,
     one object at a time on every instance stored in mergeBook. This is the
     first point where real data from the import book is accessed.
-	-# qof_book_merge_foreach obtains the ::GUID for the object from the import
+	-# qof_book_merge_foreach obtains the ::GncGUID for the object from the import
     book and runs the first	check on the original book, checking for any exact
-    GUID match. With the full parameter list, the rules for this object can be
-    created. If there is a GUID match, the data in each parameter of the import
+    GncGUID match. With the full parameter list, the rules for this object can be
+    created. If there is a GncGUID match, the data in each parameter of the import
     object is compared with the same semantic object in the original book. If
-    there is no GUID in the import object or no GUID match with the original
+    there is no GncGUID in the import object or no GncGUID match with the original
     book, the original book is searched to find a parameter match - checking
     for a ::MERGE_DUPLICATE result.
 	-# ::qof_book_merge_compare sets the ::QofBookMergeResult of the comparison.
@@ -405,12 +405,12 @@
 It is not possible to update the same rule more than once.
 
 -# \b MERGE_NEW is reserved for new objects and is only pre-set if
-all parameters, including GUID, have already failed to match any
+all parameters, including GncGUID, have already failed to match any
 relevant object. ::qof_book_merge_commit will create new
 entities for all rules tagged as MERGE_NEW.
 	- if mergeAbsolute is TRUE and the user wants to import the
 		data, requests to set MERGE_NEW will be forced to MERGE_UPDATE
-		because an entity with that GUID already exists in the target book.
+		because an entity with that GncGUID already exists in the target book.
 	- if MERGE_NEW is pre-set, requests to change to MERGE_UPDATE will be
 		ignored because a new entity is needed.
 -# \b MERGE_UPDATE is reserved for existing objects - ::qof_book_merge_commit

Modified: gnucash/trunk/src/libqof/qof/qofclass.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofclass.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofclass.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -122,7 +122,7 @@
 
                 */
                 /** @} */
-                /** Type of Paramters (String, Date, Numeric, GUID, etc.) */
+                /** Type of Paramters (String, Date, Numeric, GncGUID, etc.) */
                 typedef const char * QofType;
 
 typedef struct _QofParam QofParam;

Modified: gnucash/trunk/src/libqof/qof/qofevent.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofevent.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofevent.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -113,7 +113,7 @@
    Any other events are entirely the concern of the application.
 
  \note QofEventHandler routines do \b NOT support generating
- events from a GUID and QofIdType - you must specify a genuine QofInstance.
+ events from a GncGUID and QofIdType - you must specify a genuine QofInstance.
 
  @param entity:     the entity generating the event
  @param event_type: the name of the event.

Modified: gnucash/trunk/src/libqof/qof/qofid.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofid.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofid.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -95,7 +95,7 @@
 qof_collection_remove_entity (QofInstance *ent)
 {
     QofCollection *col;
-    const GUID *guid;
+    const GncGUID *guid;
 
     if (!ent) return;
     col = qof_instance_get_collection(ent);
@@ -110,7 +110,7 @@
 void
 qof_collection_insert_entity (QofCollection *col, QofInstance *ent)
 {
-    const GUID *guid;
+    const GncGUID *guid;
 
     if (!col || !ent) return;
     guid = qof_instance_get_guid(ent);
@@ -127,7 +127,7 @@
 qof_collection_add_entity (QofCollection *coll, QofInstance *ent)
 {
     QofInstance *e;
-    const GUID *guid;
+    const GncGUID *guid;
 
     e = NULL;
     if (!coll || !ent)
@@ -177,7 +177,7 @@
 {
     QofCollection *target;
     QofInstance *e;
-    const GUID *guid;
+    const GncGUID *guid;
     gint value;
 
     e = NULL;
@@ -249,7 +249,7 @@
 }
 
 QofInstance *
-qof_collection_lookup_entity (const QofCollection *col, const GUID * guid)
+qof_collection_lookup_entity (const QofCollection *col, const GncGUID * guid)
 {
     QofInstance *ent;
     g_return_val_if_fail (col, NULL);

Modified: gnucash/trunk/src/libqof/qof/qofid.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofid.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofid.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -27,11 +27,11 @@
     @{ */
 /** @addtogroup Entities
 
-    This file defines an API that adds types to the GUID's.
-    GUID's with types can be used to identify and reference
+    This file defines an API that adds types to the GncGUID's.
+    GncGUID's with types can be used to identify and reference
     typed entities.
 
-    The idea here is that a GUID can be used to uniquely identify
+    The idea here is that a GncGUID can be used to uniquely identify
     some thing.  By adding a type, one can then talk about the
     type of thing identified.  By adding a collection, one can
     then work with a handle to a collection of things of a given
@@ -45,7 +45,7 @@
     identifier for its lifetime.
     Identifiers can be encoded as hex strings.
 
-    GUID Identifiers are 'typed' with strings.  The native ids used
+    GncGUID Identifiers are 'typed' with strings.  The native ids used
     by QOF are defined below.
 	-# An id with type QOF_ID_NONE does not
     refer to any entity.
@@ -55,7 +55,7 @@
     actual entity, but that is not guaranteed as that entity does
 	not have to exist within the current book. (See ::PARTIAL_QOFBOOK).
 	Also, creating a new entity from a data source involves creating
-	a temporary GUID and then setting the value from the data source.
+	a temporary GncGUID and then setting the value from the data source.
 	If an id does refer to an entity, the type of the entity will match
 	the type of the identifier.
 
@@ -175,7 +175,7 @@
 
 /** Find the entity going only from its guid */
 /*@ dependent @*/
-QofInstance * qof_collection_lookup_entity (const QofCollection *, const GUID *);
+QofInstance * qof_collection_lookup_entity (const QofCollection *, const GncGUID *);
 
 /** Callback type for qof_collection_foreach */
 typedef void (*QofInstanceForeachCB) (QofInstance *, gpointer user_data);
@@ -237,11 +237,11 @@
 /** \brief Compare two secondary collections.
 
 Performs a deep comparision of the collections. Each QofInstance in
-each collection is looked up in the other collection, via the GUID.
+each collection is looked up in the other collection, via the GncGUID.
 
 \return 0 if the collections are identical or both are NULL
 otherwise -1 if target is NULL or either collection contains an entity with an invalid
-GUID or if the types of the two collections do not match,
+GncGUID or if the types of the two collections do not match,
 or +1 if merge is NULL or if any entity exists in one collection but
 not in the other.
 */

Modified: gnucash/trunk/src/libqof/qof/qofinstance.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofinstance.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofinstance.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -67,7 +67,7 @@
 typedef struct QofInstancePrivate
 {
 //    QofIdType        e_type;    /**<	Entity type */
-    GUID guid;                  /**< GUID for the entity */
+    GncGUID guid;                  /**< GncGUID for the entity */
     QofCollection  *collection; /**< Entity collection */
 
     /* The entity_table in which this instance is stored */
@@ -143,7 +143,7 @@
     (object_class,
      PROP_GUID,
      g_param_spec_boxed ("guid",
-                         "Object GUID",
+                         "Object GncGUID",
                          "The object Globally Unique ID.",
                          GNC_TYPE_GUID,
                          G_PARAM_READWRITE));
@@ -465,7 +465,7 @@
     }
 }
 
-const GUID *
+const GncGUID *
 qof_instance_get_guid (gconstpointer inst)
 {
     QofInstancePrivate *priv;
@@ -476,14 +476,14 @@
     return &(priv->guid);
 }
 
-const GUID *
+const GncGUID *
 qof_entity_get_guid (gconstpointer ent)
 {
     return ent ? qof_instance_get_guid(ent) : guid_null();
 }
 
 void
-qof_instance_set_guid (gpointer ptr, const GUID *guid)
+qof_instance_set_guid (gpointer ptr, const GncGUID *guid)
 {
     QofInstancePrivate *priv;
     QofInstance *inst;
@@ -891,7 +891,7 @@
 {
     QofCollection *col;
     KvpFrame *fr;
-    GUID * twin_guid;
+    GncGUID * twin_guid;
     QofInstance * twin;
     QofInstancePrivate *bpriv;
 

Modified: gnucash/trunk/src/libqof/qof/qofinstance.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofinstance.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofinstance.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -108,28 +108,28 @@
 /** See if two QofInstances share the same book.  */
 gboolean qof_instance_books_equal (gconstpointer ptr1, gconstpointer ptr2);
 
-/** Return the GUID of this instance */
+/** Return the GncGUID of this instance */
 /*@ dependent @*/
-const GUID * qof_instance_get_guid (gconstpointer);
+const GncGUID * qof_instance_get_guid (gconstpointer);
 
 /** \deprecated Use qof_instance_get_guid instead.
  *  Works like qof_instance_get_guid, but returns NULL on NULL */
 /*@ dependent @*/
-const GUID * qof_entity_get_guid (gconstpointer);
+const GncGUID * qof_entity_get_guid (gconstpointer);
 
 /** Return the collection this instance belongs to */
 /*@ dependent @*/
 QofCollection* qof_instance_get_collection (gconstpointer inst);
 
-/** Set the GUID of this instance */
-void qof_instance_set_guid (gpointer inst, const GUID *guid);
+/** Set the GncGUID of this instance */
+void qof_instance_set_guid (gpointer inst, const GncGUID *guid);
 
-/** Copy the GUID from one instance to another.  This routine should
- *  be used with extreme caution, since GUID values are everywhere
+/** Copy the GncGUID from one instance to another.  This routine should
+ *  be used with extreme caution, since GncGUID values are everywhere
  *  assumed to be unique. */
 void qof_instance_copy_guid (gpointer to, gconstpointer from);
 
-/** Compare the GUID values of two instances.  This routine returns 0
+/** Compare the GncGUID values of two instances.  This routine returns 0
  *  if the two values are equal, <0 if the first is smaller than the
  *  second, or >0 if the second is smaller tan the first. */
 gint qof_instance_guid_compare(const gconstpointer ptr1, const gconstpointer ptr2);

Modified: gnucash/trunk/src/libqof/qof/qofquery-deserial.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofquery-deserial.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofquery-deserial.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -115,7 +115,7 @@
    if (0 == strcmp (TOK, node->name))                        \
    {                                                         \
       const char *str = GET_TEXT (node);                     \
-      GUID guid;                                             \
+      GncGUID guid;                                             \
       string_to_guid (str, &guid);                           \
       FN (SELF, &guid);                                      \
    }                                                         \
@@ -245,7 +245,7 @@
 {
     *v = kvp_value_new_string (value);
 }
-static void wrap_new_guid(KvpValue **v, const GUID * value)
+static void wrap_new_guid(KvpValue **v, const GncGUID * value)
 {
     *v = kvp_value_new_guid (value);
 }
@@ -301,7 +301,7 @@
 {
     GList *guid_list, *n;
     const char *str;
-    GUID *guid;
+    GncGUID *guid;
     gboolean decode;
     QofQueryPredData *pred;
     QofGuidMatch sm;

Modified: gnucash/trunk/src/libqof/qof/qofquery-serialize.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofquery-serialize.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofquery-serialize.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -228,7 +228,7 @@
     if (!safe_strcmp (pd->type_name, QOF_TYPE_GUID))
     {
         topnode = xmlNewNode (NULL, "qofquery:pred-guid");
-        /* GUID Predicate doesn't do a PUT_HOW */
+        /* GncGUID Predicate doesn't do a PUT_HOW */
 
         pdata_g = (query_guid_t) pd;
         PUT_MATCH5("qofquery:guid-match", pdata_g->options,

Modified: gnucash/trunk/src/libqof/qof/qofquery.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofquery.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofquery.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -1270,7 +1270,7 @@
 }
 
 void qof_query_add_guid_match (QofQuery *q, GSList *param_list,
-                               const GUID *guid, QofQueryOp op)
+                               const GncGUID *guid, QofQueryOp op)
 {
     GList *g = NULL;
 
@@ -1700,7 +1700,7 @@
     gs = g_string_new ("Pred Data: ");
     g_string_append (gs, (gchar *) pd->type_name);
 
-    /* Char Predicate and GUID predicate don't use the 'how' field. */
+    /* Char Predicate and GncGUID predicate don't use the 'how' field. */
     if (safe_strcmp (pd->type_name, QOF_TYPE_CHAR) &&
             safe_strcmp (pd->type_name, QOF_TYPE_GUID))
     {
@@ -1756,7 +1756,7 @@
         {
             /* THREAD-UNSAFE */
             g_string_append_printf (gs, ", guids: %s",
-                                    guid_to_string ((GUID *) node->data));
+                                    guid_to_string ((GncGUID *) node->data));
         }
         return;
     }

Modified: gnucash/trunk/src/libqof/qof/qofquery.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofquery.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofquery.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -189,7 +189,7 @@
 
 /** DOCUMENT ME !! */
 void qof_query_add_guid_match (QofQuery *q, GSList *param_list,
-                               const GUID *guid, QofQueryOp op);
+                               const GncGUID *guid, QofQueryOp op);
 /** DOCUMENT ME !! */
 void qof_query_add_guid_list_match (QofQuery *q, GSList *param_list,
                                     GList *guid_list, QofGuidMatch options,

Modified: gnucash/trunk/src/libqof/qof/qofquerycore-p.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofquerycore-p.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofquerycore-p.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -142,7 +142,7 @@
 {
     QofQueryPredData pd;
     QofGuidMatch options;
-    const GUID *guid;
+    const GncGUID *guid;
     GList * guids;
 } query_choice_def, *query_choice_t;
 

Modified: gnucash/trunk/src/libqof/qof/qofquerycore.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofquerycore.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofquerycore.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -63,7 +63,7 @@
 static const char * query_numeric_type = QOF_TYPE_NUMERIC;
 
 typedef GList * (*query_glist_getter) (gpointer, QofParam *);
-typedef const GUID * (*query_guid_getter) (gpointer, QofParam *);
+typedef const GncGUID * (*query_guid_getter) (gpointer, QofParam *);
 static const char * query_guid_type = QOF_TYPE_GUID;
 
 typedef gint32 (*query_int32_getter) (gpointer, QofParam *);
@@ -87,7 +87,7 @@
 typedef QofCollection * (*query_collect_getter) (gpointer, QofParam*);
 static const char * query_collect_type = QOF_TYPE_COLLECT;
 
-typedef const GUID * (*query_choice_getter) (gpointer, QofParam *);
+typedef const GncGUID * (*query_choice_getter) (gpointer, QofParam *);
 static const char * query_choice_type = QOF_TYPE_CHOICE;
 
 /* Tables for predicate storage and lookup */
@@ -580,7 +580,7 @@
 {
     query_guid_t pdata = (query_guid_t)pd;
     GList *node, *o_list;
-    const GUID *guid = NULL;
+    const GncGUID *guid = NULL;
 
     VERIFY_PREDICATE (query_guid_type);
 
@@ -595,7 +595,7 @@
 
         for (node = pdata->guids; node; node = node->next)
         {
-            /* See if this GUID matches the object's guid */
+            /* See if this GncGUID matches the object's guid */
             for (o_list = object; o_list; o_list = o_list->next)
             {
                 guid = ((query_guid_getter)getter->param_getfcn) (o_list->data, getter);
@@ -620,9 +620,9 @@
         break;
 
     case QOF_GUID_MATCH_LIST_ANY:
-        /* object is a single object, getter returns a GList* of GUID*
+        /* object is a single object, getter returns a GList* of GncGUID*
          *
-         * See if any GUID* in the returned list matches any guid in the
+         * See if any GncGUID* in the returned list matches any guid in the
          * predicate match list.
          */
 
@@ -653,7 +653,7 @@
         break;
 
     default:
-        /* object is a single object, getter returns a GUID*
+        /* object is a single object, getter returns a GncGUID*
          *
          * See if the guid is in the list
          */
@@ -740,8 +740,8 @@
     pdata->guids = g_list_copy (guid_list);
     for (node = pdata->guids; node; node = node->next)
     {
-        GUID *guid = guid_malloc ();
-        *guid = *((GUID *)node->data);
+        GncGUID *guid = guid_malloc ();
+        *guid = *((GncGUID *)node->data);
         node->data = guid;
     }
     return ((QofQueryPredData*)pdata);
@@ -1346,7 +1346,7 @@
     query_coll_t pdata;
     QofCollection *coll;
     GList *node, *node2, *o_list;
-    const GUID *guid;
+    const GncGUID *guid;
 
     pdata = (query_coll_t)pd;
     VERIFY_PREDICATE (query_collect_type);
@@ -1492,9 +1492,9 @@
 query_collect_cb(QofInstance* ent, gpointer user_data)
 {
     query_coll_t pdata;
-    GUID *guid;
+    GncGUID *guid;
 
-    guid = (GUID*)qof_entity_get_guid(ent);
+    guid = (GncGUID*)qof_entity_get_guid(ent);
     pdata = (query_coll_t)user_data;
     pdata->guids = g_list_append(pdata->guids, guid);
 }
@@ -1524,7 +1524,7 @@
 {
     query_choice_t pdata = (query_choice_t)pd;
     GList *node, *o_list;
-    const GUID *guid = NULL;
+    const GncGUID *guid = NULL;
 
     VERIFY_PREDICATE (query_choice_type);
 
@@ -1539,7 +1539,7 @@
 
         for (node = pdata->guids; node; node = node->next)
         {
-            /* See if this GUID matches the object's guid */
+            /* See if this GncGUID matches the object's guid */
             for (o_list = object; o_list; o_list = o_list->next)
             {
                 guid = ((query_choice_getter)getter->param_getfcn) (o_list->data, getter);
@@ -1586,7 +1586,7 @@
         break;
 
     default:
-        /* object is a single object, getter returns a GUID*
+        /* object is a single object, getter returns a GncGUID*
          *
          * See if the guid is in the list
          */
@@ -1673,8 +1673,8 @@
     pdata->guids = g_list_copy (guid_list);
     for (node = pdata->guids; node; node = node->next)
     {
-        GUID *guid = guid_malloc ();
-        *guid = *((GUID *)node->data);
+        GncGUID *guid = guid_malloc ();
+        *guid = *((GncGUID *)node->data);
         node->data = guid;
     }
     return ((QofQueryPredData*)pdata);

Modified: gnucash/trunk/src/libqof/qof/qofquerycore.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofquerycore.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofquerycore.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -103,15 +103,15 @@
 typedef enum
 {
     /** These expect a single object and expect the
-     * QofAccessFunc returns GUID* */
+     * QofAccessFunc returns GncGUID* */
     QOF_GUID_MATCH_ANY = 1,
     QOF_GUID_MATCH_NONE,
     QOF_GUID_MATCH_NULL,
     /** These expect a GList* of objects and calls the QofAccessFunc routine
-     * on each item in the list to obtain a GUID* for each object */
+     * on each item in the list to obtain a GncGUID* for each object */
     QOF_GUID_MATCH_ALL,
     /** These expect a single object and expect the QofAccessFunc function
-     * to return a GList* of GUID* (the list is the property of the caller) */
+     * to return a GList* of GncGUID* (the list is the property of the caller) */
     QOF_GUID_MATCH_LIST_ANY,
 } QofGuidMatch;
 

Modified: gnucash/trunk/src/libqof/qof/qofreference.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofreference.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofreference.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -128,7 +128,7 @@
 {
     QofInstanceReference *reference;
     QofInstance          *ref_ent;
-    const GUID         *cm_guid;
+    const GncGUID         *cm_guid;
     char                cm_sa[GUID_ENCODING_LENGTH + 1];
     gchar              *cm_string;
 
@@ -140,7 +140,7 @@
     }
     reference = g_new0(QofInstanceReference, 1);
     reference->type = ent->e_type;
-    reference->ref_guid = g_new(GUID, 1);
+    reference->ref_guid = g_new(GncGUID, 1);
     reference->ent_guid = qof_instance_get_guid(ent);
     if (qof_object_is_choice(ent->e_type))
     {

Modified: gnucash/trunk/src/libqof/qof/qofreference.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofreference.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofreference.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -44,10 +44,10 @@
 To retain the relationships between entities, including between a partial and
 a complete book, QofInstanceReference data is stored in the QofBook. This data
 should be read by backends that support partial books so that the exported
-data contains the GUID and QofIdType of the referenced entity. Even if that
+data contains the GncGUID and QofIdType of the referenced entity. Even if that
 entity does not then exist within the partial book, it can be located when
 the partial book is merged back into the original, complete, book. (Remember
-that given the GUID and QofIdType of any QofInstance it is possible to uniquely
+that given the GncGUID and QofIdType of any QofInstance it is possible to uniquely
 identify that entity in another book.)
 
 Entities in partial books may need to refer to the entities that remain within
@@ -74,7 +74,7 @@
 Part of the handling for partial books requires a storage mechanism for
 references to entities that are not within reach of the partial book.
 This requires a GList in the book data to contain the reference
-QofIdType and GUID so that when the book is written out, the
+QofIdType and GncGUID so that when the book is written out, the
 reference can be included. See ::qof_book_get_data.
 
 When the file is imported back in, the list needs to be rebuilt.
@@ -82,7 +82,7 @@
 Other backends can process the list in similar ways.
 
 The list stores the QofInstanceReference to the referenced entity -
-a struct that contains the GUID and the QofIdType of the referenced
+a struct that contains the GncGUID and the QofIdType of the referenced
 entity as well as the parameter used to obtain the reference.
 
 Partial books need to be differentiated in the backend, the
@@ -109,10 +109,10 @@
     QofIdType       type;       /**< The type of the original entity -
 	use the param->param_type to obtain the type of the reference entity.
 	For a QOF_TYPE_COLLECT, obtain the collection and get the type from that. */
-    GUID            *ref_guid;  /**< The GUID of the REFERENCE entity */
+    GncGUID            *ref_guid;  /**< The GncGUID of the REFERENCE entity */
     const QofParam  *param;      /**< The parameter of the original entity to use
 	to get or set the reference. */
-    const GUID      *ent_guid;   /**< The GUID of the original entity. */
+    const GncGUID      *ent_guid;   /**< The GncGUID of the original entity. */
 } QofInstanceReference;
 
 /** \brief Adds a new reference to the partial book data hash.
@@ -129,9 +129,9 @@
  *
  * Retrieved later by QSF (or any other suitable backend) to
  * rebuild the references from the QofInstanceReference struct
- * that contains the QofIdType and GUID of the referenced entity
+ * that contains the QofIdType and GncGUID of the referenced entity
  * of the original QofBook as well as the parameter data and the
- * GUID of the original entity.
+ * GncGUID of the original entity.
  * */
 #define ENTITYREFERENCE "QofInstanceReference"
 
@@ -149,7 +149,7 @@
 @param book The partial book containing the referenceList
 
 The referenceList is a GList of QofInstanceReference structures that contain
-the GUID of each end of a reference. e.g. where one entity refers to another.
+the GncGUID of each end of a reference. e.g. where one entity refers to another.
 
 The referenceList is used in partial books to store relationships between
 entities when the entities themselves might not exist in the partial book.
@@ -182,7 +182,7 @@
 any other entity, usually as a parent or child.
 The routine calls the param_getfcn of the supplied parameter,
 which must return an object (QofInstance*), not a known QOF data type, to
-retrieve the referenced entity and therefore the GUID. The GUID of
+retrieve the referenced entity and therefore the GncGUID. The GncGUID of
 both entities are stored in the reference which then needs to be added
 to the reference list which is added to the partial book data hash.
 The reference itself is used to preserve the relationship

Modified: gnucash/trunk/src/libqof/qof/qofsession.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofsession.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofsession.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -380,7 +380,7 @@
     QofInstanceReference *ref;
     QofInstanceCopyData  *qecd;
     QofInstance *ent;
-    const GUID   *cm_guid;
+    const GncGUID   *cm_guid;
     char         cm_sa[GUID_ENCODING_LENGTH + 1];
     gchar        *cm_string;
 
@@ -390,7 +390,7 @@
     g_return_if_fail(ent);
     ref = g_new0(QofInstanceReference, 1);
     ref->type = ent->e_type;
-    ref->ref_guid = g_new(GUID, 1);
+    ref->ref_guid = g_new(GncGUID, 1);
     ref->ent_guid = qof_instance_get_guid(ent);
     ref->param = qof_class_get_parameter(ent->e_type,
                                          qecd->param->param_name);
@@ -414,7 +414,7 @@
     /* cm_ prefix used for variables that hold the data to commit */
     QofParam 		*cm_param;
     gchar 			*cm_string, *cm_char;
-    const GUID 		*cm_guid;
+    const GncGUID 		*cm_guid;
     KvpFrame 		*cm_kvp;
     QofCollection *cm_col;
     /* function pointers and variables for parameter getters that don't use pointers normally */
@@ -428,7 +428,7 @@
     void	(*string_setter)	(QofInstance*, const char*);
     void	(*date_setter)		(QofInstance*, Timespec);
     void	(*numeric_setter)	(QofInstance*, gnc_numeric);
-    void	(*guid_setter)		(QofInstance*, const GUID*);
+    void	(*guid_setter)		(QofInstance*, const GncGUID*);
     void	(*double_setter)	(QofInstance*, double);
     void	(*boolean_setter)	(QofInstance*, gboolean);
     void	(*i32_setter)		(QofInstance*, gint32);
@@ -484,8 +484,8 @@
     }
     if (safe_strcmp(cm_param->param_type, QOF_TYPE_GUID) == 0)
     {
-        cm_guid = (const GUID*)cm_param->param_getfcn(importEnt, cm_param);
-        guid_setter = (void(*)(QofInstance*, const GUID*))cm_param->param_setfcn;
+        cm_guid = (const GncGUID*)cm_param->param_getfcn(importEnt, cm_param);
+        guid_setter = (void(*)(QofInstance*, const GncGUID*))cm_param->param_setfcn;
         if (guid_setter != NULL)
         {
             guid_setter(targetEnt, cm_guid);
@@ -591,7 +591,7 @@
 qof_instance_guid_match(QofSession *new_session, QofInstance *original)
 {
     QofInstance *copy;
-    const GUID *g;
+    const GncGUID *g;
     QofIdTypeConst type;
     QofBook *targetBook;
     QofCollection *coll;
@@ -618,7 +618,7 @@
     QofInstance *original;
     QofInstance *inst;
     QofBook *book;
-    const GUID *g;
+    const GncGUID *g;
 
     g_return_if_fail(data != NULL);
     original = QOF_INSTANCE(data);
@@ -660,7 +660,7 @@
 qof_instance_coll_foreach(QofInstance *original, gpointer user_data)
 {
     QofInstanceCopyData *qecd;
-    const GUID *g;
+    const GncGUID *g;
     QofBook *targetBook;
     QofCollection *coll;
     QofInstance *copy;
@@ -685,7 +685,7 @@
     QofInstanceCopyData *qecd;
     QofBook *book;
     QofInstance *inst;
-    const GUID *g;
+    const GncGUID *g;
 
     g_return_if_fail(original != NULL);
     g_return_if_fail(user_data != NULL);

Modified: gnucash/trunk/src/libqof/qof/qofsession.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofsession.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofsession.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -262,13 +262,13 @@
 
 Copied entities are identical to the source entity, all parameters
 defined with ::QofAccessFunc and ::QofSetterFunc in QOF are copied
-and the ::GUID of the original ::QofInstance is set in the new entity.
+and the ::GncGUID of the original ::QofInstance is set in the new entity.
 Sessions containing copied entities are intended for use
 as mechanisms for data export.
 
 It is acceptable to add entities to new_session in batches. Note that
 any of these calls will fail if an entity already exists in new_session
-with the same GUID as any entity to be copied.
+with the same GncGUID as any entity to be copied.
 
 To merge a whole QofBook or where there is any possibility
 of collisions or requirement for user intervention,
@@ -281,13 +281,13 @@
 /** \brief Copy a single QofInstance to another session
 
 Checks first that no entity in the session book contains
-the GUID of the source entity.
+the GncGUID of the source entity.
 
  @param new_session - the target session
  @param original - the QofInstance* to copy
 
 @return FALSE without copying if the session contains an entity
-with the same GUID already, otherwise TRUE.
+with the same GncGUID already, otherwise TRUE.
 */
 
 gboolean qof_instance_copy_to_session(QofSession* new_session, QofInstance* original);
@@ -295,19 +295,19 @@
 /** @brief Copy a GList of entities to another session
 
 The QofBook in the new_session must \b not contain any entities
-with the same GUID as any of the source entities - there is
+with the same GncGUID as any of the source entities - there is
 no support for handling collisions, instead use \ref BookMerge
 
 Note that the GList (e.g. from ::qof_sql_query_run) can contain
 QofInstance pointers of any ::QofIdType, in any sequence. As long
-as all members of the list are ::QofInstance*, and all GUID's are
+as all members of the list are ::QofInstance*, and all GncGUID's are
 unique, the list can be copied.
 
  @param new_session - the target session
  @param entity_list - a GList of QofInstance pointers of any type(s).
 
 @return FALSE, without copying, if new_session contains any entities
-with the same GUID. Otherwise TRUE.
+with the same GncGUID. Otherwise TRUE.
 
 */
 gboolean qof_instance_copy_list(QofSession *new_session, GList *entity_list);
@@ -315,14 +315,14 @@
 /** @brief Copy a QofCollection of entities.
 
 The QofBook in the new_session must \b not contain any entities
-with the same GUID as any entities in the collection - there is
+with the same GncGUID as any entities in the collection - there is
 no support for handling collisions - instead, use \ref BookMerge
 
 @param new_session - the target session
 @param entity_coll - a QofCollection of any QofIdType.
 
 @return FALSE, without copying, if new_session contains any entities
-with the same GUID. Otherwise TRUE.
+with the same GncGUID. Otherwise TRUE.
 */
 
 gboolean qof_instance_copy_coll(QofSession *new_session, QofCollection *entity_coll);
@@ -333,7 +333,7 @@
 ::qof_instance_copy_to_session for more information.
 
 The QofBook in the new_session must \b not contain any entities
-with the same GUID as any entities to be copied - there is
+with the same GncGUID as any entities to be copied - there is
 no support for handling collisions - instead, use \ref BookMerge
 
 Objects can be defined solely in terms of QOF data types or

Modified: gnucash/trunk/src/libqof/qof/qofsql.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofsql.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofsql.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -385,7 +385,7 @@
     }
     else if (!strcmp (param_type, QOF_TYPE_GUID))
     {
-        GUID guid;
+        GncGUID guid;
         gboolean rc = string_to_guid (qvalue_name, &guid);
         if (0 == rc)
         {
@@ -416,7 +416,7 @@
         /* If str has only digits, we know its a plain number.
          * If its numbers and a decimal point, assume a float
          * If its numbers and a slash, assume numeric
-         * If its 32 bytes of hex, assume GUID
+         * If its 32 bytes of hex, assume GncGUID
          * If it looks like an iso date ...
          * else assume its a string.
          */
@@ -424,7 +424,7 @@
         len = strlen (str);
         if ((32 == len) && (32 == strspn (str, "0123456789abcdef")))
         {
-            GUID guid;
+            GncGUID guid;
             string_to_guid (str, &guid);
             kval = kvp_value_new_guid (&guid);
         }
@@ -596,7 +596,7 @@
     gint64         cm_i64;
     Timespec       cm_date;
     char           cm_char, *tail;
-    GUID           *cm_guid;
+    GncGUID           *cm_guid;
     /*	KvpFrame       *cm_kvp;
     	KvpValue       *cm_value;
     	KvpValueType   cm_type;*/
@@ -649,7 +649,7 @@
     }
     if (safe_strcmp(param->param_type, QOF_TYPE_GUID) == 0)
     {
-        cm_guid = g_new(GUID, 1);
+        cm_guid = g_new(GncGUID, 1);
         if (TRUE != string_to_guid(insert_string, cm_guid))
         {
             LEAVE (" string to guid failed for %s", insert_string);

Modified: gnucash/trunk/src/libqof/qof/qofutil.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofutil.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/libqof/qof/qofutil.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -334,7 +334,7 @@
     gchar       param_sa[GUID_ENCODING_LENGTH + 1];
     gboolean    known_type;
     QofType     paramType;
-    const GUID *param_guid;
+    const GncGUID *param_guid;
     time_t      param_t;
     gnc_numeric param_numeric,  (*numeric_getter) (QofInstance*, QofParam*);
     Timespec    param_ts,       (*date_getter)    (QofInstance*, QofParam*);
@@ -487,7 +487,7 @@
         }
         param_guid = qof_book_get_guid(book);
         guid_to_string_buff(param_guid, param_sa);
-        PINFO (" book GUID=%s", param_sa);
+        PINFO (" book GncGUID=%s", param_sa);
         param_string = g_strdup(param_sa);
         return param_string;
     }

Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -50,7 +50,7 @@
 
 struct gnc_ledger_display
 {
-    GUID leader;
+    GncGUID leader;
 
     Query *query;
 
@@ -450,11 +450,11 @@
 }
 
 /**
- * @param id: The string version of the GUID of the context of template
+ * @param id: The string version of the GncGUID of the context of template
  * transaction being edited in this template GL.  As used by scheduled
- * transactions, this is the GUID of the SX itself which is magically the
+ * transactions, this is the GncGUID of the SX itself which is magically the
  * *name* of the (template) account which contains the transactions for this
- * scheduled transaction.  That's right.  The stringified GUID of the SX is
+ * scheduled transaction.  That's right.  The stringified GncGUID of the SX is
  * the name of the SX'es template account.
  **/
 GNCLedgerDisplay *

Modified: gnucash/trunk/src/register/ledger-core/split-register-load.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-load.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/register/ledger-core/split-register-load.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -91,13 +91,13 @@
  *  style keeps all the transaction-level data and totals in the leading
  *  cell, and all split-level data in the cells that follow.
  *
- *  Each of these cells will remember the GUID of the ::Split to which it
- *  is associated. The leading virtual cell will be assigned the GUID of
+ *  Each of these cells will remember the GncGUID of the ::Split to which it
+ *  is associated. The leading virtual cell will be assigned the GncGUID of
  *  the "anchoring split" specified by @a split.
  *
  *  Optionally an extra, empty virtual cell will be assigned to no split.
  *  This should not be confused with the "blank split", because this cell is
- *  not tied to any split at all, not even the "blank split". A null GUID
+ *  not tied to any split at all, not even the "blank split". A null GncGUID
  *  is assigned to it.
  *
  *  The caller can find out which virtual row was used for a particular virtual

Modified: gnucash/trunk/src/register/ledger-core/split-register-model-save.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-model-save.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/register/ledger-core/split-register-model-save.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -635,13 +635,13 @@
     SplitRegister *reg = user_data;
     SRInfo *info = gnc_split_register_get_info (reg);
     Account *template_acc;
-    const GUID *acctGUID;
+    const GncGUID *acctGUID;
     kvp_frame *kvpf;
     Account *acct;
 
     g_return_if_fail (gnc_basic_cell_has_name (cell, XFRM_CELL));
 
-    /* save the account GUID into the kvp_data. */
+    /* save the account GncGUID into the kvp_data. */
     acct = gnc_split_register_get_account (reg, XFRM_CELL);
     if (!acct)
     {

Modified: gnucash/trunk/src/register/ledger-core/split-register-model.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-model.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/register/ledger-core/split-register-model.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -1970,7 +1970,7 @@
 static gpointer
 gnc_split_register_guid_malloc (void)
 {
-    GUID *guid;
+    GncGUID *guid;
 
     guid = guid_malloc ();
 
@@ -2002,7 +2002,7 @@
     if (kvpf)
     {
         Account *account;
-        GUID *guid;
+        GncGUID *guid;
 
         guid = kvp_value_get_guid(
                    kvp_frame_get_slot_path(kvpf, "sched-xaction", "account", NULL));
@@ -2149,8 +2149,8 @@
 static void
 gnc_split_register_guid_copy (gpointer p_to, gconstpointer p_from)
 {
-    GUID *to = p_to;
-    const GUID *from = p_from;
+    GncGUID *to = p_to;
+    const GncGUID *from = p_from;
 
     g_return_if_fail (to != NULL);
     *to = from ? *from : *guid_null();

Modified: gnucash/trunk/src/register/ledger-core/split-register-p.h
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-p.h	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/register/ledger-core/split-register-p.h	2010-03-27 21:01:21 UTC (rev 18969)
@@ -34,10 +34,10 @@
 struct sr_info
 {
     /* The blank split at the bottom of the register */
-    GUID blank_split_guid;
+    GncGUID blank_split_guid;
 
     /* The currently open transaction, if any */
-    GUID pending_trans_guid;
+    GncGUID pending_trans_guid;
 
     /* A transaction used to remember where to put the cursor */
     Transaction *cursor_hint_trans;
@@ -72,7 +72,7 @@
     gboolean full_refresh;
 
     /* The default account where new splits are added */
-    GUID default_account;
+    GncGUID default_account;
 
     /* The last date recorded in the blank split */
     time_t last_date_entered;
@@ -107,7 +107,7 @@
     gboolean template;
 
     /* The template account which template transaction should belong to */
-    GUID template_account;
+    GncGUID template_account;
 
     /* configured strings for debit/credit headers */
     char *debit_str;

Modified: gnucash/trunk/src/register/ledger-core/split-register-util.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-util.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/register/ledger-core/split-register-util.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -90,7 +90,7 @@
 gnc_split_register_get_split (SplitRegister *reg,
                               VirtualCellLocation vcell_loc)
 {
-    GUID *guid;
+    GncGUID *guid;
 
     if (reg == NULL)
         return NULL;

Modified: gnucash/trunk/src/register/ledger-core/split-register.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register.c	2010-03-27 20:27:10 UTC (rev 18968)
+++ gnucash/trunk/src/register/ledger-core/split-register.c	2010-03-27 21:01:21 UTC (rev 18969)
@@ -58,7 +58,7 @@
 /* The copied split or transaction, if any */
 static CursorClass copied_class = CURSOR_CLASS_NONE;
 static SCM copied_item = SCM_UNDEFINED;
-static GUID copied_leader_guid;
+static GncGUID copied_leader_guid;
 
 
 /** static prototypes *****************************************************/
@@ -839,7 +839,7 @@
                                 "transaction. "
                                 "Are you sure you want to do that?");
         Account * copied_leader;
-        const GUID *new_guid;
+        const GncGUID *new_guid;
         int trans_split_index;
         int split_index;
         int num_splits;



More information about the gnucash-changes mailing list