示例#1
0
        public ImCloudmsgLimitNotify(object Parser)
        {
            uint parser = (uint)Parser;

            pacektList = new List <P2PChatMsg>();
            source     = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 1, 0));
            p2pId      = YunVaImInterface.parser_get_uint32(parser, 2, 0);
            count      = YunVaImInterface.parser_get_uint32(parser, 3, 0);
            indexId    = YunVaImInterface.parser_get_uint32(parser, 4, 0);
            ptime      = YunVaImInterface.parser_get_uint32(parser, 5, 0);
            YunvaLogPrint.YvDebugLog("ImCloudmsgLimitNotify", string.Format("source:{0},p2pId:{1},count:{2},indexId:{3},ptime:{4}", source, p2pId, count, indexId, ptime));
            if (source == "P2P")
            {
                uint p2pParser = YunVaImInterface.yvpacket_get_nested_parser(parser);
                YunVaImInterface.parser_get_object(parser, 6, p2pParser, 0);

                for (int i = 0; ; i++)
                {
                    if (YunVaImInterface.parser_is_empty(parser, 6, i))
                    {
                        break;
                    }
                    uint parserInfo = YunVaImInterface.yvpacket_get_nested_parser(parser);
                    YunVaImInterface.parser_get_object(parser, 6, parserInfo, i);
                    pacektList.Add(chatMessageNotify(parserInfo));
                }

                //		packet = chatMessageNotify(p2pParser);
                //         packet.cloudMsgID = YunVaImInterface.parser_get_integer(parser, 110, 0);
                //         packet.cloudResource = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 111, 0));
                YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CLOUDMSG_LIMIT_NOTIFY, this));
            }
        }
示例#2
0
        public ImChannelMessageNotify(object Parser)
        {
            uint parser = (uint)Parser;

            userId        = YunVaImInterface.parser_get_uint32(parser, 1, 0);
            messageBody   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            nickname      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            ext1          = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            ext2          = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));
            channel       = YunVaImInterface.parser_get_uint8(parser, 6, 0);
            wildcard      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 7, 0));
            messageType   = YunVaImInterface.parser_get_uint32(parser, 8, 0);
            voiceDuration = YunVaImInterface.parser_get_uint32(parser, 9, 0);
            attach        = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 10, 0), true);
            shield        = YunVaImInterface.parser_get_uint32(parser, 11, 0);

            YunvaLogPrint.YvDebugLog("ImChannelMessageNotify", string.Format("userId:{0},messageBody:{1},nickname:{2},ext1:{3},ext2:{4},channel:{5},wildcard:{6},messageType:{7},voiceDuration:{8},attach:{9},shield{10}", userId, messageBody, nickname, ext1, ext2, channel, wildcard, messageType, voiceDuration, attach, shield));

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CHANNEL_MESSAGE_NOTIFY, this));
        }
示例#3
0
        public static HistoryMsgInfo GetChannelMessageNotify(uint parser)
        {
            HistoryMsgInfo channelMsg = new HistoryMsgInfo();

            channelMsg.index         = YunVaImInterface.parser_get_uint32(parser, 1, 0);
            channelMsg.ctime         = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            channelMsg.userId        = YunVaImInterface.parser_get_uint32(parser, 3, 0);
            channelMsg.messageBody   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            channelMsg.nickName      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));
            channelMsg.ext1          = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 6, 0));
            channelMsg.ext2          = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 7, 0));
            channelMsg.channel       = YunVaImInterface.parser_get_uint8(parser, 8, 0);
            channelMsg.wildCard      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 9, 0));
            channelMsg.messageType   = YunVaImInterface.parser_get_uint32(parser, 10, 0);
            channelMsg.voiceDuration = YunVaImInterface.parser_get_uint32(parser, 11, 0);
            channelMsg.attach        = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 12, 0), true);

            YunvaLogPrint.YvDebugLog("ImChannelHistoryMsgResp", string.Format("index:{0},ctime:{1},userId:{2},messageBody:{3},nickName:{4},ext1:{5},ext2:{6},channel:{7},wildCard:{8},messageType:{9},voiceDuration:{10},attach:{11}", channelMsg.index, channelMsg.ctime, channelMsg.userId, channelMsg.messageBody, channelMsg.nickName, channelMsg.ext1, channelMsg.ext2, channelMsg.channel, channelMsg.wildCard, channelMsg.messageType, channelMsg.voiceDuration, channelMsg.attach));

            return(channelMsg);
        }
示例#4
0
        public ImRecordStopResp(object Parser)
        {
            uint parser = (uint)Parser;

            time        = YunVaImInterface.parser_get_uint32(parser, 1, 0);
            strfilepath = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            ext         = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            result      = YunVaImInterface.parser_get_integer(parser, 4, 0);
            msg         = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));

//			ArrayList list = new ArrayList();
//			list.Add(voiceDurationTime);
//			list.Add(filePath);

            //RecordStopResp resp = new RecordStopResp(){
            //    time = voiceDurationTime,
            //    strfilepath = filePath
            //};

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_RECORD_STOP_RESP, this));

            YunvaLogPrint.YvDebugLog("ImRecordStopResp", string.Format("time:{0},strfilepath:{1},ext:{2},result:{3},msg:{4}", time, strfilepath, ext, result, msg));
        }
        public ImRecordFinishPlayResp(object Parser)
        {
            uint parser = (uint)Parser;

            result   = YunVaImInterface.parser_get_uint32(parser, 1, 0);
            describe = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            ext      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));

//			ArrayList list = new ArrayList();
//			list.Add(play_result);
//			list.Add(description);
//			list.Add(play_ext);

            //RecordFinishPlayResp resp = new RecordFinishPlayResp() {
            //    result = (int)play_result,
            //    describe = description,
            //    ext = play_ext
            //};

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_RECORD_FINISHPLAY_RESP, this));

            YunvaLogPrint.YvDebugLog("ImRecordFinishPlayResp", string.Format("result:{0},describe:{1},ext:{2}", result, describe, ext));
        }