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