Creating a Meeting
CreateConf
API Description
This API is used to create an instant meeting.
Precautions
- By default, this API enables you to join a meeting as a host. During API calling, there is no need to add your information to the participant parameters.
- If other participants need to be invited, their information needs to be transferred. If other participants are not required to join the meeting, participant details and the number of participants can be empty.
- This API is an asynchronous API. The return value only indicates whether the API is successfully called. The actual service processing result is returned in the corresponding callback function.
Method Definition
1
|
HWM_SDK_AGENT_API hwmsdk::HwmErrCode CreateConf(HwmCreateConfInfo *createConfInfo, HwmConfAttendee *attendees, unsigned int count); |
Callback Function
1
|
virtual void OnCreateConfResult(hwmsdk::HwmErrCode ret, const char* reason) {}; |
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
createConfInfo |
Yes |
HwmCreateConfInfo |
Meeting details. |
attendees |
No |
HwmConfAttendee |
Participant details. If participants are not required, leave this parameter empty. |
count |
No |
unsigned int |
Number of participants. If participants are not required, set this parameter to 0. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
subject |
Yes |
char[] |
Meeting topic. |
meetingType |
Yes |
HwmConfMediaType |
Meeting type. |
needPassword |
No |
bool |
Whether a meeting password is required.
NOTE:
This parameter is valid only for meetings with a random ID. |
isAutoRecord |
No |
bool |
Whether to enable automatic meeting recording. If automatic meeting recording is enabled, the meeting can be recorded by default even meeting recording is disabled.
NOTE:
This parameter is valid only for cloud recording, not for local recording on clients. |
allowRecord |
No |
bool |
Whether meeting recording is supported.
NOTE:
This parameter is valid only for cloud recording, not for local recording on clients. |
callInRestriction |
No |
HwmJoinConfPermissionType |
Participants who are allowed to join the meeting. By default, everyone is allowed. |
vmrId |
No |
char[] |
Unique cloud meeting room ID. To schedule a meeting with a random meeting ID, set this parameter to an empty string. |
vmrConfIdType |
No |
HwmVmrConfIdType |
ID type of the cloud meeting room. |
guestPwd |
No |
char[] |
Password of a common participant. If this parameter is left empty, the server randomly generates a value.
NOTE:
This parameter is valid only for meetings with a random ID. |
isOpenWaitingRoom |
No |
bool |
Whether to enable the waiting room.
NOTE:
The function takes effect only after the waiting room function is enabled. |
duration |
No |
int |
Meeting duration, in minutes. The value ranges from 15 to 1440. Note: If this parameter is left blank, the server uses the default meeting duration. |
Enumerated Value |
Description |
---|---|
HWM_AUDIO_AND_DATA |
Voice and data meeting. |
HWM_VIDEO_AND_DATA |
Video and data meeting. |
Enumerated Value |
Description |
---|---|
RESTRICTION_CALL_IN_ALL |
Everyone |
RESTRICTION_CALL_IN_COMPANY |
Corporate users only |
RESTRICTION_CALL_IN_INVITED |
Invited users only |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
char[] |
Participant name. |
number |
Yes |
char[] |
Number. If this parameter is set to the SIP number (for example, +99111244216210249) allocated to the account, the Huawei Cloud Meeting app is called. If this parameter is set to a PSTN number (for example, 18700000000), the number is called through the VoIP gateway if the enterprise has enabled PSTN call. This parameter is used for account and password authentication. Either this parameter or thirdUserId must be set. |
thirdUserId |
Yes |
char[] |
Third-party user ID. This parameter is used for app ID authentication. Either this parameter or number must be set. |
Enumerated Value |
Description |
---|---|
HWM_VMR_CONF_ID_TYPE_FIXED |
Fixed ID of the cloud meeting room. |
HWM_VMR_CONF_ID_TYPE_RANDOM |
Random ID of the cloud meeting room. |
Return Values
Type |
Description |
---|---|
HwmErrCode |
If 0 is returned, the operation is successful. If other values are returned, the operation fails. For details about values returned upon failures, see Common Error Codes. |
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
/** * Create a meeting. */ int demoCreateConfWithAttendeeDlg::clickCreatConfWithAttendee() { int ret; hwmsdkagent::HwmCreateConfInfo data; memset(&data, 0, sizeof(hwmsdkagent::HwmCreateConfInfo)); // Set the meeting topic. string meetingSubjectStr = CTools::UNICODE2UTF(CString("My meeting")); strncpy_s(data.subject, meetingSubjectStr.c_str(), HWM_MAX_SUBJECT_LEN); // Set the meeting type. data.mediaType = hwmsdkagent::HWM_VIDEO_AND_DATA // Set whether the guest password is required for the meeting. data.needPassword = true; // Set the meeting incoming call restriction. data.callInRestriction = hwmsdkagent::RESTRICTION_CALL_IN_ALL; // Configure vmrId. To create a meeting with a random ID, leave vmrId empty. Here, m_confIdTypeCombo indicates that a meeting with a random ID is preferentially created. // Therefore, vmrIdSelect > 0 indicates the personal meeting ID or a cloud meeting room ID is used. const auto vmrIdSelect = m_confIdTypeCombo.GetCurSel(); if (vmrIdSelect > 0 && vmrIdSelect - 1 < vmrList.size()) { strcpy_s(data.vmrId, HWM_MAX_VMR_CONF_ID_LEN, vmrList[vmrIdSelect - 1].vmrId); } // Set participants. // Obtain participant details based on site requirements. CString tempCString; m_attendeesEdit.GetWindowText(tempCString); string tempString = CTools::UNICODE2UTF(tempCString); vector<string> list = CTools::split(tempString, ';'); vector<string> temp; int count = list.size(); int realCount = 0; if (count > 0) { // Apply for the structure memory. hwmsdkagent::HwmConfAttendee* participants; participants = (hwmsdkagent::HwmConfAttendee*)malloc(sizeof(hwmsdkagent::HwmConfAttendee) * count); if (participants == NULL) { return -1; } memset(participants, 0, sizeof(hwmsdkagent::HwmConfAttendee)*count); hwmsdkagent::HwmConfAttendee* participantsTemp = participants; for (int i = 0; i < count; i++) { temp = CTools::split(list[i], '-'); if (temp.size() == 2) { // Assign a value to name. strncpy_s(participantsTemp->name, (char *)temp[0].c_str(), HWM_MAX_DISPLAY_NAME_LEN); // Assign a value to number. strncpy_s(participantsTemp->number, (char *)temp[1].c_str(), HWM_MAX_NUMBER_LEN); // Increase the number of pointers by 1. realCount++; participantsTemp++; } } // Call the SDK API to create the meeting. ret = hwmsdkagent::CreateConf(&data, participants, realCount); // Release memory space. free(participants); participants = NULL; } else { // Create a meeting without specifying participants. ret = hwmsdkagent::CreateConf(&data, NULL, 0); } return ret; } |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot