Esempio n. 1
0
        public static void SendCustomMessage(NIMSysMessageContent content)
        {
            if (string.IsNullOrEmpty(content.ClientMsgId))
            {
                content.GenerateMsgId();
            }
            var jsonMsg = content.Serialize();

            SysMsgNativeMethods.nim_sysmsg_send_custom_notification(jsonMsg, null);
        }
Esempio n. 2
0
        public static void QueryUnreadCount(CommomOperateResult cb)
        {
            var ptr = NimUtility.DelegateConverter.ConvertToIntPtr(cb);

            SysMsgNativeMethods.nim_sysmsg_query_unread_count(null, OnQueryUnreadCompleted, ptr);
        }
Esempio n. 3
0
        public static void QueryMessage(int limit, long lastTimetag, QuerySysMsgResult cb)
        {
            var ptr = NimUtility.DelegateConverter.ConvertToIntPtr(cb);

            SysMsgNativeMethods.nim_sysmsg_query_msg_async(limit, lastTimetag, null, OnQuerySysMsgCompleted, ptr);
        }
Esempio n. 4
0
 public static void DeleteMsgByType(NIMSysMsgType type, OperateSysMsgDelegate cb)
 {
     SysMsgNativeMethods.nim_sysmsg_delete_logs_by_type_async(type, null, cb, IntPtr.Zero);
 }
Esempio n. 5
0
 static SysMsgAPI()
 {
     SysMsgNativeMethods.nim_sysmsg_reg_custom_notification_arc_cb(null, OnSendMsgCompleted, IntPtr.Zero);
     SysMsgNativeMethods.nim_sysmsg_reg_sysmsg_cb(null, OnReceivingSysMsgDelegate, IntPtr.Zero);
 }
Esempio n. 6
0
 public static void DeleteAll(OperateSysMsgDelegate cb)
 {
     SysMsgNativeMethods.nim_sysmsg_delete_all_async(null, cb, IntPtr.Zero);
 }
Esempio n. 7
0
 public static void SetMsgStatusByType(NIMSysMsgType type, NIMSysMsgStatus status, OperateSysMsgDelegate cb)
 {
     SysMsgNativeMethods.nim_sysmsg_set_logs_status_by_type_async(type, status, null, cb, IntPtr.Zero);
 }
Esempio n. 8
0
 public static void SetAllMsgRead(OperateSysMsgDelegate cb)
 {
     SysMsgNativeMethods.nim_sysmsg_read_all_async(null, cb, IntPtr.Zero);
 }
Esempio n. 9
0
 public static void DeleteByMsgId(long msgId, OperateSysMsgExternDelegate cb)
 {
     SysMsgNativeMethods.nim_sysmsg_delete_async(msgId, null, cb, IntPtr.Zero);
 }
Esempio n. 10
0
 public static void RegisterCallbacks()
 {
     SysMsgNativeMethods.nim_sysmsg_reg_custom_notification_ack_cb(null, OnSendMsgCompleted, IntPtr.Zero);
     SysMsgNativeMethods.nim_sysmsg_reg_sysmsg_cb(null, OnReceivingSysMsgDelegate, IntPtr.Zero);
 }
Esempio n. 11
0
 public static void SetMsgStatus(long msgId, NIMSysMsgStatus status, OperateSysMsgExternDelegate cb)
 {
     SysMsgNativeMethods.nim_sysmsg_set_status_async(msgId, status, null, cb, IntPtr.Zero);
 }
Esempio n. 12
0
        /// <summary>
        /// 按消息类型批量删除消息
        /// </summary>
        /// <param name="type">消息类型</param>
        /// <param name="cb"></param>
        public static void DeleteMsgByType(NIMSysMsgType type, OperateSysMsgDelegate cb)
        {
            var ptr = DelegateConverter.ConvertToIntPtr(cb);

            SysMsgNativeMethods.nim_sysmsg_delete_logs_by_type_async(type, null, OperateSysMsgLogsDelegate, ptr);
        }
Esempio n. 13
0
        /// <summary>
        /// 按消息类型批量设置消息状态
        /// </summary>
        /// <param name="type">消息类型</param>
        /// <param name="status">消息状态</param>
        /// <param name="cb"></param>
        public static void SetMsgStatusByType(NIMSysMsgType type, NIMSysMsgStatus status, OperateSysMsgDelegate cb)
        {
            var ptr = DelegateConverter.ConvertToIntPtr(cb);

            SysMsgNativeMethods.nim_sysmsg_set_logs_status_by_type_async(type, status, null, OperateSysMsgLogsDelegate, ptr);
        }
Esempio n. 14
0
        /// <summary>
        /// 全部删除
        /// </summary>
        /// <param name="cb"></param>
        public static void DeleteAll(OperateSysMsgDelegate cb)
        {
            var ptr = DelegateConverter.ConvertToIntPtr(cb);

            SysMsgNativeMethods.nim_sysmsg_delete_all_async(null, OperateSysMsgLogsDelegate, ptr);
        }
Esempio n. 15
0
        /// <summary>
        /// 删除消息
        /// </summary>
        /// <param name="msgId">消息id</param>
        /// <param name="cb"></param>
        public static void DeleteByMsgId(long msgId, OperateSysMsgExternDelegate cb)
        {
            var ptr = DelegateConverter.ConvertToIntPtr(cb);

            SysMsgNativeMethods.nim_sysmsg_delete_async(msgId, null, OperateSysMsgLogsExtDelegate, ptr);
        }
Esempio n. 16
0
        /// <summary>
        /// 设置消息状态
        /// </summary>
        /// <param name="msgId">消息id</param>
        /// <param name="status">消息状态</param>
        /// <param name="cb">设置消息状态的回调函数,</param>
        public static void SetMsgStatus(long msgId, NIMSysMsgStatus status, OperateSysMsgExternDelegate cb)
        {
            var ptr = DelegateConverter.ConvertToIntPtr(cb);

            SysMsgNativeMethods.nim_sysmsg_set_status_async(msgId, status, null, OperateSysMsgLogsExtDelegate, ptr);
        }