diff options
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java deleted file mode 100644 index a066faad..00000000 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java +++ /dev/null @@ -1,120 +0,0 @@ -package eu.siacs.conversations.crypto.axolotl; - -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; - -import org.whispersystems.libaxolotl.AxolotlAddress; -import org.whispersystems.libaxolotl.IdentityKey; -import org.whispersystems.libaxolotl.state.PreKeyRecord; -import org.whispersystems.libaxolotl.state.SignedPreKeyRecord; - -import java.security.cert.X509Certificate; -import java.util.List; -import java.util.Set; - -import eu.siacs.conversations.entities.Account; -import eu.siacs.conversations.entities.Contact; -import eu.siacs.conversations.entities.Conversation; -import eu.siacs.conversations.entities.Message; -import eu.siacs.conversations.xmpp.OnAdvancedStreamFeaturesLoaded; -import eu.siacs.conversations.xmpp.jid.Jid; - -/** - * Created by tzur on 02.03.2016. - */ -public interface AxolotlService extends OnAdvancedStreamFeaturesLoaded { - - String LOGPREFIX = "AxolotlService"; - - String PEP_PREFIX = "eu.siacs.conversations.axolotl"; - String PEP_DEVICE_LIST = PEP_PREFIX + ".devicelist"; - String PEP_BUNDLES = PEP_PREFIX + ".bundles"; - String PEP_VERIFICATION = PEP_PREFIX + ".verification"; - - int NUM_KEYS_TO_PUBLISH = 100; - - enum FetchStatus { - PENDING, - SUCCESS, - SUCCESS_VERIFIED, - TIMEOUT, - ERROR - } - - String getOwnFingerprint(); - - Set<IdentityKey> getKeysWithTrust(XmppAxolotlSession.Trust trust); - - - Set<String> getFingerprintsForOwnSessions(); - - Set<String> getFingerprintsForContact(Contact contact); - - boolean isPepBroken(); - - void regenerateKeys(boolean wipeOther); - - int getOwnDeviceId(); - - Set<Integer> getOwnDeviceIds(); - - void registerDevices(Jid jid, @NonNull Set<Integer> deviceIds); - - void wipeOtherPepDevices(); - - void purgeKey(String fingerprint); - - void publishOwnDeviceIdIfNeeded(); - - void publishOwnDeviceId(Set<Integer> deviceIds); - - void publishDeviceVerificationAndBundle(SignedPreKeyRecord signedPreKeyRecord, - Set<PreKeyRecord> preKeyRecords, - boolean announceAfter, - boolean wipe); - - void publishBundlesIfNeeded(boolean announce, boolean wipe); - - XmppAxolotlSession.Trust getFingerprintTrust(String fingerprint); - - X509Certificate getFingerprintCertificate(String fingerprint); - - void setFingerprintTrust(String fingerprint, XmppAxolotlSession.Trust trust); - - Set<AxolotlAddress> findDevicesWithoutSession(Conversation conversation); - - boolean createSessionsIfNeeded(Conversation conversation); - - boolean trustedSessionVerified(Conversation conversation); - - @Nullable - XmppAxolotlMessage encrypt(Message message); - - void preparePayloadMessage(Message message, boolean delay); - - XmppAxolotlMessage fetchAxolotlMessageFromCache(Message message); - - XmppAxolotlMessage.XmppAxolotlPlaintextMessage processReceivingPayloadMessage(XmppAxolotlMessage message); - - XmppAxolotlMessage.XmppAxolotlKeyTransportMessage processReceivingKeyTransportMessage(XmppAxolotlMessage message); - - boolean fetchMapHasErrors(List<Jid> jids); - - Set<IdentityKey> getKeysWithTrust(XmppAxolotlSession.Trust trust, Jid jid); - - Set<IdentityKey> getKeysWithTrust(XmppAxolotlSession.Trust trust, List<Jid> jids); - - long getNumTrustedKeys(Jid jid); - - boolean anyTargetHasNoTrustedKeys(List<Jid> jids); - - boolean isConversationAxolotlCapable(Conversation conversation); - - List<Jid> getCryptoTargets(Conversation conversation); - - boolean hasPendingKeyFetches(Account account, List<Jid> jids); - - void prepareKeyTransportMessage(Conversation conversation, OnMessageCreatedCallback onMessageCreatedCallback); - - void resetBrokenness(); -} |