[sword-svn] r3587 - in trunk: bindings include

scribe at crosswire.org scribe at crosswire.org
Sat Jun 16 07:17:58 MST 2018


Author: scribe
Date: 2018-06-16 07:17:57 -0700 (Sat, 16 Jun 2018)
New Revision: 3587

Modified:
   trunk/bindings/flatapi.cpp
   trunk/include/flatapi.h
Log:
Updated to support latest version of BibleSync and to accept [C]hat messages


Modified: trunk/bindings/flatapi.cpp
===================================================================
--- trunk/bindings/flatapi.cpp	2018-06-10 16:31:42 UTC (rev 3586)
+++ trunk/bindings/flatapi.cpp	2018-06-16 14:17:57 UTC (rev 3587)
@@ -134,12 +134,19 @@
 		// announce
 		case 'A':
 			break;
+		// chat message
+		case 'C': {
+SWLog::getSystemLog()->logDebug("bibleSync Chat Received: %s", ref.c_str());
+			(*bibleSyncListener)(cmd, group.c_str(), alt.c_str());
+			break;
+		}
 		// navigation
 		case 'N':
 SWLog::getSystemLog()->logDebug("bibleSync Nav Received: %s", ref.c_str());
-			(*bibleSyncListener)(ref.c_str());
+			(*bibleSyncListener)(cmd, ref.c_str(), 0);
 			break;
 		}
+
 	}
 }
 #endif
@@ -1804,7 +1811,7 @@
 	const char *modNamePrefix = osisRef.stripPrefix(':');
 	if (modNamePrefix) modName = modNamePrefix;
 
-	BibleSync_xmit_status result = bibleSync->Transmit(BSP_SYNC, modName.c_str(), osisRef.c_str());
+	BibleSync_xmit_status result = bibleSync->Transmit(modName.c_str(), osisRef.c_str());
 SWLog::getSystemLog()->logDebug("libsword: sendBibleSyncMessage() finished with status code: %d", result);
 #else
 SWLog::getSystemLog()->logDebug("libsword: sendBibleSyncMessage() bibleSync not active; message not sent.");

Modified: trunk/include/flatapi.h
===================================================================
--- trunk/include/flatapi.h	2018-06-10 16:31:42 UTC (rev 3586)
+++ trunk/include/flatapi.h	2018-06-16 14:17:57 UTC (rev 3587)
@@ -87,7 +87,7 @@
 
 typedef void (*org_crosswire_sword_SWModule_SearchCallback)(int);
 
-typedef void (*org_biblesync_MessageReceivedCallback)(const char *);
+typedef void (*org_biblesync_MessageReceivedCallback)(char, const char *, const char *);
 
 /*
  * Class:     org_crosswire_sword_SWModule




More information about the sword-cvs mailing list