Q: What does the plugin manager do? A: It manages plugins.

This commit is contained in:
akwizgran
2011-10-14 14:49:29 +01:00
parent d54ca67fe9
commit 55182528cf
12 changed files with 510 additions and 6 deletions

View File

@@ -12,5 +12,5 @@ public interface BatchPluginCallback extends PluginCallback {
void readerCreated(BatchTransportReader r);
void writerCreated(ContactId contactId, BatchTransportWriter w);
void writerCreated(ContactId c, BatchTransportWriter w);
}

View File

@@ -0,0 +1,16 @@
package net.sf.briar.api.plugins;
public interface PluginManager {
/**
* Starts all the plugins the manager knows about and returns the number of
* plugins successfully started.
*/
int startPlugins();
/**
* Stops all the plugins started by startPlugins() and returns the number
* of plugins successfully stopped.
*/
int stopPlugins();
}

View File

@@ -9,8 +9,7 @@ import net.sf.briar.api.transport.StreamTransportConnection;
*/
public interface StreamPluginCallback extends PluginCallback {
void incomingConnectionCreated(StreamTransportConnection c);
void incomingConnectionCreated(StreamTransportConnection s);
void outgoingConnectionCreated(ContactId contactId,
StreamTransportConnection c);
void outgoingConnectionCreated(ContactId c, StreamTransportConnection s);
}

View File

@@ -0,0 +1,17 @@
package net.sf.briar.api.transport;
import net.sf.briar.api.ContactId;
import net.sf.briar.api.TransportId;
public interface ConnectionDispatcher {
void dispatchReader(TransportId t, BatchTransportReader r);
void dispatchWriter(TransportId t, ContactId c,
BatchTransportWriter w);
void dispatchIncomingConnection(TransportId t, StreamTransportConnection s);
void dispatchOutgoingConnection(TransportId t, ContactId c,
StreamTransportConnection s);
}

View File

@@ -0,0 +1,25 @@
package net.sf.briar.api.ui;
public interface UiCallback {
/**
* Presents the user with a choice among two or more named options and
* returns the user's response. The message may consist of a translatable
* format string and arguments.
* @return An index into the array of options indicating the user's choice,
* or -1 if the user cancelled the choice.
*/
int showChoice(String[] options, String... message);
/**
* Asks the user to confirm an action and returns the user's response. The
* message may consist of a translatable format string and arguments.
*/
boolean showConfirmationMessage(String... message);
/**
* Shows a message to the user. The message may consist of a translatable
* format string and arguments.
*/
void showMessage(String... message);
}