mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Make REASON_USER into a generic reason code.
This commit is contained in:
@@ -11,6 +11,6 @@ public interface BluetoothConstants {
|
||||
|
||||
String PREF_BT_ENABLE = "enable";
|
||||
|
||||
int REASON_USER = 1;
|
||||
// Reason code returned by Plugin#getReasonDisabled()
|
||||
int REASON_NO_BT_ADAPTER = 2;
|
||||
}
|
||||
|
||||
@@ -35,12 +35,18 @@ public interface Plugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason code returned by {@link #getReasonDisabled()} ()} to indicate
|
||||
* that the plugin is disabled because it has not been started or has been
|
||||
* Reason code returned by {@link #getReasonDisabled()} to indicate that
|
||||
* the plugin is disabled because it has not been started or has been
|
||||
* stopped.
|
||||
*/
|
||||
int REASON_STARTING_STOPPING = 0;
|
||||
|
||||
/**
|
||||
* Reason code returned by {@link #getReasonDisabled()} to indicate that
|
||||
* the plugin has been disabled by the user.
|
||||
*/
|
||||
int REASON_USER = 1;
|
||||
|
||||
/**
|
||||
* Returns the plugin's transport identifier.
|
||||
*/
|
||||
@@ -75,9 +81,9 @@ public interface Plugin {
|
||||
* Returns an integer code indicating why the plugin is
|
||||
* {@link State#DISABLED disabled}, or -1 if the plugin is not disabled.
|
||||
* <p>
|
||||
* The codes used are plugin-specific, except the generic code
|
||||
* {@link #REASON_STARTING_STOPPING}, which may be used by
|
||||
* any plugin.
|
||||
* The codes used are plugin-specific, except the generic codes
|
||||
* {@link #REASON_STARTING_STOPPING} and {@link #REASON_USER}, which may
|
||||
* be used by any plugin.
|
||||
*/
|
||||
int getReasonDisabled();
|
||||
|
||||
|
||||
@@ -3,6 +3,4 @@ package org.briarproject.bramble.api.plugin;
|
||||
public interface TcpConstants {
|
||||
|
||||
String PREF_TCP_ENABLE = "enable";
|
||||
|
||||
int REASON_USER = 1;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public interface TorConstants {
|
||||
int PREF_TOR_NETWORK_WITH_BRIDGES = 2;
|
||||
int PREF_TOR_NETWORK_NEVER = 3;
|
||||
|
||||
int REASON_USER = 1;
|
||||
// Reason codes returned by Plugin#getReasonDisabled()
|
||||
int REASON_BATTERY = 2;
|
||||
int REASON_MOBILE_DATA = 3;
|
||||
int REASON_COUNTRY_BLOCKED = 4;
|
||||
|
||||
Reference in New Issue
Block a user