public interface ScOtrEngine
Modifier and Type | Method and Description |
---|---|
void |
abortSmp(OtrContactManager.OtrContact contact)
Aborts the Smp negotiation process.
|
void |
addListener(ScOtrEngineListener listener)
Registers an
ScOtrEngineListener . |
void |
endSession(OtrContactManager.OtrContact contact)
Ends the Off-the-Record session for the given
OtrContactManager.OtrContact , if it is
not already started. |
net.java.otr4j.OtrPolicy |
getContactPolicy(Contact contact)
Gets a
Contact specific policy. |
net.java.otr4j.OtrPolicy |
getGlobalPolicy()
Gets the global
OtrPolicy . |
net.java.otr4j.session.Session |
getOutgoingSession(OtrContactManager.OtrContact contact)
Get the outgoing OTRv3 Session.
|
java.security.PublicKey |
getRemotePublicKey(OtrContactManager.OtrContact otrContact) |
java.util.List<net.java.otr4j.session.Session> |
getSessionInstances(OtrContactManager.OtrContact contact)
Some IM networks always relay all messages to all sessions of a client
who is logged in multiple times.
|
ScSessionStatus |
getSessionStatus(OtrContactManager.OtrContact contact)
Gets the
ScSessionStatus for the given OtrContactManager.OtrContact . |
void |
initSmp(OtrContactManager.OtrContact contact,
java.lang.String question,
java.lang.String secret)
Initializes Smp negotiation.
|
boolean |
isMessageUIDInjected(java.lang.String messageUID)
Gets weather the passed in messageUID is injected by the engine or not.
|
void |
launchHelp()
Launches the help page.
|
void |
refreshSession(OtrContactManager.OtrContact contact)
Refreshes the Off-the-Record session for the given
OtrContactManager.OtrContact . |
void |
removeListener(ScOtrEngineListener listener)
Unregisters an
ScOtrEngineListener . |
void |
respondSmp(OtrContactManager.OtrContact contact,
net.java.otr4j.session.InstanceTag receiverTag,
java.lang.String question,
java.lang.String secret)
Responds to a question that is asked during the Smp negotiation process.
|
void |
setContactPolicy(Contact contact,
net.java.otr4j.OtrPolicy policy)
Sets the contact specific policy
|
void |
setGlobalPolicy(net.java.otr4j.OtrPolicy policy)
Sets the global policy.
|
boolean |
setOutgoingSession(OtrContactManager.OtrContact contact,
net.java.otr4j.session.InstanceTag tag)
Some IM networks always relay all messages to all sessions of a client
who is logged in multiple times.
|
void |
startSession(OtrContactManager.OtrContact contact)
Starts the Off-the-Record session for the given
OtrContactManager.OtrContact , if it's
not already started. |
java.lang.String |
transformReceiving(OtrContactManager.OtrContact contact,
java.lang.String content)
Transforms an incoming message.
|
java.lang.String[] |
transformSending(OtrContactManager.OtrContact contact,
java.lang.String content)
Transforms an outgoing message.
|
void initSmp(OtrContactManager.OtrContact contact, java.lang.String question, java.lang.String secret)
contact
- The contact with whom we want to start the Smp negotiationquestion
- The question that is asked during the Smp negotiationsecret
- The secret answer for the question.void respondSmp(OtrContactManager.OtrContact contact, net.java.otr4j.session.InstanceTag receiverTag, java.lang.String question, java.lang.String secret)
contact
- The contact for whom we want to respond to a question
during the Smp negotiation process.receiverTag
- The instance tag of the intended receiver of the SMP
responsequestion
- The question that is asked during the Smp negotiation.secret
- The secret answer for the question.void abortSmp(OtrContactManager.OtrContact contact)
contact
- The contact with whom we want to abort the
Smp negotiation process.java.lang.String[] transformSending(OtrContactManager.OtrContact contact, java.lang.String content)
contact
- the destination OtrContactManager.OtrContact
.content
- the original message content.java.lang.String transformReceiving(OtrContactManager.OtrContact contact, java.lang.String content)
contact
- the source OtrContactManager.OtrContact
.content
- the original message content.void startSession(OtrContactManager.OtrContact contact)
OtrContactManager.OtrContact
, if it's
not already started.contact
- the OtrContactManager.OtrContact
with whom we want to start an OTR
session.void endSession(OtrContactManager.OtrContact contact)
OtrContactManager.OtrContact
, if it is
not already started.contact
- the OtrContactManager.OtrContact
with whom we want to end the OTR
session.void refreshSession(OtrContactManager.OtrContact contact)
OtrContactManager.OtrContact
. If
the session does not exist, a new session is established.contact
- the OtrContactManager.OtrContact
with whom we want to refresh the OTR
session.net.java.otr4j.session.Session getOutgoingSession(OtrContactManager.OtrContact contact)
contact
- the OtrContactManager.OtrContact
for whom we want to get the
outgoing OTR session.java.util.List<net.java.otr4j.session.Session> getSessionInstances(OtrContactManager.OtrContact contact)
Returns a list containing all instances of a session. The 'master' session is always first in the list.
contact
- the OtrContactManager.OtrContact
for whom we want to get the instancesboolean setOutgoingSession(OtrContactManager.OtrContact contact, net.java.otr4j.session.InstanceTag tag)
When the client wishes to start sending OTRv3 encrypted messages to a specific session of his buddy who is logged in multiple times, he can set the outgoing instance of his buddy by specifying his InstanceTag.
contact
- the OtrContactManager.OtrContact
to whom we want to set the outgoing
instance tag.tag
- the outgoing InstanceTag
InstanceTag
exists
. Otherwise falseScSessionStatus getSessionStatus(OtrContactManager.OtrContact contact)
ScSessionStatus
for the given OtrContactManager.OtrContact
.contact
- the OtrContactManager.OtrContact
whose ScSessionStatus
we are
interested in.ScSessionStatus
.boolean isMessageUIDInjected(java.lang.String messageUID)
messageUID
- the messageUID which is to be determined whether it is
injected by the engine or notvoid addListener(ScOtrEngineListener listener)
ScOtrEngineListener
.listener
- the ScOtrEngineListener
to register.void removeListener(ScOtrEngineListener listener)
ScOtrEngineListener
.listener
- the ScOtrEngineListener
to unregister.java.security.PublicKey getRemotePublicKey(OtrContactManager.OtrContact otrContact)
net.java.otr4j.OtrPolicy getGlobalPolicy()
OtrPolicy
.OtrPolicy
net.java.otr4j.OtrPolicy getContactPolicy(Contact contact)
Contact
specific policy.void setGlobalPolicy(net.java.otr4j.OtrPolicy policy)
policy
- the global policyvoid setContactPolicy(Contact contact, net.java.otr4j.OtrPolicy policy)
contact
- the Contact
whose policy we want to setpolicy
- the OtrPolicy
void launchHelp()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.