Apple Network Setup Notes for Third Parties, Storing Third-party Preferences in Apple Entities

Models: Network Setup

1 184
Download 184 pages 5.56 Kb
Page 55
Image 55
Notes for Third Parties

C H A P T E R 2

Using Network Setup

DTS Technote 1119 Serial Port Apocrypha available at

http://developer.apple.com/technotes/tn/tn1119.html.

Notes for Third Parties

This section contains miscellaneous hints and tips for third-party developers who want to use Network Setup to store their own preferences.

Storing Third-party Preferences in Apple Entities

It is reasonable for third-party developers to store custom preferences inside Apple Computer’s protocol entities. For example, a TCP/IP virtual private network (VPN) implementation might store per-connection preferences inside Apple Computer’s TCP/IP network connection entity. This is perfectly legal — in fact it is encouraged — but you need to follow one important rule: The preference type for your preference must be registered as a unique creator code with DTS at http://developer.apple.com/dev/cftype. Registering preference types will prevent two different developers from using the same preference type for conflicting preferences.

Network Setup and Third-party Protocol Stacks

If you're writing a third-party protocol stack, you can use the Network Setup database to store your preferences in much the same way as the Apple protocol stacks do. There are a few important things to remember.

It is recommended that you use the existing classes,

kOTCfgClassNetworkConnection and kOTCfgClassGlobalSettings, for your global protocol and network connection entities.

You should register a unique creator code with DTS at

http://developer.apple.com/dev/cftype and use it as the type for your entities. This will ensure that your work does not conflict with Apple Computer or other developers.

Your protocol stack configurator should call OTCfgInstallNotifier (page 94) to install a Network Setup notifier to watch for changes to its preferences by your control panel or by third-party software.

Notes for Third Parties

55

Page 55
Image 55
Apple Network Setup manual Notes for Third Parties, Storing Third-party Preferences in Apple Entities