mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Q: What does the plugin manager do? A: It manages plugins.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
16
api/net/sf/briar/api/plugins/PluginManager.java
Normal file
16
api/net/sf/briar/api/plugins/PluginManager.java
Normal 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();
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
17
api/net/sf/briar/api/transport/ConnectionDispatcher.java
Normal file
17
api/net/sf/briar/api/transport/ConnectionDispatcher.java
Normal 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);
|
||||
}
|
||||
25
api/net/sf/briar/api/ui/UiCallback.java
Normal file
25
api/net/sf/briar/api/ui/UiCallback.java
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user