[sword-svn] r3530 - in trunk: bindings/Android bindings/corba/orbitcpp bindings/cordova/org.crosswire.sword.cordova.SWORD/src/android bindings/cordova/org.crosswire.sword.cordova.SWORD/www bindings/java-jni bindings/java-jni/jni include
scribe at crosswire.org
scribe at crosswire.org
Sun Nov 26 00:50:28 MST 2017
Author: scribe
Date: 2017-11-26 00:50:27 -0700 (Sun, 26 Nov 2017)
New Revision: 3530
Added:
trunk/include/rtranspgdrive.h
Removed:
trunk/bindings/java-jni/jni/webmgr.hpp
Modified:
trunk/bindings/Android/Makefile
trunk/bindings/corba/orbitcpp/webmgr.hpp
trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/android/SWORD.java
trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/www/SWORD.js
trunk/bindings/java-jni/Makefile
trunk/include/Makefile.am
Log:
Final cleanups for release. missing header, common webmgr.hpp final bindings/cordova android fixes better documentation of binding builds in Makefiles
Modified: trunk/bindings/Android/Makefile
===================================================================
--- trunk/bindings/Android/Makefile 2017-11-26 07:06:30 UTC (rev 3529)
+++ trunk/bindings/Android/Makefile 2017-11-26 07:50:27 UTC (rev 3530)
@@ -1,9 +1,9 @@
all: javawrapper
+ cp -a SWORD/app/build/intermediates/transforms/stripDebugSymbol/release/0/lib/* ../cordova/org.crosswire.sword.cordova.SWORD/libs/android/
+
+debug: javawrapper
cp -a SWORD/app/build/intermediates/cmake/debug/obj/* ../cordova/org.crosswire.sword.cordova.SWORD/libs/android/
-release: javawrapper
- cp -a SWORD/app/build/intermediates/transforms/stripDebugSymbol/release/0/lib/* ../cordova/org.crosswire.sword.cordova.SWORD/libs/android/
-
javawrapper:
cp -a SWORD/app/src/main/java/org/crosswire/android/sword/* ../cordova/org.crosswire.sword.cordova.SWORD/src/android/
Modified: trunk/bindings/corba/orbitcpp/webmgr.hpp
===================================================================
--- trunk/bindings/corba/orbitcpp/webmgr.hpp 2017-11-26 07:06:30 UTC (rev 3529)
+++ trunk/bindings/corba/orbitcpp/webmgr.hpp 2017-11-26 07:50:27 UTC (rev 3530)
@@ -41,10 +41,12 @@
SWModule *defaultHebLex;
SWModule *defaultGreekParse;
SWModule *defaultHebParse;
+ char *extraConf;
public:
- WebMgr(const char *path) : SWMgr(path, false, new MarkupFilterMgr(FMT_WEBIF)) { init(); }
+ WebMgr(const char *path, const char *extraConfPath = 0) : extraConf(0), SWMgr(path, false, new MarkupFilterMgr(FMT_WEBIF)) { if (extraConfPath) stdstr(&extraConf, extraConfPath); init(); }
WebMgr(SWConfig *sysConf) : SWMgr(0, sysConf, false, new MarkupFilterMgr(FMT_WEBIF)) { init(); }
+ WebMgr(const char *path, const char *extraConfPath) : extraConf(0), SWMgr(path, false, new MarkupFilterMgr(FMT_WEBIF)) {
void init() {
defaultGreekLex = 0;
defaultHebLex = 0;
@@ -68,9 +70,21 @@
delete osisWordJS;
delete thmlWordJS;
delete gbfWordJS;
+ delete extraConf;
}
+ void createAllModules(bool multiMod) {
+ if (extraConf) {
+ bool exists = FileMgr::existsFile(extraConf);
+ if (exists) {
+ SWConfig addConfig(extraConf);
+ this->config->augment(addConfig);
+ }
+ }
+ SWMgr::createAllModules(multiMod);
+ }
+
void addGlobalOptionFilters(SWModule *module, ConfigEntMap §ion) {
// ThML word stuff needs to process before strongs strip
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-26 07:06:30 UTC (rev 3529)
+++ trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/src/android/SWORD.java 2017-11-26 07:50:27 UTC (rev 3530)
@@ -374,6 +374,11 @@
result.setKeepCallback(true);
callbackContext.sendPluginResult(result);
}
+ else if (action.equals("SWMgr_setJavascript")) {
+ boolean val = args.getBoolean(0);
+ mgr.setJavascript(val);
+ callbackContext.success();
+ }
else if (action.equals("SWMgr_sendBibleSyncMessage")) {
String osisRef = args.getString(0);
mgr.sendBibleSyncMessage(osisRef);
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-26 07:06:30 UTC (rev 3529)
+++ trunk/bindings/cordova/org.crosswire.sword.cordova.SWORD/www/SWORD.js 2017-11-26 07:50:27 UTC (rev 3530)
@@ -329,6 +329,13 @@
);
}
+SWMgr.prototype.setJavascript = function(val, callback) {
+ exec(callback?callback:function() {},
+ function(err) { utils.alert('[ERROR] problem: ' + err); },
+ "SWORD", "SWMgr_setJavascript", [val]
+ );
+}
+
function HTTPUtils() {}
HTTPUtils.prototype.METHOD_GET = 0;
Modified: trunk/bindings/java-jni/Makefile
===================================================================
--- trunk/bindings/java-jni/Makefile 2017-11-26 07:06:30 UTC (rev 3529)
+++ trunk/bindings/java-jni/Makefile 2017-11-26 07:50:27 UTC (rev 3530)
@@ -1,4 +1,5 @@
all:
+ cp ../corba/orbitcpp/webmgr.hpp jni/
mkdir -p classes
javac -d classes src/org/crosswire/android/sword/*.java
javah -d jni -classpath classes -jni org.crosswire.android.sword.SWMgr
Deleted: trunk/bindings/java-jni/jni/webmgr.hpp
===================================================================
--- trunk/bindings/java-jni/jni/webmgr.hpp 2017-11-26 07:06:30 UTC (rev 3529)
+++ trunk/bindings/java-jni/jni/webmgr.hpp 2017-11-26 07:50:27 UTC (rev 3530)
@@ -1,135 +0,0 @@
-/******************************************************************************
- *
- * webmgr.cpp -
- *
- * $Id$
- *
- * Copyright 2009-2013 CrossWire Bible Society (http://www.crosswire.org)
- * CrossWire Bible Society
- * P. O. Box 2528
- * Tempe, AZ 85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- */
-
-#ifndef WEBMGR_HPP
-#define WEBMGR_HPP
-
-#include <swmgr.h>
-#include <swmodule.h>
-#include <swfilter.h>
-#include <markupfiltmgr.h>
-#include <osiswordjs.h>
-#include <thmlwordjs.h>
-#include <gbfwordjs.h>
-
-using namespace sword;
-
-class WebMgr : public SWMgr {
- OSISWordJS *osisWordJS;
- ThMLWordJS *thmlWordJS;
- GBFWordJS *gbfWordJS;
- SWModule *defaultGreekLex;
- SWModule *defaultHebLex;
- SWModule *defaultGreekParse;
- SWModule *defaultHebParse;
- char *extraConf;
-
-public:
-// WebMgr(SWConfig *sysConf) : SWMgr(0, sysConf, false, new MarkupFilterMgr(FMT_WEBIF)) {
- WebMgr(const char *path, const char *extraConfPath) : extraConf(0), SWMgr(path, false, new MarkupFilterMgr(FMT_XHTML)) {
- defaultGreekLex = 0;
- defaultHebLex = 0;
- defaultGreekParse = 0;
- defaultHebParse = 0;
-
- stdstr(&extraConf, extraConfPath);
-
- osisWordJS = new OSISWordJS();
- thmlWordJS = new ThMLWordJS();
- gbfWordJS = new GBFWordJS();
- Load();
- osisWordJS->setDefaultModules(defaultGreekLex, defaultHebLex, defaultGreekParse, defaultHebParse);
- thmlWordJS->setDefaultModules(defaultGreekLex, defaultHebLex, defaultGreekParse, defaultHebParse);
- gbfWordJS->setDefaultModules(defaultGreekLex, defaultHebLex, defaultGreekParse, defaultHebParse);
- osisWordJS->setMgr(this);
- thmlWordJS->setMgr(this);
- gbfWordJS->setMgr(this);
- setGlobalOption("Textual Variants", "Primary Reading");
- }
-
- ~WebMgr() {
- delete osisWordJS;
- delete thmlWordJS;
- delete gbfWordJS;
- delete extraConf;
- }
-
- void createAllModules(bool multiMod) {
-
- if (extraConf) {
- bool exists = FileMgr::existsFile(extraConf);
- if (exists) {
- SWConfig addConfig(extraConf);
- this->config->augment(addConfig);
- }
- }
- SWMgr::createAllModules(multiMod);
- }
-
- void AddGlobalOptions(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, ConfigEntMap::iterator end) {
-
- // ThML word stuff needs to process before strongs strip
- if (module->getMarkup() == FMT_THML) {
- module->addOptionFilter(thmlWordJS);
- }
-
- if (module->getMarkup() == FMT_GBF) {
- module->addOptionFilter(gbfWordJS);
- }
-
- // add other module filters
- SWMgr::AddGlobalOptions(module, section, start, end);
-
- // add our special filters
- if (module->getConfig().has("Feature", "GreekDef")) {
- defaultGreekLex = module;
- }
- if (module->getConfig().has("Feature", "HebrewDef")) {
- defaultHebLex = module;
- }
- if (module->getConfig().has("Feature", "GreekParse")) {
- defaultGreekParse = module;
- }
- if (module->getConfig().has("Feature", "HebrewParse")) {
- defaultHebParse = module;
- }
- if (module->getConfig().has("GlobalOptionFilter", "ThMLVariants")) {
- OptionFilterMap::iterator it = optionFilters.find("ThMLVariants");
- if (it != optionFilters.end()) {
- module->addOptionFilter((*it).second); // add filter to module and option as a valid option
- }
- }
-
- if (module->getMarkup() == FMT_OSIS) {
- module->addOptionFilter(osisWordJS);
- }
- }
-
-
- void setJavascript(bool val) {
- osisWordJS->setOptionValue((val)?"On":"Off");
- thmlWordJS->setOptionValue((val)?"On":"Off");
- gbfWordJS->setOptionValue((val)?"On":"Off");
- }
-};
-
-#endif
Modified: trunk/include/Makefile.am
===================================================================
--- trunk/include/Makefile.am 2017-11-26 07:06:30 UTC (rev 3529)
+++ trunk/include/Makefile.am 2017-11-26 07:50:27 UTC (rev 3530)
@@ -15,6 +15,7 @@
pkginclude_HEADERS += $(swincludedir)/flatapi.h
pkginclude_HEADERS += $(swincludedir)/ftpparse.h
pkginclude_HEADERS += $(swincludedir)/remotetrans.h
+pkginclude_HEADERS += $(swincludedir)/rtranspgdrive.h
pkginclude_HEADERS += $(swincludedir)/ftplibftpt.h
pkginclude_HEADERS += $(swincludedir)/ftplib.h
Added: trunk/include/rtranspgdrive.h
===================================================================
--- trunk/include/rtranspgdrive.h (rev 0)
+++ trunk/include/rtranspgdrive.h 2017-11-26 07:50:27 UTC (rev 3530)
@@ -0,0 +1,45 @@
+/******************************************************************************
+ *
+ * rtranspgdrive.h - code for Google Drive impl of Remote Transport
+ *
+ * $Id$
+ *
+ * Copyright 2004-2017 CrossWire Bible Society (http://www.crosswire.org)
+ * CrossWire Bible Society
+ * P. O. Box 2528
+ * Tempe, AZ 85280-2528
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ */
+
+#ifndef RTRANSPGDRIVE_H
+#define RTRANSPGDRIVE_H
+
+#include <defs.h>
+#include <remotetrans.h>
+
+SWORD_NAMESPACE_START
+
+
+class SWDLLEXPORT RTransportGDrive : public RemoteTransport {
+
+public:
+ RTransportGDrive(const char *host, StatusReporter *statusReporter = 0);
+ ~RTransportGDrive();
+
+ virtual char getURL(const char *destPath, const char *sourceURL, SWBuf *destBuf = 0);
+ virtual char putURL(const char *destURL, const char *sourcePath, SWBuf *sourceBuf = 0);
+};
+
+
+SWORD_NAMESPACE_END
+
+#endif
More information about the sword-cvs
mailing list