void PAVirtualDeviceUserClient::sendNotification(UInt32 notificationType, UInt32 value) { if (!notificationReadDescriptor) return; clock_sec_t secs; clock_nsec_t nanosecs; clock_get_system_nanotime (&secs, &nanosecs); notificationBlock no; no.timeStampSec = secs; no.timeStampNanoSec = nanosecs; no.notificationType = notificationType; no.value = value; if (notificationReadDescriptor->prepare() != kIOReturnSuccess) { IOLog("%s(%p): notificationReadDescriptor->prepare() failed!\n", getName(), this); notificationReadDescriptor->release(); notificationReadDescriptor = NULL; return; } notificationReadDescriptor->writeBytes(0, &no, sizeof(no)); notificationReadDescriptor->complete(); sendAsyncResult64(notificationReadReference, kIOReturnSuccess, NULL, 0); }
void org_pqrs_driver_KeyRemap4MacBook_UserClient_kext::send_notification_to_userspace(uint32_t type, uint32_t option) { if (notification_enabled_) { io_user_reference_t args[] = { type, option }; sendAsyncResult64(asyncref_, kIOReturnSuccess, args, 2); } }
void USERCLIENT_KEXT_CLASSNAME::send_notification_to_userspace(uint32_t type, uint32_t option) { if (notification_enabled_) { io_user_reference_t args[] = { type, option }; sendAsyncResult64(asyncref_, kIOReturnSuccess, args, 2); } }
void info_ennowelbers_syphon_proxyframebuffer_client::FireCursorImageChanged() { if(eventEnabled) { #ifdef __LP64__ io_user_reference_t type[1]={(io_user_reference_t)kEWProxyCursorImageChanged}; sendAsyncResult64(eventFunction,kIOReturnSuccess, type,1); #else void *type[1]={(void*)kEWProxyCursorImageChanged}; sendAsyncResult(eventFunction,kIOReturnSuccess, type,1); #endif } }
void info_ennowelbers_syphon_proxyframebuffer_client::FireCursorStateChanged() { if(eventEnabled) { //With the help of a previously registered event we're firing it. #ifdef __LP64__ io_user_reference_t type[1]={(io_user_reference_t)kEWProxyCursorStateChanged}; sendAsyncResult64(eventFunction, kIOReturnSuccess,type,1); #else void *type[1]={(void*)kEWProxyCursorStateChanged}; sendAsyncResult(eventFunction, kIOReturnSuccess, type, 1); #endif } }
void SoftU2FUserClient::frameReceivedGated(IOMemoryDescriptor *report) { IOLog("%s[%p]::%s(%p)\n", getName(), this, __FUNCTION__, report); IOMemoryMap *reportMap = nullptr; if (isInactive()) return; if (report->prepare() != kIOReturnSuccess) return; reportMap = report->map(); // Notify userland that we got a report. if (_notifyRef && reportMap->getLength() == sizeof(U2FHID_FRAME)) { io_user_reference_t *args = (io_user_reference_t *)reportMap->getAddress(); sendAsyncResult64(*_notifyRef, kIOReturnSuccess, args, sizeof(U2FHID_FRAME) / sizeof(io_user_reference_t)); } reportMap->release(); report->complete(); }