Notes for third parties, Storing third-party preferences in apple entities, Network setup and third-party protocol stacks – Apple Network Setup User Manual

Page 55

Advertising
background image

C H A P T E R 2

Using Network Setup

Notes for Third Parties

55

DTS Technote 1119 Serial Port Apocrypha available at
http://developer.apple.com/technotes/tn/tn1119.html.

Notes for Third Parties

2

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

2

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

2

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.

Advertising