房间和成员自定义属性

功能简介: 设置房间属性和房间内人员属性。


  1. 设置房间属性
  2. 获取房间全部属性
  3. 获取房间特定属性
  4. 添加或更新指定属性
  5. 删除房间指定属性
  6. 清除房间属性
  7. 设置成员属性
  8. 获取当前指定成员属性
  9. 获取当前指定成员指定属性
  10. 添加或更新指定成员指定的属性
  11. 删除指定成员的指定属性
  12. 清除当前特定成员属性
  13. 清除当前房间内所有成员全部属性

1.设置房间属性

  • 调用接口:
//即将设置的属性
string attrs = "[{\"key\":\"MeetingName\",\"value\":\"\"},{\"key\":\"departmentName\",\"value\":\"\"}]";
//全部通知
string options = "\"notifyAll\":\"1\"";
axVideoSDK.setMeetingAttrs(attrs, options, "");

  • 回调通知:

//设置会议属性结果
void resetMeetingAttrsRslt(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//设置会议属性失败
  	}
}

相关API请参考:

相关结构定义请参考:

2.获取房间属性

  • 调用接口:

//想要获取的属性
string keys = "[\"MeetingName\", \"CompanyName\"]";
axVideoSDK.getMeetingAllAttrs(keys, "");

  • 回调通知:

void getMeetingAllAttrsSuccess(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
   		//获取会议属性成功
  	}
}

void getMeetingAllAttrsFail(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
  			//获取会议属性失败
  	}
}

相关API请参考:

3.获取房间特定属性

  • 调用接口:

string keys = "[\"MeetingName\", \"startTime\", \"endTime\"]";
axVideoSDK.getMeetingAllAttrs(keys, "");

  • 回调通知:

void getMeetingAllAttrsSuccess(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//获取会议属性成功
  	}
}

void getMeetingAllAttrsFail(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//获取会议属性失败
  	}
}

相关API请参考:

4.添加或更新属性

  • 调用接口:

string meetingNameKey = "MeetingName";
string meetingNameVaue = "";
axVideoSDK.addOrUpdateMeetingAttrs(meetingNameKey, meetingNameVaue, "");

  • 回调通知:

void addOrUpdateMeetingAttrsRslt(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//更新会议属性失败
  	}
}

相关API请参考:

5.删除房间特定属性

  • 调用接口:

string meetingName = "MeetingName";
axVideoSDK.delMeetingAttrs(meetingName, "");

  • 回调通知:

void delMeetingAttrsRslt(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//删除会议属性失败
  	}
}

相关API请参考:

6.清除房间全部属性

  • 调用接口:

axVideoSDK.clearMeetingAttrs("");

  • 回调通知:

void clearMeetingAttrsRslt(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//清除会议属性失败
  	}
}

相关API请参考:

7.设置成员属性

  • 调用接口:

string uids = "[\"111\", \"222\"]";
string attrs = "{[\"key\":\"name\", \"value\":\"Bob\"],[\"key\":\"companyName\", \"value\":\"CloudRoom\"]}";
axVideoSDK.setUserAttrs(uid, attrs, "");

  • 回调通知:

void setUserAttrsRslt(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//发送失败
  	}
}

相关API请参考:

8.获取当前指定成员属性

  • 调用接口:

string uids = "[\"111\", \"222\"]";
axVideoSDK.getUserAttrs(uid, "");

  • 回调通知:

void getUserAttrsFail(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//获取用户属性失败
  	}
}

void setUserAttrsRslt(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
    //获取用户属性成功后的结果
}

相关API请参考:

9.获取当前指定成员指定属性

  • 调用接口:

string uids = "[\"111\", \"222\"]";
string keys = "[\"name\", \"companyName\"]";
axVideoSDK.getUserAttrs(uid, keys, "");

  • 回调通知:

void getUserAttrsFail(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//获取当前指定成员指定属性失败
  	}
}

void setUserAttrsRslt(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	//获取当前指定成员指定属性成功后的结果
}

相关API请参考:

10.添加或更新指定成员指定的属性

  • 调用接口:

string uids = "[\"111\", \"222\"]";
string attrs = "{[\"key\":\"department\", \"value\":\"R&D\"],[\"key\":\"companyName\", \"value\":\"CloudRoom\"]}";
axVideoSDK.addOrUpdateUserAttrs(uid, attrs, "");

  • 回调通知:

void addOrUpdateUserAttrsRslt(int err, const QString& cookie)
{
	if (e.p_sdkErr != 0)
  	{
    	//增加或者更新成员属性失败
  	}

}

相关API请参考:

11.删除指定成员的指定属性

  • 调用接口:

string uids = "[\"111\", \"222\"]";
string keys = "[\"department\", \"companyName\"]";
axVideoSDK.delUserAttrs(uid, keys, "");

  • 回调通知:

void delUserAttrsRslt(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//删除指定成员失败
  	}

}

相关API请参考:

12.清除当前指定成员全部属性

  • 调用接口:

string uids = "[\"111\", \"222\"]";
axVideoSDK.clearUserAttrs(uids);

  • 回调通知:

void clearUserAttrsRslt(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//清除当前指定成员全部属性失败
  	}
}

相关API请参考:

13.清除当前房间内所有成员全部属性

  • 调用接口:

axVideoSDK.clearAllUserAttrs(“”);

  • 回调通知:

void clearAllUserAttrsRslt(object sender, ICloudroomVideoMeetingEvents_sendIMmsgRlstEvent e)
{
	if (e.p_sdkErr != 0)
  	{
    	//清除当前房间内所有成员全部属性失败
  	}
}

相关API请参考: