rhodes 2.1.0 → 2.2.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +7 -0
- data/README.textile +4 -5
- data/Rakefile +8 -1
- data/lib/build/jake.rb +22 -16
- data/lib/extensions/rhoxml/rexml/cdata.rb +67 -0
- data/lib/extensions/rhoxml/rexml/document.rb +2 -116
- data/lib/extensions/rhoxml/rexml/element.rb +1 -1
- data/lib/extensions/rhoxml/rexml/text.rb +117 -0
- data/lib/framework/rho/render.rb +19 -11
- data/lib/framework/rho/rho.rb +17 -10
- data/lib/framework/rho/rhobluetooth.rb +103 -0
- data/lib/framework/rho/rhocontroller.rb +2 -0
- data/lib/framework/rho/rhoevent.rb +43 -0
- data/lib/framework/rho/rhoevent_bb.rb +80 -0
- data/lib/framework/rho/rhoevent_c.rb +47 -0
- data/lib/framework/rhodes.rb +2 -2
- data/lib/framework/rhom/rhom_db_adapter.rb +2 -1
- data/lib/framework/rhom/rhom_model.rb +9 -3
- data/lib/framework/rhom/rhom_object_factory.rb +46 -22
- data/lib/framework/rhom/rhom_source.rb +12 -10
- data/lib/framework/version.rb +2 -2
- data/lib/rhodes.rb +2 -2
- data/platform/android/Rhodes/AndroidManifest.xml +23 -2
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +54 -38
- data/platform/android/Rhodes/jni/include/rhodes.h +3 -0
- data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +2 -2
- data/platform/android/Rhodes/jni/include/rhodes/details/rhojava.inc +4 -0
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesService.h +16 -0
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_bluetooth_RhoBluetoothManager.h +21 -0
- data/platform/android/Rhodes/jni/src/bluetooth.cpp +169 -0
- data/platform/android/Rhodes/jni/src/callbacks.cpp +10 -0
- data/platform/android/Rhodes/jni/src/event.cpp +429 -0
- data/platform/android/Rhodes/jni/src/fileapi.cpp +51 -1
- data/platform/android/Rhodes/jni/src/rhodes.cpp +16 -0
- data/platform/android/Rhodes/jni/src/sslimpl.cpp +3 -0
- data/platform/android/Rhodes/res/layout/bt_device_list.xml +42 -0
- data/platform/android/Rhodes/res/layout/bt_device_name.xml +7 -0
- data/platform/android/Rhodes/res/values/strings.xml +8 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/AndroidR.java +14 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Capabilities.java +2 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Push.java +7 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushReceiver.java +58 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushService.java +53 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Rhodes.java +8 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +144 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/IRhoBluetoothManager.java +66 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothDeviceListActivity.java +201 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManager.java +139 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManagerNew.java +401 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothManagerOld.java +136 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/RhoBluetoothSession.java +457 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/bluetooth/UUIDHelper.java +71 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +12 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/Event.java +19 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +261 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +4 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/MailUriHandler.java +10 -2
- data/platform/android/build/RhodesSRC_build.files +33 -22
- data/platform/android/build/android.rake +198 -27
- data/platform/android/build/librhodes_build.files +3 -1
- data/platform/android/build/libruby_build.files +4 -1
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBResult.java +2 -2
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBRowResult.java +1 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/Expression.java +7 -4
- data/platform/bb/Hsqldb/src/org/hsqldb/Like.java +3 -3
- data/platform/bb/Hsqldb/src/org/hsqldb/Table.java +3 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/Tokenizer.java +1 -1
- data/platform/bb/RubyVM/RubyVM.jdp +1 -0
- data/platform/bb/RubyVM/src/com/rho/RhoConf.java +108 -1
- data/platform/bb/RubyVM/src/com/rho/RhoLogConf.java +7 -1
- data/platform/bb/RubyVM/src/com/rho/RhoRuby.java +7 -4
- data/platform/bb/RubyVM/src/com/rho/ThreadQueue.java +7 -1
- data/platform/bb/RubyVM/src/com/rho/net/AsyncHttp.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/net/NetRequest.java +21 -23
- data/platform/bb/RubyVM/src/com/rho/net/RhoConnection.java +19 -10
- data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +8 -0
- data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +3 -0
- data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +14 -17
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyFile.java +7 -5
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RhoSupport.java +2 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyRuntime.java +10 -1
- data/platform/bb/RubyVM/src/j2me/io/File.java +7 -6
- data/platform/bb/build/RubyVM_build.files +412 -412
- data/platform/bb/build/bb.rake +42 -18
- data/platform/bb/build/hsqldb_build.files +151 -151
- data/platform/bb/build/rhodes_build.files +44 -40
- data/platform/bb/rhodes/platform/5.0/com/rho/BrowserAdapter5.java +2 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/RhodesApplicationPlatform.java +237 -0
- data/platform/bb/rhodes/platform/common/com/rho/RhodesApplicationPlatform.java +14 -0
- data/platform/bb/rhodes/rhodes.jdp +6 -1
- data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +7 -1
- data/platform/bb/rhodes/src/com/rho/RhodesApplicationPlatform.java +14 -0
- data/platform/bb/rhodes/src/com/rho/net/NetworkAccess.java +62 -76
- data/platform/bb/rhodes/src/com/rho/rubyext/RhoCalendar.java +660 -0
- data/platform/bb/rhodes/src/{rhomobile → com/rho/rubyext}/RhoPhonebook.java +95 -38
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +22 -1
- data/platform/bb/rhodes/src/rhomobile/PushListeningThread.java +26 -6
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +21 -7
- data/platform/bb/rhodes/src/rhomobile/bluetooth/BluetoothManager.java +528 -0
- data/platform/bb/rhodes/src/rhomobile/bluetooth/BluetoothPort.java +281 -0
- data/platform/bb/rhodes/src/rhomobile/bluetooth/BluetoothScreen.java +119 -0
- data/platform/bb/rhodes/src/rhomobile/camera/CameraFilesListener.java +2 -2
- data/platform/iphone/Classes/AppManager/AppManager.m +70 -7
- data/platform/iphone/Classes/Bluetooth/Bluetooth.h +72 -0
- data/platform/iphone/Classes/Bluetooth/Bluetooth.m +414 -0
- data/platform/iphone/Classes/Event/Event.h +12 -0
- data/platform/iphone/Classes/Event/Event.m +300 -0
- data/platform/iphone/Classes/LogOptionsController.h +2 -1
- data/platform/iphone/Classes/LogOptionsController.m +1 -1
- data/platform/iphone/Classes/LogViewController.h +2 -1
- data/platform/iphone/Classes/MapView/MapViewController.h +2 -1
- data/platform/iphone/Classes/RhoViewController.h +16 -0
- data/platform/iphone/Classes/RhoViewController.m +20 -0
- data/platform/iphone/Classes/Rhodes.h +12 -0
- data/platform/iphone/Classes/Rhodes.m +34 -6
- data/platform/iphone/Classes/Signature/SignatureViewController.h +2 -2
- data/platform/iphone/Classes/Signature/SignatureViewController.m +0 -10
- data/platform/iphone/Classes/SimpleMainView.h +2 -2
- data/platform/iphone/Classes/SimpleMainView.m +5 -14
- data/platform/iphone/Classes/SplashViewController.h +2 -2
- data/platform/iphone/Classes/TabbedMainView.h +2 -2
- data/platform/iphone/Classes/TabbedMainView.m +5 -10
- data/platform/iphone/Info.plist +5 -5
- data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +39 -0
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +47 -4
- data/platform/osx/Rhodes Debugger/NoodleLineNumberView.m +3 -2
- data/platform/shared/common/AutoPointer.h +3 -0
- data/platform/shared/common/RhoConf.cpp +2 -1
- data/platform/shared/common/RhoThread.h +1 -1
- data/platform/shared/common/RhoTime.h +3 -3
- data/platform/shared/common/RhodesApp.cpp +75 -23
- data/platform/shared/common/RhodesApp.h +4 -0
- data/platform/shared/common/RhodesAppBase.h +2 -0
- data/platform/shared/common/ThreadQueue.cpp +23 -18
- data/platform/shared/common/ThreadQueue.h +2 -0
- data/platform/shared/db/res/db/syncdb.schema +39 -39
- data/platform/shared/logging/RhoLogConf.cpp +58 -3
- data/platform/shared/logging/RhoLogConf.h +3 -1
- data/platform/shared/net/CURLNetRequest.cpp +17 -6
- data/platform/shared/net/HttpServer.cpp +125 -25
- data/platform/shared/net/HttpServer.h +4 -3
- data/platform/shared/ruby/ext/bluetooth/bluetooth.i +56 -0
- data/platform/shared/ruby/ext/bluetooth/bluetooth_wrap.c +2563 -0
- data/platform/shared/ruby/ext/calendar/calendar.i +28 -0
- data/platform/shared/ruby/ext/calendar/calendar_wrap.c +2251 -0
- data/platform/shared/ruby/ext/calendar/event.h +41 -0
- data/platform/shared/ruby/ext/calendar/event.i +28 -0
- data/platform/shared/ruby/ext/calendar/event_wrap.c +2151 -0
- data/platform/shared/ruby/ext/rho/rhoruby.c +103 -3
- data/platform/shared/ruby/ext/rho/rhoruby.h +16 -2
- data/platform/shared/ruby/ext/rhoconf/rhoconf.i +12 -0
- data/platform/shared/ruby/ext/rhoconf/rhoconf_wrap.c +101 -0
- data/platform/shared/ruby/ext/system/system.i +14 -0
- data/platform/shared/ruby/ext/system/system_wrap.c +2568 -2208
- data/platform/shared/ruby/main.c +8 -0
- data/platform/shared/rubyext/GeoLocation.cpp +6 -3
- data/platform/shared/rubyext/System.cpp +14 -0
- data/platform/shared/sync/SyncEngine.cpp +9 -1
- data/platform/shared/sync/SyncNotify.cpp +16 -8
- data/platform/shared/sync/SyncNotify.h +1 -0
- data/platform/shared/sync/SyncThread.cpp +7 -12
- data/platform/shared/sync/SyncThread.h +5 -3
- data/platform/wm/build/wm.rake +7 -1
- data/platform/wm/rhodes/Alert.cpp +1 -1
- data/platform/wm/rhodes/MainWindow.cpp +28 -0
- data/platform/wm/rhodes/MainWindow.h +9 -0
- data/platform/wm/rhodes/OutlookApp.cpp +72 -0
- data/platform/wm/rhodes/OutlookApp.h +22 -0
- data/platform/wm/rhodes/Rhodes.cpp +8 -0
- data/platform/wm/rhodes/Rhodes.rc +31 -0
- data/platform/wm/rhodes/bluetooth/Bluetooth.cpp +1274 -0
- data/platform/wm/rhodes/bluetooth/Bluetooth.h +321 -0
- data/platform/wm/rhodes/phonebook/NativeAddressBook.cpp +37 -70
- data/platform/wm/rhodes/phonebook/NativeAddressBook.h +0 -4
- data/platform/wm/rhodes/resource.h +8 -1
- data/platform/wm/rhodes/rho/net/NetRequest.cpp +4 -0
- data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +6 -4
- data/platform/wm/rhodes/rho/rubyext/calendar.cpp +487 -0
- data/platform/wm/rhodes/rhodes.vcproj +28 -11
- data/platform/wm/rhodes/stdafx.h +1 -0
- data/platform/wm/rubylib/rubylib.vcproj +32 -0
- data/rakefile.rb +8 -1
- data/res/generators/templates/application/Rakefile +1 -1
- data/res/generators/templates/application/app/layout.erb +4 -1
- data/res/generators/templates/application/build.yml +0 -1
- data/res/generators/templates/application/public/css/iphone.css +2 -2
- data/res/generators/templates/application/public/jqtouch/jqtouch-iphone.css +9 -0
- data/res/generators/templates/application/public/jqtouch/jqtouch.css +1 -5
- data/res/generators/templates/application/public/jqtouch/jqtouch.js +3 -2
- data/rhodes.gemspec +1 -1
- data/spec/perfomance_spec/app/Benchmark/benchmark.rb +4 -0
- data/spec/perfomance_spec/app/Benchmark/bulk_results.erb +13 -0
- data/spec/perfomance_spec/app/Benchmark/controller.rb +178 -0
- data/spec/perfomance_spec/app/Benchmark/create_results.erb +13 -0
- data/spec/perfomance_spec/app/Benchmark/customers.erb +35 -0
- data/spec/perfomance_spec/app/Benchmark/index.erb +9 -0
- data/spec/perfomance_spec/app/Benchmark/products.erb +25 -0
- data/spec/perfomance_spec/app/Benchmark/search_results.erb +13 -0
- data/spec/perfomance_spec/app/Customer/customer.rb +6 -0
- data/spec/perfomance_spec/app/Perftest/index.erb +5 -0
- data/spec/perfomance_spec/app/Product/index.erb +25 -0
- data/spec/perfomance_spec/app/Product/product.rb +6 -0
- data/spec/perfomance_spec/app/helpers/application_helper.rb +126 -0
- data/spec/perfomance_spec/app/helpers/browser_helper.rb +18 -0
- data/spec/perfomance_spec/rhoconfig.txt +1 -1
- data/spec/phone_spec/app/Account_s/account_s.rb +5 -2
- data/spec/phone_spec/app/Case/case.rb +1 -0
- data/spec/phone_spec/app/Case_s/case_s.rb +2 -0
- data/spec/phone_spec/app/Data/perftest.json +35 -0
- data/spec/phone_spec/app/Data/testCDATA.xml +11 -0
- data/spec/phone_spec/app/Product/product.rb +1 -1
- data/spec/phone_spec/app/{Spec → spec}/asynchttp_spec.rb +66 -17
- data/spec/phone_spec/app/{Spec → spec}/barcode_spec.rb +0 -0
- data/spec/phone_spec/app/{Spec → spec}/blobsync_spec.rb +0 -0
- data/spec/phone_spec/app/{Spec → spec}/bsearch_spec.rb +0 -0
- data/spec/phone_spec/app/{Spec → spec}/bulksync_spec.rb +0 -0
- data/spec/phone_spec/app/{Spec → spec}/contacts_spec.rb +0 -0
- data/spec/phone_spec/app/{Spec → spec}/crypt_spec.rb +0 -0
- data/spec/phone_spec/app/{Spec → spec}/date_spec.rb +0 -0
- data/spec/phone_spec/app/spec/events_spec.rb +199 -0
- data/spec/phone_spec/app/{Spec → spec}/fixtures/client_info.txt +0 -0
- data/spec/phone_spec/app/{Spec → spec}/fixtures/object_values.txt +0 -0
- data/spec/phone_spec/app/{Spec → spec}/json_spec.rb +11 -2
- data/spec/phone_spec/app/{Spec → spec}/mapview_spec.rb +0 -0
- data/spec/phone_spec/app/{Spec → spec}/nativebar_spec.rb +0 -0
- data/spec/phone_spec/app/{Spec → spec}/navbar_spec.rb +0 -0
- data/spec/phone_spec/app/{Spec → spec}/pagination/fixtures/object_values.txt +0 -0
- data/spec/phone_spec/app/{Spec → spec}/rho_controller_spec.rb +5 -0
- data/spec/phone_spec/app/{Spec → spec}/rho_spec.rb +48 -0
- data/spec/phone_spec/app/{Spec → spec}/rhofile_spec.rb +9 -6
- data/spec/phone_spec/app/{Spec → spec}/rhom_object_spec.rb +188 -9
- data/spec/phone_spec/app/{Spec → spec}/syncengine_spec.rb +0 -0
- data/spec/phone_spec/app/{Spec → spec}/xml_spec.rb +15 -0
- data/spec/phone_spec/app/{Spec → spec}/xruby_spec.rb +0 -0
- data/spec/phone_spec/app/spec_runner.rb +4 -1
- data/spec/phone_spec/build.yml +2 -1
- metadata +95 -31
- data/platform/bb/rhodes/platform/5.0/com/rho/RhoMainScreen.java +0 -36
- data/platform/bb/rhodes/platform/6.0/com/rho/BrowserAdapter5.java +0 -155
- data/platform/bb/rhodes/platform/6.0/com/rho/RhoMainScreen.java +0 -36
@@ -1,9 +1,10 @@
|
|
1
1
|
platform/android/Rhodes/jni/src/RhoClassFactory.cpp
|
2
2
|
platform/android/Rhodes/jni/src/alert.cpp
|
3
|
+
platform/android/Rhodes/jni/src/bluetooth.cpp
|
3
4
|
platform/android/Rhodes/jni/src/callbacks.cpp
|
4
5
|
platform/android/Rhodes/jni/src/camera.cpp
|
5
|
-
platform/android/Rhodes/jni/src/signature.cpp
|
6
6
|
platform/android/Rhodes/jni/src/datetimepicker.cpp
|
7
|
+
platform/android/Rhodes/jni/src/event.cpp
|
7
8
|
platform/android/Rhodes/jni/src/fileapi.cpp
|
8
9
|
platform/android/Rhodes/jni/src/geolocation.cpp
|
9
10
|
platform/android/Rhodes/jni/src/logconf.cpp
|
@@ -17,6 +18,7 @@ platform/android/Rhodes/jni/src/phonebook.cpp
|
|
17
18
|
platform/android/Rhodes/jni/src/rhoconf.cpp
|
18
19
|
platform/android/Rhodes/jni/src/rhodes.cpp
|
19
20
|
platform/android/Rhodes/jni/src/ringtones.cpp
|
21
|
+
platform/android/Rhodes/jni/src/signature.cpp
|
20
22
|
platform/android/Rhodes/jni/src/socketimpl.cpp
|
21
23
|
platform/android/Rhodes/jni/src/splashscreen.cpp
|
22
24
|
platform/android/Rhodes/jni/src/sslimpl.cpp
|
@@ -21,8 +21,10 @@ platform/shared/ruby/error.c
|
|
21
21
|
platform/shared/ruby/eval.c
|
22
22
|
platform/shared/ruby/ext/alert/alert_wrap.c
|
23
23
|
platform/shared/ruby/ext/asynchttp/asynchttp_wrap.c
|
24
|
+
platform/shared/ruby/ext/bluetooth/bluetooth_wrap.c
|
25
|
+
platform/shared/ruby/ext/calendar/calendar_wrap.c
|
26
|
+
platform/shared/ruby/ext/calendar/event_wrap.c
|
24
27
|
platform/shared/ruby/ext/camera/camera_wrap.c
|
25
|
-
platform/shared/ruby/ext/signature/signature_wrap.c
|
26
28
|
platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c
|
27
29
|
platform/shared/ruby/ext/geolocation/geolocation_wrap.c
|
28
30
|
platform/shared/ruby/ext/mapview/mapview_wrap.c
|
@@ -34,6 +36,7 @@ platform/shared/ruby/ext/rho/rhoruby.c
|
|
34
36
|
platform/shared/ruby/ext/rho/rhosupport.c
|
35
37
|
platform/shared/ruby/ext/rhoconf/rhoconf_wrap.c
|
36
38
|
platform/shared/ruby/ext/ringtones/ringtones_wrap.c
|
39
|
+
platform/shared/ruby/ext/signature/signature_wrap.c
|
37
40
|
platform/shared/ruby/ext/socket/socket.c
|
38
41
|
platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c
|
39
42
|
platform/shared/ruby/ext/stringio/stringio.c
|
@@ -47,7 +47,7 @@ public class HsqlDBResult implements IDBResult
|
|
47
47
|
public String getColName(int nCol){
|
48
48
|
Result.ResultMetaData md = m_result.metaData;
|
49
49
|
if ( md.tableNames[nCol] != null && md.tableNames[nCol].length() > 0 )
|
50
|
-
return md.colNames[nCol]
|
50
|
+
return md.colNames[nCol];//.toLowerCase();
|
51
51
|
|
52
52
|
//AS alias
|
53
53
|
return md.colNames[nCol];
|
@@ -60,7 +60,7 @@ public class HsqlDBResult implements IDBResult
|
|
60
60
|
if ( md.colOrigNames[nCol] != null )
|
61
61
|
return md.colOrigNames[nCol];
|
62
62
|
|
63
|
-
return md.colNames[nCol]
|
63
|
+
return md.colNames[nCol];//.toLowerCase();
|
64
64
|
}
|
65
65
|
|
66
66
|
//AS alias
|
@@ -26,7 +26,7 @@ public class HsqlDBRowResult extends HsqlDBResult {
|
|
26
26
|
|
27
27
|
public String getColName(int nCol){
|
28
28
|
Object col = m_table.columnList.get(nCol);
|
29
|
-
return ((Column)col).columnName.name
|
29
|
+
return ((Column)col).columnName.name;//.toLowerCase();
|
30
30
|
}
|
31
31
|
|
32
32
|
//Object[] getItem(int nItem){
|
@@ -1960,7 +1960,9 @@ public class Expression {
|
|
1960
1960
|
if (tableName == null || tableName.equals(filterName)) {
|
1961
1961
|
Table table = f.getTable();
|
1962
1962
|
int i = table.findColumn(columnName);
|
1963
|
-
|
1963
|
+
if (i == -1)
|
1964
|
+
i = table.findColumn(columnNameOrig);
|
1965
|
+
|
1964
1966
|
if (i != -1) {
|
1965
1967
|
tableFilter = f;
|
1966
1968
|
columnIndex = i;
|
@@ -2484,9 +2486,10 @@ public class Expression {
|
|
2484
2486
|
String likeStr = isRightArgFixedConstant
|
2485
2487
|
? (String) eArg2.getValue(session, Types.VARCHAR)
|
2486
2488
|
: null;
|
2487
|
-
|
2488
|
-
|
2489
|
-
|
2489
|
+
//RHO
|
2490
|
+
//boolean ignoreCase = eArg.dataType == Types.VARCHAR_IGNORECASE
|
2491
|
+
// || eArg2.dataType == Types.VARCHAR_IGNORECASE;
|
2492
|
+
boolean ignoreCase = true;
|
2490
2493
|
likeObject.setParams(session, likeStr, ignoreCase);
|
2491
2494
|
|
2492
2495
|
if (!isRightArgFixedConstant) {
|
@@ -85,7 +85,7 @@ class Like {
|
|
85
85
|
private char[] cLike;
|
86
86
|
private int[] wildCardType;
|
87
87
|
private int iLen;
|
88
|
-
private boolean isIgnoreCase;
|
88
|
+
private boolean isIgnoreCase = true;
|
89
89
|
private int iFirstWildCard;
|
90
90
|
private boolean isNull;
|
91
91
|
Character escapeChar;
|
@@ -96,7 +96,7 @@ class Like {
|
|
96
96
|
|
97
97
|
Like(Character escape, boolean collation) {
|
98
98
|
escapeChar = escape;
|
99
|
-
hasCollation = collation;
|
99
|
+
hasCollation = true;//collation;
|
100
100
|
}
|
101
101
|
|
102
102
|
/**
|
@@ -107,7 +107,7 @@ class Like {
|
|
107
107
|
*/
|
108
108
|
void setParams(Session session, String s, boolean ignorecase) {
|
109
109
|
|
110
|
-
isIgnoreCase = ignorecase;
|
110
|
+
//isIgnoreCase = ignorecase;
|
111
111
|
|
112
112
|
normalize(session, s);
|
113
113
|
|
@@ -1067,7 +1067,9 @@ public class Table extends BaseTable {
|
|
1067
1067
|
int getColumnNr(String c) throws HsqlException {
|
1068
1068
|
|
1069
1069
|
int i = findColumn(c);
|
1070
|
-
|
1070
|
+
if (i == -1)
|
1071
|
+
i = findColumn(c.toLowerCase());
|
1072
|
+
|
1071
1073
|
if (i == -1) {
|
1072
1074
|
throw Trace.error(Trace.COLUMN_NOT_FOUND, c);
|
1073
1075
|
}
|
@@ -38,6 +38,7 @@ src\com\rho\IRhoLogSink.java
|
|
38
38
|
src\com\rho\IRhoRubyHelper.java
|
39
39
|
src\com\rho\Mutex.java
|
40
40
|
src\com\rho\RhodesApp.java
|
41
|
+
platform\bb\RubyVM\src\com\rho\RhoAppAdapter.java
|
41
42
|
src\com\rho\SplashScreen.java
|
42
43
|
src\com\rho\net\IHttpConnection.java
|
43
44
|
src\com\rho\net\INetworkAccess.java
|
@@ -5,7 +5,7 @@ import java.util.Enumeration;
|
|
5
5
|
import java.util.Hashtable;
|
6
6
|
|
7
7
|
import com.rho.net.NetResponse;
|
8
|
-
import com.xruby.runtime.builtin
|
8
|
+
import com.xruby.runtime.builtin.*;
|
9
9
|
import com.xruby.runtime.lang.*;
|
10
10
|
import com.rho.net.NetRequest.MultipartItem;
|
11
11
|
import com.rho.file.SimpleFile;
|
@@ -275,6 +275,75 @@ public class RhoConf {
|
|
275
275
|
}
|
276
276
|
}
|
277
277
|
|
278
|
+
private static long readToBuffer(java.io.InputStream is, byte[] buf, StringBuffer res, long limit)throws Exception
|
279
|
+
{
|
280
|
+
long nTotal = 0;
|
281
|
+
while(nTotal < limit)
|
282
|
+
{
|
283
|
+
long nRead = is.read(buf);
|
284
|
+
if ( nRead < 0 )
|
285
|
+
break;
|
286
|
+
if ( nTotal + nRead > limit )
|
287
|
+
nRead = limit - nTotal;
|
288
|
+
|
289
|
+
nTotal += nRead;
|
290
|
+
res.append(new String(buf,0,(int)nRead));
|
291
|
+
}
|
292
|
+
|
293
|
+
return nTotal;
|
294
|
+
}
|
295
|
+
|
296
|
+
static RubyString getLogText_ruby(long limit)throws Exception
|
297
|
+
{
|
298
|
+
StringBuffer res = new StringBuffer();
|
299
|
+
SimpleFile oFile = null;
|
300
|
+
RhoLogConf logConf = RhoLogger.getLogConf();
|
301
|
+
boolean bOldSaveToFile = logConf.isLogToFile();
|
302
|
+
logConf.setLogToFile(false);
|
303
|
+
java.io.InputStream is = null;
|
304
|
+
try{
|
305
|
+
oFile = RhoClassFactory.createFile();
|
306
|
+
oFile.open( logConf.getLogFilePath(), true, false);
|
307
|
+
|
308
|
+
if ( oFile.isOpened() )
|
309
|
+
{
|
310
|
+
long nFileSize = oFile.length();
|
311
|
+
long nPos = logConf.getLogTextPos();
|
312
|
+
long nMaxSize = nFileSize > nPos ? nFileSize : nPos;
|
313
|
+
if ( limit <= 0 || limit > nMaxSize)
|
314
|
+
limit = nMaxSize;
|
315
|
+
|
316
|
+
res = new StringBuffer((int)limit);
|
317
|
+
is = oFile.getInputStream();
|
318
|
+
byte[] buf = new byte[8096];
|
319
|
+
if ( limit <= nPos )
|
320
|
+
{
|
321
|
+
is.skip(nPos-limit);
|
322
|
+
readToBuffer(is, buf, res, limit);
|
323
|
+
}else
|
324
|
+
{
|
325
|
+
is.skip(nFileSize-(limit-nPos));
|
326
|
+
long nRead = readToBuffer(is, buf, res, limit);
|
327
|
+
|
328
|
+
oFile.close();
|
329
|
+
oFile.open( logConf.getLogFilePath(), true, false);
|
330
|
+
is = oFile.getInputStream();
|
331
|
+
readToBuffer(is, buf, res, limit-nRead);
|
332
|
+
}
|
333
|
+
|
334
|
+
}
|
335
|
+
|
336
|
+
}finally
|
337
|
+
{
|
338
|
+
if ( oFile != null )
|
339
|
+
try{ oFile.close(); }catch(IOException exc2){}
|
340
|
+
|
341
|
+
logConf.setLogToFile(bOldSaveToFile);
|
342
|
+
}
|
343
|
+
|
344
|
+
return ObjectFactory.createString(res);
|
345
|
+
}
|
346
|
+
|
278
347
|
public static boolean sendLog()
|
279
348
|
{
|
280
349
|
com.rho.net.NetRequest nq = RhoClassFactory.createNetRequest();
|
@@ -398,6 +467,44 @@ public class RhoConf {
|
|
398
467
|
|
399
468
|
}
|
400
469
|
});
|
470
|
+
|
471
|
+
klass.getSingletonClass().defineMethod("clean_log", new RubyNoArgMethod() {
|
472
|
+
protected RubyValue run(RubyValue receiver, RubyBlock block) {
|
473
|
+
try{
|
474
|
+
RhoLogger.clearLog();
|
475
|
+
return RubyConstant.QNIL;
|
476
|
+
}catch(Exception e)
|
477
|
+
{
|
478
|
+
LOG.ERROR("clean_log failed", e);
|
479
|
+
throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
|
480
|
+
}
|
481
|
+
|
482
|
+
}
|
483
|
+
});
|
484
|
+
|
485
|
+
klass.getSingletonClass().defineMethod("read_log", new RubyNoOrOneArgMethod() {
|
486
|
+
protected RubyValue run(RubyValue receiver, RubyBlock block) {
|
487
|
+
try{
|
488
|
+
return getLogText_ruby(0);
|
489
|
+
}catch(Exception e)
|
490
|
+
{
|
491
|
+
LOG.ERROR("read_log failed", e);
|
492
|
+
throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
|
493
|
+
}
|
494
|
+
|
495
|
+
}
|
496
|
+
|
497
|
+
protected RubyValue run(RubyValue receiver, RubyValue arg, RubyBlock block) {
|
498
|
+
try{
|
499
|
+
return getLogText_ruby(arg.toInt());
|
500
|
+
}catch(Exception e)
|
501
|
+
{
|
502
|
+
LOG.ERROR("read_log failed", e);
|
503
|
+
throw (e instanceof RubyException ? (RubyException)e : new RubyException(e.getMessage()));
|
504
|
+
}
|
505
|
+
|
506
|
+
}
|
507
|
+
});
|
401
508
|
|
402
509
|
}
|
403
510
|
}
|
@@ -126,6 +126,9 @@ public class RhoLogConf {
|
|
126
126
|
public String getLogText(){
|
127
127
|
String res = "";
|
128
128
|
SimpleFile oFile = null;
|
129
|
+
boolean bOldSaveToFile = isLogToFile();
|
130
|
+
setLogToFile(false);
|
131
|
+
|
129
132
|
try{
|
130
133
|
oFile = RhoClassFactory.createFile();
|
131
134
|
oFile.open( getLogFilePath(), true, false);
|
@@ -138,9 +141,12 @@ public class RhoLogConf {
|
|
138
141
|
}catch(Exception exc){
|
139
142
|
if ( oFile != null )
|
140
143
|
try{ oFile.close(); }catch(IOException exc2){}
|
144
|
+
}finally
|
145
|
+
{
|
146
|
+
setLogToFile(bOldSaveToFile);
|
141
147
|
}
|
142
148
|
|
143
149
|
return res;
|
144
150
|
}
|
145
|
-
|
151
|
+
|
146
152
|
}
|
@@ -117,7 +117,7 @@ public class RhoRuby {
|
|
117
117
|
return null;
|
118
118
|
}
|
119
119
|
|
120
|
-
public static RubyValue processIndexRequest(String strIndexArg ){
|
120
|
+
public static RubyValue processIndexRequest(String strIndexArg, RubyValue hashReq ){
|
121
121
|
|
122
122
|
String strIndex = strIndexArg.replace('\\', '/');
|
123
123
|
/* int nAppsIndex = strIndex.indexOf("/apps/");
|
@@ -127,7 +127,8 @@ public class RhoRuby {
|
|
127
127
|
RhoSupport.setCurAppPath( strIndex.substring(nAppsIndex, endIndex+1));
|
128
128
|
}*/
|
129
129
|
|
130
|
-
RubyValue value = RubyAPI.
|
130
|
+
RubyValue value = RubyAPI.callPublicTwoArgMethod(receiver,
|
131
|
+
ObjectFactory.createString(strIndex), hashReq, null, serveIndexID);
|
131
132
|
|
132
133
|
return value;
|
133
134
|
}
|
@@ -152,7 +153,9 @@ public class RhoRuby {
|
|
152
153
|
//return value.toString();
|
153
154
|
}
|
154
155
|
|
155
|
-
public static RubyValue processRequest(Properties reqHash,
|
156
|
+
public static RubyValue processRequest(Properties reqHash,
|
157
|
+
Properties reqHeaders, Properties resHeaders, String strIndex )throws IOException
|
158
|
+
{
|
156
159
|
RubyHash rh = ObjectFactory.createHash();
|
157
160
|
for( int i = 0; i < reqHash.size(); i++ ){
|
158
161
|
if ( reqHash.getValueAt(i) != null)
|
@@ -174,7 +177,7 @@ public class RhoRuby {
|
|
174
177
|
|
175
178
|
addHashToHash( rh, "headers", headers );
|
176
179
|
|
177
|
-
RubyValue res = callFramework(rh);
|
180
|
+
RubyValue res = strIndex != null? processIndexRequest(strIndex, rh) : callFramework(rh);
|
178
181
|
return res;
|
179
182
|
}
|
180
183
|
|
@@ -20,6 +20,7 @@ public abstract class ThreadQueue extends RhoThread
|
|
20
20
|
{
|
21
21
|
public abstract boolean equals(IQueueCommand cmd);
|
22
22
|
public abstract String toString();
|
23
|
+
public abstract void execute();
|
23
24
|
};
|
24
25
|
|
25
26
|
RhoClassFactory m_ptrFactory;
|
@@ -37,7 +38,7 @@ public abstract class ThreadQueue extends RhoThread
|
|
37
38
|
public RhoClassFactory getFactory(){ return m_ptrFactory; }
|
38
39
|
|
39
40
|
int getLastPollInterval(){ return 0;}
|
40
|
-
public abstract void processCommand(IQueueCommand pCmd);
|
41
|
+
//public abstract void processCommand(IQueueCommand pCmd);
|
41
42
|
boolean isSkipDuplicateCmd() { return false; }
|
42
43
|
|
43
44
|
public ThreadQueue(RhoClassFactory factory)
|
@@ -135,6 +136,11 @@ public abstract class ThreadQueue extends RhoThread
|
|
135
136
|
}
|
136
137
|
}
|
137
138
|
|
139
|
+
public void processCommand(IQueueCommand pCmd)
|
140
|
+
{
|
141
|
+
pCmd.execute();
|
142
|
+
}
|
143
|
+
|
138
144
|
public void setPollInterval(int nInterval)
|
139
145
|
{
|
140
146
|
m_nPollInterval = nInterval;
|
@@ -125,6 +125,17 @@ public class NetRequest
|
|
125
125
|
return "";
|
126
126
|
}
|
127
127
|
|
128
|
+
void handleCookie(IRhoSession oSession) throws Exception
|
129
|
+
{
|
130
|
+
if ( oSession != null )
|
131
|
+
{
|
132
|
+
String strSession = oSession.getSession();
|
133
|
+
LOG.INFO("Cookie : " + (strSession != null ? strSession : "") );
|
134
|
+
if ( strSession != null && strSession.length() > 0 && !strSession.equals("rho_empty") )
|
135
|
+
m_connection.setRequestProperty("Cookie", strSession );
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
128
139
|
public NetResponse doRequest(String strMethod, String strUrl, String strBody, IRhoSession oSession, Hashtable headers ) throws Exception
|
129
140
|
{
|
130
141
|
String strRespBody = null;
|
@@ -138,14 +149,7 @@ public class NetRequest
|
|
138
149
|
m_connection = RhoClassFactory.getNetworkAccess().connect(strUrl, m_bIgnoreSuffixOnSim);
|
139
150
|
LOG.INFO("connection done");
|
140
151
|
|
141
|
-
|
142
|
-
{
|
143
|
-
String strSession = oSession.getSession();
|
144
|
-
LOG.INFO("Cookie : " + (strSession != null ? strSession : "") );
|
145
|
-
if ( strSession != null && strSession.length() > 0 )
|
146
|
-
m_connection.setRequestProperty("Cookie", strSession );
|
147
|
-
}
|
148
|
-
|
152
|
+
handleCookie(oSession);
|
149
153
|
//m_connection.setRequestProperty("Connection", "keep-alive");
|
150
154
|
//m_connection.setRequestProperty("Accept", "application/x-www-form-urlencoded,application/json,text/html");
|
151
155
|
|
@@ -256,7 +260,11 @@ public class NetRequest
|
|
256
260
|
NetResponse resp = doRequest/*Try*/("POST", strUrl, strBody, oSession, headers);
|
257
261
|
if ( resp.isOK() )
|
258
262
|
{
|
259
|
-
resp.
|
263
|
+
String strCookie = resp.getCookies();
|
264
|
+
if ( strCookie == null || strCookie.length() == 0 )
|
265
|
+
strCookie = "rho_empty";
|
266
|
+
|
267
|
+
resp.setCharData(strCookie);
|
260
268
|
LOG.INFO("pullCookies: " + resp.getCharData() );
|
261
269
|
}
|
262
270
|
|
@@ -341,13 +349,8 @@ public class NetRequest
|
|
341
349
|
closeConnection();
|
342
350
|
m_connection = RhoClassFactory.getNetworkAccess().connect(strUrl, false);
|
343
351
|
|
344
|
-
|
345
|
-
|
346
|
-
String strSession = oSession.getSession();
|
347
|
-
if ( strSession != null && strSession.length() > 0 )
|
348
|
-
m_connection.setRequestProperty("Cookie", strSession );
|
349
|
-
}
|
350
|
-
|
352
|
+
handleCookie(oSession);
|
353
|
+
|
351
354
|
m_connection.setRequestProperty("Connection", "keep-alive");
|
352
355
|
m_connection.setRequestProperty("content-type", szMultipartContType);
|
353
356
|
writeHeaders(headers);
|
@@ -502,13 +505,8 @@ public class NetRequest
|
|
502
505
|
closeConnection();
|
503
506
|
m_connection = RhoClassFactory.getNetworkAccess().connect(strUrl, true);
|
504
507
|
|
505
|
-
|
506
|
-
|
507
|
-
String strSession = oSession.getSession();
|
508
|
-
if ( strSession != null && strSession.length() > 0 )
|
509
|
-
m_connection.setRequestProperty("Cookie", strSession );
|
510
|
-
}
|
511
|
-
|
508
|
+
handleCookie(oSession);
|
509
|
+
|
512
510
|
m_connection.setRequestProperty("Connection", "keep-alive");
|
513
511
|
|
514
512
|
if ( nStartPos > 0 || m_nMaxPacketSize > 0 )
|