Apple Network Setup manual OTCfgGetEntityLogicalName

Models: Network Setup

1 184
Download 184 pages 5.56 Kb
Page 79
Image 79
OTCfgGetEntityLogicalName

C H A P T E R 3

Network Setup Reference

entityRef On input, a pointer to a value of type CfgEntityRef (page 99) that identifies the entity reference that is to be duplicated. If the entity represented by entityRef does not exist, OTCfgDuplicateEntry returns the error kCfgErrEntityNotFound.

newEntityRef On input, a pointer to a value of type CfgEntityRef (page 99) that identifies the entity that is to be overwritten by the contents of entityRef. If entityRef represents an entity that does not reside in an area that is open for writing, OTCfgDuplicateEntity returns the error kCfgErrAreaNotOpen or kCfgErrLocked.

function result A value of noErr indicates that OTCfgDuplicateEntity returned successfully. For a list of other possible result codes, see “Result Codes” (page 110).

DISCUSSION

The OTCfgDuplicateEntity function copies the contents of the entity specified by entityRef to the entity specified by newEntityRef. Any data stored in newEntityRef before OTCfgDuplicateEntity is called is overwritten by the contents of entityRef when OTCfgDuplicateEntity returns.

OTCfgGetEntityLogicalName

Obtains the user-visible name of an entity.

OSStatus OTCfgGetEntityLogicalName( CfgDatabaseRef dbRef, const CfgEntityRef *entityRef, Str255 entityName );

dbRef

On input, a value of type CfgDatabaseRef (page 98) that

 

represents a database session previously opened by calling

 

OTCfgOpenDatabase (page 58).

entityRef

On input, a pointer to a value of type CfgEntityRef (page 99)

 

that identifies the entity whose name is to be obtained. To obtain

 

the reference for an entity, call OTCfgGetEntitiesList (page 74).

entityName

On input, a value of type Str255. On output, entityName contains

 

the user-visible name of the entity represented by entityRef.

Network Setup Functions

79

Page 79
Image 79
Apple Network Setup manual OTCfgGetEntityLogicalName