rhodes 1.5.2 → 1.5.3

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.
Files changed (35) hide show
  1. data/CHANGELOG +4 -0
  2. data/Manifest.txt +4 -3
  3. data/bin/upgrade-rhodes-app +1 -0
  4. data/lib/framework/rhodes.rb +2 -2
  5. data/lib/framework/rhom/rhom_object_factory.rb +16 -7
  6. data/lib/framework/version.rb +2 -2
  7. data/lib/rhodes.rb +2 -2
  8. data/platform/android/Rhodes/AndroidManifest.xml +2 -2
  9. data/platform/android/Rhodes/jni/include/jni/com_rhomobile_rhodes_Rhodes.h +14 -4
  10. data/platform/android/Rhodes/jni/src/rhodes.cpp +7 -0
  11. data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java +7 -2
  12. data/platform/android/Rhodes/src/com/rhomobile/rhodes/Rhodes.java +6 -6
  13. data/platform/android/Rhodes/src/com/rhomobile/rhodes/{MainView.java → mainview/MainView.java} +1 -1
  14. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +286 -0
  15. data/platform/android/Rhodes/src/com/rhomobile/rhodes/{TabbedMainView.java → mainview/TabbedMainView.java} +5 -1
  16. data/platform/android/build/RhodesSRC_build.files +3 -3
  17. data/platform/android/build/android.rake +1 -0
  18. data/platform/bb/rhodes/src/com/rho/net/NetworkAccess.java +22 -4
  19. data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +1 -1
  20. data/platform/bb/rhodes/src/rhomobile/camera/CameraScreen.java +15 -3
  21. data/platform/iphone/Classes/WebViewController.m +21 -7
  22. data/platform/iphone/Info.plist +1 -1
  23. data/platform/iphone/rbuild/iphone.rake +36 -28
  24. data/platform/osx/Rhodes Launcher/launch.rb +21 -14
  25. data/platform/shared/common/RhodesApp.cpp +7 -0
  26. data/platform/shared/common/RhodesApp.h +1 -0
  27. data/platform/shared/ruby/wince/io_wce.c +2 -0
  28. data/platform/shared/rubyJVM/src/com/rho/RhoRuby.java +2 -1
  29. data/platform/shared/rubyJVM/src/com/rho/sync/SyncEngine.java +3 -3
  30. data/platform/shared/sync/SyncEngine.cpp +6 -5
  31. data/res/build-tools/cygwin1.dll +0 -0
  32. data/res/build-tools/cygz.dll +0 -0
  33. data/spec/framework_spec/app/spec/rhom_object_spec.rb +54 -75
  34. metadata +6 -5
  35. data/platform/android/Rhodes/src/com/rhomobile/rhodes/SimpleMainView.java +0 -67
@@ -18,11 +18,15 @@
18
18
  along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
  ============================================================================
20
20
  */
21
- package com.rhomobile.rhodes;
21
+ package com.rhomobile.rhodes.mainview;
22
22
 
23
23
  import java.util.Map;
24
24
  import java.util.Vector;
25
25
 
26
+ import com.rhomobile.rhodes.Logger;
27
+ import com.rhomobile.rhodes.Rhodes;
28
+ import com.rhomobile.rhodes.RhodesInstance;
29
+
26
30
  import android.graphics.Bitmap;
27
31
  import android.graphics.BitmapFactory;
28
32
  import android.graphics.drawable.BitmapDrawable;
@@ -1,7 +1,6 @@
1
1
  platform/android/Rhodes/src/com/rhomobile/rhodes/AndroidR.java
2
2
  platform/android/Rhodes/src/com/rhomobile/rhodes/HttpLog.java
3
3
  platform/android/Rhodes/src/com/rhomobile/rhodes/Logger.java
4
- platform/android/Rhodes/src/com/rhomobile/rhodes/MainView.java
5
4
  platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java
6
5
  platform/android/Rhodes/src/com/rhomobile/rhodes/NetworkConnectivityListener.java
7
6
  platform/android/Rhodes/src/com/rhomobile/rhodes/NetworkStateTracker.java
@@ -10,9 +9,7 @@ platform/android/Rhodes/src/com/rhomobile/rhodes/RhoLogConf.java
10
9
  platform/android/Rhodes/src/com/rhomobile/rhodes/Rhodes.java
11
10
  platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesInstance.java
12
11
  platform/android/Rhodes/src/com/rhomobile/rhodes/RingtoneManager.java
13
- platform/android/Rhodes/src/com/rhomobile/rhodes/SimpleMainView.java
14
12
  platform/android/Rhodes/src/com/rhomobile/rhodes/SplashScreen.java
15
- platform/android/Rhodes/src/com/rhomobile/rhodes/TabbedMainView.java
16
13
  platform/android/Rhodes/src/com/rhomobile/rhodes/Utils.java
17
14
  platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java
18
15
  platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java
@@ -24,6 +21,9 @@ platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePicker.java
24
21
  platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePickerScreen.java
25
22
  platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java
26
23
  platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java
24
+ platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java
25
+ platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java
26
+ platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java
27
27
  platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/Annotation.java
28
28
  platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/AnnotationsOverlay.java
29
29
  platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapView.java
@@ -138,6 +138,7 @@ namespace "config" do
138
138
  $rubypath = "res/build-tools/RhoRuby.exe"
139
139
 
140
140
  # Add PATH to cygwin1.dll
141
+ ENV['CYGWIN'] = 'nodosfilewarning'
141
142
  if $path_cygwin_modified.nil?
142
143
  ENV['PATH'] = Jake.get_absolute("res/build-tools") + ";" + ENV['PATH']
143
144
  path_cygwin_modified = true
@@ -205,16 +205,34 @@ public class NetworkAccess implements INetworkAccess {
205
205
  String url = strUrl;
206
206
  if (!ignoreSuffix)
207
207
  url += URLsuffix;
208
+
209
+ if (url.startsWith("https"))
210
+ url += ";EndToEndDesired;RdHTTPS";
211
+
208
212
  LOG.INFO(url);
209
- conn = Connector.open(url);
213
+ conn = Connector.open(url, Connector.READ_WRITE, true);
214
+ } catch (java.io.InterruptedIOException ioe) {
215
+ LOG.ERROR("Connector.open InterruptedIOException", ioe );
216
+ if (conn != null)
217
+ conn.close();
218
+ conn = null;
219
+ throw ioe;
210
220
  } catch (IOException ioe) {
211
- if ( URLsuffix.length() > 0 )
221
+ String strMsg = ioe.getMessage();
222
+
223
+ boolean bTimeout = strMsg != null && (strMsg.indexOf("timed out") >= 0 || strMsg.indexOf("Timed out") >= 0);
224
+
225
+ if ( !bTimeout && URLsuffix.length() > 0 )
212
226
  {
213
227
  LOG.ERROR("Connector.open exception", ioe );
214
228
 
215
229
  try{
216
- LOG.INFO(strUrl);
217
- conn = Connector.open(strUrl);
230
+ String url = strUrl;
231
+ if (url.startsWith("https"))
232
+ url += ";EndToEndDesired;RdHTTPS";
233
+
234
+ LOG.INFO(url);
235
+ conn = Connector.open(url, Connector.READ_WRITE, true);
218
236
  } catch (IOException ioe2) {
219
237
  LOG.ERROR("Connector.open exception", ioe2 );
220
238
  if (conn != null)
@@ -259,7 +259,7 @@ final public class RhodesApplication extends UiApplication implements RenderingA
259
259
  synchronized(this)
260
260
  {
261
261
  m_response = resp;
262
- this.notify();
262
+ this.notifyAll();
263
263
  }
264
264
  }
265
265
  }
@@ -186,11 +186,17 @@ public class CameraScreen extends MainScreen {
186
186
  }
187
187
 
188
188
  fname = makeFileName(ext);
189
+ LOG.TRACE("camera filename: " + fname);
189
190
 
190
191
  file.open(fname, false, false);
192
+
193
+ LOG.TRACE("camera file open. Encoding: " + encoding);
191
194
 
192
195
  //Retrieve the raw image from the VideoControl
193
196
  byte[] image = _videoControl.getSnapshot(encoding);
197
+
198
+ LOG.TRACE("camera getSnapshot called.");
199
+
194
200
  //Write image data
195
201
  file.getOutStream().write(image,0,image.length);
196
202
  image = null;
@@ -201,7 +207,7 @@ public class CameraScreen extends MainScreen {
201
207
  fname = Utilities.replaceAll(fname,"/","%2F");
202
208
  } catch(Exception e) {
203
209
  error = true;
204
- LOG.ERROR(e);
210
+ LOG.ERROR("Read camera image file failed.", e);
205
211
  Dialog.alert( "Error " + e.getClass() + ": " + e.getMessage() );
206
212
  } finally {
207
213
  try{
@@ -266,8 +272,11 @@ public class CameraScreen extends MainScreen {
266
272
  // First of all, attempting to capture picture using MM API
267
273
 
268
274
  //Create a player for the Blackberry's camera.
269
- player = Manager.createPlayer( "capture://video" );
270
- LOG.TRACE("Recording using MM API");
275
+ // do not use it:
276
+ //http://supportforums.blackberry.com/t5/Java-Development/ControlledAccessException-from-getSnapshot/m-p/284997;jsessionid=59C552A3EC61C282E67BDF229DDD2701
277
+
278
+ // player = Manager.createPlayer( "capture://video" );
279
+ // LOG.TRACE("Recording using MM API");
271
280
  }
272
281
  }
273
282
  catch(Exception e) {
@@ -278,6 +287,7 @@ public class CameraScreen extends MainScreen {
278
287
  try
279
288
  {
280
289
  if (player != null) {
290
+ LOG.INFO("Use VideoControl");
281
291
  //Set the player to the REALIZED state (see Player docs.)
282
292
  player.realize();
283
293
 
@@ -301,6 +311,8 @@ public class CameraScreen extends MainScreen {
301
311
  initializeEncodingList();
302
312
  }
303
313
  else {
314
+ LOG.INFO("Use filesystem hook");
315
+
304
316
  RhodesApplication app = RhodesApplication.getInstance();
305
317
  _fileListener = new CameraFilesListener(this);
306
318
  app.addFileSystemJournalListener(_fileListener);
@@ -41,11 +41,12 @@ extern int webview_active_tab();
41
41
  {
42
42
  WebViewController *wc;
43
43
  NSString *url;
44
+ bool callback;
44
45
  }
45
46
 
46
47
  @property (nonatomic,copy) NSString *url;
47
48
 
48
- - (id)init:(WebViewController*)w url:(NSString*)u;
49
+ - (id)init:(WebViewController*)w url:(NSString*)u callback:(bool)c;
49
50
  - (void)onAction:(id)sender;
50
51
 
51
52
  @end
@@ -54,14 +55,22 @@ extern int webview_active_tab();
54
55
 
55
56
  @synthesize url;
56
57
 
57
- - (id)init:(WebViewController *)w url:(NSString*)u {
58
- self->wc = w;
58
+ - (id)init:(WebViewController *)w url:(NSString*)u callback:(bool)c {
59
+ wc = w;
59
60
  self.url = u;
61
+ callback = c;
60
62
  return self;
61
63
  }
62
64
 
65
+ - (void)doAction {
66
+ if (callback)
67
+ rho_net_request([url UTF8String]);
68
+ else
69
+ [wc navigate:url];
70
+ }
71
+
63
72
  - (void)onAction:(id)sender {
64
- [wc navigate:url];
73
+ [self performSelectorOnMainThread:@selector(doAction) withObject:nil waitUntilDone:NO];
65
74
  }
66
75
 
67
76
  @end
@@ -168,9 +177,14 @@ extern int webview_active_tab();
168
177
  target:nil action:nil];
169
178
  }
170
179
  else {
180
+ bool callback = false;
181
+ if ([url length] > 9 && [[url substringToIndex:9] isEqual:@"callback:"]) {
182
+ callback = true;
183
+ url = [url substringFromIndex:9];
184
+ }
171
185
  NSString *u = [NSString stringWithUTF8String:rho_http_normalizeurl([url UTF8String])];
172
- UIBarButtonItemAction *action = [[UIBarButtonItemAction alloc] init:self url:u];
173
- if (!img) {
186
+ UIBarButtonItemAction *action = [[UIBarButtonItemAction alloc] init:self url:u callback:callback];
187
+ if (img) {
174
188
  btn = [[UIBarButtonItem alloc]
175
189
  initWithImage:img style:UIBarButtonItemStylePlain
176
190
  target:action action:@selector(onAction:)];
@@ -274,7 +288,7 @@ extern int webview_active_tab();
274
288
  webView = [[UIWebView alloc] initWithFrame:wvFrame];
275
289
  webView.scalesPageToFit = YES;
276
290
  webView.userInteractionEnabled = YES;
277
- webView.detectsPhoneNumbers = YES;
291
+ //webView.detectsPhoneNumbers = YES;
278
292
  webView.multipleTouchEnabled = YES;
279
293
  webView.autoresizesSubviews = YES;
280
294
  webView.delegate = self;
@@ -21,7 +21,7 @@
21
21
  <key>CFBundleSignature</key>
22
22
  <string>????</string>
23
23
  <key>CFBundleVersion</key>
24
- <string>1.5.2</string>
24
+ <string>1.5.3</string>
25
25
  <key>LSRequiresIPhoneOS</key>
26
26
  <true/>
27
27
  </dict>
@@ -57,8 +57,7 @@ namespace "config" do
57
57
  $tmpdir = $bindir +"/tmp"
58
58
 
59
59
  $homedir = `echo ~`.to_s.strip
60
- $simapp="#{$homedir}/Library/Application Support/iPhone Simulator/User/Applications"
61
- $simlink="#{$homedir}/Library/Application Support/iPhone Simulator/User/Library/Preferences"
60
+ $simdir = "#{$homedir}/Library/Application Support/iPhone Simulator/"
62
61
  $sim="/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications"
63
62
  $guid="364FFCAF-C71D-4543-B293-9058E31CFFEE"
64
63
  $applog = File.join($homedir,$app_config["applog"]) if $app_config["applog"]
@@ -189,37 +188,46 @@ namespace "run" do
189
188
 
190
189
  rhorunner = $config["build"]["iphonepath"] + "/build/#{$configuration}-iphonesimulator/rhorunner.app"
191
190
 
192
- Find.find($simapp) do |path|
191
+
192
+ Find.find($simdir) do |path|
193
193
  if File.basename(path) == "rhorunner.app"
194
194
  $guid = File.basename(File.dirname(path))
195
195
  end
196
196
  end
197
-
198
- $simrhodes = File.join($simapp,$guid)
199
-
200
- mkdir_p File.join($simrhodes,"Documents")
201
- mkdir_p File.join($simrhodes,"Library","Preferences")
197
+
198
+ Dir.glob($simdir + '*').each do |sdk|
199
+ simapp = sdk + "/Applications"
200
+ simlink = sdk + "/Library/Preferences"
201
+
202
+ simrhodes = File.join(simapp,$guid)
203
+
204
+ mkdir_p File.join(simrhodes,"Documents")
205
+ mkdir_p File.join(simrhodes,"Library","Preferences")
206
+
207
+ `cp -R -p "#{rhorunner}" "#{simrhodes}"`
208
+ `ln -f -s "#{simlink}/com.apple.PeoplePicker.plist" "#{simrhodes}/Library/Preferences/com.apple.PeoplePicker.plist"`
209
+ `ln -f -s "#{simlink}/.GlobalPreferences.plist" "#{simrhodes}/Library/Preferences/.GlobalPreferences.plist"`
210
+
211
+ `echo "#{$applog}" > "#{simrhodes}/Documents/rhologpath.txt"`
212
+ rholog = simapp + "/" + $guid + "/Documents/RhoLog.txt"
213
+
214
+
215
+ simpublic = simapp + "/" + $guid + "/Documents/apps/public"
216
+ apppublic = $app_path + "/sim-public-#{File.basename(sdk)}"
217
+
218
+ apprholog = $app_path + "/rholog-#{File.basename(sdk)}.txt"
219
+ rm_f apprholog
220
+ rm_f apppublic
221
+ `ln -f -s "#{simpublic}" "#{apppublic}"`
222
+ `ln -f -s "#{rholog}" "#{apprholog}"`
223
+ `echo > "#{rholog}"`
224
+ f = File.new("#{simapp}/#{$guid}.sb","w")
225
+ f << "(version 1)\n(debug deny)\n(allow default)\n"
226
+ f.close
227
+
228
+
229
+ end
202
230
 
203
- puts `cp -R -p "#{rhorunner}" "#{$simrhodes}"`
204
- puts `ln -f -s "#{$simlink}/com.apple.PeoplePicker.plist" "#{$simrhodes}/Library/Preferences/com.apple.PeoplePicker.plist"`
205
- puts `ln -f -s "#{$simlink}/.GlobalPreferences.plist" "#{$simrhodes}/Library/Preferences/.GlobalPreferences.plist"`
206
-
207
- puts `echo "#{$applog}" > "#{$simrhodes}/Documents/rhologpath.txt"`
208
- rholog = $simapp + "/" + $guid + "/Documents/RhoLog.txt"
209
-
210
-
211
- simpublic = $simapp + "/" + $guid + "/Documents/apps/public"
212
- apppublic = $app_path + "/sim-public"
213
-
214
- apprholog = $app_path + "/rholog.txt"
215
- rm_f apprholog
216
- rm_f apppublic
217
- puts `ln -f -s "#{simpublic}" "#{apppublic}"`
218
- puts `ln -f -s "#{rholog}" "#{apprholog}"`
219
- puts `echo > "#{rholog}"`
220
- f = File.new("#{$simapp}/#{$guid}.sb","w")
221
- f << "(version 1)\n(debug deny)\n(allow default)\n"
222
- f.close
223
231
 
224
232
  end
225
233
 
@@ -1,10 +1,12 @@
1
- require 'Find'
1
+ require 'find'
2
2
  require 'fileutils'
3
3
  include FileUtils
4
4
 
5
5
  chdir File.dirname(__FILE__)
6
6
 
7
7
  $homedir = `echo ~`.to_s.strip
8
+ $simdir = "#{$homedir}/Library/Application Support/iPhone Simulator/"
9
+
8
10
  $simapp="#{$homedir}/Library/Application Support/iPhone Simulator/User/Applications"
9
11
  $simlink="#{$homedir}/Library/Application Support/iPhone Simulator/User/Library/Preferences"
10
12
  $sim="/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications"
@@ -14,26 +16,31 @@
14
16
  `killall "iPhone Simulator"`
15
17
 
16
18
 
17
- Find.find($simapp) do |path|
19
+ Find.find($simdir) do |path|
18
20
  if File.basename(path) == "rhorunner.app"
19
21
  $guid = File.basename(File.dirname(path))
20
22
  end
21
23
  end
22
24
 
23
- simrhodes = File.join($simapp,$guid)
24
- rm_rf simrhodes
25
-
26
- mkdir_p File.join(simrhodes,"Documents")
27
- mkdir_p File.join(simrhodes,"Library","Preferences")
25
+ Dir.glob($simdir + '*').each do |sdk|
26
+ simapp = sdk + "/Applications"
27
+ simlink = sdk + "/Library/Preferences"
28
28
 
29
- puts `cp -R -p "rhorunner.app" "#{simrhodes}"`
30
- puts `ln -f -s "#{$simlink}/com.apple.PeoplePicker.plist" "#{simrhodes}/Library/Preferences/com.apple.PeoplePicker.plist"`
31
- puts `ln -f -s "#{$simlink}/.GlobalPreferences.plist" "#{simrhodes}/Library/Preferences/.GlobalPreferences.plist"`
29
+ simrhodes = File.join(simapp,$guid)
30
+ rm_rf simrhodes
32
31
 
33
- puts `echo "#{$applog}" > "#{simrhodes}/Documents/rhologpath.txt"`
32
+ mkdir_p File.join(simrhodes,"Documents")
33
+ mkdir_p File.join(simrhodes,"Library","Preferences")
34
34
 
35
- f = File.new("#{$simapp}/#{$guid}.sb","w")
36
- f << "(version 1)\n(debug deny)\n(allow default)\n"
37
- f.close
35
+ puts `cp -R -p "rhorunner.app" "#{simrhodes}"`
36
+ puts `ln -f -s "#{simlink}/com.apple.PeoplePicker.plist" "#{simrhodes}/Library/Preferences/com.apple.PeoplePicker.plist"`
37
+ puts `ln -f -s "#{simlink}/.GlobalPreferences.plist" "#{simrhodes}/Library/Preferences/.GlobalPreferences.plist"`
38
+
39
+ puts `echo "#{$applog}" > "#{simrhodes}/Documents/rhologpath.txt"`
38
40
 
41
+ f = File.new("#{simapp}/#{$guid}.sb","w")
42
+ f << "(version 1)\n(debug deny)\n(allow default)\n"
43
+ f.close
44
+ end
39
45
  system("open \"#{$sim}/iPhone Simulator.app\"")
46
+
@@ -948,5 +948,12 @@ int rho_base64_decode(const char *src, int srclen, char *dst)
948
948
  return out;
949
949
  }
950
950
 
951
+ void rho_net_request(const char *url)
952
+ {
953
+ rho::common::CAutoPtr<rho::common::IRhoClassFactory> factory = rho::common::createClassFactory();
954
+ rho::common::CAutoPtr<rho::net::INetRequest> request = factory->createNetRequest();
955
+ request->pullData(url, null);
956
+ }
957
+
951
958
  }
952
959
 
@@ -157,6 +157,7 @@ int rho_conf_send_log();
157
157
  int rho_base64_encode(const char *src, int srclen, char *dst);
158
158
  int rho_base64_decode(const char *src, int srclen, char *dst);
159
159
 
160
+ void rho_net_request(const char *url);
160
161
 
161
162
  #ifdef __cplusplus
162
163
  };
@@ -146,6 +146,8 @@ int _open(const char *path, int oflag, va_list arg)
146
146
 
147
147
  case _O_RDONLY: /* read access */
148
148
  fileaccess = GENERIC_READ;
149
+ fileshare = FILE_SHARE_READ;
150
+
149
151
  break;
150
152
  case _O_WRONLY: /* write access */
151
153
  /* giving it read access as well
@@ -60,7 +60,8 @@ public class RhoRuby {
60
60
  {
61
61
  String strMsg = exc.getMessage();
62
62
 
63
- return strMsg != null && strMsg.indexOf("timed out") >= 0 ? RhoRuby.ERR_NOSERVERRESPONSE : RhoRuby.ERR_NETWORK;
63
+ return strMsg != null && (strMsg.indexOf("timed out") >= 0 || strMsg.indexOf("Timed out") >= 0)
64
+ ? RhoRuby.ERR_NOSERVERRESPONSE : RhoRuby.ERR_NETWORK;
64
65
  }
65
66
 
66
67
  return ERR_NONE;
@@ -530,13 +530,13 @@ public class SyncEngine implements NetRequest.IRhoSession
530
530
 
531
531
  String loadSession()throws DBException
532
532
  {
533
- String strRes = "";
533
+ m_strSession = "";
534
534
  IDBResult res = getDB().executeSQL("SELECT session FROM sources WHERE session IS NOT NULL");
535
535
 
536
536
  if ( !res.isEnd() )
537
- strRes = res.getStringByIdx(0);
537
+ m_strSession = res.getStringByIdx(0);
538
538
 
539
- return strRes;
539
+ return m_strSession;
540
540
  }
541
541
 
542
542
  public void logout()throws Exception
@@ -238,7 +238,8 @@ boolean CSyncEngine::resetClientIDByNet(const String& strClientID)//throws Excep
238
238
  strQuery += "&" + CClientRegister::getInstance()->getRegisterBody();
239
239
 
240
240
  NetResponse( resp, getNet().pullData(strUrl+strQuery, this) );
241
- if ( resp.isOK() )
241
+ return resp.isOK();
242
+ /* if ( resp.isOK() )
242
243
  {
243
244
  if ( CClientRegister::getInstance() != null )
244
245
  return CClientRegister::getInstance()->doRegister(*this);
@@ -246,7 +247,7 @@ boolean CSyncEngine::resetClientIDByNet(const String& strClientID)//throws Excep
246
247
  return true;
247
248
  }
248
249
 
249
- return false;
250
+ return false;*/
250
251
  }
251
252
 
252
253
  String CSyncEngine::requestClientIDByNet()
@@ -391,13 +392,13 @@ boolean CSyncEngine::isLoggedIn()
391
392
 
392
393
  String CSyncEngine::loadSession()
393
394
  {
394
- String strRes = "";
395
+ m_strSession = "";
395
396
  DBResult( res , getDB().executeSQL("SELECT session FROM sources WHERE session IS NOT NULL") );
396
397
 
397
398
  if ( !res.isEnd() )
398
- strRes = res.getStringByIdx(0);
399
+ m_strSession = res.getStringByIdx(0);
399
400
 
400
- return strRes;
401
+ return m_strSession;
401
402
  }
402
403
 
403
404
  void CSyncEngine::logout()