Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User notifications at boot time



Harland,

The return code you are seeing indicates that the notification request was delivered to the user notification daemon, not that it was actually presented to the user. Unfortunately, there is no way to know when it is safe to post messages (this is a deficiency in the design).

In cases where the notification is critical, the only workaround I'm aware of is to use the execute function of KUNC to launch a helper utility (typically in your kext bundle) that posts the alert itself, and signals the driver to let it know it was posted. If the driver doesn't get notified by the helper within some period of time (say 15 seconds), it calls KUNC again, repeating until it gets an ack. It is a pretty complicated workaround, but it can be made to work reliably.
- Dean



On Feb 23, 2005, at 11:11, Harland Harrison wrote:

Hi Rhoads,

Thanks.  The code in IOUSBDevice.cpp looks similar to what I am using.
I have not gotten it to work.  The problem seems to be that
KUNCUserNotificationDisplayNotice returns kIOReturnSuccess,
even though nothing was displayed on the screen.

This only fails at boot time. If the device is hot-plugged, the message appears.

Harland Harrison
2Wire.com

-----Original Message-----
From: Rhoads Hollowell [mailto:email@hidden]
Sent: Mon 2/21/2005 9:03 AM
To: Harland Harrison
Cc: email@hidden
Subject: Re: User notifications at boot time

Hi Harland,

If you look in the IOUSBFamily sources in Darwin, specifically in
IOUSBDevice.cpp, you can see what we do for our system messages.

Basically, the call will fail if the system is not yet up, so we wait
30 seconds and try again.

Rhoads Hollowell
USB Software Team
Apple Computer, Inc.

On Feb 18, 2005, at 2:33 PM, Harland Harrison wrote:
My driver uses the  Kernel User Notification API,
KUNCUserNotificationDisplayNotice,
to show a message to the user.  If the USB device is hot-plugged, the
message works
correctly.  If the device is present at boot time, however, the user
sees nothing. The
kern_return_t   is  0 both cases.  Delaying the message until the
Finder is fully
running seems to fix the problem.

Is there any way to know when the Kernel User Notification API is
available?

_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden
References: 
 >RE: User notifications at boot time (From: "Harland Harrison" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.