Re: SystemConfiguration Help
Re: SystemConfiguration Help
- Subject: Re: SystemConfiguration Help
- From: Quinn <email@hidden>
- Date: Thu, 28 Mar 2002 11:09:17 +0000
At 21:58 -0500 23/3/02, Ryan McGann wrote:
We'd like to use the SystemConfiguration framework to have our
application notified when one of three things happen:
1. the current networking set changes
2. the list of networking sets changes (a new set is created/a
set is deleted)
3. a set's name is changed.
Item 1 is easy. You should just put a notification on "Setup:" and
watch for the "CurrentSet" field change.
Items 2 and 3 are hard. The problem is that the SCF dynamic store
only holds references to information about the current set. You want
to know if any set, including inactive sets, has changed. This
information just isn't in the dynamic store.
Why do you need info about non-active sets? If you can give me the
big picture perhaps I can suggest a better solution.
Failing that, the best thing I can think of is to use the dynamic
store to watch the "Setup:" key for changes and, each time it
changes, check the "LastUpdated" property. This property changes
each time the dynamic store is updated from the on-disk preferences,
thus it changes any time the on-disk preferences change. When you're
notified of the prefs change you then need to manually look for
changes in inactive sets by reading the on-disk preferences using the
SCPreferencesRef APIs.
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.