/base/msdp/device_status/frameworks/js/napi/interaction/coordination/src/ |
D | js_event_target.cpp | 45 void JsEventTarget::EmitJsPrepare(sptr<JsUtil::CallbackInfo> cb, const std::string& deviceId, Coord… in EmitJsPrepare() argument 48 CHKPV(cb); in EmitJsPrepare() 49 CHKPV(cb->env); in EmitJsPrepare() 50 …cb->data.prepareResult = (msg == CoordinationMessage::PREPARE || msg == CoordinationMessage::UNPRE… in EmitJsPrepare() 51 cb->data.errCode = static_cast<int32_t>(msg); in EmitJsPrepare() 53 CHKRV(napi_get_uv_event_loop(cb->env, &loop), GET_UV_EVENT_LOOP); in EmitJsPrepare() 56 cb->IncStrongRef(nullptr); in EmitJsPrepare() 57 work->data = cb.GetRefPtr(); in EmitJsPrepare() 59 if (cb->ref == nullptr) { in EmitJsPrepare() 68 cb->DecStrongRef(nullptr); in EmitJsPrepare() [all …]
|
D | js_coordination_manager.cpp | 33 sptr<JsUtil::CallbackInfo> cb = new (std::nothrow) JsUtil::CallbackInfo(); in Prepare() local 34 CHKPP(cb); in Prepare() 35 napi_value result = CreateCallbackInfo(env, handle, cb); in Prepare() 36 auto callback = std::bind(EmitJsPrepare, cb, std::placeholders::_1, std::placeholders::_2); in Prepare() 39 RELEASE_CALLBACKINFO(cb->env, cb->ref); in Prepare() 48 sptr<JsUtil::CallbackInfo> cb = new (std::nothrow) JsUtil::CallbackInfo(); in Unprepare() local 49 CHKPP(cb); in Unprepare() 50 napi_value result = CreateCallbackInfo(env, handle, cb); in Unprepare() 51 auto callback = std::bind(EmitJsPrepare, cb, std::placeholders::_1, std::placeholders::_2); in Unprepare() 54 RELEASE_CALLBACKINFO(cb->env, cb->ref); in Unprepare() [all …]
|
D | js_util.cpp | 32 napi_value JsUtil::GetPrepareInfo(sptr<CallbackInfo> cb) in GetPrepareInfo() argument 34 CHKPP(cb); in GetPrepareInfo() 35 CHKPP(cb->env); in GetPrepareInfo() 36 return GetResult(cb->env, cb->data.prepareResult, cb->data.errCode); in GetPrepareInfo() 39 napi_value JsUtil::GetActivateInfo(sptr<CallbackInfo> cb) in GetActivateInfo() argument 41 CHKPP(cb); in GetActivateInfo() 42 CHKPP(cb->env); in GetActivateInfo() 43 return GetResult(cb->env, cb->data.activateResult, cb->data.errCode); in GetActivateInfo() 46 napi_value JsUtil::GetDeactivateInfo(sptr<CallbackInfo> cb) in GetDeactivateInfo() argument 48 CHKPP(cb); in GetDeactivateInfo() [all …]
|
/base/msdp/device_status/frameworks/js/napi/interaction/cooperate/src/ |
D | js_event_cooperate_target.cpp | 48 void JsEventCooperateTarget::EmitJsEnable(sptr<JsUtilCooperate::CallbackInfo> cb, in EmitJsEnable() argument 52 CHKPV(cb); in EmitJsEnable() 53 CHKPV(cb->env); in EmitJsEnable() 54 …cb->data.enableResult = (msg == CoordinationMessage::PREPARE || msg == CoordinationMessage::UNPREP… in EmitJsEnable() 55 cb->data.errCode = static_cast<int32_t>(msg); in EmitJsEnable() 57 CHKRV(napi_get_uv_event_loop(cb->env, &loop), GET_UV_EVENT_LOOP); in EmitJsEnable() 60 cb->IncStrongRef(nullptr); in EmitJsEnable() 61 work->data = cb.GetRefPtr(); in EmitJsEnable() 63 if (cb->ref == nullptr) { in EmitJsEnable() 72 cb->DecStrongRef(nullptr); in EmitJsEnable() [all …]
|
D | js_util_cooperate.cpp | 32 napi_value JsUtilCooperate::GetEnableInfo(sptr<CallbackInfo> cb) in GetEnableInfo() argument 34 CHKPP(cb); in GetEnableInfo() 35 CHKPP(cb->env); in GetEnableInfo() 36 return GetResult(cb->env, cb->data.enableResult, cb->data.errCode); in GetEnableInfo() 39 napi_value JsUtilCooperate::GetStartInfo(sptr<CallbackInfo> cb) in GetStartInfo() argument 41 CHKPP(cb); in GetStartInfo() 42 CHKPP(cb->env); in GetStartInfo() 43 return GetResult(cb->env, cb->data.startResult, cb->data.errCode); in GetStartInfo() 46 napi_value JsUtilCooperate::GetStopInfo(sptr<CallbackInfo> cb) in GetStopInfo() argument 48 CHKPP(cb); in GetStopInfo() [all …]
|
D | js_cooperate_manager.cpp | 33 sptr<JsUtilCooperate::CallbackInfo> cb = new (std::nothrow) JsUtilCooperate::CallbackInfo(); in Enable() local 34 CHKPP(cb); in Enable() 35 napi_value result = CreateCallbackInfo(env, handle, cb); in Enable() 36 auto callback = std::bind(EmitJsEnable, cb, std::placeholders::_1, std::placeholders::_2); in Enable() 44 RELEASE_CALLBACKINFO(cb->env, cb->ref); in Enable() 54 sptr<JsUtilCooperate::CallbackInfo> cb = new (std::nothrow) JsUtilCooperate::CallbackInfo(); in Start() local 55 CHKPP(cb); in Start() 56 napi_value result = CreateCallbackInfo(env, handle, cb); in Start() 57 auto callback = std::bind(EmitJsStart, cb, std::placeholders::_1, std::placeholders::_2); in Start() 60 RELEASE_CALLBACKINFO(cb->env, cb->ref); in Start() [all …]
|
/base/sensors/sensor/utils/common/src/ |
D | report_data_callback.cpp | 47 int32_t ReportDataCallback::ReportEventCallback(SensorData* sensorData, sptr<ReportDataCallback> cb) in ReportEventCallback() argument 50 if (cb == nullptr || cb->eventsBuf_.circularBuf == nullptr) { in ReportEventCallback() 54 int32_t leftSize = CIRCULAR_BUF_LEN - cb->eventsBuf_.eventNum; in ReportEventCallback() 55 int32_t toEndLen = CIRCULAR_BUF_LEN - cb->eventsBuf_.writePosition; in ReportEventCallback() 61 cb->eventsBuf_.circularBuf[0] = *sensorData; in ReportEventCallback() 62 cb->eventsBuf_.writePosition = 1; in ReportEventCallback() 64 cb->eventsBuf_.circularBuf[cb->eventsBuf_.writePosition] = *sensorData; in ReportEventCallback() 65 cb->eventsBuf_.writePosition += 1; in ReportEventCallback() 68 cb->eventsBuf_.readPos = cb->eventsBuf_.writePosition; in ReportEventCallback() 70 cb->eventsBuf_.eventNum += 1; in ReportEventCallback() [all …]
|
/base/update/updateservice/services/firmware/upgrade/install/src/ |
D | firmware_install.cpp | 32 …all::StartInstall(const std::vector<FirmwareComponent> &componentList, FirmwareInstallCallback &cb) in StartInstall() argument 36 CallbackFailedResult(cb, "install is busying", DUPDATE_ERR_SYSTEM_BUSY_ON_INSTALL); in StartInstall() 42 CallbackFailedResult(cb, "check component failed!", DUPDATE_ERR_UPDATE_PRECHECK_FAIL); in StartInstall() 47 onInstallCallback_ = cb; in StartInstall() 50 CallbackResult(cb, result); in StartInstall() 65 void FirmwareInstall::CallbackFailedResult(FirmwareInstallCallback &cb, const std::string &errorMsg… in CallbackFailedResult() argument 68 cb.onFirmwareEvent(false, errMsg); in CallbackFailedResult() 71 void FirmwareInstall::CallbackResult(FirmwareInstallCallback &cb, const bool result) in CallbackResult() argument 73 cb.onFirmwareEvent(result, errMsg_); in CallbackResult()
|
/base/security/device_security_level/services/dslm/ |
D | dslm_credential.c | 30 static ProcessDslmCredFunctions cb = {NULL, NULL, NULL, 0, {0}}; in GetFunctionCb() local 31 return &cb; in GetFunctionCb() 39 ProcessDslmCredFunctions *cb = GetFunctionCb(); in InitDslmCredentialFunctions() local 40 (void)memcpy_s(cb, sizeof(ProcessDslmCredFunctions), funcs, sizeof(ProcessDslmCredFunctions)); in InitDslmCredentialFunctions() 47 ProcessDslmCredFunctions *cb = GetFunctionCb(); in DefaultRequestDslmCred() local 48 RequestDslmCredFunc *request = cb->requestFunc; in DefaultRequestDslmCred() 59 ProcessDslmCredFunctions *cb = GetFunctionCb(); in DefaultVerifyDslmCred() local 60 VerifyDslmCredFunc *verify = cb->verifyFunc; in DefaultVerifyDslmCred() 70 ProcessDslmCredFunctions *cb = GetFunctionCb(); in DefaultInitDslmCred() local 71 InitDslmCredFunc *init = cb->initFunc; in DefaultInitDslmCred() [all …]
|
/base/msdp/device_status/services/interaction/coordination/src/ |
D | distributed_input_adapter.cpp | 53 sptr<IStartStopDInputsCallback> cb = new (std::nothrow) StartDInputCallbackSink(); in StartRemoteInput() local 54 CHKPR(cb, ERROR_NULL_POINTER); in StartRemoteInput() 56 …turn DistributedInputKit::StartRemoteInput(remoteNetworkId, originNetworkId, inputDeviceDhids, cb); in StartRemoteInput() 63 sptr<IStartStopDInputsCallback> cb = new (std::nothrow) StopDInputCallbackDHIds(); in StopRemoteInput() local 64 CHKPR(cb, ERROR_NULL_POINTER); in StopRemoteInput() 66 return DistributedInputKit::StopRemoteInput(originNetworkId, inputDeviceDhids, cb); in StopRemoteInput() 73 sptr<IStartStopDInputsCallback> cb = new (std::nothrow) StopDInputCallbackSink(); in StopRemoteInput() local 74 CHKPR(cb, ERROR_NULL_POINTER); in StopRemoteInput() 76 …eturn DistributedInputKit::StopRemoteInput(remoteNetworkId, originNetworkId, inputDeviceDhids, cb); in StopRemoteInput() 83 sptr<IPrepareDInputCallback> cb = new (std::nothrow) PrepareStartDInputCallbackSink(); in PrepareRemoteInput() local [all …]
|
/base/msdp/device_status/test/systemtest/src/ |
D | devicestatus_client_test.cpp | 61 sptr<IRemoteDevStaCallback> cb = new (std::nothrow) DeviceStatusClientTestCallback(); variable 62 ASSERT_NE(cb, nullptr); 66 ret = stationaryMgr->SubscribeCallback(type, event, latency, cb); 69 ret = stationaryMgr->UnsubscribeCallback(type, event, cb); 84 sptr<IRemoteDevStaCallback> cb = new (std::nothrow) DeviceStatusClientTestCallback(); variable 85 ASSERT_NE(cb, nullptr); 89 ret = stationaryMgr->SubscribeCallback(type, event, latency, cb); 92 ret = stationaryMgr->UnsubscribeCallback(type, event, cb); 107 sptr<IRemoteDevStaCallback> cb = new (std::nothrow) DeviceStatusClientTestCallback(); variable 108 ASSERT_NE(cb, nullptr); [all …]
|
/base/update/updater/services/ui/control/ |
D | event_listener.h | 39 explicit CallBackDecorator(Callback cb) : cb_(cb) {} in CallBackDecorator() argument 43 static void CallbackWithGuard(Callback cb, OHOS::UIView &view); 50 LabelOnTouchListener(Callback cb, bool isConsumed) in LabelOnTouchListener() argument 51 : cb_(cb), isConsumed_(isConsumed) {} in LabelOnTouchListener() 62 BtnOnEventListener(Callback cb, bool isConsumed) in BtnOnEventListener() argument 63 : cb_(cb), isConsumed_(isConsumed) {} in BtnOnEventListener() 77 BtnOnDragListener(Callback cb, bool isConsumed) in BtnOnDragListener() argument 78 : cb_(cb), isConsumed_(isConsumed) { in BtnOnDragListener()
|
/base/web/webview/ohos_adapter/net_connect_adapter/src/ |
D | net_connect_adapter_impl.cpp | 24 int32_t NetConnectAdapterImpl::RegisterNetConnCallback(std::shared_ptr<NetConnCallback> cb) in RegisterNetConnCallback() argument 26 if (cb == nullptr) { in RegisterNetConnCallback() 31 sptr<NetConnectCallbackImpl> callbackImpl = new (std::nothrow) NetConnectCallbackImpl(cb); in RegisterNetConnCallback() 43 netConnCallbackMap_.insert(std::make_pair(cb.get(), callbackImpl)); in RegisterNetConnCallback() 48 int32_t NetConnectAdapterImpl::UnregisterNetConnCallback(std::shared_ptr<NetConnCallback> cb) in UnregisterNetConnCallback() argument 50 if (cb == nullptr) { in UnregisterNetConnCallback() 55 auto it = netConnCallbackMap_.find(cb.get()); in UnregisterNetConnCallback()
|
/base/print/print_fwk/frameworks/innerkitsimpl/src/ |
D | print_extension_callback_stub.cpp | 87 void PrintExtensionCallbackStub::SetExtCallback(PrintExtCallback cb) in SetExtCallback() argument 89 extCb_ = cb; in SetExtCallback() 92 void PrintExtensionCallbackStub::SetPrintJobCallback(PrintJobCallback cb) in SetPrintJobCallback() argument 94 jobCb_ = cb; in SetPrintJobCallback() 97 void PrintExtensionCallbackStub::SetPrinterCallback(PrinterCallback cb) in SetPrinterCallback() argument 99 cb_ = cb; in SetPrinterCallback() 102 void PrintExtensionCallbackStub::SetCapabilityCallback(PrinterCapabilityCallback cb) in SetCapabilityCallback() argument 104 capability_ = cb; in SetCapabilityCallback()
|
/base/usb/usb_manager/test/native/mock/src/ |
D | usb_bulkcallback_mock_test.cpp | 163 sptr<UsbCallbackTest> cb = new UsbCallbackTest(); variable 164 EXPECT_NE(cb, nullptr); 168 auto ret = usbSrv_->RegBulkCallback(dev_, pipe, cb); 186 sptr<UsbCallbackTest> cb = new UsbCallbackTest(); variable 187 EXPECT_NE(cb, nullptr); 191 auto ret = usbSrv_->RegBulkCallback(dev_, pipe, cb); 209 sptr<UsbCallbackTest> cb = new UsbCallbackTest(); variable 210 EXPECT_NE(cb, nullptr); 216 auto ret = usbSrv_->RegBulkCallback(dev_, pipe, cb); 236 sptr<UsbCallbackTest> cb = new UsbCallbackTest(); variable [all …]
|
/base/security/code_signature/test/unittest/ |
D | local_code_sign_test.cpp | 147 LocalCodeSignLoadCallback cb; variable 148 cb.OnLoadSystemAbilityFail(LOCAL_CODE_SIGN_SA_ID); 159 LocalCodeSignLoadCallback cb; variable 160 cb.OnLoadSystemAbilitySuccess(LOCAL_CODE_SIGN_SA_ID - 1, nullptr); 171 LocalCodeSignLoadCallback cb; variable 172 cb.OnLoadSystemAbilitySuccess(LOCAL_CODE_SIGN_SA_ID, nullptr);
|
/base/web/webview/test/unittest/net_connect_adapter_impl_test/ |
D | net_connect_adapter_impl_test.cpp | 124 std::shared_ptr<NetConnCallbackTest> cb = std::make_shared<NetConnCallbackTest>(); variable 128 EXPECT_EQ(netConnectAdapterImpl->RegisterNetConnCallback(cb), 0); 130 EXPECT_EQ(netConnectAdapterImpl->RegisterNetConnCallback(cb), -1); 133 EXPECT_EQ(netConnectAdapterImpl->UnregisterNetConnCallback(cb), 0); 134 EXPECT_EQ(netConnectAdapterImpl->UnregisterNetConnCallback(cb), -1); 137 EXPECT_EQ(netConnectAdapterImpl->RegisterNetConnCallback(cb), 0); 139 EXPECT_EQ(netConnectAdapterImpl->UnregisterNetConnCallback(cb), -1);
|
/base/security/selinux_adapter/interfaces/policycoreutils/src/ |
D | param_checker.c | 53 union selinux_callback cb; in SelinuxSetCallback() local 54 cb.func_log = SelinuxKmsg; in SelinuxSetCallback() 55 selinux_set_callback(SELINUX_CB_LOG, cb); in SelinuxSetCallback() 56 cb.func_audit = SelinuxAuditCallback; in SelinuxSetCallback() 57 selinux_set_callback(SELINUX_CB_AUDIT, cb); in SelinuxSetCallback()
|
/base/msdp/device_status/frameworks/js/napi/interaction/coordination/include/ |
D | js_event_target.h | 41 …static void EmitJsPrepare(sptr<JsUtil::CallbackInfo> cb, const std::string& deviceId, Coordination… 42 …static void EmitJsActivate(sptr<JsUtil::CallbackInfo> cb, const std::string& deviceId, Coordinatio… 43 …static void EmitJsDeactivate(sptr<JsUtil::CallbackInfo> cb, const std::string& deviceId, Coordinat… 44 static void EmitJsGetCrossingSwitchState(sptr<JsUtil::CallbackInfo> cb, bool state); 47 napi_value CreateCallbackInfo(napi_env, napi_value handle, sptr<JsUtil::CallbackInfo> cb);
|
D | js_util.h | 68 static napi_value GetPrepareInfo(sptr<CallbackInfo> cb); 69 static napi_value GetActivateInfo(sptr<CallbackInfo> cb); 70 static napi_value GetDeactivateInfo(sptr<CallbackInfo> cb); 71 static napi_value GetCrossingSwitchStateInfo(sptr<CallbackInfo> cb);
|
/base/msdp/device_status/frameworks/js/napi/interaction/cooperate/include/ |
D | js_util_cooperate.h | 69 static napi_value GetEnableInfo(sptr<CallbackInfo> cb); 70 static napi_value GetStartInfo(sptr<CallbackInfo> cb); 71 static napi_value GetStopInfo(sptr<CallbackInfo> cb); 72 static napi_value GetStateInfo(sptr<CallbackInfo> cb);
|
D | js_event_cooperate_target.h | 50 static void EmitJsEnable(sptr<JsUtilCooperate::CallbackInfo> cb, 52 static void EmitJsStart(sptr<JsUtilCooperate::CallbackInfo> cb, 54 static void EmitJsStop(sptr<JsUtilCooperate::CallbackInfo> cb, 56 static void EmitJsGetState(sptr<JsUtilCooperate::CallbackInfo> cb, bool state); 59 …napi_value CreateCallbackInfo(napi_env, napi_value handle, sptr<JsUtilCooperate::CallbackInfo> cb);
|
/base/print/print_fwk/frameworks/innerkitsimpl/include/ |
D | print_extension_callback_stub.h | 42 void SetExtCallback(PrintExtCallback cb); 43 void SetPrintJobCallback(PrintJobCallback cb); 44 void SetPrinterCallback(PrinterCallback cb); 45 void SetCapabilityCallback(PrinterCapabilityCallback cb);
|
/base/account/os_account/test/fuzztest/account_stub/cmdgetohosaccountinfostub_fuzzer/ |
D | cmdgetohosaccountinfostub_fuzzer.cpp | 45 union selinux_callback cb; in SelinuxSetCallback() local 46 cb.func_log = SelinuxLog; in SelinuxSetCallback() 47 selinux_set_callback(SELINUX_CB_LOG, cb); in SelinuxSetCallback()
|
/base/account/os_account/test/fuzztest/account_stub/cmdqueryohosaccountinfostub_fuzzer/ |
D | cmdqueryohosaccountinfostub_fuzzer.cpp | 45 union selinux_callback cb; in SelinuxSetCallback() local 46 cb.func_log = SelinuxLog; in SelinuxSetCallback() 47 selinux_set_callback(SELINUX_CB_LOG, cb); in SelinuxSetCallback()
|