All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.whispersystems.textsecure.api.messages.TextSecureContent Maven / Gradle / Ivy

The newest version!
package org.whispersystems.textsecure.api.messages;

import org.whispersystems.libaxolotl.util.guava.Optional;
import org.whispersystems.textsecure.api.messages.multidevice.TextSecureSyncMessage;

public class TextSecureContent {

  private final Optional message;
  private final Optional synchronizeMessage;

  public TextSecureContent() {
    this.message            = Optional.absent();
    this.synchronizeMessage = Optional.absent();
  }

  public TextSecureContent(TextSecureDataMessage message) {
    this.message = Optional.fromNullable(message);
    this.synchronizeMessage = Optional.absent();
  }

  public TextSecureContent(TextSecureSyncMessage synchronizeMessage) {
    this.message            = Optional.absent();
    this.synchronizeMessage = Optional.fromNullable(synchronizeMessage);
  }

  public Optional getDataMessage() {
    return message;
  }

  public Optional getSyncMessage() {
    return synchronizeMessage;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy