rhoconnect-client 5.5.2 → 5.5.15

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: 2d85fe275d20b5e252bc6a2c8a1fa47c07f64e7f
4
- data.tar.gz: 083ae8b533f16f59ba9f15111c0176c8a7312f95
3
+ metadata.gz: b5869ebe10a85d3053d6329261a284194f517820
4
+ data.tar.gz: b68d84b90dc53b59dbfa30926fd7fdd40cbdf40e
5
5
  SHA512:
6
- metadata.gz: e3b2bc0337f2a50eedbdaf2b0345a2155bdf30737c84f67cfdfe2d5a75f309feec3e8d6fdeaf7143f276b9121ef0b0cb2eb6a1fc027817df4df40d8c2a7a33de
7
- data.tar.gz: 8b80b3e17e5e8225aed80f1ef38732560a5285f9f9c4878a6566513300efbe8af1ad5c93a62d2fda443cd90c555b5b9062082c04a1b1f5c49b3113c01431007f
6
+ metadata.gz: 7ae37c2b91b684e5178c9f854ba4ec2ddb751f9dde49a2650b12c6ec52d04d5640816dd8564d91998d18c7dd6bad3e61d2ec747b1746b3bd5007ca56c9bd49eb
7
+ data.tar.gz: 3251fd5755d925338d2f86b67f460bc1ceca3d2d63ac5b63a221edf8392049aa2ff734507210b76b61d626bc6e574e9c4d46bafa8dd75df6c115bb6d636033ee
@@ -239,9 +239,12 @@ String CClientRegister::getRegisterBody(const String& strClientID)
239
239
 
240
240
  int port = RHOCONF().getInt("push_port");
241
241
 
242
+ String appId = RHOCONF().getString("rho_app_id");
243
+ String appVer = RHOCONF().getString("app_version");
244
+
242
245
  String body = CSyncThread::getSyncEngine().getProtocol().getClientRegisterBody( strClientID, m_strDevicePin,
243
246
  port > 0 ? port : DEFAULT_PUSH_PORT, rho_rhodesapp_getplatform(), rho::System::getPhoneId(),
244
- strPushType);
247
+ strPushType, appId, appVer);
245
248
 
246
249
  LOG(INFO)+"getRegisterBody() BODY is: " + body;
247
250
  return body;
@@ -249,7 +252,7 @@ String CClientRegister::getRegisterBody(const String& strClientID)
249
252
 
250
253
  String CClientRegister::getUnregisterBody(const String& strClientID)
251
254
  {
252
- String body = CSyncThread::getSyncEngine().getProtocol().getClientRegisterBody( strClientID, "", 0, "", "", "" );
255
+ String body = CSyncThread::getSyncEngine().getProtocol().getClientRegisterBody( strClientID, "", 0, "", "", "", "", "" );
253
256
  LOG(INFO)+"getUnregisterBody() BODY is: " + body;
254
257
  return body;
255
258
  }
@@ -279,19 +282,21 @@ boolean CClientRegister::doRegister(CSyncEngine& oSync)
279
282
  LOG(WARNING)+"Sync client_id is empty, do register later";
280
283
  return false;
281
284
  }
282
-
283
- IDBResult res = CDBAdapter::getUserDB().executeSQL("SELECT token,token_sent from client_info");
284
- if ( !res.isEnd() ) {
285
- String token = res.getStringByIdx(0);
286
- int token_sent = res.getIntByIdx(1) && !RHOCONF().getBool("register_push_at_startup");
287
-
288
- if ( m_strDevicePin.compare(token) == 0 && token_sent > 0 )
289
- {
290
- //token in db same as new one and it was already send to the server
291
- //so we do nothing
285
+ {
286
+ // IDBResult hold mutex of DB - we should free it ASAP
287
+ IDBResult res = CDBAdapter::getUserDB().executeSQL("SELECT token,token_sent from client_info");
288
+ if ( !res.isEnd() ) {
289
+ String token = res.getStringByIdx(0);
290
+ int token_sent = res.getIntByIdx(1) && !RHOCONF().getBool("register_push_at_startup");
292
291
 
293
- return true;
294
- }
292
+ if ( m_strDevicePin.compare(token) == 0 && token_sent > 0 )
293
+ {
294
+ //token in db same as new one and it was already send to the server
295
+ //so we do nothing
296
+
297
+ return true;
298
+ }
299
+ }
295
300
  }
296
301
 
297
302
  String strBody = getRegisterBody(client_id);
@@ -68,7 +68,7 @@ struct ISyncProtocol
68
68
  virtual String getClientCreateUrl() = 0;
69
69
 
70
70
  virtual String getClientRegisterUrl(const String& strClientID) = 0;
71
- virtual String getClientRegisterBody(const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType = "") = 0;
71
+ virtual String getClientRegisterBody(const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType = "", const String& strAppId = "", const String& strAppVersion = "") = 0;
72
72
  virtual String getClientAnsRegisterBody(const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID ) = 0;
73
73
 
74
74
  virtual const char* getClientResetMethod() = 0;
@@ -98,7 +98,7 @@ struct CSyncProtocol_3 : public ISyncProtocol
98
98
  return RHOCONF().getPath("syncserver") + "clientregister";
99
99
  }
100
100
 
101
- String getClientRegisterBody( const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType)
101
+ String getClientRegisterBody( const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType, const String&, const String&)
102
102
  {
103
103
  return "{\"client_id\":" + json::CJSONEntry::quoteValue(strClientID) +
104
104
  ",\"device_pin\":" + json::CJSONEntry::quoteValue(strPin) +
@@ -121,7 +121,16 @@ struct CSyncProtocol_4 : public ISyncProtocol
121
121
  return RHOCONF().getPath("syncserver") + getClientNamespaceUrl() + strClientID + "/register";
122
122
  }
123
123
 
124
- String getClientRegisterBody( const String& /*strClientID*/, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType)
124
+ String getClientRegisterBody(
125
+ const String& /*strClientID*/,
126
+ const String& strPin,
127
+ int nPort,
128
+ const String& strType,
129
+ const String& strPhoneID,
130
+ const String& strDevicePushType,
131
+ const String& strAppId,
132
+ const String& strAppVersion
133
+ )
125
134
  {
126
135
  String strPort = "";
127
136
  if (nPort != 0) {
@@ -133,6 +142,8 @@ struct CSyncProtocol_4 : public ISyncProtocol
133
142
  ",\"device_port\":" + json::CJSONEntry::quoteValue(strPort) +
134
143
  ",\"device_type\":" + json::CJSONEntry::quoteValue(strType) +
135
144
  ",\"device_push_type\":" + json::CJSONEntry::quoteValue(strDevicePushType) +
145
+ ",\"device_app_id\":" + json::CJSONEntry::quoteValue(strAppId) +
146
+ ",\"device_app_version\":" + json::CJSONEntry::quoteValue(strAppVersion) +
136
147
  "}";
137
148
  }
138
149
 
@@ -327,7 +327,13 @@ void CSyncSource::doSyncClientChanges()
327
327
  int i = 0;
328
328
 
329
329
  getDB().Lock();
330
+
331
+ // add file.blob attrib_type for blob attribs in changed_values
332
+ getDB().updateAllBlobAttribChanges();
333
+
334
+ // unpack object in changed_values with update_type==create to set of objects's attribs
330
335
  getDB().updateAllAttribChanges();
336
+
331
337
  checkIgnorePushObjects();
332
338
  if ( getSync().getSourceOptions().getBoolProperty(getID(), "full_update") )
333
339
  getDB().updateFullUpdateChanges( getID() );
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.2
4
+ version: 5.5.15
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: 2016-12-19 00:00:00.000000000 Z
11
+ date: 2017-03-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: RhoConnect client extension
14
14
  email: rhomobile@googlegroups.com