Re: Notification on network config change
Re: Notification on network config change
- Subject: Re: Notification on network config change
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 31 Dec 2003 15:53:39 -0800
On Dec 31, 2003, at 9:19 AM, Patrice Goetghebeur wrote:
I would need to get a cocoa notification when the network config has
changed.
I've read the Apple technote on that page:
http://developer.apple.com/technotes/tn/tn1145.html where they show a
SCF function to get notified on IPv4 changes, but I'm a little confuse
how to get a NSNotication from that.... (especially how to initialise
the parameters).
You have to use SystemConfiguration to create a dynamic store, set a
callback that gets called under the conditions you want, and plug that
dynamic store into the run loop. Then, in the callback, you can have it
post a notification to the notification center.
Last time I had to do this, there was sample code on
<
http://developer.apple.com/> that shows how to do this, but you need
to search around for it...
Nick Zitzmann
<
http://seiryu.home.comcast.net/>
S/MIME signature available upon request
"That's a funny thing to promise. Well, you can't never let anything
happen to him [Nemo]; then, nothing would ever happen to him." - Dory,
from the movie "Finding Nemo"
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.