diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-03-08 12:55:03 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-03-08 12:55:03 +0100 |
commit | 48f3922fe652fea8d7b97afe90868d5d4ab290f7 (patch) | |
tree | e47b0a621c4717c39daf00ff1741dc4b02ebb0f2 /src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java | |
parent | 2b86b686c52c3d82ad01a8ff81c5766d64050b62 (diff) |
Fixed merge issue with AxolotlService (differentiation between impl and interface)
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 | 34 |
1 files changed, 21 insertions, 13 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 index d8287aff..e490ac64 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java @@ -9,6 +9,7 @@ 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; @@ -30,6 +31,8 @@ public interface AxolotlService extends OnAdvancedStreamFeaturesLoaded { String PEP_BUNDLES = PEP_PREFIX + ".bundles"; String PEP_VERIFICATION = PEP_PREFIX + ".verification"; + int NUM_KEYS_TO_PUBLISH = 100; + enum FetchStatus { PENDING, SUCCESS, @@ -38,15 +41,10 @@ public interface AxolotlService extends OnAdvancedStreamFeaturesLoaded { ERROR } - boolean fetchMapHasErrors(Contact contact); - String getOwnFingerprint(); Set<IdentityKey> getKeysWithTrust(XmppAxolotlSession.Trust trust); - Set<IdentityKey> getKeysWithTrust(XmppAxolotlSession.Trust trust, Contact contact); - - long getNumTrustedKeys(Contact contact); Set<String> getFingerprintsForOwnSessions(); @@ -77,8 +75,6 @@ public interface AxolotlService extends OnAdvancedStreamFeaturesLoaded { void publishBundlesIfNeeded(boolean announce, boolean wipe); - boolean isContactAxolotlCapable(Contact contact); - XmppAxolotlSession.Trust getFingerprintTrust(String fingerprint); X509Certificate getFingerprintCertificate(String fingerprint); @@ -87,24 +83,36 @@ public interface AxolotlService extends OnAdvancedStreamFeaturesLoaded { Set<AxolotlAddress> findDevicesWithoutSession(Conversation conversation); - Set<AxolotlAddress> findDevicesWithoutSession(Jid contactJid); - boolean createSessionsIfNeeded(Conversation conversation); boolean trustedSessionVerified(Conversation conversation); - boolean hasPendingKeyFetches(Account account, Contact contact); - @Nullable XmppAxolotlMessage encrypt(Message message); void preparePayloadMessage(Message message, boolean delay); - void prepareKeyTransportMessage(Contact contact, OnMessageCreatedCallback onMessageCreatedCallback); - 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); } |