• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Notification on network config change
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Notification on network config change (From: Patrice Goetghebeur <email@hidden>)

  • Prev by Date: Re: People who develop with MySQL and/or other GPL based code
  • Next by Date: Re: People who develop with MySQL and/or other GPL based code
  • Previous by thread: Notification on network config change
  • Next by thread: NSBrowser binding
  • Index(es):
    • Date
    • Thread