/ohos5.0/foundation/communication/dsoftbus/core/common/dfx/statistics/instant/ |
H A D | wifi_statistic.cpp | 63 (void)AddNumberToJsonObject(staJson, "IsStaExist", 0); in GetStaInfo() 67 (void)AddNumberToJsonObject(staJson, "IsStaExist", 1); in GetStaInfo() 71 (void)AddNumberToJsonObject(staJson, "Freq", wifiLinkedInfo.frequency); in GetStaInfo() 72 (void)AddNumberToJsonObject(staJson, "chload", wifiLinkedInfo.chload); in GetStaInfo() 93 (void)AddNumberToJsonObject(softApJson, "IsSoftApExist", 0); in GetSoftApInfo() 97 (void)AddNumberToJsonObject(softApJson, "IsSoftApExist", 1); in GetSoftApInfo() 103 (void)AddNumberToJsonObject(softApJson, "StaNum", 0); in GetSoftApInfo() 107 (void)AddNumberToJsonObject(softApJson, "StaNum", stationList.size()); in GetSoftApInfo() 135 (void)AddNumberToJsonObject(p2pJson, "IsP2PExist", 0); in GetP2PInfo() 139 (void)AddNumberToJsonObject(p2pJson, "IsP2PExist", 1); in GetP2PInfo() [all …]
|
H A D | instant_statistics.cpp | 773 (void)AddNumberToJsonObject(json, "channelNum", remoteInfo->channelNum); in InstPackRemoteBasicInfo() 774 (void)AddNumberToJsonObject(json, "p2pRole", remoteInfo->p2pRole); in InstPackRemoteBasicInfo() 775 (void)AddNumberToJsonObject(json, "p2pFreq", remoteInfo->p2pFreq); in InstPackRemoteBasicInfo() 776 (void)AddNumberToJsonObject(json, "hmlFreq", remoteInfo->hmlFreq); in InstPackRemoteBasicInfo() 777 (void)AddNumberToJsonObject(json, "staFreq", remoteInfo->staFreq); in InstPackRemoteBasicInfo() 778 (void)AddNumberToJsonObject(json, "p2pLinkState", remoteInfo->p2pLinkState); in InstPackRemoteBasicInfo() 801 (void)AddNumberToJsonObject(channelJson, "appType", channelInfo->appType); in InstPackChannelInfo() 804 (void)AddNumberToJsonObject(channelJson, "status", channelInfo->status); in InstPackChannelInfo() 892 (void)AddNumberToJsonObject(json, "Bus_center_fault", ret); in InstGetRemoteInfo() 909 (void)AddNumberToJsonObject(json, "radarId", radarId); in InstGetAllInfo() [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/transmission/trans_channel/udp_negotiation/src/ |
H A D | trans_udp_negotiation_exchange.c | 202 (void)AddNumberToJsonObject(msg, "CODE", getCodeType(appInfo)); in TransPackRequestUdpInfo() 204 (void)AddNumberToJsonObject(msg, "UID", appInfo->myData.uid); in TransPackRequestUdpInfo() 205 (void)AddNumberToJsonObject(msg, "PID", appInfo->myData.pid); in TransPackRequestUdpInfo() 207 (void)AddNumberToJsonObject(msg, "STREAM_TYPE", appInfo->streamType); in TransPackRequestUdpInfo() 209 (void)AddNumberToJsonObject(msg, "UDP_CONN_TYPE", appInfo->udpConnType); in TransPackRequestUdpInfo() 240 (void)AddNumberToJsonObject(msg, "CODE", getCodeType(appInfo)); in TransPackReplyUdpInfo() 242 (void)AddNumberToJsonObject(msg, "UID", appInfo->myData.uid); in TransPackReplyUdpInfo() 243 (void)AddNumberToJsonObject(msg, "PID", appInfo->myData.pid); in TransPackReplyUdpInfo() 245 (void)AddNumberToJsonObject(msg, "STREAM_TYPE", appInfo->streamType); in TransPackReplyUdpInfo() 258 (void)AddNumberToJsonObject(msg, CODE, CODE_EXCHANGE_UDP_INFO); in TransPackReplyErrInfo() [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/transmission/common/src/ |
H A D | softbus_message_open_channel.c | 41 if (!AddNumberToJsonObject(json, CODE, CODE_OPEN_CHANNEL) || in PackError() 42 !AddNumberToJsonObject(json, ERR_CODE, errCode) || in PackError() 100 if (!AddNumberToJsonObject(json, CODE, CODE_OPEN_CHANNEL) || in JsonObjectPackRequestEx() 104 !AddNumberToJsonObject(json, UID, appInfo->myData.uid) || in JsonObjectPackRequestEx() 105 !AddNumberToJsonObject(json, PID, appInfo->myData.pid) || in JsonObjectPackRequestEx() 115 !AddNumberToJsonObject(json, MSG_ROUTE_TYPE, appInfo->routeType))) { in JsonObjectPackRequestEx() 118 (void)AddNumberToJsonObject(json, BUSINESS_TYPE, appInfo->businessType); in JsonObjectPackRequestEx() 119 (void)AddNumberToJsonObject(json, AUTO_CLOSE_TIME, appInfo->autoCloseTime); in JsonObjectPackRequestEx() 121 (void)AddNumberToJsonObject(json, MY_HANDLE_ID, appInfo->myHandleId); in JsonObjectPackRequestEx() 122 (void)AddNumberToJsonObject(json, PEER_HANDLE_ID, appInfo->peerHandleId); in JsonObjectPackRequestEx() [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/transmission/trans_channel/auth/src/ |
H A D | trans_auth_message.c | 39 if (!AddNumberToJsonObject(msg, "CODE", CODE_OPEN_AUTH_MSG_CHANNEL) || in TransAuthChannelMsgPack() 46 !AddNumberToJsonObject(msg, "MTU_SIZE", (int32_t)appInfo->myData.dataConfig) || in TransAuthChannelMsgPack() 47 !AddNumberToJsonObject(msg, "ROUTE_TYPE", (int32_t)appInfo->routeType)) { in TransAuthChannelMsgPack() 52 if (!AddNumberToJsonObject(msg, "LANE_LINK_TYPE", appInfo->linkType) || in TransAuthChannelMsgPack() 120 if (!AddNumberToJsonObject(obj, "CODE", CODE_OPEN_AUTH_MSG_CHANNEL) || in TransAuthChannelErrorPack() 121 !AddNumberToJsonObject(obj, "ERR_CODE", errcode) || in TransAuthChannelErrorPack()
|
/ohos5.0/foundation/communication/dsoftbus/core/transmission/trans_channel/tcp_direct/src/ |
H A D | trans_tcp_direct_json.c | 42 if (!AddNumberToJsonObject(json, MSG_CODE, code) || in VerifyP2pPackError() 43 !AddNumberToJsonObject(json, ERR_CODE, errCode) || in VerifyP2pPackError() 67 if (!AddNumberToJsonObject(json, MSG_CODE, CODE_VERIFY_P2P) || in VerifyP2pPack() 69 !AddNumberToJsonObject(json, P2P_PORT, myPort)) { in VerifyP2pPack()
|
/ohos5.0/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/ |
H A D | softbus_proxychannel_message.c | 433 if (!AddNumberToJsonObject(root, JSON_KEY_UID, appInfo->myData.uid) || in PackHandshakeMsgForNormal() 434 !AddNumberToJsonObject(root, JSON_KEY_PID, appInfo->myData.pid) || in PackHandshakeMsgForNormal() 440 if (!AddNumberToJsonObject(root, JSON_KEY_ENCRYPT, appInfo->encrypt) || in PackHandshakeMsgForNormal() 441 !AddNumberToJsonObject(root, JSON_KEY_ALGORITHM, appInfo->algorithm) || in PackHandshakeMsgForNormal() 442 !AddNumberToJsonObject(root, JSON_KEY_CRC, appInfo->crc)) { in PackHandshakeMsgForNormal() 468 if (!AddNumberToJsonObject(root, ERR_CODE, errCode)) { in TransProxyPackHandshakeErrMsg() 491 if (!AddNumberToJsonObject(root, JSON_KEY_TYPE, appInfo->appType) || in TransProxyPackHandshakeMsg() 561 if (!AddNumberToJsonObject(root, JSON_KEY_UID, appInfo->myData.uid) || in TransProxyPackHandshakeAckMsg() 562 !AddNumberToJsonObject(root, JSON_KEY_PID, appInfo->myData.pid) || in TransProxyPackHandshakeAckMsg() 564 !AddNumberToJsonObject(root, JSON_KEY_ENCRYPT, appInfo->encrypt) || in TransProxyPackHandshakeAckMsg() [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/connection/br/src/ |
H A D | softbus_conn_br_trans.c | 157 if (!AddNumberToJsonObject(json, KEY_METHOD, BR_METHOD_NOTIFY_REQUEST) || in SerializeByJson() 158 !AddNumberToJsonObject(json, KEY_DELTA, ctx.referenceRequest.delta) || in SerializeByJson() 159 !AddNumberToJsonObject(json, KEY_REFERENCE_NUM, ctx.referenceRequest.referenceNumber)) { in SerializeByJson() 164 if (!AddNumberToJsonObject(json, KEY_METHOD, BR_METHOD_NOTIFY_RESPONSE) || in SerializeByJson() 165 … !AddNumberToJsonObject(json, KEY_REFERENCE_NUM, ctx.referenceResponse.referenceNumber)) { in SerializeByJson() 170 if (!AddNumberToJsonObject(json, KEY_METHOD, BR_METHOD_NOTIFY_ACK) || in SerializeByJson() 171 !AddNumberToJsonObject(json, KEY_WINDOWS, ctx.ackRequestResponse.window) || in SerializeByJson() 177 if (!AddNumberToJsonObject(json, KEY_METHOD, BR_METHOD_ACK_RESPONSE) || in SerializeByJson() 178 !AddNumberToJsonObject(json, KEY_WINDOWS, ctx.ackRequestResponse.window) || in SerializeByJson()
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/connection/ble/mock/ |
H A D | connection_ble_trans_mock.cpp | 50 bool AddNumberToJsonObject(cJSON *json, const char *const string, int32_t num) in AddNumberToJsonObject() function 52 return GetConnectionBleTransInterface()->AddNumberToJsonObject(json, string, num); in AddNumberToJsonObject()
|
H A D | connection_ble_trans_mock.h | 32 virtual bool AddNumberToJsonObject(cJSON *json, const char *const string, int32_t num) = 0; 45 MOCK_METHOD(bool, AddNumberToJsonObject, (cJSON *, const char *const, int32_t), (override));
|
H A D | connection_ble_mock.cpp | 39 bool AddNumberToJsonObject(cJSON *json, const char * const string, int num) in AddNumberToJsonObject() function 41 return GetConnectionBleInterface()->AddNumberToJsonObject(json, string, num); in AddNumberToJsonObject()
|
H A D | connection_ble_mock.h | 38 virtual bool AddNumberToJsonObject(cJSON *json, const char * const string, int num) = 0; 57 MOCK_METHOD3(AddNumberToJsonObject, bool (cJSON *, const char * const, int));
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/connection/br/ |
H A D | connection_br_mock.cpp | 49 bool AddNumberToJsonObject(cJSON *json, const char * const string, int num) in AddNumberToJsonObject() function 51 return GetConnectionBrInterface()->AddNumberToJsonObject(json, string, num); in AddNumberToJsonObject()
|
H A D | connection_br_mock.h | 34 virtual bool AddNumberToJsonObject(cJSON *json, const char * const string, int num) = 0; 47 MOCK_METHOD3(AddNumberToJsonObject, bool (cJSON *, const char * const, int));
|
H A D | connection_br_test.cpp | 680 EXPECT_CALL(brMock, AddNumberToJsonObject).WillRepeatedly(Return(false)); 686 EXPECT_CALL(brMock, AddNumberToJsonObject).WillRepeatedly(Return(true)); 843 EXPECT_CALL(brMock, AddNumberToJsonObject).WillRepeatedly(Return(true)); 850 EXPECT_CALL(brMock, AddNumberToJsonObject).WillRepeatedly(Return(false)); 856 EXPECT_CALL(brMock, AddNumberToJsonObject).WillRepeatedly(Return(false)); 862 EXPECT_CALL(brMock, AddNumberToJsonObject).WillRepeatedly(Return(false)); 868 EXPECT_CALL(brMock, AddNumberToJsonObject).WillRepeatedly(Return(false)); 874 EXPECT_CALL(brMock, AddNumberToJsonObject).WillRepeatedly(Return(false));
|
/ohos5.0/foundation/communication/dsoftbus/sdk/transmission/trans_channel/statistics/src/ |
H A D | client_trans_statistics.c | 144 if (!AddNumberToJsonObject(json, "channelId", resource->channelId) || in PackStatistics() 145 !AddNumberToJsonObject(json, "channelType", resource->channelType) || in PackStatistics() 146 !AddNumberToJsonObject(json, "socketId", resource->socketId) || in PackStatistics()
|
/ohos5.0/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/src/ |
H A D | lnn_topo_manager.c | 238 if (!AddNumberToJsonObject(*json, JSON_KEY_TYPE, TOPO_MSG_TYPE_UPDATE) || in PackCommonTopoMsg() 239 !AddNumberToJsonObject(*json, JSON_KEY_SEQ, seq) || in PackCommonTopoMsg() 240 !AddNumberToJsonObject(*json, JSON_KEY_COMPLETE, TOPO_MSG_FLAG_COMPLETE)) { in PackCommonTopoMsg() 278 if (!AddNumberToJsonObject(item, JSON_KEY_WLAN_RELATION, relation[CONNECTION_ADDR_WLAN]) || in PackTopoInfo() 279 !AddNumberToJsonObject(item, JSON_KEY_BR_RELATION, relation[CONNECTION_ADDR_BR]) || in PackTopoInfo() 280 !AddNumberToJsonObject(item, JSON_KEY_BLE_RELATION, relation[CONNECTION_ADDR_BLE]) || in PackTopoInfo() 281 !AddNumberToJsonObject(item, JSON_KEY_ETH_RELATION, relation[CONNECTION_ADDR_ETH]) || in PackTopoInfo()
|
H A D | lnn_battery_info.c | 35 if (!AddNumberToJsonObject(json, JSON_KEY_BATTERY_LEAVEL, level) || in LnnSyncBatteryInfo()
|
H A D | lnn_p2p_info.c | 53 if (!AddNumberToJsonObject(json, JSON_KEY_P2P_ROLE, info->p2pRole)) { in LnnGetP2pInfoMsg() 68 if (!AddNumberToJsonObject(json, JSON_KEY_STA_FREQUENCY, info->staFrequency)) { in LnnGetP2pInfoMsg()
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/transmission/trans_channel/auth_channel/ |
H A D | trans_auth_message_test.cpp | 106 bool res = AddNumberToJsonObject(msg, "CODE", CODE_OPEN_AUTH_MSG_CHANNEL); 169 bool res = AddNumberToJsonObject(msg, "ERR_CODE", 1);
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/transmission/trans_channel/proxy_channel/ |
H A D | softbus_proxychannel_message_test.cpp | 1146 (void)AddNumberToJsonObject(msg, "UID", TEST_UID); 1149 (void)AddNumberToJsonObject(msg, "PID", TEST_PID); 1158 (void)AddNumberToJsonObject(msg, "ENCRYPT", APP_INFO_FILE_FEATURES_SUPPORT); 1161 (void)AddNumberToJsonObject(msg, "ALGORITHM", APP_INFO_ALGORITHM_AES_GCM_256); 1164 (void)AddNumberToJsonObject(msg, "CRC", APP_INFO_FILE_FEATURES_NO_SUPPORT); 1167 (void)AddNumberToJsonObject(msg, "BUSINESS_TYPE", BUSINESS_TYPE_NOT_CARE); 1170 (void)AddNumberToJsonObject(msg, "MY_HANDLE_ID", -1); 1173 (void)AddNumberToJsonObject(msg, "PEER_HANDLE_ID", -1);
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/common/json_utils/uttest/ |
H A D | softbus_json_utils_test.cpp | 175 bool ret = AddNumberToJsonObject(json, JSON_KEY1, INPUT_NUM); 535 bool ret = AddNumberToJsonObject(json, JSON_KEY1, INPUT_NUM); 653 bool ret = AddNumberToJsonObject(nullptr, JSON_KEY1, INPUT_NUM); 655 ret = AddNumberToJsonObject(json, nullptr, INPUT_NUM); 657 ret = AddNumberToJsonObject(json, JSON_KEY1, INPUT_NUM);
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/common/json_utils/fuzztest/jsonutils_fuzzer/ |
H A D | jsonutils_fuzzer.cpp | 49 AddNumberToJsonObject(object, "age", age); in DoJsonUtilsFuzz()
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/authentication/unittest/ |
H A D | auth_net_ledger_mock.cpp | 227 !AddNumberToJsonObject(obj, DATA_BUF_SIZE_TAG.c_str(), PACKET_SIZE) || in Pack() 228 !AddNumberToJsonObject(obj, SOFT_BUS_VERSION_TAG.c_str(), SOFTBUS_NEW_V1)) { in Pack()
|
/ohos5.0/foundation/communication/dsoftbus/core/common/include/ |
H A D | softbus_json_utils.h | 54 bool AddNumberToJsonObject(cJSON *json, const char * const string, int32_t num);
|