/foundation/communication/bluetooth/frameworks/js/napi/src/common/ |
H A D | napi_bluetooth_utils.cpp | 473 NAPI_BT_RETURN_IF(valuetype != napi_boolean, "Wrong argument type. Boolean expected.", napi_boolean_expected); in NapiIsBoolean() 481 NAPI_BT_RETURN_IF(valuetype != napi_number, "Wrong argument type. Number expected.", napi_number_expected); in NapiIsNumber() 489 NAPI_BT_RETURN_IF(valuetype != napi_string, "Wrong argument type. String expected.", napi_string_expected); in NapiIsString() 501 NAPI_BT_RETURN_IF(valuetype != napi_function, "Wrong argument type. Function expected.", napi_function_expected); in NapiIsFunction() 509 NAPI_BT_RETURN_IF(!isArrayBuffer, "Expected arraybuffer type", napi_arraybuffer_expected); in NapiIsArrayBuffer() 517 NAPI_BT_RETURN_IF(!isArray, "Expected array type", napi_array_expected); in NapiIsArray() 525 NAPI_BT_RETURN_IF(valuetype != napi_object, "Wrong argument type. Object expected.", napi_object_expected); in NapiIsObject() 539 NAPI_BT_RETURN_IF(valuetype != napi_number, "Wrong argument type, number expected", napi_number_expected); in ParseNumberParams() 585 NAPI_BT_RETURN_IF(valuetype != napi_boolean, "Wrong argument type, boolean expected", napi_boolean_expected); in ParseBooleanParams() 606 NAPI_BT_RETURN_IF(valuetyp in ParseStringParams() [all...] |
H A D | napi_bluetooth_profile.cpp | 55 NAPI_BT_RETURN_IF(funcRet != napi_ok, "call napi_get_cb_info failed.", ret); in GetProfile() 56 NAPI_BT_RETURN_IF(argc != expectedArgsCount, "Requires 1 argument", ret); in GetProfile() 59 NAPI_BT_RETURN_IF(!ParseInt32(env, profileId, argv[PARAM0]), "False type! Int32 required.", ret); in GetProfile() 64 NAPI_BT_RETURN_IF(funcRet != napi_ok, "call napi_get_reference_value failed", ret); in GetProfile() 65 NAPI_BT_RETURN_IF(profile == nullptr, "napi get reference failed.", ret); in GetProfile()
|
H A D | napi_event_subscribe_module.cpp | 48 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_TWO, "Requires 2 arguments", napi_invalid_arg); in Register() 82 NAPI_BT_RETURN_IF( in Deregister()
|
/foundation/communication/bluetooth/frameworks/js/napi/src/socket/ |
H A D | napi_bluetooth_spp_client.cpp | 38 NAPI_BT_RETURN_IF((argc != ARGS_SIZE_THREE && argc != ARGS_SIZE_THREE - CALLBACK_SIZE), in CheckSppConnectParams() 40 NAPI_BT_RETURN_IF(!ParseString(env, deviceId, argv[PARAM0]), in CheckSppConnectParams() 45 NAPI_BT_RETURN_IF((callbackInfo->sppOption_ == nullptr), "GetSppOptionFromJS faild.", napi_invalid_arg); in CheckSppConnectParams() 191 NAPI_BT_RETURN_IF((argc != ARGS_SIZE_ONE), "Requires 1 arguments.", napi_invalid_arg); in CheckSppCloseClientSocketParams() 192 NAPI_BT_RETURN_IF(!ParseInt32(env, id, argv[PARAM0]), "Wrong argument type. int expected.", napi_invalid_arg); in CheckSppCloseClientSocketParams() 229 NAPI_BT_RETURN_IF((argc != ARGS_SIZE_TWO), "Requires 2 arguments.", napi_invalid_arg); in CheckSppWriteParams() 230 NAPI_BT_RETURN_IF(!ParseInt32(env, id, argv[PARAM0]), "Wrong argument type. int expected.", napi_invalid_arg); in CheckSppWriteParams() 231 NAPI_BT_RETURN_IF(!ParseArrayBuffer(env, totalBuf, totalSize, argv[PARAM1]), in CheckSppWriteParams() 312 NAPI_BT_RETURN_IF((argc != ARGS_SIZE_THREE), "Requires 3 arguments.", napi_invalid_arg); in CheckSppClientOn() 313 NAPI_BT_RETURN_IF(!ParseStrin in CheckSppClientOn() [all...] |
H A D | napi_bluetooth_spp_server.cpp | 84 NAPI_BT_RETURN_IF((argc != ARGS_SIZE_THREE && argc != ARGS_SIZE_THREE - CALLBACK_SIZE), in CheckSppListenParams() 86 NAPI_BT_RETURN_IF(!ParseString(env, name, argv[PARAM0]), in CheckSppListenParams() 91 NAPI_BT_RETURN_IF((callbackInfo->sppOption_ == nullptr), "GetSppOptionFromJS faild.", napi_invalid_arg); in CheckSppListenParams() 100 NAPI_BT_RETURN_IF(valueType != napi_function, "Wrong argument type. Function expected.", napi_invalid_arg); in CheckSppListenParams() 200 NAPI_BT_RETURN_IF((argc != ARGS_SIZE_TWO && argc != ARGS_SIZE_TWO - CALLBACK_SIZE), in CheckSppAcceptParams() 202 NAPI_BT_RETURN_IF(!ParseInt32(env, serverSocketNum, argv[PARAM0]), in CheckSppAcceptParams() 219 NAPI_BT_RETURN_IF(valueType != napi_function, "Wrong argument type. Function expected.", napi_invalid_arg); in CheckSppAcceptParams() 308 NAPI_BT_RETURN_IF((argc != ARGS_SIZE_ONE), "Requires 1 arguments.", napi_invalid_arg); in CheckSppCloseServerSockeParams() 309 NAPI_BT_RETURN_IF(!ParseInt32(env, id, argv[PARAM0]), "Wrong argument type. int expected.", napi_invalid_arg); in CheckSppCloseServerSockeParams()
|
/foundation/communication/bluetooth/frameworks/js/napi/src/ble/ |
H A D | napi_bluetooth_gatt_client.cpp | 43 NAPI_BT_RETURN_IF(argc != expectedArgsCount, "expect 1 args", napi_invalid_arg); in CheckCreateGattClientDeviceParams() 221 NAPI_BT_RETURN_IF(argc != 0, "No need arguments.", napi_invalid_arg); in CheckGattClientNoArgc() 223 NAPI_BT_RETURN_IF(gattClient == nullptr || outGattClient == nullptr, "gattClient is nullptr.", napi_invalid_arg); in CheckGattClientNoArgc() 270 NAPI_BT_RETURN_IF(argc != expectedArgsCount && argc != expectedArgsCount - CALLBACK_SIZE, in ParseGattClientReadCharacteristicValue() 273 NAPI_BT_RETURN_IF(gattClient == nullptr || outGattClient == nullptr, "gattClient is nullptr.", napi_invalid_arg); in ParseGattClientReadCharacteristicValue() 278 NAPI_BT_RETURN_IF(character == nullptr || outCharacter == nullptr, "Not found character", napi_invalid_arg); in ParseGattClientReadCharacteristicValue() 322 NAPI_BT_RETURN_IF(argc != expectedArgsCount && argc != expectedArgsCount - CALLBACK_SIZE, in ParseGattClientReadDescriptorValue() 326 NAPI_BT_RETURN_IF(outGattClient == nullptr || gattClient == nullptr, "gattClient is nullptr.", napi_invalid_arg); in ParseGattClientReadDescriptorValue() 331 NAPI_BT_RETURN_IF(outDescriptor == nullptr || descriptor == nullptr, "Not found Descriptor", napi_invalid_arg); in ParseGattClientReadDescriptorValue() 373 NAPI_BT_RETURN_IF(arg in ParseGattClientGetServices() [all...] |
H A D | napi_bluetooth_gatt_server.cpp | 138 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_ONE, "Requires 1 arguments.", napi_invalid_arg); in CheckGattsAddService() 145 NAPI_BT_RETURN_IF(gattServer == nullptr, "gattServer is nullptr.", napi_invalid_arg); in CheckGattsAddService() 185 NAPI_BT_RETURN_IF(argc > 0, "no needed arguments.", napi_invalid_arg); in CheckGattsClose() 187 NAPI_BT_RETURN_IF(gattServer == nullptr, "gattServer is nullptr.", napi_invalid_arg); in CheckGattsClose() 212 NAPI_BT_RETURN_IF(argc != 1, "Requires 1 arguments.", napi_invalid_arg); in CheckGattsRemoveService() 218 NAPI_BT_RETURN_IF(gattServer == nullptr, "gattServer is nullptr.", napi_invalid_arg); in CheckGattsRemoveService() 254 NAPI_BT_RETURN_IF(argc != 1, "Requires 1 arguments.", napi_invalid_arg); in CheckGattsSendRsp() 260 NAPI_BT_RETURN_IF(gattServer == nullptr, "gattServer is nullptr.", napi_invalid_arg); in CheckGattsSendRsp() 305 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_TWO && argc != ARGS_SIZE_THREE, "Requires 2 or 3 arguments.", napi_invalid_arg); in CheckNotifyCharacteristicChangedEx() 313 NAPI_BT_RETURN_IF(gattServe in CheckNotifyCharacteristicChangedEx() [all...] |
H A D | napi_bluetooth_ble.cpp | 579 NAPI_BT_RETURN_IF(length == 0, "Requires array length > 0", napi_invalid_arg); in ParseScanFilterParameters() 598 NAPI_BT_RETURN_IF((argc == 0 || argc > ARGS_SIZE_TWO), "Requires 1 or 2 arguments.", napi_invalid_arg); in CheckBleScanParams() 807 NAPI_BT_RETURN_IF((argc != ARGS_SIZE_TWO && argc != ARGS_SIZE_THREE), "need 2 or 3 arguments.", napi_invalid_arg); in CheckAdvertisingData() 875 NAPI_BT_RETURN_IF((argc != ARGS_SIZE_ONE && argc != ARGS_SIZE_TWO), "need 1 or 2 arguments.", napi_invalid_arg); in CheckAdvertisingEnableParams() 881 NAPI_BT_RETURN_IF(bleAdvertiser == nullptr, "bleAdvertiser is nullptr", napi_invalid_arg); in CheckAdvertisingEnableParams() 933 NAPI_BT_RETURN_IF((argc != ARGS_SIZE_ONE && argc != ARGS_SIZE_TWO), "need 1 or 2 arguments.", napi_invalid_arg); in CheckAdvertisingDisableParams() 939 NAPI_BT_RETURN_IF(bleAdvertiser == nullptr, "bleAdvertiser is nullptr", napi_invalid_arg); in CheckAdvertisingDisableParams() 978 NAPI_BT_RETURN_IF(bleAdvertiser == nullptr, "bleAdvertiser is nullptr", napi_invalid_arg); in CheckStopAdvWithAdvId() 991 NAPI_BT_RETURN_IF(argc > 0, "no needed arguments.", napi_invalid_arg); in CheckEmptyArgs()
|
/foundation/communication/bluetooth/frameworks/js/napi/src/connection/ |
H A D | napi_bluetooth_connection.cpp | 417 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_TWO && argc != ARGS_SIZE_THREE, in ParseSetDevicePinCodeParameters() 420 NAPI_BT_RETURN_IF(!ParseString(env, pinCode, argv[PARAM1]), "pinCode ParseString failed", napi_invalid_arg); in ParseSetDevicePinCodeParameters() 451 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_ONE && argc != ARGS_SIZE_TWO, "Requires 1 or 2 arguments", napi_invalid_arg); in CheckDeviceAsyncParam() 519 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_TWO && argc != ARGS_SIZE_THREE, "Requires 2 or 3 arguments.", napi_invalid_arg); in CheckPairCredibleDeviceParam() 521 NAPI_BT_RETURN_IF(!ParseInt32(env, transport, argv[PARAM1]), "ParseInt32 failed", napi_invalid_arg); in CheckPairCredibleDeviceParam() 522 NAPI_BT_RETURN_IF(!IsValidTransport(transport), "Invalid transport", napi_invalid_arg); in CheckPairCredibleDeviceParam() 551 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_ONE && argc != ARGS_SIZE_TWO, "Requires 1 or 2 arguments.", napi_invalid_arg); in CheckGetProfileUuids() 688 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_TWO, "Requires 2 arguments.", napi_invalid_arg); in ParseSetRemoteDeviceNameParameters() 690 NAPI_BT_RETURN_IF(!ParseString(env, deviceName, argv[PARAM1]), "deviceName ParseString failed", napi_invalid_arg); in ParseSetRemoteDeviceNameParameters() 725 NAPI_BT_RETURN_IF(arg in ParseSetRemoteDeviceTypeParameters() [all...] |
/foundation/communication/bluetooth/frameworks/js/napi/src/pan/ |
H A D | napi_bluetooth_pan.cpp | 261 NAPI_BT_RETURN_IF(napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr) != napi_ok, "call failed.", false); in CheckSetTetheringParam() 262 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_ONE, "Requires 1 argument.", false); in CheckSetTetheringParam() 263 NAPI_BT_RETURN_IF(!ParseBool(env, out, argv[PARAM0]), "Bool expected.", false); in CheckSetTetheringParam()
|
/foundation/communication/bluetooth/frameworks/js/napi/src/pbap/ |
H A D | napi_bluetooth_pbap_pse.cpp | 250 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_TWO && argc != ARGS_SIZE_THREE, "Requires 2 or 3 arguments.", napi_invalid_arg);
in CheckShareTypeParam() 252 NAPI_BT_RETURN_IF(!ParseInt32(env, shareType, argv[PARAM1]), "ParseInt failed", napi_invalid_arg);
in CheckShareTypeParam() 253 NAPI_BT_RETURN_IF(!IsShareTypeValid(shareType), "Invalid shareType", napi_invalid_arg);
in CheckShareTypeParam()
|
/foundation/communication/bluetooth/frameworks/js/napi/src/parser/ |
H A D | napi_parser_utils.cpp | 305 NAPI_BT_RETURN_IF(!ParseString(env, str, value), "parse string failed", napi_invalid_arg); in NapiParseString() 331 NAPI_BT_RETURN_IF(!IsValidAddress(bdaddr), "Invalid bdaddr", napi_invalid_arg); in NapiParseBdAddr() 340 NAPI_BT_RETURN_IF(!IsValidUuid(uuid), "Invalid uuid", napi_invalid_arg); in NapiParseUuid() 422 NAPI_BT_RETURN_IF(!exist, "no needed property", napi_invalid_arg); in NapiGetObjectProperty() 574 NAPI_BT_RETURN_IF(num > 0xFFFF, "Invalid manufactureId", napi_invalid_arg); in NapiParseObject()
|
/foundation/communication/bluetooth/frameworks/js/napi/src/opp/ |
H A D | napi_bluetooth_opp.cpp | 110 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_ONE, "Require 1 arguments.", napi_invalid_arg);
in CheckSetIncomingFileConfirmation() 121 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_THREE, "Require 3 arguments.", napi_invalid_arg);
in CheckSendFileParam()
|
/foundation/communication/bluetooth/frameworks/js/napi/src/a2dp/ |
H A D | napi_bluetooth_a2dp_src.cpp | 630 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_TWO, "Requires 2 arguments.", napi_invalid_arg); in CheckSetCodecPreferenceParam() 714 NAPI_BT_RETURN_IF(argc != ARGS_SIZE_TWO, "Requires 2 arguments", napi_invalid_arg); in CheckDisableAutoPlayParam() 716 NAPI_BT_RETURN_IF(!ParseInt32(env, duration, argv[PARAM1]), "ParseInt failed", napi_invalid_arg); in CheckDisableAutoPlayParam() 717 NAPI_BT_RETURN_IF(IsInvalidAutoPlayDuration(duration), "Invalid duration", napi_invalid_arg); in CheckDisableAutoPlayParam()
|
/foundation/communication/bluetooth/frameworks/js/napi/include/ |
H A D | napi_bluetooth_utils.h | 473 #define NAPI_BT_RETURN_IF(condition, msg, ret) \ macro
|