Skip to content

Commit

Permalink
+ field _client_type for fixing lumina37/aiotieba#67 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
n0099 committed Jan 10, 2023
1 parent 2e20f38 commit 842134b
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 6 deletions.
1 change: 1 addition & 0 deletions tbm/Api/Request/Common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ syntax = "proto3";
package tbClient.api.request;

message Common {
int32 _client_type = 1;
string _client_version = 2;
}
43 changes: 40 additions & 3 deletions tbm_cs/Api/Request/Common.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ static CommonReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChhBcGkvUmVxdWVzdC9Db21tb24ucHJvdG8SFHRiQ2xpZW50LmFwaS5yZXF1",
"ZXN0IiEKBkNvbW1vbhIXCg9fY2xpZW50X3ZlcnNpb24YAiABKAliBnByb3Rv",
"Mw=="));
"ZXN0IjcKBkNvbW1vbhIUCgxfY2xpZW50X3R5cGUYASABKAUSFwoPX2NsaWVu",
"dF92ZXJzaW9uGAIgASgJYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::TbClient.Api.Request.Common), global::TbClient.Api.Request.Common.Parser, new[]{ "ClientVersion" }, null, null, null, null)
new pbr::GeneratedClrTypeInfo(typeof(global::TbClient.Api.Request.Common), global::TbClient.Api.Request.Common.Parser, new[]{ "ClientType", "ClientVersion" }, null, null, null, null)
}));
}
#endregion
Expand Down Expand Up @@ -71,6 +71,7 @@ public Common() {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Common(Common other) : this() {
ClientType_ = other.ClientType_;
ClientVersion_ = other.ClientVersion_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
Expand All @@ -81,6 +82,18 @@ public Common Clone() {
return new Common(this);
}

/// <summary>Field number for the "_client_type" field.</summary>
public const int ClientTypeFieldNumber = 1;
private int ClientType_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int ClientType {
get { return ClientType_; }
set {
ClientType_ = value;
}
}

/// <summary>Field number for the "_client_version" field.</summary>
public const int ClientVersionFieldNumber = 2;
private string ClientVersion_ = "";
Expand Down Expand Up @@ -108,6 +121,7 @@ public bool Equals(Common other) {
if (ReferenceEquals(other, this)) {
return true;
}
if (ClientType != other.ClientType) return false;
if (ClientVersion != other.ClientVersion) return false;
return Equals(_unknownFields, other._unknownFields);
}
Expand All @@ -116,6 +130,7 @@ public bool Equals(Common other) {
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (ClientType != 0) hash ^= ClientType.GetHashCode();
if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
Expand All @@ -135,6 +150,10 @@ public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (ClientType != 0) {
output.WriteRawTag(8);
output.WriteInt32(ClientType);
}
if (ClientVersion.Length != 0) {
output.WriteRawTag(18);
output.WriteString(ClientVersion);
Expand All @@ -149,6 +168,10 @@ public void WriteTo(pb::CodedOutputStream output) {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (ClientType != 0) {
output.WriteRawTag(8);
output.WriteInt32(ClientType);
}
if (ClientVersion.Length != 0) {
output.WriteRawTag(18);
output.WriteString(ClientVersion);
Expand All @@ -163,6 +186,9 @@ public void WriteTo(pb::CodedOutputStream output) {
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (ClientType != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(ClientType);
}
if (ClientVersion.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion);
}
Expand All @@ -178,6 +204,9 @@ public void MergeFrom(Common other) {
if (other == null) {
return;
}
if (other.ClientType != 0) {
ClientType = other.ClientType;
}
if (other.ClientVersion.Length != 0) {
ClientVersion = other.ClientVersion;
}
Expand All @@ -196,6 +225,10 @@ public void MergeFrom(pb::CodedInputStream input) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
ClientType = input.ReadInt32();
break;
}
case 18: {
ClientVersion = input.ReadString();
break;
Expand All @@ -215,6 +248,10 @@ public void MergeFrom(pb::CodedInputStream input) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
ClientType = input.ReadInt32();
break;
}
case 18: {
ClientVersion = input.ReadString();
break;
Expand Down
7 changes: 4 additions & 3 deletions tbm_php/GPBMetadata/Api/Request/Common.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions tbm_php/TbClient/Api/Request/Common.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 842134b

Please sign in to comment.