rhoconnect-client 5.5.18 → 6.0.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70e7838cc028fbe406fe5edfb46a192c0dbbfa6b
4
- data.tar.gz: a12a51d1644ad3a762e04645b9be356fc1daa128
3
+ metadata.gz: f8ac5a11b68ce3ec48e7c600a73c5a88d89b0853
4
+ data.tar.gz: cf10ed2afa9e473316b74a8d1d55c5bdba79d110
5
5
  SHA512:
6
- metadata.gz: c5c8fd314ad7cc61358488b9b2f4f215126f94aceec126b4b0adbdc3c1fb49a9bbe27b3fe2a4e2e98c323e1351b3ac067b0de58a297a112829b76e2361207ef5
7
- data.tar.gz: e6a874bfb89dc2a0b8a2de32ba44c077d2feaa28eacc08c8daa0016e2752b439d78d0c5a68125be9dd6c4f6d2e67b466531399a7daf48864abec2899461a5d91
6
+ metadata.gz: 6bdc3367badec79f88f8b818a5c591f5f5d746abdcb39ea5867f3e8d4252e10c88b14df72aa05b38895d098277e3420017c8ed5df0fe0f1566fcf338b21355ed
7
+ data.tar.gz: cb95f1247d31c1e632dea61750012a3d5d36e104933a7e0e3fff03979cbd5815c0c9691ce7f98b469a3179734ec1705497d9bbaded6761d39f4a530225a56c8a
@@ -134,7 +134,7 @@ CClientRegister::CClientRegister() : m_nPollInterval(POLL_INTERVAL_SECONDS), m_s
134
134
  CClientRegister::~CClientRegister()
135
135
  {
136
136
  doStop();
137
- m_pInstance = null;
137
+ m_pInstance = 0;
138
138
  }
139
139
  void CClientRegister::setRhoconnectCredentials(const String& user, const String& pass, const String& session)
140
140
  {
@@ -209,7 +209,7 @@ void CClientRegister::run()
209
209
  {
210
210
  i++;
211
211
  LOG(INFO)+"Try to (un)register: " + i;
212
- if ( CSyncThread::getInstance() != null )
212
+ if ( CSyncThread::getInstance() != 0 )
213
213
  {
214
214
  EnState state = getState();
215
215
  if ( (stRegister==state) && doRegister(CSyncThread::getSyncEngine()) )
@@ -124,14 +124,14 @@ void CSyncEngine::CSourceOptions::setProperty(int nSrcID, const char* szPropName
124
124
  synchronized(m_mxSrcOptions)
125
125
  {
126
126
  Hashtable<String,String>* phashOptions = m_hashSrcOptions.get(nSrcID);
127
- if ( phashOptions == null )
127
+ if ( phashOptions == 0 )
128
128
  {
129
129
  phashOptions = new Hashtable<String,String>();
130
130
  m_hashSrcOptions.put( nSrcID, phashOptions );
131
131
  }
132
132
 
133
133
  Hashtable<String,String>& hashOptions = *phashOptions;
134
- hashOptions.put(szPropName,szPropValue!=null?szPropValue:"");
134
+ hashOptions.put(szPropName,szPropValue!=0?szPropValue:"");
135
135
  }
136
136
  }
137
137
 
@@ -141,7 +141,7 @@ String CSyncEngine::CSourceOptions::getProperty(int nSrcID, const char* szPropNa
141
141
  synchronized(m_mxSrcOptions)
142
142
  {
143
143
  Hashtable<String,String>* phashOptions = m_hashSrcOptions.get(nSrcID);
144
- if ( phashOptions != null )
144
+ if ( phashOptions != 0 )
145
145
  {
146
146
  Hashtable<String,String>& hashOptions = *phashOptions;
147
147
  res = hashOptions.get(szPropName);
@@ -198,11 +198,11 @@ void CSyncEngine::prepareSync(ESyncState eState, const CSourceID* oSrcID)
198
198
  }else
199
199
  m_nErrCode = RhoAppAdapter.ERR_CLIENTISNOTLOGGEDIN;
200
200
 
201
- CSyncSource* src = null;
202
- if ( oSrcID != null )
201
+ CSyncSource* src = 0;
202
+ if ( oSrcID != 0 )
203
203
  src = findSource(*oSrcID);
204
204
 
205
- if ( src != null )
205
+ if ( src != 0 )
206
206
  {
207
207
  src->m_nErrCode = m_nErrCode;
208
208
  src->m_strError = m_strError;
@@ -217,7 +217,7 @@ void CSyncEngine::prepareSync(ESyncState eState, const CSourceID* oSrcID)
217
217
 
218
218
  void CSyncEngine::doSyncAllSources(const String& strQueryParams, boolean bSyncOnlyChangedSources)
219
219
  {
220
- prepareSync(esSyncAllSources, null);
220
+ prepareSync(esSyncAllSources, 0);
221
221
 
222
222
  if ( isContinueSync() )
223
223
  {
@@ -304,7 +304,7 @@ bool CSyncEngine::recoverSearch(const String& strUrl, const String& strBody, int
304
304
 
305
305
  String strSrcName = oSrcArr.getCurItem().getString("source");
306
306
  CSyncSource* pSrc = findSourceByName(strSrcName);
307
- if ( pSrc == null )
307
+ if ( pSrc == 0 )
308
308
  {
309
309
  LOG(ERROR) + "Sync server send search data for unknown source name:" + strSrcName;
310
310
  errorCode = RhoAppAdapter.ERR_UNEXPECTEDSERVERRESPONSE;
@@ -323,7 +323,7 @@ bool CSyncEngine::recoverSearch(const String& strUrl, const String& strBody, int
323
323
 
324
324
  void CSyncEngine::doSearch(rho::Vector<rho::String>& arSources, String strParams, const String& strFrom, boolean bSearchSyncChanges, int nProgressStep)
325
325
  {
326
- prepareSync(esSearch, null);
326
+ prepareSync(esSearch, 0);
327
327
  if ( !isContinueSync() )
328
328
  {
329
329
  if ( getState() != esExit )
@@ -339,7 +339,7 @@ void CSyncEngine::doSearch(rho::Vector<rho::String>& arSources, String strParams
339
339
  for ( int i = 0; i < (int)arSources.size(); i++ )
340
340
  {
341
341
  CSyncSource* pSrc = findSourceByName(arSources.elementAt(i));
342
- if ( pSrc != null )
342
+ if ( pSrc != 0 )
343
343
  pSrc->syncClientChanges();
344
344
  }
345
345
  }
@@ -374,7 +374,7 @@ void CSyncEngine::doSearch(rho::Vector<rho::String>& arSources, String strParams
374
374
  for ( int i = 0; i < (int)arSources.size(); i++ )
375
375
  {
376
376
  CSyncSource* pSrc = findSourceByName(arSources.elementAt(i));
377
- if ( pSrc != null )
377
+ if ( pSrc != 0 )
378
378
  {
379
379
  String source_token;
380
380
  if ( !pSrc->isTokenFromDB() && pSrc->getToken() > 1 )
@@ -416,7 +416,7 @@ void CSyncEngine::doSearch(rho::Vector<rho::String>& arSources, String strParams
416
416
  continue;
417
417
  }
418
418
 
419
- const char* szData = null;
419
+ const char* szData = 0;
420
420
  if ( strTestResp.length() > 0 )
421
421
  {
422
422
  szData = strTestResp.c_str();
@@ -466,7 +466,7 @@ void CSyncEngine::doSearch(rho::Vector<rho::String>& arSources, String strParams
466
466
 
467
467
  String strSrcName = oSrcArr.getCurItem().getString("source");
468
468
  CSyncSource* pSrc = findSourceByName(strSrcName);
469
- if ( pSrc == null )
469
+ if ( pSrc == 0 )
470
470
  {
471
471
  LOG(ERROR) + "Sync server send search data for unknown source name:" + strSrcName;
472
472
  stopSync();
@@ -487,7 +487,7 @@ void CSyncEngine::doSearch(rho::Vector<rho::String>& arSources, String strParams
487
487
  for ( int i = 0; i < (int)arSources.size(); i++ )
488
488
  {
489
489
  CSyncSource* pSrc = findSourceByName(arSources.elementAt(i));
490
- if ( pSrc != null )
490
+ if ( pSrc != 0 )
491
491
  pSrc->processToken(0);
492
492
  }
493
493
 
@@ -506,7 +506,7 @@ void CSyncEngine::doSearch(rho::Vector<rho::String>& arSources, String strParams
506
506
  for ( int i = 0; i < (int)arSources.size(); i++ )
507
507
  {
508
508
  CSyncSource* pSrc = findSourceByName(arSources.elementAt(i));
509
- if ( pSrc == null )
509
+ if ( pSrc == 0 )
510
510
  continue;
511
511
  CSyncSource& oSrc = *pSrc;
512
512
  oSrc.getDB().executeSQL("UPDATE sources set last_updated=?,last_inserted_size=?,last_deleted_size=?, \
@@ -529,7 +529,7 @@ void CSyncEngine::doSyncSource(const CSourceID& oSrcID, const String& strQueryPa
529
529
  if ( isContinueSync() )
530
530
  {
531
531
  CSyncSource* pSrc = findSource(oSrcID);
532
- if ( pSrc != null )
532
+ if ( pSrc != 0 )
533
533
  {
534
534
  CSyncSource& src = *pSrc;
535
535
  LOG(INFO) +"Started synchronization of the data source: " + src.getName();
@@ -564,7 +564,7 @@ CSyncSource* CSyncEngine::findSource(const CSourceID& oSrcID)
564
564
  return &src;
565
565
  }
566
566
 
567
- return null;
567
+ return 0;
568
568
  }
569
569
 
570
570
  CSyncSource* CSyncEngine::findSourceByName(const String& strSrcName)
@@ -581,7 +581,7 @@ CSyncSource* CSyncEngine::findSourceById(int srcId)
581
581
  return &src;
582
582
  }
583
583
 
584
- return null;
584
+ return 0;
585
585
  }
586
586
 
587
587
 
@@ -609,7 +609,7 @@ void CSyncEngine::loadAllSources()
609
609
  RhoAppAdapter.loadAllSyncSources();
610
610
  else
611
611
  {
612
- NetResponse resp = getNet().pushData( getNet().resolveUrl("/system/loadallsyncsources"), "", null );
612
+ NetResponse resp = getNet().pushData( getNet().resolveUrl("/system/loadallsyncsources"), "", 0 );
613
613
  }
614
614
  }else
615
615
  RhoAppAdapter.loadAllSyncSources();
@@ -748,7 +748,7 @@ void CSyncEngine::processServerSources(String strSources)
748
748
  RhoAppAdapter.loadServerSources(strSources);
749
749
  else
750
750
  {
751
- NetResponse resp = getNet().pushData( getNet().resolveUrl("/system/loadserversources"), strSources, null );
751
+ NetResponse resp = getNet().pushData( getNet().resolveUrl("/system/loadserversources"), strSources, 0 );
752
752
  }
753
753
  }else
754
754
  RhoAppAdapter.loadServerSources(strSources);
@@ -762,7 +762,7 @@ void CSyncEngine::processServerSources(String strSources)
762
762
  boolean CSyncEngine::resetClientIDByNet(const String& strClientID)//throws Exception
763
763
  {
764
764
  NetResponse resp = getNetClientID().doRequest(getProtocol().getClientResetMethod(),
765
- getProtocol().getClientResetUrl(strClientID), getProtocol().getClientResetBody(), this, null );
765
+ getProtocol().getClientResetUrl(strClientID), getProtocol().getClientResetBody(), this, 0 );
766
766
  if ( !resp.isOK() )
767
767
  {
768
768
  m_nErrCode = RhoAppAdapter.getErrorFromResponse(resp);
@@ -777,8 +777,8 @@ String CSyncEngine::requestClientIDByNet()
777
777
  {
778
778
  String clientCreateBody;
779
779
  NetResponse resp = getNetClientID().doRequest(getProtocol().getClientCreateMethod(),
780
- getProtocol().getClientCreateUrl(), "", this, null);
781
- if ( resp.isOK() && resp.getCharData() != null )
780
+ getProtocol().getClientCreateUrl(), "", this, 0);
781
+ if ( resp.isOK() && resp.getCharData() != 0 )
782
782
  {
783
783
  const char* szData = resp.getCharData();
784
784
 
@@ -906,7 +906,7 @@ void CSyncEngine::loadBulkPartition(const String& strPartition )
906
906
  reqHeaders.put(getProtocol().getClientIDHeader(), getClientID());
907
907
  NetResponse resp = getNet().doRequest(getProtocol().getServerBulkDataMethod(), strUrl, strBody, this, &reqHeaders);
908
908
  const char* szData = resp.getCharData();
909
- if ( !resp.isOK() || szData == null || *szData == 0)
909
+ if ( !resp.isOK() || szData == 0 || *szData == 0)
910
910
  {
911
911
  LOG(ERROR) + "Bulk sync failed: server return an error.";
912
912
  stopSync();
@@ -950,7 +950,7 @@ void CSyncEngine::loadBulkPartition(const String& strPartition )
950
950
  String strSqlDataUrl = CFilePath::join(getHostFromUrl(serverUrl), strDataUrl) +strZip;
951
951
  LOG(INFO) + "Bulk sync: download data from server: " + strSqlDataUrl;
952
952
  {
953
- NetResponse resp1 = getNet().pullFile(strSqlDataUrl, fDataName+strZip, this, null, true, false);
953
+ NetResponse resp1 = getNet().pullFile(strSqlDataUrl, fDataName+strZip, this, 0, true, false);
954
954
  if ( !resp1.isOK() )
955
955
  {
956
956
  LOG(ERROR) + "Bulk sync failed: cannot download database file.";
@@ -1057,7 +1057,7 @@ void CSyncEngine::syncAllSources(const String& strQueryParams, boolean bSyncOnly
1057
1057
  }
1058
1058
 
1059
1059
  if ( !isSchemaChanged() && getState() != CSyncEngine::esStop )
1060
- getNotify().fireSyncNotification(null, true, RhoAppAdapter.ERR_NONE, RhoAppAdapter.getMessageText("sync_completed"));
1060
+ getNotify().fireSyncNotification(0, true, RhoAppAdapter.ERR_NONE, RhoAppAdapter.getMessageText("sync_completed"));
1061
1061
  }
1062
1062
 
1063
1063
  void CSyncEngine::login(String name, String password, const CSyncNotification& oNotify)
@@ -1121,7 +1121,7 @@ void CSyncEngine::login(String name, String password, const CSyncNotification& o
1121
1121
  RhoAppAdapter.resetDBOnSyncUserChanged();
1122
1122
  else
1123
1123
  {
1124
- NetResponse resp = getNet().pushData( getNet().resolveUrl("/system/resetDBOnSyncUserChanged"), "", null );
1124
+ NetResponse resp = getNet().pushData( getNet().resolveUrl("/system/resetDBOnSyncUserChanged"), "", 0 );
1125
1125
  }
1126
1126
  }
1127
1127
  }
@@ -73,7 +73,7 @@ void CSyncNotify::addObjectNotify(int nSrcID, const String& strObject)
73
73
  synchronized(m_mxObjectNotify)
74
74
  {
75
75
  Hashtable<String,int>* phashObject = m_hashSrcIDAndObject.get(nSrcID);
76
- if ( phashObject == null )
76
+ if ( phashObject == 0 )
77
77
  {
78
78
  phashObject = new Hashtable<String,int>();
79
79
  m_hashSrcIDAndObject.put( nSrcID, phashObject );
@@ -198,7 +198,7 @@ void CSyncNotify::onObjectChanged(int nSrcID, const String& strObject, int nType
198
198
  processSingleObject();
199
199
 
200
200
  Hashtable<String,int>* phashObject = m_hashSrcIDAndObject.get(nSrcID);
201
- if ( phashObject == null )
201
+ if ( phashObject == 0 )
202
202
  return;
203
203
 
204
204
  Hashtable<String,int>& hashObject = *phashObject;
@@ -212,7 +212,7 @@ void CSyncNotify::addCreateObjectError(int nSrcID, const String& strObject, cons
212
212
  synchronized(m_mxObjectNotify)
213
213
  {
214
214
  Hashtable<String,String>* phashErrors = m_hashCreateObjectErrors.get(nSrcID);
215
- if ( phashErrors == null )
215
+ if ( phashErrors == 0 )
216
216
  {
217
217
  phashErrors = new Hashtable<String,String>();
218
218
  m_hashCreateObjectErrors.put( nSrcID, phashErrors );
@@ -232,7 +232,7 @@ void CSyncNotify::appendCreateObjectErrorInfo(int nSrcID, Hashtable< String, Has
232
232
  Hashtable<String,String>* phashErrors = m_hashCreateObjectErrors.get(nSrcID);
233
233
 
234
234
 
235
- if ( phashErrors == null )
235
+ if ( phashErrors == 0 )
236
236
  return ;
237
237
 
238
238
  Hashtable<String,String>& hashErrors = *phashErrors;
@@ -266,7 +266,7 @@ void CSyncNotify::onSyncSourceEnd( int nSrc, VectorPtr<CSyncSource*>& sources )
266
266
  /* if ( getSync().getState() == CSyncEngine::esStop && src.m_nErrCode != RhoAppAdapter.ERR_NONE )
267
267
  {
268
268
  CSyncNotification* pSN = getSyncNotifyBySrc(&src);
269
- if ( pSN != null )
269
+ if ( pSN != 0 )
270
270
  fireSyncNotification(&src, true, src.m_nErrCode, "");
271
271
  else
272
272
  fireAllSyncNotifications(true, src.m_nErrCode, src.m_strError, "" );
@@ -297,7 +297,7 @@ void CSyncNotify::setSyncNotification(int source_id, CSyncNotification* pNotify
297
297
  }
298
298
 
299
299
  CSyncNotification::CSyncNotification(const apiGenerator::CMethodResult& callbackData, boolean bRemoveAfterFire) :
300
- m_callbackData(callbackData), m_cCallback(null), m_cCallbackData(null), m_bRemoveAfterFire(bRemoveAfterFire)
300
+ m_callbackData(callbackData), m_cCallback(0), m_cCallbackData(0), m_bRemoveAfterFire(bRemoveAfterFire)
301
301
  {
302
302
  // if ( m_callbackData.strUrl.length() > 0 )
303
303
  // m_callbackData.strUrl = RHODESAPPBASE().canonicalizeRhoUrl(m_callbackData.strUrl);
@@ -322,7 +322,7 @@ String CSyncNotification::toString()const
322
322
  }
323
323
 
324
324
  CObjectNotification::CObjectNotification(const apiGenerator::CMethodResult& callbackData) :
325
- m_callbackData(callbackData), m_cCallback(null), m_cCallbackData(null)
325
+ m_callbackData(callbackData), m_cCallback(0), m_cCallbackData(0)
326
326
  {
327
327
  }
328
328
 
@@ -366,7 +366,7 @@ void CSyncNotify::reportSyncStatus(String status, int error, String strDetails)
366
366
  {
367
367
  synchronized(m_mxSyncNotifications)
368
368
  {
369
- if (/*m_syncStatusListener != null && */(isReportingEnabled() || error == RhoAppAdapter.ERR_SYNCVERSION) ) {
369
+ if (/*m_syncStatusListener != 0 && */(isReportingEnabled() || error == RhoAppAdapter.ERR_SYNCVERSION) ) {
370
370
 
371
371
  if ( error == RhoAppAdapter.ERR_SYNCVERSION )
372
372
  {
@@ -402,7 +402,7 @@ void CSyncNotify::fireBulkSyncNotification( boolean bFinish, String status, Stri
402
402
  params.put("bulk_status",status);
403
403
  params.put("sync_type","bulk");
404
404
 
405
- doFireSyncNotification( null, bFinish, nErrCode, "", &params, 0 );
405
+ doFireSyncNotification( 0, bFinish, nErrCode, "", &params, 0 );
406
406
  }
407
407
 
408
408
 
@@ -413,9 +413,9 @@ void CSyncNotify::fireAllSyncNotifications( boolean bFinish, int nErrCode, Strin
413
413
 
414
414
  synchronized(m_mxSyncNotifications)
415
415
  {
416
- CSyncNotification* pSN = getSyncNotifyBySrc(null);
417
- if ( pSN != null )
418
- doFireSyncNotification( null, bFinish, nErrCode, strError, 0, 0/*strServerError*/ );
416
+ CSyncNotification* pSN = getSyncNotifyBySrc(0);
417
+ if ( pSN != 0 )
418
+ doFireSyncNotification( 0, bFinish, nErrCode, strError, 0, 0/*strServerError*/ );
419
419
  }
420
420
  }
421
421
 
@@ -429,10 +429,10 @@ void CSyncNotify::fireSyncNotification( CSyncSource* src, boolean bFinish, int n
429
429
  {
430
430
  if ( !getSync().isSearch() )
431
431
  {
432
- if ( src != null && strMessage.length() == 0 )
432
+ if ( src != 0 && strMessage.length() == 0 )
433
433
  strMessage = RhoAppAdapter.getMessageText("sync_failed_for") + (*src).getName() + ".";
434
434
 
435
- reportSyncStatus(strMessage,nErrCode, (src != null ? (*src).m_strError : "") );
435
+ reportSyncStatus(strMessage,nErrCode, (src != 0 ? (*src).m_strError : "") );
436
436
  }
437
437
  }
438
438
 
@@ -441,22 +441,22 @@ void CSyncNotify::fireSyncNotification( CSyncSource* src, boolean bFinish, int n
441
441
 
442
442
  CSyncNotification* CSyncNotify::getSyncNotifyBySrc(CSyncSource* src)
443
443
  {
444
- CSyncNotification* pSN = null;
444
+ CSyncNotification* pSN = 0;
445
445
  if ( getSync().isSearch() )
446
446
  pSN = m_pSearchNotification;
447
447
  else
448
448
  {
449
- if ( src != null )
449
+ if ( src != 0 )
450
450
  pSN = m_mapSyncNotifications.get( (*src).getID());
451
451
 
452
- if ( pSN == null )
452
+ if ( pSN == 0 )
453
453
  pSN = m_pAllNotification;
454
454
  }
455
455
 
456
- if ( pSN == null && !getSync().isNoThreadedMode() )
457
- return null;
456
+ if ( pSN == 0 && !getSync().isNoThreadedMode() )
457
+ return 0;
458
458
 
459
- return pSN != null ? pSN : &m_emptyNotify;
459
+ return pSN != 0 ? pSN : &m_emptyNotify;
460
460
  }
461
461
 
462
462
  void CSyncNotify::fireSyncNotification2( CSyncSource* src, boolean bFinish, int nErrCode, const Hashtable<String,String>& serverErrors)
@@ -479,7 +479,7 @@ void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int
479
479
  synchronized(m_mxSyncNotifications)
480
480
  {
481
481
  pSN = getSyncNotifyBySrc(src);
482
- if ( pSN == null )
482
+ if ( pSN == 0 )
483
483
  return;
484
484
 
485
485
  if ( params != 0 ) {
@@ -488,7 +488,7 @@ void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int
488
488
  result.put("sync_type","incremental");
489
489
  }
490
490
 
491
- if ( src != null )
491
+ if ( src != 0 )
492
492
  {
493
493
  result.put("total_count", convertToStringA( (*src).getTotalCount()));
494
494
  result.put("processed_count", convertToStringA( (*src).getTotalCount()));
@@ -505,7 +505,7 @@ void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int
505
505
  if ( getSync().isSchemaChanged() )
506
506
  status = "schema_changed";
507
507
  else
508
- status = (src == null && ( (params==0) || params->size()==0 ) ) ? "complete" : "ok";
508
+ status = (src == 0 && ( (params==0) || params->size()==0 ) ) ? "complete" : "ok";
509
509
  }
510
510
  else
511
511
  {
@@ -519,7 +519,7 @@ void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int
519
519
  String error;
520
520
  if ( strError.length() > 0 ) {
521
521
  error = strError;
522
- } else if ( src != null ) {
522
+ } else if ( src != 0 ) {
523
523
  error = (*src).m_strError;
524
524
  }
525
525
 
@@ -530,7 +530,7 @@ void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int
530
530
  }
531
531
  }
532
532
 
533
- if ( src != null ) {
533
+ if ( src != 0 ) {
534
534
  appendCreateObjectErrorInfo( (*src).getID(), errorsL2 );
535
535
  }
536
536
  } else {
@@ -542,7 +542,7 @@ void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int
542
542
  bRemoveAfterFire = bRemoveAfterFire && pSN->m_bRemoveAfterFire;
543
543
  }
544
544
  }
545
- LOG(INFO) + "Fire notification. Source : " + (src != null ? (*src).getName():"") + "; " + pSN->toString();
545
+ LOG(INFO) + "Fire notification. Source : " + (src != 0 ? (*src).getName():"") + "; " + pSN->toString();
546
546
 
547
547
  if ( callNotify(*pSN, result, &errorsL2 ) || bRemoveAfterFire)
548
548
  clearNotification(src);
@@ -660,13 +660,13 @@ boolean CSyncNotify::callNotify(const CSyncNotification& oNotify, const Hashtabl
660
660
 
661
661
  void CSyncNotify::clearNotification(CSyncSource* src)
662
662
  {
663
- LOG(INFO) + "Clear notification. Source : " + (src != null ? (*src).getName() : "");
663
+ LOG(INFO) + "Clear notification. Source : " + (src != 0 ? (*src).getName() : "");
664
664
 
665
665
  synchronized(m_mxSyncNotifications)
666
666
  {
667
667
  if ( getSync().isSearch() )
668
- m_pSearchNotification = null;
669
- else if ( src != null )
668
+ m_pSearchNotification = 0;
669
+ else if ( src != 0 )
670
670
  m_mapSyncNotifications.remove( (*src).getID());
671
671
  }
672
672
  }
@@ -678,7 +678,7 @@ void CSyncNotify::clearSyncNotification(int source_id)
678
678
  synchronized(m_mxSyncNotifications)
679
679
  {
680
680
  if ( source_id == -1 )//Clear all
681
- m_pAllNotification = null;
681
+ m_pAllNotification = 0;
682
682
  else
683
683
  m_mapSyncNotifications.remove(source_id);
684
684
  }
@@ -664,7 +664,7 @@ void CSyncSource::syncServerChanges()
664
664
  continue;
665
665
  }
666
666
 
667
- const char* szData = null;
667
+ const char* szData = 0;
668
668
  String strTestResp = getSync().getSourceOptions().getProperty(getID(), "rho_server_response");
669
669
  if ( strTestResp.length() > 0 )
670
670
  {
@@ -700,10 +700,10 @@ void CSyncSource::processServerErrors(CJSONEntry& oCmds)
700
700
  {
701
701
  Hashtable<String, String> errors;
702
702
 
703
- const char* arErrTypes[] = {"source-error", "search-error", "create-error", "update-error", "delete-error", "update-rollback", null};
703
+ const char* arErrTypes[] = {"source-error", "search-error", "create-error", "update-error", "delete-error", "update-rollback", 0};
704
704
  for( int i = 0; ; i++ )
705
705
  {
706
- if ( arErrTypes[i] == null )
706
+ if ( arErrTypes[i] == 0 )
707
707
  break;
708
708
  if ( !oCmds.hasName(arErrTypes[i]) )
709
709
  continue;
@@ -1154,7 +1154,7 @@ void CSyncSource::processAssociations(const String& strOldObject, const String&
1154
1154
  for ( int i = 0; i < (int)m_arAssociations.size(); i++ )
1155
1155
  {
1156
1156
  CSyncSource* pSrc = getSync().findSourceByName(m_arAssociations.elementAt(i).m_strSrcName);
1157
- if ( pSrc != null )
1157
+ if ( pSrc != 0 )
1158
1158
  pSrc->updateAssociation(strOldObject, strNewObject, m_arAssociations.elementAt(i).m_strAttrib);
1159
1159
  }
1160
1160
  }
@@ -1653,13 +1653,13 @@ boolean CSyncSource::downloadBlob(CAttrValue& value)//throws Exception
1653
1653
  LOG(TRACE) + "Download blob: " + url + " => " + fName;
1654
1654
 
1655
1655
  const char* nQuest = strchr(url.c_str(),'?');
1656
- if ( nQuest > 0 )
1656
+ if ( nQuest != NULL )
1657
1657
  url += "&";
1658
1658
  else
1659
1659
  url += "?";
1660
1660
  url += "client_id=" + getSync().getClientID();
1661
1661
 
1662
- NetResponse resp = getNet().pullFile(url, fName, &getSync(), null, true, false);
1662
+ NetResponse resp = getNet().pullFile(url, fName, &getSync(), 0, true, false);
1663
1663
  if ( !resp.isOK() )
1664
1664
  {
1665
1665
  CRhoFile::deleteFile(fName.c_str());
@@ -0,0 +1,41 @@
1
+
2
+ # Class with around building things
3
+ class JakeRCC
4
+
5
+
6
+ def self.run3_dont_fail(command, cd = nil, env = {})
7
+ set_list = []
8
+ env.each_pair do |k, v|
9
+ if RUBY_PLATFORM =~ /(win|w)32$/
10
+ set_list << "set \"#{k}=#{v}\"&&"
11
+ else
12
+ set_list << "export #{k}=#{v}&&"
13
+ end
14
+ end
15
+
16
+ to_print = "CMD: #{command}"
17
+ to_run = set_list.join('') + command
18
+ if !cd.nil?
19
+ to_print = "PWD: #{cd}\n#{to_print}"
20
+
21
+ if RUBY_PLATFORM =~ /(win|w)32$/
22
+ cd_ = cd.gsub('/', "\\")
23
+ to_run = "cd /d \"#{cd_}\"&&#{to_run}"
24
+ else
25
+ to_run = "cd '#{cd}'&&#{to_run}"
26
+ end
27
+ end
28
+
29
+ if !env.nil?
30
+ to_print = "ENV: #{env}\n#{to_print}"
31
+ end
32
+
33
+ system(to_run)
34
+ end
35
+
36
+ def self.run3(command, cd = nil, env = {})
37
+ fail "[#{command}]" unless self.run3_dont_fail(command, cd, env)
38
+ end
39
+
40
+
41
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhoconnect-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.18
4
+ version: 6.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rhomobile Dev Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-26 00:00:00.000000000 Z
11
+ date: 2017-10-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: RhoConnect client extension
14
14
  email: rhomobile@googlegroups.com
@@ -60,6 +60,7 @@ files:
60
60
  - "./ext/rhoconnect-client/ext/shared/sync/SyncSource.h"
61
61
  - "./ext/rhoconnect-client/ext/shared/sync/SyncThread.cpp"
62
62
  - "./ext/rhoconnect-client/ext/shared/sync/SyncThread.h"
63
+ - "./lib/build/jakercc.rb"
63
64
  - "./lib/build/run_rhoconnect_spec.rb"
64
65
  - "./lib/rhoconnect-client.rb"
65
66
  - "./platform/shared/RhoConnectClient/RhoConnectClient.cpp"