/// <summary> /// 查询指定事件的全部订阅关系 /// </summary> /// <param name="eventType">事件类型</param> /// <param name="cb"></param> /// <returns></returns> public static bool BatchQuerySubscribe(int eventType, QuerySubscribeDelegate cb) { if (eventType == 0) { return(false); } var ptr = DelegateConverter.ConvertToIntPtr(cb); NIMSubscribeNativeMethods.nim_batch_query_subscribe_event(eventType, null, BatchQuerySubscribeCallback, ptr); return(true); }
/// <summary> /// 按账号查询指定事件订阅关系 /// </summary> /// <param name="eventType">事件类型</param> /// <param name="idList">用户列表</param> /// <param name="cb"></param> /// <returns></returns> public static bool QuerySubscribe(int eventType, List <string> idList, QuerySubscribeDelegate cb) { if (eventType == 0 || idList == null || idList.Count > 100) { return(false); } var json = NimUtility.Json.JsonParser.Serialize(idList); var ptr = DelegateConverter.ConvertToIntPtr(cb); NIMSubscribeNativeMethods.nim_query_subscribe_event(eventType, json, null, QuerySubscribeCallback, ptr); return(true); }