MCPcopy Create free account
hub / github.com/USBToolBox/kext / matchingCallback

Method matchingCallback

USBToolBox/USBToolBox.cpp:411–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411bool USBToolBox::matchingCallback(OSDictionary* matchingDict, IOService* newService, IONotifier* notifier) {
412 DEBUGLOGPROV("controller callback start");
413 newService->retain();
414 // These actions are synchronized with invocations of the notification handler, so removing a notification request will guarantee the handler is not being executed.
415 notifier->remove();
416 mergeProperties(newService);
417 // addMatchingNotification does not consume a reference on the matching dictionary when the notification is removed, unlike addNotification.
418 // Should never be null, but better safe than sorry.
419 OSSafeReleaseNULL(matchingDict);
420
421 SYSTEMLOGPROV("Controller notifier callback finished, goodbye!");
422 terminate();
423 return true;
424}
425
426bool USBToolBox::_matchingCallback(void* target, void* matchingDict, IOService* newService, IONotifier* notifier) {
427 return static_cast<USBToolBox*>(target)->matchingCallback(static_cast<OSDictionary*>(matchingDict), newService, notifier);

Callers 1

_matchingCallbackMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected