Table of Contents Index NMS Glossary Previous Page Next Page (Page 13 of 23 in this chapter) Version


cnfGetResourceInfo

Description

Returns an information structure about a conferencing resource.

Prototype

DWORD cnfGetResourceInfo (
CNFRESOURCEHD cnfresourcehd,
CNF_RESOURCE_INFO *resourceinfo,
unsigned size)

cnfresourcehd Handle returned by cnfOpenResource.

resourceinfo Pointer to a CNF_RESOURCE_INFO structure:

typedef struct
{
DWORD size; /* size of the structure */
DWORD board; /* AG board number */
DWORD boardtype; /* type of AG board */
DWORD capabilities; /* capabilities currently available */
DWORD conference; /* number of conferences currently running */
DWORD max_members; /* maximum number of members */
DWORD available_members; /* number of members currently */
/* available */
} CNF_RESOURCE_INFO;
See the Details section for a description of these fields.

size The maximum size of the buffer pointed by resourceinfo.

Return Values

Details

This function returns the information structure corresponding to the resource designated by cnfresourcehd. Upon returning from a function, the CNF_RESOURCE_INFO size field contains the actual number of bytes written.

The CNF_RESOURCE_INFO structure contains the following fields:
Field

Description

size

Number of bytes written to the buffer pointed to by resourceinfo.

board

Number of the board where the conferencing resource is located (declared in ag.cfg and cnf.cfg).

boardtype

Type of board as declared in cnf.cfg. CNF_BOARDTYPE_AG2000, CNF_BOARDTYPE_AG4000, and CNF_BOARDTYPE_AG4000C are the board types that support NaturalConference.

capabilities

A bitmask representing capabilities provided by the conferencing resource. The supported capabilities are defined in cnfdef.h. They are:

CNF_RESCAP_AUTO_GAIN_CONTROL

CNF_RESCAP_TALKER_PRIVILEGE

CNF_RESCAP_ACTIVE_TALKER

CNF_RESCAP_DTMF_CLAMPING

CNF_RESCAP_TONE_CLAMPING

CNF_RESCAP_ECHO_CANCELER

CNF_RESCAP_MAPPING

conference

Number of conferences currently running on the resource.

max_members

Maximum number of members the resource can manage if using the full resource capabilities.

available_members

Number of members available for creating a new conference using the full resource capabilities.

For more information, refer to Section 4.5, Creating Conferences.

See Also

cnfCloseResource, cnfGetConferenceList, cnfGetResourceList, cnfOpenResource

Example


DWORD getResourceUsage(CNFRESOURCEHD cnfresourcehd,
INT32 *percentage)
{
DWORD error; CNF_RESOURCE_INFO resourceinfo; error = cnfGetResourceInfo (cnfresourcehd, &resourceinfo, sizeof(CNF_RESOURCE_INFO));
*percentage = 100 - (resourceinfo.available_members /
resourceinfo.max_member * 100);
return(error); }


Table of Contents Index NMS Glossary Previous Page Next Page (Page 13 of 23 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.