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)); }
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)); }
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); }