0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-11-24 04:05:13 +00:00

Uncomment "unused" protobuf fields from mcs.proto

This commit is contained in:
Marvin W 2016-08-27 20:00:31 +02:00
parent 2fa70c1d12
commit 214120aa62
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
3 changed files with 112 additions and 28 deletions

View file

@ -19,6 +19,7 @@ import static com.squareup.wire.Message.Label.REQUIRED;
*/
public final class DataMessageStanza extends Message {
public static final Long DEFAULT_RMQ_ID = 0L;
public static final String DEFAULT_ID = "";
public static final String DEFAULT_FROM = "";
public static final String DEFAULT_TO = "";
@ -29,7 +30,10 @@ public final class DataMessageStanza extends Message {
public static final String DEFAULT_PERSISTENT_ID = "";
public static final Integer DEFAULT_STREAM_ID = 0;
public static final Integer DEFAULT_LAST_STREAM_ID_RECEIVED = 0;
public static final String DEFAULT_PERMISSION = "";
public static final String DEFAULT_REG_ID = "";
public static final String DEFAULT_PKG_SIGNATURE = "";
public static final String DEFAULT_CLIENT_ID = "";
public static final Long DEFAULT_DEVICE_USER_ID = 0L;
public static final Integer DEFAULT_TTL = 0;
public static final Long DEFAULT_SENT = 0L;
@ -38,7 +42,11 @@ public final class DataMessageStanza extends Message {
/**
* Not used.
* optional int64 rmq_id = 1;
*/
@ProtoField(tag = 1, type = INT64)
public final Long rmq_id;
/**
* This is the message ID, set by client, DMP.9 (message_id)
*/
@ProtoField(tag = 2, type = STRING)
@ -99,7 +107,11 @@ public final class DataMessageStanza extends Message {
/**
* Not used.
* optional string permission = 12;
*/
@ProtoField(tag = 12, type = STRING)
public final String permission;
/**
* Sent by the device shortly after registration.
*/
@ProtoField(tag = 13, type = STRING)
@ -107,9 +119,17 @@ public final class DataMessageStanza extends Message {
/**
* Not used.
* optional string pkg_signature = 14;
*/
@ProtoField(tag = 14, type = STRING)
public final String pkg_signature;
/**
* Not used.
* optional string client_id = 15;
*/
@ProtoField(tag = 15, type = STRING)
public final String client_id;
/**
* serial number of the target user, DMP.8
* It is the 'serial number' according to user manager.
*/
@ -139,7 +159,8 @@ public final class DataMessageStanza extends Message {
@ProtoField(tag = 20, type = INT64)
public final Long status;
public DataMessageStanza(String id, String from, String to, String category, String token, List<AppData> app_data, Boolean from_trusted_server, String persistent_id, Integer stream_id, Integer last_stream_id_received, String reg_id, Long device_user_id, Integer ttl, Long sent, Integer queued, Long status) {
public DataMessageStanza(Long rmq_id, String id, String from, String to, String category, String token, List<AppData> app_data, Boolean from_trusted_server, String persistent_id, Integer stream_id, Integer last_stream_id_received, String permission, String reg_id, String pkg_signature, String client_id, Long device_user_id, Integer ttl, Long sent, Integer queued, Long status) {
this.rmq_id = rmq_id;
this.id = id;
this.from = from;
this.to = to;
@ -150,7 +171,10 @@ public final class DataMessageStanza extends Message {
this.persistent_id = persistent_id;
this.stream_id = stream_id;
this.last_stream_id_received = last_stream_id_received;
this.permission = permission;
this.reg_id = reg_id;
this.pkg_signature = pkg_signature;
this.client_id = client_id;
this.device_user_id = device_user_id;
this.ttl = ttl;
this.sent = sent;
@ -159,7 +183,7 @@ public final class DataMessageStanza extends Message {
}
private DataMessageStanza(Builder builder) {
this(builder.id, builder.from, builder.to, builder.category, builder.token, builder.app_data, builder.from_trusted_server, builder.persistent_id, builder.stream_id, builder.last_stream_id_received, builder.reg_id, builder.device_user_id, builder.ttl, builder.sent, builder.queued, builder.status);
this(builder.rmq_id, builder.id, builder.from, builder.to, builder.category, builder.token, builder.app_data, builder.from_trusted_server, builder.persistent_id, builder.stream_id, builder.last_stream_id_received, builder.permission, builder.reg_id, builder.pkg_signature, builder.client_id, builder.device_user_id, builder.ttl, builder.sent, builder.queued, builder.status);
setBuilder(builder);
}
@ -168,7 +192,8 @@ public final class DataMessageStanza extends Message {
if (other == this) return true;
if (!(other instanceof DataMessageStanza)) return false;
DataMessageStanza o = (DataMessageStanza) other;
return equals(id, o.id)
return equals(rmq_id, o.rmq_id)
&& equals(id, o.id)
&& equals(from, o.from)
&& equals(to, o.to)
&& equals(category, o.category)
@ -178,7 +203,10 @@ public final class DataMessageStanza extends Message {
&& equals(persistent_id, o.persistent_id)
&& equals(stream_id, o.stream_id)
&& equals(last_stream_id_received, o.last_stream_id_received)
&& equals(permission, o.permission)
&& equals(reg_id, o.reg_id)
&& equals(pkg_signature, o.pkg_signature)
&& equals(client_id, o.client_id)
&& equals(device_user_id, o.device_user_id)
&& equals(ttl, o.ttl)
&& equals(sent, o.sent)
@ -190,7 +218,8 @@ public final class DataMessageStanza extends Message {
public int hashCode() {
int result = hashCode;
if (result == 0) {
result = id != null ? id.hashCode() : 0;
result = rmq_id != null ? rmq_id.hashCode() : 0;
result = result * 37 + (id != null ? id.hashCode() : 0);
result = result * 37 + (from != null ? from.hashCode() : 0);
result = result * 37 + (to != null ? to.hashCode() : 0);
result = result * 37 + (category != null ? category.hashCode() : 0);
@ -200,7 +229,10 @@ public final class DataMessageStanza extends Message {
result = result * 37 + (persistent_id != null ? persistent_id.hashCode() : 0);
result = result * 37 + (stream_id != null ? stream_id.hashCode() : 0);
result = result * 37 + (last_stream_id_received != null ? last_stream_id_received.hashCode() : 0);
result = result * 37 + (permission != null ? permission.hashCode() : 0);
result = result * 37 + (reg_id != null ? reg_id.hashCode() : 0);
result = result * 37 + (pkg_signature != null ? pkg_signature.hashCode() : 0);
result = result * 37 + (client_id != null ? client_id.hashCode() : 0);
result = result * 37 + (device_user_id != null ? device_user_id.hashCode() : 0);
result = result * 37 + (ttl != null ? ttl.hashCode() : 0);
result = result * 37 + (sent != null ? sent.hashCode() : 0);
@ -213,6 +245,7 @@ public final class DataMessageStanza extends Message {
public static final class Builder extends Message.Builder<DataMessageStanza> {
public Long rmq_id;
public String id;
public String from;
public String to;
@ -223,7 +256,10 @@ public final class DataMessageStanza extends Message {
public String persistent_id;
public Integer stream_id;
public Integer last_stream_id_received;
public String permission;
public String reg_id;
public String pkg_signature;
public String client_id;
public Long device_user_id;
public Integer ttl;
public Long sent;
@ -236,6 +272,7 @@ public final class DataMessageStanza extends Message {
public Builder(DataMessageStanza message) {
super(message);
if (message == null) return;
this.rmq_id = message.rmq_id;
this.id = message.id;
this.from = message.from;
this.to = message.to;
@ -246,7 +283,10 @@ public final class DataMessageStanza extends Message {
this.persistent_id = message.persistent_id;
this.stream_id = message.stream_id;
this.last_stream_id_received = message.last_stream_id_received;
this.permission = message.permission;
this.reg_id = message.reg_id;
this.pkg_signature = message.pkg_signature;
this.client_id = message.client_id;
this.device_user_id = message.device_user_id;
this.ttl = message.ttl;
this.sent = message.sent;
@ -256,7 +296,13 @@ public final class DataMessageStanza extends Message {
/**
* Not used.
* optional int64 rmq_id = 1;
*/
public Builder rmq_id(Long rmq_id) {
this.rmq_id = rmq_id;
return this;
}
/**
* This is the message ID, set by client, DMP.9 (message_id)
*/
public Builder id(String id) {
@ -337,7 +383,13 @@ public final class DataMessageStanza extends Message {
/**
* Not used.
* optional string permission = 12;
*/
public Builder permission(String permission) {
this.permission = permission;
return this;
}
/**
* Sent by the device shortly after registration.
*/
public Builder reg_id(String reg_id) {
@ -347,9 +399,21 @@ public final class DataMessageStanza extends Message {
/**
* Not used.
* optional string pkg_signature = 14;
*/
public Builder pkg_signature(String pkg_signature) {
this.pkg_signature = pkg_signature;
return this;
}
/**
* Not used.
* optional string client_id = 15;
*/
public Builder client_id(String client_id) {
this.client_id = client_id;
return this;
}
/**
* serial number of the target user, DMP.8
* It is the 'serial number' according to user manager.
*/

View file

@ -29,7 +29,9 @@ public final class LoginRequest extends Message {
public static final String DEFAULT_DEVICE_ID = "";
public static final Long DEFAULT_LAST_RMQ_ID = 0L;
public static final List<Setting> DEFAULT_SETTING = Collections.emptyList();
public static final Integer DEFAULT_COMPRESS = 0;
public static final List<String> DEFAULT_RECEIVED_PERSISTENT_ID = Collections.emptyList();
public static final Boolean DEFAULT_INCLUDE_STREAM_IDS = false;
public static final Boolean DEFAULT_ADAPTIVE_HEARTBEAT = false;
public static final Boolean DEFAULT_USE_RMQ2 = false;
public static final Long DEFAULT_ACCOUNT_ID = 0L;
@ -79,16 +81,18 @@ public final class LoginRequest extends Message {
@ProtoField(tag = 8, label = REPEATED, messageType = Setting.class)
public final List<Setting> setting;
/**
* optional int32 compress = 9;
*/
@ProtoField(tag = 9, type = INT32)
public final Integer compress;
@ProtoField(tag = 10, type = STRING, label = REPEATED)
public final List<String> received_persistent_id;
/**
* Replaced by "rmq2v" setting
* optional bool include_stream_ids = 11;
*/
@ProtoField(tag = 11, type = BOOL)
public final Boolean include_stream_ids;
@ProtoField(tag = 12, type = BOOL)
public final Boolean adaptive_heartbeat;
@ -116,7 +120,7 @@ public final class LoginRequest extends Message {
@ProtoField(tag = 18, type = INT64)
public final Long status;
public LoginRequest(String id, String domain, String user, String resource, String auth_token, String device_id, Long last_rmq_id, List<Setting> setting, List<String> received_persistent_id, Boolean adaptive_heartbeat, HeartbeatStat heartbeat_stat, Boolean use_rmq2, Long account_id, AuthService auth_service, Integer network_type, Long status) {
public LoginRequest(String id, String domain, String user, String resource, String auth_token, String device_id, Long last_rmq_id, List<Setting> setting, Integer compress, List<String> received_persistent_id, Boolean include_stream_ids, Boolean adaptive_heartbeat, HeartbeatStat heartbeat_stat, Boolean use_rmq2, Long account_id, AuthService auth_service, Integer network_type, Long status) {
this.id = id;
this.domain = domain;
this.user = user;
@ -125,7 +129,9 @@ public final class LoginRequest extends Message {
this.device_id = device_id;
this.last_rmq_id = last_rmq_id;
this.setting = immutableCopyOf(setting);
this.compress = compress;
this.received_persistent_id = immutableCopyOf(received_persistent_id);
this.include_stream_ids = include_stream_ids;
this.adaptive_heartbeat = adaptive_heartbeat;
this.heartbeat_stat = heartbeat_stat;
this.use_rmq2 = use_rmq2;
@ -136,7 +142,7 @@ public final class LoginRequest extends Message {
}
private LoginRequest(Builder builder) {
this(builder.id, builder.domain, builder.user, builder.resource, builder.auth_token, builder.device_id, builder.last_rmq_id, builder.setting, builder.received_persistent_id, builder.adaptive_heartbeat, builder.heartbeat_stat, builder.use_rmq2, builder.account_id, builder.auth_service, builder.network_type, builder.status);
this(builder.id, builder.domain, builder.user, builder.resource, builder.auth_token, builder.device_id, builder.last_rmq_id, builder.setting, builder.compress, builder.received_persistent_id, builder.include_stream_ids, builder.adaptive_heartbeat, builder.heartbeat_stat, builder.use_rmq2, builder.account_id, builder.auth_service, builder.network_type, builder.status);
setBuilder(builder);
}
@ -153,7 +159,9 @@ public final class LoginRequest extends Message {
&& equals(device_id, o.device_id)
&& equals(last_rmq_id, o.last_rmq_id)
&& equals(setting, o.setting)
&& equals(compress, o.compress)
&& equals(received_persistent_id, o.received_persistent_id)
&& equals(include_stream_ids, o.include_stream_ids)
&& equals(adaptive_heartbeat, o.adaptive_heartbeat)
&& equals(heartbeat_stat, o.heartbeat_stat)
&& equals(use_rmq2, o.use_rmq2)
@ -175,7 +183,9 @@ public final class LoginRequest extends Message {
result = result * 37 + (device_id != null ? device_id.hashCode() : 0);
result = result * 37 + (last_rmq_id != null ? last_rmq_id.hashCode() : 0);
result = result * 37 + (setting != null ? setting.hashCode() : 1);
result = result * 37 + (compress != null ? compress.hashCode() : 0);
result = result * 37 + (received_persistent_id != null ? received_persistent_id.hashCode() : 1);
result = result * 37 + (include_stream_ids != null ? include_stream_ids.hashCode() : 0);
result = result * 37 + (adaptive_heartbeat != null ? adaptive_heartbeat.hashCode() : 0);
result = result * 37 + (heartbeat_stat != null ? heartbeat_stat.hashCode() : 0);
result = result * 37 + (use_rmq2 != null ? use_rmq2.hashCode() : 0);
@ -198,7 +208,9 @@ public final class LoginRequest extends Message {
public String device_id;
public Long last_rmq_id;
public List<Setting> setting;
public Integer compress;
public List<String> received_persistent_id;
public Boolean include_stream_ids;
public Boolean adaptive_heartbeat;
public HeartbeatStat heartbeat_stat;
public Boolean use_rmq2;
@ -221,7 +233,9 @@ public final class LoginRequest extends Message {
this.device_id = message.device_id;
this.last_rmq_id = message.last_rmq_id;
this.setting = copyOf(message.setting);
this.compress = message.compress;
this.received_persistent_id = copyOf(message.received_persistent_id);
this.include_stream_ids = message.include_stream_ids;
this.adaptive_heartbeat = message.adaptive_heartbeat;
this.heartbeat_stat = message.heartbeat_stat;
this.use_rmq2 = message.use_rmq2;
@ -289,9 +303,11 @@ public final class LoginRequest extends Message {
return this;
}
/**
* optional int32 compress = 9;
*/
public Builder compress(Integer compress) {
this.compress = compress;
return this;
}
public Builder received_persistent_id(List<String> received_persistent_id) {
this.received_persistent_id = checkForNulls(received_persistent_id);
return this;
@ -299,8 +315,12 @@ public final class LoginRequest extends Message {
/**
* Replaced by "rmq2v" setting
* optional bool include_stream_ids = 11;
*/
public Builder include_stream_ids(Boolean include_stream_ids) {
this.include_stream_ids = include_stream_ids;
return this;
}
public Builder adaptive_heartbeat(Boolean adaptive_heartbeat) {
this.adaptive_heartbeat = adaptive_heartbeat;
return this;

View file

@ -94,11 +94,11 @@ message LoginRequest {
optional int64 last_rmq_id = 7;
repeated Setting setting = 8;
//optional int32 compress = 9;
optional int32 compress = 9;
repeated string received_persistent_id = 10;
// Replaced by "rmq2v" setting
// optional bool include_stream_ids = 11;
optional bool include_stream_ids = 11;
optional bool adaptive_heartbeat = 12;
optional HeartbeatStat heartbeat_stat = 13;
@ -189,7 +189,7 @@ message AppData {
*/
message DataMessageStanza {
// Not used.
// optional int64 rmq_id = 1;
optional int64 rmq_id = 1;
// This is the message ID, set by client, DMP.9 (message_id)
optional string id = 2;
@ -222,15 +222,15 @@ message DataMessageStanza {
optional int32 last_stream_id_received = 11;
// Not used.
// optional string permission = 12;
optional string permission = 12;
// Sent by the device shortly after registration.
optional string reg_id = 13;
// Not used.
// optional string pkg_signature = 14;
optional string pkg_signature = 14;
// Not used.
// optional string client_id = 15;
optional string client_id = 15;
// serial number of the target user, DMP.8
// It is the 'serial number' according to user manager.