Adds a new member to a conference.
DWORD cnfJoinConference ( CNFRESOURCEHD cnfresourcehd, DWORD confid, CNF_MEMBER_PARMS *parms, DWORD *memberid)
|
Argument |
Description |
|
cnfresourcehd |
Handle returned by cnfOpenResource. |
|
confid |
Conference identifier returned by cnfCreateConference. |
|
parms |
Pointer to a CNF_MEMBER_PARMS structure: typedef struct If parms is NULL, take the default parameters. |
|
memberid |
Pointer to a returned member identifier. |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_BAD_ARGUMENT |
memberid is a NULL pointer. |
|
CTAERR_BOARD_ERROR |
New member cannot be added because of an HMIC limitation or on-board memory limitation (only with AG 2000 boards). This happens only when the member is added on-the-fly without being allocated. |
|
CTAERR_INVALID_HANDLE |
cnfresourcehd is not a valid conference resource handle. |
|
CNFERR_BOARD_TIMEOUT |
Board timed out while waiting for a response message. |
|
CNFERR_INVALID_IDENTIFIER |
confid is not a valid conference identifier. |
|
CNFERR_INVALID_PARAMETER |
parms is inconsistent or out of range. |
|
CNFERR_NOT_ENOUGH_RESOURCE_SPACE |
Member cannot be added because the conference resource is full. Either the number of reserved seats with the requested capabilities is exhausted, or the number of conference IDs for that resource is exhausted. There are only 255 conference IDs per conference resource. |
cnfJoinConference adds a new member to a conference specified by confid. If the function succeeds, the new member identifier is returned in memberid.
The default values of member attributes are taken from the corresponding Natural Access parameters. To enable the new member to talk, set the talker_enable parameter in the Natural Access parameter section of cnf.cfg, or set the attribute in the application by using cnfSetMemberAttribute or cnfSetMemberAttributeList.
Refer to Adding members to a conference for more information.
cnfGetMemberInfo, cnfLeaveConference
extern CNFRESOURCEHD cnfresourcehd;
DWORD myJoinConference(DWORD confid, DWORD *memberid)
{
DWORD error;
CNF_MEMBER_INFO memberinfo;
error = cnfJoinConference (cnfresourcehd, confid, NULL,
&memberid);
if (error != SUCCESS)
{
printf("Error when joining conference : %d", error);
return(error);
}
error = cnfGetMemberInfo (cnfresourcehd, *memberid,
&memberinfo, sizeof(CNF_MEMBER_INFO));
/* Perform switching operation by using memberinfo.stream and timeslot */
error = cnfSetMemberAttribute (cnfresourcehd, *memberid,
MEMBER_ATTR_TALKER_ENABLE, TRUE);
return(error);
}