Ejemplo n.º 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));
            }
        }
Ejemplo n.º 2
0
        private List <xUserInfo> InsertUserInfo(uint parser, byte cmdId = 1)
        {
            List <xUserInfo> userInfoList = new List <xUserInfo>();

            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, cmdId, parserUerInfo, i);
                xUserInfo userInfo = new xUserInfo();
                userInfo.nickName  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parserUerInfo, 1, 0));
                userInfo.userId    = YunVaImInterface.parser_get_integer(parserUerInfo, 2, 0);
                userInfo.iconUrl   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parserUerInfo, 3, 0));
                userInfo.onLine    = YunVaImInterface.parser_get_integer(parserUerInfo, 4, 0);
                userInfo.userLevel = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parserUerInfo, 5, 0));
                userInfo.vipLevel  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parserUerInfo, 6, 0));
                userInfo.ext       = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parserUerInfo, 7, 0));
                userInfo.shieldmsg = YunVaImInterface.parser_get_integer(parserUerInfo, 8, 0);
                userInfo.sex       = YunVaImInterface.parser_get_integer(parserUerInfo, 9, 0);
                userInfo.group     = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parserUerInfo, 10, 0));
                userInfo.remark    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parserUerInfo, 11, 0));
                YunvaLogPrint.YvInfoLog("ImFriendBlackListNotify", string.Format("nickName:{0},userId:{1},iconUrl:{2},onLine:{3},userLevel:{4},vipLevel:{5},ext:{6},shieldmsg:{7},sex:{8},group:{9},remark:{10}", userInfo.nickName, userInfo.userId, userInfo.iconUrl, userInfo.onLine, userInfo.userLevel, userInfo.vipLevel, userInfo.ext, userInfo.shieldmsg, userInfo.sex, userInfo.group, userInfo.remark));
                userInfoList.Add(userInfo);
            }
            return(userInfoList);
        }
Ejemplo n.º 3
0
        public ImChannelSendMsgResp(object Parser)
        {
            uint parser = (uint)Parser;

            result            = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg               = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            type              = YunVaImInterface.parser_get_uint8(parser, 3, 0);
            wildCard          = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 4, 0));
            textMsg           = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));
            url               = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 6, 0));
            voiceDurationTime = YunVaImInterface.parser_get_integer(parser, 7, 0);
            expand            = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 8, 0));
            shield            = YunVaImInterface.parser_get_uint8(parser, 9, 0);
            channel           = YunVaImInterface.parser_get_uint8(parser, 10, 0);
            flag              = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 11, 0));

            YunvaLogPrint.YvDebugLog("ImChannelSendMsgResp", string.Format("result:{0},msg:{1},type:{2},wildCard:{3},textMsg:{4},url:{5},voiceDurationTime:{6},expand:{7},shield:{8},channel:{9},flag{10}", result, msg, type, wildCard, textMsg, url, voiceDurationTime, expand, shield, channel, flag));
            //SendChannelMsgResp resp = new SendChannelMsgResp() {
            //    result = (int)result,
            //    msg = (string)msg,
            //    type = (int)type
            //};

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CHANNEL_SENDMSG_RESP, this));
        }
Ejemplo n.º 4
0
        public ImSearchAroundResp(object Parser)
        {
            uint parser = (uint)Parser;

            aroundUserList = new List <xAroundUser>();
            result         = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg            = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            YunvaLogPrint.YvDebugLog("ImSearchAroundResp", 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);
                xAroundUser info = new xAroundUser();
                info.yunvaId   = YunVaImInterface.parser_get_integer(locationInfo, 1, 0);
                info.nickName  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationInfo, 2, 0));
                info.sex       = YunVaImInterface.parser_get_integer(locationInfo, 3, 0);
                info.city      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationInfo, 4, 0));
                info.headicon  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationInfo, 5, 0));
                info.distance  = YunVaImInterface.parser_get_integer(locationInfo, 6, 0);
                info.lately    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationInfo, 7, 0));
                info.longitude = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationInfo, 8, 0));
                info.latitude  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationInfo, 9, 0));
                info.ext       = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(locationInfo, 10, 0));
                YunvaLogPrint.YvDebugLog("ImSearchAroundResp", string.Format("yunvaId:{0},nickName:{1},sex:{2},city:{3},headicon:{4},distance:{5},lately:{6},longitude:{7},latitude:{8},ext:{9}", info.yunvaId, info.nickName, info.sex, info.city, info.headicon, info.distance, info.lately, info.longitude, info.latitude, info.ext));
                aroundUserList.Add(info);
            }
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_SEARCH_AROUND_RESP, this));
        }
Ejemplo n.º 5
0
        public ImChatFriendResp(object Parser)
        {
            uint parser = (uint)Parser;

            result    = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg       = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            type      = YunVaImInterface.parser_get_integer(parser, 3, 0);
            userId    = YunVaImInterface.parser_get_integer(parser, 4, 0);
            flag      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 5, 0));
            indexId   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 6, 0));
            text      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 7, 0));
            audiourl  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 8, 0));
            audiotime = YunVaImInterface.parser_get_integer(parser, 9, 0);
            imageurl1 = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 10, 0));
            imageurl2 = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 11, 0));
            ext1      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 13, 0));

            YunvaLogPrint.YvDebugLog("ImChatFriendResp", string.Format("result:{0},msg:{1},type:{2},userId:{3},flag:{4},indexId:{5},text:{6},audiourl:{7},audiotime:{8},imageurl1:{9},imageurl2{10},ext1:{11}", result, msg, type, userId, flag, indexId, text, audiourl, audiotime, imageurl1, imageurl2, ext1));

//			ArrayList list = new ArrayList();
//			list.Add(type);
//			list.Add(result);

            //SendFriendMsgResp resp = new SendFriendMsgResp(){
            //    type = (int)type,
            //    result = (int)result
            //};

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CHAT_FRIEND_RESP, this));
        }
Ejemplo n.º 6
0
        private ImFriendSearchResp SearchFriendInfo(uint parser)
        {
            ImFriendSearchResp friendSearchResp = new ImFriendSearchResp();
            List <xSearchInfo> searchInfoList   = new List <xSearchInfo>();

            friendSearchResp.result = YunVaImInterface.parser_get_integer(parser, 1, 0);
            friendSearchResp.msg    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            YunvaLogPrint.YvDebugLog("ImFriendSearchResp", string.Format("result:{0},msg:{1}", friendSearchResp.result, friendSearchResp.msg));
            for (int i = 0; ; i++)
            {
                if (YunVaImInterface.parser_is_empty(parser, 3, i))
                {
                    break;
                }

                uint searchInfo = YunVaImInterface.yvpacket_get_nested_parser(parser);
                YunVaImInterface.parser_get_object(parser, 3, searchInfo, i);
                xSearchInfo userInfo = new xSearchInfo();

                userInfo.yunvaId  = YunVaImInterface.parser_get_integer(searchInfo, 1, 0);
                userInfo.userId   = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(searchInfo, 2, 0));
                userInfo.nickName = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(searchInfo, 3, 0));
                userInfo.iconUrl  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(searchInfo, 4, 0));
                userInfo.level    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(searchInfo, 5, 0));
                userInfo.vip      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(searchInfo, 6, 0));
                userInfo.ext      = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(searchInfo, 7, 0));
                YunvaLogPrint.YvDebugLog("ImFriendSearchResp", string.Format("yunvaId:{0},userId:{1},nickName:{2},iconUrl:{3},level:{4},vip:{5},ext:{6}", userInfo.yunvaId, userInfo.userId, userInfo.nickName, userInfo.iconUrl, userInfo.level, userInfo.vip, userInfo.ext));
                searchInfoList.Add(userInfo);
            }
            friendSearchResp.searchUserInfo = searchInfoList;
            return(friendSearchResp);
        }
Ejemplo n.º 7
0
        public int v_volume; //音量(1-100)
        public ImRecordVolumeNotify(object Parser)
        {
            uint parser = (uint)Parser;

            v_ext    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 1, 0));
            v_volume = YunVaImInterface.parser_get_integer(parser, 2, 0);
            YunvaLogPrint.YvDebugLog("ImRecordVolumeNotify", string.Format("v_ext:{0},v_volume:{1}", v_ext, v_volume));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_RECORD_VOLUME_NOTIFY, this));
        }
Ejemplo n.º 8
0
        public ImUploadLocationResp(object Parser)
        {
            uint parser = (uint)Parser;

            result = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            YunvaLogPrint.YvDebugLog("ImUploadLocationResp", string.Format("result:{0},msg:{1}", result, msg));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_UPLOAD_LOCATION_RESP, this));
        }
Ejemplo n.º 9
0
        public ImRemoveContactesResp(object Parser)
        {
            uint parser = (uint)Parser;

            result = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg    = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            userId = YunVaImInterface.parser_get_integer(parser, 3, 0);
            YunvaLogPrint.YvDebugLog("ImRemoveContactesResp", string.Format("result:{0},msg:{1},userId:{2}", result, msg, userId));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_REMOVE_CONTACTES_RESP, this));
        }
Ejemplo n.º 10
0
        public ImLBSSetLocalLangResp(object Parser)
        {
            uint parser = (uint)Parser;

            result    = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg       = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            lang_code = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            YunvaLogPrint.YvDebugLog("ImLBSSetLocalLangResp", string.Format("result:{0},msg:{1},lang_code:{2}", result, msg, lang_code));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_LBS_SET_LOCAL_LANG_RESP, this));
        }
Ejemplo n.º 11
0
        public ImChatFriendNotify(object Parser)
        {
            uint parser = (uint)Parser;

            chatMsg = new P2PChatMsg();
            chatMsg = chatMessageNotify(parser);
            cloudID = YunVaImInterface.parser_get_integer(parser, 110, 0);
            source  = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 111, 0));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CHAT_FRIEND_NOTIFY, this));
        }
Ejemplo n.º 12
0
        public ImChannelPushMsgNotify(object Parser)
        {
            uint parser = (uint)Parser;

            type = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 1, 0));
            data = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));

            YunvaLogPrint.YvDebugLog("ImChannelPushMsgNotify", string.Format("type:{0},data:{1}", type, data));

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CHANNEL_PUSH_MSG_NOTIFY, this));
        }
Ejemplo n.º 13
0
        public ImFriendAcceptResp(object Parser)
        {
            uint parser = (uint)Parser;

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

            YunvaLogPrint.YvDebugLog("ImFriendAcceptResp", string.Format("userId:{0},affirm:{1},greet:{2}", userId, affirm, greet));

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_FRIEND_ACCEPT_RESP, this));
        }
Ejemplo n.º 14
0
        public string announcement;//公告
        public ImChannelGetParamResp(object Parser)
        {
            Debug.Log("公告返回");
            uint parser = (uint)Parser;

            result       = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg          = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            announcement = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 3, 0));
            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_CHANNEL_GET_PARAM_RESP, this));

            YunvaLogPrint.YvDebugLog("ImChannelGetParamResp", string.Format("result:{0},msg:{1},announcement:{2}", result, msg, announcement));
        }
Ejemplo n.º 15
0
        public ImPlayPercentNotify(object Parser)
        {
            uint parser = (uint)Parser;

            percent = YunVaImInterface.parser_get_integer(parser, 1, 0);
            ext     = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));

            //Debug.LogError("ImPlayPercentNotify: " + this.ext);

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_RECORD_PLAY_PERCENT_NOTIFY, this));
            YunvaLogPrint.YvDebugLog("ImPlayPercentNotify", string.Format("percent:{0},ext:{1}", percent, ext));
        }
Ejemplo n.º 16
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));
        }
Ejemplo n.º 17
0
        public ImFriendDelResp(object Parser)
        {
            uint parser = (uint)Parser;

            result     = YunVaImInterface.parser_get_integer(parser, 1, 0);
            msg        = YunVaImInterface.IntPtrToString(YunVaImInterface.parser_get_string(parser, 2, 0));
            del_friend = YunVaImInterface.parser_get_integer(parser, 3, 0);
            act        = YunVaImInterface.parser_get_integer(parser, 4, 0);

            YunvaLogPrint.YvDebugLog("ImFriendDelResp", string.Format("result:{0},msg:{1},del_friend:{2},act:{3}", result, msg, del_friend, act));

            YunVaImInterface.eventQueue.Enqueue(new InvokeEventClass(ProtocolEnum.IM_FRIEND_DEL_RESP, this));
        }
Ejemplo n.º 18
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));
        }
Ejemplo n.º 19
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));
        }
Ejemplo n.º 20
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));
        }
Ejemplo n.º 21
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));
        }
Ejemplo n.º 22
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));
        }
Ejemplo n.º 23
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));
            }
        }
Ejemplo n.º 24
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));
        }
Ejemplo n.º 25
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));
        }
Ejemplo n.º 26
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);
        }
Ejemplo n.º 27
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);
        }
Ejemplo n.º 28
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));
        }
Ejemplo n.º 29
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);
        }
Ejemplo n.º 30
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));
        }