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



That API doesn't queue.  You need to wait until a user logs in before you
actually call it, otherwise the message goes into the bit-bucket.

Before Panther, you can check for a user being logged in because userid (a
global kernel variable, I think that's the right name) will be non-zero.
Unfortunately, if root logs in, you'll never know (it's id 0, as is login
window).

In the newer versions of Mac OS X, you get an error back
KUNCUserNotificationDisplayNotice() and can use that to queue a timer
routine to try posting the error again (and again, and again) until the user
finally logs in and sees it.

Mark
-- 
Mark Cookson
M-Audio, a division of Avid
225 Locust St.
Hudson, WI 54016

On 2/23/05 1:11 PM, "Harland Harrison" <email@hidden> 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

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.