@@ -205,22 +205,22 @@ bool SocketClient::CheckAck() {
205205 return success;
206206}
207207
208- bool SocketClient::SendBoardInfo (QJsonObject board_info, QJsonObject bl_version , QJsonObject fw_version ) {
208+ bool SocketClient::SendBoardInfo (QJsonObject board_info, QJsonObject bl_sw_info , QJsonObject fw_sw_info ) {
209209 bool success = Connect ();
210210
211211 if (success) {
212212
213- QJsonObject app_version ;
214- app_version .insert (" app_branch" , GIT_BRANCH );
215- app_version .insert (" app_hash" , GIT_HASH );
216- app_version .insert (" app_tag" , GIT_TAG );
213+ QJsonObject app_sw_info ;
214+ app_sw_info .insert (" app_branch" , GIT_BRANCH );
215+ app_sw_info .insert (" app_hash" , GIT_HASH );
216+ app_sw_info .insert (" app_tag" , GIT_TAG );
217217
218218 QJsonObject packet_object;
219219 packet_object.insert (" header" , kHeaderClientBoardInfo );
220220 packet_object.insert (" board_info" , board_info);
221- packet_object.insert (" bl_version " , bl_version );
222- packet_object.insert (" fw_version " , fw_version );
223- packet_object.insert (" app_version " , app_version );
221+ packet_object.insert (" bl_sw_info " , bl_sw_info );
222+ packet_object.insert (" fw_sw_info " , fw_sw_info );
223+ packet_object.insert (" app_sw_info " , app_sw_info );
224224
225225 success = SendQJsonObject (packet_object);
226226
@@ -234,13 +234,14 @@ bool SocketClient::SendBoardInfo(QJsonObject board_info, QJsonObject bl_version,
234234 return success;
235235}
236236
237- bool SocketClient::ReceiveProductInfo (QJsonObject board_info, QJsonArray& product_info) {
237+ bool SocketClient::ReceiveProductInfo (QJsonObject board_info, QJsonObject bl_sw_info, QJsonArray& product_info, bool & is_secure_communication ) {
238238 bool success = Connect ();
239239
240240 if (success) {
241241 QJsonObject packet_object;
242242 packet_object.insert (" header" , kHeaderClientProductInfo );
243243 packet_object.insert (" board_info" , board_info);
244+ packet_object.insert (" bl_sw_info" , bl_sw_info);
244245
245246 success = SendQJsonObject (packet_object);
246247 }
@@ -259,6 +260,7 @@ bool SocketClient::ReceiveProductInfo(QJsonObject board_info, QJsonArray& produc
259260
260261 if (packet_object.value (" header" ).toString () == kHeaderServerProductInfo ) {
261262 product_info = packet_object.value (" product_info" ).toArray ();
263+ is_secure_communication = packet_object.value (" secure_communication" ).toBool ();
262264 } else {
263265 success = false ;
264266 }
0 commit comments