platform/shared/sync/SyncProtocol_3.h in rhodes-3.3.5 vs platform/shared/sync/SyncProtocol_3.h in rhodes-3.4.2
- old
+ new
@@ -64,16 +64,28 @@
String getClientRegisterUrl()
{
return RHOCONF().getPath("syncserver") + "clientregister";
}
- String getClientRegisterBody( const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID )
+ String getClientRegisterBody( const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType)
{
return "{\"client_id\":" + json::CJSONEntry::quoteValue(strClientID) +
",\"device_pin\":" + json::CJSONEntry::quoteValue(strPin) +
( strPhoneID.length() > 0 ? ",\"phone_id\":" + json::CJSONEntry::quoteValue(strPhoneID) : "") +
",\"device_port\":" + json::CJSONEntry::quoteValue(common::convertToStringA(nPort)) +
- ",\"device_type\":" + json::CJSONEntry::quoteValue(strType) + "}";
+ ",\"device_type\":" + json::CJSONEntry::quoteValue(strType) +
+ ((strDevicePushType.length() > 0) ? (",\"device_push_type\":" + json::CJSONEntry::quoteValue(strDevicePushType)) : String("")) +
+ "}";
+ }
+
+ String getClientAnsRegisterBody( const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID )
+ {
+ return "{\"client_id\":" + json::CJSONEntry::quoteValue(strClientID) +
+ ",\"device_pin\":" + json::CJSONEntry::quoteValue(strPin) +
+ ( strPhoneID.length() > 0 ? ",\"phone_id\":" + json::CJSONEntry::quoteValue(strPhoneID) : "") +
+ ",\"device_port\":" + json::CJSONEntry::quoteValue(common::convertToStringA(nPort)) +
+ ",\"device_type\":" + json::CJSONEntry::quoteValue(strType) +
+ ",\"device_push_type\":\"rhoconnect_push\"}";
}
String getClientResetUrl(const String& strClientID)
{
String strUrl = RHOCONF().getPath("syncserver") + "clientreset?client_id=" + strClientID;