string mid = 1;
- */
- java.lang.String getMid();
-
- /**
- * string mid = 1;
- */
- com.google.protobuf.ByteString getMidBytes();
-
- /**
- * string action = 2;
- */
- java.lang.String getAction();
-
- /**
- * string action = 2;
- */
- com.google.protobuf.ByteString getActionBytes();
-
- /**
- * string content = 3;
- */
- java.lang.String getContent();
-
- /**
- * string content = 3;
- */
- com.google.protobuf.ByteString getContentBytes();
-
- /**
- * string sender = 4;
- */
- java.lang.String getSender();
-
- /**
- * string sender = 4;
- */
- com.google.protobuf.ByteString getSenderBytes();
-
- /**
- * string receiver = 5;
- */
- java.lang.String getReceiver();
-
- /**
- * string receiver = 5;
- */
- com.google.protobuf.ByteString getReceiverBytes();
-
- /**
- * string extra = 6;
- */
- java.lang.String getExtra();
-
- /**
- * string extra = 6;
- */
- com.google.protobuf.ByteString getExtraBytes();
-
- /**
- * string title = 7;
- */
- java.lang.String getTitle();
-
- /**
- * string title = 7;
- */
- com.google.protobuf.ByteString getTitleBytes();
-
- /**
- * string format = 8;
- */
- java.lang.String getFormat();
-
- /**
- * string format = 8;
- */
- com.google.protobuf.ByteString getFormatBytes();
-
- /**
- * int64 timestamp = 9;
- */
- long getTimestamp();
- }
-
- /**
- * Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
- */
- public static final class Model extends com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.Model)
- ModelOrBuilder {
- // Use Model.newBuilder() to construct.
- private Model(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Model() {
- mid_ = "";
- action_ = "";
- content_ = "";
- sender_ = "";
- receiver_ = "";
- extra_ = "";
- title_ = "";
- format_ = "";
- timestamp_ = 0L;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
-
- private Model(com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- mid_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- action_ = s;
- break;
- }
- case 26: {
- java.lang.String s = input.readStringRequireUtf8();
-
- content_ = s;
- break;
- }
- case 34: {
- java.lang.String s = input.readStringRequireUtf8();
-
- sender_ = s;
- break;
- }
- case 42: {
- java.lang.String s = input.readStringRequireUtf8();
-
- receiver_ = s;
- break;
- }
- case 50: {
- java.lang.String s = input.readStringRequireUtf8();
-
- extra_ = s;
- break;
- }
- case 58: {
- java.lang.String s = input.readStringRequireUtf8();
-
- title_ = s;
- break;
- }
- case 66: {
- java.lang.String s = input.readStringRequireUtf8();
-
- format_ = s;
- break;
- }
- case 72: {
-
- timestamp_ = input.readInt64();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.farsunset.cim.sdk.android.model.proto.MessageProto.internal_static_com_farsunset_cim_sdk_android_model_proto_Model_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
- return com.farsunset.cim.sdk.android.model.proto.MessageProto.internal_static_com_farsunset_cim_sdk_android_model_proto_Model_fieldAccessorTable
- .ensureFieldAccessorsInitialized(com.farsunset.cim.sdk.android.model.proto.MessageProto.Model.class,
- com.farsunset.cim.sdk.android.model.proto.MessageProto.Model.Builder.class);
- }
-
- public static final int MID_FIELD_NUMBER = 1;
- private volatile java.lang.Object mid_;
-
- /**
- * string mid = 1;
- */
- public java.lang.String getMid() {
- java.lang.Object ref = mid_;
- 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();
- mid_ = s;
- return s;
- }
- }
-
- /**
- * string mid = 1;
- */
- public com.google.protobuf.ByteString getMidBytes() {
- java.lang.Object ref = mid_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- mid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ACTION_FIELD_NUMBER = 2;
- private volatile java.lang.Object action_;
-
- /**
- * string action = 2;
- */
- public java.lang.String getAction() {
- java.lang.Object ref = action_;
- 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();
- action_ = s;
- return s;
- }
- }
-
- /**
- * string action = 2;
- */
- public com.google.protobuf.ByteString getActionBytes() {
- java.lang.Object ref = action_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- action_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int CONTENT_FIELD_NUMBER = 3;
- private volatile java.lang.Object content_;
-
- /**
- * string content = 3;
- */
- public java.lang.String getContent() {
- java.lang.Object ref = content_;
- 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();
- content_ = s;
- return s;
- }
- }
-
- /**
- * string content = 3;
- */
- public com.google.protobuf.ByteString getContentBytes() {
- java.lang.Object ref = content_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- content_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int SENDER_FIELD_NUMBER = 4;
- private volatile java.lang.Object sender_;
-
- /**
- * string sender = 4;
- */
- public java.lang.String getSender() {
- java.lang.Object ref = sender_;
- 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();
- sender_ = s;
- return s;
- }
- }
-
- /**
- * string sender = 4;
- */
- public com.google.protobuf.ByteString getSenderBytes() {
- java.lang.Object ref = sender_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- sender_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int RECEIVER_FIELD_NUMBER = 5;
- private volatile java.lang.Object receiver_;
-
- /**
- * string receiver = 5;
- */
- public java.lang.String getReceiver() {
- java.lang.Object ref = receiver_;
- 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();
- receiver_ = s;
- return s;
- }
- }
-
- /**
- * string receiver = 5;
- */
- public com.google.protobuf.ByteString getReceiverBytes() {
- java.lang.Object ref = receiver_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- receiver_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int EXTRA_FIELD_NUMBER = 6;
- private volatile java.lang.Object extra_;
-
- /**
- * string extra = 6;
- */
- public java.lang.String getExtra() {
- java.lang.Object ref = extra_;
- 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();
- extra_ = s;
- return s;
- }
- }
-
- /**
- * string extra = 6;
- */
- public com.google.protobuf.ByteString getExtraBytes() {
- java.lang.Object ref = extra_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- extra_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int TITLE_FIELD_NUMBER = 7;
- private volatile java.lang.Object title_;
-
- /**
- * string title = 7;
- */
- public java.lang.String getTitle() {
- java.lang.Object ref = title_;
- 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();
- title_ = s;
- return s;
- }
- }
-
- /**
- * string title = 7;
- */
- public com.google.protobuf.ByteString getTitleBytes() {
- java.lang.Object ref = title_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- title_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int FORMAT_FIELD_NUMBER = 8;
- private volatile java.lang.Object format_;
-
- /**
- * string format = 8;
- */
- public java.lang.String getFormat() {
- java.lang.Object ref = format_;
- 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();
- format_ = s;
- return s;
- }
- }
-
- /**
- * string format = 8;
- */
- public com.google.protobuf.ByteString getFormatBytes() {
- java.lang.Object ref = format_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- format_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int TIMESTAMP_FIELD_NUMBER = 9;
- private long timestamp_;
-
- /**
- * int64 timestamp = 9;
- */
- public long getTimestamp() {
- return timestamp_;
- }
-
- private byte memoizedIsInitialized = -1;
-
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1)
- return true;
- if (isInitialized == 0)
- return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
- if (!getMidBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_);
- }
- if (!getActionBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_);
- }
- if (!getContentBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_);
- }
- if (!getSenderBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sender_);
- }
- if (!getReceiverBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 5, receiver_);
- }
- if (!getExtraBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 6, extra_);
- }
- if (!getTitleBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 7, title_);
- }
- if (!getFormatBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 8, format_);
- }
- if (timestamp_ != 0L) {
- output.writeInt64(9, timestamp_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1)
- return size;
-
- size = 0;
- if (!getMidBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_);
- }
- if (!getActionBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_);
- }
- if (!getContentBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_);
- }
- if (!getSenderBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sender_);
- }
- if (!getReceiverBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, receiver_);
- }
- if (!getExtraBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, extra_);
- }
- if (!getTitleBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, title_);
- }
- if (!getFormatBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, format_);
- }
- if (timestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, timestamp_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.farsunset.cim.sdk.android.model.proto.MessageProto.Model)) {
- return super.equals(obj);
- }
- com.farsunset.cim.sdk.android.model.proto.MessageProto.Model other = (com.farsunset.cim.sdk.android.model.proto.MessageProto.Model) obj;
-
- boolean result = true;
- result = result && getMid().equals(other.getMid());
- result = result && getAction().equals(other.getAction());
- result = result && getContent().equals(other.getContent());
- result = result && getSender().equals(other.getSender());
- result = result && getReceiver().equals(other.getReceiver());
- result = result && getExtra().equals(other.getExtra());
- result = result && getTitle().equals(other.getTitle());
- result = result && getFormat().equals(other.getFormat());
- result = result && (getTimestamp() == other.getTimestamp());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + MID_FIELD_NUMBER;
- hash = (53 * hash) + getMid().hashCode();
- hash = (37 * hash) + ACTION_FIELD_NUMBER;
- hash = (53 * hash) + getAction().hashCode();
- hash = (37 * hash) + CONTENT_FIELD_NUMBER;
- hash = (53 * hash) + getContent().hashCode();
- hash = (37 * hash) + SENDER_FIELD_NUMBER;
- hash = (53 * hash) + getSender().hashCode();
- hash = (37 * hash) + RECEIVER_FIELD_NUMBER;
- hash = (53 * hash) + getReceiver().hashCode();
- hash = (37 * hash) + EXTRA_FIELD_NUMBER;
- hash = (53 * hash) + getExtra().hashCode();
- hash = (37 * hash) + TITLE_FIELD_NUMBER;
- hash = (53 * hash) + getTitle().hashCode();
- hash = (37 * hash) + FORMAT_FIELD_NUMBER;
- hash = (53 * hash) + getFormat().hashCode();
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimestamp());
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
- com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
- com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseDelimitedFrom(
- java.io.InputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseDelimitedFrom(
- java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input,
- extensionRegistry);
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
- com.google.protobuf.CodedInputStream input) throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
- com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() {
- return newBuilder();
- }
-
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
-
- public static Builder newBuilder(com.farsunset.cim.sdk.android.model.proto.MessageProto.Model prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
-
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
-
- /**
- * Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
- */
- public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builderstring mid = 1;
- */
- public java.lang.String getMid() {
- java.lang.Object ref = mid_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- mid_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string mid = 1;
- */
- public com.google.protobuf.ByteString getMidBytes() {
- java.lang.Object ref = mid_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- mid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string mid = 1;
- */
- public Builder setMid(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- mid_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string mid = 1;
- */
- public Builder clearMid() {
-
- mid_ = getDefaultInstance().getMid();
- onChanged();
- return this;
- }
-
- /**
- * string mid = 1;
- */
- public Builder setMidBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- mid_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object action_ = "";
-
- /**
- * string action = 2;
- */
- public java.lang.String getAction() {
- java.lang.Object ref = action_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- action_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string action = 2;
- */
- public com.google.protobuf.ByteString getActionBytes() {
- java.lang.Object ref = action_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- action_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string action = 2;
- */
- public Builder setAction(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- action_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string action = 2;
- */
- public Builder clearAction() {
-
- action_ = getDefaultInstance().getAction();
- onChanged();
- return this;
- }
-
- /**
- * string action = 2;
- */
- public Builder setActionBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- action_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object content_ = "";
-
- /**
- * string content = 3;
- */
- public java.lang.String getContent() {
- java.lang.Object ref = content_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- content_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string content = 3;
- */
- public com.google.protobuf.ByteString getContentBytes() {
- java.lang.Object ref = content_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- content_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string content = 3;
- */
- public Builder setContent(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- content_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string content = 3;
- */
- public Builder clearContent() {
-
- content_ = getDefaultInstance().getContent();
- onChanged();
- return this;
- }
-
- /**
- * string content = 3;
- */
- public Builder setContentBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- content_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object sender_ = "";
-
- /**
- * string sender = 4;
- */
- public java.lang.String getSender() {
- java.lang.Object ref = sender_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- sender_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string sender = 4;
- */
- public com.google.protobuf.ByteString getSenderBytes() {
- java.lang.Object ref = sender_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- sender_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string sender = 4;
- */
- public Builder setSender(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- sender_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string sender = 4;
- */
- public Builder clearSender() {
-
- sender_ = getDefaultInstance().getSender();
- onChanged();
- return this;
- }
-
- /**
- * string sender = 4;
- */
- public Builder setSenderBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- sender_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object receiver_ = "";
-
- /**
- * string receiver = 5;
- */
- public java.lang.String getReceiver() {
- java.lang.Object ref = receiver_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- receiver_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string receiver = 5;
- */
- public com.google.protobuf.ByteString getReceiverBytes() {
- java.lang.Object ref = receiver_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- receiver_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string receiver = 5;
- */
- public Builder setReceiver(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- receiver_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string receiver = 5;
- */
- public Builder clearReceiver() {
-
- receiver_ = getDefaultInstance().getReceiver();
- onChanged();
- return this;
- }
-
- /**
- * string receiver = 5;
- */
- public Builder setReceiverBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- receiver_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object extra_ = "";
-
- /**
- * string extra = 6;
- */
- public java.lang.String getExtra() {
- java.lang.Object ref = extra_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- extra_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string extra = 6;
- */
- public com.google.protobuf.ByteString getExtraBytes() {
- java.lang.Object ref = extra_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- extra_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string extra = 6;
- */
- public Builder setExtra(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- extra_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string extra = 6;
- */
- public Builder clearExtra() {
-
- extra_ = getDefaultInstance().getExtra();
- onChanged();
- return this;
- }
-
- /**
- * string extra = 6;
- */
- public Builder setExtraBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- extra_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object title_ = "";
-
- /**
- * string title = 7;
- */
- public java.lang.String getTitle() {
- java.lang.Object ref = title_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- title_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string title = 7;
- */
- public com.google.protobuf.ByteString getTitleBytes() {
- java.lang.Object ref = title_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- title_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string title = 7;
- */
- public Builder setTitle(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- title_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string title = 7;
- */
- public Builder clearTitle() {
-
- title_ = getDefaultInstance().getTitle();
- onChanged();
- return this;
- }
-
- /**
- * string title = 7;
- */
- public Builder setTitleBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- title_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object format_ = "";
-
- /**
- * string format = 8;
- */
- public java.lang.String getFormat() {
- java.lang.Object ref = format_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- format_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string format = 8;
- */
- public com.google.protobuf.ByteString getFormatBytes() {
- java.lang.Object ref = format_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- format_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string format = 8;
- */
- public Builder setFormat(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- format_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string format = 8;
- */
- public Builder clearFormat() {
-
- format_ = getDefaultInstance().getFormat();
- onChanged();
- return this;
- }
-
- /**
- * string format = 8;
- */
- public Builder setFormatBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- format_ = value;
- onChanged();
- return this;
- }
-
- private long timestamp_;
-
- /**
- * int64 timestamp = 9;
- */
- public long getTimestamp() {
- return timestamp_;
- }
-
- /**
- * int64 timestamp = 9;
- */
- public Builder setTimestamp(long value) {
-
- timestamp_ = value;
- onChanged();
- return this;
- }
-
- /**
- * int64 timestamp = 9;
- */
- public Builder clearTimestamp() {
-
- timestamp_ = 0L;
- onChanged();
- return this;
- }
-
- public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:com.farsunset.cim.sdk.android.model.proto.Model)
- }
-
- // @@protoc_insertion_point(class_scope:com.farsunset.cim.sdk.android.model.proto.Model)
- private static final com.farsunset.cim.sdk.android.model.proto.MessageProto.Model DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.farsunset.cim.sdk.android.model.proto.MessageProto.Model();
- }
-
- public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parserstring mid = 1;
+ */
+ java.lang.String getMid();
+ /**
+ * string mid = 1;
+ */
+ com.google.protobuf.ByteString
+ getMidBytes();
+
+ /**
+ * string action = 2;
+ */
+ java.lang.String getAction();
+ /**
+ * string action = 2;
+ */
+ com.google.protobuf.ByteString
+ getActionBytes();
+
+ /**
+ * string content = 3;
+ */
+ java.lang.String getContent();
+ /**
+ * string content = 3;
+ */
+ com.google.protobuf.ByteString
+ getContentBytes();
+
+ /**
+ * string sender = 4;
+ */
+ java.lang.String getSender();
+ /**
+ * string sender = 4;
+ */
+ com.google.protobuf.ByteString
+ getSenderBytes();
+
+ /**
+ * string receiver = 5;
+ */
+ java.lang.String getReceiver();
+ /**
+ * string receiver = 5;
+ */
+ com.google.protobuf.ByteString
+ getReceiverBytes();
+
+ /**
+ * string extra = 6;
+ */
+ java.lang.String getExtra();
+ /**
+ * string extra = 6;
+ */
+ com.google.protobuf.ByteString
+ getExtraBytes();
+
+ /**
+ * string title = 7;
+ */
+ java.lang.String getTitle();
+ /**
+ * string title = 7;
+ */
+ com.google.protobuf.ByteString
+ getTitleBytes();
+
+ /**
+ * string format = 8;
+ */
+ java.lang.String getFormat();
+ /**
+ * string format = 8;
+ */
+ com.google.protobuf.ByteString
+ getFormatBytes();
+
+ /**
+ * int64 timestamp = 9;
+ */
+ long getTimestamp();
+ }
+ /**
+ * Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
+ */
+ public static final class Model extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.Model)
+ ModelOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Model.newBuilder() to construct.
+ private Model(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Model() {
+ mid_ = "";
+ action_ = "";
+ content_ = "";
+ sender_ = "";
+ receiver_ = "";
+ extra_ = "";
+ title_ = "";
+ format_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Model(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ 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;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ mid_ = s;
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ action_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ content_ = s;
+ break;
+ }
+ case 34: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ sender_ = s;
+ break;
+ }
+ case 42: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ receiver_ = s;
+ break;
+ }
+ case 50: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ extra_ = s;
+ break;
+ }
+ case 58: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ title_ = s;
+ break;
+ }
+ case 66: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ format_ = s;
+ break;
+ }
+ case 72: {
+
+ timestamp_ = input.readInt64();
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.farsunset.cim.sdk.android.model.proto.MessageProto.internal_static_com_farsunset_cim_sdk_android_model_proto_Model_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.farsunset.cim.sdk.android.model.proto.MessageProto.internal_static_com_farsunset_cim_sdk_android_model_proto_Model_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.farsunset.cim.sdk.android.model.proto.MessageProto.Model.class, com.farsunset.cim.sdk.android.model.proto.MessageProto.Model.Builder.class);
+ }
+
+ public static final int MID_FIELD_NUMBER = 1;
+ private volatile java.lang.Object mid_;
+ /**
+ * string mid = 1;
+ */
+ public java.lang.String getMid() {
+ java.lang.Object ref = mid_;
+ 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();
+ mid_ = s;
+ return s;
+ }
+ }
+ /**
+ * string mid = 1;
+ */
+ public com.google.protobuf.ByteString
+ getMidBytes() {
+ java.lang.Object ref = mid_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ mid_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ACTION_FIELD_NUMBER = 2;
+ private volatile java.lang.Object action_;
+ /**
+ * string action = 2;
+ */
+ public java.lang.String getAction() {
+ java.lang.Object ref = action_;
+ 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();
+ action_ = s;
+ return s;
+ }
+ }
+ /**
+ * string action = 2;
+ */
+ public com.google.protobuf.ByteString
+ getActionBytes() {
+ java.lang.Object ref = action_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ action_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CONTENT_FIELD_NUMBER = 3;
+ private volatile java.lang.Object content_;
+ /**
+ * string content = 3;
+ */
+ public java.lang.String getContent() {
+ java.lang.Object ref = content_;
+ 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();
+ content_ = s;
+ return s;
+ }
+ }
+ /**
+ * string content = 3;
+ */
+ public com.google.protobuf.ByteString
+ getContentBytes() {
+ java.lang.Object ref = content_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ content_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SENDER_FIELD_NUMBER = 4;
+ private volatile java.lang.Object sender_;
+ /**
+ * string sender = 4;
+ */
+ public java.lang.String getSender() {
+ java.lang.Object ref = sender_;
+ 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();
+ sender_ = s;
+ return s;
+ }
+ }
+ /**
+ * string sender = 4;
+ */
+ public com.google.protobuf.ByteString
+ getSenderBytes() {
+ java.lang.Object ref = sender_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ sender_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int RECEIVER_FIELD_NUMBER = 5;
+ private volatile java.lang.Object receiver_;
+ /**
+ * string receiver = 5;
+ */
+ public java.lang.String getReceiver() {
+ java.lang.Object ref = receiver_;
+ 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();
+ receiver_ = s;
+ return s;
+ }
+ }
+ /**
+ * string receiver = 5;
+ */
+ public com.google.protobuf.ByteString
+ getReceiverBytes() {
+ java.lang.Object ref = receiver_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ receiver_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int EXTRA_FIELD_NUMBER = 6;
+ private volatile java.lang.Object extra_;
+ /**
+ * string extra = 6;
+ */
+ public java.lang.String getExtra() {
+ java.lang.Object ref = extra_;
+ 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();
+ extra_ = s;
+ return s;
+ }
+ }
+ /**
+ * string extra = 6;
+ */
+ public com.google.protobuf.ByteString
+ getExtraBytes() {
+ java.lang.Object ref = extra_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ extra_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TITLE_FIELD_NUMBER = 7;
+ private volatile java.lang.Object title_;
+ /**
+ * string title = 7;
+ */
+ public java.lang.String getTitle() {
+ java.lang.Object ref = title_;
+ 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();
+ title_ = s;
+ return s;
+ }
+ }
+ /**
+ * string title = 7;
+ */
+ public com.google.protobuf.ByteString
+ getTitleBytes() {
+ java.lang.Object ref = title_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ title_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FORMAT_FIELD_NUMBER = 8;
+ private volatile java.lang.Object format_;
+ /**
+ * string format = 8;
+ */
+ public java.lang.String getFormat() {
+ java.lang.Object ref = format_;
+ 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();
+ format_ = s;
+ return s;
+ }
+ }
+ /**
+ * string format = 8;
+ */
+ public com.google.protobuf.ByteString
+ getFormatBytes() {
+ java.lang.Object ref = format_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ format_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 9;
+ private long timestamp_;
+ /**
+ * int64 timestamp = 9;
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getMidBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_);
+ }
+ if (!getActionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_);
+ }
+ if (!getContentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_);
+ }
+ if (!getSenderBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sender_);
+ }
+ if (!getReceiverBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, receiver_);
+ }
+ if (!getExtraBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, extra_);
+ }
+ if (!getTitleBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 7, title_);
+ }
+ if (!getFormatBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 8, format_);
+ }
+ if (timestamp_ != 0L) {
+ output.writeInt64(9, timestamp_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getMidBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_);
+ }
+ if (!getActionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_);
+ }
+ if (!getContentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_);
+ }
+ if (!getSenderBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sender_);
+ }
+ if (!getReceiverBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, receiver_);
+ }
+ if (!getExtraBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, extra_);
+ }
+ if (!getTitleBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, title_);
+ }
+ if (!getFormatBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, format_);
+ }
+ if (timestamp_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(9, timestamp_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.farsunset.cim.sdk.android.model.proto.MessageProto.Model)) {
+ return super.equals(obj);
+ }
+ com.farsunset.cim.sdk.android.model.proto.MessageProto.Model other = (com.farsunset.cim.sdk.android.model.proto.MessageProto.Model) obj;
+
+ if (!getMid()
+ .equals(other.getMid())) return false;
+ if (!getAction()
+ .equals(other.getAction())) return false;
+ if (!getContent()
+ .equals(other.getContent())) return false;
+ if (!getSender()
+ .equals(other.getSender())) return false;
+ if (!getReceiver()
+ .equals(other.getReceiver())) return false;
+ if (!getExtra()
+ .equals(other.getExtra())) return false;
+ if (!getTitle()
+ .equals(other.getTitle())) return false;
+ if (!getFormat()
+ .equals(other.getFormat())) return false;
+ if (getTimestamp()
+ != other.getTimestamp()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + MID_FIELD_NUMBER;
+ hash = (53 * hash) + getMid().hashCode();
+ hash = (37 * hash) + ACTION_FIELD_NUMBER;
+ hash = (53 * hash) + getAction().hashCode();
+ hash = (37 * hash) + CONTENT_FIELD_NUMBER;
+ hash = (53 * hash) + getContent().hashCode();
+ hash = (37 * hash) + SENDER_FIELD_NUMBER;
+ hash = (53 * hash) + getSender().hashCode();
+ hash = (37 * hash) + RECEIVER_FIELD_NUMBER;
+ hash = (53 * hash) + getReceiver().hashCode();
+ hash = (37 * hash) + EXTRA_FIELD_NUMBER;
+ hash = (53 * hash) + getExtra().hashCode();
+ hash = (37 * hash) + TITLE_FIELD_NUMBER;
+ hash = (53 * hash) + getTitle().hashCode();
+ hash = (37 * hash) + FORMAT_FIELD_NUMBER;
+ hash = (53 * hash) + getFormat().hashCode();
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getTimestamp());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.farsunset.cim.sdk.android.model.proto.MessageProto.Model prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builderstring mid = 1;
+ */
+ public java.lang.String getMid() {
+ java.lang.Object ref = mid_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mid_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string mid = 1;
+ */
+ public com.google.protobuf.ByteString
+ getMidBytes() {
+ java.lang.Object ref = mid_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ mid_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string mid = 1;
+ */
+ public Builder setMid(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ mid_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string mid = 1;
+ */
+ public Builder clearMid() {
+
+ mid_ = getDefaultInstance().getMid();
+ onChanged();
+ return this;
+ }
+ /**
+ * string mid = 1;
+ */
+ public Builder setMidBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ mid_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object action_ = "";
+ /**
+ * string action = 2;
+ */
+ public java.lang.String getAction() {
+ java.lang.Object ref = action_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ action_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string action = 2;
+ */
+ public com.google.protobuf.ByteString
+ getActionBytes() {
+ java.lang.Object ref = action_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ action_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string action = 2;
+ */
+ public Builder setAction(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ action_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string action = 2;
+ */
+ public Builder clearAction() {
+
+ action_ = getDefaultInstance().getAction();
+ onChanged();
+ return this;
+ }
+ /**
+ * string action = 2;
+ */
+ public Builder setActionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ action_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object content_ = "";
+ /**
+ * string content = 3;
+ */
+ public java.lang.String getContent() {
+ java.lang.Object ref = content_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ content_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string content = 3;
+ */
+ public com.google.protobuf.ByteString
+ getContentBytes() {
+ java.lang.Object ref = content_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ content_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string content = 3;
+ */
+ public Builder setContent(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ content_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string content = 3;
+ */
+ public Builder clearContent() {
+
+ content_ = getDefaultInstance().getContent();
+ onChanged();
+ return this;
+ }
+ /**
+ * string content = 3;
+ */
+ public Builder setContentBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ content_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object sender_ = "";
+ /**
+ * string sender = 4;
+ */
+ public java.lang.String getSender() {
+ java.lang.Object ref = sender_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sender_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string sender = 4;
+ */
+ public com.google.protobuf.ByteString
+ getSenderBytes() {
+ java.lang.Object ref = sender_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ sender_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string sender = 4;
+ */
+ public Builder setSender(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ sender_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string sender = 4;
+ */
+ public Builder clearSender() {
+
+ sender_ = getDefaultInstance().getSender();
+ onChanged();
+ return this;
+ }
+ /**
+ * string sender = 4;
+ */
+ public Builder setSenderBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ sender_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object receiver_ = "";
+ /**
+ * string receiver = 5;
+ */
+ public java.lang.String getReceiver() {
+ java.lang.Object ref = receiver_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ receiver_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string receiver = 5;
+ */
+ public com.google.protobuf.ByteString
+ getReceiverBytes() {
+ java.lang.Object ref = receiver_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ receiver_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string receiver = 5;
+ */
+ public Builder setReceiver(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ receiver_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string receiver = 5;
+ */
+ public Builder clearReceiver() {
+
+ receiver_ = getDefaultInstance().getReceiver();
+ onChanged();
+ return this;
+ }
+ /**
+ * string receiver = 5;
+ */
+ public Builder setReceiverBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ receiver_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object extra_ = "";
+ /**
+ * string extra = 6;
+ */
+ public java.lang.String getExtra() {
+ java.lang.Object ref = extra_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ extra_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string extra = 6;
+ */
+ public com.google.protobuf.ByteString
+ getExtraBytes() {
+ java.lang.Object ref = extra_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ extra_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string extra = 6;
+ */
+ public Builder setExtra(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ extra_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string extra = 6;
+ */
+ public Builder clearExtra() {
+
+ extra_ = getDefaultInstance().getExtra();
+ onChanged();
+ return this;
+ }
+ /**
+ * string extra = 6;
+ */
+ public Builder setExtraBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ extra_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object title_ = "";
+ /**
+ * string title = 7;
+ */
+ public java.lang.String getTitle() {
+ java.lang.Object ref = title_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ title_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string title = 7;
+ */
+ public com.google.protobuf.ByteString
+ getTitleBytes() {
+ java.lang.Object ref = title_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ title_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string title = 7;
+ */
+ public Builder setTitle(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ title_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string title = 7;
+ */
+ public Builder clearTitle() {
+
+ title_ = getDefaultInstance().getTitle();
+ onChanged();
+ return this;
+ }
+ /**
+ * string title = 7;
+ */
+ public Builder setTitleBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ title_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object format_ = "";
+ /**
+ * string format = 8;
+ */
+ public java.lang.String getFormat() {
+ java.lang.Object ref = format_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ format_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string format = 8;
+ */
+ public com.google.protobuf.ByteString
+ getFormatBytes() {
+ java.lang.Object ref = format_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ format_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string format = 8;
+ */
+ public Builder setFormat(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ format_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string format = 8;
+ */
+ public Builder clearFormat() {
+
+ format_ = getDefaultInstance().getFormat();
+ onChanged();
+ return this;
+ }
+ /**
+ * string format = 8;
+ */
+ public Builder setFormatBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ format_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_ ;
+ /**
+ * int64 timestamp = 9;
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * int64 timestamp = 9;
+ */
+ public Builder setTimestamp(long value) {
+
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 timestamp = 9;
+ */
+ public Builder clearTimestamp() {
+
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:com.farsunset.cim.sdk.android.model.proto.Model)
+ }
+
+ // @@protoc_insertion_point(class_scope:com.farsunset.cim.sdk.android.model.proto.Model)
+ private static final com.farsunset.cim.sdk.android.model.proto.MessageProto.Model DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.farsunset.cim.sdk.android.model.proto.MessageProto.Model();
+ }
+
+ public static com.farsunset.cim.sdk.android.model.proto.MessageProto.Model getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parserstring key = 1;
- */
- java.lang.String getKey();
-
- /**
- * string key = 1;
- */
- com.google.protobuf.ByteString getKeyBytes();
-
- /**
- * string code = 2;
- */
- java.lang.String getCode();
-
- /**
- * string code = 2;
- */
- com.google.protobuf.ByteString getCodeBytes();
-
- /**
- * string message = 3;
- */
- java.lang.String getMessage();
-
- /**
- * string message = 3;
- */
- com.google.protobuf.ByteString getMessageBytes();
-
- /**
- * int64 timestamp = 4;
- */
- long getTimestamp();
-
- /**
- * map<string, string> data = 5;
- */
- int getDataCount();
-
- /**
- * map<string, string> data = 5;
- */
- boolean containsData(java.lang.String key);
-
- /**
- * Use {@link #getDataMap()} instead.
- */
- @java.lang.Deprecated
- java.util.Mapmap<string, string> data = 5;
- */
- java.util.Mapmap<string, string> data = 5;
- */
-
- java.lang.String getDataOrDefault(java.lang.String key, java.lang.String defaultValue);
-
- /**
- * map<string, string> data = 5;
- */
-
- java.lang.String getDataOrThrow(java.lang.String key);
- }
-
- /**
- * Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
- */
- public static final class Model extends com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.Model)
- ModelOrBuilder {
- // Use Model.newBuilder() to construct.
- private Model(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Model() {
- key_ = "";
- code_ = "";
- message_ = "";
- timestamp_ = 0L;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
-
- private Model(com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- key_ = s;
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- code_ = s;
- break;
- }
- case 26: {
- java.lang.String s = input.readStringRequireUtf8();
-
- message_ = s;
- break;
- }
- case 32: {
-
- timestamp_ = input.readInt64();
- break;
- }
- case 42: {
- if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
- data_ = com.google.protobuf.MapField.newMapField(DataDefaultEntryHolder.defaultEntry);
- mutable_bitField0_ |= 0x00000010;
- }
- com.google.protobuf.MapEntrystring key = 1;
- */
- public java.lang.String getKey() {
- java.lang.Object ref = key_;
- 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();
- key_ = s;
- return s;
- }
- }
-
- /**
- * string key = 1;
- */
- public com.google.protobuf.ByteString getKeyBytes() {
- java.lang.Object ref = key_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- key_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int CODE_FIELD_NUMBER = 2;
- private volatile java.lang.Object code_;
-
- /**
- * string code = 2;
- */
- public java.lang.String getCode() {
- java.lang.Object ref = code_;
- 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();
- code_ = s;
- return s;
- }
- }
-
- /**
- * string code = 2;
- */
- public com.google.protobuf.ByteString getCodeBytes() {
- java.lang.Object ref = code_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- code_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int MESSAGE_FIELD_NUMBER = 3;
- private volatile java.lang.Object message_;
-
- /**
- * string message = 3;
- */
- public java.lang.String getMessage() {
- java.lang.Object ref = message_;
- 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();
- message_ = s;
- return s;
- }
- }
-
- /**
- * string message = 3;
- */
- public com.google.protobuf.ByteString getMessageBytes() {
- java.lang.Object ref = message_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- message_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int TIMESTAMP_FIELD_NUMBER = 4;
- private long timestamp_;
-
- /**
- * int64 timestamp = 4;
- */
- public long getTimestamp() {
- return timestamp_;
- }
-
- public static final int DATA_FIELD_NUMBER = 5;
-
- private static final class DataDefaultEntryHolder {
- static final com.google.protobuf.MapEntrymap<string, string> data = 5;
- */
-
- public boolean containsData(java.lang.String key) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- return internalGetData().getMap().containsKey(key);
- }
-
- /**
- * Use {@link #getDataMap()} instead.
- */
- @java.lang.Deprecated
- public java.util.Mapmap<string, string> data = 5;
- */
-
- public java.util.Mapmap<string, string> data = 5;
- */
-
- public java.lang.String getDataOrDefault(java.lang.String key, java.lang.String defaultValue) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- java.util.Mapmap<string, string> data = 5;
- */
-
- public java.lang.String getDataOrThrow(java.lang.String key) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- java.util.Mapstring key = 1;
- */
- public java.lang.String getKey() {
- java.lang.Object ref = key_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- key_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string key = 1;
- */
- public com.google.protobuf.ByteString getKeyBytes() {
- java.lang.Object ref = key_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- key_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string key = 1;
- */
- public Builder setKey(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- key_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string key = 1;
- */
- public Builder clearKey() {
-
- key_ = getDefaultInstance().getKey();
- onChanged();
- return this;
- }
-
- /**
- * string key = 1;
- */
- public Builder setKeyBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- key_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object code_ = "";
-
- /**
- * string code = 2;
- */
- public java.lang.String getCode() {
- java.lang.Object ref = code_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- code_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string code = 2;
- */
- public com.google.protobuf.ByteString getCodeBytes() {
- java.lang.Object ref = code_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- code_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string code = 2;
- */
- public Builder setCode(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- code_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string code = 2;
- */
- public Builder clearCode() {
-
- code_ = getDefaultInstance().getCode();
- onChanged();
- return this;
- }
-
- /**
- * string code = 2;
- */
- public Builder setCodeBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- code_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object message_ = "";
-
- /**
- * string message = 3;
- */
- public java.lang.String getMessage() {
- java.lang.Object ref = message_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- message_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string message = 3;
- */
- public com.google.protobuf.ByteString getMessageBytes() {
- java.lang.Object ref = message_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- message_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string message = 3;
- */
- public Builder setMessage(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- message_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string message = 3;
- */
- public Builder clearMessage() {
-
- message_ = getDefaultInstance().getMessage();
- onChanged();
- return this;
- }
-
- /**
- * string message = 3;
- */
- public Builder setMessageBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- message_ = value;
- onChanged();
- return this;
- }
-
- private long timestamp_;
-
- /**
- * int64 timestamp = 4;
- */
- public long getTimestamp() {
- return timestamp_;
- }
-
- /**
- * int64 timestamp = 4;
- */
- public Builder setTimestamp(long value) {
-
- timestamp_ = value;
- onChanged();
- return this;
- }
-
- /**
- * int64 timestamp = 4;
- */
- public Builder clearTimestamp() {
-
- timestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.MapFieldmap<string, string> data = 5;
- */
-
- public boolean containsData(java.lang.String key) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- return internalGetData().getMap().containsKey(key);
- }
-
- /**
- * Use {@link #getDataMap()} instead.
- */
- @java.lang.Deprecated
- public java.util.Mapmap<string, string> data = 5;
- */
-
- public java.util.Mapmap<string, string> data = 5;
- */
-
- public java.lang.String getDataOrDefault(java.lang.String key, java.lang.String defaultValue) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- java.util.Mapmap<string, string> data = 5;
- */
-
- public java.lang.String getDataOrThrow(java.lang.String key) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- java.util.Mapmap<string, string> data = 5;
- */
-
- public Builder removeData(java.lang.String key) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- internalGetMutableData().getMutableMap().remove(key);
- return this;
- }
-
- /**
- * Use alternate mutation accessors instead.
- */
- @java.lang.Deprecated
- public java.util.Mapmap<string, string> data = 5;
- */
- public Builder putData(java.lang.String key, java.lang.String value) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- if (value == null) {
- throw new java.lang.NullPointerException();
- }
- internalGetMutableData().getMutableMap().put(key, value);
- return this;
- }
-
- /**
- * map<string, string> data = 5;
- */
-
- public Builder putAllData(java.util.Mapstring key = 1;
+ */
+ java.lang.String getKey();
+ /**
+ * string key = 1;
+ */
+ com.google.protobuf.ByteString
+ getKeyBytes();
+
+ /**
+ * string code = 2;
+ */
+ java.lang.String getCode();
+ /**
+ * string code = 2;
+ */
+ com.google.protobuf.ByteString
+ getCodeBytes();
+
+ /**
+ * string message = 3;
+ */
+ java.lang.String getMessage();
+ /**
+ * string message = 3;
+ */
+ com.google.protobuf.ByteString
+ getMessageBytes();
+
+ /**
+ * int64 timestamp = 4;
+ */
+ long getTimestamp();
+
+ /**
+ * map<string, string> data = 5;
+ */
+ int getDataCount();
+ /**
+ * map<string, string> data = 5;
+ */
+ boolean containsData(
+ java.lang.String key);
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Deprecated
+ java.util.Mapmap<string, string> data = 5;
+ */
+ java.util.Mapmap<string, string> data = 5;
+ */
+
+ java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue);
+ /**
+ * map<string, string> data = 5;
+ */
+
+ java.lang.String getDataOrThrow(
+ java.lang.String key);
+ }
+ /**
+ * Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
+ */
+ public static final class Model extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.Model)
+ ModelOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Model.newBuilder() to construct.
+ private Model(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Model() {
+ key_ = "";
+ code_ = "";
+ message_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Model(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ 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;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ key_ = s;
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ code_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ message_ = s;
+ break;
+ }
+ case 32: {
+
+ timestamp_ = input.readInt64();
+ break;
+ }
+ case 42: {
+ if (!((mutable_bitField0_ & 0x00000010) != 0)) {
+ data_ = com.google.protobuf.MapField.newMapField(
+ DataDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000010;
+ }
+ com.google.protobuf.MapEntrystring key = 1;
+ */
+ public java.lang.String getKey() {
+ java.lang.Object ref = key_;
+ 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();
+ key_ = s;
+ return s;
+ }
+ }
+ /**
+ * string key = 1;
+ */
+ public com.google.protobuf.ByteString
+ getKeyBytes() {
+ java.lang.Object ref = key_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ key_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CODE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object code_;
+ /**
+ * string code = 2;
+ */
+ public java.lang.String getCode() {
+ java.lang.Object ref = code_;
+ 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();
+ code_ = s;
+ return s;
+ }
+ }
+ /**
+ * string code = 2;
+ */
+ public com.google.protobuf.ByteString
+ getCodeBytes() {
+ java.lang.Object ref = code_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ code_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int MESSAGE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object message_;
+ /**
+ * string message = 3;
+ */
+ public java.lang.String getMessage() {
+ java.lang.Object ref = message_;
+ 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();
+ message_ = s;
+ return s;
+ }
+ }
+ /**
+ * string message = 3;
+ */
+ public com.google.protobuf.ByteString
+ getMessageBytes() {
+ java.lang.Object ref = message_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ message_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 4;
+ private long timestamp_;
+ /**
+ * int64 timestamp = 4;
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ public static final int DATA_FIELD_NUMBER = 5;
+ private static final class DataDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, java.lang.String> defaultEntry =
+ com.google.protobuf.MapEntry
+ .map<string, string> data = 5;
+ */
+
+ public boolean containsData(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetData().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 5;
+ */
+
+ public java.util.Mapmap<string, string> data = 5;
+ */
+
+ public java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Mapmap<string, string> data = 5;
+ */
+
+ public java.lang.String getDataOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Mapstring key = 1;
+ */
+ public java.lang.String getKey() {
+ java.lang.Object ref = key_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ key_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string key = 1;
+ */
+ public com.google.protobuf.ByteString
+ getKeyBytes() {
+ java.lang.Object ref = key_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ key_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string key = 1;
+ */
+ public Builder setKey(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ key_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string key = 1;
+ */
+ public Builder clearKey() {
+
+ key_ = getDefaultInstance().getKey();
+ onChanged();
+ return this;
+ }
+ /**
+ * string key = 1;
+ */
+ public Builder setKeyBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ key_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object code_ = "";
+ /**
+ * string code = 2;
+ */
+ public java.lang.String getCode() {
+ java.lang.Object ref = code_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ code_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string code = 2;
+ */
+ public com.google.protobuf.ByteString
+ getCodeBytes() {
+ java.lang.Object ref = code_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ code_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string code = 2;
+ */
+ public Builder setCode(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ code_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string code = 2;
+ */
+ public Builder clearCode() {
+
+ code_ = getDefaultInstance().getCode();
+ onChanged();
+ return this;
+ }
+ /**
+ * string code = 2;
+ */
+ public Builder setCodeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ code_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object message_ = "";
+ /**
+ * string message = 3;
+ */
+ public java.lang.String getMessage() {
+ java.lang.Object ref = message_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ message_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string message = 3;
+ */
+ public com.google.protobuf.ByteString
+ getMessageBytes() {
+ java.lang.Object ref = message_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ message_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string message = 3;
+ */
+ public Builder setMessage(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ message_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string message = 3;
+ */
+ public Builder clearMessage() {
+
+ message_ = getDefaultInstance().getMessage();
+ onChanged();
+ return this;
+ }
+ /**
+ * string message = 3;
+ */
+ public Builder setMessageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ message_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_ ;
+ /**
+ * int64 timestamp = 4;
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * int64 timestamp = 4;
+ */
+ public Builder setTimestamp(long value) {
+
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 timestamp = 4;
+ */
+ public Builder clearTimestamp() {
+
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, java.lang.String> data_;
+ private com.google.protobuf.MapFieldmap<string, string> data = 5;
+ */
+
+ public boolean containsData(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetData().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 5;
+ */
+
+ public java.util.Mapmap<string, string> data = 5;
+ */
+
+ public java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Mapmap<string, string> data = 5;
+ */
+
+ public java.lang.String getDataOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Mapmap<string, string> data = 5;
+ */
+
+ public Builder removeData(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ internalGetMutableData().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 5;
+ */
+ public Builder putData(
+ java.lang.String key,
+ java.lang.String value) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ if (value == null) { throw new java.lang.NullPointerException(); }
+ internalGetMutableData().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * map<string, string> data = 5;
+ */
+
+ public Builder putAllData(
+ java.util.Mapstring key = 1;
- */
- java.lang.String getKey();
-
- /**
- * string key = 1;
- */
- com.google.protobuf.ByteString getKeyBytes();
-
- /**
- * int64 timestamp = 2;
- */
- long getTimestamp();
-
- /**
- * map<string, string> data = 3;
- */
- int getDataCount();
-
- /**
- * map<string, string> data = 3;
- */
- boolean containsData(java.lang.String key);
-
- /**
- * Use {@link #getDataMap()} instead.
- */
- @java.lang.Deprecated
- java.util.Mapmap<string, string> data = 3;
- */
- java.util.Mapmap<string, string> data = 3;
- */
-
- java.lang.String getDataOrDefault(java.lang.String key, java.lang.String defaultValue);
-
- /**
- * map<string, string> data = 3;
- */
-
- java.lang.String getDataOrThrow(java.lang.String key);
- }
-
- /**
- * Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
- */
- public static final class Model extends com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.Model)
- ModelOrBuilder {
- // Use Model.newBuilder() to construct.
- private Model(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
-
- private Model() {
- key_ = "";
- timestamp_ = 0L;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
-
- private Model(com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- java.lang.String s = input.readStringRequireUtf8();
-
- key_ = s;
- break;
- }
- case 16: {
-
- timestamp_ = input.readInt64();
- break;
- }
- case 26: {
- if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
- data_ = com.google.protobuf.MapField.newMapField(DataDefaultEntryHolder.defaultEntry);
- mutable_bitField0_ |= 0x00000004;
- }
- com.google.protobuf.MapEntrystring key = 1;
- */
- public java.lang.String getKey() {
- java.lang.Object ref = key_;
- 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();
- key_ = s;
- return s;
- }
- }
-
- /**
- * string key = 1;
- */
- public com.google.protobuf.ByteString getKeyBytes() {
- java.lang.Object ref = key_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- key_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int TIMESTAMP_FIELD_NUMBER = 2;
- private long timestamp_;
-
- /**
- * int64 timestamp = 2;
- */
- public long getTimestamp() {
- return timestamp_;
- }
-
- public static final int DATA_FIELD_NUMBER = 3;
-
- private static final class DataDefaultEntryHolder {
- static final com.google.protobuf.MapEntrymap<string, string> data = 3;
- */
-
- public boolean containsData(java.lang.String key) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- return internalGetData().getMap().containsKey(key);
- }
-
- /**
- * Use {@link #getDataMap()} instead.
- */
- @java.lang.Deprecated
- public java.util.Mapmap<string, string> data = 3;
- */
-
- public java.util.Mapmap<string, string> data = 3;
- */
-
- public java.lang.String getDataOrDefault(java.lang.String key, java.lang.String defaultValue) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- java.util.Mapmap<string, string> data = 3;
- */
-
- public java.lang.String getDataOrThrow(java.lang.String key) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- java.util.Mapstring key = 1;
- */
- public java.lang.String getKey() {
- java.lang.Object ref = key_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- key_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
-
- /**
- * string key = 1;
- */
- public com.google.protobuf.ByteString getKeyBytes() {
- java.lang.Object ref = key_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b = com.google.protobuf.ByteString
- .copyFromUtf8((java.lang.String) ref);
- key_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- /**
- * string key = 1;
- */
- public Builder setKey(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- key_ = value;
- onChanged();
- return this;
- }
-
- /**
- * string key = 1;
- */
- public Builder clearKey() {
-
- key_ = getDefaultInstance().getKey();
- onChanged();
- return this;
- }
-
- /**
- * string key = 1;
- */
- public Builder setKeyBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- key_ = value;
- onChanged();
- return this;
- }
-
- private long timestamp_;
-
- /**
- * int64 timestamp = 2;
- */
- public long getTimestamp() {
- return timestamp_;
- }
-
- /**
- * int64 timestamp = 2;
- */
- public Builder setTimestamp(long value) {
-
- timestamp_ = value;
- onChanged();
- return this;
- }
-
- /**
- * int64 timestamp = 2;
- */
- public Builder clearTimestamp() {
-
- timestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.MapFieldmap<string, string> data = 3;
- */
-
- public boolean containsData(java.lang.String key) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- return internalGetData().getMap().containsKey(key);
- }
-
- /**
- * Use {@link #getDataMap()} instead.
- */
- @java.lang.Deprecated
- public java.util.Mapmap<string, string> data = 3;
- */
-
- public java.util.Mapmap<string, string> data = 3;
- */
-
- public java.lang.String getDataOrDefault(java.lang.String key, java.lang.String defaultValue) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- java.util.Mapmap<string, string> data = 3;
- */
-
- public java.lang.String getDataOrThrow(java.lang.String key) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- java.util.Mapmap<string, string> data = 3;
- */
-
- public Builder removeData(java.lang.String key) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- internalGetMutableData().getMutableMap().remove(key);
- return this;
- }
-
- /**
- * Use alternate mutation accessors instead.
- */
- @java.lang.Deprecated
- public java.util.Mapmap<string, string> data = 3;
- */
- public Builder putData(java.lang.String key, java.lang.String value) {
- if (key == null) {
- throw new java.lang.NullPointerException();
- }
- if (value == null) {
- throw new java.lang.NullPointerException();
- }
- internalGetMutableData().getMutableMap().put(key, value);
- return this;
- }
-
- /**
- * map<string, string> data = 3;
- */
-
- public Builder putAllData(java.util.Mapstring key = 1;
+ */
+ java.lang.String getKey();
+ /**
+ * string key = 1;
+ */
+ com.google.protobuf.ByteString
+ getKeyBytes();
+
+ /**
+ * int64 timestamp = 2;
+ */
+ long getTimestamp();
+
+ /**
+ * map<string, string> data = 3;
+ */
+ int getDataCount();
+ /**
+ * map<string, string> data = 3;
+ */
+ boolean containsData(
+ java.lang.String key);
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Deprecated
+ java.util.Mapmap<string, string> data = 3;
+ */
+ java.util.Mapmap<string, string> data = 3;
+ */
+
+ java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue);
+ /**
+ * map<string, string> data = 3;
+ */
+
+ java.lang.String getDataOrThrow(
+ java.lang.String key);
+ }
+ /**
+ * Protobuf type {@code com.farsunset.cim.sdk.android.model.proto.Model}
+ */
+ public static final class Model extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:com.farsunset.cim.sdk.android.model.proto.Model)
+ ModelOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Model.newBuilder() to construct.
+ private Model(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Model() {
+ key_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Model(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ 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;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ key_ = s;
+ break;
+ }
+ case 16: {
+
+ timestamp_ = input.readInt64();
+ break;
+ }
+ case 26: {
+ if (!((mutable_bitField0_ & 0x00000004) != 0)) {
+ data_ = com.google.protobuf.MapField.newMapField(
+ DataDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000004;
+ }
+ com.google.protobuf.MapEntrystring key = 1;
+ */
+ public java.lang.String getKey() {
+ java.lang.Object ref = key_;
+ 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();
+ key_ = s;
+ return s;
+ }
+ }
+ /**
+ * string key = 1;
+ */
+ public com.google.protobuf.ByteString
+ getKeyBytes() {
+ java.lang.Object ref = key_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ key_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 2;
+ private long timestamp_;
+ /**
+ * int64 timestamp = 2;
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ public static final int DATA_FIELD_NUMBER = 3;
+ private static final class DataDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, java.lang.String> defaultEntry =
+ com.google.protobuf.MapEntry
+ .map<string, string> data = 3;
+ */
+
+ public boolean containsData(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetData().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 3;
+ */
+
+ public java.util.Mapmap<string, string> data = 3;
+ */
+
+ public java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Mapmap<string, string> data = 3;
+ */
+
+ public java.lang.String getDataOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Mapstring key = 1;
+ */
+ public java.lang.String getKey() {
+ java.lang.Object ref = key_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ key_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string key = 1;
+ */
+ public com.google.protobuf.ByteString
+ getKeyBytes() {
+ java.lang.Object ref = key_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ key_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string key = 1;
+ */
+ public Builder setKey(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ key_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string key = 1;
+ */
+ public Builder clearKey() {
+
+ key_ = getDefaultInstance().getKey();
+ onChanged();
+ return this;
+ }
+ /**
+ * string key = 1;
+ */
+ public Builder setKeyBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ key_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_ ;
+ /**
+ * int64 timestamp = 2;
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * int64 timestamp = 2;
+ */
+ public Builder setTimestamp(long value) {
+
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 timestamp = 2;
+ */
+ public Builder clearTimestamp() {
+
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, java.lang.String> data_;
+ private com.google.protobuf.MapFieldmap<string, string> data = 3;
+ */
+
+ public boolean containsData(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetData().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getDataMap()} instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 3;
+ */
+
+ public java.util.Mapmap<string, string> data = 3;
+ */
+
+ public java.lang.String getDataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Mapmap<string, string> data = 3;
+ */
+
+ public java.lang.String getDataOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Mapmap<string, string> data = 3;
+ */
+
+ public Builder removeData(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ internalGetMutableData().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Mapmap<string, string> data = 3;
+ */
+ public Builder putData(
+ java.lang.String key,
+ java.lang.String value) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ if (value == null) { throw new java.lang.NullPointerException(); }
+ internalGetMutableData().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * map<string, string> data = 3;
+ */
+
+ public Builder putAllData(
+ java.util.Map* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * http://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - *************************************************************************************** - * * - * Website : http://www.farsunset.com * - * * - *************************************************************************************** + *
+ * **************************************************************************************
+ * *
+ * Website : http://www.farsunset.com *
+ * *
+ * **************************************************************************************
*/
package com.farsunset.ichat.example.adapter;
-import java.util.Comparator;
-
import com.farsunset.cim.sdk.android.model.Message;
-public class MessageTimeDescComparator implements Comparator
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- ***************************************************************************************
- * *
- * Website : http://www.farsunset.com *
- * *
- ***************************************************************************************
+ *
+ * **************************************************************************************
+ * *
+ * Website : http://www.farsunset.com *
+ * *
+ * **************************************************************************************
*/
package com.farsunset.ichat.example.adapter;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
import android.annotation.SuppressLint;
import android.view.LayoutInflater;
import android.view.View;
@@ -31,73 +28,78 @@ import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
+
import com.farsunset.cim.sdk.android.model.Message;
import com.farsunset.ichat.example.R;
import com.farsunset.ichat.example.ui.SystemMessageActivity;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
public class SystemMsgListViewAdapter extends BaseAdapter {
- protected List
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- ***************************************************************************************
- * *
- * Website : http://www.farsunset.com *
- * *
- ***************************************************************************************
+ *
+ * **************************************************************************************
+ * *
+ * Website : http://www.farsunset.com *
+ * *
+ * **************************************************************************************
*/
package com.farsunset.ichat.example.app;
+import android.app.Activity;
+import android.net.NetworkInfo;
+import android.os.Bundle;
+
import com.farsunset.cim.sdk.android.CIMEventListener;
import com.farsunset.cim.sdk.android.CIMListenerManager;
import com.farsunset.cim.sdk.android.model.Message;
import com.farsunset.cim.sdk.android.model.ReplyBody;
import com.farsunset.cim.sdk.android.model.SentBody;
-import android.app.Activity;
-import android.net.NetworkInfo;
-import android.os.Bundle;
+public abstract class CIMMonitorActivity extends Activity implements CIMEventListener {
-public abstract class CIMMonitorActivity extends Activity implements CIMEventListener{
-
-
- CommonBaseControl commonBaseControl;
- public void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- CIMListenerManager.registerMessageListener(this);
-
- commonBaseControl = new CommonBaseControl(this);
-
-
- }
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ CIMListenerManager.registerMessageListener(this);
+ }
- @Override
- public void finish() {
- super.finish();
- CIMListenerManager.removeMessageListener(this);
-
- }
-
- @Override
- public void onRestart() {
- super.onRestart();
- CIMListenerManager.registerMessageListener(this);
- }
-
-
- public void showProgressDialog(String title,String content)
- {
- commonBaseControl.showProgressDialog(title, content);
- }
-
- public void hideProgressDialog()
- {
- commonBaseControl.hideProgressDialog();
- }
-
- public void showToask(String hint){
-
- commonBaseControl.showToask(hint);
- }
-
-
-
+ @Override
+ public void finish() {
+ super.finish();
+ CIMListenerManager.removeMessageListener(this);
- @Override
- public void onMessageReceived(Message arg0){};
-
- @Override
- public void onNetworkChanged(NetworkInfo info){}
+ }
- /**
+ @Override
+ public void onRestart() {
+ super.onRestart();
+ CIMListenerManager.registerMessageListener(this);
+ }
+
+ @Override
+ public void onMessageReceived(Message arg0) {
+ }
+
+ @Override
+ public void onNetworkChanged(NetworkInfo info) {
+ }
+
+ /**
* 与服务端断开连接时回调,不要在里面做连接服务端的操作
*/
- @Override
- public void onConnectionClosed() {}
+ @Override
+ public void onConnectionClosed() {
+ }
- @Override
- public void onConnectionFailed() {
+ @Override
+ public void onConnectionFailed() {
- }
+ }
- @Override
- public int getEventDispatchOrder() {
- return 0;
- }
+ @Override
+ public int getEventDispatchOrder() {
+ return 0;
+ }
- /**
- * 连接服务端成功时回调
- */
-
- @Override
- public void onConnectionSuccessed(boolean arg0) {}
+ /**
+ * 连接服务端成功时回调
+ */
-
- @Override
- public void onReplyReceived(ReplyBody arg0) {}
+ @Override
+ public void onConnectionSuccessed(boolean arg0) {
+ }
- @Override
- public void onSentSuccessed(SentBody sentBody) {
- }
+ @Override
+ public void onReplyReceived(ReplyBody arg0) {
+ }
+
+ @Override
+ public void onSentSuccessed(SentBody sentBody) {
+
+ }
}
diff --git a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/app/CommonBaseControl.java b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/app/CommonBaseControl.java
deleted file mode 100644
index 49bd017..0000000
--- a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/app/CommonBaseControl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright 2013-2023 Xia Jun(3979434@qq.com).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- ***************************************************************************************
- * *
- * Website : http://www.farsunset.com *
- * *
- ***************************************************************************************
- */
-package com.farsunset.ichat.example.app;
-
-
-
-import android.app.ProgressDialog;
-import android.content.Context;
-import android.widget.Toast;
-
-
-public class CommonBaseControl {
-
- private ProgressDialog progressDialog;
-
- Context mMontent;
-
-
- public CommonBaseControl(Context content)
- {
- this.mMontent = content;
- }
-
-
-
- public void showProgressDialog(String title,String message)
- {
- if(progressDialog==null)
- {
-
- progressDialog = ProgressDialog.show(mMontent, title, message, true, true);
- }else if(progressDialog.isShowing())
- {
- progressDialog.setTitle(title);
- progressDialog.setMessage(message);
- }
-
- progressDialog.show();
-
- }
-
- public void hideProgressDialog()
- {
-
- if(progressDialog!=null&&progressDialog.isShowing())
- {
- progressDialog.dismiss();
- }
-
- }
-
- public void showToask(String hint){
-
- Toast toast=Toast.makeText(mMontent,hint,Toast.LENGTH_SHORT);
- toast.show();
- }
-
-
-}
diff --git a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/app/Constant.java b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/app/Constant.java
index 8cf51cf..4e2a88b 100644
--- a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/app/Constant.java
+++ b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/app/Constant.java
@@ -1,53 +1,36 @@
/**
- * Copyright 2013-2023 Xia Jun(3979434@qq.com).
- *
+ * Copyright 2013-2019 Xia Jun(3979434@qq.com).
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- ***************************************************************************************
- * *
- * Website : http://www.farsunset.com *
- * *
- ***************************************************************************************
+ *
+ * **************************************************************************************
+ * *
+ * Website : http://www.farsunset.com *
+ * *
+ * **************************************************************************************
*/
package com.farsunset.ichat.example.app;
-
-public interface Constant {
-
- //服务端IP地址
- public static final String CIM_SERVER_HOST = "192.168.1.106";
-
- //注意,这里的端口不是tomcat的端口,CIM端口在服务端spring-cim.xml中配置的,没改动就使用默认的23456
- public static final int CIM_SERVER_PORT = 23456;
+public interface Constant {
- public static interface MessageType{
-
-
- //用户之间的普通消息
- public static final String TYPE_0 = "0";
-
-
- //下线类型
- String TYPE_999 = "999";
- }
-
-
- public static interface MessageStatus{
-
- //消息未读
- public static final String STATUS_0 = "0";
- //消息已经读取
- public static final String STATUS_1 = "1";
- }
-
+ //服务端IP地址
+ String CIM_SERVER_HOST = "192.168.50.80";
+
+ //注意,这里的端口不是tomcat的端口,没改动就使用默认的23456
+ int CIM_SERVER_PORT = 23456;
+
+ interface MessageAction {
+ //下线类型
+ String ACTION_999 = "999";
+ }
}
diff --git a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/receiver/CIMPushManagerReceiver.java b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/receiver/CIMPushManagerReceiver.java
index b1832b6..1606db6 100644
--- a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/receiver/CIMPushManagerReceiver.java
+++ b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/receiver/CIMPushManagerReceiver.java
@@ -1,28 +1,29 @@
/**
- * Copyright 2013-2023 Xia Jun(3979434@qq.com).
- *
+ * Copyright 2013-2019 Xia Jun(3979434@qq.com).
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- ***************************************************************************************
- * *
- * Website : http://www.farsunset.com *
- * *
- ***************************************************************************************
+ *
+ * **************************************************************************************
+ * *
+ * Website : http://www.farsunset.com *
+ * *
+ * **************************************************************************************
*/
package com.farsunset.ichat.example.receiver;
import android.app.Notification;
+import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
@@ -37,90 +38,90 @@ import com.farsunset.cim.sdk.android.model.ReplyBody;
import com.farsunset.ichat.example.R;
import com.farsunset.ichat.example.ui.SystemMessageActivity;
-import static android.R.id.message;
-import static com.farsunset.ichat.example.R.id.content;
-
/**
* 消息入口,所有消息都会经过这里
* @author 3979434
*
*/
public final class CIMPushManagerReceiver extends CIMEventBroadcastReceiver {
-
- private NotificationManager notificationManager;
- //当收到消息时,会执行onMessageReceived,这里是消息第一入口
- @Override
- public void onMessageReceived(Message message, Intent intent) {
+ //当收到消息时,会执行onMessageReceived,这里是消息第一入口
+
+ @Override
+ public void onMessageReceived(Message message, Intent intent) {
//调用分发消息监听
- CIMListenerManager.notifyOnMessageReceived(message);
-
- //以开头的为动作消息,无须显示,如被强行下线消息Constant.TYPE_999
- if(message.getAction().startsWith("9"))
- {
- return ;
- }
-
- showNotify(context,message);
- }
+ CIMListenerManager.notifyOnMessageReceived(message);
+
+ //以开头的为动作消息,无须显示,如被强行下线消息Constant.ACTION_999
+ if (message.getAction().startsWith("9")) {
+ return;
+ }
+
+ showNotify(context, message);
+ }
-
- private void showNotify(Context context , Message msg)
- {
-
- this.notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
- String title = "系统消息";
+ private void showNotify(Context context, Message msg) {
- PendingIntent contentIntent = PendingIntent.getActivity(context,1, new Intent(context,SystemMessageActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
- final NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
- builder.setAutoCancel(true);
- builder.setDefaults(Notification.DEFAULT_ALL);
- builder.setWhen(msg.getTimestamp());
- builder.setSmallIcon(R.drawable.icon);
- builder.setTicker(title);
- builder.setContentTitle(title);
- builder.setContentText(msg.getContent());
- builder.setDefaults(Notification.DEFAULT_LIGHTS);
- builder.setContentIntent(contentIntent);
- final Notification notification = builder.build();
+ NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
+
+ String channelId = null;
+ if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
+ channelId = "system";
+ NotificationChannel channel = new NotificationChannel(channelId, "message", NotificationManager.IMPORTANCE_DEFAULT);
+ channel.enableLights(true); //是否在桌面icon右上角展示小红点
+ notificationManager.createNotificationChannel(channel);
+ }
+
+ String title = "系统消息";
+ PendingIntent contentIntent = PendingIntent.getActivity(context, 1, new Intent(context, SystemMessageActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
+ final NotificationCompat.Builder builder = new NotificationCompat.Builder(context, channelId);
+ builder.setAutoCancel(true);
+ builder.setDefaults(Notification.DEFAULT_ALL);
+ builder.setWhen(msg.getTimestamp());
+ builder.setSmallIcon(R.drawable.icon);
+ builder.setTicker(title);
+ builder.setContentTitle(title);
+ builder.setContentText(msg.getContent());
+ builder.setDefaults(Notification.DEFAULT_LIGHTS);
+ builder.setContentIntent(contentIntent);
+ final Notification notification = builder.build();
- notificationManager.notify(R.drawable.icon, notification);
+ notificationManager.notify(R.drawable.icon, notification);
- }
+ }
- @Override
- public void onNetworkChanged(NetworkInfo info) {
- CIMListenerManager.notifyOnNetworkChanged(info);
- }
+ @Override
+ public void onNetworkChanged(NetworkInfo info) {
+ CIMListenerManager.notifyOnNetworkChanged(info);
+ }
- @Override
- public void onConnectionSuccessed(boolean hasAutoBind) {
- CIMListenerManager.notifyOnConnectionSuccessed(hasAutoBind);
- }
+ @Override
+ public void onConnectionSuccessed(boolean hasAutoBind) {
+ CIMListenerManager.notifyOnConnectionSuccessed(hasAutoBind);
+ }
- @Override
- public void onConnectionClosed() {
- CIMListenerManager.notifyOnConnectionClosed();
- }
+ @Override
+ public void onConnectionClosed() {
+ CIMListenerManager.notifyOnConnectionClosed();
+ }
- @Override
- public void onReplyReceived(ReplyBody body) {
- CIMListenerManager.notifyOnReplyReceived(body);
- }
+ @Override
+ public void onReplyReceived(ReplyBody body) {
+ CIMListenerManager.notifyOnReplyReceived(body);
+ }
+ @Override
+ public void onConnectionFailed() {
+ // TODO Auto-generated method stub
+ CIMListenerManager.notifyOnConnectionFailed();
+ }
- @Override
- public void onConnectionFailed() {
- // TODO Auto-generated method stub
- CIMListenerManager.notifyOnConnectionFailed();
- }
-
}
diff --git a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/LoginActivity.java b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/LoginActivity.java
index f28be5c..5abf773 100644
--- a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/LoginActivity.java
+++ b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/LoginActivity.java
@@ -1,26 +1,27 @@
/**
- * Copyright 2013-2023 Xia Jun(3979434@qq.com).
- *
+ * Copyright 2013-2019 Xia Jun(3979434@qq.com).
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- ***************************************************************************************
- * *
- * Website : http://www.farsunset.com *
- * *
- ***************************************************************************************
+ *
+ * **************************************************************************************
+ * *
+ * Website : http://www.farsunset.com *
+ * *
+ * **************************************************************************************
*/
package com.farsunset.ichat.example.ui;
+import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
@@ -28,91 +29,84 @@ import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
-import com.farsunset.ichat.example.R;
-import com.farsunset.ichat.example.app.CIMMonitorActivity;
-import com.farsunset.ichat.example.app.Constant;
import com.farsunset.cim.sdk.android.CIMPushManager;
import com.farsunset.cim.sdk.android.constant.CIMConstant;
import com.farsunset.cim.sdk.android.model.ReplyBody;
-public class LoginActivity extends CIMMonitorActivity implements
- OnClickListener {
+import com.farsunset.ichat.example.R;
+import com.farsunset.ichat.example.app.CIMMonitorActivity;
+import com.farsunset.ichat.example.app.Constant;
- EditText accountEdit;
- Button loginButton;
+public class LoginActivity extends CIMMonitorActivity implements OnClickListener {
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_login);
- initViews();
- }
+ EditText accountEdit;
+ Button loginButton;
+ ProgressDialog progressDialog;
- private void initViews() {
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_login);
+ initViews();
+ }
- accountEdit = (EditText) this.findViewById(R.id.account);
- loginButton = (Button) this.findViewById(R.id.login);
- loginButton.setOnClickListener(this);
+ private void initViews() {
- }
+ progressDialog = new ProgressDialog(this);
+ progressDialog.setTitle("提示");
+ progressDialog.setMessage("正在登录,请稍候......");
+ progressDialog.setCancelable(false);
+ progressDialog.setCanceledOnTouchOutside(false);
+ accountEdit = (EditText) this.findViewById(R.id.account);
+ loginButton = (Button) this.findViewById(R.id.login);
+ loginButton.setOnClickListener(this);
- private void doLogin() {
+ }
- if (!"".equals(accountEdit.getText().toString().trim())) {
- showProgressDialog("提示", "正在登陆,请稍后......");
- if (CIMPushManager.isConnected(this)) {
- CIMPushManager.bindAccount(this, accountEdit.getText().toString().trim());
- } else {
- CIMPushManager.connect(this, Constant.CIM_SERVER_HOST, Constant.CIM_SERVER_PORT);
- }
+ private void doLogin() {
- }
- }
+ if (!"".equals(accountEdit.getText().toString().trim())) {
+ progressDialog.show();
+ if (CIMPushManager.isConnected(this)) {
+ CIMPushManager.bindAccount(this, accountEdit.getText().toString().trim());
+ } else {
+ CIMPushManager.connect(this, Constant.CIM_SERVER_HOST, Constant.CIM_SERVER_PORT);
+ }
- @Override
- public void onConnectionSuccessed(boolean autoBind) {
- if(!autoBind)
- CIMPushManager.bindAccount(this, accountEdit.getText().toString().trim());
- }
-
-
- @Override
- public void onReplyReceived(final ReplyBody reply) {
+ }
+ }
- if (reply.getKey().equals(CIMConstant.RequestKey.CLIENT_BIND)) {
+ @Override
+ public void onConnectionSuccessed(boolean autoBind) {
+ if (!autoBind)
+ CIMPushManager.bindAccount(this, accountEdit.getText().toString().trim());
+ }
- if (reply.getCode().equals(CIMConstant.ReturnCode.CODE_200)) {
- hideProgressDialog();
- Intent intent = new Intent(this, SystemMessageActivity.class);
- intent.putExtra("account", accountEdit.getText().toString().trim());
- startActivity(intent);
- this.finish();
- }
- }
+ @Override
+ public void onReplyReceived(final ReplyBody reply) {
+ progressDialog.dismiss();
+ /*
+ * 收到code为200的回应 账号绑定成功
+ */
+ if (reply.getKey().equals(CIMConstant.RequestKey.CLIENT_BIND) && reply.getCode().equals(CIMConstant.ReturnCode.CODE_200)) {
+ Intent intent = new Intent(this, SystemMessageActivity.class);
+ intent.putExtra("account", accountEdit.getText().toString().trim());
+ startActivity(intent);
+ this.finish();
+ }
+ }
- }
-
+ @Override
+ public void onClick(View v) {
+ doLogin();
+ }
-
+ @Override
+ public void onBackPressed() {
+ CIMPushManager.destroy(this);
+ super.onBackPressed();
+ }
- @Override
- public void onClick(View v) {
- switch (v.getId()) {
- case R.id.login:
- doLogin();
- break;
- }
-
- }
-
- @Override
- public void onBackPressed() {
-
- CIMPushManager.destroy(this);
- this.finish();
- }
-
-
}
diff --git a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/SplanshActivity.java b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/SplanshActivity.java
index 9bcee42..bb890b3 100644
--- a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/SplanshActivity.java
+++ b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/SplanshActivity.java
@@ -1,32 +1,32 @@
/**
- * Copyright 2013-2023 Xia Jun(3979434@qq.com).
- *
+ * Copyright 2013-2019 Xia Jun(3979434@qq.com).
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- ***************************************************************************************
- * *
- * Website : http://www.farsunset.com *
- * *
- ***************************************************************************************
+ *
+ * **************************************************************************************
+ * *
+ * Website : http://www.farsunset.com *
+ * *
+ * **************************************************************************************
*/
package com.farsunset.ichat.example.ui;
-
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AlphaAnimation;
+import android.widget.Toast;
import com.farsunset.cim.sdk.android.CIMPushManager;
import com.farsunset.ichat.example.BuildConfig;
@@ -34,45 +34,46 @@ import com.farsunset.ichat.example.R;
import com.farsunset.ichat.example.app.CIMMonitorActivity;
import com.farsunset.ichat.example.app.Constant;
-public class SplanshActivity extends CIMMonitorActivity{
-
- boolean initComplete = false;
- public void onCreate(Bundle savedInstanceState)
- {
-
-
- super.onCreate(savedInstanceState);
+public class SplanshActivity extends CIMMonitorActivity {
- CIMPushManager.setLoggerEnable(this,BuildConfig.DEBUG);
- //连接服务端
-
- CIMPushManager.connect(SplanshActivity.this,Constant.CIM_SERVER_HOST, Constant.CIM_SERVER_PORT);
-
-
- final View view = View.inflate(this, R.layout.activity_splansh, null);
- setContentView(view);
- AlphaAnimation aa = new AlphaAnimation(0.3f,1.0f);
- aa.setDuration(2000);
- view.startAnimation(aa);
-
-
- }
- @Override
- public void onConnectionSuccessed(boolean autoBind) {
-
- Intent intent = new Intent(SplanshActivity.this,LoginActivity.class);
- startActivity(intent);
- finish();
- }
-
-
- @Override
- public void onBackPressed() {
- finish();
- CIMPushManager.destroy(this);
- }
- public void onConnectionFailed(Exception e){
-
- showToask("连接服务器失败,请检查当前设备是否能连接上服务器IP和端口");
- }
+
+ public void onCreate(Bundle savedInstanceState) {
+
+
+ super.onCreate(savedInstanceState);
+
+ CIMPushManager.setLoggerEnable(this, BuildConfig.DEBUG);
+ //连接服务端
+
+ CIMPushManager.connect(SplanshActivity.this, Constant.CIM_SERVER_HOST, Constant.CIM_SERVER_PORT);
+
+
+ final View view = View.inflate(this, R.layout.activity_splansh, null);
+ setContentView(view);
+ AlphaAnimation aa = new AlphaAnimation(0.3f, 1.0f);
+ aa.setDuration(2000);
+ view.startAnimation(aa);
+
+
+ }
+
+ @Override
+ public void onConnectionSuccessed(boolean autoBind) {
+
+ Intent intent = new Intent(SplanshActivity.this, LoginActivity.class);
+ startActivity(intent);
+ finish();
+ }
+
+
+ @Override
+ public void onBackPressed() {
+ finish();
+ CIMPushManager.destroy(this);
+ }
+
+ @Override
+ public void onConnectionFailed() {
+ Toast.makeText(this,"连接服务器失败,请检查当前设备是否能连接上服务器IP和端口",Toast.LENGTH_LONG).show();
+ }
}
diff --git a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/SystemMessageActivity.java b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/SystemMessageActivity.java
index 09bc31e..ed0aa1f 100644
--- a/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/SystemMessageActivity.java
+++ b/cim_for_mina/cim-client-android/app/src/main/java/com/farsunset/ichat/example/ui/SystemMessageActivity.java
@@ -1,29 +1,26 @@
/**
- * Copyright 2013-2023 Xia Jun(3979434@qq.com).
- *
+ * Copyright 2013-2019 Xia Jun(3979434@qq.com).
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- ***************************************************************************************
- * *
- * Website : http://www.farsunset.com *
- * *
- ***************************************************************************************
+ *
+ * **************************************************************************************
+ * *
+ * Website : http://www.farsunset.com *
+ * *
+ * **************************************************************************************
*/
package com.farsunset.ichat.example.ui;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.NetworkInfo;
@@ -32,6 +29,8 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ListView;
import android.widget.TextView;
+import android.widget.Toast;
+
import com.farsunset.cim.sdk.android.CIMPushManager;
import com.farsunset.cim.sdk.android.constant.CIMConstant;
import com.farsunset.cim.sdk.android.model.Message;
@@ -41,108 +40,97 @@ import com.farsunset.ichat.example.adapter.SystemMsgListViewAdapter;
import com.farsunset.ichat.example.app.CIMMonitorActivity;
import com.farsunset.ichat.example.app.Constant;
-public class SystemMessageActivity extends CIMMonitorActivity implements OnClickListener{
+import java.util.ArrayList;
- protected ListView chatListView;
- protected SystemMsgListViewAdapter adapter;
- private ArrayList