Removed invitation code from simplex plugins, cleaned up Gmail plugin.

This commit is contained in:
akwizgran
2012-09-26 12:34:37 +01:00
parent 36cd02128c
commit e534722d60
11 changed files with 59 additions and 253 deletions

View File

@@ -35,7 +35,4 @@ public interface Plugin {
* the plugin may exclude the given contacts from polling.
*/
void poll(Collection<ContactId> connected);
/** Returns true if the plugin supports exchanging invitations. */
boolean supportsInvitations();
}

View File

@@ -3,13 +3,13 @@ package net.sf.briar.api.plugins;
import java.util.Collection;
import net.sf.briar.api.plugins.duplex.DuplexPlugin;
import net.sf.briar.api.plugins.simplex.SimplexPlugin;
public interface PluginManager {
/**
* Starts the plugins and returns the number of plugins successfully
* started.
* started. This method must not be called until the database has been
* opened.
*/
int start();
@@ -19,8 +19,5 @@ public interface PluginManager {
int stop();
/** Returns any duplex plugins that support invitations. */
Collection<DuplexPlugin> getDuplexInvitationPlugins();
/** Returns any simplex plugins that support invitations. */
Collection<SimplexPlugin> getSimplexInvitationPlugins();
Collection<DuplexPlugin> getInvitationPlugins();
}

View File

@@ -14,6 +14,9 @@ public interface DuplexPlugin extends Plugin {
*/
DuplexTransportConnection createConnection(ContactId c);
/** Returns true if the plugin supports exchanging invitations. */
boolean supportsInvitations();
/**
* Starts the invitation process from the inviter's side. Returns null if
* no connection can be established within the given timeout.

View File

@@ -1,7 +1,6 @@
package net.sf.briar.api.plugins.simplex;
import net.sf.briar.api.ContactId;
import net.sf.briar.api.crypto.PseudoRandom;
import net.sf.briar.api.plugins.Plugin;
/** An interface for transport plugins that support simplex communication. */
@@ -20,29 +19,4 @@ public interface SimplexPlugin extends Plugin {
* could not be created.
*/
SimplexTransportWriter createWriter(ContactId c);
/**
* Starts the invitation process from the inviter's side. Returns null if
* no connection can be established within the given timeout.
*/
SimplexTransportWriter sendInvitation(PseudoRandom r, long timeout);
/**
* Starts the invitation process from the invitee's side. Returns null if
* no connection can be established within the given timeout.
*/
SimplexTransportReader acceptInvitation(PseudoRandom r, long timeout);
/**
* Continues the invitation process from the invitee's side. Returns null
* if no connection can be established within the given timeout.
*/
SimplexTransportWriter sendInvitationResponse(PseudoRandom r, long timeout);
/**
* Continues the invitation process from the inviter's side. Returns null
* if no connection can be established within the given timeout.
*/
SimplexTransportReader acceptInvitationResponse(PseudoRandom r,
long timeout);
}