src/net/java/otr4j/session/Session.java
author Nikita Kozlov <nikita@mbdsys.com>
Tue, 07 Dec 2010 22:57:56 +0100
changeset 815 ca323cff3ac9
parent 810 0ff0059f2ec3
permissions -rw-r--r--
I have reimplemented the BeemOtrService in a more "centralized" way.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
810
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
     1
package net.java.otr4j.session;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
     2
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
     3
import java.security.KeyPair;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
     4
import java.security.PublicKey;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
     5
import java.util.List;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
     6
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
     7
import net.java.otr4j.OtrEngineListener;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
     8
import net.java.otr4j.OtrException;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
     9
import net.java.otr4j.OtrPolicy;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    10
import net.java.otr4j.io.messages.AbstractMessage;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    11
import net.java.otr4j.session.SessionImpl.TLV;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    12
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    13
public interface Session {
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    14
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    15
	public abstract SessionStatus getSessionStatus();
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    16
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    17
	public abstract SessionID getSessionID();
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    18
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    19
	public abstract void injectMessage(AbstractMessage m) throws OtrException;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    20
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    21
	public abstract KeyPair getLocalKeyPair();
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    22
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    23
	public abstract OtrPolicy getSessionPolicy();
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    24
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    25
	public abstract String transformReceiving(String content)
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    26
			throws OtrException;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    27
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    28
	public abstract String transformSending(String content, List<TLV> tlvs)
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    29
			throws OtrException;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    30
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    31
	public abstract void startSession() throws OtrException;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    32
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    33
	public abstract void endSession() throws OtrException;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    34
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    35
	public abstract void refreshSession() throws OtrException;
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    36
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    37
	public abstract PublicKey getRemotePublicKey();
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    38
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    39
	public abstract void addOtrEngineListener(OtrEngineListener l);
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    40
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    41
	public abstract void removeOtrEngineListener(OtrEngineListener l);
0ff0059f2ec3 initial commit adding otr to beem, it's based on http://bitbucket.org/romanzadov/beem, with a better beem integration
Nikita Kozlov <nikita@mbdsys.com>
parents:
diff changeset
    42
}