rhodes 3.3.1 → 3.3.2.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +9 -2
- data/Manifest.txt +20 -0
- data/Rakefile +2 -1
- data/doc/build.txt +9 -3
- data/doc/configuration.txt +5 -1
- data/doc/device-caps.txt +112 -27
- data/doc/extensions.txt +0 -51
- data/doc/generator.txt +6 -0
- data/doc/rhom.txt +3 -0
- data/doc/simulator.txt +57 -17
- data/doc/ui.txt +24 -27
- data/installer/RHOELEMENTS-EULA.txt +295 -0
- data/installer/Rakefile +75 -49
- data/installer/rhostudio-moto.nsi +534 -0
- data/installer/rhostudio.nsi +13 -4
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/barcode.m +3 -0
- data/lib/framework/rho/rhoapplication.rb +4 -0
- data/lib/framework/rho/rhoevent.rb +2 -3
- data/lib/framework/rho/rhoevent_c.rb +2 -2
- data/lib/framework/rho/rhofsconnector.rb +24 -2
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/AndroidManifest.xml +3 -3
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +164 -90
- data/platform/android/Rhodes/jni/src/signature.cpp +13 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +76 -34
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +3 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +10 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/AnnotationsOverlay.java +0 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/Callout.java +6 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/GoogleMapView.java +0 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/ImageCapture.java +7 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +46 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +29 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +2 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +4 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsOld.java +10 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +3 -2
- data/platform/android/build/android.rake +6 -27
- data/platform/android/build/androidcommon.rb +1 -1
- data/platform/bb/rhodes/src/com/rho/rubyext/GeoLocation.java +26 -0
- data/platform/iphone/Classes/AppManager/AppManager.h +1 -0
- data/platform/iphone/Classes/AppManager/AppManager.m +70 -12
- data/platform/iphone/Classes/Camera/PickImageDelegate.m +1 -1
- data/platform/iphone/Classes/Event/Event.m +38 -3
- data/platform/iphone/Classes/Rhodes.m +3 -2
- data/platform/iphone/Classes/Signature/SignatureDelegate.m +1 -1
- data/platform/iphone/Info.plist +1 -1
- data/platform/iphone/rbuild/iphone.rake +8 -8
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebKit +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/phonon.framework/Versions/4/phonon +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Info.plist +1 -1
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/MacOS/RhoSimulator +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqcorewlanbearer.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqgenericbearer.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqcncodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqjpcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqkrcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqtwcodecs.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/graphicssystems/libqtracegraphicssystem.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqgif.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqico.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqjpeg.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqmng.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtiff.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/phonon_backend/libphonon_qt7.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_tcp.dylib +0 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulatorMac.zip +0 -0
- data/platform/osx/build/osx.rake +1 -1
- data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +1 -1
- data/platform/shared/common/RhoConf.cpp +15 -6
- data/platform/shared/common/RhoConf.h +6 -1
- data/platform/shared/common/RhodesApp.cpp +19 -6
- data/platform/shared/common/RhodesApp.h +4 -2
- data/platform/shared/common/RhodesAppBase.cpp +18 -10
- data/platform/shared/common/RhodesAppBase.h +6 -3
- data/platform/shared/common/map/GeocodingMapEngine.h +2 -2
- data/platform/shared/logging/RhoLogConf.cpp +14 -8
- data/platform/shared/logging/RhoLogConf.h +1 -0
- data/platform/shared/net/HttpServer.cpp +15 -3
- data/platform/shared/net/HttpServer.h +2 -1
- data/platform/shared/qt/curl/curl.pro +1 -1
- data/platform/shared/qt/rhodes/QtMainWindow.h +1 -1
- data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +2 -2
- data/platform/shared/qt/rhodes/main.cpp +2 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +1 -0
- data/platform/shared/ruby/ext/rho/rhosupport.c +11 -1
- data/platform/shared/sync/SyncNotify.cpp +1 -2
- data/platform/shared/sync/SyncNotify.h +2 -2
- data/platform/shared/sync/SyncThread.cpp +27 -12
- data/platform/shared/sync/SyncThread.h +2 -0
- data/platform/shared/unzip/unzip.cpp +3 -2
- data/platform/win32/RhoSimulator/Microsoft.VC80.CRT.manifest +8 -0
- data/platform/win32/RhoSimulator/Microsoft.VC80.OpenMP.manifest +7 -0
- data/platform/win32/RhoSimulator/QtCore4.dll +0 -0
- data/platform/win32/RhoSimulator/QtGui4.dll +0 -0
- data/platform/win32/RhoSimulator/QtNetwork4.dll +0 -0
- data/platform/win32/RhoSimulator/QtWebKit4.dll +0 -0
- data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
- data/platform/win32/RhoSimulator/imageformats/qgif4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qico4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qjpeg4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qmng4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qsvg4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qtiff4.dll +0 -0
- data/platform/win32/RhoSimulator/libeay32.dll +0 -0
- data/platform/win32/RhoSimulator/msvcm80.dll +0 -0
- data/platform/win32/RhoSimulator/msvcp80.dll +0 -0
- data/platform/win32/RhoSimulator/msvcr80.dll +0 -0
- data/platform/win32/RhoSimulator/ssleay32.dll +0 -0
- data/platform/win32/RhoSimulator/vcomp.dll +0 -0
- data/platform/wm/build/rhodes.nsi +316 -0
- data/platform/wm/build/wm.rake +57 -10
- data/platform/wm/rhodes/Rhodes.cpp +2 -1
- data/platform/wm/rhodes/rhodes.vcproj +2 -0
- data/platform/wm/tools/wmdc_connect.sln +20 -0
- data/platform/wm/tools/wmdc_connect/stdafx.cpp +27 -0
- data/platform/wm/tools/wmdc_connect/stdafx.h +35 -0
- data/platform/wm/tools/wmdc_connect/wmdc_connect.cpp +119 -0
- data/platform/wm/tools/wmdc_connect/wmdc_connect.vcproj +205 -0
- data/platform/wp7/RhoRubyExtGen/RhoAlert.cs +73 -0
- data/platform/wp7/RhoRubyExtGen/RhoRubyExtGen.csproj +1 -0
- data/platform/wp7/RhoRubyExtGen/RhoSyncEngine.cs +8 -8
- data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +47 -6
- data/platform/wp7/RhoRubyLib/RhoRuby.cs +8 -0
- data/platform/wp7/RhoRubyLib/RhoRubyLib.csproj +5 -0
- data/platform/wp7/RhoRubyLib/WP_PlatformAdaptationLayer.cs +5 -0
- data/platform/wp7/RhoRubyLib/common/RhoParams.cs +2 -1
- data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +58 -37
- data/platform/wp7/RhoRubyLib/db/DBAdapter.cs +37 -0
- data/platform/wp7/RhoRubyLib/db/DBAttrManager.cs +63 -1
- data/platform/wp7/RhoRubyLib/db/IDBStorage.cs +2 -0
- data/platform/wp7/RhoRubyLib/db/SqliteStorage.cs +27 -0
- data/platform/wp7/RhoRubyLib/logging/RhoLogServerSink.cs +2 -2
- data/platform/wp7/RhoRubyLib/net/NetRequest.cs +4 -3
- data/platform/wp7/RhoRubyLib/rubyext/RhoAlert.cs +160 -0
- data/platform/wp7/RhoRubyLib/rubyext/RhoSyncEngine.cs +44 -12
- data/platform/wp7/RhoRubyLib/sync/ClientRegister.cs +4 -3
- data/platform/wp7/RhoRubyLib/sync/SyncEngine.cs +27 -32
- data/platform/wp7/RhoRubyLib/sync/SyncNotify.cs +31 -11
- data/platform/wp7/RhoRubyLib/sync/SyncProtocol_3.cs +6 -1
- data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +4 -0
- data/platform/wp7/RhoRubyLib/sync/SyncThread.cs +21 -15
- data/platform/wp7/build/wp.rake +6 -0
- data/rakefile.rb +2 -1
- data/res/build-tools/Coding4Fun.Phone.Controls.dll +0 -0
- data/res/build-tools/wmdc_connect.exe +0 -0
- data/res/generators/templates/spec/app/SpecRunner/index.erb +14 -13
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +10 -1
- data/version +1 -1
- metadata +26 -4
@@ -10,6 +10,7 @@ namespace rho.sync
|
|
10
10
|
private static RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() :
|
11
11
|
new RhoLogger("ClientRegister");
|
12
12
|
private static CRhodesApp RHODESAPP() { return CRhodesApp.Instance; }
|
13
|
+
RhoConf RHOCONF() { return RhoConf.getInstance(); }
|
13
14
|
|
14
15
|
private static int WAIT_BEFOREKILL_SECONDS = 3;
|
15
16
|
private static int POLL_INTERVAL_SECONDS = 60;
|
@@ -111,9 +112,9 @@ namespace rho.sync
|
|
111
112
|
|
112
113
|
IDBResult res = DBAdapter.getUserDB().executeSQL("SELECT token,token_sent from client_info");
|
113
114
|
if ( !res.isEnd() ) {
|
114
|
-
String token = res.getStringByIdx(0);
|
115
|
-
|
116
|
-
|
115
|
+
String token = res.getStringByIdx(0);
|
116
|
+
boolean token_sent = res.getIntByIdx(1) > 0 && !RHOCONF().getBool("register_push_at_startup");
|
117
|
+
if (m_strDevicePin.equals(token) && token_sent)
|
117
118
|
{
|
118
119
|
//token in db same as new one and it was already send to the server
|
119
120
|
//so we do nothing
|
@@ -222,7 +222,7 @@ namespace rho.sync
|
|
222
222
|
stopSync();
|
223
223
|
}
|
224
224
|
|
225
|
-
public void doSyncAllSources()
|
225
|
+
public void doSyncAllSources(String strQueryParams)
|
226
226
|
{
|
227
227
|
try
|
228
228
|
{
|
@@ -237,8 +237,8 @@ namespace rho.sync
|
|
237
237
|
PROF.CREATE_COUNTER("Data1");
|
238
238
|
PROF.CREATE_COUNTER("Pull");
|
239
239
|
PROF.START("Sync");
|
240
|
-
|
241
|
-
|
240
|
+
|
241
|
+
syncAllSources(strQueryParams);
|
242
242
|
|
243
243
|
PROF.DESTROY_COUNTER("Net");
|
244
244
|
PROF.DESTROY_COUNTER("Parse");
|
@@ -432,7 +432,7 @@ namespace rho.sync
|
|
432
432
|
|
433
433
|
}
|
434
434
|
|
435
|
-
public void doSyncSource(SourceID oSrcID)
|
435
|
+
public void doSyncSource(SourceID oSrcID, String strQueryParams)
|
436
436
|
{
|
437
437
|
SyncSource src = null;
|
438
438
|
|
@@ -446,8 +446,9 @@ namespace rho.sync
|
|
446
446
|
if ( src != null )
|
447
447
|
{
|
448
448
|
LOG.INFO("Started synchronization of the data source: " + src.getName() );
|
449
|
-
|
450
|
-
|
449
|
+
|
450
|
+
src.m_strQueryParams = strQueryParams;
|
451
|
+
src.sync();
|
451
452
|
|
452
453
|
getNotify().fireSyncNotification(src, true, src.m_nErrCode, src.m_nErrCode == RhoAppAdapter.ERR_NONE ? RhoAppAdapter.getMessageText("sync_completed") : "");
|
453
454
|
}else
|
@@ -658,28 +659,16 @@ namespace rho.sync
|
|
658
659
|
|
659
660
|
boolean resetClientIDByNet(String strClientID)
|
660
661
|
{
|
661
|
-
|
662
|
-
//TODO: send client register info in client reset
|
663
|
-
// if ( ClientRegister.getInstance() != null )
|
664
|
-
// strBody += ClientRegister.getInstance().getRegisterBody();
|
665
|
-
|
666
|
-
NetResponse resp = getNetClientID().pullData(getProtocol().getClientResetUrl(strClientID), this);
|
667
|
-
/*
|
668
|
-
processServerSources("{\"server_sources\":[{\"name\":\"Product\",\"partition\":\"application\",\"source_id\":\"2\",\"sync_priority\":\"0\","+
|
669
|
-
"\"schema_version\":\"7.0\",\"schema\":{"+
|
670
|
-
"\"columns\":[\'brand\',\'created_at\',\'name\',\'price\',\'quantity\',\'sku\',\'updated_at\']"+
|
671
|
-
"}}]}");
|
672
|
-
*/
|
662
|
+
NetResponse resp = getNetClientID().pullData(getProtocol().getClientResetUrl(strClientID), this);
|
673
663
|
|
674
664
|
if ( !resp.isOK() )
|
675
665
|
{
|
676
666
|
m_nErrCode = RhoAppAdapter.getErrorFromResponse(resp);
|
677
667
|
m_strError = resp.getCharData();
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
}*/
|
668
|
+
}
|
669
|
+
else
|
670
|
+
RHOCONF().setString("reset_models", "", true);
|
671
|
+
|
683
672
|
|
684
673
|
return resp.isOK();
|
685
674
|
}
|
@@ -864,7 +853,7 @@ namespace rho.sync
|
|
864
853
|
return -1;
|
865
854
|
}
|
866
855
|
*/
|
867
|
-
void syncOneSource(int i)
|
856
|
+
void syncOneSource(int i, String strQueryParams)
|
868
857
|
{
|
869
858
|
SyncSource src = null;
|
870
859
|
//boolean bError = false;
|
@@ -872,9 +861,12 @@ namespace rho.sync
|
|
872
861
|
src = (SyncSource)m_sources.elementAt(i);
|
873
862
|
if ( src.getSyncType().compareTo("bulk_sync_only")==0 )
|
874
863
|
return;
|
875
|
-
|
876
|
-
|
877
|
-
|
864
|
+
|
865
|
+
if (isSessionExist() && getState() != esStop)
|
866
|
+
{
|
867
|
+
src.m_strQueryParams = strQueryParams;
|
868
|
+
src.sync();
|
869
|
+
}
|
878
870
|
|
879
871
|
//getNotify().onSyncSourceEnd(i, m_sources);
|
880
872
|
}catch(Exception exc)
|
@@ -893,7 +885,7 @@ namespace rho.sync
|
|
893
885
|
//return !bError;
|
894
886
|
}
|
895
887
|
|
896
|
-
void syncAllSources()
|
888
|
+
void syncAllSources(String strQueryParams)
|
897
889
|
{
|
898
890
|
// boolean bError = false;
|
899
891
|
|
@@ -904,7 +896,7 @@ namespace rho.sync
|
|
904
896
|
//TODO: do not stop on error source
|
905
897
|
for( int i = 0; i < (int)m_sources.size() && isContinueSync(); i++ )
|
906
898
|
{
|
907
|
-
|
899
|
+
/*bError = !*/syncOneSource(i, strQueryParams);
|
908
900
|
}
|
909
901
|
|
910
902
|
if (!isSchemaChanged() && getState() != SyncEngine.esStop )
|
@@ -975,9 +967,12 @@ namespace rho.sync
|
|
975
967
|
RHOCONF().setString("rho_sync_user", name, true);
|
976
968
|
|
977
969
|
getNotify().callLoginCallback(oNotify, RhoAppAdapter.ERR_NONE, "" );
|
978
|
-
|
979
|
-
|
980
|
-
|
970
|
+
|
971
|
+
if (ClientRegister.getInstance() != null)
|
972
|
+
{
|
973
|
+
getUserDB().executeSQL("UPDATE client_info SET token_sent=?", 0);
|
974
|
+
ClientRegister.getInstance().startUp();
|
975
|
+
}
|
981
976
|
|
982
977
|
}catch(Exception exc)
|
983
978
|
{
|
@@ -9,6 +9,7 @@ namespace rho.sync
|
|
9
9
|
{
|
10
10
|
private static RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() :
|
11
11
|
new RhoLogger("Sync");
|
12
|
+
int MAX_SERVER_ERROR_LEN = 1000;
|
12
13
|
private static CRhodesApp RHODESAPP() { return CRhodesApp.Instance; }
|
13
14
|
|
14
15
|
public class SyncNotification
|
@@ -505,17 +506,32 @@ namespace rho.sync
|
|
505
506
|
|
506
507
|
strBody += "error";
|
507
508
|
strBody += "&error_code=" + nErrCode;
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
509
|
+
|
510
|
+
if (strError != null && strError.length() > 0)
|
511
|
+
{
|
512
|
+
if (strError.length() > MAX_SERVER_ERROR_LEN)
|
513
|
+
strError = strError.substring(0, MAX_SERVER_ERROR_LEN);
|
514
|
+
strBody += "&error_message=" + URI.urlEncode(strError);
|
515
|
+
}
|
516
|
+
else if (src != null && src.m_strError != null)
|
517
|
+
{
|
518
|
+
if (src.m_strError.length() > MAX_SERVER_ERROR_LEN)
|
519
|
+
src.m_strError = src.m_strError.substring(0, MAX_SERVER_ERROR_LEN);
|
520
|
+
strBody += "&error_message=" + URI.urlEncode(src.m_strError);
|
521
|
+
}
|
522
|
+
|
523
|
+
if (strServerError != null && strServerError.length() > 0)
|
524
|
+
{
|
525
|
+
if (strServerError.length() > MAX_SERVER_ERROR_LEN)
|
526
|
+
strServerError = strServerError.substring(0, MAX_SERVER_ERROR_LEN);
|
527
|
+
strBody += "&" + strServerError;
|
528
|
+
}
|
529
|
+
else if (src != null && src.m_strServerError != null && src.m_strServerError.length() > 0)
|
530
|
+
{
|
531
|
+
if ( src.m_strServerError.length() > MAX_SERVER_ERROR_LEN )
|
532
|
+
src.m_strServerError = src.m_strServerError.substring(0, MAX_SERVER_ERROR_LEN);
|
533
|
+
strBody += "&" + src.m_strServerError; }
|
534
|
+
}
|
519
535
|
|
520
536
|
if ( src != null )
|
521
537
|
strBody += makeCreateObjectErrorBody( src.getID());
|
@@ -636,6 +652,10 @@ namespace rho.sync
|
|
636
652
|
return;
|
637
653
|
|
638
654
|
String strBody = "error_code=" + nErrCode;
|
655
|
+
|
656
|
+
if (strMessage != null && strMessage.length() > MAX_SERVER_ERROR_LEN)
|
657
|
+
strMessage = strMessage.substring(0, MAX_SERVER_ERROR_LEN);
|
658
|
+
|
639
659
|
strBody += "&error_message=" + URI.urlEncode(strMessage != null? strMessage : "");
|
640
660
|
strBody += "&rho_callback=1";
|
641
661
|
|
@@ -45,7 +45,12 @@ namespace rho.sync
|
|
45
45
|
|
46
46
|
public String getClientResetUrl(String strClientID)
|
47
47
|
{
|
48
|
-
|
48
|
+
String strUrl = RhoConf.getInstance().getPath("syncserver") + "clientreset?client_id=" + strClientID;
|
49
|
+
String strSources = RhoConf.getInstance().getString("reset_models");
|
50
|
+
if ( strSources.length() > 0 )
|
51
|
+
strUrl += strSources;
|
52
|
+
|
53
|
+
return strUrl;
|
49
54
|
}
|
50
55
|
|
51
56
|
public String getClientChangesUrl()
|
@@ -46,6 +46,7 @@ namespace rho.sync
|
|
46
46
|
boolean m_bGetAtLeastOnePage = false;
|
47
47
|
public int m_nErrCode = RhoAppAdapter.ERR_NONE;
|
48
48
|
public String m_strError = "", m_strServerError = "";
|
49
|
+
public String m_strQueryParams = "";
|
49
50
|
|
50
51
|
int m_nRefreshTime = 0;
|
51
52
|
int m_nProgressStep = 0;
|
@@ -567,6 +568,9 @@ namespace rho.sync
|
|
567
568
|
if ( !m_bTokenFromDB && getToken() > 1 )
|
568
569
|
strQuery += "&token=" + getToken();
|
569
570
|
|
571
|
+
if (m_strQueryParams.length() > 0)
|
572
|
+
strQuery += "&" + m_strQueryParams;
|
573
|
+
|
570
574
|
LOG.INFO( "Pull changes from server. Url: " + (strUrl+strQuery) );
|
571
575
|
|
572
576
|
NetResponse resp = null;
|
@@ -18,34 +18,38 @@ namespace rho.sync
|
|
18
18
|
{
|
19
19
|
public int m_nCmdCode;
|
20
20
|
public int m_nCmdParam;
|
21
|
-
|
21
|
+
public String m_strCmdParam, m_strQueryParams;
|
22
22
|
public boolean m_bShowStatus;
|
23
|
-
|
24
|
-
|
23
|
+
|
24
|
+
public SyncCommand(int nCode, int nParam, boolean bShowStatus, String query_params)
|
25
25
|
{
|
26
26
|
m_nCmdCode = nCode;
|
27
27
|
m_nCmdParam = nParam;
|
28
28
|
m_bShowStatus = bShowStatus;
|
29
|
+
m_strQueryParams = query_params != null ? query_params : "";
|
29
30
|
}
|
30
|
-
|
31
|
+
public SyncCommand(int nCode, String strParam, boolean bShowStatus, String query_params)
|
31
32
|
{
|
32
33
|
m_nCmdCode = nCode;
|
33
34
|
m_strCmdParam = strParam;
|
34
35
|
m_bShowStatus = bShowStatus;
|
36
|
+
m_strQueryParams = query_params != null ? query_params : "";
|
35
37
|
}
|
36
|
-
|
38
|
+
public SyncCommand(int nCode, String strParam, int nCmdParam, boolean bShowStatus, String query_params)
|
37
39
|
{
|
38
40
|
m_nCmdCode = nCode;
|
39
41
|
m_strCmdParam = strParam;
|
40
42
|
m_nCmdParam = nCmdParam;
|
41
43
|
m_bShowStatus = bShowStatus;
|
44
|
+
m_strQueryParams = query_params != null ? query_params : "";
|
42
45
|
}
|
43
|
-
|
44
|
-
|
46
|
+
|
47
|
+
public SyncCommand(int nCode, boolean bShowStatus, String query_params)
|
45
48
|
{
|
46
49
|
m_nCmdCode = nCode;
|
47
50
|
m_nCmdParam = 0;
|
48
51
|
m_bShowStatus = bShowStatus;
|
52
|
+
m_strQueryParams = query_params != null ? query_params : "";
|
49
53
|
}
|
50
54
|
|
51
55
|
public boolean equals(IQueueCommand obj)
|
@@ -53,7 +57,9 @@ namespace rho.sync
|
|
53
57
|
SyncCommand oSyncCmd = (SyncCommand)obj;
|
54
58
|
return m_nCmdCode == oSyncCmd.m_nCmdCode && m_nCmdParam == oSyncCmd.m_nCmdParam &&
|
55
59
|
(m_strCmdParam == oSyncCmd.m_strCmdParam ||
|
56
|
-
|
60
|
+
(m_strCmdParam != null && oSyncCmd.m_strCmdParam != null && m_strCmdParam.equals(oSyncCmd.m_strCmdParam))) &&
|
61
|
+
(m_strQueryParams == oSyncCmd.m_strQueryParams ||
|
62
|
+
(m_strQueryParams != null && oSyncCmd.m_strQueryParams != null && m_strQueryParams.equals(oSyncCmd.m_strQueryParams)));
|
57
63
|
}
|
58
64
|
|
59
65
|
public String toString()
|
@@ -85,7 +91,7 @@ namespace rho.sync
|
|
85
91
|
public String m_strName, m_strPassword;
|
86
92
|
public /*common::CAutoPtr<C*/SyncNotify.SyncNotification/*>*/ m_pNotify;
|
87
93
|
public SyncLoginCommand(String name, String password, String callback, SyncNotify.SyncNotification pNotify) :
|
88
|
-
base(scLogin,callback,false)
|
94
|
+
base(scLogin, callback, false, "")
|
89
95
|
{
|
90
96
|
m_strName = name;
|
91
97
|
m_strPassword = password;
|
@@ -99,7 +105,7 @@ namespace rho.sync
|
|
99
105
|
public Vector<String> m_arSources;
|
100
106
|
|
101
107
|
public SyncSearchCommand(String from, String _params, Vector<String> arSources, boolean sync_changes, int nProgressStep) :
|
102
|
-
base(scSearchOne,_params,nProgressStep, false)
|
108
|
+
base(scSearchOne, _params, nProgressStep, false, "")
|
103
109
|
{
|
104
110
|
m_strFrom = from;
|
105
111
|
m_bSyncChanges = sync_changes;
|
@@ -199,7 +205,7 @@ namespace rho.sync
|
|
199
205
|
public override void onTimeout()//throws Exception
|
200
206
|
{
|
201
207
|
if ( isNoCommands() && getPollInterval()>0 )
|
202
|
-
|
208
|
+
addQueueCommandInt(new SyncCommand(scSyncAll, false, ""));
|
203
209
|
}
|
204
210
|
|
205
211
|
void checkShowStatus(SyncCommand oSyncCmd)
|
@@ -217,12 +223,12 @@ namespace rho.sync
|
|
217
223
|
{
|
218
224
|
case scSyncAll:
|
219
225
|
checkShowStatus(oSyncCmd);
|
220
|
-
|
226
|
+
m_oSyncEngine.doSyncAllSources(oSyncCmd.m_strQueryParams);
|
221
227
|
break;
|
222
228
|
case scSyncOne:
|
223
229
|
{
|
224
230
|
checkShowStatus(oSyncCmd);
|
225
|
-
|
231
|
+
m_oSyncEngine.doSyncSource(new SyncEngine.SourceID(oSyncCmd.m_nCmdParam, oSyncCmd.m_strCmdParam), oSyncCmd.m_strQueryParams);
|
226
232
|
}
|
227
233
|
break;
|
228
234
|
|
@@ -266,7 +272,7 @@ namespace rho.sync
|
|
266
272
|
|
267
273
|
public static void doSyncAllSources(boolean bShowStatus)
|
268
274
|
{
|
269
|
-
|
275
|
+
getInstance().addQueueCommand(new SyncCommand(SyncThread.scSyncAll, bShowStatus, ""));
|
270
276
|
}
|
271
277
|
|
272
278
|
public static void doSyncSourceByName(String strSrcName, boolean bShowStatus)
|
@@ -274,7 +280,7 @@ namespace rho.sync
|
|
274
280
|
if (bShowStatus&&(m_statusListener != null)) {
|
275
281
|
m_statusListener.createStatusPopup(RhoAppAdapter.getMessageText("syncronizing_data"));
|
276
282
|
}
|
277
|
-
|
283
|
+
getInstance().addQueueCommand(new SyncCommand(SyncThread.scSyncOne, strSrcName, (int)0, bShowStatus, ""));
|
278
284
|
}
|
279
285
|
|
280
286
|
public static void stopSync()
|
data/platform/wp7/build/wp.rake
CHANGED
@@ -417,6 +417,12 @@ namespace "run" do
|
|
417
417
|
$rhosim_config = "platform='wp'\r\n"
|
418
418
|
Rake::Task["run:rhosimulator_debug"].invoke
|
419
419
|
end
|
420
|
+
|
421
|
+
task :phone_spec do
|
422
|
+
Jake.run_spec_app('wp','phone_spec')
|
423
|
+
exit 1 if $total.to_i==0
|
424
|
+
exit $failed.to_i
|
425
|
+
end
|
420
426
|
|
421
427
|
desc "Build, install .xap and run on WP7 device"
|
422
428
|
task :device => ["device:wp:production_noxap"] do
|
data/rakefile.rb
CHANGED
@@ -80,7 +80,7 @@ namespace "framework" do
|
|
80
80
|
end
|
81
81
|
|
82
82
|
|
83
|
-
$application_build_configs_keys = ['security_token', 'encrypt_database', 'android_title']
|
83
|
+
$application_build_configs_keys = ['security_token', 'encrypt_database', 'android_title', 'iphone_use_doc_folder', 'iphone_all_in_doc_folder']
|
84
84
|
|
85
85
|
def make_application_build_config_header_file
|
86
86
|
f = StringIO.new("", "w+")
|
@@ -1219,6 +1219,7 @@ namespace "run" do
|
|
1219
1219
|
end
|
1220
1220
|
|
1221
1221
|
sim_conf = "rhodes_path='#{$startdir}'\r\n"
|
1222
|
+
sim_conf += "app_version='#{$app_config["version"]}'\r\n"
|
1222
1223
|
sim_conf += "app_name='#{$appname}'\r\n"
|
1223
1224
|
if ( ENV['rho_reload_app_changes'] )
|
1224
1225
|
sim_conf += "reload_app_changes=#{ENV['rho_reload_app_changes']}\r\n"
|
Binary file
|
Binary file
|
@@ -1,14 +1,15 @@
|
|
1
|
-
<div
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<div data-role="page">
|
2
|
+
<div data-role="header">
|
3
|
+
<h1>SpecRunner</h1>
|
4
|
+
<a href="#" data-rel="back" data-icon="back">Back</a>
|
5
|
+
</div>
|
6
|
+
<%@color = @code == 0 ? "#00ff00" : "#ff0000"%>
|
7
|
+
<div data-role="content">
|
8
|
+
<ul data-role="listview">
|
9
|
+
<% if @msg %><li style="color:<%=@color%>" align="center"><%=@msg%></li><% end %>
|
10
|
+
<li style="color:<%=@color%>">Total: <%=@count%></li>
|
11
|
+
<li style="color:<%=@color%>">Passed: <%=@count - @exc_count%></li>
|
12
|
+
<li style="color:<%=@color%>">Failed: <%=@exc_count%></li>
|
13
|
+
</ul>
|
14
|
+
</div>
|
5
15
|
</div>
|
6
|
-
|
7
|
-
<%@color = @code == 0 ? "#00ff00" : "#ff0000"%>
|
8
|
-
|
9
|
-
<ul id="specrunner" title="SpecRunner" selected="true">
|
10
|
-
<% if @msg %><li style="color:<%=@color%>" align="center"><%=@msg%></li><% end %>
|
11
|
-
<li style="color:<%=@color%>">Total: <%=@count%></li>
|
12
|
-
<li style="color:<%=@color%>">Passed: <%=@count - @exc_count%></li>
|
13
|
-
<li style="color:<%=@color%>">Failed: <%=@exc_count%></li>
|
14
|
-
</ul>
|
@@ -1288,14 +1288,23 @@ if !defined?(RHO_WP7)
|
|
1288
1288
|
f.close
|
1289
1289
|
|
1290
1290
|
File.exists?(file_name).should == true
|
1291
|
+
|
1291
1292
|
blob_name = file_name[__rhoGetCurrentDir().length(), file_name.length()-__rhoGetCurrentDir().length()]
|
1292
|
-
|
1293
|
+
|
1294
|
+
if System::get_property('platform') == 'APPLE'
|
1295
|
+
blob_name = file_name[__rhoGetUserDir().length(), file_name.length()-__rhoGetUserDir().length()]
|
1296
|
+
end
|
1297
|
+
|
1298
|
+
puts "file_name : #{file_name}"
|
1299
|
+
puts "blob_name : #{blob_name}"
|
1293
1300
|
|
1294
1301
|
item = getAccount.create({'my_text'=>blob_name})
|
1295
1302
|
item.my_text.should == blob_name
|
1296
1303
|
File.exists?(file_name).should == true
|
1297
1304
|
|
1298
1305
|
item.destroy
|
1306
|
+
|
1307
|
+
#sleep 30
|
1299
1308
|
|
1300
1309
|
item2 = getAccount.find(item.object)
|
1301
1310
|
item2.should be_nil
|