From b575274680f0e43f91fc938a4e64e5dcecdac423 Mon Sep 17 00:00:00 2001 From: heavyrain lee Date: Thu, 2 May 2019 22:10:27 +0800 Subject: [PATCH] Friend alias --- .../moquette/imhandler/FriendPullHandler.java | 2 +- .../cn/wildfirechat/proto/WFCMessage.java | 942 ++++-------------- 2 files changed, 193 insertions(+), 751 deletions(-) diff --git a/broker/src/main/java/io/moquette/imhandler/FriendPullHandler.java b/broker/src/main/java/io/moquette/imhandler/FriendPullHandler.java index 90d4001e..dd064bc2 100644 --- a/broker/src/main/java/io/moquette/imhandler/FriendPullHandler.java +++ b/broker/src/main/java/io/moquette/imhandler/FriendPullHandler.java @@ -25,7 +25,7 @@ public class FriendPullHandler extends IMHandler { WFCMessage.GetFriendsResult.Builder builder = WFCMessage.GetFriendsResult.newBuilder(); for (FriendData data : friendDatas ) { - builder.addEntry(WFCMessage.Friend.newBuilder().setState(data.getState()).setUid(data.getFriendUid()).setUpdateDt(data.getTimestamp()).build()); + builder.addEntry(WFCMessage.Friend.newBuilder().setState(data.getState()).setUid(data.getFriendUid()).setUpdateDt(data.getTimestamp()).setAlias(data.getAlias()).build()); } byte[] data = builder.build().toByteArray(); ackPayload.ensureWritable(data.length).writeBytes(data); diff --git a/client/src/main/java/cn/wildfirechat/proto/WFCMessage.java b/client/src/main/java/cn/wildfirechat/proto/WFCMessage.java index 2c9d68bf..4763a9ed 100644 --- a/client/src/main/java/cn/wildfirechat/proto/WFCMessage.java +++ b/client/src/main/java/cn/wildfirechat/proto/WFCMessage.java @@ -43079,6 +43079,21 @@ public final class WFCMessage { * required int64 update_dt = 3; */ long getUpdateDt(); + + // optional string alias = 4; + /** + * optional string alias = 4; + */ + boolean hasAlias(); + /** + * optional string alias = 4; + */ + java.lang.String getAlias(); + /** + * optional string alias = 4; + */ + com.google.protobuf.ByteString + getAliasBytes(); } /** * Protobuf type {@code Friend} @@ -43146,6 +43161,11 @@ public final class WFCMessage { updateDt_ = input.readInt64(); break; } + case 34: { + bitField0_ |= 0x00000008; + alias_ = input.readBytes(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -43261,10 +43281,54 @@ public final class WFCMessage { return updateDt_; } + // optional string alias = 4; + public static final int ALIAS_FIELD_NUMBER = 4; + private java.lang.Object alias_; + /** + * optional string alias = 4; + */ + public boolean hasAlias() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string alias = 4; + */ + public java.lang.String getAlias() { + java.lang.Object ref = alias_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + alias_ = s; + } + return s; + } + } + /** + * optional string alias = 4; + */ + public com.google.protobuf.ByteString + getAliasBytes() { + java.lang.Object ref = alias_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + alias_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private void initFields() { uid_ = ""; state_ = 0; updateDt_ = 0L; + alias_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -43299,6 +43363,9 @@ public final class WFCMessage { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt64(3, updateDt_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getAliasBytes()); + } getUnknownFields().writeTo(output); } @@ -43320,6 +43387,10 @@ public final class WFCMessage { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, updateDt_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getAliasBytes()); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -43442,6 +43513,8 @@ public final class WFCMessage { bitField0_ = (bitField0_ & ~0x00000002); updateDt_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); + alias_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -43482,6 +43555,10 @@ public final class WFCMessage { to_bitField0_ |= 0x00000004; } result.updateDt_ = updateDt_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.alias_ = alias_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -43509,6 +43586,11 @@ public final class WFCMessage { if (other.hasUpdateDt()) { setUpdateDt(other.getUpdateDt()); } + if (other.hasAlias()) { + bitField0_ |= 0x00000008; + alias_ = other.alias_; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -43688,6 +43770,80 @@ public final class WFCMessage { return this; } + // optional string alias = 4; + private java.lang.Object alias_ = ""; + /** + * optional string alias = 4; + */ + public boolean hasAlias() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string alias = 4; + */ + public java.lang.String getAlias() { + java.lang.Object ref = alias_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + alias_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string alias = 4; + */ + public com.google.protobuf.ByteString + getAliasBytes() { + java.lang.Object ref = alias_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + alias_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string alias = 4; + */ + public Builder setAlias( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + alias_ = value; + onChanged(); + return this; + } + /** + * optional string alias = 4; + */ + public Builder clearAlias() { + bitField0_ = (bitField0_ & ~0x00000008); + alias_ = getDefaultInstance().getAlias(); + onChanged(); + return this; + } + /** + * optional string alias = 4; + */ + public Builder setAliasBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + alias_ = value; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:Friend) } @@ -55783,707 +55939,6 @@ public final class WFCMessage { // @@protoc_insertion_point(class_scope:GetTokenRequest) } - public interface LoadRemoteMessagesOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .Conversation conversation = 1; - /** - * required .Conversation conversation = 1; - */ - boolean hasConversation(); - /** - * required .Conversation conversation = 1; - */ - cn.wildfirechat.proto.WFCMessage.Conversation getConversation(); - /** - * required .Conversation conversation = 1; - */ - cn.wildfirechat.proto.WFCMessage.ConversationOrBuilder getConversationOrBuilder(); - - // required int64 before_uid = 2; - /** - * required int64 before_uid = 2; - */ - boolean hasBeforeUid(); - /** - * required int64 before_uid = 2; - */ - long getBeforeUid(); - - // required int32 count = 3; - /** - * required int32 count = 3; - */ - boolean hasCount(); - /** - * required int32 count = 3; - */ - int getCount(); - } - /** - * Protobuf type {@code LoadRemoteMessages} - */ - public static final class LoadRemoteMessages extends - com.google.protobuf.GeneratedMessage - implements LoadRemoteMessagesOrBuilder { - // Use LoadRemoteMessages.newBuilder() to construct. - private LoadRemoteMessages(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private LoadRemoteMessages(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final LoadRemoteMessages defaultInstance; - public static LoadRemoteMessages getDefaultInstance() { - return defaultInstance; - } - - public LoadRemoteMessages getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LoadRemoteMessages( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - cn.wildfirechat.proto.WFCMessage.Conversation.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = conversation_.toBuilder(); - } - conversation_ = input.readMessage(cn.wildfirechat.proto.WFCMessage.Conversation.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(conversation_); - conversation_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 16: { - bitField0_ |= 0x00000002; - beforeUid_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - count_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return cn.wildfirechat.proto.WFCMessage.internal_static_LoadRemoteMessages_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return cn.wildfirechat.proto.WFCMessage.internal_static_LoadRemoteMessages_fieldAccessorTable - .ensureFieldAccessorsInitialized( - cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages.class, cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public LoadRemoteMessages parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LoadRemoteMessages(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required .Conversation conversation = 1; - public static final int CONVERSATION_FIELD_NUMBER = 1; - private cn.wildfirechat.proto.WFCMessage.Conversation conversation_; - /** - * required .Conversation conversation = 1; - */ - public boolean hasConversation() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required .Conversation conversation = 1; - */ - public cn.wildfirechat.proto.WFCMessage.Conversation getConversation() { - return conversation_; - } - /** - * required .Conversation conversation = 1; - */ - public cn.wildfirechat.proto.WFCMessage.ConversationOrBuilder getConversationOrBuilder() { - return conversation_; - } - - // required int64 before_uid = 2; - public static final int BEFORE_UID_FIELD_NUMBER = 2; - private long beforeUid_; - /** - * required int64 before_uid = 2; - */ - public boolean hasBeforeUid() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required int64 before_uid = 2; - */ - public long getBeforeUid() { - return beforeUid_; - } - - // required int32 count = 3; - public static final int COUNT_FIELD_NUMBER = 3; - private int count_; - /** - * required int32 count = 3; - */ - public boolean hasCount() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * required int32 count = 3; - */ - public int getCount() { - return count_; - } - - private void initFields() { - conversation_ = cn.wildfirechat.proto.WFCMessage.Conversation.getDefaultInstance(); - beforeUid_ = 0L; - count_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasConversation()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasBeforeUid()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasCount()) { - memoizedIsInitialized = 0; - return false; - } - if (!getConversation().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, conversation_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, beforeUid_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, count_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, conversation_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, beforeUid_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, count_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code LoadRemoteMessages} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements cn.wildfirechat.proto.WFCMessage.LoadRemoteMessagesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return cn.wildfirechat.proto.WFCMessage.internal_static_LoadRemoteMessages_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return cn.wildfirechat.proto.WFCMessage.internal_static_LoadRemoteMessages_fieldAccessorTable - .ensureFieldAccessorsInitialized( - cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages.class, cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages.Builder.class); - } - - // Construct using cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConversationFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (conversationBuilder_ == null) { - conversation_ = cn.wildfirechat.proto.WFCMessage.Conversation.getDefaultInstance(); - } else { - conversationBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - beforeUid_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - count_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return cn.wildfirechat.proto.WFCMessage.internal_static_LoadRemoteMessages_descriptor; - } - - public cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages getDefaultInstanceForType() { - return cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages.getDefaultInstance(); - } - - public cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages build() { - cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages buildPartial() { - cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages result = new cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (conversationBuilder_ == null) { - result.conversation_ = conversation_; - } else { - result.conversation_ = conversationBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.beforeUid_ = beforeUid_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.count_ = count_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages) { - return mergeFrom((cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages other) { - if (other == cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages.getDefaultInstance()) return this; - if (other.hasConversation()) { - mergeConversation(other.getConversation()); - } - if (other.hasBeforeUid()) { - setBeforeUid(other.getBeforeUid()); - } - if (other.hasCount()) { - setCount(other.getCount()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasConversation()) { - - return false; - } - if (!hasBeforeUid()) { - - return false; - } - if (!hasCount()) { - - return false; - } - if (!getConversation().isInitialized()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (cn.wildfirechat.proto.WFCMessage.LoadRemoteMessages) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required .Conversation conversation = 1; - private cn.wildfirechat.proto.WFCMessage.Conversation conversation_ = cn.wildfirechat.proto.WFCMessage.Conversation.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - cn.wildfirechat.proto.WFCMessage.Conversation, cn.wildfirechat.proto.WFCMessage.Conversation.Builder, cn.wildfirechat.proto.WFCMessage.ConversationOrBuilder> conversationBuilder_; - /** - * required .Conversation conversation = 1; - */ - public boolean hasConversation() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required .Conversation conversation = 1; - */ - public cn.wildfirechat.proto.WFCMessage.Conversation getConversation() { - if (conversationBuilder_ == null) { - return conversation_; - } else { - return conversationBuilder_.getMessage(); - } - } - /** - * required .Conversation conversation = 1; - */ - public Builder setConversation(cn.wildfirechat.proto.WFCMessage.Conversation value) { - if (conversationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - conversation_ = value; - onChanged(); - } else { - conversationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .Conversation conversation = 1; - */ - public Builder setConversation( - cn.wildfirechat.proto.WFCMessage.Conversation.Builder builderForValue) { - if (conversationBuilder_ == null) { - conversation_ = builderForValue.build(); - onChanged(); - } else { - conversationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .Conversation conversation = 1; - */ - public Builder mergeConversation(cn.wildfirechat.proto.WFCMessage.Conversation value) { - if (conversationBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - conversation_ != cn.wildfirechat.proto.WFCMessage.Conversation.getDefaultInstance()) { - conversation_ = - cn.wildfirechat.proto.WFCMessage.Conversation.newBuilder(conversation_).mergeFrom(value).buildPartial(); - } else { - conversation_ = value; - } - onChanged(); - } else { - conversationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .Conversation conversation = 1; - */ - public Builder clearConversation() { - if (conversationBuilder_ == null) { - conversation_ = cn.wildfirechat.proto.WFCMessage.Conversation.getDefaultInstance(); - onChanged(); - } else { - conversationBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * required .Conversation conversation = 1; - */ - public cn.wildfirechat.proto.WFCMessage.Conversation.Builder getConversationBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConversationFieldBuilder().getBuilder(); - } - /** - * required .Conversation conversation = 1; - */ - public cn.wildfirechat.proto.WFCMessage.ConversationOrBuilder getConversationOrBuilder() { - if (conversationBuilder_ != null) { - return conversationBuilder_.getMessageOrBuilder(); - } else { - return conversation_; - } - } - /** - * required .Conversation conversation = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - cn.wildfirechat.proto.WFCMessage.Conversation, cn.wildfirechat.proto.WFCMessage.Conversation.Builder, cn.wildfirechat.proto.WFCMessage.ConversationOrBuilder> - getConversationFieldBuilder() { - if (conversationBuilder_ == null) { - conversationBuilder_ = new com.google.protobuf.SingleFieldBuilder< - cn.wildfirechat.proto.WFCMessage.Conversation, cn.wildfirechat.proto.WFCMessage.Conversation.Builder, cn.wildfirechat.proto.WFCMessage.ConversationOrBuilder>( - conversation_, - getParentForChildren(), - isClean()); - conversation_ = null; - } - return conversationBuilder_; - } - - // required int64 before_uid = 2; - private long beforeUid_ ; - /** - * required int64 before_uid = 2; - */ - public boolean hasBeforeUid() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required int64 before_uid = 2; - */ - public long getBeforeUid() { - return beforeUid_; - } - /** - * required int64 before_uid = 2; - */ - public Builder setBeforeUid(long value) { - bitField0_ |= 0x00000002; - beforeUid_ = value; - onChanged(); - return this; - } - /** - * required int64 before_uid = 2; - */ - public Builder clearBeforeUid() { - bitField0_ = (bitField0_ & ~0x00000002); - beforeUid_ = 0L; - onChanged(); - return this; - } - - // required int32 count = 3; - private int count_ ; - /** - * required int32 count = 3; - */ - public boolean hasCount() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * required int32 count = 3; - */ - public int getCount() { - return count_; - } - /** - * required int32 count = 3; - */ - public Builder setCount(int value) { - bitField0_ |= 0x00000004; - count_ = value; - onChanged(); - return this; - } - /** - * required int32 count = 3; - */ - public Builder clearCount() { - bitField0_ = (bitField0_ & ~0x00000004); - count_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:LoadRemoteMessages) - } - - static { - defaultInstance = new LoadRemoteMessages(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:LoadRemoteMessages) - } - private static com.google.protobuf.Descriptors.Descriptor internal_static_AddFriendRequest_descriptor; private static @@ -56824,11 +56279,6 @@ public final class WFCMessage { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_GetTokenRequest_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_LoadRemoteMessages_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_LoadRemoteMessages_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -56946,44 +56396,42 @@ public final class WFCMessage { "fyUserSettingReq\022\r\n\005scope\030\001 \002(\005\022\013\n\003key\030\002" + " \002(\t\022\r\n\005value\030\003 \002(\t\"\032\n\007Version\022\017\n\007versio" + "n\030\001 \002(\003\"8\n\024GetUserSettingResult\022 \n\005entry" + - "\030\001 \003(\0132\021.UserSettingEntry\"7\n\006Friend\022\013\n\003u" + + "\030\001 \003(\0132\021.UserSettingEntry\"F\n\006Friend\022\013\n\003u" + "id\030\001 \002(\t\022\r\n\005state\030\002 \002(\005\022\021\n\tupdate_dt\030\003 \002", - "(\003\"*\n\020GetFriendsResult\022\026\n\005entry\030\001 \003(\0132\007." + - "Friend\"7\n\026GetFriendRequestResult\022\035\n\005entr" + - "y\030\001 \003(\0132\016.FriendRequest\"\243\001\n\021ConnectAckPa" + - "yload\022\020\n\010msg_head\030\001 \001(\003\022\023\n\013friend_head\030\002" + - " \001(\003\022\026\n\016friend_rq_head\030\003 \001(\003\022\024\n\014setting_" + - "head\030\004 \001(\003\022\021\n\tnode_addr\030\005 \001(\t\022\021\n\tnode_po" + - "rt\030\006 \001(\005\022\023\n\013server_time\030\007 \001(\003\"P\n\rIMHttpW" + - "rapper\022\r\n\005token\030\001 \002(\t\022\021\n\tclient_id\030\002 \002(\t" + - "\022\017\n\007request\030\003 \002(\t\022\014\n\004data\030\004 \001(\014\"A\n\021Searc" + - "hUserRequest\022\017\n\007keyword\030\001 \002(\t\022\r\n\005fuzzy\030\002", - " \001(\005\022\014\n\004page\030\003 \001(\005\"(\n\020SearchUserResult\022\024" + - "\n\005entry\030\001 \003(\0132\005.User\"@\n\026GetChatroomInfoR" + - "equest\022\023\n\013chatroom_id\030\001 \002(\t\022\021\n\tupdate_dt" + - "\030\002 \001(\003\"\227\001\n\014ChatroomInfo\022\r\n\005title\030\001 \002(\t\022\014" + - "\n\004desc\030\002 \001(\t\022\020\n\010portrait\030\003 \001(\t\022\024\n\014member" + - "_count\030\004 \001(\005\022\021\n\tcreate_dt\030\005 \001(\003\022\021\n\tupdat" + - "e_dt\030\006 \001(\003\022\r\n\005extra\030\007 \001(\t\022\r\n\005state\030\010 \001(\005" + - "\"F\n\034GetChatroomMemberInfoRequest\022\023\n\013chat" + - "room_id\030\001 \002(\t\022\021\n\tmax_count\030\002 \001(\005\";\n\022Chat" + - "roomMemberInfo\022\024\n\014member_count\030\001 \001(\005\022\017\n\007", - "members\030\002 \003(\t\"\026\n\010INT64Buf\022\n\n\002id\030\001 \002(\003\"4\n" + - "\023NotifyRecallMessage\022\n\n\002id\030\001 \002(\003\022\021\n\tfrom" + - "_user\030\002 \002(\t\"/\n\020BlackUserRequest\022\013\n\003uid\030\001" + - " \002(\t\022\016\n\006status\030\002 \002(\005\"\323\001\n\014RouteRequest\022\013\n" + - "\003app\030\001 \001(\t\022\020\n\010platform\030\002 \001(\005\022\021\n\tpush_typ" + - "e\030\003 \001(\005\022\023\n\013device_name\030\004 \001(\t\022\026\n\016device_v" + - "ersion\030\005 \001(\t\022\022\n\nphone_name\030\006 \001(\t\022\020\n\010lang" + - "uage\030\007 \001(\t\022\024\n\014carrier_name\030\010 \001(\t\022\023\n\013app_" + - "version\030\t \001(\t\022\023\n\013sdk_version\030\n \001(\t\"D\n\rRo" + - "uteResponse\022\014\n\004host\030\001 \002(\t\022\021\n\tlong_port\030\002", - " \002(\005\022\022\n\nshort_port\030\003 \002(\005\"5\n\017GetTokenRequ" + - "est\022\017\n\007user_id\030\001 \002(\t\022\021\n\tclient_id\030\002 \002(\t\"" + - "\\\n\022LoadRemoteMessages\022#\n\014conversation\030\001 " + - "\002(\0132\r.Conversation\022\022\n\nbefore_uid\030\002 \002(\003\022\r" + - "\n\005count\030\003 \002(\005B#\n\025cn.wildfirechat.protoB\n" + - "WFCMessage" + "(\003\022\r\n\005alias\030\004 \001(\t\"*\n\020GetFriendsResult\022\026\n" + + "\005entry\030\001 \003(\0132\007.Friend\"7\n\026GetFriendReques" + + "tResult\022\035\n\005entry\030\001 \003(\0132\016.FriendRequest\"\243" + + "\001\n\021ConnectAckPayload\022\020\n\010msg_head\030\001 \001(\003\022\023" + + "\n\013friend_head\030\002 \001(\003\022\026\n\016friend_rq_head\030\003 " + + "\001(\003\022\024\n\014setting_head\030\004 \001(\003\022\021\n\tnode_addr\030\005" + + " \001(\t\022\021\n\tnode_port\030\006 \001(\005\022\023\n\013server_time\030\007" + + " \001(\003\"P\n\rIMHttpWrapper\022\r\n\005token\030\001 \002(\t\022\021\n\t" + + "client_id\030\002 \002(\t\022\017\n\007request\030\003 \002(\t\022\014\n\004data" + + "\030\004 \001(\014\"A\n\021SearchUserRequest\022\017\n\007keyword\030\001", + " \002(\t\022\r\n\005fuzzy\030\002 \001(\005\022\014\n\004page\030\003 \001(\005\"(\n\020Sea" + + "rchUserResult\022\024\n\005entry\030\001 \003(\0132\005.User\"@\n\026G" + + "etChatroomInfoRequest\022\023\n\013chatroom_id\030\001 \002" + + "(\t\022\021\n\tupdate_dt\030\002 \001(\003\"\227\001\n\014ChatroomInfo\022\r" + + "\n\005title\030\001 \002(\t\022\014\n\004desc\030\002 \001(\t\022\020\n\010portrait\030" + + "\003 \001(\t\022\024\n\014member_count\030\004 \001(\005\022\021\n\tcreate_dt" + + "\030\005 \001(\003\022\021\n\tupdate_dt\030\006 \001(\003\022\r\n\005extra\030\007 \001(\t" + + "\022\r\n\005state\030\010 \001(\005\"F\n\034GetChatroomMemberInfo" + + "Request\022\023\n\013chatroom_id\030\001 \002(\t\022\021\n\tmax_coun" + + "t\030\002 \001(\005\";\n\022ChatroomMemberInfo\022\024\n\014member_", + "count\030\001 \001(\005\022\017\n\007members\030\002 \003(\t\"\026\n\010INT64Buf" + + "\022\n\n\002id\030\001 \002(\003\"4\n\023NotifyRecallMessage\022\n\n\002i" + + "d\030\001 \002(\003\022\021\n\tfrom_user\030\002 \002(\t\"/\n\020BlackUserR" + + "equest\022\013\n\003uid\030\001 \002(\t\022\016\n\006status\030\002 \002(\005\"\323\001\n\014" + + "RouteRequest\022\013\n\003app\030\001 \001(\t\022\020\n\010platform\030\002 " + + "\001(\005\022\021\n\tpush_type\030\003 \001(\005\022\023\n\013device_name\030\004 " + + "\001(\t\022\026\n\016device_version\030\005 \001(\t\022\022\n\nphone_nam" + + "e\030\006 \001(\t\022\020\n\010language\030\007 \001(\t\022\024\n\014carrier_nam" + + "e\030\010 \001(\t\022\023\n\013app_version\030\t \001(\t\022\023\n\013sdk_vers" + + "ion\030\n \001(\t\"D\n\rRouteResponse\022\014\n\004host\030\001 \002(\t", + "\022\021\n\tlong_port\030\002 \002(\005\022\022\n\nshort_port\030\003 \002(\005\"" + + "5\n\017GetTokenRequest\022\017\n\007user_id\030\001 \002(\t\022\021\n\tc" + + "lient_id\030\002 \002(\tB#\n\025cn.wildfirechat.protoB" + + "\nWFCMessage" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -57301,7 +56749,7 @@ public final class WFCMessage { internal_static_Friend_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Friend_descriptor, - new java.lang.String[] { "Uid", "State", "UpdateDt", }); + new java.lang.String[] { "Uid", "State", "UpdateDt", "Alias", }); internal_static_GetFriendsResult_descriptor = getDescriptor().getMessageTypes().get(52); internal_static_GetFriendsResult_fieldAccessorTable = new @@ -57398,12 +56846,6 @@ public final class WFCMessage { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_GetTokenRequest_descriptor, new java.lang.String[] { "UserId", "ClientId", }); - internal_static_LoadRemoteMessages_descriptor = - getDescriptor().getMessageTypes().get(68); - internal_static_LoadRemoteMessages_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_LoadRemoteMessages_descriptor, - new java.lang.String[] { "Conversation", "BeforeUid", "Count", }); return null; } };