This commit is contained in:
ageer
2024-04-01 22:21:29 +08:00
parent cead269b19
commit dea23f13ef
552 changed files with 2144 additions and 154437 deletions

View File

@@ -1,42 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.xmzs</groupId>
<artifactId>live-chat-clients</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<packaging>jar</packaging>
<artifactId>live-chat-client-douyin</artifactId>
<name>live-chat-client-douyin</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.xmzs</groupId>
<artifactId>live-chat-client-servers-netty-client</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@@ -1,81 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin;
import cn.hutool.core.util.RandomUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg;
import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums;
import tech.ordinaryroad.live.chat.client.douyin.client.DouyinLiveChatClient;
import tech.ordinaryroad.live.chat.client.douyin.config.DouyinLiveChatClientConfig;
import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener;
import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinDanmuMsg;
import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinBinaryFrameHandler;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
public class ClientModeExample {
static Logger log = LoggerFactory.getLogger(ClientModeExample.class);
public static void main(String[] args) {
// 1. 创建配置
DouyinLiveChatClientConfig config = DouyinLiveChatClientConfig.builder()
// TODO 浏览器Cookie
.cookie("did=web_6c4ac2a8ef8855d35df4d564baeaa8e8; kuaishou.live.bfb1s=7206d814e5c089a58c910ed8bf52ace5; clientid=3; did=web_6c4ac2a8ef8855d35df4d564baeaa8e8; client_key=65890b29; kpn=GAME_ZONE; userId=3941614875; kuaishou.live.web_st=ChRrdWFpc2hvdS5saXZlLndlYi5zdBKgAbRhgemDxM_Z_lBn7EZ_-5unvtslsh7ci5VY_eg80qqjxy5yb7oBFrdcWSPlz6jMIBz9h_yoLzATE3ngj2WawpxvbJhmq0EnRYIHv308kTBmg4KN2JQf7w2mfrsp1vusFbZ3NkfsEO4PrGQfX0L6mJRbgXeBqyz4tUM5O0q2Jte_NzWkaOnezvIGRAG8Y6yA1dxGUmiA9syTrPrdnSOzZvAaEoJNhwQ4OUDtgURWN6k9Xgm8PSIgAfV-ZvahtgaYhopZno6OuS2pkaFZjrz4ymoEZ1DSnj0oBTAB; kuaishou.live.web_ph=a287be6ab01dce264c0554eed94c2d6ac991; userId=3941614875")
// TODO 直播间id支持短id
.roomId("Jiazi-9931")
.build();
// 2. 创建Client并传入配置、添加消息回调
DouyinLiveChatClient client = new DouyinLiveChatClient(config, new IDouyinMsgListener() {
// @Override
// public void onMsg(IMsg msg) {
// log.debug("收到{}消息 {}", msg.getClass(), msg);
// }
// @Override
// public void onUnknownCmd(String cmdString, IMsg msg) {
// log.debug("收到未知CMD消息 {}", cmdString);
// }
@Override
public void onDanmuMsg(DouyinBinaryFrameHandler douyinBinaryFrameHandler, DouyinDanmuMsg msg) {
log.info("{} 收到弹幕 [{}] {}({}){}", douyinBinaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent());
}
});
// 3. 开始监听直播间
client.connect();
// 客户端连接状态回调
// client.addStatusChangeListener(evt -> {
// if (evt.getNewValue().equals(ClientStatusEnums.CONNECTED)) {
// // TODO 要发送的弹幕内容,请注意控制发送频率;框架内置支持设置发送弹幕的最少时间间隔,小于时将忽略该次发送
// client.sendDanmu("666666" + RandomUtil.randomNumbers(1));
// }
// });
}
}

View File

@@ -1,108 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.api;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpStatus;
import cn.hutool.http.HttpUtil;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException;
import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil;
import java.util.Map;
/**
* @author mjz
* @date 2024/1/3
*/
@Slf4j
public class DouyinApis {
public static final String KEY_COOKIE_TTWID = "ttwid";
public static final String KEY_COOKIE_MS_TOKEN = "msToken";
public static final String KEY_COOKIE_AC_NONCE = "__ac_nonce";
public static final String MS_TOKEN_BASE_STRING = RandomUtil.BASE_CHAR_NUMBER_LOWER + "=_";
public static final int MS_TOKEN_LENGTH = 107;
public static final int AC_NONCE_LENGTH = 21;
public static final String PATTERN_USER_UNIQUE_ID = "\\\\\"user_unique_id\\\\\":\\\\\"(\\d+)\\\\\"";
public static final String PATTERN_ROOM_ID = "\\\\\"roomId\\\\\":\\\\\"(\\d+)\\\\\"";
public static RoomInitResult roomInit(Object roomId, String cookie) {
Map<String, String> cookieMap = OrLiveChatCookieUtil.parseCookieString(cookie);
@Cleanup
HttpResponse response1 = HttpUtil.createGet("https://live.douyin.com/").cookie(cookie).execute();
String ttwid = OrLiveChatCookieUtil.getCookieByName(cookieMap, KEY_COOKIE_TTWID, () -> response1.getCookie(KEY_COOKIE_TTWID).getValue());
String msToken = OrLiveChatCookieUtil.getCookieByName(cookieMap, KEY_COOKIE_MS_TOKEN, () -> RandomUtil.randomString(MS_TOKEN_BASE_STRING, MS_TOKEN_LENGTH));
String __ac_nonce = OrLiveChatCookieUtil.getCookieByName(cookieMap, KEY_COOKIE_AC_NONCE, () -> RandomUtil.randomString(AC_NONCE_LENGTH));
@Cleanup
HttpResponse response2 = HttpUtil.createGet("https://live.douyin.com/" + roomId)
.cookie(StrUtil.emptyToDefault(cookie, KEY_COOKIE_TTWID + "=" + ttwid + "; " + KEY_COOKIE_MS_TOKEN + "=" + msToken + "; " + KEY_COOKIE_AC_NONCE + "=" + __ac_nonce))
.execute();
if (response2.getStatus() != HttpStatus.HTTP_OK) {
throw new BaseException("获取" + roomId + "真实房间ID失败");
}
String user_unique_id = StrUtil.emptyToDefault(ReUtil.getGroup1(PATTERN_USER_UNIQUE_ID, response2.body()), RandomUtil.randomNumbers(19));
long realRoomId;
String realRoomIdString = ReUtil.getGroup1(PATTERN_ROOM_ID, response2.body());
try {
realRoomId = NumberUtil.parseLong(realRoomIdString);
} catch (Exception e) {
throw new BaseException("获取" + roomId + "真实房间ID失败");
}
return RoomInitResult.builder()
.ttwid(ttwid)
.msToken(msToken)
.acNonce(__ac_nonce)
.realRoomId(realRoomId)
.userUniqueId(user_unique_id)
.build();
}
public static RoomInitResult roomInit(Object roomId) {
return roomInit(roomId, null);
}
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
public static class RoomInitResult {
private String ttwid;
private String msToken;
private String acNonce;
private long realRoomId;
private String userUniqueId;
}
}

View File

@@ -1,174 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.client;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.http.GlobalHeaders;
import cn.hutool.http.Header;
import cn.hutool.http.HttpUtil;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.handler.codec.http.DefaultHttpHeaders;
import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory;
import io.netty.handler.codec.http.websocketx.WebSocketVersion;
import lombok.extern.slf4j.Slf4j;
import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener;
import tech.ordinaryroad.live.chat.client.douyin.api.DouyinApis;
import tech.ordinaryroad.live.chat.client.douyin.config.DouyinLiveChatClientConfig;
import tech.ordinaryroad.live.chat.client.douyin.constant.DouyinCmdEnum;
import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinConnectionListener;
import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener;
import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg;
import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinBinaryFrameHandler;
import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinConnectionHandler;
import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
/**
* @author mjz
* @date 2024/1/2
*/
@Slf4j
public class DouyinLiveChatClient extends BaseNettyClient<
DouyinLiveChatClientConfig,
DouyinCmdEnum,
IDouyinMsg,
IDouyinMsgListener,
DouyinConnectionHandler,
DouyinBinaryFrameHandler> {
private DouyinApis.RoomInitResult roomInitResult = new DouyinApis.RoomInitResult();
public DouyinLiveChatClient(DouyinLiveChatClientConfig config, List<IDouyinMsgListener> msgListeners, IDouyinConnectionListener connectionListener, EventLoopGroup workerGroup) {
super(config, workerGroup, connectionListener);
addMsgListeners(msgListeners);
// 初始化
this.init();
}
public DouyinLiveChatClient(DouyinLiveChatClientConfig config, IDouyinMsgListener msgListener, IDouyinConnectionListener connectionListener, EventLoopGroup workerGroup) {
super(config, workerGroup, connectionListener);
addMsgListener(msgListener);
// 初始化
this.init();
}
public DouyinLiveChatClient(DouyinLiveChatClientConfig config, IDouyinMsgListener msgListener, IDouyinConnectionListener connectionListener) {
this(config, msgListener, connectionListener, new NioEventLoopGroup());
}
public DouyinLiveChatClient(DouyinLiveChatClientConfig config, IDouyinMsgListener msgListener) {
this(config, msgListener, null, new NioEventLoopGroup());
}
public DouyinLiveChatClient(DouyinLiveChatClientConfig config) {
this(config, null);
}
@Override
public void init() {
roomInitResult = DouyinApis.roomInit(getConfig().getRoomId(), getConfig().getCookie());
super.init();
}
@Override
public DouyinConnectionHandler initConnectionHandler(IBaseConnectionListener<DouyinConnectionHandler> clientConnectionListener) {
DefaultHttpHeaders headers = new DefaultHttpHeaders();
headers.add(Header.COOKIE.name(), DouyinApis.KEY_COOKIE_TTWID + "=" + roomInitResult.getTtwid());
headers.add(Header.USER_AGENT.name(), GlobalHeaders.INSTANCE.header(Header.USER_AGENT));
return new DouyinConnectionHandler(
WebSocketClientHandshakerFactory.newHandshaker(getWebsocketUri(), WebSocketVersion.V13, null, true, headers, getConfig().getMaxFramePayloadLength()),
DouyinLiveChatClient.this, clientConnectionListener
);
}
@Override
public DouyinBinaryFrameHandler initBinaryFrameHandler() {
return new DouyinBinaryFrameHandler(super.msgListeners, DouyinLiveChatClient.this);
}
@Override
protected String getWebSocketUriString() {
long realRoomId = roomInitResult.getRealRoomId();
String userUniqueId = roomInitResult.getUserUniqueId();
String webSocketUriString = super.getWebSocketUriString();
Map<String, String> queryParams = new HashMap<>();
queryParams.put("app_name", "douyin_web");
queryParams.put("version_code", getConfig().getVersionCode());
queryParams.put("webcast_sdk_version", getConfig().getWebcastSdkVersion());
queryParams.put("update_version_code", getConfig().getUpdateVersionCode());
queryParams.put("compress", "gzip");
queryParams.put("device_platform", "web");
queryParams.put("cookie_enabled", "true");
queryParams.put("screen_width", "800");
queryParams.put("screen_height", "1280");
queryParams.put("browser_language", "zh-CN");
queryParams.put("browser_platform", "MacIntel");
queryParams.put("browser_name", "Mozilla");
queryParams.put("browser_version", "5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_15_7)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/116.0.0.0%20Safari/537.36");
queryParams.put("browser_online", "true");
queryParams.put("tz_name", "Asia/Shanghai");
queryParams.put("host", "https://live.douyin.com");
queryParams.put("im_path", "/webcast/im/fetch/");
queryParams.put("endpoint", "live_pc");
queryParams.put("identity", "audience");
queryParams.put("support_wrds", "1");
queryParams.put("heartbeatDuration ", "0");
queryParams.put("live_id", "1");
queryParams.put("did_rule", "3");
queryParams.put("aid", "6383");
queryParams.put("room_id", Long.toString(realRoomId));
queryParams.put("user_unique_id", userUniqueId);
// TODO 生成signature
queryParams.put("signature", "00000000");
queryParams.put("cursor", "t-" + System.currentTimeMillis() + "_r-1_d-1_u-1_h-1");
queryParams.put("internal_ext", "internal_src:dim|" +
"wss_push_room_id:" + realRoomId + "|" +
"wss_push_did:" + userUniqueId + "|" +
"dim_log_id:" + DateUtil.format(new Date(), "yyyy-MM-dd") + RandomUtil.randomNumbers(6) + RandomUtil.randomString("0123456789ABCDEF", 20) + "|" +
"first_req_ms:" + System.currentTimeMillis() + "|" +
"fetch_time:" + System.currentTimeMillis() + "|" +
"seq:1|" +
"wss_info:0-" + System.currentTimeMillis() + "-0-0|" +
"wrds_kvs:WebcastRoomStatsMessage-" + System.nanoTime() + "_WebcastRoomRankMessage-" + System.nanoTime() + "_LotteryInfoSyncData-" + System.nanoTime() + "_WebcastActivityEmojiGroupsMessage-" + System.nanoTime());
return webSocketUriString + "?" + HttpUtil.toParams(queryParams);
}
public void sendDanmu(Object danmu, Runnable success, Consumer<Throwable> failed) {
super.sendDanmu(danmu, success, failed);
}
}

View File

@@ -1,93 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.config;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig;
/**
* @author mjz
* @date 2024/1/2
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
public class DouyinLiveChatClientConfig extends BaseNettyClientConfig {
@Builder.Default
private int aggregatorMaxContentLength = 64 * 1024 * 1024;
@Builder.Default
private int maxFramePayloadLength = 64 * 1024 * 1024;
private String versionCode = "180800";
private String webcastSdkVersion = "1.0.12";
private String updateVersionCode = "1.0.12";
/**
* 示例
* wss://webcast5-ws-web-lf.douyin.com/webcast/im/push/v2/
* ?app_name=douyin_web
* &version_code=180800
* &webcast_sdk_version=1.0.12
* &update_version_code=1.0.12
* &compress=gzip
* &device_platform=web
* &cookie_enabled=true
* &screen_width=1512
* &screen_height=982
* &browser_language=zh-CN
* &browser_platform=MacIntel
* &browser_name=Mozilla
* &browser_version=5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_15_7)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/118.0.0.0%20Safari/537.36
* &browser_online=true
* &tz_name=Asia/Shanghai
* &cursor=u-1_h-1_t-1704202376885_r-1_d-1
* &internal_ext=internal_src:dim|wss_push_room_id:7319486720022301449|wss_push_did:7319492411867170356|dim_log_id:20240102213256AAA5B735ADBE992BEF6A|first_req_ms:1704202376757|fetch_time:1704202376885|seq:1|wss_info:0-1704202376885-0-0|wrds_kvs:WebcastActivityEmojiGroupsMessage-1704200830782138545_WebcastRoomRankMessage-1704202270876589607_WebcastRoomStatsMessage-1704202372842388781
* &host=https://live.douyin.com
* &aid=6383
* &live_id=1
* &did_rule=3
* &endpoint=live_pc
* &support_wrds=1
* &user_unique_id=7319492411867170356
* &im_path=/webcast/im/fetch/
* &identity=audience
* &need_persist_msg_count=15
* &room_id=7319486720022301449
* &heartbeatDuration=0
* &signature=Wk407jV1/WbnoIGk
*/
@Builder.Default
private String websocketUri = "wss://webcast5-ws-web-lf.douyin.com:443/webcast/im/push/v2/";
}

View File

@@ -1,73 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.constant;
import cn.hutool.core.util.StrUtil;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* @author mjz
* @date 2024/1/2
*/
@Getter
@RequiredArgsConstructor
public enum DouyinCmdEnum {
/**
* 弹幕
*/
WebcastChatMessage,
/**
* 礼物
*/
WebcastGiftMessage,
/**
* 点赞
*/
WebcastLikeMessage,
/**
* 入房
*/
WebcastMemberMessage,
WebcastSocialMessage,
WebcastRoomUserSeqMessage,
WebcastFansclubMessage,
WebcastControlMessage,
;
public static DouyinCmdEnum getByName(String name) {
if (StrUtil.isBlank(name)) {
return null;
}
for (DouyinCmdEnum value : values()) {
if (value.name().equals(name)) {
return value;
}
}
return null;
}
}

View File

@@ -1,35 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.listener;
import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener;
import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinConnectionHandler;
/**
* @author mjz
* @date 2024/1/2
*/
public interface IDouyinConnectionListener extends IBaseConnectionListener<DouyinConnectionHandler> {
}

View File

@@ -1,44 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.listener;
import tech.ordinaryroad.live.chat.client.commons.base.listener.*;
import tech.ordinaryroad.live.chat.client.douyin.constant.DouyinCmdEnum;
import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinDanmuMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinEnterRoomMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinGiftMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinLikeMsg;
import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinBinaryFrameHandler;
/**
* @author mjz
* @date 2024/1/2
*/
public interface IDouyinMsgListener extends IBaseMsgListener<DouyinBinaryFrameHandler, DouyinCmdEnum>,
IDanmuMsgListener<DouyinBinaryFrameHandler, DouyinDanmuMsg>,
IGiftMsgListener<DouyinBinaryFrameHandler, DouyinGiftMsg>,
IEnterRoomMsgListener<DouyinBinaryFrameHandler, DouyinEnterRoomMsg>,
ILikeMsgListener<DouyinBinaryFrameHandler, DouyinLikeMsg> {
}

View File

@@ -1,77 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.msg;
import cn.hutool.core.collection.CollUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg;
import tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg;
/**
* @author mjz
* @date 2024/1/9
*/
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class DouyinDanmuMsg implements IDouyinMsg, IDanmuMsg {
private douyin_webcast_chat_message_msg msg;
@Override
public String getBadgeName() {
return msg.getUser().getFansClub().getData().getClubName();
}
@Override
public byte getBadgeLevel() {
return (byte) msg.getUser().getFansClub().getData().getLevel();
}
@Override
public String getUid() {
return Long.toString(msg.getUser().getId());
}
@Override
public String getUsername() {
return msg.getUser().getNickname();
}
@Override
public String getUserAvatar() {
return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList());
}
@Override
public String getContent() {
return msg.getContent();
}
}

View File

@@ -1,72 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.msg;
import cn.hutool.core.collection.CollUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import tech.ordinaryroad.live.chat.client.commons.base.msg.IEnterRoomMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg;
import tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg;
/**
* @author mjz
* @date 2024/1/9
*/
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class DouyinEnterRoomMsg implements IDouyinMsg, IEnterRoomMsg {
private douyin_webcast_member_message_msg msg;
@Override
public String getBadgeName() {
return msg.getUser().getFansClub().getData().getClubName();
}
@Override
public byte getBadgeLevel() {
return (byte) msg.getUser().getFansClub().getData().getLevel();
}
@Override
public String getUid() {
return Long.toString(msg.getUser().getId());
}
@Override
public String getUsername() {
return msg.getUser().getNickname();
}
@Override
public String getUserAvatar() {
return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList());
}
}

View File

@@ -1,107 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.msg;
import cn.hutool.core.collection.CollUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg;
import tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg;
/**
* @author mjz
* @date 2024/1/9
*/
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class DouyinGiftMsg implements IDouyinMsg, IGiftMsg {
private douyin_webcast_gift_message_msg msg;
@Override
public String getBadgeName() {
return msg.getUser().getFansClub().getData().getClubName();
}
@Override
public byte getBadgeLevel() {
return (byte) msg.getUser().getFansClub().getData().getLevel();
}
@Override
public String getUid() {
return Long.toString(msg.getUser().getId());
}
@Override
public String getUsername() {
return msg.getUser().getNickname();
}
@Override
public String getUserAvatar() {
return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList());
}
@Override
public String getGiftName() {
return msg.getGift().getName();
}
@Override
public String getGiftImg() {
return CollUtil.getFirst(msg.getGift().getImage().getUrlListListList());
}
@Override
public String getGiftId() {
return Long.toString(msg.getLongGiftId());
}
@Override
public int getGiftCount() {
return (int) msg.getTotalCount();
}
@Override
public int getGiftPrice() {
return msg.getGift().getDiamondCount();
}
@Override
public String getReceiveUid() {
return Long.toString(msg.getToUser().getId());
}
@Override
public String getReceiveUsername() {
return msg.getToUser().getNickname();
}
}

View File

@@ -1,77 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.msg;
import cn.hutool.core.collection.CollUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import tech.ordinaryroad.live.chat.client.commons.base.msg.ILikeMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg;
import tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg;
/**
* @author mjz
* @date 2024/1/31
*/
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class DouyinLikeMsg implements IDouyinMsg, ILikeMsg {
private douyin_webcast_like_message_msg msg;
@Override
public String getBadgeName() {
return msg.getUser().getFansClub().getData().getClubName();
}
@Override
public byte getBadgeLevel() {
return (byte) msg.getUser().getFansClub().getData().getLevel();
}
@Override
public String getUid() {
return Long.toString(msg.getUser().getId());
}
@Override
public String getUsername() {
return msg.getUser().getNickname();
}
@Override
public String getUserAvatar() {
return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList());
}
@Override
public int getClickCount() {
return (int) msg.getCount();
}
}

View File

@@ -1,35 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.msg.base;
import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg;
import tech.ordinaryroad.live.chat.client.douyin.constant.DouyinCmdEnum;
/**
* @author mjz
* @date 2024/1/2
*/
public interface IDouyinCmdMsg extends IDouyinMsg, ICmdMsg<DouyinCmdEnum> {
}

View File

@@ -1,34 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.msg.base;
import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg;
/**
* @author mjz
* @date 2024/1/2
*/
public interface IDouyinMsg extends IMsg {
}

View File

@@ -1,156 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.netty.handler;
import cn.hutool.core.util.ZipUtil;
import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame;
import lombok.extern.slf4j.Slf4j;
import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException;
import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg;
import tech.ordinaryroad.live.chat.client.douyin.client.DouyinLiveChatClient;
import tech.ordinaryroad.live.chat.client.douyin.constant.DouyinCmdEnum;
import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener;
import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinDanmuMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinEnterRoomMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinGiftMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinLikeMsg;
import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg;
import tech.ordinaryroad.live.chat.client.douyin.protobuf.*;
import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* @author mjz
* @date 2024/1/2
*/
@Slf4j
@ChannelHandler.Sharable
public class DouyinBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler<DouyinLiveChatClient, DouyinBinaryFrameHandler, DouyinCmdEnum, IDouyinMsg, IDouyinMsgListener> {
private ChannelHandlerContext channelHandlerContext;
public DouyinBinaryFrameHandler(List<IDouyinMsgListener> iDouyinMsgListeners, DouyinLiveChatClient client) {
super(iDouyinMsgListeners, client);
}
public DouyinBinaryFrameHandler(List<IDouyinMsgListener> iDouyinMsgListeners, long roomId) {
super(iDouyinMsgListeners, roomId);
}
@Override
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
super.handlerAdded(ctx);
channelHandlerContext = ctx;
}
@Override
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
super.handlerRemoved(ctx);
channelHandlerContext = null;
}
@Override
public void onCmdMsg(DouyinCmdEnum cmd, ICmdMsg<DouyinCmdEnum> cmdMsg) {
if (super.msgListeners.isEmpty()) {
return;
}
ByteString payload = ((douyin_cmd_msg) cmdMsg).getPayload();
switch (cmd) {
case WebcastChatMessage: {
try {
douyin_webcast_chat_message_msg douyinWebcastChatMessageMsg = douyin_webcast_chat_message_msg.parseFrom(payload);
iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(DouyinBinaryFrameHandler.this, new DouyinDanmuMsg(douyinWebcastChatMessageMsg)));
} catch (IOException e) {
throw new BaseException(e);
}
break;
}
case WebcastGiftMessage: {
try {
douyin_webcast_gift_message_msg douyinWebcastGiftMessageMsg = douyin_webcast_gift_message_msg.parseFrom(payload);
iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(DouyinBinaryFrameHandler.this, new DouyinGiftMsg(douyinWebcastGiftMessageMsg)));
} catch (InvalidProtocolBufferException e) {
throw new BaseException(e);
}
break;
}
case WebcastMemberMessage: {
try {
douyin_webcast_member_message_msg douyinWebcastMemberMessageMsg = douyin_webcast_member_message_msg.parseFrom(payload);
iteratorMsgListeners(msgListener -> msgListener.onEnterRoomMsg(DouyinBinaryFrameHandler.this, new DouyinEnterRoomMsg(douyinWebcastMemberMessageMsg)));
} catch (InvalidProtocolBufferException e) {
throw new BaseException(e);
}
break;
}
case WebcastLikeMessage: {
try {
douyin_webcast_like_message_msg douyinWebcastLikeMessageMsg = douyin_webcast_like_message_msg.parseFrom(payload);
iteratorMsgListeners(msgListener -> msgListener.onLikeMsg(DouyinBinaryFrameHandler.this, new DouyinLikeMsg(douyinWebcastLikeMessageMsg)));
} catch (InvalidProtocolBufferException e) {
throw new BaseException(e);
}
break;
}
default: {
iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(DouyinBinaryFrameHandler.this, cmd, cmdMsg));
}
}
}
@Override
protected List<IDouyinMsg> decode(ByteBuf byteBuf) {
try {
douyin_websocket_frame douyinWebsocketFrame = douyin_websocket_frame.parseFrom(byteBuf.nioBuffer());
ByteString payload = douyinWebsocketFrame.getPayload();
byte[] bytes = ZipUtil.unGzip(payload.newInput());
douyin_websocket_frame_msg douyinWebsocketFrameMsg = douyin_websocket_frame_msg.parseFrom(bytes);
// 抖音不是使用心跳而是ACK
if (douyinWebsocketFrameMsg.getNeedAck()) {
douyin_websocket_frame ack = douyin_websocket_frame.newBuilder()
.setLogId(douyinWebsocketFrame.getLogId())
.setPayloadType("ack")
.setPayload(douyinWebsocketFrameMsg.getInternalExtBytes())
.build();
channelHandlerContext.writeAndFlush(new BinaryWebSocketFrame(Unpooled.wrappedBuffer(ack.toByteArray())));
}
return new ArrayList<>(douyinWebsocketFrameMsg.getMessagesListList());
} catch (InvalidProtocolBufferException e) {
throw new BaseException(e);
}
}
}

View File

@@ -1,117 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package tech.ordinaryroad.live.chat.client.douyin.netty.handler;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker;
import lombok.extern.slf4j.Slf4j;
import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener;
import tech.ordinaryroad.live.chat.client.douyin.client.DouyinLiveChatClient;
import tech.ordinaryroad.live.chat.client.douyin.config.DouyinLiveChatClientConfig;
import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler;
/**
* @author mjz
* @date 2024/1/2
*/
@Slf4j
@ChannelHandler.Sharable
public class DouyinConnectionHandler extends BaseNettyClientConnectionHandler<DouyinLiveChatClient, DouyinConnectionHandler> {
/**
* 以ClientConfig为主
*/
private final Object roomId;
/**
* 以ClientConfig为主
*/
private String cookie;
public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, DouyinLiveChatClient client, IBaseConnectionListener<DouyinConnectionHandler> listener) {
super(handshaker, client, listener);
this.roomId = client.getConfig().getRoomId();
this.cookie = client.getConfig().getCookie();
}
public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, DouyinLiveChatClient client) {
this(handshaker, client, null);
}
public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, IBaseConnectionListener<DouyinConnectionHandler> listener, String cookie) {
super(handshaker, listener);
this.roomId = roomId;
this.cookie = cookie;
}
public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, IBaseConnectionListener<DouyinConnectionHandler> listener) {
this(handshaker, roomId, listener, null);
}
public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, String cookie) {
this(handshaker, roomId, null, cookie);
}
public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, long roomId) {
this(handshaker, roomId, null, null);
}
@Override
protected void sendHeartbeat(ChannelHandlerContext ctx) {
// ignore
}
@Override
public void sendAuthRequest(Channel channel) {
// ignore
}
@Override
protected long getHeartbeatPeriod() {
if (client == null) {
return DouyinLiveChatClientConfig.DEFAULT_HEARTBEAT_PERIOD;
} else {
return client.getConfig().getHeartbeatPeriod();
}
}
@Override
protected long getHeartbeatInitialDelay() {
if (client == null) {
return DouyinLiveChatClientConfig.DEFAULT_HEARTBEAT_INITIAL_DELAY;
} else {
return client.getConfig().getHeartbeatInitialDelay();
}
}
public Object getRoomId() {
return client != null ? client.getConfig().getRoomId() : roomId;
}
private String getCookie() {
return client != null ? client.getConfig().getCookie() : cookie;
}
}

View File

@@ -1,78 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_cmd_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public final class Douyin_cmd_msgProto {
private Douyin_cmd_msgProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\024douyin_cmd_msg.proto\0222tech.ordinaryroa" +
"d.live.chat.client.douyin.protobuf\"\250\001\n\016d" +
"ouyin_cmd_msg\022\016\n\006method\030\001 \001(\t\022\017\n\007payload" +
"\030\002 \001(\014\022\016\n\006msg_id\030\003 \001(\003\022\020\n\010msg_type\030\004 \001(\005" +
"\022\016\n\006offset\030\005 \001(\003\022\027\n\017need_wrds_store\030\006 \001(" +
"\010\022\024\n\014wrds_version\030\007 \001(\003\022\024\n\014wrds_sub_key\030" +
"\010 \001(\tBQ\n2tech.ordinaryroad.live.chat.cli" +
"ent.douyin.protobufB\023Douyin_cmd_msgProto" +
"P\001\242\002\003GPBb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_descriptor,
new java.lang.String[] { "Method", "Payload", "MsgId", "MsgType", "Offset", "NeedWrdsStore", "WrdsVersion", "WrdsSubKey", });
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@@ -1,93 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_webcast_chat_message_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public final class Douyin_webcast_chat_message_msgProto {
private Douyin_webcast_chat_message_msgProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n%douyin_webcast_chat_message_msg.proto\022" +
"2tech.ordinaryroad.live.chat.client.douy" +
"in.protobuf\032\014Common.proto\032\nUser.proto\032\013I" +
"mage.proto\"\300\003\n\037douyin_webcast_chat_messa" +
"ge_msg\022\027\n\006common\030\001 \001(\0132\007.Common\022\023\n\004user\030" +
"\002 \001(\0132\005.User\022\017\n\007content\030\003 \001(\t\022\031\n\021visible" +
"_to_sender\030\004 \001(\010\022 \n\020background_image\030\005 \001" +
"(\0132\006.Image\022\036\n\026full_screen_text_color\030\006 \001" +
"(\t\022#\n\023background_image_v2\030\007 \001(\0132\006.Image\022" +
"\032\n\ngift_image\030\n \001(\0132\006.Image\022\024\n\014agree_msg" +
"_id\030\013 \001(\004\022\026\n\016priority_level\030\014 \001(\r\022\022\n\neve" +
"nt_time\030\017 \001(\004\022\023\n\013send_review\030\020 \001(\010\022\025\n\rfr" +
"om_intercom\030\021 \001(\010\022\037\n\027intercom_hide_user_" +
"card\030\022 \001(\010\022\017\n\007chat_by\030\024 \001(\t\022 \n\030individua" +
"l_chat_priority\030\025 \001(\rBb\n2tech.ordinaryro" +
"ad.live.chat.client.douyin.protobufB$Dou" +
"yin_webcast_chat_message_msgProtoP\001\242\002\003GP" +
"Bb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(),
});
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_descriptor,
new java.lang.String[] { "Common", "User", "Content", "VisibleToSender", "BackgroundImage", "FullScreenTextColor", "BackgroundImageV2", "GiftImage", "AgreeMsgId", "PriorityLevel", "EventTime", "SendReview", "FromIntercom", "IntercomHideUserCard", "ChatBy", "IndividualChatPriority", });
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@@ -1,112 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_webcast_gift_message_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public final class Douyin_webcast_gift_message_msgProto {
private Douyin_webcast_gift_message_msgProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n%douyin_webcast_gift_message_msg.proto\022" +
"2tech.ordinaryroad.live.chat.client.douy" +
"in.protobuf\032\014Common.proto\032\nUser.proto\032\020T" +
"extEffect.proto\032\nText.proto\032\024GiftIMPrior" +
"ity.proto\032\020GiftStruct.proto\032\026PublicAreaC" +
"ommon.proto\"\277\006\n\037douyin_webcast_gift_mess" +
"age_msg\022\027\n\006common\030\001 \001(\0132\007.Common\022\024\n\014long" +
"_gift_id\030\002 \001(\004\022\030\n\020fan_ticket_count\030\003 \001(\004" +
"\022\023\n\013group_count\030\004 \001(\004\022\024\n\014repeat_count\030\005 " +
"\001(\004\022\023\n\013combo_count\030\006 \001(\004\022\023\n\004user\030\007 \001(\0132\005" +
".User\022\026\n\007to_user\030\010 \001(\0132\005.User\022\022\n\nrepeat_" +
"end\030\t \001(\r\022 \n\013text_effect\030\n \001(\0132\013.TextEff" +
"ect\022\020\n\010group_id\030\013 \001(\004\022\030\n\020income_taskgift" +
"s\030\014 \001(\004\022\035\n\025room_fan_ticket_count\030\r \001(\004\022!" +
"\n\010priority\030\016 \001(\0132\017.GiftIMPriority\022\031\n\004gif" +
"t\030\017 \001(\0132\013.GiftStruct\022\016\n\006log_id\030\020 \001(\t\022\021\n\t" +
"send_type\030\021 \001(\004\022-\n\022public_area_common\030\022 " +
"\001(\0132\021.PublicAreaCommon\022 \n\021tray_display_t" +
"ext\030\023 \001(\0132\005.Text\022\036\n\026banned_display_effec" +
"ts\030\024 \001(\004\022\030\n\020display_for_self\030\031 \001(\010\022\032\n\022in" +
"teract_gift_info\030\032 \001(\t\022\025\n\rdiy_item_info\030" +
"\033 \001(\t\022\032\n\022min_asset_set_list\030\034 \003(\004\022\023\n\013tot" +
"al_count\030\035 \001(\004\022\032\n\022client_gift_source\030\036 \001" +
"(\r\022\030\n\020to_user_ids_list\030 \003(\004\022\022\n\nsend_tim" +
"et\030! \001(\004\022\036\n\026force_display_effectst\030\" \001(\004" +
"\022\020\n\010trace_id\030# \001(\t\022\031\n\021effect_display_ts\030" +
"$ \001(\004Bb\n2tech.ordinaryroad.live.chat.cli" +
"ent.douyin.protobufB$Douyin_webcast_gift" +
"_message_msgProtoP\001\242\002\003GPBb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.getDescriptor(),
});
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_descriptor,
new java.lang.String[] { "Common", "LongGiftId", "FanTicketCount", "GroupCount", "RepeatCount", "ComboCount", "User", "ToUser", "RepeatEnd", "TextEffect", "GroupId", "IncomeTaskgifts", "RoomFanTicketCount", "Priority", "Gift", "LogId", "SendType", "PublicAreaCommon", "TrayDisplayText", "BannedDisplayEffects", "DisplayForSelf", "InteractGiftInfo", "DiyItemInfo", "MinAssetSetList", "TotalCount", "ClientGiftSource", "ToUserIdsList", "SendTimet", "ForceDisplayEffectst", "TraceId", "EffectDisplayTs", });
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@@ -1,111 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_webcast_member_message_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public final class Douyin_webcast_member_message_msgProto {
private Douyin_webcast_member_message_msgProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\'douyin_webcast_member_message_msg.prot" +
"o\0222tech.ordinaryroad.live.chat.client.do" +
"uyin.protobuf\032\014Common.proto\032\nUser.proto\032" +
"\013Image.proto\032\nText.proto\"\203\005\n!douyin_webc" +
"ast_member_message_msg\022\027\n\006common\030\001 \001(\0132\007" +
".Common\022\023\n\004user\030\002 \001(\0132\005.User\022\023\n\013memberCo" +
"unt\030\003 \001(\004\022\027\n\010operator\030\004 \001(\0132\005.User\022\024\n\014is" +
"SetToAdmin\030\005 \001(\010\022\021\n\tisTopUser\030\006 \001(\010\022\021\n\tr" +
"ankScore\030\007 \001(\003\022\021\n\ttopUserNo\030\010 \001(\003\022\021\n\tent" +
"erType\030\t \001(\003\022\016\n\006action\030\n \001(\003\022\031\n\021actionDe" +
"scription\030\013 \001(\t\022\016\n\006userId\030\014 \001(\003\022\016\n\006popSt" +
"r\030\016 \001(\t\022\037\n\017backgroundImage\030\020 \001(\0132\006.Image" +
"\022!\n\021backgroundImageV2\030\021 \001(\0132\006.Image\022 \n\021a" +
"nchorDisplayText\030\022 \001(\0132\005.Text\022\030\n\020userEnt" +
"erTipType\030\024 \001(\003\022\032\n\022anchorEnterTipType\030\025 " +
"\001(\003\022\201\001\n\016buriedPointMap\030\026 \003(\0132i.tech.ordi" +
"naryroad.live.chat.client.douyin.protobu" +
"f.douyin_webcast_member_message_msg.Buri" +
"edPointMapEntry\0325\n\023BuriedPointMapEntry\022\013" +
"\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001Bd\n2tech.o" +
"rdinaryroad.live.chat.client.douyin.prot" +
"obufB&Douyin_webcast_member_message_msgP" +
"rotoP\001\242\002\003GPBb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.getDescriptor(),
});
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor,
new java.lang.String[] { "Common", "User", "MemberCount", "Operator", "IsSetToAdmin", "IsTopUser", "RankScore", "TopUserNo", "EnterType", "Action", "ActionDescription", "UserId", "PopStr", "BackgroundImage", "BackgroundImageV2", "AnchorDisplayText", "UserEnterTipType", "AnchorEnterTipType", "BuriedPointMap", });
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_descriptor =
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor.getNestedTypes().get(0);
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@@ -1,93 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_websocket_frame.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public final class Douyin_websocket_frameProto {
private Douyin_websocket_frameProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\034douyin_websocket_frame.proto\0222tech.ord" +
"inaryroad.live.chat.client.douyin.protob" +
"uf\"\301\002\n\026douyin_websocket_frame\022\016\n\006seq_id\030" +
"\001 \001(\004\022\016\n\006log_id\030\002 \001(\004\022\017\n\007service\030\003 \001(\004\022\016" +
"\n\006method\030\004 \001(\004\022q\n\014headers_list\030\005 \003(\0132[.t" +
"ech.ordinaryroad.live.chat.client.douyin" +
".protobuf.douyin_websocket_frame.Headers" +
"ListEntry\022\030\n\020payload_encoding\030\006 \001(\t\022\024\n\014p" +
"ayload_type\030\007 \001(\t\022\017\n\007payload\030\010 \001(\014\0322\n\020He" +
"adersListEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" +
"(\t:\0028\001BY\n2tech.ordinaryroad.live.chat.cl" +
"ient.douyin.protobufB\033Douyin_websocket_f" +
"rameProtoP\001\242\002\003GPBb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor,
new java.lang.String[] { "SeqId", "LogId", "Service", "Method", "HeadersList", "PayloadEncoding", "PayloadType", "Payload", });
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_descriptor =
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor.getNestedTypes().get(0);
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@@ -1,93 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_cmd_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public interface douyin_cmd_msgOrBuilder extends
// @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string method = 1;</code>
* @return The method.
*/
java.lang.String getMethod();
/**
* <code>string method = 1;</code>
* @return The bytes for method.
*/
com.google.protobuf.ByteString
getMethodBytes();
/**
* <code>bytes payload = 2;</code>
* @return The payload.
*/
com.google.protobuf.ByteString getPayload();
/**
* <code>int64 msg_id = 3;</code>
* @return The msgId.
*/
long getMsgId();
/**
* <code>int32 msg_type = 4;</code>
* @return The msgType.
*/
int getMsgType();
/**
* <code>int64 offset = 5;</code>
* @return The offset.
*/
long getOffset();
/**
* <code>bool need_wrds_store = 6;</code>
* @return The needWrdsStore.
*/
boolean getNeedWrdsStore();
/**
* <code>int64 wrds_version = 7;</code>
* @return The wrdsVersion.
*/
long getWrdsVersion();
/**
* <code>string wrds_sub_key = 8;</code>
* @return The wrdsSubKey.
*/
java.lang.String getWrdsSubKey();
/**
* <code>string wrds_sub_key = 8;</code>
* @return The bytes for wrdsSubKey.
*/
com.google.protobuf.ByteString
getWrdsSubKeyBytes();
}

View File

@@ -1,220 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_webcast_chat_message_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public interface douyin_webcast_chat_message_msgOrBuilder extends
// @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg)
com.google.protobuf.MessageOrBuilder {
/**
* <code>.Common common = 1;</code>
* @return Whether the common field is set.
*/
boolean hasCommon();
/**
* <code>.Common common = 1;</code>
* @return The common.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon();
/**
* <code>.Common common = 1;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder();
/**
* <code>.User user = 2;</code>
* @return Whether the user field is set.
*/
boolean hasUser();
/**
* <code>.User user = 2;</code>
* @return The user.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser();
/**
* <code>.User user = 2;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder();
/**
* <code>string content = 3;</code>
* @return The content.
*/
java.lang.String getContent();
/**
* <code>string content = 3;</code>
* @return The bytes for content.
*/
com.google.protobuf.ByteString
getContentBytes();
/**
* <code>bool visible_to_sender = 4;</code>
* @return The visibleToSender.
*/
boolean getVisibleToSender();
/**
* <code>.Image background_image = 5;</code>
* @return Whether the backgroundImage field is set.
*/
boolean hasBackgroundImage();
/**
* <code>.Image background_image = 5;</code>
* @return The backgroundImage.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage();
/**
* <code>.Image background_image = 5;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder();
/**
* <code>string full_screen_text_color = 6;</code>
* @return The fullScreenTextColor.
*/
java.lang.String getFullScreenTextColor();
/**
* <code>string full_screen_text_color = 6;</code>
* @return The bytes for fullScreenTextColor.
*/
com.google.protobuf.ByteString
getFullScreenTextColorBytes();
/**
* <code>.Image background_image_v2 = 7;</code>
* @return Whether the backgroundImageV2 field is set.
*/
boolean hasBackgroundImageV2();
/**
* <code>.Image background_image_v2 = 7;</code>
* @return The backgroundImageV2.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2();
/**
* <code>.Image background_image_v2 = 7;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder();
/**
* <pre>
* PublicAreaCommon public_area_common = 9;
* </pre>
*
* <code>.Image gift_image = 10;</code>
* @return Whether the giftImage field is set.
*/
boolean hasGiftImage();
/**
* <pre>
* PublicAreaCommon public_area_common = 9;
* </pre>
*
* <code>.Image gift_image = 10;</code>
* @return The giftImage.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getGiftImage();
/**
* <pre>
* PublicAreaCommon public_area_common = 9;
* </pre>
*
* <code>.Image gift_image = 10;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftImageOrBuilder();
/**
* <code>uint64 agree_msg_id = 11;</code>
* @return The agreeMsgId.
*/
long getAgreeMsgId();
/**
* <code>uint32 priority_level = 12;</code>
* @return The priorityLevel.
*/
int getPriorityLevel();
/**
* <pre>
* LandscapeAreaCommon landscape_area_common = 13;
* </pre>
*
* <code>uint64 event_time = 15;</code>
* @return The eventTime.
*/
long getEventTime();
/**
* <code>bool send_review = 16;</code>
* @return The sendReview.
*/
boolean getSendReview();
/**
* <code>bool from_intercom = 17;</code>
* @return The fromIntercom.
*/
boolean getFromIntercom();
/**
* <code>bool intercom_hide_user_card = 18;</code>
* @return The intercomHideUserCard.
*/
boolean getIntercomHideUserCard();
/**
* <pre>
* repeated string chatTagsList = 19;
* </pre>
*
* <code>string chat_by = 20;</code>
* @return The chatBy.
*/
java.lang.String getChatBy();
/**
* <pre>
* repeated string chatTagsList = 19;
* </pre>
*
* <code>string chat_by = 20;</code>
* @return The bytes for chatBy.
*/
com.google.protobuf.ByteString
getChatByBytes();
/**
* <pre>
* Text rtf_content = 22 ;
* </pre>
*
* <code>uint32 individual_chat_priority = 21;</code>
* @return The individualChatPriority.
*/
int getIndividualChatPriority();
}

View File

@@ -1,354 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_webcast_gift_message_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public interface douyin_webcast_gift_message_msgOrBuilder extends
// @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg)
com.google.protobuf.MessageOrBuilder {
/**
* <code>.Common common = 1;</code>
* @return Whether the common field is set.
*/
boolean hasCommon();
/**
* <code>.Common common = 1;</code>
* @return The common.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon();
/**
* <code>.Common common = 1;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder();
/**
* <code>uint64 long_gift_id = 2;</code>
* @return The longGiftId.
*/
long getLongGiftId();
/**
* <code>uint64 fan_ticket_count = 3;</code>
* @return The fanTicketCount.
*/
long getFanTicketCount();
/**
* <code>uint64 group_count = 4;</code>
* @return The groupCount.
*/
long getGroupCount();
/**
* <code>uint64 repeat_count = 5;</code>
* @return The repeatCount.
*/
long getRepeatCount();
/**
* <code>uint64 combo_count = 6;</code>
* @return The comboCount.
*/
long getComboCount();
/**
* <code>.User user = 7;</code>
* @return Whether the user field is set.
*/
boolean hasUser();
/**
* <code>.User user = 7;</code>
* @return The user.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser();
/**
* <code>.User user = 7;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder();
/**
* <code>.User to_user = 8;</code>
* @return Whether the toUser field is set.
*/
boolean hasToUser();
/**
* <code>.User to_user = 8;</code>
* @return The toUser.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getToUser();
/**
* <code>.User to_user = 8;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getToUserOrBuilder();
/**
* <code>uint32 repeat_end = 9;</code>
* @return The repeatEnd.
*/
int getRepeatEnd();
/**
* <code>.TextEffect text_effect = 10;</code>
* @return Whether the textEffect field is set.
*/
boolean hasTextEffect();
/**
* <code>.TextEffect text_effect = 10;</code>
* @return The textEffect.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getTextEffect();
/**
* <code>.TextEffect text_effect = 10;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder getTextEffectOrBuilder();
/**
* <code>uint64 group_id = 11;</code>
* @return The groupId.
*/
long getGroupId();
/**
* <code>uint64 income_taskgifts = 12;</code>
* @return The incomeTaskgifts.
*/
long getIncomeTaskgifts();
/**
* <code>uint64 room_fan_ticket_count = 13;</code>
* @return The roomFanTicketCount.
*/
long getRoomFanTicketCount();
/**
* <code>.GiftIMPriority priority = 14;</code>
* @return Whether the priority field is set.
*/
boolean hasPriority();
/**
* <code>.GiftIMPriority priority = 14;</code>
* @return The priority.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getPriority();
/**
* <code>.GiftIMPriority priority = 14;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder getPriorityOrBuilder();
/**
* <code>.GiftStruct gift = 15;</code>
* @return Whether the gift field is set.
*/
boolean hasGift();
/**
* <code>.GiftStruct gift = 15;</code>
* @return The gift.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getGift();
/**
* <code>.GiftStruct gift = 15;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder getGiftOrBuilder();
/**
* <code>string log_id = 16;</code>
* @return The logId.
*/
java.lang.String getLogId();
/**
* <code>string log_id = 16;</code>
* @return The bytes for logId.
*/
com.google.protobuf.ByteString
getLogIdBytes();
/**
* <code>uint64 send_type = 17;</code>
* @return The sendType.
*/
long getSendType();
/**
* <code>.PublicAreaCommon public_area_common = 18;</code>
* @return Whether the publicAreaCommon field is set.
*/
boolean hasPublicAreaCommon();
/**
* <code>.PublicAreaCommon public_area_common = 18;</code>
* @return The publicAreaCommon.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getPublicAreaCommon();
/**
* <code>.PublicAreaCommon public_area_common = 18;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder getPublicAreaCommonOrBuilder();
/**
* <code>.Text tray_display_text = 19;</code>
* @return Whether the trayDisplayText field is set.
*/
boolean hasTrayDisplayText();
/**
* <code>.Text tray_display_text = 19;</code>
* @return The trayDisplayText.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getTrayDisplayText();
/**
* <code>.Text tray_display_text = 19;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTrayDisplayTextOrBuilder();
/**
* <code>uint64 banned_display_effects = 20;</code>
* @return The bannedDisplayEffects.
*/
long getBannedDisplayEffects();
/**
* <pre>
* GiftTrayInfo trayInfo = 21;
* AssetEffectMixInfo assetEffectMixInfo = 22;
* </pre>
*
* <code>bool display_for_self = 25;</code>
* @return The displayForSelf.
*/
boolean getDisplayForSelf();
/**
* <code>string interact_gift_info = 26;</code>
* @return The interactGiftInfo.
*/
java.lang.String getInteractGiftInfo();
/**
* <code>string interact_gift_info = 26;</code>
* @return The bytes for interactGiftInfo.
*/
com.google.protobuf.ByteString
getInteractGiftInfoBytes();
/**
* <code>string diy_item_info = 27;</code>
* @return The diyItemInfo.
*/
java.lang.String getDiyItemInfo();
/**
* <code>string diy_item_info = 27;</code>
* @return The bytes for diyItemInfo.
*/
com.google.protobuf.ByteString
getDiyItemInfoBytes();
/**
* <code>repeated uint64 min_asset_set_list = 28;</code>
* @return A list containing the minAssetSetList.
*/
java.util.List<java.lang.Long> getMinAssetSetListList();
/**
* <code>repeated uint64 min_asset_set_list = 28;</code>
* @return The count of minAssetSetList.
*/
int getMinAssetSetListCount();
/**
* <code>repeated uint64 min_asset_set_list = 28;</code>
* @param index The index of the element to return.
* @return The minAssetSetList at the given index.
*/
long getMinAssetSetList(int index);
/**
* <code>uint64 total_count = 29;</code>
* @return The totalCount.
*/
long getTotalCount();
/**
* <code>uint32 client_gift_source = 30;</code>
* @return The clientGiftSource.
*/
int getClientGiftSource();
/**
* <pre>
* AnchorGiftData anchorGift = 31;
* </pre>
*
* <code>repeated uint64 to_user_ids_list = 32;</code>
* @return A list containing the toUserIdsList.
*/
java.util.List<java.lang.Long> getToUserIdsListList();
/**
* <pre>
* AnchorGiftData anchorGift = 31;
* </pre>
*
* <code>repeated uint64 to_user_ids_list = 32;</code>
* @return The count of toUserIdsList.
*/
int getToUserIdsListCount();
/**
* <pre>
* AnchorGiftData anchorGift = 31;
* </pre>
*
* <code>repeated uint64 to_user_ids_list = 32;</code>
* @param index The index of the element to return.
* @return The toUserIdsList at the given index.
*/
long getToUserIdsList(int index);
/**
* <code>uint64 send_timet = 33;</code>
* @return The sendTimet.
*/
long getSendTimet();
/**
* <code>uint64 force_display_effectst = 34;</code>
* @return The forceDisplayEffectst.
*/
long getForceDisplayEffectst();
/**
* <code>string trace_id = 35;</code>
* @return The traceId.
*/
java.lang.String getTraceId();
/**
* <code>string trace_id = 35;</code>
* @return The bytes for traceId.
*/
com.google.protobuf.ByteString
getTraceIdBytes();
/**
* <code>uint64 effect_display_ts = 36;</code>
* @return The effectDisplayTs.
*/
long getEffectDisplayTs();
}

View File

@@ -1,140 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_webcast_like_message_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public interface douyin_webcast_like_message_msgOrBuilder extends
// @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg)
com.google.protobuf.MessageOrBuilder {
/**
* <code>.Common common = 1;</code>
* @return Whether the common field is set.
*/
boolean hasCommon();
/**
* <code>.Common common = 1;</code>
* @return The common.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon();
/**
* <code>.Common common = 1;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder();
/**
* <code>uint64 count = 2;</code>
* @return The count.
*/
long getCount();
/**
* <code>uint64 total = 3;</code>
* @return The total.
*/
long getTotal();
/**
* <code>uint64 color = 4;</code>
* @return The color.
*/
long getColor();
/**
* <code>.User user = 5;</code>
* @return Whether the user field is set.
*/
boolean hasUser();
/**
* <code>.User user = 5;</code>
* @return The user.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser();
/**
* <code>.User user = 5;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder();
/**
* <code>string icon = 6;</code>
* @return The icon.
*/
java.lang.String getIcon();
/**
* <code>string icon = 6;</code>
* @return The bytes for icon.
*/
com.google.protobuf.ByteString
getIconBytes();
/**
* <code>.DoubleLikeDetail doubleLikeDetail = 7;</code>
* @return Whether the doubleLikeDetail field is set.
*/
boolean hasDoubleLikeDetail();
/**
* <code>.DoubleLikeDetail doubleLikeDetail = 7;</code>
* @return The doubleLikeDetail.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDoubleLikeDetail();
/**
* <code>.DoubleLikeDetail doubleLikeDetail = 7;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder getDoubleLikeDetailOrBuilder();
/**
* <pre>
* DisplayControlInfo displayControlInfo = 8;
* </pre>
*
* <code>uint64 linkmicGuestUid = 9;</code>
* @return The linkmicGuestUid.
*/
long getLinkmicGuestUid();
/**
* <pre>
* PicoDisplayInfo picoDisplayInfo = 11;
* = 12;
* </pre>
*
* <code>string scene = 10;</code>
* @return The scene.
*/
java.lang.String getScene();
/**
* <pre>
* PicoDisplayInfo picoDisplayInfo = 11;
* = 12;
* </pre>
*
* <code>string scene = 10;</code>
* @return The bytes for scene.
*/
com.google.protobuf.ByteString
getSceneBytes();
}

View File

@@ -1,87 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_webcast_like_message_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public final class douyin_webcast_like_message_msgProto {
private douyin_webcast_like_message_msgProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n%douyin_webcast_like_message_msg.proto\022" +
"2tech.ordinaryroad.live.chat.client.douy" +
"in.protobuf\032\014Common.proto\032\nUser.proto\032\026D" +
"oubleLikeDetail.proto\"\337\001\n\037douyin_webcast" +
"_like_message_msg\022\027\n\006common\030\001 \001(\0132\007.Comm" +
"on\022\r\n\005count\030\002 \001(\004\022\r\n\005total\030\003 \001(\004\022\r\n\005colo" +
"r\030\004 \001(\004\022\023\n\004user\030\005 \001(\0132\005.User\022\014\n\004icon\030\006 \001" +
"(\t\022+\n\020doubleLikeDetail\030\007 \001(\0132\021.DoubleLik" +
"eDetail\022\027\n\017linkmicGuestUid\030\t \001(\004\022\r\n\005scen" +
"e\030\n \001(\tBb\n2tech.ordinaryroad.live.chat.c" +
"lient.douyin.protobufB$douyin_webcast_li" +
"ke_message_msgProtoP\001\242\002\003GPBb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(),
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.getDescriptor(),
});
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_descriptor,
new java.lang.String[] { "Common", "Count", "Total", "Color", "User", "Icon", "DoubleLikeDetail", "LinkmicGuestUid", "Scene", });
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor();
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@@ -1,265 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_webcast_member_message_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public interface douyin_webcast_member_message_msgOrBuilder extends
// @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg)
com.google.protobuf.MessageOrBuilder {
/**
* <code>.Common common = 1;</code>
* @return Whether the common field is set.
*/
boolean hasCommon();
/**
* <code>.Common common = 1;</code>
* @return The common.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon();
/**
* <code>.Common common = 1;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder();
/**
* <code>.User user = 2;</code>
* @return Whether the user field is set.
*/
boolean hasUser();
/**
* <code>.User user = 2;</code>
* @return The user.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser();
/**
* <code>.User user = 2;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder();
/**
* <code>uint64 memberCount = 3;</code>
* @return The memberCount.
*/
long getMemberCount();
/**
* <code>.User operator = 4;</code>
* @return Whether the operator field is set.
*/
boolean hasOperator();
/**
* <code>.User operator = 4;</code>
* @return The operator.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getOperator();
/**
* <code>.User operator = 4;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getOperatorOrBuilder();
/**
* <code>bool isSetToAdmin = 5;</code>
* @return The isSetToAdmin.
*/
boolean getIsSetToAdmin();
/**
* <code>bool isTopUser = 6;</code>
* @return The isTopUser.
*/
boolean getIsTopUser();
/**
* <code>int64 rankScore = 7;</code>
* @return The rankScore.
*/
long getRankScore();
/**
* <code>int64 topUserNo = 8;</code>
* @return The topUserNo.
*/
long getTopUserNo();
/**
* <code>int64 enterType = 9;</code>
* @return The enterType.
*/
long getEnterType();
/**
* <code>int64 action = 10;</code>
* @return The action.
*/
long getAction();
/**
* <code>string actionDescription = 11;</code>
* @return The actionDescription.
*/
java.lang.String getActionDescription();
/**
* <code>string actionDescription = 11;</code>
* @return The bytes for actionDescription.
*/
com.google.protobuf.ByteString
getActionDescriptionBytes();
/**
* <code>int64 userId = 12;</code>
* @return The userId.
*/
long getUserId();
/**
* <pre>
* EffectConfig effectConfig = 13;
* </pre>
*
* <code>string popStr = 14;</code>
* @return The popStr.
*/
java.lang.String getPopStr();
/**
* <pre>
* EffectConfig effectConfig = 13;
* </pre>
*
* <code>string popStr = 14;</code>
* @return The bytes for popStr.
*/
com.google.protobuf.ByteString
getPopStrBytes();
/**
* <pre>
* EffectConfig enterEffectConfig = 15;
* </pre>
*
* <code>.Image backgroundImage = 16;</code>
* @return Whether the backgroundImage field is set.
*/
boolean hasBackgroundImage();
/**
* <pre>
* EffectConfig enterEffectConfig = 15;
* </pre>
*
* <code>.Image backgroundImage = 16;</code>
* @return The backgroundImage.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage();
/**
* <pre>
* EffectConfig enterEffectConfig = 15;
* </pre>
*
* <code>.Image backgroundImage = 16;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder();
/**
* <code>.Image backgroundImageV2 = 17;</code>
* @return Whether the backgroundImageV2 field is set.
*/
boolean hasBackgroundImageV2();
/**
* <code>.Image backgroundImageV2 = 17;</code>
* @return The backgroundImageV2.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2();
/**
* <code>.Image backgroundImageV2 = 17;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder();
/**
* <code>.Text anchorDisplayText = 18;</code>
* @return Whether the anchorDisplayText field is set.
*/
boolean hasAnchorDisplayText();
/**
* <code>.Text anchorDisplayText = 18;</code>
* @return The anchorDisplayText.
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getAnchorDisplayText();
/**
* <code>.Text anchorDisplayText = 18;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getAnchorDisplayTextOrBuilder();
/**
* <pre>
* PublicAreaCommon publicAreaCommon = 19;
* </pre>
*
* <code>int64 userEnterTipType = 20;</code>
* @return The userEnterTipType.
*/
long getUserEnterTipType();
/**
* <code>int64 anchorEnterTipType = 21;</code>
* @return The anchorEnterTipType.
*/
long getAnchorEnterTipType();
/**
* <code>map&lt;string, string&gt; buriedPointMap = 22;</code>
*/
int getBuriedPointMapCount();
/**
* <code>map&lt;string, string&gt; buriedPointMap = 22;</code>
*/
boolean containsBuriedPointMap(
java.lang.String key);
/**
* Use {@link #getBuriedPointMapMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.String>
getBuriedPointMap();
/**
* <code>map&lt;string, string&gt; buriedPointMap = 22;</code>
*/
java.util.Map<java.lang.String, java.lang.String>
getBuriedPointMapMap();
/**
* <code>map&lt;string, string&gt; buriedPointMap = 22;</code>
*/
/* nullable */
java.lang.String getBuriedPointMapOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <code>map&lt;string, string&gt; buriedPointMap = 22;</code>
*/
java.lang.String getBuriedPointMapOrThrow(
java.lang.String key);
}

View File

@@ -1,121 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_websocket_frame.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public interface douyin_websocket_frameOrBuilder extends
// @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame)
com.google.protobuf.MessageOrBuilder {
/**
* <code>uint64 seq_id = 1;</code>
* @return The seqId.
*/
long getSeqId();
/**
* <code>uint64 log_id = 2;</code>
* @return The logId.
*/
long getLogId();
/**
* <code>uint64 service = 3;</code>
* @return The service.
*/
long getService();
/**
* <code>uint64 method = 4;</code>
* @return The method.
*/
long getMethod();
/**
* <code>map&lt;string, string&gt; headers_list = 5;</code>
*/
int getHeadersListCount();
/**
* <code>map&lt;string, string&gt; headers_list = 5;</code>
*/
boolean containsHeadersList(
java.lang.String key);
/**
* Use {@link #getHeadersListMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.String>
getHeadersList();
/**
* <code>map&lt;string, string&gt; headers_list = 5;</code>
*/
java.util.Map<java.lang.String, java.lang.String>
getHeadersListMap();
/**
* <code>map&lt;string, string&gt; headers_list = 5;</code>
*/
/* nullable */
java.lang.String getHeadersListOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <code>map&lt;string, string&gt; headers_list = 5;</code>
*/
java.lang.String getHeadersListOrThrow(
java.lang.String key);
/**
* <code>string payload_encoding = 6;</code>
* @return The payloadEncoding.
*/
java.lang.String getPayloadEncoding();
/**
* <code>string payload_encoding = 6;</code>
* @return The bytes for payloadEncoding.
*/
com.google.protobuf.ByteString
getPayloadEncodingBytes();
/**
* <code>string payload_type = 7;</code>
* @return The payloadType.
*/
java.lang.String getPayloadType();
/**
* <code>string payload_type = 7;</code>
* @return The bytes for payloadType.
*/
com.google.protobuf.ByteString
getPayloadTypeBytes();
/**
* <code>bytes payload = 8;</code>
* @return The payload.
*/
com.google.protobuf.ByteString getPayload();
}

View File

@@ -1,175 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_websocket_frame_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public interface douyin_websocket_frame_msgOrBuilder extends
// @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code>
*/
java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg>
getMessagesListList();
/**
* <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg getMessagesList(int index);
/**
* <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code>
*/
int getMessagesListCount();
/**
* <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code>
*/
java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder>
getMessagesListOrBuilderList();
/**
* <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code>
*/
tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder getMessagesListOrBuilder(
int index);
/**
* <code>string cursor = 2;</code>
* @return The cursor.
*/
java.lang.String getCursor();
/**
* <code>string cursor = 2;</code>
* @return The bytes for cursor.
*/
com.google.protobuf.ByteString
getCursorBytes();
/**
* <code>uint64 fetch_interval = 3;</code>
* @return The fetchInterval.
*/
long getFetchInterval();
/**
* <code>uint64 now = 4;</code>
* @return The now.
*/
long getNow();
/**
* <code>string internal_ext = 5;</code>
* @return The internalExt.
*/
java.lang.String getInternalExt();
/**
* <code>string internal_ext = 5;</code>
* @return The bytes for internalExt.
*/
com.google.protobuf.ByteString
getInternalExtBytes();
/**
* <code>uint32 fetch_type = 6;</code>
* @return The fetchType.
*/
int getFetchType();
/**
* <code>map&lt;string, string&gt; route_params = 7;</code>
*/
int getRouteParamsCount();
/**
* <code>map&lt;string, string&gt; route_params = 7;</code>
*/
boolean containsRouteParams(
java.lang.String key);
/**
* Use {@link #getRouteParamsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.String>
getRouteParams();
/**
* <code>map&lt;string, string&gt; route_params = 7;</code>
*/
java.util.Map<java.lang.String, java.lang.String>
getRouteParamsMap();
/**
* <code>map&lt;string, string&gt; route_params = 7;</code>
*/
/* nullable */
java.lang.String getRouteParamsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <code>map&lt;string, string&gt; route_params = 7;</code>
*/
java.lang.String getRouteParamsOrThrow(
java.lang.String key);
/**
* <code>uint64 heartbeat_duration = 8;</code>
* @return The heartbeatDuration.
*/
long getHeartbeatDuration();
/**
* <code>bool need_ack = 9;</code>
* @return The needAck.
*/
boolean getNeedAck();
/**
* <code>string push_server = 10;</code>
* @return The pushServer.
*/
java.lang.String getPushServer();
/**
* <code>string push_server = 10;</code>
* @return The bytes for pushServer.
*/
com.google.protobuf.ByteString
getPushServerBytes();
/**
* <code>string live_cursor = 11;</code>
* @return The liveCursor.
*/
java.lang.String getLiveCursor();
/**
* <code>string live_cursor = 11;</code>
* @return The bytes for liveCursor.
*/
com.google.protobuf.ByteString
getLiveCursorBytes();
/**
* <code>bool history_no_more = 12;</code>
* @return The historyNoMore.
*/
boolean getHistoryNoMore();
}

View File

@@ -1,100 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2023 OrdinaryRoad
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: douyin_websocket_frame_msg.proto
package tech.ordinaryroad.live.chat.client.douyin.protobuf;
public final class douyin_websocket_frame_msgProto {
private douyin_websocket_frame_msgProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n douyin_websocket_frame_msg.proto\0222tech" +
".ordinaryroad.live.chat.client.douyin.pr" +
"otobuf\032\024douyin_cmd_msg.proto\"\362\003\n\032douyin_" +
"websocket_frame_msg\022Y\n\rmessages_list\030\001 \003" +
"(\0132B.tech.ordinaryroad.live.chat.client." +
"douyin.protobuf.douyin_cmd_msg\022\016\n\006cursor" +
"\030\002 \001(\t\022\026\n\016fetch_interval\030\003 \001(\004\022\013\n\003now\030\004 " +
"\001(\004\022\024\n\014internal_ext\030\005 \001(\t\022\022\n\nfetch_type\030" +
"\006 \001(\r\022u\n\014route_params\030\007 \003(\0132_.tech.ordin" +
"aryroad.live.chat.client.douyin.protobuf" +
".douyin_websocket_frame_msg.RouteParamsE" +
"ntry\022\032\n\022heartbeat_duration\030\010 \001(\004\022\020\n\010need" +
"_ack\030\t \001(\010\022\023\n\013push_server\030\n \001(\t\022\023\n\013live_" +
"cursor\030\013 \001(\t\022\027\n\017history_no_more\030\014 \001(\010\0322\n" +
"\020RouteParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" +
"\002 \001(\t:\0028\001B]\n2tech.ordinaryroad.live.chat" +
".client.douyin.protobufB\037douyin_websocke" +
"t_frame_msgProtoP\001\242\002\003GPBb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_cmd_msgProto.getDescriptor(),
});
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor,
new java.lang.String[] { "MessagesList", "Cursor", "FetchInterval", "Now", "InternalExt", "FetchType", "RouteParams", "HeartbeatDuration", "NeedAck", "PushServer", "LiveCursor", "HistoryNoMore", });
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_descriptor =
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor.getNestedTypes().get(0);
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_cmd_msgProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

Some files were not shown because too many files have changed in this diff Show More