Otcfggetentitieslist – Apple Network Setup User Manual

Page 74

Advertising
background image

C H A P T E R 3

Network Setup Reference

74

Network Setup Functions

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

3

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).

Advertising