Home
last modified time | relevance | path

Searched refs:AddNumberToJsonObject (Results 1 – 25 of 40) sorted by relevance

12

/ohos5.0/foundation/communication/dsoftbus/core/common/dfx/statistics/instant/
H A Dwifi_statistic.cpp63 (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 Dinstant_statistics.cpp773 (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 Dtrans_udp_negotiation_exchange.c202 (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 Dsoftbus_message_open_channel.c41 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 Dtrans_auth_message.c39 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 Dtrans_tcp_direct_json.c42 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 Dsoftbus_proxychannel_message.c433 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 Dsoftbus_conn_br_trans.c157 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 Dconnection_ble_trans_mock.cpp50 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 Dconnection_ble_trans_mock.h32 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 Dconnection_ble_mock.cpp39 bool AddNumberToJsonObject(cJSON *json, const char * const string, int num) in AddNumberToJsonObject() function
41 return GetConnectionBleInterface()->AddNumberToJsonObject(json, string, num); in AddNumberToJsonObject()
H A Dconnection_ble_mock.h38 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 Dconnection_br_mock.cpp49 bool AddNumberToJsonObject(cJSON *json, const char * const string, int num) in AddNumberToJsonObject() function
51 return GetConnectionBrInterface()->AddNumberToJsonObject(json, string, num); in AddNumberToJsonObject()
H A Dconnection_br_mock.h34 virtual bool AddNumberToJsonObject(cJSON *json, const char * const string, int num) = 0;
47 MOCK_METHOD3(AddNumberToJsonObject, bool (cJSON *, const char * const, int));
H A Dconnection_br_test.cpp680 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 Dclient_trans_statistics.c144 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 Dlnn_topo_manager.c238 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 Dlnn_battery_info.c35 if (!AddNumberToJsonObject(json, JSON_KEY_BATTERY_LEAVEL, level) || in LnnSyncBatteryInfo()
H A Dlnn_p2p_info.c53 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 Dtrans_auth_message_test.cpp106 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 Dsoftbus_proxychannel_message_test.cpp1146 (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 Dsoftbus_json_utils_test.cpp175 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 Djsonutils_fuzzer.cpp49 AddNumberToJsonObject(object, "age", age); in DoJsonUtilsFuzz()
/ohos5.0/foundation/communication/dsoftbus/tests/core/authentication/unittest/
H A Dauth_net_ledger_mock.cpp227 !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 Dsoftbus_json_utils.h54 bool AddNumberToJsonObject(cJSON *json, const char * const string, int32_t num);

12