C H A P T E R 3

Network Setup Reference

Notification Callback Routine

Receives notifications of changes to the Network Setup database.

typedef CALLBACK_API_C( void, OTNotifyProcPtr ) (

 

void *contextPtr,

 

OTEventCode code,

 

OSStatus result,

 

void *cookie);

contextPtr

A pointer to the untyped value that was specified when you

 

called OTCfgInstallNotifier (page 94) to install the notification

 

callback routine.

code

A value of type OTEventCode.Your notification callback routine

 

should ignore callbacks when this is any value other than

 

kCfgDatabaseChanged.

result

A notification-dependent value of type OSStatus. When the

 

value of code is kCfgDatabaseChanged, the value of result is

 

kCfgErrDatabaseChanged.

cookie

Reserved.

DISCUSSION

Your notification callback routine is called at system task time (but not necessarily in the context of your application) when a change occurs to the database. When your notification callback routine is called, you should reread any preferences that were previously read.

Network Setup Structures and Data Types

This section describes structures used by the Network Setup functions. The structures and data types are

CfgDatabaseRef (page 98), which refers to an open database session.

CfgAreaID (page 98), which identifies an area.

CfgEntityRef (page 99), which refers to an open entity.

Network Setup Structures and Data Types

97

Page 97
Image 97
Apple manual Network Setup Structures and Data Types, Notification Callback Routine