예제 #1
0
 public static extern int TIMConvDelete([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string conv_id, TIMConvType conv_type, TIMCommCallback cb, IntPtr user_data);
예제 #2
0
 public static extern int TIMMsgFindByMsgLocatorList([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string conv_id, TIMConvType conv_type,
                                                     [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string json_msg_Locator_array, TIMCommCallback cb, IntPtr user_data);
예제 #3
0
 public static extern int TIMMsgGetMsgList([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string conv_id, TIMConvType conv_type,
                                           [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string json_get_msg_param, TIMCommCallback cb, IntPtr user_data);
예제 #4
0
 public static extern int TIMConvSetDraft([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string conv_id, TIMConvType conv_type,
                                          [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string json_draft_param);
예제 #5
0
 public static extern int TIMConvCancelDraft([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string conv_id, TIMConvType conv_type);
 internal static extern int TIMMsgDelete([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string conv_id, TIMConvType conv_type,
                                         [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string json_msgdel_param, TIMCommCallback cb, IntPtr user_data);
예제 #7
0
 private extern static int TIMMsgSendNewMsg(string conv_id, TIMConvType conv_type, string json_msg_param, TIMCommCallback cb);
예제 #8
0
        /// <summary>
        /// 删除指定会话的消息。
        /// 当设置kTIMMsgDeleteParamMsg时,在会话中删除指定本地消息。
        /// 当未设置kTIMMsgDeleteParamMsg时,kTIMMsgDeleteParamIsRamble为 false 表示删除会话所有本地消息,true 表示删除会话所有漫游消息(删除漫游消息暂时不支持)。
        /// 一般直接使用保存的消息 JSON,或者通过消息定位符查找得到的 JSON。不用删除的时候构造消息 JSON。
        /// </summary>
        /// <param name="conv_id">会话的 ID</param>
        /// <param name="iMConvType">会话类型,请参考 TIMConvType</param>
        /// <param name="msg">消息获取参数</param>
        /// <param name="handler">删除指定会话的消息成功与否的回调</param>
        public static TIMResult IMMsgDelete(string conv_id, TIMConvType iMConvType, MsgDeleteParam msg, MsgDeleteDelgate handler = null)
        {
            var ptr = DelegateConverter.ConvertToIntPtr(handler);

            return((TIMResult)TIMClientAPIDef.TIMMsgDelete(conv_id, iMConvType, JsonConvert.SerializeObject(msg), MsgDeleteDelgateResultCallBack, ptr));
        }
 internal static extern int TIMMsgImportMsgList([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string conv_id, TIMConvType conv_type,
                                                [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringMarshaler))] string json_msg_array, TIMCommCallback cb, IntPtr user_data);
예제 #10
0
        /// <summary>
        /// 导入消息列表到指定会话。
        /// 批量导入消息,可以自己构造消息去导入。也可以将之前要导入的消息数组 JSON 保存,然后导入的时候直接调用接口,避免构造消息数组。
        /// </summary>
        /// <param name="conv_id">会话的 ID</param>
        /// <param name="iMConvType">会话类型,请参考 TIMConvType</param>
        /// <param name="msg_arry">	消息数组</param>
        /// <param name="handler">导入消息列表到指定会话成功与否的回调</param>
        public static TIMResult IMMsgImportMsgList(string conv_id, TIMConvType iMConvType, List <IMessage> msg_arry, MsgImportMsgListDelgate handler = null)
        {
            var ptr = DelegateConverter.ConvertToIntPtr(handler);

            return((TIMResult)TIMClientAPIDef.TIMMsgImportMsgList(conv_id, iMConvType, JsonConvert.SerializeObject(msg_arry), MsgImportMsgListResultCallBack, ptr));
        }
예제 #11
0
        /// <summary>
        /// 消息上报已读。
        /// </summary>
        /// <param name="conv_id">会话的 ID</param>
        /// <param name="iMConvType">会话类型,请参考 TIMConvType</param>
        /// <param name="msg">可以填NULL空字符串指针或者""空字符串,
        /// 此时以会话当前最新消息的时间戳(如果会话存在最新消息)或当前时间为已读时间戳上报。
        /// 当要指定消息时,则以该指定消息的时间戳为已读时间戳上报,最好用接收新消息获取的消息数组里面的消息 JSON 或者用消息定位符查找到的消息 JSON,避免重复构造消息 JSON。</param>
        /// <param name="handler">上报已读回调</param>
        public static TIMResult IMMsgReportReaded(string conv_id, TIMConvType iMConvType, IMessage msg, MsgReportReadedDelgate handler = null)
        {
            var ptr = DelegateConverter.ConvertToIntPtr(handler);

            return((TIMResult)TIMClientAPIDef.TIMMsgReportReaded(conv_id, iMConvType, JsonConvert.SerializeObject(msg), MsgReportReadedResultCallBack, ptr));
        }
예제 #12
0
 /// <summary>
 /// 删除指定会话的草稿。
 /// </summary>
 /// <param name="conv_id">会话的 ID</param>
 /// <param name="iMConvType">会话类型,请参考 TIMConvType</param>
 /// <returns></returns>
 public static TIMResult IMConvCancelDraft(string conv_id, TIMConvType iMConvType)
 {
     return((TIMResult)TIMClientAPIDef.TIMConvCancelDraft(conv_id, iMConvType));
 }
예제 #13
0
 /// <summary>
 /// 设置指定会话的草稿。
 /// </summary>
 /// <param name="conv_id">会话ID</param>
 /// <param name="iMConvType">会话类型</param>
 /// <param name="handler"></param>
 public static TIMResult IMConvSetDraft(string conv_id, TIMConvType iMConvType, Draft user_draft)
 {
     return((TIMResult)TIMClientAPIDef.TIMConvSetDraft(conv_id, iMConvType, JsonConvert.SerializeObject(user_draft)));
 }
예제 #14
0
        /// <summary>
        /// 删除会话
        /// </summary>
        /// <param name="conv_id">会话的 ID</param>
        /// <param name="iMConvType">会话类型,请参考 TIMConvType</param>
        /// <param name="handler">删除会话成功与否的回调</param>
        public static TIMResult IMConvDelete(string conv_id, TIMConvType iMConvType, ConvDeleteDelgate handler = null)
        {
            var ptr = DelegateConverter.ConvertToIntPtr(handler);

            return((TIMResult)TIMClientAPIDef.TIMConvDelete(conv_id, iMConvType, ConvDeleteResultCallBack, ptr));
        }