rhoconnect-client 5.5.0.7 → 5.5.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rhoconnect-client/ext/shared/sync/ClientRegister.cpp +19 -14
- data/ext/rhoconnect-client/ext/shared/sync/ISyncProtocol.h +1 -1
- data/ext/rhoconnect-client/ext/shared/sync/SyncProtocol_3.h +1 -1
- data/ext/rhoconnect-client/ext/shared/sync/SyncProtocol_4.h +12 -1
- data/ext/rhoconnect-client/ext/shared/sync/SyncSource.cpp +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1649ea6e6973ba6ead0b9412ab38b019daf6dba7
|
4
|
+
data.tar.gz: 27fc3a52c886d4829edf1a16bba3ac0344ce8fda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e621d6647ec50742683608bfed45f758b5c604bb5d011ab8a86358a52440e35fb6092869de6077ae3948f91f453bc41e3db0e5f726b07568bd1d245cdf765a4f
|
7
|
+
data.tar.gz: b7ebaaf15c8f75e74e13c45161387f231fc1ca950698c1c3680b615993d8cebcad3f2f0a096f2c92b6174cbc711245005c5de28d01ef255e1288d9d4274e6f9d
|
@@ -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
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
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
|
-
|
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(
|
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.0.
|
4
|
+
version: 5.5.0.22
|
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:
|
11
|
+
date: 2017-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: RhoConnect client extension
|
14
14
|
email: rhomobile@googlegroups.com
|