Esempio n. 1
0
        public int oper_state; //对方状态
        public ImFriendOperResp(object Parser)
        {
            uint parser = (uint)Parser;

            userId     = YunVaImInterface.parser_get_integer(parser, 1, 0);
            operId     = YunVaImInterface.parser_get_integer(parser, 2, 0);
            act        = YunVaImInterface.parser_get_integer(parser, 3, 0);
            oper_state = YunVaImInterface.parser_get_integer(parser, 4, 0);

            YunvaLogPrint.YvDebugLog("ImFriendOperResp", string.Format("userId:{0},operId:{1},act:{2},oper_state:{3}", userId, operId, act, oper_state));

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_FRIEND_OPER_RESP, this));
        }
Esempio n. 2
0
        public ImSpeechStopResp(object Parser)
        {
            uint parser = (uint)Parser;

            result = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            text   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            ext    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            url    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_SPEECH_STOP_RESP, this));

            YunvaLogPrint.YvDebugLog("ImSpeechStopResp", string.Format("result:{0},msg:{1},text:{2},ext:{3},url:{4}", result, msg, text, ext, url));
        }
Esempio n. 3
0
        public ImUserGetInfoResp(object Parser)
        {
            uint parser = (uint)Parser;

            userId    = YunVaImInterface.parser_get_integer(parser, 1, 0);
            sex       = YunVaImInterface.parser_get_integer(parser, 2, 0);
            nickName  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            iconUrl   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            userLevel = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));
            vipLevel  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 6, 0));
            ext       = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 7, 0));
            YunvaLogPrint.YvDebugLog("ImUserGetInfoResp", string.Format("userId:{0},sex:{1},nickName:{2},iconUrl:{3},userLevel:{4},vipLevel:{5},ext:{6}", userId, sex, nickName, iconUrl, userLevel, vipLevel, ext));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_USER_GETINFO_RESP, this));
        }
Esempio n. 4
0
        public ImCloudMsgLimitResp(object Parser)
        {
            uint parser = (uint)Parser;

            results = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msgs    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            session = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            id      = YunVaImInterface.parser_get_integer(parser, 4, 0);
            index   = YunVaImInterface.parser_get_integer(parser, 5, 0);
            limit   = YunVaImInterface.parser_get_integer(parser, 6, 0);

            YunvaLogPrint.YvDebugLog("ImCloudMsgLimitResp", string.Format("results:{0},msgs:{1},session:{2},id:{3},index:{4},limit:{5}", results, msgs, session, id, index, limit));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CLOUDMSG_LIMIT_RESP, this));
        }
Esempio n. 5
0
        public string greet;//问候语
        public ImFriendAddResp(object Parser)
        {
            uint parser = (uint)Parser;

            affirm  = YunVaImInterface.parser_get_integer(parser, 1, 0);
            userId  = YunVaImInterface.parser_get_integer(parser, 2, 0);
            name    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            iconUrl = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            greet   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));

            YunvaLogPrint.YvDebugLog("ImFriendAddResp", string.Format("affirm:{0},userId:{1},name:{2},iconUrl:{3},greet:{4}", affirm, userId, name, iconUrl, greet));

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_FRIEND_ADD_RESP, this));
        }
Esempio n. 6
0
        public ImFriendAddNotify(object Parser)
        {
            uint parser = (uint)Parser;

            userId         = YunVaImInterface.parser_get_integer(parser, 1, 0);
            greet          = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            name           = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            sign           = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            url            = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));
            cloudMsgId     = YunVaImInterface.parser_get_integer(parser, 110, 0);
            cloudMsgSource = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 111, 0));

            YunvaLogPrint.YvDebugLog("ImFriendAddNotify", string.Format("userId:{0},greet:{1},name:{2},sign:{3},url:{4}", userId, greet, name, sign, url));

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_FRIEND_ADD_NOTIFY, this));
        }
Esempio n. 7
0
        public ImGetThirdBindInfoResp(object Parser)
        {
            uint parser = (uint)Parser;

            result   = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            yunvaId  = YunVaImInterface.parser_get_integer(parser, 3, 0);
            nickName = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            iconUrl  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));
            level    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 6, 0));
            vip      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 7, 0));
            ext      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 8, 0));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_GET_THIRDBINDINFO_RESP, this));

            YunvaLogPrint.YvDebugLog("ImGetThirdBindInfoResp", string.Format("result:{0},msg:{1},yunvaId:{2},nickName:{3},iconUrl:{4},level,{5},vip:{6},ext:{7}", result, msg, yunvaId, nickName, iconUrl, level, vip, ext));
        }
Esempio n. 8
0
        public ImDownLoadFileResp(object Parser)
        {
            uint parser = (uint)Parser;

            result   = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            filename = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            fileid   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            percent  = YunVaImInterface.parser_get_integer(parser, 5, 0);
            // YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_DOWNLOAD_FILE_RESP, this));

            if (((result == 0) && (percent == 100)) || (result != 0))
            {
                YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_DOWNLOAD_FILE_RESP, this));
                YunvaLogPrint.YvDebugLog("ImDownLoadFileResp", string.Format("result:{0},msg:{1},filename:{2},fileid:{3},percent:{4}", result, msg, filename, fileid, percent));
            }
        }
Esempio n. 9
0
        public ImChannelGetInfoResp(object Parser)
        {
            uint parser = (uint)Parser;

            for (int i = 0;; i++)
            {
                if (YunVaImInterface.parser_is_empty(parser, 1, i))
                {
                    break;
                }
                uint GetInfo = YunVaImInterface.yvpacket_get_nested_parser(parser);
                YunVaImInterface.parser_get_object(parser, 1, GetInfo, i);
                Game_channel.Add(YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(GetInfo, 1, 0)));
                YunvaLogPrint.YvDebugLog("ImChannelGetInfoResp", string.Format("Game_channel:{0}", Game_channel[i]));
            }
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CHANNEL_GETINFO_RESP, this));
        }
Esempio n. 10
0
        public ImChannelHistoryMsgResp(object Parser)
        {
            uint parser = (uint)Parser;

            channelHisList = new List <HistoryMsgInfo>();
            int index = 0;

            while (!YunVaImInterface.parser_is_empty(parser, 1, index))
            {
                uint hisParser = YunVaImInterface.yvpacket_get_nested_parser(parser);
                YunVaImInterface.parser_get_object(parser, 1, hisParser, index);
                HistoryMsgInfo hisChannel = GetChannelMessageNotify(hisParser);
                channelHisList.Add(hisChannel);
                index++;
            }
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CHANNEL_HISTORY_MSG_RESP, this));
        }
Esempio n. 11
0
        public ImChannelMotifyResp(object Parser)
        {
            uint parser = (uint)Parser;

            wildcard = new List <string> ();
            result   = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            YunvaLogPrint.YvDebugLog("ImChannelMotifyResp", string.Format("result:{0},msg:{1}", result, msg));
            for (int i = 0;; i++)
            {
                if (YunVaImInterface.parser_is_empty(parser, 3, i))
                {
                    break;
                }
                wildcard.Add(YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, i)));
                YunvaLogPrint.YvDebugLog("ImChannelMotifyResp", string.Format("wildcard:{0}", wildcard[i]));
            }
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CHANNEL_MODIFY_RESP, this));
        }
Esempio n. 12
0
        private List <RecentConact> GetRecentConactList(object Parser, byte cmdId = 1)
        {
            uint parser = (uint)Parser;
            List <RecentConact> recentList = new List <RecentConact>();

            for (int i = 0; ; i++)
            {
                if (YunVaImInterface.parser_is_empty(parser, cmdId, i))
                {
                    break;
                }
                uint parserUerInfo = YunVaImInterface.yvpacket_get_nested_parser(parser);
                YunVaImInterface.parser_get_object(parser, 1, parserUerInfo, i);
                RecentConact context = new RecentConact();
                context.endId  = YunVaImInterface.parser_get_integer(parserUerInfo, 1, 0);
                context.unread = YunVaImInterface.parser_get_integer(parserUerInfo, 2, 0);
                YunvaLogPrint.YvInfoLog("ImFriendNearListNotify", string.Format("endId:{0},unread:{1}", context.endId, context.unread));
                uint chatParser = YunVaImInterface.yvpacket_get_nested_parser(parser);
                YunVaImInterface.parser_get_object(parserUerInfo, 3, chatParser, 0);
                context.lastMsg = chatMessageNotify(chatParser);
                uint nearChatParser = YunVaImInterface.yvpacket_get_nested_parser(parser);
                YunVaImInterface.parser_get_object(parserUerInfo, 4, nearChatParser, 0);
                NearChatInfo nearChatInfo = new NearChatInfo();
                nearChatInfo.nickName  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(nearChatParser, 1, 0));
                nearChatInfo.userId    = YunVaImInterface.parser_get_integer(nearChatParser, 2, 0);
                nearChatInfo.iconUrl   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(nearChatParser, 3, 0));
                nearChatInfo.online    = YunVaImInterface.parser_get_integer(nearChatParser, 4, 0);
                nearChatInfo.userLevel = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(nearChatParser, 5, 0));
                nearChatInfo.vipLevel  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(nearChatParser, 6, 0));
                nearChatInfo.ext       = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(nearChatParser, 7, 0));
                nearChatInfo.shieldMsg = YunVaImInterface.parser_get_integer(nearChatParser, 8, 0);
                nearChatInfo.sex       = YunVaImInterface.parser_get_integer(nearChatParser, 9, 0);
                nearChatInfo.group     = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(nearChatParser, 10, 0));
                nearChatInfo.remark    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(nearChatParser, 11, 0));
                nearChatInfo.times     = YunVaImInterface.parser_get_integer(nearChatParser, 12, 0);
                YunvaLogPrint.YvInfoLog("ImFriendNearListNotify", string.Format("nickName:{0},userId:{1},iconUrl:{2},onLine:{3},userLevel:{4},vipLevel:{5},ext:{6},shieldmsg:{7},sex:{8},group:{9},remark:{10},times:{11}", nearChatInfo.nickName, nearChatInfo.userId, nearChatInfo.iconUrl, nearChatInfo.online, nearChatInfo.userLevel, nearChatInfo.vipLevel, nearChatInfo.ext, nearChatInfo.shieldMsg, nearChatInfo.sex, nearChatInfo.group, nearChatInfo.remark, nearChatInfo.times));
                context.userInfo = nearChatInfo;
                recentList.Add(context);
            }

            return(recentList);
        }
Esempio n. 13
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));
        }
Esempio n. 14
0
        private P2PChatMsg chatMessageNotify(uint parser)
        {
            P2PChatMsg p2pChatMsg = new P2PChatMsg();

            p2pChatMsg.userID    = YunVaImInterface.parser_get_integer(parser, 1, 0);
            p2pChatMsg.name      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            p2pChatMsg.signature = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            p2pChatMsg.headUrl   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            p2pChatMsg.sendTime  = YunVaImInterface.parser_get_integer(parser, 5, 0);
            p2pChatMsg.type      = YunVaImInterface.parser_get_integer(parser, 6, 0);
            p2pChatMsg.data      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 7, 0));
            p2pChatMsg.imageUrl  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 8, 0));
            p2pChatMsg.audioTime = YunVaImInterface.parser_get_integer(parser, 9, 0);
            p2pChatMsg.attach    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 10, 0));
            p2pChatMsg.ext1      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 11, 0));
            YunvaLogPrint.YvInfoLog("ImFriendNearListNotify", string.Format("userID:{0},name:{1},signature:{2},headUrl:{3},sendTime:{4},type:{5},data:{6},imageUrl:{7},audioTime:{8},attach:{9},ext1{10}", p2pChatMsg.userID, p2pChatMsg.name, p2pChatMsg.signature, p2pChatMsg.headUrl, p2pChatMsg.sendTime, p2pChatMsg.type, p2pChatMsg.data, p2pChatMsg.imageUrl, p2pChatMsg.audioTime, p2pChatMsg.attach, p2pChatMsg.ext1));
            p2pChatMsg.cloudMsgID    = YunVaImInterface.parser_get_integer(parser, 110, 0);
            p2pChatMsg.cloudResource = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 111, 0));
            return(p2pChatMsg);
        }
Esempio n. 15
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);
        }
Esempio n. 16
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));
        }
Esempio n. 17
0
        public ImCloudMsgNotify(object Parser)
        {
            uint parser = (uint)Parser;

            if (YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 1, 0)) == "P2P")
            {
                source  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 1, 0));
                id      = YunVaImInterface.parser_get_integer(parser, 2, 0);
                beginid = YunVaImInterface.parser_get_integer(parser, 3, 0);
                endid   = YunVaImInterface.parser_get_integer(parser, 4, 0);
                time    = YunVaImInterface.parser_get_integer(parser, 5, 0);
                uint p2pParser = YunVaImInterface.yvpacket_get_nested_parser(parser);
                YunVaImInterface.parser_get_object(parser, 6, p2pParser, 0);
                packet.Add(chatMessageNotify(p2pParser));
                unread        = YunVaImInterface.parser_get_integer(parser, 7, 0);
                cloudId       = YunVaImInterface.parser_get_integer(parser, 110, 0);
                cloudResource = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 111, 0));

                YunvaLogPrint.YvInfoLog("ImCloudMsgNotify", string.Format("source:{0},id:{1},beginid:{2},endid:{3},time:{4},unread:{5},cloudId:{6},cloudResource:{7}", source, id, beginid, endid, time, unread, cloudId, cloudResource));

                YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CLOUDMSG_NOTIFY, this));
            }
        }
Esempio n. 18
0
        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));
        }
Esempio n. 19
0
        public ImLBSGetSpportLangResp(object Parser)
        {
            uint parser = (uint)Parser;

            LanguageList = new List <xLanguage>();
            result       = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg          = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            YunvaLogPrint.YvDebugLog("ImLBSGetSpportLangResp", string.Format("result:{0},msg:{1}", result, msg));
            for (int i = 0; ; i++)
            {
                if (YunVaImInterface.parser_is_empty(parser, 3, i))
                {
                    break;
                }
                uint locationInfo = YunVaImInterface.yvpacket_get_nested_parser(parser);
                YunVaImInterface.parser_get_object(parser, 3, locationInfo, i);
                xLanguage Language = new xLanguage();
                Language.lang_code = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationInfo, 1, 0));
                Language.lang_name = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationInfo, 2, 0));
                LanguageList.Add(Language);
                YunvaLogPrint.YvDebugLog("ImLBSGetSpportLangResp", string.Format("lang_code:{0},lang_name:{1}", Language.lang_code, Language.lang_name));
            }
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_LBS_GET_SUPPORT_LANG_RESP, this));
        }
Esempio n. 20
0
        public ImGetLocationResp(object Parser)
        {
            uint parser = (uint)Parser;

            result = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
//            if(!YunVaImInterface.parser_is_empty(parser, 3, 0))
//            {
//                uint locationParser = YunVaImInterface.yvpacket_get_nested_parser(parser);
//                YunVaImInterface.parser_get_object(parser, 3, locationParser, 0);
//                city = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationParser, 1, 0));
//                province = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationParser, 2, 0));
//                district = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationParser, 3, 0));
//                detail = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationParser, 4, 0));
//            }
            city      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            province  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            district  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));
            detail    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 6, 0));
            longitude = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 7, 0));
            latitude  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 8, 0));
            YunvaLogPrint.YvDebugLog("ImGetLocationResp", string.Format("result:{0},msg:{1},city:{2},province:{3},district:{4},detail:{5},longitude:{6},latitude:{7}", result, msg, city, province, district, detail, longitude, latitude));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_GET_LOCATION_RESP, this));
        }