/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/ble/ |
H A D | napi_bluetooth_gatt_server_callback.cpp | 45 auto nativeObject = in OnCharacteristicReadRequest() local 47 eventSubscribe_.PublishEvent(STR_BT_GATT_SERVER_CALLBACK_CHARACTERISTIC_READ, nativeObject); in OnCharacteristicReadRequest() 55 auto nativeObject = in OnCharacteristicWriteRequest() local 57 eventSubscribe_.PublishEvent(STR_BT_GATT_SERVER_CALLBACK_CHARACTERISTIC_WRITE, nativeObject); in OnCharacteristicWriteRequest() 88 auto nativeObject = in OnConnectionStateUpdate() local 98 auto nativeObject = in OnDescriptorWriteRequest() local 100 eventSubscribe_.PublishEvent(STR_BT_GATT_SERVER_CALLBACK_DESCRIPTOR_WRITE, nativeObject); in OnDescriptorWriteRequest() 108 auto nativeObject = in OnDescriptorReadRequest() local 110 eventSubscribe_.PublishEvent(STR_BT_GATT_SERVER_CALLBACK_DESCRIPTOR_READ, nativeObject); in OnDescriptorReadRequest() 117 auto nativeObject = std::make_shared<NapiNativeInt>(mtu); in OnMtuUpdate() local [all …]
|
H A D | napi_bluetooth_ble_advertise_callback.cpp | 48 auto nativeObject = in OnStartResultEvent() local 50 eventSubscribe_.PublishEvent(REGISTER_BLE_ADVERTISING_STATE_INFO_TYPE, nativeObject); in OnStartResultEvent() 56 auto nativeObject = in OnEnableResultEvent() local 58 eventSubscribe_.PublishEvent(REGISTER_BLE_ADVERTISING_STATE_INFO_TYPE, nativeObject); in OnEnableResultEvent() 64 auto nativeObject = in OnDisableResultEvent() local 66 eventSubscribe_.PublishEvent(REGISTER_BLE_ADVERTISING_STATE_INFO_TYPE, nativeObject); in OnDisableResultEvent() 78 auto nativeObject = in OnStopResultEvent() local 80 eventSubscribe_.PublishEvent(REGISTER_BLE_ADVERTISING_STATE_INFO_TYPE, nativeObject); in OnStopResultEvent()
|
H A D | napi_bluetooth_gatt_client_callback.cpp | 39 auto nativeObject = std::make_shared<NapiNativeBleCharacteristic>(characteristic); in OnCharacteristicChanged() local 40 … eventSubscribe_.PublishEvent(STR_BT_GATT_CLIENT_CALLBACK_BLE_CHARACTERISTIC_CHANGE, nativeObject); in OnCharacteristicChanged() 60 …auto nativeObject = std::make_shared<NapiNativeBleConnectionStateChangeParam>(deviceAddr_, connect… in OnConnectionStateChanged() local 61 …entSubscribe_.PublishEvent(STR_BT_GATT_CLIENT_CALLBACK_BLE_CONNECTIION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged() 106 auto nativeObject = std::make_shared<NapiNativeInt>(mtu); in OnMtuUpdate() local 107 eventSubscribe_.PublishEvent(STR_BT_GATT_CLIENT_CALLBACK_BLE_MTU_CHANGE, nativeObject); in OnMtuUpdate()
|
/ohos5.0/base/inputmethod/imf/test/unittest/cpp_test/src/ |
H A D | js_util_test.cpp | 34 static napi_value Write(napi_env env, const std::shared_ptr<Property> &nativeObject) in Write() 36 if (nativeObject == nullptr) { in Write() 39 return Write(env, *nativeObject); in Write() 41 static napi_value Write(napi_env env, const Property &nativeObject) in Write() 45 auto ret = JsUtil::Object::WriteProperty(env, object, "name", nativeObject.name); in Write() 46 ret = ret && JsUtil::Object::WriteProperty(env, object, "id", nativeObject.id); in Write() 47 ret = ret && JsUtil::Object::WriteProperty(env, object, "icon", nativeObject.icon); in Write() 51 static bool Read(napi_env env, napi_value object, Property &nativeObject) in Read() 53 auto ret = JsUtil::Object::ReadProperty(env, object, "name", nativeObject.name); in Read() 54 ret = ret && JsUtil::Object::ReadProperty(env, object, "id", nativeObject.id); in Read() [all …]
|
/ohos5.0/base/update/updateservice/frameworks/js/napi/session/include/ |
H A D | napi_common_define.h | 92 T *nativeObject = nullptr; in CreateJsObject() local 93 status = napi_unwrap(env, jsObject, (void **) &nativeObject); in CreateJsObject() 96 napi_remove_wrap(env, jsObject, (void **) &nativeObject); in CreateJsObject() 100 return nativeObject; in CreateJsObject() 111 T *nativeObject = nullptr; in UnwrapJsObject() local 112 napi_unwrap(env, thisVar, (void **)&nativeObject); in UnwrapJsObject() 113 return nativeObject; in UnwrapJsObject()
|
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/connection/ |
H A D | napi_bluetooth_connection_observer.cpp | 107 auto nativeObject = std::make_shared<NapiNativePinRequiredParam>(pairConfirmInfo); in OnPairConfirmedCallBack() local 108 eventSubscribe_.PublishEvent(REGISTER_PIN_REQUEST_TYPE, nativeObject); in OnPairConfirmedCallBack() 114 auto nativeObject = std::make_shared<NapiNativeDiscoveryResultArray>(remoteDevice); in OnDiscoveryResultCallBack() local 115 eventSubscribe_.PublishEvent(REGISTER_DEVICE_FIND_TYPE, nativeObject); in OnDiscoveryResultCallBack() 122 auto nativeObject = in OnDiscoveryResultCallBack() local 124 eventSubscribe_.PublishEvent(REGISTER_DISCOVERY_RESULT_TYPE, nativeObject); in OnDiscoveryResultCallBack()
|
H A D | napi_bluetooth_remote_device_observer.cpp | 47 …auto nativeObject = std::make_shared<NapiNativeBondStateParam>(device.GetDeviceAddr(), bondStatus,… in OnPairStatusChanged() local 48 eventSubscribe_.PublishEvent(REGISTER_BOND_STATE_TYPE, nativeObject); in OnPairStatusChanged() 84 auto nativeObject = std::make_shared<NapiNativeBatteryInfo>(batteryInfo); in OnRemoteBatteryChanged() local 85 eventSubscribe_.PublishEvent(REGISTER_BATTERY_CHANGE_TYPE, nativeObject); in OnRemoteBatteryChanged()
|
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/opp/ |
H A D | napi_bluetooth_opp_observer.cpp | 36 auto nativeObject = std::make_shared<NapiNativeOppTransferInformation>(transferInformation); in OnReceiveIncomingFileChanged() local 37 eventSubscribe_.PublishEvent(STR_BT_OPP_OBSERVER_RECEIVE_INCOMING_FILE, nativeObject); in OnReceiveIncomingFileChanged() 43 auto nativeObject = std::make_shared<NapiNativeOppTransferInformation>(transferInformation); in OnTransferStateChanged() local 44 eventSubscribe_.PublishEvent(STR_BT_OPP_OBSERVER_TRANSFER_STATE_CHANGE, nativeObject); in OnTransferStateChanged()
|
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/hfp/ |
H A D | napi_bluetooth_hfp_hf_observer.cpp | 37 …auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state, ca… in OnConnectionStateChanged() local 38 …ventSubscribe_.PublishEvent(STR_BT_HANDS_FREE_UNIT_OBSERVER_CONNECTION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged() 44 auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state); in OnScoStateChanged() local 45 eventSubscribe_.PublishEvent(STR_BT_HANDS_FREE_UNIT_OBSERVER_SCO_STATE_CHANGE, nativeObject); in OnScoStateChanged()
|
H A D | napi_bluetooth_hfp_ag_observer.cpp | 37 …auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state, ca… in OnConnectionStateChanged() local 38 …ribe_.PublishEvent(STR_BT_HANDS_FREE_AUDIO_GATEWAY_OBSERVER_CONNECTION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged() 44 auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state); in OnScoStateChanged() local 45 …ntSubscribe_.PublishEvent(STR_BT_HANDS_FREE_AUDIO_GATEWAY_OBSERVER_SCO_STATE_CHANGE, nativeObject); in OnScoStateChanged()
|
/ohos5.0/foundation/communication/ipc/ipc/native/src/jni/source/ |
H A D | ohos_rpc_message_parcel.cpp | 36 jfieldID nativeObject; member 72 jlong nativeObject = env->GetLongField(object, g_jMessageParcel.nativeObject); in JavaOhosRpcMessageParcelGetNative() local 73 return reinterpret_cast<MessageParcel *>(nativeObject); in JavaOhosRpcMessageParcelGetNative() 134 g_jMessageParcel.nativeObject = env->GetFieldID(g_jMessageParcel.klazz, "mNativeObject", "J"); in JavaOhosRpcMessageParcelRegisterNativeMethods() 135 if (g_jMessageParcel.nativeObject == nullptr) { in JavaOhosRpcMessageParcelRegisterNativeMethods() 400 …NICALL Java_ohos_rpc_MessageParcel_nativeNewObject(JNIEnv *env, jobject object, jlong nativeObject) in Java_ohos_rpc_MessageParcel_nativeNewObject() argument 404 if (nativeObject != 0) { in Java_ohos_rpc_MessageParcel_nativeNewObject() 405 nativeMessageParcel = reinterpret_cast<MessageParcel *>(nativeObject); in Java_ohos_rpc_MessageParcel_nativeNewObject() 439 …ICALL Java_ohos_rpc_MessageParcel_nativeFreeObject(JNIEnv *env, jobject object, jlong nativeObject) in Java_ohos_rpc_MessageParcel_nativeFreeObject() argument 442 std::unique_ptr<MessageParcel> nativeParcel(reinterpret_cast<MessageParcel *>(nativeObject)); in Java_ohos_rpc_MessageParcel_nativeFreeObject()
|
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/common/ |
H A D | napi_event_subscribe_module.cpp | 131 …std::shared_ptr<NapiNativeObject> nativeObject, std::vector<std::shared_ptr<NapiCallback>> napiCal… in CallFunction() argument 137 auto func = [nativeObject, callback]() { in CallFunction() 138 callback->CallFunction(nativeObject); in CallFunction() 145 std::string eventName, const std::shared_ptr<NapiNativeObject> &nativeObject) in PublishEvent() argument 147 eventSubscribeMap_.Iterate([this, &eventName, &nativeObject]( in PublishEvent() 152 CallFunction(nativeObject, napiCallbackVec); in PublishEvent()
|
/ohos5.0/base/inputmethod/imf/frameworks/js/napi/inputmethodability/ |
H A D | panel_listener_impl.cpp | 141 napi_value JsWindowSize::Write(napi_env env, const WindowSize &nativeObject) in Write() argument 145 bool ret = JsUtil::Object::WriteProperty(env, jsObject, "width", nativeObject.width); in Write() 146 ret = ret && JsUtil::Object::WriteProperty(env, jsObject, "height", nativeObject.height); in Write() 150 bool JsWindowSize::Read(napi_env env, napi_value jsObject, WindowSize &nativeObject) in Read() argument 152 auto ret = JsUtil::Object::ReadProperty(env, jsObject, "width", nativeObject.width); in Read() 153 ret = ret && JsUtil::Object::ReadProperty(env, jsObject, "height", nativeObject.height); in Read()
|
H A D | js_text_input_client_engine.cpp | 903 napi_value JsRect::Write(napi_env env, const Rosen::Rect &nativeObject) in Write() argument 914 bool JsRect::Read(napi_env env, napi_value jsObject, Rosen::Rect &nativeObject) in Read() argument 916 auto ret = JsUtil::Object::ReadProperty(env, jsObject, "left", nativeObject.posX_); in Read() 936 auto ret = JsRect::Read(env, rectObject, nativeObject.rect); in Read() 939 nativeObject.status = static_cast<Rosen::WindowStatus>(status); in Read() 948 napi_value JsRange::Write(napi_env env, const Range &nativeObject) in Write() argument 953 ret = ret && JsUtil::Object::WriteProperty(env, jsObject, "end", nativeObject.end); in Write() 957 bool JsRange::Read(napi_env env, napi_value jsObject, Range &nativeObject) in Read() argument 960 ret = ret && JsUtil::Object::ReadProperty(env, jsObject, "end", nativeObject.end); in Read() 964 napi_value JsInputAttribute::Write(napi_env env, const InputAttribute &nativeObject) in Write() argument [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing/sampling_options_napi/ |
H A D | js_sampling_options.cpp | 86 void JsSamplingOptions::Destructor(napi_env env, void* nativeObject, void* finalize) in Destructor() argument 89 if (nativeObject != nullptr) { in Destructor() 90 JsSamplingOptions* napi = reinterpret_cast<JsSamplingOptions*>(nativeObject); in Destructor()
|
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/hid/ |
H A D | napi_bluetooth_hid_host_observer.cpp | 37 …auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state, ca… in OnConnectionStateChanged() local 38 eventSubscribe_.PublishEvent(STR_BT_HID_HOST_OBSERVER_CONNECTION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged()
|
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/a2dp/ |
H A D | napi_bluetooth_a2dp_src_observer.cpp | 34 …auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state, ca… in OnConnectionStateChanged() local 35 eventSubscribe_.PublishEvent(STR_BT_A2DP_SOURCE_CONNECTION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged()
|
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/ |
H A D | napi_bluetooth_a2dp_snk_observer.cpp | 35 …auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state, ca… in OnConnectionStateChanged() local 36 eventSubscribe_.PublishEvent(STR_BT_A2DP_SINK_CONNECTION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged()
|
H A D | napi_bluetooth_avrcp_ct_observer.cpp | 35 …auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state, ca… in OnConnectionStateChanged() local 36 eventSubscribe_.PublishEvent(STR_BT_AVRCP_CT_CONNECTION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged()
|
H A D | napi_bluetooth_avrcp_tg_observer.cpp | 35 …auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state, ca… in OnConnectionStateChanged() local 36 eventSubscribe_.PublishEvent(STR_BT_AVRCP_TG_CONNECTION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged()
|
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/pan/ |
H A D | napi_bluetooth_pan_observer.cpp | 38 …auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state, ca… in OnConnectionStateChanged() local 39 eventSubscribe_.PublishEvent(STR_BT_PAN_OBSERVER_CONNECTION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged()
|
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/map/ |
H A D | napi_bluetooth_map_mse_observer.cpp | 35 …auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state, ca… in OnConnectionStateChanged() local 36 eventSubscribe_.PublishEvent(STR_BT_MAP_MSE_CONNECTION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged()
|
/ohos5.0/foundation/communication/bluetooth/frameworks/js/napi/src/pbap/ |
H A D | napi_bluetooth_pbap_pse_observer.cpp | 35 …auto nativeObject = std::make_shared<NapiNativeStateChangeParam>(device.GetDeviceAddr(), state, ca… in OnConnectionStateChanged() local 36 eventSubscribe_.PublishEvent(STR_BT_PBAP_PSE_CONNECTION_STATE_CHANGE, nativeObject); in OnConnectionStateChanged()
|
/ohos5.0/foundation/multimedia/audio_framework/frameworks/js/napi/audiomanager/ |
H A D | napi_audio_interrupt_manager.cpp | 36 void NapiAudioInterruptManager::Destructor(napi_env env, void *nativeObject, void *finalizeHint) in Destructor() argument 38 if (nativeObject != nullptr) { in Destructor() 39 auto obj = static_cast<NapiAudioInterruptManager *>(nativeObject); in Destructor()
|
/ohos5.0/base/global/i18n/interfaces/js/kits/src/ |
H A D | entity_recognizer_addon.cpp | 32 void EntityRecognizerAddon::Destructor(napi_env env, void *nativeObject, void *hint) in Destructor() argument 34 if (!nativeObject) { in Destructor() 37 delete reinterpret_cast<EntityRecognizerAddon *>(nativeObject); in Destructor() 38 nativeObject = nullptr; in Destructor()
|