[sword-svn] r3525 - in trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD: . src/android src/ios www
scribe at crosswire.org
scribe at crosswire.org
Sat Nov 11 23:27:14 MST 2017
Author: scribe
Date: 2017-11-11 23:27:13 -0700 (Sat, 11 Nov 2017)
New Revision: 3525
Added:
trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/ios/SWORD.swift
Modified:
trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/plugin.xml
trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/android/SWORD.java
trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/www/SWORD.js
Log:
Updated cordova bindings to be more compatible with ios
Modified: trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/plugin.xml
===================================================================
--- trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/plugin.xml 2017-11-07 03:08:49 UTC (rev 3524)
+++ trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/plugin.xml 2017-11-12 06:27:13 UTC (rev 3525)
@@ -92,18 +92,18 @@
</js-module>
</platform>
-->
- <!-- ios
+ <!-- ios -->
<platform name="ios">
<config-file target="config.xml" parent="/*">
- <feature name="Device">
- <param name="ios-package" value="CDVDevice"/>
+ <feature name="SWORD">
+ <param name="ios-package" value="SWORD"/>
</feature>
</config-file>
- <header-file src="src/ios/CDVDevice.h" />
- <source-file src="src/ios/CDVDevice.m" />
+ <header-file src="src/ios/SWORD.swift" />
+<!-- <source-file src="lib/ios/libSWORD.a" framework="true" /> -->
</platform>
- -->
+
<!-- blackberry10
<platform name="blackberry10">
<source-file src="src/blackberry10/index.js" target-dir="Device" />
Modified: trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/android/SWORD.java
===================================================================
--- trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/android/SWORD.java 2017-11-07 03:08:49 UTC (rev 3524)
+++ trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/android/SWORD.java 2017-11-12 06:27:13 UTC (rev 3525)
@@ -88,7 +88,7 @@
* @return True if the action was valid, false if not.
*/
public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
- if (action.equals("init")) {
+ if (action.equals("initSWORD")) {
JSONObject r = new JSONObject();
r.put("version", mgr.version());
callbackContext.success(r);
@@ -96,11 +96,11 @@
else if (action.equals("echo")) {
echo(callbackContext, args.getString(0));
}
- else if (action.equals("InstallMgr.setUserDisclaimerConfirmed")) {
+ else if (action.equals("InstallMgr_setUserDisclaimerConfirmed")) {
installMgr.setUserDisclaimerConfirmed();
callbackContext.success();
}
- else if (action.equals("InstallMgr.syncConfig")) {
+ else if (action.equals("InstallMgr_syncConfig")) {
cordova.getThreadPool().execute(new Runnable() {
@Override
public void run() {
@@ -110,7 +110,7 @@
}
});
}
- else if (action.equals("InstallMgr.getRemoteSources")) {
+ else if (action.equals("InstallMgr_getRemoteSources")) {
JSONArray r = new JSONArray();
String sources[] = installMgr.getRemoteSources();
for (String s : sources) {
@@ -118,7 +118,7 @@
}
callbackContext.success(r);
}
- else if (action.equals("InstallMgr.refreshRemoteSource")) {
+ else if (action.equals("InstallMgr_refreshRemoteSource")) {
final String repo = args.getString(0);
cordova.getThreadPool().execute(new Runnable() {
@Override
@@ -128,7 +128,7 @@
}
});
}
- else if (action.equals("InstallMgr.getRemoteModInfoList")) {
+ else if (action.equals("InstallMgr_getRemoteModInfoList")) {
JSONArray r = new JSONArray();
for (SWMgr.ModInfo mi : installMgr.getRemoteModInfoList(args.getString(0))) {
JSONObject m = new JSONObject();
@@ -142,7 +142,7 @@
}
callbackContext.success(r);
}
- else if (action.equals("InstallMgr.remoteInstallModule")) {
+ else if (action.equals("InstallMgr_remoteInstallModule")) {
this.installReporterContext = callbackContext;
final String repo = args.getString(0);
final String modName = args.getString(1);
@@ -199,39 +199,39 @@
result.setKeepCallback(true);
callbackContext.sendPluginResult(result);
}
- else if (action.equals("InstallMgr.uninstallModule")) {
+ else if (action.equals("InstallMgr_uninstallModule")) {
installMgr.uninstallModule(args.getString(0));
callbackContext.success();
}
- else if (action.equals("SWMgr.getExtraConfigSections")) {
+ else if (action.equals("SWMgr_getExtraConfigSections")) {
JSONArray r = new JSONArray();
for (String s : mgr.getExtraConfigSections()) {
r.put(s);
}
callbackContext.success(r);
}
- else if (action.equals("SWMgr.getExtraConfigKeys")) {
+ else if (action.equals("SWMgr_getExtraConfigKeys")) {
JSONArray r = new JSONArray();
for (String s : mgr.getExtraConfigKeys(args.getString(0))) {
r.put(s);
}
callbackContext.success(r);
}
- else if (action.equals("SWMgr.getExtraConfigValue")) {
+ else if (action.equals("SWMgr_getExtraConfigValue")) {
callbackContext.success(mgr.getExtraConfigValue(args.getString(0), args.getString(1)));
}
- else if (action.equals("SWMgr.setExtraConfigValue")) {
+ else if (action.equals("SWMgr_setExtraConfigValue")) {
mgr.setExtraConfigValue(args.getString(0), args.getString(1), args.getString(2));
callbackContext.success();
}
- else if (action.equals("SWMgr.addExtraConfig")) {
+ else if (action.equals("SWMgr_addExtraConfig")) {
JSONArray r = new JSONArray();
for (String s : mgr.addExtraConfig(args.getString(0))) {
r.put(s);
}
callbackContext.success(r);
}
- else if (action.equals("SWMgr.getModInfoList")) {
+ else if (action.equals("SWMgr_getModInfoList")) {
JSONArray r = new JSONArray();
for (SWMgr.ModInfo mi : mgr.getModInfoList()) {
JSONObject m = new JSONObject();
@@ -245,7 +245,7 @@
}
callbackContext.success(r);
}
- else if (action.equals("SWMgr.getModuleByName")) {
+ else if (action.equals("SWMgr_getModuleByName")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
// didn't find module is not an error
if (mod == null) { callbackContext.success(); return true; }
@@ -261,18 +261,18 @@
m.put("shortPromo", mod.getConfigEntry("ShortPromo"));
callbackContext.success(m);
}
- else if (action.equals("SWModule.setKeyText")) {
+ else if (action.equals("SWModule_setKeyText")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
mod.setKeyText(args.getString(1));
callbackContext.success();
}
- else if (action.equals("SWModule.getKeyText")) {
+ else if (action.equals("SWModule_getKeyText")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
callbackContext.success(mod.getKeyText());
}
- else if (action.equals("SWModule.search")) {
+ else if (action.equals("SWModule_search")) {
this.searchReporterContext = callbackContext;
final SWModule mod = mgr.getModuleByName(args.getString(0));
final String expression = args.getString(1);
@@ -325,7 +325,7 @@
result.setKeepCallback(true);
callbackContext.sendPluginResult(result);
}
- else if (action.equals("SWModule.getRenderChapter")) {
+ else if (action.equals("SWModule_getRenderChapter")) {
this.renderChapterContext = callbackContext;
final SWModule masterMod = mgr.getModuleByName(args.getString(0));
@@ -354,7 +354,7 @@
result.setKeepCallback(true);
callbackContext.sendPluginResult(result);
}
- else if (action.equals("SWMgr.registerBibleSyncListener")) {
+ else if (action.equals("SWMgr_registerBibleSyncListener")) {
final CallbackContext bibleSyncListener = callbackContext;
cordova.getThreadPool().execute(new Runnable() {
@@ -374,17 +374,17 @@
result.setKeepCallback(true);
callbackContext.sendPluginResult(result);
}
- else if (action.equals("SWMgr.sendBibleSyncMessage")) {
+ else if (action.equals("SWMgr_sendBibleSyncMessage")) {
String osisRef = args.getString(0);
mgr.sendBibleSyncMessage(osisRef);
callbackContext.success();
}
- else if (action.equals("SWModule.getRenderText")) {
+ else if (action.equals("SWModule_getRenderText")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
callbackContext.success(mod.getRenderText());
}
- else if (action.equals("SWModule.sendText")) {
+ else if (action.equals("SWModule_sendText")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
this.sendContext = callbackContext;
@@ -393,12 +393,12 @@
result.setKeepCallback(true);
callbackContext.sendPluginResult(result);
}
- else if (action.equals("SWModule.getRenderHeader")) {
+ else if (action.equals("SWModule_getRenderHeader")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
callbackContext.success(mod.getRenderHeader());
}
- else if (action.equals("SWModule.getKeyChildren")) {
+ else if (action.equals("SWModule_getKeyChildren")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
JSONArray r = new JSONArray();
@@ -407,12 +407,12 @@
}
callbackContext.success(r);
}
- else if (action.equals("SWModule.getConfigEntry")) {
+ else if (action.equals("SWModule_getConfigEntry")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
callbackContext.success(mod.getConfigEntry(args.getString(1)));
}
- else if (action.equals("SWModule.getEntryAttribute")) {
+ else if (action.equals("SWModule_getEntryAttribute")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
JSONArray r = new JSONArray();
@@ -421,35 +421,35 @@
}
callbackContext.success(r);
}
- else if (action.equals("SWModule.popError")) {
+ else if (action.equals("SWModule_popError")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
callbackContext.success((int)mod.error());
}
- else if (action.equals("SWModule.next")) {
+ else if (action.equals("SWModule_next")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
mod.next();
callbackContext.success();
}
- else if (action.equals("SWModule.previous")) {
+ else if (action.equals("SWModule_previous")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
mod.previous();
callbackContext.success();
}
- else if (action.equals("SWModule.begin")) {
+ else if (action.equals("SWModule_begin")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
mod.begin();
callbackContext.success();
}
- else if (action.equals("SWModule.getVerseKey")) {
+ else if (action.equals("SWModule_getVerseKey")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
callbackContext.success(getVerseKey(mod.getKeyChildren()));
}
- else if (action.equals("SWModule.getBookNames")) {
+ else if (action.equals("SWModule_getBookNames")) {
SWModule mod = mgr.getModuleByName(args.getString(0));
if (mod == null) { callbackContext.error("couldn't find module: " + args.getString(0)); return true; }
JSONArray r = new JSONArray();
@@ -458,7 +458,7 @@
}
callbackContext.success(r);
}
- else if (action.equals("HTTPUtils.makeRequest")) {
+ else if (action.equals("HTTPUtils_makeRequest")) {
final CallbackContext makeRequestContext = callbackContext;
final String url = args.getString(0);
Added: trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/ios/SWORD.swift
===================================================================
--- trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/ios/SWORD.swift (rev 0)
+++ trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/ios/SWORD.swift 2017-11-12 06:27:13 UTC (rev 3525)
@@ -0,0 +1,539 @@
+ at objc(SWORD) class SWORD : CDVPlugin {
+ @objc(echo:)
+ func echo(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let msg = command.arguments[0] as? String ?? ""
+
+ if msg.characters.count > 0 {
+ let toastController: UIAlertController = UIAlertController(title: "", message: msg, preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: msg)
+ }
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(initSWORD:)
+ func initSWORD(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "initSWORD", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "initSWORD")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(HTTPUtils_makeRequest:)
+ func HTTPUtils_makeRequest(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "HTTPUtils_makeRequest", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "HTTPUtils_makeRequest")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_getBookNames:)
+ func SWModule_getBookNames(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_getBookNames", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_getBookNames")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_getVerseKey:)
+ func SWModule_getVerseKey(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_getVerseKey", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_getVerseKey")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_begin:)
+ func SWModule_begin(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_begin", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_begin")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_previous:)
+ func SWModule_previous(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_previous", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_previous")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_next:)
+ func SWModule_next(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_next", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_next")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_popError:)
+ func SWModule_popError(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_popError", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_popError")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_getEntryAttribute:)
+ func SWModule_getEntryAttribute(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_getEntryAttribute", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_getEntryAttribute")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_getConfigEntry:)
+ func SWModule_getConfigEntry(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_getConfigEntry", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_getConfigEntry")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_getKeyChildren:)
+ func SWModule_getKeyChildren(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_getKeyChildren", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_getKeyChildren")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_getRenderHeader:)
+ func SWModule_getRenderHeader(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_getRenderHeader", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_getRenderHeader")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_sendText:)
+ func SWModule_sendText(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_sendText", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_sendText")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_getRenderText:)
+ func SWModule_getRenderText(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_getRenderText", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_getRenderText")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_getRenderChapter:)
+ func SWModule_getRenderChapter(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_getRenderChapter", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_getRenderChapter")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_search:)
+ func SWModule_search(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_search", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_search")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_getKeyText:)
+ func SWModule_getKeyText(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_getKeyText", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_getKeyText")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWModule_setKeyText:)
+ func SWModule_setKeyText(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWModule_setKeyText", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWModule_setKeyText")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWMgr_getModuleByName:)
+ func SWMgr_getModuleByName(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWMgr_getModuleByName", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWMgr_getModuleByName")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWMgr_addExtraConfig:)
+ func SWMgr_addExtraConfig(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWMgr_addExtraConfig", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWMgr_addExtraConfig")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWMgr_setExtraConfigValue:)
+ func SWMgr_setExtraConfigValue(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWMgr_setExtraConfigValue", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWMgr_setExtraConfigValue")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWMgr_getExtraConfigValue:)
+ func SWMgr_getExtraConfigValue(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWMgr_getExtraConfigValue", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWMgr_getExtraConfigValue")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWMgr_getExtraConfigKeys:)
+ func SWMgr_getExtraConfigKeys(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWMgr_getExtraConfigKeys", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWMgr_getExtraConfigKeys")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWMgr_getExtraConfigSections:)
+ func SWMgr_getExtraConfigSections(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWMgr_getExtraConfigSections", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWMgr_getExtraConfigSections")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(InstallMgr_uninstallModule:)
+ func InstallMgr_uninstallModule(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "InstallMgr_uninstallModule", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "InstallMgr_uninstallModule")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(InstallMgr_remoteInstallModule:)
+ func InstallMgr_remoteInstallModule(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "InstallMgr_remoteInstallModule", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "InstallMgr_remoteInstallModule")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(InstallMgr_getRemoteModInfoList:)
+ func InstallMgr_getRemoteModInfoList(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "InstallMgr_getRemoteModInfoList", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "InstallMgr_getRemoteModInfoList")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(InstallMgr_refreshRemoteSource:)
+ func InstallMgr_refreshRemoteSource(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "InstallMgr_refreshRemoteSource", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "InstallMgr_refreshRemoteSource")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(InstallMgr_getRemoteSources:)
+ func InstallMgr_getRemoteSources(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "InstallMgr_getRemoteSources", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "InstallMgr_getRemoteSources")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(InstallMgr_syncConfig:)
+ func InstallMgr_syncConfig(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "InstallMgr_syncConfig", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "InstallMgr_syncConfig")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(InstallMgr_setUserDisclaimerConfirmed:)
+ func InstallMgr_setUserDisclaimerConfirmed(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "InstallMgr_setUserDisclaimerConfirmed", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "InstallMgr_setUserDisclaimerConfirmed")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+ @objc(SWMgr_getModInfoList:)
+ func SWMgr_getModInfoList(command: CDVInvokedUrlCommand) {
+ var pluginResult = CDVPluginResult(status: CDVCommandStatus_ERROR)
+
+ let toastController: UIAlertController = UIAlertController(title: "", message: "SWMgr_getModInfoList", preferredStyle: .alert)
+
+ self.viewController?.present(toastController, animated: true, completion: nil)
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ toastController.dismiss(animated: true, completion: nil)
+ }
+
+ pluginResult = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: "SWMgr_getModInfoList")
+
+ self.commandDelegate!.send(pluginResult, callbackId: command.callbackId)
+ }
+/*
+SWMgr_registerBibleSyncListener
+SWMgr_sendBibleSyncMessage
+*/
+}
Modified: trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/www/SWORD.js
===================================================================
--- trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/www/SWORD.js 2017-11-07 03:08:49 UTC (rev 3524)
+++ trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/www/SWORD.js 2017-11-12 06:27:13 UTC (rev 3525)
@@ -16,7 +16,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "InstallMgr.setUserDisclaimerConfirmed", []
+ "SWORD", "InstallMgr_setUserDisclaimerConfirmed", []
);
return retVal;
}
@@ -25,7 +25,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "InstallMgr.syncConfig", [progressNotify]
+ "SWORD", "InstallMgr_syncConfig", [progressNotify]
);
return retVal;
}
@@ -35,7 +35,7 @@
var retVal = [];
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "InstallMgr.getRemoteSources", []
+ "SWORD", "InstallMgr_getRemoteSources", []
);
return retVal;
}
@@ -45,7 +45,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "InstallMgr.refreshRemoteSource", [sourceName]
+ "SWORD", "InstallMgr_refreshRemoteSource", [sourceName]
);
return retVal;
}
@@ -54,7 +54,7 @@
var retVal = [];
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "InstallMgr.getRemoteModInfoList", [sourceName]
+ "SWORD", "InstallMgr_getRemoteModInfoList", [sourceName]
);
return retVal;
}
@@ -64,7 +64,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "InstallMgr.remoteInstallModule", [sourceName, modName]
+ "SWORD", "InstallMgr_remoteInstallModule", [sourceName, modName]
);
return retVal;
}
@@ -73,7 +73,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "InstallMgr.uninstallModule", [modName]
+ "SWORD", "InstallMgr_uninstallModule", [modName]
);
return retVal;
}
@@ -102,7 +102,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.setKeyText", [this.name, keyText]
+ "SWORD", "SWModule_setKeyText", [this.name, keyText]
);
return retVal;
}
@@ -111,7 +111,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.search", [this.name, expression, searchType, flags, scope]
+ "SWORD", "SWModule_search", [this.name, expression, searchType, flags, scope]
);
return retVal;
}
@@ -120,7 +120,7 @@
var retVal = null;
exec(callback?callback:function(m) { retVal = m; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.getKeyText", [this.name]
+ "SWORD", "SWModule_getKeyText", [this.name]
);
return retVal;
}
@@ -129,7 +129,7 @@
var retVal = null;
exec(callback?callback:function(m) { retVal = m; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.getRenderText", [this.name]
+ "SWORD", "SWModule_getRenderText", [this.name]
);
return retVal;
}
@@ -138,7 +138,7 @@
var retVal = null;
exec(callback?callback:function(m) { retVal = m; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.sendText", [this.name]
+ "SWORD", "SWModule_sendText", [this.name]
);
return retVal;
}
@@ -154,7 +154,7 @@
if (!masterMod) masterMod = this;
exec(callback?callback:function(m) { retVal = m; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.getRenderChapter", [masterMod.name, this.name]
+ "SWORD", "SWModule_getRenderChapter", [masterMod.name, this.name]
);
return retVal;
}
@@ -163,7 +163,7 @@
var retVal = null;
exec(callback?callback:function(m) { retVal = m; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.getRenderHeader", [this.name]
+ "SWORD", "SWModule_getRenderHeader", [this.name]
);
return retVal;
}
@@ -172,7 +172,7 @@
var retVal = [];
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.getKeyChildren", [this.name]
+ "SWORD", "SWModule_getKeyChildren", [this.name]
);
return retVal;
}
@@ -181,7 +181,7 @@
var retVal = {};
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.getVerseKey", [this.name]
+ "SWORD", "SWModule_getVerseKey", [this.name]
);
return retVal;
}
@@ -190,7 +190,7 @@
var retVal = '';
exec(callback?callback:function(m) { if (m) retVal = m; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.getConfigEntry", [this.name, key]
+ "SWORD", "SWModule_getConfigEntry", [this.name, key]
);
return retVal;
}
@@ -200,7 +200,7 @@
var retVal = 0;
exec(callback?callback:function(m) { retVal = m; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.popError", [this.name]
+ "SWORD", "SWModule_popError", [this.name]
);
return retVal;
}
@@ -209,7 +209,7 @@
var retVal = [];
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.getEntryAttribute", [this.name, level1Key, level2Key, level3Key, isFiltered]
+ "SWORD", "SWModule_getEntryAttribute", [this.name, level1Key, level2Key, level3Key, isFiltered]
);
return retVal;
}
@@ -218,7 +218,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.next", [this.name]
+ "SWORD", "SWModule_next", [this.name]
);
return retVal;
}
@@ -227,7 +227,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.previous", [this.name]
+ "SWORD", "SWModule_previous", [this.name]
);
return retVal;
}
@@ -236,7 +236,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.begin", [this.name]
+ "SWORD", "SWModule_begin", [this.name]
);
return retVal;
}
@@ -245,7 +245,7 @@
var retVal = [];
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWModule.getBookNames", [this.name]
+ "SWORD", "SWModule_getBookNames", [this.name]
);
return retVal;
}
@@ -258,7 +258,7 @@
if (!this.hasOwnProperty('_lastModInfoList')) this._lastModInfoList = [];
exec(function(m) { if (m && m.length > 0) this._lastModInfoList = m; if (callback) callback(m); },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWMgr.getModInfoList", []
+ "SWORD", "SWMgr_getModInfoList", []
);
return this._lastModInfoList;
}
@@ -267,7 +267,7 @@
var mod = null;
exec(function(m) { if (m.name) mod = new SWModule(m); if (callback) callback(mod); },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWMgr.getModuleByName", [modName]
+ "SWORD", "SWMgr_getModuleByName", [modName]
);
return mod;
}
@@ -276,7 +276,7 @@
var retVal = [];
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWMgr.getExtraConfigSections", []
+ "SWORD", "SWMgr_getExtraConfigSections", []
);
return retVal;
}
@@ -285,7 +285,7 @@
var retVal = [];
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWMgr.getExtraConfigKeys", [section]
+ "SWORD", "SWMgr_getExtraConfigKeys", [section]
);
return retVal;
}
@@ -294,7 +294,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWMgr.getExtraConfigValue", [section, key]
+ "SWORD", "SWMgr_getExtraConfigValue", [section, key]
);
return retVal;
}
@@ -302,7 +302,7 @@
SWMgr.prototype.setExtraConfigValue = function(section, key, value, callback) {
exec(callback?callback:function() {},
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWMgr.setExtraConfigValue", [section, key, value]
+ "SWORD", "SWMgr_setExtraConfigValue", [section, key, value]
);
}
@@ -310,7 +310,7 @@
var retVal = null;
exec(callback?callback:function(r) { retVal = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWMgr.addExtraConfig", [confBlob]
+ "SWORD", "SWMgr_addExtraConfig", [confBlob]
);
return retVal;
}
@@ -318,14 +318,14 @@
SWMgr.prototype.registerBibleSyncListener = function(callback) {
exec(callback,
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWMgr.registerBibleSyncListener", []
+ "SWORD", "SWMgr_registerBibleSyncListener", []
);
}
SWMgr.prototype.sendBibleSyncMessage = function(osisRef, callback) {
exec(callback?callback:function() {},
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "SWMgr.sendBibleSyncMessage", [osisRef]
+ "SWORD", "SWMgr_sendBibleSyncMessage", [osisRef]
);
}
@@ -339,7 +339,7 @@
if (!method) method = this.METHOD_POST;
exec(callback?callback:function(r) { if (r && r.length > 0) result = r; },
function(err) { utils.alert('[ERROR] problem: ' + err); },
- "SWORD", "HTTPUtils.makeRequest", [url, postData, method]
+ "SWORD", "HTTPUtils_makeRequest", [url, postData, method]
);
return result;
}
@@ -398,7 +398,7 @@
SWORD.prototype.init = function(successCallback, errorCallback) {
- exec(successCallback, errorCallback, "SWORD", "init", []);
+ exec(successCallback, errorCallback, "SWORD", "initSWORD", []);
};
More information about the sword-cvs
mailing list