/base/sensors/medical_sensor/frameworks/native/medical_sensor/src/ |
D | my_file_descriptor_listener.cpp | 39 void MyFileDescriptorListener::OnReadable(int32_t fileDescriptor) in OnReadable() argument 42 if (fileDescriptor < 0) { in OnReadable() 43 HiLog::Error(LABEL, "%{public}s fileDescriptor: %{public}d", __func__, fileDescriptor); in OnReadable() 47 FileDescriptorListener::OnReadable(fileDescriptor); in OnReadable() 51 int32_t len = recv(fileDescriptor, receiveDataBuff_, maxLen, NULL); in OnReadable() 66 len = recv(fileDescriptor, receiveDataBuff_, maxLen, NULL); in OnReadable() 70 void MyFileDescriptorListener::OnWritable(int32_t fileDescriptor) {} in OnWritable() argument 77 void MyFileDescriptorListener::OnShutdown(int32_t fileDescriptor) in OnShutdown() argument 79 if (fileDescriptor < 0) { in OnShutdown() 80 HiLog::Error(LABEL, "%{public}s param is error: %{public}d", __func__, fileDescriptor); in OnShutdown() [all …]
|
/base/sensors/sensor/frameworks/native/sensor/src/ |
D | sensor_file_descriptor_listener.cpp | 47 void SensorFileDescriptorListener::OnReadable(int32_t fileDescriptor) in OnReadable() argument 49 if (fileDescriptor < 0) { in OnReadable() 50 SEN_HILOGE("fileDescriptor:%{public}d", fileDescriptor); in OnReadable() 59 recv(fileDescriptor, receiveDataBuff_, sizeof(SensorData) * RECEIVE_DATA_SIZE, 0); in OnReadable() 75 len = recv(fileDescriptor, receiveDataBuff_, sizeof(SensorData) * RECEIVE_DATA_SIZE, 0); in OnReadable() 84 void SensorFileDescriptorListener::OnShutdown(int32_t fileDescriptor) in OnShutdown() argument 86 if (fileDescriptor < 0) { in OnShutdown() 87 SEN_HILOGE("Invalid fd:%{public}d", fileDescriptor); in OnShutdown() 97 void SensorFileDescriptorListener::OnException(int32_t fileDescriptor) in OnException() argument 99 if (fileDescriptor < 0) { in OnException() [all …]
|
/base/notification/eventhandler/frameworks/eventhandler/test/unittest/ |
D | lib_event_epoll_io_waiter_test.cpp | 76 int32_t fileDescriptor = -1; variable 78 bool result = epollIoWaiter.AddFileDescriptor(fileDescriptor, events); 80 epollIoWaiter.RemoveFileDescriptor(fileDescriptor); 96 int32_t fileDescriptor = 1; variable 98 bool result = epollIoWaiter.AddFileDescriptor(fileDescriptor, events); 100 epollIoWaiter.RemoveFileDescriptor(fileDescriptor); 116 int32_t fileDescriptor = 1; variable 118 bool result = epollIoWaiter.AddFileDescriptor(fileDescriptor, events);
|
/base/web/webview/ohos_adapter/event_handler_adapter/src/ |
D | event_handler_adapter_impl.cpp | 29 void EventHandlerFDListenerAdapterImpl::OnReadable(int32_t fileDescriptor) in OnReadable() argument 32 listener_->OnReadable(fileDescriptor); in OnReadable() 42 …int32_t fileDescriptor, uint32_t events, const std::shared_ptr<EventHandlerFDListenerAdapter>& lis… in AddFileDescriptorListener() argument 49 …return eventHandler_->AddFileDescriptorListener(fileDescriptor, events, fileDescriptorListener) ==… in AddFileDescriptorListener() 52 void EventHandlerAdapterImpl::RemoveFileDescriptorListener(int32_t fileDescriptor) in RemoveFileDescriptorListener() argument 55 eventHandler_->RemoveFileDescriptorListener(fileDescriptor); in RemoveFileDescriptorListener()
|
/base/notification/eventhandler/test/fuzztest/filedescriptorlistener_fuzzer/ |
D | filedescriptorlistener_fuzzer.cpp | 30 int32_t fileDescriptor = U32_AT(reinterpret_cast<const uint8_t*>(data)); in DoSomethingInterestingWithMyAPI() local 32 listener -> OnReadable(fileDescriptor); in DoSomethingInterestingWithMyAPI() 33 listener -> OnWritable(fileDescriptor); in DoSomethingInterestingWithMyAPI() 34 listener -> OnShutdown(fileDescriptor); in DoSomethingInterestingWithMyAPI() 35 listener -> OnException(fileDescriptor); in DoSomethingInterestingWithMyAPI()
|
/base/sensors/medical_sensor/frameworks/native/medical_sensor/include/ |
D | my_file_descriptor_listener.h | 37 void OnReadable(int32_t fileDescriptor) override; 39 void OnWritable(int32_t fileDescriptor) override; 41 void OnShutdown(int32_t fileDescriptor) override; 43 void OnException(int32_t fileDescriptor) override;
|
/base/notification/eventhandler/frameworks/eventhandler/src/ |
D | epoll_io_waiter.cpp | 34 inline int32_t EpollCtrl(int32_t epollFd, int32_t operation, int32_t fileDescriptor, uint32_t epoll… in EpollCtrl() argument 38 .data = {.fd = fileDescriptor}, in EpollCtrl() 41 return epoll_ctl(epollFd, operation, fileDescriptor, &epollEvent); in EpollCtrl() 206 bool EpollIoWaiter::AddFileDescriptor(int32_t fileDescriptor, uint32_t events) in AddFileDescriptor() argument 208 if ((fileDescriptor < 0) || ((events & FILE_DESCRIPTOR_EVENTS_MASK) == 0)) { in AddFileDescriptor() 209 … HILOGE("AddFileDescriptor(%{public}d, %{public}u): Invalid parameter", fileDescriptor, events); in AddFileDescriptor() 228 if (EpollCtrl(epollFd_, EPOLL_CTL_ADD, fileDescriptor, epollEvents) < 0) { in AddFileDescriptor() 238 void EpollIoWaiter::RemoveFileDescriptor(int32_t fileDescriptor) in RemoveFileDescriptor() argument 240 if (fileDescriptor < 0) { in RemoveFileDescriptor() 241 … HILOGE("RemoveFileDescriptor: Invalid param while removing fd, fd = %{public}d", fileDescriptor); in RemoveFileDescriptor() [all …]
|
D | native_implement_eventhandler.cpp | 156 int32_t fileDescriptor, uint32_t events, const FileDescriptorCallbacks *fdCallbacks) const in AddFileDescriptorListener() argument 160 fileDescriptor, events, nativeFileDescriptorListener); in AddFileDescriptorListener() 163 void EventRunnerNativeImplement::RemoveFileDescriptorListener(int32_t fileDescriptor) const in RemoveFileDescriptorListener() 165 eventRunner_->GetEventQueue()->RemoveFileDescriptorListener(fileDescriptor); in RemoveFileDescriptorListener()
|
D | event_queue.cpp | 375 … int32_t fileDescriptor, uint32_t events, const std::shared_ptr<FileDescriptorListener> &listener) in AddFileDescriptorListener() argument 377 if ((fileDescriptor < 0) || ((events & FILE_DESCRIPTOR_EVENTS_MASK) == 0) || (!listener)) { in AddFileDescriptorListener() 379 fileDescriptor, in AddFileDescriptorListener() 389 auto it = listeners_.find(fileDescriptor); in AddFileDescriptorListener() 391 …E("AddFileDescriptorListener: File descriptor %{public}d is already in listening", fileDescriptor); in AddFileDescriptorListener() 399 if (!ioWaiter_->AddFileDescriptor(fileDescriptor, events)) { in AddFileDescriptorListener() 404 listeners_.emplace(fileDescriptor, listener); in AddFileDescriptorListener() 429 void EventQueue::RemoveFileDescriptorListener(int32_t fileDescriptor) in RemoveFileDescriptorListener() argument 431 if (fileDescriptor < 0) { in RemoveFileDescriptorListener() 432 HILOGE("RemoveFileDescriptorListener(%{public}d): Invalid file descriptor", fileDescriptor); in RemoveFileDescriptorListener() [all …]
|
/base/notification/eventhandler/frameworks/test/moduletest/ |
D | event_handler_fd_listener_module_test.cpp | 61 void OnReadable(int32_t fileDescriptor) override in OnReadable() argument 63 if (fileDescriptor < 0) { in OnReadable() 68 FileDescriptorListener::OnReadable(fileDescriptor); in OnReadable() 72 ssize_t retVal = read(fileDescriptor, message, sizeof(message) - 1); in OnReadable() 79 void OnWritable(int32_t fileDescriptor) override in OnWritable() argument 81 if (fileDescriptor < 0) { in OnWritable() 86 FileDescriptorListener::OnWritable(fileDescriptor); in OnWritable() 95 handler->RemoveFileDescriptorListener(fileDescriptor); in OnWritable() 96 auto f = [fileDescriptor]() { write(fileDescriptor, "test", sizeof("test")); }; in OnWritable() 102 void OnShutdown(int32_t fileDescriptor) override in OnShutdown() argument [all …]
|
D | event_handler_press_module_test.cpp | 84 void OnReadable(int32_t fileDescriptor) override in OnReadable() argument 88 ssize_t retVal = read(fileDescriptor, message, sizeof(message) - 1); in OnReadable() 95 void OnWritable(int32_t fileDescriptor) override in OnWritable() argument 99 handler->RemoveFileDescriptorListener(fileDescriptor); in OnWritable() 105 … auto f = [fileDescriptor, message]() { write(fileDescriptor, message.c_str(), message.size()); }; in OnWritable()
|
/base/notification/eventhandler/interfaces/inner_api/ |
D | file_descriptor_listener.h | 45 virtual void OnReadable(int32_t fileDescriptor); 52 virtual void OnWritable(int32_t fileDescriptor); 59 virtual void OnShutdown(int32_t fileDescriptor); 66 virtual void OnException(int32_t fileDescriptor);
|
D | native_implement_eventhandler.h | 73 int32_t fileDescriptor, uint32_t events, const FileDescriptorCallbacks *fdCallbacks) const; 80 void RemoveFileDescriptorListener(int32_t fileDescriptor) const;
|
/base/sensors/sensor/frameworks/native/sensor/include/ |
D | sensor_file_descriptor_listener.h | 30 void OnReadable(int32_t fileDescriptor) override; 31 void OnShutdown(int32_t fileDescriptor) override; 32 void OnException(int32_t fileDescriptor) override;
|
/base/web/webview/ohos_adapter/interfaces/ |
D | event_handler_adapter.h | 28 virtual void OnReadable(int32_t fileDescriptor) = 0; 38 …int32_t fileDescriptor, uint32_t events, const std::shared_ptr<EventHandlerFDListenerAdapter>& lis… 40 virtual void RemoveFileDescriptorListener(int32_t fileDescriptor) = 0;
|
/base/notification/eventhandler/frameworks/native/src/ |
D | native_interface_eventhandler.cpp | 61 …unnerAddFileDescriptorListener(const EventRunnerNativeImplement *nativeObj, int32_t fileDescriptor, in EventRunnerAddFileDescriptorListener() argument 68 return nativeObj->AddFileDescriptorListener(fileDescriptor, events, fileDescriptorCallbacks); in EventRunnerAddFileDescriptorListener() 71 …erRemoveFileDescriptorListener(const EventRunnerNativeImplement *nativeObj, int32_t fileDescriptor) in EventRunnerRemoveFileDescriptorListener() argument 77 nativeObj->RemoveFileDescriptorListener(fileDescriptor); in EventRunnerRemoveFileDescriptorListener()
|
/base/web/webview/ohos_adapter/event_handler_adapter/include/ |
D | event_handler_adapter_impl.h | 30 void OnReadable(int32_t fileDescriptor) override; 42 bool AddFileDescriptorListener(int32_t fileDescriptor, uint32_t events, 45 void RemoveFileDescriptorListener(int32_t fileDescriptor) override;
|
/base/usb/usb_manager/test/native/js_unittest/ |
D | UsbCoreJsunit.test.js | 273 var fileDescriptor = usb.getFileDescriptor(gPipe); 274 console.info('usb case getFileDescriptor ret: ' + fileDescriptor); 296 var fileDescriptor = usb.getFileDescriptor(tempPipe); 297 expect(fileDescriptor < 0).assertTrue(); 298 console.info('usb case getFileDescriptor ret: ' + fileDescriptor); 318 var fileDescriptor = usb.getFileDescriptor(tempPipe); 319 expect(fileDescriptor < 0).assertTrue(); 320 console.info('usb case getFileDescriptor ret: ' + fileDescriptor); 340 var fileDescriptor = usb.getFileDescriptor(tempPipe); 341 expect(fileDescriptor < 0).assertTrue(); [all …]
|
/base/notification/eventhandler/test/fuzztest/noneiowaiter_fuzzer/ |
D | noneiowaiter_fuzzer.cpp | 27 int32_t fileDescriptor = U32_AT(reinterpret_cast<const uint8_t*>(data)); in DoSomethingInterestingWithMyAPI() local 30 noneIoWaiter.AddFileDescriptor(fileDescriptor, events); in DoSomethingInterestingWithMyAPI() 31 noneIoWaiter.RemoveFileDescriptor(fileDescriptor); in DoSomethingInterestingWithMyAPI()
|
/base/notification/eventhandler/interfaces/kits/native/ |
D | native_interface_eventhandler.h | 144 …entRunnerAddFileDescriptorListener(const EventRunnerNativeImplement *nativeObj, int fileDescriptor, 157 …unnerRemoveFileDescriptorListener(const EventRunnerNativeImplement *nativeObj, int fileDescriptor);
|
/base/notification/eventhandler/frameworks/eventhandler/include/ |
D | io_waiter.h | 70 virtual bool AddFileDescriptor(int32_t fileDescriptor, uint32_t events) = 0; 77 virtual void RemoveFileDescriptor(int32_t fileDescriptor) = 0;
|
D | none_io_waiter.h | 41 bool AddFileDescriptor(int32_t fileDescriptor, uint32_t events) final; 42 void RemoveFileDescriptor(int32_t fileDescriptor) final;
|
D | epoll_io_waiter.h | 48 bool AddFileDescriptor(int32_t fileDescriptor, uint32_t events) final; 49 void RemoveFileDescriptor(int32_t fileDescriptor) final;
|
/base/notification/eventhandler/test/fuzztest/epolliowaiter_fuzzer/ |
D | epolliowaiter_fuzzer.cpp | 31 int32_t fileDescriptor = U32_AT(reinterpret_cast<const uint8_t*>(data)); in DoSomethingInterestingWithMyAPI() local 34 epollIoWaiter.RemoveFileDescriptor(fileDescriptor); in DoSomethingInterestingWithMyAPI()
|
/base/notification/eventhandler/test/fuzztest/nativeimplementeventhandler_fuzzer/ |
D | nativeimplementeventhandler_fuzzer.cpp | 30 int32_t fileDescriptor = U32_AT(reinterpret_cast<const uint8_t*>(data)); in DoSomethingInterestingWithMyAPI() local 32 eventRunnerNativeImplement.RemoveFileDescriptorListener(fileDescriptor); in DoSomethingInterestingWithMyAPI()
|