mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
update: move to Laana v0.2.1
This commit is contained in:
parent
30c4b225b0
commit
5c9cb8f912
@ -86,3 +86,11 @@ message ForwardMessagePing {
|
|||||||
repeated string msgIds = 2;
|
repeated string msgIds = 2;
|
||||||
Peer targetPeer = 3;
|
Peer targetPeer = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message GetForwardedMessagesPing {
|
||||||
|
string refId = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetForwardedMessagesPong {
|
||||||
|
ForwardMessage forwardMessage = 1;
|
||||||
|
}
|
@ -19,6 +19,7 @@ message ActionPing {
|
|||||||
WithdrawMessagePing withdrawMessage = 106;
|
WithdrawMessagePing withdrawMessage = 106;
|
||||||
MarkPeerMessageAsReadPing markPeerMessageAsRead = 107;
|
MarkPeerMessageAsReadPing markPeerMessageAsRead = 107;
|
||||||
ForwardMessagePing forwardMessage = 108;
|
ForwardMessagePing forwardMessage = 108;
|
||||||
|
GetForwardedMessagesPing getForwardedMessages = 109;
|
||||||
|
|
||||||
GetAllBuddiesPing getAllBuddies = 201;
|
GetAllBuddiesPing getAllBuddies = 201;
|
||||||
GetAllGroupsPing getAllGroups = 202;
|
GetAllGroupsPing getAllGroups = 202;
|
||||||
@ -86,6 +87,7 @@ message ActionPong {
|
|||||||
GeneralSuccessPong withdrawMessage = 106;
|
GeneralSuccessPong withdrawMessage = 106;
|
||||||
GeneralSuccessPong markPeerMessageAsRead = 107;
|
GeneralSuccessPong markPeerMessageAsRead = 107;
|
||||||
GeneralSuccessPong forwardMessage = 108;
|
GeneralSuccessPong forwardMessage = 108;
|
||||||
|
GetForwardedMessagesPong getForwardedMessages = 109;
|
||||||
|
|
||||||
GetAllBuddiesPong getAllBuddies = 201;
|
GetAllBuddiesPong getAllBuddies = 201;
|
||||||
GetAllGroupsPong getAllGroups = 202;
|
GetAllGroupsPong getAllGroups = 202;
|
||||||
|
@ -32,7 +32,10 @@ message Message {
|
|||||||
LocationCard locationCard = 20;
|
LocationCard locationCard = 20;
|
||||||
ForwardMessageRef forwardMsgRef = 21;
|
ForwardMessageRef forwardMsgRef = 21;
|
||||||
XmlMessage xmlMessage = 22;
|
XmlMessage xmlMessage = 22;
|
||||||
JsonMessage jsonMessage = 23;
|
ArkMessage arkMessage = 23;
|
||||||
|
|
||||||
|
UnknownMessage unknownMessage = 98;
|
||||||
|
ExtendedMessage extendedMessage = 99;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,6 +139,16 @@ message XmlMessage {
|
|||||||
string xml = 1;
|
string xml = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message JsonMessage {
|
message ArkMessage {
|
||||||
string json = 1;
|
string json = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message UnknownMessage {
|
||||||
|
string rawContent = 1;
|
||||||
|
optional string typeIdentifier = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExtendedMessage {
|
||||||
|
string type = 1;
|
||||||
|
bytes content = 2;
|
||||||
|
}
|
||||||
|
@ -10,6 +10,7 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|||||||
import type { PartialMessage } from "@protobuf-ts/runtime";
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||||
import { MessageType } from "@protobuf-ts/runtime";
|
import { MessageType } from "@protobuf-ts/runtime";
|
||||||
|
import { ForwardMessage } from "../entity/message";
|
||||||
import { Message } from "../entity/message";
|
import { Message } from "../entity/message";
|
||||||
import { ForwardMessageRef } from "../entity/message";
|
import { ForwardMessageRef } from "../entity/message";
|
||||||
import { Peer } from "../entity/message";
|
import { Peer } from "../entity/message";
|
||||||
@ -240,6 +241,24 @@ export enum ForwardMessagePing_Operation {
|
|||||||
*/
|
*/
|
||||||
AS_PACKED = 1
|
AS_PACKED = 1
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @generated from protobuf message Laana.GetForwardedMessagesPing
|
||||||
|
*/
|
||||||
|
export interface GetForwardedMessagesPing {
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: string refId = 1;
|
||||||
|
*/
|
||||||
|
refId: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @generated from protobuf message Laana.GetForwardedMessagesPong
|
||||||
|
*/
|
||||||
|
export interface GetForwardedMessagesPong {
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: Laana.ForwardMessage forwardMessage = 1;
|
||||||
|
*/
|
||||||
|
forwardMessage?: ForwardMessage;
|
||||||
|
}
|
||||||
// @generated message type with reflection information, may provide speed optimized methods
|
// @generated message type with reflection information, may provide speed optimized methods
|
||||||
class OutgoingMessage$Type extends MessageType<OutgoingMessage> {
|
class OutgoingMessage$Type extends MessageType<OutgoingMessage> {
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -1017,3 +1036,96 @@ class ForwardMessagePing$Type extends MessageType<ForwardMessagePing> {
|
|||||||
* @generated MessageType for protobuf message Laana.ForwardMessagePing
|
* @generated MessageType for protobuf message Laana.ForwardMessagePing
|
||||||
*/
|
*/
|
||||||
export const ForwardMessagePing = new ForwardMessagePing$Type();
|
export const ForwardMessagePing = new ForwardMessagePing$Type();
|
||||||
|
// @generated message type with reflection information, may provide speed optimized methods
|
||||||
|
class GetForwardedMessagesPing$Type extends MessageType<GetForwardedMessagesPing> {
|
||||||
|
constructor() {
|
||||||
|
super("Laana.GetForwardedMessagesPing", [
|
||||||
|
{ no: 1, name: "refId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
create(value?: PartialMessage<GetForwardedMessagesPing>): GetForwardedMessagesPing {
|
||||||
|
const message = globalThis.Object.create((this.messagePrototype!));
|
||||||
|
message.refId = "";
|
||||||
|
if (value !== undefined)
|
||||||
|
reflectionMergePartial<GetForwardedMessagesPing>(this, message, value);
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetForwardedMessagesPing): GetForwardedMessagesPing {
|
||||||
|
let message = target ?? this.create(), end = reader.pos + length;
|
||||||
|
while (reader.pos < end) {
|
||||||
|
let [fieldNo, wireType] = reader.tag();
|
||||||
|
switch (fieldNo) {
|
||||||
|
case /* string refId */ 1:
|
||||||
|
message.refId = reader.string();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
let u = options.readUnknownField;
|
||||||
|
if (u === "throw")
|
||||||
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||||
|
let d = reader.skip(wireType);
|
||||||
|
if (u !== false)
|
||||||
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
internalBinaryWrite(message: GetForwardedMessagesPing, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||||
|
/* string refId = 1; */
|
||||||
|
if (message.refId !== "")
|
||||||
|
writer.tag(1, WireType.LengthDelimited).string(message.refId);
|
||||||
|
let u = options.writeUnknownFields;
|
||||||
|
if (u !== false)
|
||||||
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||||
|
return writer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @generated MessageType for protobuf message Laana.GetForwardedMessagesPing
|
||||||
|
*/
|
||||||
|
export const GetForwardedMessagesPing = new GetForwardedMessagesPing$Type();
|
||||||
|
// @generated message type with reflection information, may provide speed optimized methods
|
||||||
|
class GetForwardedMessagesPong$Type extends MessageType<GetForwardedMessagesPong> {
|
||||||
|
constructor() {
|
||||||
|
super("Laana.GetForwardedMessagesPong", [
|
||||||
|
{ no: 1, name: "forwardMessage", kind: "message", T: () => ForwardMessage }
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
create(value?: PartialMessage<GetForwardedMessagesPong>): GetForwardedMessagesPong {
|
||||||
|
const message = globalThis.Object.create((this.messagePrototype!));
|
||||||
|
if (value !== undefined)
|
||||||
|
reflectionMergePartial<GetForwardedMessagesPong>(this, message, value);
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetForwardedMessagesPong): GetForwardedMessagesPong {
|
||||||
|
let message = target ?? this.create(), end = reader.pos + length;
|
||||||
|
while (reader.pos < end) {
|
||||||
|
let [fieldNo, wireType] = reader.tag();
|
||||||
|
switch (fieldNo) {
|
||||||
|
case /* Laana.ForwardMessage forwardMessage */ 1:
|
||||||
|
message.forwardMessage = ForwardMessage.internalBinaryRead(reader, reader.uint32(), options, message.forwardMessage);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
let u = options.readUnknownField;
|
||||||
|
if (u === "throw")
|
||||||
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||||
|
let d = reader.skip(wireType);
|
||||||
|
if (u !== false)
|
||||||
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
internalBinaryWrite(message: GetForwardedMessagesPong, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||||
|
/* Laana.ForwardMessage forwardMessage = 1; */
|
||||||
|
if (message.forwardMessage)
|
||||||
|
ForwardMessage.internalBinaryWrite(message.forwardMessage, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||||
|
let u = options.writeUnknownFields;
|
||||||
|
if (u !== false)
|
||||||
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||||
|
return writer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @generated MessageType for protobuf message Laana.GetForwardedMessagesPong
|
||||||
|
*/
|
||||||
|
export const GetForwardedMessagesPong = new GetForwardedMessagesPong$Type();
|
||||||
|
@ -28,6 +28,7 @@ import { GetBuddyInfoPong } from "./contact";
|
|||||||
import { GetRecentContactListPong } from "./contact";
|
import { GetRecentContactListPong } from "./contact";
|
||||||
import { GetAllGroupsPong } from "./contact";
|
import { GetAllGroupsPong } from "./contact";
|
||||||
import { GetAllBuddiesPong } from "./contact";
|
import { GetAllBuddiesPong } from "./contact";
|
||||||
|
import { GetForwardedMessagesPong } from "./message";
|
||||||
import { GetHistoryMessagesPong } from "./message";
|
import { GetHistoryMessagesPong } from "./message";
|
||||||
import { GetMessagesPong } from "./message";
|
import { GetMessagesPong } from "./message";
|
||||||
import { GetMessagePong } from "./message";
|
import { GetMessagePong } from "./message";
|
||||||
@ -65,6 +66,7 @@ import { GetBuddyInfoPing } from "./contact";
|
|||||||
import { GetRecentContactListPing } from "./contact";
|
import { GetRecentContactListPing } from "./contact";
|
||||||
import { GetAllGroupsPing } from "./contact";
|
import { GetAllGroupsPing } from "./contact";
|
||||||
import { GetAllBuddiesPing } from "./contact";
|
import { GetAllBuddiesPing } from "./contact";
|
||||||
|
import { GetForwardedMessagesPing } from "./message";
|
||||||
import { ForwardMessagePing } from "./message";
|
import { ForwardMessagePing } from "./message";
|
||||||
import { MarkPeerMessageAsReadPing } from "./message";
|
import { MarkPeerMessageAsReadPing } from "./message";
|
||||||
import { WithdrawMessagePing } from "./message";
|
import { WithdrawMessagePing } from "./message";
|
||||||
@ -132,6 +134,12 @@ export interface ActionPing {
|
|||||||
* @generated from protobuf field: Laana.ForwardMessagePing forwardMessage = 108;
|
* @generated from protobuf field: Laana.ForwardMessagePing forwardMessage = 108;
|
||||||
*/
|
*/
|
||||||
forwardMessage: ForwardMessagePing;
|
forwardMessage: ForwardMessagePing;
|
||||||
|
} | {
|
||||||
|
oneofKind: "getForwardedMessages";
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: Laana.GetForwardedMessagesPing getForwardedMessages = 109;
|
||||||
|
*/
|
||||||
|
getForwardedMessages: GetForwardedMessagesPing;
|
||||||
} | {
|
} | {
|
||||||
oneofKind: "getAllBuddies";
|
oneofKind: "getAllBuddies";
|
||||||
/**
|
/**
|
||||||
@ -430,6 +438,12 @@ export interface ActionPong {
|
|||||||
* @generated from protobuf field: Laana.GeneralSuccessPong forwardMessage = 108;
|
* @generated from protobuf field: Laana.GeneralSuccessPong forwardMessage = 108;
|
||||||
*/
|
*/
|
||||||
forwardMessage: GeneralSuccessPong;
|
forwardMessage: GeneralSuccessPong;
|
||||||
|
} | {
|
||||||
|
oneofKind: "getForwardedMessages";
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: Laana.GetForwardedMessagesPong getForwardedMessages = 109;
|
||||||
|
*/
|
||||||
|
getForwardedMessages: GetForwardedMessagesPong;
|
||||||
} | {
|
} | {
|
||||||
oneofKind: "getAllBuddies";
|
oneofKind: "getAllBuddies";
|
||||||
/**
|
/**
|
||||||
@ -658,6 +672,7 @@ class ActionPing$Type extends MessageType<ActionPing> {
|
|||||||
{ no: 106, name: "withdrawMessage", kind: "message", oneof: "ping", T: () => WithdrawMessagePing },
|
{ no: 106, name: "withdrawMessage", kind: "message", oneof: "ping", T: () => WithdrawMessagePing },
|
||||||
{ no: 107, name: "markPeerMessageAsRead", kind: "message", oneof: "ping", T: () => MarkPeerMessageAsReadPing },
|
{ no: 107, name: "markPeerMessageAsRead", kind: "message", oneof: "ping", T: () => MarkPeerMessageAsReadPing },
|
||||||
{ no: 108, name: "forwardMessage", kind: "message", oneof: "ping", T: () => ForwardMessagePing },
|
{ no: 108, name: "forwardMessage", kind: "message", oneof: "ping", T: () => ForwardMessagePing },
|
||||||
|
{ no: 109, name: "getForwardedMessages", kind: "message", oneof: "ping", T: () => GetForwardedMessagesPing },
|
||||||
{ no: 201, name: "getAllBuddies", kind: "message", oneof: "ping", T: () => GetAllBuddiesPing },
|
{ no: 201, name: "getAllBuddies", kind: "message", oneof: "ping", T: () => GetAllBuddiesPing },
|
||||||
{ no: 202, name: "getAllGroups", kind: "message", oneof: "ping", T: () => GetAllGroupsPing },
|
{ no: 202, name: "getAllGroups", kind: "message", oneof: "ping", T: () => GetAllGroupsPing },
|
||||||
{ no: 203, name: "getRecentContactList", kind: "message", oneof: "ping", T: () => GetRecentContactListPing },
|
{ no: 203, name: "getRecentContactList", kind: "message", oneof: "ping", T: () => GetRecentContactListPing },
|
||||||
@ -757,6 +772,12 @@ class ActionPing$Type extends MessageType<ActionPing> {
|
|||||||
forwardMessage: ForwardMessagePing.internalBinaryRead(reader, reader.uint32(), options, (message.ping as any).forwardMessage)
|
forwardMessage: ForwardMessagePing.internalBinaryRead(reader, reader.uint32(), options, (message.ping as any).forwardMessage)
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
case /* Laana.GetForwardedMessagesPing getForwardedMessages */ 109:
|
||||||
|
message.ping = {
|
||||||
|
oneofKind: "getForwardedMessages",
|
||||||
|
getForwardedMessages: GetForwardedMessagesPing.internalBinaryRead(reader, reader.uint32(), options, (message.ping as any).getForwardedMessages)
|
||||||
|
};
|
||||||
|
break;
|
||||||
case /* Laana.GetAllBuddiesPing getAllBuddies */ 201:
|
case /* Laana.GetAllBuddiesPing getAllBuddies */ 201:
|
||||||
message.ping = {
|
message.ping = {
|
||||||
oneofKind: "getAllBuddies",
|
oneofKind: "getAllBuddies",
|
||||||
@ -994,6 +1015,9 @@ class ActionPing$Type extends MessageType<ActionPing> {
|
|||||||
/* Laana.ForwardMessagePing forwardMessage = 108; */
|
/* Laana.ForwardMessagePing forwardMessage = 108; */
|
||||||
if (message.ping.oneofKind === "forwardMessage")
|
if (message.ping.oneofKind === "forwardMessage")
|
||||||
ForwardMessagePing.internalBinaryWrite(message.ping.forwardMessage, writer.tag(108, WireType.LengthDelimited).fork(), options).join();
|
ForwardMessagePing.internalBinaryWrite(message.ping.forwardMessage, writer.tag(108, WireType.LengthDelimited).fork(), options).join();
|
||||||
|
/* Laana.GetForwardedMessagesPing getForwardedMessages = 109; */
|
||||||
|
if (message.ping.oneofKind === "getForwardedMessages")
|
||||||
|
GetForwardedMessagesPing.internalBinaryWrite(message.ping.getForwardedMessages, writer.tag(109, WireType.LengthDelimited).fork(), options).join();
|
||||||
/* Laana.GetAllBuddiesPing getAllBuddies = 201; */
|
/* Laana.GetAllBuddiesPing getAllBuddies = 201; */
|
||||||
if (message.ping.oneofKind === "getAllBuddies")
|
if (message.ping.oneofKind === "getAllBuddies")
|
||||||
GetAllBuddiesPing.internalBinaryWrite(message.ping.getAllBuddies, writer.tag(201, WireType.LengthDelimited).fork(), options).join();
|
GetAllBuddiesPing.internalBinaryWrite(message.ping.getAllBuddies, writer.tag(201, WireType.LengthDelimited).fork(), options).join();
|
||||||
@ -1266,6 +1290,7 @@ class ActionPong$Type extends MessageType<ActionPong> {
|
|||||||
{ no: 106, name: "withdrawMessage", kind: "message", oneof: "pong", T: () => GeneralSuccessPong },
|
{ no: 106, name: "withdrawMessage", kind: "message", oneof: "pong", T: () => GeneralSuccessPong },
|
||||||
{ no: 107, name: "markPeerMessageAsRead", kind: "message", oneof: "pong", T: () => GeneralSuccessPong },
|
{ no: 107, name: "markPeerMessageAsRead", kind: "message", oneof: "pong", T: () => GeneralSuccessPong },
|
||||||
{ no: 108, name: "forwardMessage", kind: "message", oneof: "pong", T: () => GeneralSuccessPong },
|
{ no: 108, name: "forwardMessage", kind: "message", oneof: "pong", T: () => GeneralSuccessPong },
|
||||||
|
{ no: 109, name: "getForwardedMessages", kind: "message", oneof: "pong", T: () => GetForwardedMessagesPong },
|
||||||
{ no: 201, name: "getAllBuddies", kind: "message", oneof: "pong", T: () => GetAllBuddiesPong },
|
{ no: 201, name: "getAllBuddies", kind: "message", oneof: "pong", T: () => GetAllBuddiesPong },
|
||||||
{ no: 202, name: "getAllGroups", kind: "message", oneof: "pong", T: () => GetAllGroupsPong },
|
{ no: 202, name: "getAllGroups", kind: "message", oneof: "pong", T: () => GetAllGroupsPong },
|
||||||
{ no: 203, name: "getRecentContactList", kind: "message", oneof: "pong", T: () => GetRecentContactListPong },
|
{ no: 203, name: "getRecentContactList", kind: "message", oneof: "pong", T: () => GetRecentContactListPong },
|
||||||
@ -1371,6 +1396,12 @@ class ActionPong$Type extends MessageType<ActionPong> {
|
|||||||
forwardMessage: GeneralSuccessPong.internalBinaryRead(reader, reader.uint32(), options, (message.pong as any).forwardMessage)
|
forwardMessage: GeneralSuccessPong.internalBinaryRead(reader, reader.uint32(), options, (message.pong as any).forwardMessage)
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
case /* Laana.GetForwardedMessagesPong getForwardedMessages */ 109:
|
||||||
|
message.pong = {
|
||||||
|
oneofKind: "getForwardedMessages",
|
||||||
|
getForwardedMessages: GetForwardedMessagesPong.internalBinaryRead(reader, reader.uint32(), options, (message.pong as any).getForwardedMessages)
|
||||||
|
};
|
||||||
|
break;
|
||||||
case /* Laana.GetAllBuddiesPong getAllBuddies */ 201:
|
case /* Laana.GetAllBuddiesPong getAllBuddies */ 201:
|
||||||
message.pong = {
|
message.pong = {
|
||||||
oneofKind: "getAllBuddies",
|
oneofKind: "getAllBuddies",
|
||||||
@ -1611,6 +1642,9 @@ class ActionPong$Type extends MessageType<ActionPong> {
|
|||||||
/* Laana.GeneralSuccessPong forwardMessage = 108; */
|
/* Laana.GeneralSuccessPong forwardMessage = 108; */
|
||||||
if (message.pong.oneofKind === "forwardMessage")
|
if (message.pong.oneofKind === "forwardMessage")
|
||||||
GeneralSuccessPong.internalBinaryWrite(message.pong.forwardMessage, writer.tag(108, WireType.LengthDelimited).fork(), options).join();
|
GeneralSuccessPong.internalBinaryWrite(message.pong.forwardMessage, writer.tag(108, WireType.LengthDelimited).fork(), options).join();
|
||||||
|
/* Laana.GetForwardedMessagesPong getForwardedMessages = 109; */
|
||||||
|
if (message.pong.oneofKind === "getForwardedMessages")
|
||||||
|
GetForwardedMessagesPong.internalBinaryWrite(message.pong.getForwardedMessages, writer.tag(109, WireType.LengthDelimited).fork(), options).join();
|
||||||
/* Laana.GetAllBuddiesPong getAllBuddies = 201; */
|
/* Laana.GetAllBuddiesPong getAllBuddies = 201; */
|
||||||
if (message.pong.oneofKind === "getAllBuddies")
|
if (message.pong.oneofKind === "getAllBuddies")
|
||||||
GetAllBuddiesPong.internalBinaryWrite(message.pong.getAllBuddies, writer.tag(201, WireType.LengthDelimited).fork(), options).join();
|
GetAllBuddiesPong.internalBinaryWrite(message.pong.getAllBuddies, writer.tag(201, WireType.LengthDelimited).fork(), options).join();
|
||||||
|
@ -133,11 +133,23 @@ export interface Message {
|
|||||||
*/
|
*/
|
||||||
xmlMessage: XmlMessage;
|
xmlMessage: XmlMessage;
|
||||||
} | {
|
} | {
|
||||||
oneofKind: "jsonMessage";
|
oneofKind: "arkMessage";
|
||||||
/**
|
/**
|
||||||
* @generated from protobuf field: Laana.JsonMessage jsonMessage = 23;
|
* @generated from protobuf field: Laana.ArkMessage arkMessage = 23;
|
||||||
*/
|
*/
|
||||||
jsonMessage: JsonMessage;
|
arkMessage: ArkMessage;
|
||||||
|
} | {
|
||||||
|
oneofKind: "unknownMessage";
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: Laana.UnknownMessage unknownMessage = 98;
|
||||||
|
*/
|
||||||
|
unknownMessage: UnknownMessage;
|
||||||
|
} | {
|
||||||
|
oneofKind: "extendedMessage";
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: Laana.ExtendedMessage extendedMessage = 99;
|
||||||
|
*/
|
||||||
|
extendedMessage: ExtendedMessage;
|
||||||
} | {
|
} | {
|
||||||
oneofKind: undefined;
|
oneofKind: undefined;
|
||||||
};
|
};
|
||||||
@ -418,14 +430,40 @@ export interface XmlMessage {
|
|||||||
xml: string;
|
xml: string;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @generated from protobuf message Laana.JsonMessage
|
* @generated from protobuf message Laana.ArkMessage
|
||||||
*/
|
*/
|
||||||
export interface JsonMessage {
|
export interface ArkMessage {
|
||||||
/**
|
/**
|
||||||
* @generated from protobuf field: string json = 1;
|
* @generated from protobuf field: string json = 1;
|
||||||
*/
|
*/
|
||||||
json: string;
|
json: string;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @generated from protobuf message Laana.UnknownMessage
|
||||||
|
*/
|
||||||
|
export interface UnknownMessage {
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: string rawContent = 1;
|
||||||
|
*/
|
||||||
|
rawContent: string;
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: optional string typeIdentifier = 2;
|
||||||
|
*/
|
||||||
|
typeIdentifier?: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @generated from protobuf message Laana.ExtendedMessage
|
||||||
|
*/
|
||||||
|
export interface ExtendedMessage {
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: string type = 1;
|
||||||
|
*/
|
||||||
|
type: string;
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: bytes content = 2;
|
||||||
|
*/
|
||||||
|
content: Uint8Array;
|
||||||
|
}
|
||||||
// @generated message type with reflection information, may provide speed optimized methods
|
// @generated message type with reflection information, may provide speed optimized methods
|
||||||
class Peer$Type extends MessageType<Peer> {
|
class Peer$Type extends MessageType<Peer> {
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -501,7 +539,9 @@ class Message$Type extends MessageType<Message> {
|
|||||||
{ no: 20, name: "locationCard", kind: "message", oneof: "content", T: () => LocationCard },
|
{ no: 20, name: "locationCard", kind: "message", oneof: "content", T: () => LocationCard },
|
||||||
{ no: 21, name: "forwardMsgRef", kind: "message", oneof: "content", T: () => ForwardMessageRef },
|
{ no: 21, name: "forwardMsgRef", kind: "message", oneof: "content", T: () => ForwardMessageRef },
|
||||||
{ no: 22, name: "xmlMessage", kind: "message", oneof: "content", T: () => XmlMessage },
|
{ no: 22, name: "xmlMessage", kind: "message", oneof: "content", T: () => XmlMessage },
|
||||||
{ no: 23, name: "jsonMessage", kind: "message", oneof: "content", T: () => JsonMessage }
|
{ no: 23, name: "arkMessage", kind: "message", oneof: "content", T: () => ArkMessage },
|
||||||
|
{ no: 98, name: "unknownMessage", kind: "message", oneof: "content", T: () => UnknownMessage },
|
||||||
|
{ no: 99, name: "extendedMessage", kind: "message", oneof: "content", T: () => ExtendedMessage }
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
create(value?: PartialMessage<Message>): Message {
|
create(value?: PartialMessage<Message>): Message {
|
||||||
@ -603,10 +643,22 @@ class Message$Type extends MessageType<Message> {
|
|||||||
xmlMessage: XmlMessage.internalBinaryRead(reader, reader.uint32(), options, (message.content as any).xmlMessage)
|
xmlMessage: XmlMessage.internalBinaryRead(reader, reader.uint32(), options, (message.content as any).xmlMessage)
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case /* Laana.JsonMessage jsonMessage */ 23:
|
case /* Laana.ArkMessage arkMessage */ 23:
|
||||||
message.content = {
|
message.content = {
|
||||||
oneofKind: "jsonMessage",
|
oneofKind: "arkMessage",
|
||||||
jsonMessage: JsonMessage.internalBinaryRead(reader, reader.uint32(), options, (message.content as any).jsonMessage)
|
arkMessage: ArkMessage.internalBinaryRead(reader, reader.uint32(), options, (message.content as any).arkMessage)
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case /* Laana.UnknownMessage unknownMessage */ 98:
|
||||||
|
message.content = {
|
||||||
|
oneofKind: "unknownMessage",
|
||||||
|
unknownMessage: UnknownMessage.internalBinaryRead(reader, reader.uint32(), options, (message.content as any).unknownMessage)
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case /* Laana.ExtendedMessage extendedMessage */ 99:
|
||||||
|
message.content = {
|
||||||
|
oneofKind: "extendedMessage",
|
||||||
|
extendedMessage: ExtendedMessage.internalBinaryRead(reader, reader.uint32(), options, (message.content as any).extendedMessage)
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -669,9 +721,15 @@ class Message$Type extends MessageType<Message> {
|
|||||||
/* Laana.XmlMessage xmlMessage = 22; */
|
/* Laana.XmlMessage xmlMessage = 22; */
|
||||||
if (message.content.oneofKind === "xmlMessage")
|
if (message.content.oneofKind === "xmlMessage")
|
||||||
XmlMessage.internalBinaryWrite(message.content.xmlMessage, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
|
XmlMessage.internalBinaryWrite(message.content.xmlMessage, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
|
||||||
/* Laana.JsonMessage jsonMessage = 23; */
|
/* Laana.ArkMessage arkMessage = 23; */
|
||||||
if (message.content.oneofKind === "jsonMessage")
|
if (message.content.oneofKind === "arkMessage")
|
||||||
JsonMessage.internalBinaryWrite(message.content.jsonMessage, writer.tag(23, WireType.LengthDelimited).fork(), options).join();
|
ArkMessage.internalBinaryWrite(message.content.arkMessage, writer.tag(23, WireType.LengthDelimited).fork(), options).join();
|
||||||
|
/* Laana.UnknownMessage unknownMessage = 98; */
|
||||||
|
if (message.content.oneofKind === "unknownMessage")
|
||||||
|
UnknownMessage.internalBinaryWrite(message.content.unknownMessage, writer.tag(98, WireType.LengthDelimited).fork(), options).join();
|
||||||
|
/* Laana.ExtendedMessage extendedMessage = 99; */
|
||||||
|
if (message.content.oneofKind === "extendedMessage")
|
||||||
|
ExtendedMessage.internalBinaryWrite(message.content.extendedMessage, writer.tag(99, WireType.LengthDelimited).fork(), options).join();
|
||||||
let u = options.writeUnknownFields;
|
let u = options.writeUnknownFields;
|
||||||
if (u !== false)
|
if (u !== false)
|
||||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||||
@ -1581,20 +1639,20 @@ class XmlMessage$Type extends MessageType<XmlMessage> {
|
|||||||
*/
|
*/
|
||||||
export const XmlMessage = new XmlMessage$Type();
|
export const XmlMessage = new XmlMessage$Type();
|
||||||
// @generated message type with reflection information, may provide speed optimized methods
|
// @generated message type with reflection information, may provide speed optimized methods
|
||||||
class JsonMessage$Type extends MessageType<JsonMessage> {
|
class ArkMessage$Type extends MessageType<ArkMessage> {
|
||||||
constructor() {
|
constructor() {
|
||||||
super("Laana.JsonMessage", [
|
super("Laana.ArkMessage", [
|
||||||
{ no: 1, name: "json", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
{ no: 1, name: "json", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
create(value?: PartialMessage<JsonMessage>): JsonMessage {
|
create(value?: PartialMessage<ArkMessage>): ArkMessage {
|
||||||
const message = globalThis.Object.create((this.messagePrototype!));
|
const message = globalThis.Object.create((this.messagePrototype!));
|
||||||
message.json = "";
|
message.json = "";
|
||||||
if (value !== undefined)
|
if (value !== undefined)
|
||||||
reflectionMergePartial<JsonMessage>(this, message, value);
|
reflectionMergePartial<ArkMessage>(this, message, value);
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JsonMessage): JsonMessage {
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ArkMessage): ArkMessage {
|
||||||
let message = target ?? this.create(), end = reader.pos + length;
|
let message = target ?? this.create(), end = reader.pos + length;
|
||||||
while (reader.pos < end) {
|
while (reader.pos < end) {
|
||||||
let [fieldNo, wireType] = reader.tag();
|
let [fieldNo, wireType] = reader.tag();
|
||||||
@ -1613,7 +1671,7 @@ class JsonMessage$Type extends MessageType<JsonMessage> {
|
|||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
internalBinaryWrite(message: JsonMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
internalBinaryWrite(message: ArkMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||||
/* string json = 1; */
|
/* string json = 1; */
|
||||||
if (message.json !== "")
|
if (message.json !== "")
|
||||||
writer.tag(1, WireType.LengthDelimited).string(message.json);
|
writer.tag(1, WireType.LengthDelimited).string(message.json);
|
||||||
@ -1624,6 +1682,115 @@ class JsonMessage$Type extends MessageType<JsonMessage> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @generated MessageType for protobuf message Laana.JsonMessage
|
* @generated MessageType for protobuf message Laana.ArkMessage
|
||||||
*/
|
*/
|
||||||
export const JsonMessage = new JsonMessage$Type();
|
export const ArkMessage = new ArkMessage$Type();
|
||||||
|
// @generated message type with reflection information, may provide speed optimized methods
|
||||||
|
class UnknownMessage$Type extends MessageType<UnknownMessage> {
|
||||||
|
constructor() {
|
||||||
|
super("Laana.UnknownMessage", [
|
||||||
|
{ no: 1, name: "rawContent", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||||
|
{ no: 2, name: "typeIdentifier", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
create(value?: PartialMessage<UnknownMessage>): UnknownMessage {
|
||||||
|
const message = globalThis.Object.create((this.messagePrototype!));
|
||||||
|
message.rawContent = "";
|
||||||
|
if (value !== undefined)
|
||||||
|
reflectionMergePartial<UnknownMessage>(this, message, value);
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnknownMessage): UnknownMessage {
|
||||||
|
let message = target ?? this.create(), end = reader.pos + length;
|
||||||
|
while (reader.pos < end) {
|
||||||
|
let [fieldNo, wireType] = reader.tag();
|
||||||
|
switch (fieldNo) {
|
||||||
|
case /* string rawContent */ 1:
|
||||||
|
message.rawContent = reader.string();
|
||||||
|
break;
|
||||||
|
case /* optional string typeIdentifier */ 2:
|
||||||
|
message.typeIdentifier = reader.string();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
let u = options.readUnknownField;
|
||||||
|
if (u === "throw")
|
||||||
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||||
|
let d = reader.skip(wireType);
|
||||||
|
if (u !== false)
|
||||||
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
internalBinaryWrite(message: UnknownMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||||
|
/* string rawContent = 1; */
|
||||||
|
if (message.rawContent !== "")
|
||||||
|
writer.tag(1, WireType.LengthDelimited).string(message.rawContent);
|
||||||
|
/* optional string typeIdentifier = 2; */
|
||||||
|
if (message.typeIdentifier !== undefined)
|
||||||
|
writer.tag(2, WireType.LengthDelimited).string(message.typeIdentifier);
|
||||||
|
let u = options.writeUnknownFields;
|
||||||
|
if (u !== false)
|
||||||
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||||
|
return writer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @generated MessageType for protobuf message Laana.UnknownMessage
|
||||||
|
*/
|
||||||
|
export const UnknownMessage = new UnknownMessage$Type();
|
||||||
|
// @generated message type with reflection information, may provide speed optimized methods
|
||||||
|
class ExtendedMessage$Type extends MessageType<ExtendedMessage> {
|
||||||
|
constructor() {
|
||||||
|
super("Laana.ExtendedMessage", [
|
||||||
|
{ no: 1, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||||
|
{ no: 2, name: "content", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
create(value?: PartialMessage<ExtendedMessage>): ExtendedMessage {
|
||||||
|
const message = globalThis.Object.create((this.messagePrototype!));
|
||||||
|
message.type = "";
|
||||||
|
message.content = new Uint8Array(0);
|
||||||
|
if (value !== undefined)
|
||||||
|
reflectionMergePartial<ExtendedMessage>(this, message, value);
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtendedMessage): ExtendedMessage {
|
||||||
|
let message = target ?? this.create(), end = reader.pos + length;
|
||||||
|
while (reader.pos < end) {
|
||||||
|
let [fieldNo, wireType] = reader.tag();
|
||||||
|
switch (fieldNo) {
|
||||||
|
case /* string type */ 1:
|
||||||
|
message.type = reader.string();
|
||||||
|
break;
|
||||||
|
case /* bytes content */ 2:
|
||||||
|
message.content = reader.bytes();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
let u = options.readUnknownField;
|
||||||
|
if (u === "throw")
|
||||||
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||||
|
let d = reader.skip(wireType);
|
||||||
|
if (u !== false)
|
||||||
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
internalBinaryWrite(message: ExtendedMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||||
|
/* string type = 1; */
|
||||||
|
if (message.type !== "")
|
||||||
|
writer.tag(1, WireType.LengthDelimited).string(message.type);
|
||||||
|
/* bytes content = 2; */
|
||||||
|
if (message.content.length)
|
||||||
|
writer.tag(2, WireType.LengthDelimited).bytes(message.content);
|
||||||
|
let u = options.writeUnknownFields;
|
||||||
|
if (u !== false)
|
||||||
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||||
|
return writer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @generated MessageType for protobuf message Laana.ExtendedMessage
|
||||||
|
*/
|
||||||
|
export const ExtendedMessage = new ExtendedMessage$Type();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user