mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Added a method to check which plugins support invitations.
This commit is contained in:
@@ -33,4 +33,7 @@ public interface Plugin {
|
||||
* callback.
|
||||
*/
|
||||
void poll();
|
||||
|
||||
/** Returns true if the plugin supports exchanging invitations. */
|
||||
boolean supportsInvitations();
|
||||
}
|
||||
|
||||
@@ -264,6 +264,10 @@ class BluetoothPlugin extends AbstractPlugin implements StreamPlugin {
|
||||
return url == null ? null : connect(c, url);
|
||||
}
|
||||
|
||||
public boolean supportsInvitations() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public StreamTransportConnection sendInvitation(int code, long timeout) {
|
||||
return createInvitationConnection(code, timeout);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,10 @@ implements RemovableDriveMonitor.Callback {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public boolean supportsInvitations() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected File chooseOutputDirectory() {
|
||||
try {
|
||||
|
||||
@@ -97,13 +97,15 @@ class SimpleSocketPlugin extends SocketPlugin {
|
||||
callback.setLocalProperties(p);
|
||||
}
|
||||
|
||||
public boolean supportsInvitations() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public StreamTransportConnection sendInvitation(int code, long timeout) {
|
||||
// FIXME
|
||||
return null;
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public StreamTransportConnection acceptInvitation(int code, long timeout) {
|
||||
// FIXME
|
||||
return null;
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user