diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/AckAsset.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/AckAsset.java new file mode 100644 index 00000000..07dfdc19 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/AckAsset.java @@ -0,0 +1,62 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.STRING; + +public final class AckAsset extends Message { + + public static final String DEFAULT_DIGEST = ""; + + @ProtoField(tag = 1, type = STRING) + public final String digest; + + public AckAsset(String digest) { + this.digest = digest; + } + + private AckAsset(Builder builder) { + this(builder.digest); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof AckAsset)) return false; + return equals(digest, ((AckAsset) other).digest); + } + + @Override + public int hashCode() { + int result = hashCode; + return result != 0 ? result : (hashCode = digest != null ? digest.hashCode() : 0); + } + + public static final class Builder extends Message.Builder { + + public String digest; + + public Builder() { + } + + public Builder(AckAsset message) { + super(message); + if (message == null) return; + this.digest = message.digest; + } + + public Builder digest(String digest) { + this.digest = digest; + return this; + } + + @Override + public AckAsset build() { + return new AckAsset(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/AppKey.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/AppKey.java new file mode 100644 index 00000000..345aecb6 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/AppKey.java @@ -0,0 +1,81 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.STRING; + +public final class AppKey extends Message { + + public static final String DEFAULT_PACKAGENAME = ""; + public static final String DEFAULT_SIGNATUREDIGEST = ""; + + @ProtoField(tag = 1, type = STRING) + public final String packageName; + + @ProtoField(tag = 2, type = STRING) + public final String signatureDigest; + + public AppKey(String packageName, String signatureDigest) { + this.packageName = packageName; + this.signatureDigest = signatureDigest; + } + + private AppKey(Builder builder) { + this(builder.packageName, builder.signatureDigest); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof AppKey)) return false; + AppKey o = (AppKey) other; + return equals(packageName, o.packageName) + && equals(signatureDigest, o.signatureDigest); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = packageName != null ? packageName.hashCode() : 0; + result = result * 37 + (signatureDigest != null ? signatureDigest.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public String packageName; + public String signatureDigest; + + public Builder() { + } + + public Builder(AppKey message) { + super(message); + if (message == null) return; + this.packageName = message.packageName; + this.signatureDigest = message.signatureDigest; + } + + public Builder packageName(String packageName) { + this.packageName = packageName; + return this; + } + + public Builder signatureDigest(String signatureDigest) { + this.signatureDigest = signatureDigest; + return this; + } + + @Override + public AppKey build() { + return new AppKey(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/AppKeys.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/AppKeys.java new file mode 100644 index 00000000..38e945c1 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/AppKeys.java @@ -0,0 +1,64 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; +import java.util.Collections; +import java.util.List; + +import static com.squareup.wire.Message.Label.REPEATED; + +public final class AppKeys extends Message { + + public static final List DEFAULT_APPKEYS = Collections.emptyList(); + + @ProtoField(tag = 1, label = REPEATED, messageType = AppKey.class) + public final List appKeys; + + public AppKeys(List appKeys) { + this.appKeys = immutableCopyOf(appKeys); + } + + private AppKeys(Builder builder) { + this(builder.appKeys); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof AppKeys)) return false; + return equals(appKeys, ((AppKeys) other).appKeys); + } + + @Override + public int hashCode() { + int result = hashCode; + return result != 0 ? result : (hashCode = appKeys != null ? appKeys.hashCode() : 1); + } + + public static final class Builder extends Message.Builder { + + public List appKeys; + + public Builder() { + } + + public Builder(AppKeys message) { + super(message); + if (message == null) return; + this.appKeys = copyOf(message.appKeys); + } + + public Builder appKeys(List appKeys) { + this.appKeys = checkForNulls(appKeys); + return this; + } + + @Override + public AppKeys build() { + return new AppKeys(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/Asset.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/Asset.java new file mode 100644 index 00000000..f7d900eb --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/Asset.java @@ -0,0 +1,40 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; + +public final class Asset extends Message { + + public Asset() { + } + + private Asset(Builder builder) { + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + return other instanceof Asset; + } + + @Override + public int hashCode() { + return 0; + } + + public static final class Builder extends Message.Builder { + + public Builder() { + } + + public Builder(Asset message) { + super(message); + } + + @Override + public Asset build() { + return new Asset(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/AssetEntry.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/AssetEntry.java new file mode 100644 index 00000000..6dd8ef4d --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/AssetEntry.java @@ -0,0 +1,95 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.INT32; +import static com.squareup.wire.Message.Datatype.STRING; + +public final class AssetEntry extends Message { + + public static final String DEFAULT_KEY = ""; + public static final Integer DEFAULT_UNKNOWN3 = 0; + + @ProtoField(tag = 1, type = STRING) + public final String key; + + @ProtoField(tag = 2) + public final Asset value; + + @ProtoField(tag = 3, type = INT32) + public final Integer unknown3; + + public AssetEntry(String key, Asset value, Integer unknown3) { + this.key = key; + this.value = value; + this.unknown3 = unknown3; + } + + private AssetEntry(Builder builder) { + this(builder.key, builder.value, builder.unknown3); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof AssetEntry)) return false; + AssetEntry o = (AssetEntry) other; + return equals(key, o.key) + && equals(value, o.value) + && equals(unknown3, o.unknown3); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = key != null ? key.hashCode() : 0; + result = result * 37 + (value != null ? value.hashCode() : 0); + result = result * 37 + (unknown3 != null ? unknown3.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public String key; + public Asset value; + public Integer unknown3; + + public Builder() { + } + + public Builder(AssetEntry message) { + super(message); + if (message == null) return; + this.key = message.key; + this.value = message.value; + this.unknown3 = message.unknown3; + } + + public Builder key(String key) { + this.key = key; + return this; + } + + public Builder value(Asset value) { + this.value = value; + return this; + } + + public Builder unknown3(Integer unknown3) { + this.unknown3 = unknown3; + return this; + } + + @Override + public AssetEntry build() { + return new AssetEntry(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelControlRequest.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelControlRequest.java new file mode 100644 index 00000000..08efdb1f --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelControlRequest.java @@ -0,0 +1,154 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.BOOL; +import static com.squareup.wire.Message.Datatype.INT32; +import static com.squareup.wire.Message.Datatype.INT64; +import static com.squareup.wire.Message.Datatype.STRING; + +public final class ChannelControlRequest extends Message { + + public static final Integer DEFAULT_TYPE = 0; + public static final Long DEFAULT_CHANNELID = 0L; + public static final Boolean DEFAULT_FROMCHANNELOPERATOR = false; + public static final String DEFAULT_PACKAGENAME = ""; + public static final String DEFAULT_SIGNATUREDIGEST = ""; + public static final String DEFAULT_PATH = ""; + public static final Integer DEFAULT_CLOSEERRORCODE = 0; + + @ProtoField(tag = 1, type = INT32) + public final Integer type; + + @ProtoField(tag = 2, type = INT64) + public final Long channelId; + + @ProtoField(tag = 3, type = BOOL) + public final Boolean fromChannelOperator; + + @ProtoField(tag = 4, type = STRING) + public final String packageName; + + @ProtoField(tag = 5, type = STRING) + public final String signatureDigest; + + @ProtoField(tag = 6, type = STRING) + public final String path; + + @ProtoField(tag = 7, type = INT32) + public final Integer closeErrorCode; + + public ChannelControlRequest(Integer type, Long channelId, Boolean fromChannelOperator, String packageName, String signatureDigest, String path, Integer closeErrorCode) { + this.type = type; + this.channelId = channelId; + this.fromChannelOperator = fromChannelOperator; + this.packageName = packageName; + this.signatureDigest = signatureDigest; + this.path = path; + this.closeErrorCode = closeErrorCode; + } + + private ChannelControlRequest(Builder builder) { + this(builder.type, builder.channelId, builder.fromChannelOperator, builder.packageName, builder.signatureDigest, builder.path, builder.closeErrorCode); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof ChannelControlRequest)) return false; + ChannelControlRequest o = (ChannelControlRequest) other; + return equals(type, o.type) + && equals(channelId, o.channelId) + && equals(fromChannelOperator, o.fromChannelOperator) + && equals(packageName, o.packageName) + && equals(signatureDigest, o.signatureDigest) + && equals(path, o.path) + && equals(closeErrorCode, o.closeErrorCode); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = type != null ? type.hashCode() : 0; + result = result * 37 + (channelId != null ? channelId.hashCode() : 0); + result = result * 37 + (fromChannelOperator != null ? fromChannelOperator.hashCode() : 0); + result = result * 37 + (packageName != null ? packageName.hashCode() : 0); + result = result * 37 + (signatureDigest != null ? signatureDigest.hashCode() : 0); + result = result * 37 + (path != null ? path.hashCode() : 0); + result = result * 37 + (closeErrorCode != null ? closeErrorCode.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public Integer type; + public Long channelId; + public Boolean fromChannelOperator; + public String packageName; + public String signatureDigest; + public String path; + public Integer closeErrorCode; + + public Builder() { + } + + public Builder(ChannelControlRequest message) { + super(message); + if (message == null) return; + this.type = message.type; + this.channelId = message.channelId; + this.fromChannelOperator = message.fromChannelOperator; + this.packageName = message.packageName; + this.signatureDigest = message.signatureDigest; + this.path = message.path; + this.closeErrorCode = message.closeErrorCode; + } + + public Builder type(Integer type) { + this.type = type; + return this; + } + + public Builder channelId(Long channelId) { + this.channelId = channelId; + return this; + } + + public Builder fromChannelOperator(Boolean fromChannelOperator) { + this.fromChannelOperator = fromChannelOperator; + return this; + } + + public Builder packageName(String packageName) { + this.packageName = packageName; + return this; + } + + public Builder signatureDigest(String signatureDigest) { + this.signatureDigest = signatureDigest; + return this; + } + + public Builder path(String path) { + this.path = path; + return this; + } + + public Builder closeErrorCode(Integer closeErrorCode) { + this.closeErrorCode = closeErrorCode; + return this; + } + + @Override + public ChannelControlRequest build() { + return new ChannelControlRequest(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelDataAckRequest.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelDataAckRequest.java new file mode 100644 index 00000000..7a4b6443 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelDataAckRequest.java @@ -0,0 +1,80 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.BOOL; + +public final class ChannelDataAckRequest extends Message { + + public static final Boolean DEFAULT_FINALMESSAGE = false; + + @ProtoField(tag = 1) + public final ChannelDataHeader header; + + @ProtoField(tag = 2, type = BOOL) + public final Boolean finalMessage; + + public ChannelDataAckRequest(ChannelDataHeader header, Boolean finalMessage) { + this.header = header; + this.finalMessage = finalMessage; + } + + private ChannelDataAckRequest(Builder builder) { + this(builder.header, builder.finalMessage); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof ChannelDataAckRequest)) return false; + ChannelDataAckRequest o = (ChannelDataAckRequest) other; + return equals(header, o.header) + && equals(finalMessage, o.finalMessage); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = header != null ? header.hashCode() : 0; + result = result * 37 + (finalMessage != null ? finalMessage.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public ChannelDataHeader header; + public Boolean finalMessage; + + public Builder() { + } + + public Builder(ChannelDataAckRequest message) { + super(message); + if (message == null) return; + this.header = message.header; + this.finalMessage = message.finalMessage; + } + + public Builder header(ChannelDataHeader header) { + this.header = header; + return this; + } + + public Builder finalMessage(Boolean finalMessage) { + this.finalMessage = finalMessage; + return this; + } + + @Override + public ChannelDataAckRequest build() { + return new ChannelDataAckRequest(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelDataHeader.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelDataHeader.java new file mode 100644 index 00000000..c654deb6 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelDataHeader.java @@ -0,0 +1,96 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.BOOL; +import static com.squareup.wire.Message.Datatype.INT64; + +public final class ChannelDataHeader extends Message { + + public static final Long DEFAULT_CHANNELID = 0L; + public static final Boolean DEFAULT_FROMCHANNELOPERATOR = false; + public static final Long DEFAULT_UNKNOWN3 = 0L; + + @ProtoField(tag = 1, type = INT64) + public final Long channelId; + + @ProtoField(tag = 2, type = BOOL) + public final Boolean fromChannelOperator; + + @ProtoField(tag = 3, type = INT64) + public final Long unknown3; + + public ChannelDataHeader(Long channelId, Boolean fromChannelOperator, Long unknown3) { + this.channelId = channelId; + this.fromChannelOperator = fromChannelOperator; + this.unknown3 = unknown3; + } + + private ChannelDataHeader(Builder builder) { + this(builder.channelId, builder.fromChannelOperator, builder.unknown3); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof ChannelDataHeader)) return false; + ChannelDataHeader o = (ChannelDataHeader) other; + return equals(channelId, o.channelId) + && equals(fromChannelOperator, o.fromChannelOperator) + && equals(unknown3, o.unknown3); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = channelId != null ? channelId.hashCode() : 0; + result = result * 37 + (fromChannelOperator != null ? fromChannelOperator.hashCode() : 0); + result = result * 37 + (unknown3 != null ? unknown3.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public Long channelId; + public Boolean fromChannelOperator; + public Long unknown3; + + public Builder() { + } + + public Builder(ChannelDataHeader message) { + super(message); + if (message == null) return; + this.channelId = message.channelId; + this.fromChannelOperator = message.fromChannelOperator; + this.unknown3 = message.unknown3; + } + + public Builder channelId(Long channelId) { + this.channelId = channelId; + return this; + } + + public Builder fromChannelOperator(Boolean fromChannelOperator) { + this.fromChannelOperator = fromChannelOperator; + return this; + } + + public Builder unknown3(Long unknown3) { + this.unknown3 = unknown3; + return this; + } + + @Override + public ChannelDataHeader build() { + return new ChannelDataHeader(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelDataRequest.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelDataRequest.java new file mode 100644 index 00000000..7f002d98 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelDataRequest.java @@ -0,0 +1,96 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; +import okio.ByteString; + +import static com.squareup.wire.Message.Datatype.BOOL; +import static com.squareup.wire.Message.Datatype.BYTES; + +public final class ChannelDataRequest extends Message { + + public static final ByteString DEFAULT_PAYLOAD = ByteString.EMPTY; + public static final Boolean DEFAULT_FINALMESSAGE = false; + + @ProtoField(tag = 1) + public final ChannelDataHeader header; + + @ProtoField(tag = 2, type = BYTES) + public final ByteString payload; + + @ProtoField(tag = 3, type = BOOL) + public final Boolean finalMessage; + + public ChannelDataRequest(ChannelDataHeader header, ByteString payload, Boolean finalMessage) { + this.header = header; + this.payload = payload; + this.finalMessage = finalMessage; + } + + private ChannelDataRequest(Builder builder) { + this(builder.header, builder.payload, builder.finalMessage); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof ChannelDataRequest)) return false; + ChannelDataRequest o = (ChannelDataRequest) other; + return equals(header, o.header) + && equals(payload, o.payload) + && equals(finalMessage, o.finalMessage); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = header != null ? header.hashCode() : 0; + result = result * 37 + (payload != null ? payload.hashCode() : 0); + result = result * 37 + (finalMessage != null ? finalMessage.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public ChannelDataHeader header; + public ByteString payload; + public Boolean finalMessage; + + public Builder() { + } + + public Builder(ChannelDataRequest message) { + super(message); + if (message == null) return; + this.header = message.header; + this.payload = message.payload; + this.finalMessage = message.finalMessage; + } + + public Builder header(ChannelDataHeader header) { + this.header = header; + return this; + } + + public Builder payload(ByteString payload) { + this.payload = payload; + return this; + } + + public Builder finalMessage(Boolean finalMessage) { + this.finalMessage = finalMessage; + return this; + } + + @Override + public ChannelDataRequest build() { + return new ChannelDataRequest(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelRequest.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelRequest.java new file mode 100644 index 00000000..7b3d87c7 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/ChannelRequest.java @@ -0,0 +1,106 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.INT32; + +public final class ChannelRequest extends Message { + + public static final Integer DEFAULT_VERSION = 0; + + @ProtoField(tag = 2) + public final ChannelControlRequest channelControlRequest; + + @ProtoField(tag = 3) + public final ChannelDataRequest channelDataRequest; + + @ProtoField(tag = 4) + public final ChannelDataAckRequest channelDataAckRequest; + + @ProtoField(tag = 6, type = INT32) + public final Integer version; + + public ChannelRequest(ChannelControlRequest channelControlRequest, ChannelDataRequest channelDataRequest, ChannelDataAckRequest channelDataAckRequest, Integer version) { + this.channelControlRequest = channelControlRequest; + this.channelDataRequest = channelDataRequest; + this.channelDataAckRequest = channelDataAckRequest; + this.version = version; + } + + private ChannelRequest(Builder builder) { + this(builder.channelControlRequest, builder.channelDataRequest, builder.channelDataAckRequest, builder.version); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof ChannelRequest)) return false; + ChannelRequest o = (ChannelRequest) other; + return equals(channelControlRequest, o.channelControlRequest) + && equals(channelDataRequest, o.channelDataRequest) + && equals(channelDataAckRequest, o.channelDataAckRequest) + && equals(version, o.version); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = channelControlRequest != null ? channelControlRequest.hashCode() : 0; + result = result * 37 + (channelDataRequest != null ? channelDataRequest.hashCode() : 0); + result = result * 37 + (channelDataAckRequest != null ? channelDataAckRequest.hashCode() : 0); + result = result * 37 + (version != null ? version.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public ChannelControlRequest channelControlRequest; + public ChannelDataRequest channelDataRequest; + public ChannelDataAckRequest channelDataAckRequest; + public Integer version; + + public Builder() { + } + + public Builder(ChannelRequest message) { + super(message); + if (message == null) return; + this.channelControlRequest = message.channelControlRequest; + this.channelDataRequest = message.channelDataRequest; + this.channelDataAckRequest = message.channelDataAckRequest; + this.version = message.version; + } + + public Builder channelControlRequest(ChannelControlRequest channelControlRequest) { + this.channelControlRequest = channelControlRequest; + return this; + } + + public Builder channelDataRequest(ChannelDataRequest channelDataRequest) { + this.channelDataRequest = channelDataRequest; + return this; + } + + public Builder channelDataAckRequest(ChannelDataAckRequest channelDataAckRequest) { + this.channelDataAckRequest = channelDataAckRequest; + return this; + } + + public Builder version(Integer version) { + this.version = version; + return this; + } + + @Override + public ChannelRequest build() { + return new ChannelRequest(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/Connect.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/Connect.java new file mode 100644 index 00000000..9e3fc4f9 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/Connect.java @@ -0,0 +1,153 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.INT32; +import static com.squareup.wire.Message.Datatype.INT64; +import static com.squareup.wire.Message.Datatype.STRING; + +public final class Connect extends Message { + + public static final Integer DEFAULT_ID = 0; + public static final String DEFAULT_NAME = ""; + public static final Long DEFAULT_PEERANDROIDID = 0L; + public static final Integer DEFAULT_UNKNOWN4 = 0; + public static final Integer DEFAULT_UNKNOWN5 = 0; + public static final Integer DEFAULT_UNKNOWN6 = 0; + public static final String DEFAULT_NETWORKID = ""; + + @ProtoField(tag = 1, type = INT32) + public final Integer id; + + @ProtoField(tag = 2, type = STRING) + public final String name; + + @ProtoField(tag = 3, type = INT64) + public final Long peerAndroidId; + + @ProtoField(tag = 4, type = INT32) + public final Integer unknown4; + + @ProtoField(tag = 5, type = INT32) + public final Integer unknown5; + + @ProtoField(tag = 6, type = INT32) + public final Integer unknown6; + + @ProtoField(tag = 7, type = STRING) + public final String networkId; + + public Connect(Integer id, String name, Long peerAndroidId, Integer unknown4, Integer unknown5, Integer unknown6, String networkId) { + this.id = id; + this.name = name; + this.peerAndroidId = peerAndroidId; + this.unknown4 = unknown4; + this.unknown5 = unknown5; + this.unknown6 = unknown6; + this.networkId = networkId; + } + + private Connect(Builder builder) { + this(builder.id, builder.name, builder.peerAndroidId, builder.unknown4, builder.unknown5, builder.unknown6, builder.networkId); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof Connect)) return false; + Connect o = (Connect) other; + return equals(id, o.id) + && equals(name, o.name) + && equals(peerAndroidId, o.peerAndroidId) + && equals(unknown4, o.unknown4) + && equals(unknown5, o.unknown5) + && equals(unknown6, o.unknown6) + && equals(networkId, o.networkId); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = id != null ? id.hashCode() : 0; + result = result * 37 + (name != null ? name.hashCode() : 0); + result = result * 37 + (peerAndroidId != null ? peerAndroidId.hashCode() : 0); + result = result * 37 + (unknown4 != null ? unknown4.hashCode() : 0); + result = result * 37 + (unknown5 != null ? unknown5.hashCode() : 0); + result = result * 37 + (unknown6 != null ? unknown6.hashCode() : 0); + result = result * 37 + (networkId != null ? networkId.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public Integer id; + public String name; + public Long peerAndroidId; + public Integer unknown4; + public Integer unknown5; + public Integer unknown6; + public String networkId; + + public Builder() { + } + + public Builder(Connect message) { + super(message); + if (message == null) return; + this.id = message.id; + this.name = message.name; + this.peerAndroidId = message.peerAndroidId; + this.unknown4 = message.unknown4; + this.unknown5 = message.unknown5; + this.unknown6 = message.unknown6; + this.networkId = message.networkId; + } + + public Builder id(Integer id) { + this.id = id; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder peerAndroidId(Long peerAndroidId) { + this.peerAndroidId = peerAndroidId; + return this; + } + + public Builder unknown4(Integer unknown4) { + this.unknown4 = unknown4; + return this; + } + + public Builder unknown5(Integer unknown5) { + this.unknown5 = unknown5; + return this; + } + + public Builder unknown6(Integer unknown6) { + this.unknown6 = unknown6; + return this; + } + + public Builder networkId(String networkId) { + this.networkId = networkId; + return this; + } + + @Override + public Connect build() { + return new Connect(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/FetchAsset.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/FetchAsset.java new file mode 100644 index 00000000..238d4c5f --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/FetchAsset.java @@ -0,0 +1,110 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.BOOL; +import static com.squareup.wire.Message.Datatype.STRING; + +public final class FetchAsset extends Message { + + public static final String DEFAULT_PACKAGENAME = ""; + public static final String DEFAULT_ASSETNAME = ""; + public static final Boolean DEFAULT_PERMISSION = false; + public static final String DEFAULT_SIGNATUREDIGEST = ""; + + @ProtoField(tag = 1, type = STRING) + public final String packageName; + + @ProtoField(tag = 2, type = STRING) + public final String assetName; + + @ProtoField(tag = 3, type = BOOL) + public final Boolean permission; + + @ProtoField(tag = 4, type = STRING) + public final String signatureDigest; + + public FetchAsset(String packageName, String assetName, Boolean permission, String signatureDigest) { + this.packageName = packageName; + this.assetName = assetName; + this.permission = permission; + this.signatureDigest = signatureDigest; + } + + private FetchAsset(Builder builder) { + this(builder.packageName, builder.assetName, builder.permission, builder.signatureDigest); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof FetchAsset)) return false; + FetchAsset o = (FetchAsset) other; + return equals(packageName, o.packageName) + && equals(assetName, o.assetName) + && equals(permission, o.permission) + && equals(signatureDigest, o.signatureDigest); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = packageName != null ? packageName.hashCode() : 0; + result = result * 37 + (assetName != null ? assetName.hashCode() : 0); + result = result * 37 + (permission != null ? permission.hashCode() : 0); + result = result * 37 + (signatureDigest != null ? signatureDigest.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public String packageName; + public String assetName; + public Boolean permission; + public String signatureDigest; + + public Builder() { + } + + public Builder(FetchAsset message) { + super(message); + if (message == null) return; + this.packageName = message.packageName; + this.assetName = message.assetName; + this.permission = message.permission; + this.signatureDigest = message.signatureDigest; + } + + public Builder packageName(String packageName) { + this.packageName = packageName; + return this; + } + + public Builder assetName(String assetName) { + this.assetName = assetName; + return this; + } + + public Builder permission(Boolean permission) { + this.permission = permission; + return this; + } + + public Builder signatureDigest(String signatureDigest) { + this.signatureDigest = signatureDigest; + return this; + } + + @Override + public FetchAsset build() { + return new FetchAsset(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/FilePiece.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/FilePiece.java new file mode 100644 index 00000000..dbcd36d4 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/FilePiece.java @@ -0,0 +1,112 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; +import okio.ByteString; + +import static com.squareup.wire.Message.Datatype.BOOL; +import static com.squareup.wire.Message.Datatype.BYTES; +import static com.squareup.wire.Message.Datatype.STRING; + +public final class FilePiece extends Message { + + public static final String DEFAULT_FILENAME = ""; + public static final Boolean DEFAULT_FINALPIECE = false; + public static final ByteString DEFAULT_PIECE = ByteString.EMPTY; + public static final String DEFAULT_DIGEST = ""; + + @ProtoField(tag = 1, type = STRING) + public final String fileName; + + @ProtoField(tag = 2, type = BOOL) + public final Boolean finalPiece; + + @ProtoField(tag = 3, type = BYTES) + public final ByteString piece; + + @ProtoField(tag = 4, type = STRING) + public final String digest; + + public FilePiece(String fileName, Boolean finalPiece, ByteString piece, String digest) { + this.fileName = fileName; + this.finalPiece = finalPiece; + this.piece = piece; + this.digest = digest; + } + + private FilePiece(Builder builder) { + this(builder.fileName, builder.finalPiece, builder.piece, builder.digest); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof FilePiece)) return false; + FilePiece o = (FilePiece) other; + return equals(fileName, o.fileName) + && equals(finalPiece, o.finalPiece) + && equals(piece, o.piece) + && equals(digest, o.digest); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = fileName != null ? fileName.hashCode() : 0; + result = result * 37 + (finalPiece != null ? finalPiece.hashCode() : 0); + result = result * 37 + (piece != null ? piece.hashCode() : 0); + result = result * 37 + (digest != null ? digest.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public String fileName; + public Boolean finalPiece; + public ByteString piece; + public String digest; + + public Builder() { + } + + public Builder(FilePiece message) { + super(message); + if (message == null) return; + this.fileName = message.fileName; + this.finalPiece = message.finalPiece; + this.piece = message.piece; + this.digest = message.digest; + } + + public Builder fileName(String fileName) { + this.fileName = fileName; + return this; + } + + public Builder finalPiece(Boolean finalPiece) { + this.finalPiece = finalPiece; + return this; + } + + public Builder piece(ByteString piece) { + this.piece = piece; + return this; + } + + public Builder digest(String digest) { + this.digest = digest; + return this; + } + + @Override + public FilePiece build() { + return new FilePiece(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/Heartbeat.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/Heartbeat.java new file mode 100644 index 00000000..da766701 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/Heartbeat.java @@ -0,0 +1,40 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; + +public final class Heartbeat extends Message { + + public Heartbeat() { + } + + private Heartbeat(Builder builder) { + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + return other instanceof Heartbeat; + } + + @Override + public int hashCode() { + return 0; + } + + public static final class Builder extends Message.Builder { + + public Builder() { + } + + public Builder(Heartbeat message) { + super(message); + } + + @Override + public Heartbeat build() { + return new Heartbeat(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/Request.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/Request.java new file mode 100644 index 00000000..08504d79 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/Request.java @@ -0,0 +1,195 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; +import okio.ByteString; + +import static com.squareup.wire.Message.Datatype.BYTES; +import static com.squareup.wire.Message.Datatype.INT32; +import static com.squareup.wire.Message.Datatype.STRING; + +public final class Request extends Message { + + public static final Integer DEFAULT_REQUESTID = 0; + public static final String DEFAULT_PACKAGENAME = ""; + public static final String DEFAULT_SIGNATUREDIGEST = ""; + public static final String DEFAULT_TARGETNODEID = ""; + public static final Integer DEFAULT_UNKNOWN5 = 0; + public static final String DEFAULT_PATH = ""; + public static final ByteString DEFAULT_RAWDATA = ByteString.EMPTY; + public static final String DEFAULT_SOURCENODEID = ""; + public static final Integer DEFAULT_GENERATION = 0; + + @ProtoField(tag = 1, type = INT32) + public final Integer requestId; + + @ProtoField(tag = 2, type = STRING) + public final String packageName; + + @ProtoField(tag = 3, type = STRING) + public final String signatureDigest; + + @ProtoField(tag = 4, type = STRING) + public final String targetNodeId; + + @ProtoField(tag = 5, type = INT32) + public final Integer unknown5; + + @ProtoField(tag = 6, type = STRING) + public final String path; + + @ProtoField(tag = 7, type = BYTES) + public final ByteString rawData; + + @ProtoField(tag = 8, type = STRING) + public final String sourceNodeId; + + @ProtoField(tag = 9) + public final ChannelRequest request; + + @ProtoField(tag = 10, type = INT32) + public final Integer generation; + + public Request(Integer requestId, String packageName, String signatureDigest, String targetNodeId, Integer unknown5, String path, ByteString rawData, String sourceNodeId, ChannelRequest request, Integer generation) { + this.requestId = requestId; + this.packageName = packageName; + this.signatureDigest = signatureDigest; + this.targetNodeId = targetNodeId; + this.unknown5 = unknown5; + this.path = path; + this.rawData = rawData; + this.sourceNodeId = sourceNodeId; + this.request = request; + this.generation = generation; + } + + private Request(Builder builder) { + this(builder.requestId, builder.packageName, builder.signatureDigest, builder.targetNodeId, builder.unknown5, builder.path, builder.rawData, builder.sourceNodeId, builder.request, builder.generation); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof Request)) return false; + Request o = (Request) other; + return equals(requestId, o.requestId) + && equals(packageName, o.packageName) + && equals(signatureDigest, o.signatureDigest) + && equals(targetNodeId, o.targetNodeId) + && equals(unknown5, o.unknown5) + && equals(path, o.path) + && equals(rawData, o.rawData) + && equals(sourceNodeId, o.sourceNodeId) + && equals(request, o.request) + && equals(generation, o.generation); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = requestId != null ? requestId.hashCode() : 0; + result = result * 37 + (packageName != null ? packageName.hashCode() : 0); + result = result * 37 + (signatureDigest != null ? signatureDigest.hashCode() : 0); + result = result * 37 + (targetNodeId != null ? targetNodeId.hashCode() : 0); + result = result * 37 + (unknown5 != null ? unknown5.hashCode() : 0); + result = result * 37 + (path != null ? path.hashCode() : 0); + result = result * 37 + (rawData != null ? rawData.hashCode() : 0); + result = result * 37 + (sourceNodeId != null ? sourceNodeId.hashCode() : 0); + result = result * 37 + (request != null ? request.hashCode() : 0); + result = result * 37 + (generation != null ? generation.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public Integer requestId; + public String packageName; + public String signatureDigest; + public String targetNodeId; + public Integer unknown5; + public String path; + public ByteString rawData; + public String sourceNodeId; + public ChannelRequest request; + public Integer generation; + + public Builder() { + } + + public Builder(Request message) { + super(message); + if (message == null) return; + this.requestId = message.requestId; + this.packageName = message.packageName; + this.signatureDigest = message.signatureDigest; + this.targetNodeId = message.targetNodeId; + this.unknown5 = message.unknown5; + this.path = message.path; + this.rawData = message.rawData; + this.sourceNodeId = message.sourceNodeId; + this.request = message.request; + this.generation = message.generation; + } + + public Builder requestId(Integer requestId) { + this.requestId = requestId; + return this; + } + + public Builder packageName(String packageName) { + this.packageName = packageName; + return this; + } + + public Builder signatureDigest(String signatureDigest) { + this.signatureDigest = signatureDigest; + return this; + } + + public Builder targetNodeId(String targetNodeId) { + this.targetNodeId = targetNodeId; + return this; + } + + public Builder unknown5(Integer unknown5) { + this.unknown5 = unknown5; + return this; + } + + public Builder path(String path) { + this.path = path; + return this; + } + + public Builder rawData(ByteString rawData) { + this.rawData = rawData; + return this; + } + + public Builder sourceNodeId(String sourceNodeId) { + this.sourceNodeId = sourceNodeId; + return this; + } + + public Builder request(ChannelRequest request) { + this.request = request; + return this; + } + + public Builder generation(Integer generation) { + this.generation = generation; + return this; + } + + @Override + public Request build() { + return new Request(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/RootMessage.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/RootMessage.java new file mode 100644 index 00000000..7a0fd9f4 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/RootMessage.java @@ -0,0 +1,197 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.BOOL; + +public final class RootMessage extends Message { + + public static final Boolean DEFAULT_UNKNOWN13 = false; + + @ProtoField(tag = 4) + public final SetAsset setAsset; + + @ProtoField(tag = 5) + public final AckAsset ackAsset; + + @ProtoField(tag = 6) + public final FetchAsset fetchAsset; + + @ProtoField(tag = 7) + public final Connect connect; + + @ProtoField(tag = 8) + public final SyncStart syncStart; + + @ProtoField(tag = 9) + public final SetDataItem setDataItem; + + @ProtoField(tag = 10) + public final Request rcpRequest; + + @ProtoField(tag = 11) + public final Heartbeat heartbeat; + + @ProtoField(tag = 12) + public final FilePiece filePiece; + + @ProtoField(tag = 13, type = BOOL) + public final Boolean unknown13; + + @ProtoField(tag = 16) + public final Request channelRequest; + + public RootMessage(SetAsset setAsset, AckAsset ackAsset, FetchAsset fetchAsset, Connect connect, SyncStart syncStart, SetDataItem setDataItem, Request rcpRequest, Heartbeat heartbeat, FilePiece filePiece, Boolean unknown13, Request channelRequest) { + this.setAsset = setAsset; + this.ackAsset = ackAsset; + this.fetchAsset = fetchAsset; + this.connect = connect; + this.syncStart = syncStart; + this.setDataItem = setDataItem; + this.rcpRequest = rcpRequest; + this.heartbeat = heartbeat; + this.filePiece = filePiece; + this.unknown13 = unknown13; + this.channelRequest = channelRequest; + } + + private RootMessage(Builder builder) { + this(builder.setAsset, builder.ackAsset, builder.fetchAsset, builder.connect, builder.syncStart, builder.setDataItem, builder.rcpRequest, builder.heartbeat, builder.filePiece, builder.unknown13, builder.channelRequest); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof RootMessage)) return false; + RootMessage o = (RootMessage) other; + return equals(setAsset, o.setAsset) + && equals(ackAsset, o.ackAsset) + && equals(fetchAsset, o.fetchAsset) + && equals(connect, o.connect) + && equals(syncStart, o.syncStart) + && equals(setDataItem, o.setDataItem) + && equals(rcpRequest, o.rcpRequest) + && equals(heartbeat, o.heartbeat) + && equals(filePiece, o.filePiece) + && equals(unknown13, o.unknown13) + && equals(channelRequest, o.channelRequest); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = setAsset != null ? setAsset.hashCode() : 0; + result = result * 37 + (ackAsset != null ? ackAsset.hashCode() : 0); + result = result * 37 + (fetchAsset != null ? fetchAsset.hashCode() : 0); + result = result * 37 + (connect != null ? connect.hashCode() : 0); + result = result * 37 + (syncStart != null ? syncStart.hashCode() : 0); + result = result * 37 + (setDataItem != null ? setDataItem.hashCode() : 0); + result = result * 37 + (rcpRequest != null ? rcpRequest.hashCode() : 0); + result = result * 37 + (heartbeat != null ? heartbeat.hashCode() : 0); + result = result * 37 + (filePiece != null ? filePiece.hashCode() : 0); + result = result * 37 + (unknown13 != null ? unknown13.hashCode() : 0); + result = result * 37 + (channelRequest != null ? channelRequest.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public SetAsset setAsset; + public AckAsset ackAsset; + public FetchAsset fetchAsset; + public Connect connect; + public SyncStart syncStart; + public SetDataItem setDataItem; + public Request rcpRequest; + public Heartbeat heartbeat; + public FilePiece filePiece; + public Boolean unknown13; + public Request channelRequest; + + public Builder() { + } + + public Builder(RootMessage message) { + super(message); + if (message == null) return; + this.setAsset = message.setAsset; + this.ackAsset = message.ackAsset; + this.fetchAsset = message.fetchAsset; + this.connect = message.connect; + this.syncStart = message.syncStart; + this.setDataItem = message.setDataItem; + this.rcpRequest = message.rcpRequest; + this.heartbeat = message.heartbeat; + this.filePiece = message.filePiece; + this.unknown13 = message.unknown13; + this.channelRequest = message.channelRequest; + } + + public Builder setAsset(SetAsset setAsset) { + this.setAsset = setAsset; + return this; + } + + public Builder ackAsset(AckAsset ackAsset) { + this.ackAsset = ackAsset; + return this; + } + + public Builder fetchAsset(FetchAsset fetchAsset) { + this.fetchAsset = fetchAsset; + return this; + } + + public Builder connect(Connect connect) { + this.connect = connect; + return this; + } + + public Builder syncStart(SyncStart syncStart) { + this.syncStart = syncStart; + return this; + } + + public Builder setDataItem(SetDataItem setDataItem) { + this.setDataItem = setDataItem; + return this; + } + + public Builder rcpRequest(Request rcpRequest) { + this.rcpRequest = rcpRequest; + return this; + } + + public Builder heartbeat(Heartbeat heartbeat) { + this.heartbeat = heartbeat; + return this; + } + + public Builder filePiece(FilePiece filePiece) { + this.filePiece = filePiece; + return this; + } + + public Builder unknown13(Boolean unknown13) { + this.unknown13 = unknown13; + return this; + } + + public Builder channelRequest(Request channelRequest) { + this.channelRequest = channelRequest; + return this; + } + + @Override + public RootMessage build() { + return new RootMessage(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/SetAsset.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/SetAsset.java new file mode 100644 index 00000000..2935509b --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/SetAsset.java @@ -0,0 +1,96 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; +import okio.ByteString; + +import static com.squareup.wire.Message.Datatype.BYTES; +import static com.squareup.wire.Message.Datatype.STRING; + +public final class SetAsset extends Message { + + public static final String DEFAULT_DIGEST = ""; + public static final ByteString DEFAULT_DATA = ByteString.EMPTY; + + @ProtoField(tag = 1, type = STRING) + public final String digest; + + @ProtoField(tag = 2, type = BYTES) + public final ByteString data; + + @ProtoField(tag = 3) + public final AppKeys appkeys; + + public SetAsset(String digest, ByteString data, AppKeys appkeys) { + this.digest = digest; + this.data = data; + this.appkeys = appkeys; + } + + private SetAsset(Builder builder) { + this(builder.digest, builder.data, builder.appkeys); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof SetAsset)) return false; + SetAsset o = (SetAsset) other; + return equals(digest, o.digest) + && equals(data, o.data) + && equals(appkeys, o.appkeys); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = digest != null ? digest.hashCode() : 0; + result = result * 37 + (data != null ? data.hashCode() : 0); + result = result * 37 + (appkeys != null ? appkeys.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public String digest; + public ByteString data; + public AppKeys appkeys; + + public Builder() { + } + + public Builder(SetAsset message) { + super(message); + if (message == null) return; + this.digest = message.digest; + this.data = message.data; + this.appkeys = message.appkeys; + } + + public Builder digest(String digest) { + this.digest = digest; + return this; + } + + public Builder data(ByteString data) { + this.data = data; + return this; + } + + public Builder appkeys(AppKeys appkeys) { + this.appkeys = appkeys; + return this; + } + + @Override + public SetAsset build() { + return new SetAsset(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/SetDataItem.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/SetDataItem.java new file mode 100644 index 00000000..8d540fa2 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/SetDataItem.java @@ -0,0 +1,200 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; +import java.util.Collections; +import java.util.List; +import okio.ByteString; + +import static com.squareup.wire.Message.Datatype.BOOL; +import static com.squareup.wire.Message.Datatype.BYTES; +import static com.squareup.wire.Message.Datatype.INT64; +import static com.squareup.wire.Message.Datatype.STRING; +import static com.squareup.wire.Message.Label.REPEATED; + +public final class SetDataItem extends Message { + + public static final String DEFAULT_PACKAGENAME = ""; + public static final String DEFAULT_URI = ""; + public static final List DEFAULT_UNKNOWN3 = Collections.emptyList(); + public static final ByteString DEFAULT_DATA = ByteString.EMPTY; + public static final Long DEFAULT_SEQID = 0L; + public static final Boolean DEFAULT_DELETED = false; + public static final String DEFAULT_SOURCE = ""; + public static final List DEFAULT_ASSETS = Collections.emptyList(); + public static final String DEFAULT_SIGNATUREDIGEST = ""; + public static final Long DEFAULT_LASTMODIFIED = 0L; + + @ProtoField(tag = 1, type = STRING) + public final String packageName; + + @ProtoField(tag = 2, type = STRING) + public final String uri; + + @ProtoField(tag = 3, type = STRING, label = REPEATED) + public final List unknown3; + + @ProtoField(tag = 4, type = BYTES) + public final ByteString data; + + @ProtoField(tag = 5, type = INT64) + public final Long seqId; + + @ProtoField(tag = 6, type = BOOL) + public final Boolean deleted; + + @ProtoField(tag = 7, type = STRING) + public final String source; + + @ProtoField(tag = 8, label = REPEATED, messageType = AssetEntry.class) + public final List assets; + + @ProtoField(tag = 9, type = STRING) + public final String signatureDigest; + + @ProtoField(tag = 10, type = INT64) + public final Long lastModified; + + public SetDataItem(String packageName, String uri, List unknown3, ByteString data, Long seqId, Boolean deleted, String source, List assets, String signatureDigest, Long lastModified) { + this.packageName = packageName; + this.uri = uri; + this.unknown3 = immutableCopyOf(unknown3); + this.data = data; + this.seqId = seqId; + this.deleted = deleted; + this.source = source; + this.assets = immutableCopyOf(assets); + this.signatureDigest = signatureDigest; + this.lastModified = lastModified; + } + + private SetDataItem(Builder builder) { + this(builder.packageName, builder.uri, builder.unknown3, builder.data, builder.seqId, builder.deleted, builder.source, builder.assets, builder.signatureDigest, builder.lastModified); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof SetDataItem)) return false; + SetDataItem o = (SetDataItem) other; + return equals(packageName, o.packageName) + && equals(uri, o.uri) + && equals(unknown3, o.unknown3) + && equals(data, o.data) + && equals(seqId, o.seqId) + && equals(deleted, o.deleted) + && equals(source, o.source) + && equals(assets, o.assets) + && equals(signatureDigest, o.signatureDigest) + && equals(lastModified, o.lastModified); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = packageName != null ? packageName.hashCode() : 0; + result = result * 37 + (uri != null ? uri.hashCode() : 0); + result = result * 37 + (unknown3 != null ? unknown3.hashCode() : 1); + result = result * 37 + (data != null ? data.hashCode() : 0); + result = result * 37 + (seqId != null ? seqId.hashCode() : 0); + result = result * 37 + (deleted != null ? deleted.hashCode() : 0); + result = result * 37 + (source != null ? source.hashCode() : 0); + result = result * 37 + (assets != null ? assets.hashCode() : 1); + result = result * 37 + (signatureDigest != null ? signatureDigest.hashCode() : 0); + result = result * 37 + (lastModified != null ? lastModified.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public String packageName; + public String uri; + public List unknown3; + public ByteString data; + public Long seqId; + public Boolean deleted; + public String source; + public List assets; + public String signatureDigest; + public Long lastModified; + + public Builder() { + } + + public Builder(SetDataItem message) { + super(message); + if (message == null) return; + this.packageName = message.packageName; + this.uri = message.uri; + this.unknown3 = copyOf(message.unknown3); + this.data = message.data; + this.seqId = message.seqId; + this.deleted = message.deleted; + this.source = message.source; + this.assets = copyOf(message.assets); + this.signatureDigest = message.signatureDigest; + this.lastModified = message.lastModified; + } + + public Builder packageName(String packageName) { + this.packageName = packageName; + return this; + } + + public Builder uri(String uri) { + this.uri = uri; + return this; + } + + public Builder unknown3(List unknown3) { + this.unknown3 = checkForNulls(unknown3); + return this; + } + + public Builder data(ByteString data) { + this.data = data; + return this; + } + + public Builder seqId(Long seqId) { + this.seqId = seqId; + return this; + } + + public Builder deleted(Boolean deleted) { + this.deleted = deleted; + return this; + } + + public Builder source(String source) { + this.source = source; + return this; + } + + public Builder assets(List assets) { + this.assets = checkForNulls(assets); + return this; + } + + public Builder signatureDigest(String signatureDigest) { + this.signatureDigest = signatureDigest; + return this; + } + + public Builder lastModified(Long lastModified) { + this.lastModified = lastModified; + return this; + } + + @Override + public SetDataItem build() { + return new SetDataItem(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/SyncStart.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/SyncStart.java new file mode 100644 index 00000000..652e36a5 --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/SyncStart.java @@ -0,0 +1,99 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; +import java.util.Collections; +import java.util.List; + +import static com.squareup.wire.Message.Datatype.INT32; +import static com.squareup.wire.Message.Datatype.INT64; +import static com.squareup.wire.Message.Label.REPEATED; + +public final class SyncStart extends Message { + + public static final Long DEFAULT_RECEIVEDSEQID = 0L; + public static final List DEFAULT_SYNCTABLE = Collections.emptyList(); + public static final Integer DEFAULT_VERSION = 0; + + @ProtoField(tag = 1, type = INT64) + public final Long receivedSeqId; + + @ProtoField(tag = 2, label = REPEATED, messageType = SyncTableEntry.class) + public final List syncTable; + + @ProtoField(tag = 3, type = INT32) + public final Integer version; + + public SyncStart(Long receivedSeqId, List syncTable, Integer version) { + this.receivedSeqId = receivedSeqId; + this.syncTable = immutableCopyOf(syncTable); + this.version = version; + } + + private SyncStart(Builder builder) { + this(builder.receivedSeqId, builder.syncTable, builder.version); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof SyncStart)) return false; + SyncStart o = (SyncStart) other; + return equals(receivedSeqId, o.receivedSeqId) + && equals(syncTable, o.syncTable) + && equals(version, o.version); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = receivedSeqId != null ? receivedSeqId.hashCode() : 0; + result = result * 37 + (syncTable != null ? syncTable.hashCode() : 1); + result = result * 37 + (version != null ? version.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public Long receivedSeqId; + public List syncTable; + public Integer version; + + public Builder() { + } + + public Builder(SyncStart message) { + super(message); + if (message == null) return; + this.receivedSeqId = message.receivedSeqId; + this.syncTable = copyOf(message.syncTable); + this.version = message.version; + } + + public Builder receivedSeqId(Long receivedSeqId) { + this.receivedSeqId = receivedSeqId; + return this; + } + + public Builder syncTable(List syncTable) { + this.syncTable = checkForNulls(syncTable); + return this; + } + + public Builder version(Integer version) { + this.version = version; + return this; + } + + @Override + public SyncStart build() { + return new SyncStart(this); + } + } +} diff --git a/play-services-core/src/main/protos-java/org/microg/gms/wearable/SyncTableEntry.java b/play-services-core/src/main/protos-java/org/microg/gms/wearable/SyncTableEntry.java new file mode 100644 index 00000000..19d2f95a --- /dev/null +++ b/play-services-core/src/main/protos-java/org/microg/gms/wearable/SyncTableEntry.java @@ -0,0 +1,82 @@ +// Code generated by Wire protocol buffer compiler, do not edit. +// Source file: protos-repo/wearable.proto +package org.microg.gms.wearable; + +import com.squareup.wire.Message; +import com.squareup.wire.ProtoField; + +import static com.squareup.wire.Message.Datatype.INT64; +import static com.squareup.wire.Message.Datatype.STRING; + +public final class SyncTableEntry extends Message { + + public static final String DEFAULT_KEY = ""; + public static final Long DEFAULT_VALUE = 0L; + + @ProtoField(tag = 1, type = STRING) + public final String key; + + @ProtoField(tag = 2, type = INT64) + public final Long value; + + public SyncTableEntry(String key, Long value) { + this.key = key; + this.value = value; + } + + private SyncTableEntry(Builder builder) { + this(builder.key, builder.value); + setBuilder(builder); + } + + @Override + public boolean equals(Object other) { + if (other == this) return true; + if (!(other instanceof SyncTableEntry)) return false; + SyncTableEntry o = (SyncTableEntry) other; + return equals(key, o.key) + && equals(value, o.value); + } + + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = key != null ? key.hashCode() : 0; + result = result * 37 + (value != null ? value.hashCode() : 0); + hashCode = result; + } + return result; + } + + public static final class Builder extends Message.Builder { + + public String key; + public Long value; + + public Builder() { + } + + public Builder(SyncTableEntry message) { + super(message); + if (message == null) return; + this.key = message.key; + this.value = message.value; + } + + public Builder key(String key) { + this.key = key; + return this; + } + + public Builder value(Long value) { + this.value = value; + return this; + } + + @Override + public SyncTableEntry build() { + return new SyncTableEntry(this); + } + } +} diff --git a/play-services-core/src/main/protos-repo/wearable.proto b/play-services-core/src/main/protos-repo/wearable.proto new file mode 100644 index 00000000..a0a12395 --- /dev/null +++ b/play-services-core/src/main/protos-repo/wearable.proto @@ -0,0 +1,144 @@ +option java_package = "org.microg.gms.wearable"; +option java_outer_classname = "WearableProto"; + +message AckAsset { + optional string digest = 1; +} + +message AppKey { + optional string packageName = 1; + optional string signatureDigest = 2; +} + +message AppKeys { + repeated AppKey appKeys = 1; +} + +message Asset { + // TODO +} + +message AssetEntry { + optional string key = 1; + optional Asset value = 2; + optional int32 unknown3 = 3; +} + +message ChannelControlRequest { + optional int32 type = 1; + optional int64 channelId = 2; + optional bool fromChannelOperator = 3; + optional string packageName = 4; + optional string signatureDigest = 5; + optional string path = 6; + optional int32 closeErrorCode = 7; +} + +message ChannelDataHeader { + optional int64 channelId = 1; + optional bool fromChannelOperator = 2; + optional int64 unknown3 = 3; +} + +message ChannelDataAckRequest { + optional ChannelDataHeader header = 1; + optional bool finalMessage = 2; +} + +message ChannelDataRequest { + optional ChannelDataHeader header = 1; + optional bytes payload = 2; + optional bool finalMessage = 3; +} + +message ChannelRequest { + optional ChannelControlRequest channelControlRequest = 2; + optional ChannelDataRequest channelDataRequest = 3; + optional ChannelDataAckRequest channelDataAckRequest = 4; + optional int32 version = 6; +} + +message Connect { + optional int32 id = 1; + optional string name = 2; + optional int64 peerAndroidId = 3; + optional int32 unknown4 = 4; + optional int32 unknown5 = 5; + optional int32 unknown6 = 6; + optional string networkId = 7; +} + +message FetchAsset { + optional string packageName = 1; + optional string assetName = 2; + optional bool permission = 3; + optional string signatureDigest = 4; +} + +message FilePiece { + optional string fileName = 1; + optional bool finalPiece = 2; + optional bytes piece = 3; + optional string digest = 4; +} + +message Heartbeat { + +} + +message Request { + optional int32 requestId = 1; + optional string packageName = 2; + optional string signatureDigest = 3; + optional string targetNodeId = 4; + optional int32 unknown5 = 5; + optional string path = 6; + optional bytes rawData = 7; + optional string sourceNodeId = 8; + optional ChannelRequest request = 9; + optional int32 generation = 10; +} + +message RootMessage { + optional SetAsset setAsset = 4; + optional AckAsset ackAsset = 5; + optional FetchAsset fetchAsset = 6; + optional Connect connect = 7; + optional SyncStart syncStart = 8; + optional SetDataItem setDataItem = 9; + optional Request rcpRequest = 10; + optional Heartbeat heartbeat = 11; + optional FilePiece filePiece = 12; + optional bool unknown13 = 13; + optional Request channelRequest = 16; +} + +message SetAsset { + optional string digest = 1; + optional bytes data = 2; + optional AppKeys appkeys = 3; +} + +message SetDataItem { + optional string packageName = 1; + optional string uri = 2; + repeated string unknown3 = 3; + optional bytes data = 4; + optional int64 seqId = 5; + optional bool deleted = 6; + optional string source = 7; + repeated AssetEntry assets = 8; + optional string signatureDigest = 9; + optional int64 lastModified = 10; +} + +message SyncStart { + optional int64 receivedSeqId = 1; + repeated SyncTableEntry syncTable = 2; + optional int32 version = 3; +} + +message SyncTableEntry { + optional string key = 1; + optional int64 value = 2; +}