C H A P T E R 3

Network Setup Reference

itemCount On input, a pointer to a value of type ItemCount. On output, itemCount contains the number of entities that matched the specified class and type.

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

DISCUSSION

The OTCfgGetEntitiesCount function obtains the number of entities of the specified class and type in the specified area. With the number of entities, you can call OTCfgGetEntitiesList (page 74) to get the list of entities in the area.

OTCfgGetEntitiesList

Obtains information about entities in an area.

OSStatus OTCfgGetEntitiesList (CfgDatabaseRef dbRef,

CfgAreaID areaID,

CfgEntityClass entityClass,

CfgEntityType entityType,

ItemCount* itemCount,

CfgEntityRef entityRef[],

CfgEntityInfo entityInfo[]);

dbRef

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

 

represents a database session previously opened by calling

 

OTCfgOpenDatabase (page 58).

areaID

On input, a value of type CfgAreaID (page 98) that identifies the

 

area that is to be searched. If the area specified by areaID does

 

not exist, OTCfgGetEntitiesCount returns the error

 

kCfgErrAreaNotFound.

entityClass

On input, a value of type CfgEntityClass that specifies the class

 

that is to be matched. To specify all classes, set entityClass to

 

kCfgClassAnyEntity. For a list of possible classes, see “Entity

 

Classes and Types” (page 104).

74Network Setup Functions

Page 74
Image 74
Apple Network Setup manual OTCfgGetEntitiesList, Obtains information about entities in an area