Package com.biglybt.plugin.net.buddy
Class BuddyPlugin
java.lang.Object
com.biglybt.plugin.net.buddy.BuddyPlugin
- All Implemented Interfaces:
Plugin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
protected static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BooleanParameter
private BuddyPluginBeta
private BuddyPluginTracker
private StringParameter
private BooleanParameter
private ParameterListener
private BooleanParameter
private static final int
private boolean
private RateLimiter
protected static final int
protected static final int
protected static final int
private int
private AtomicBoolean
private boolean
private CopyOnWriteList
<BuddyPluginListener> private LoggerChannel
private StringParameter
private StringParameter
private StringListParameter
private StringListParameter
private RateLimiter
private CopyOnWriteList
<PartialBuddyListener> private PluginInterface
private BuddyPluginNetwork[]
private StringParameter
private StringParameter
static final int
static final int
static final int
static final String[]
static final int
static final int
static final String[]
static final String[]
static final boolean
private BuddyPluginViewInterface
private TorrentAttribute
static final int
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(BuddyPluginListener listener) void
void
protected void
addRateLimiters
(GenericMessageConnection connection) protected void
protected void
void
createChat
(BuddyPluginBuddy[] buddies) protected String
protected void
fireAdded
(BuddyPluginBuddy buddy) protected void
protected void
protected void
fireRemoved
(BuddyPluginBuddy buddy) protected void
protected long
getAddedTime
(Download download) getBeta()
boolean
protected int
getNickname
(boolean public_network) int
getOnlineStatus
(boolean public_network) getOnlineStatus
(int status) boolean
private BuddyPluginNetwork
getPluginNetwork
(boolean pub) getProfileInfo
(boolean public_network) getPublicKey
(boolean public_network) getRSS
(BuddyPluginBuddy buddy, String tag_or_category, String if_mod) byte[]
getRSSTorrent
(BuddyPluginBuddy buddy, String category, byte[] hash) getSWTUI()
handleURLProtocol
(AZPluginConnection connection, String arg_str) void
initialize
(PluginInterface _plugin_interface) This method is called when the Plugin is loaded by the clientboolean
boolean
boolean
boolean
isFullBuddy
(Peer peer) boolean
boolean
boolean
isPartialBuddy
(Download download, Peer peer) boolean
static void
load
(PluginInterface plugin_interface) void
log
(BuddyPluginBuddy buddy, String str) void
log
(BuddyPluginBuddy buddy, String str, Throwable e) void
logMessage
(BuddyPluginBuddy buddy, String str) void
logMessage
(BuddyPluginBuddy buddy, String str, boolean is_error) void
logMessage
(BuddyPluginBuddy buddy, String str, Throwable e) protected static String
normaliseCat
(String str) protected static void
normaliseCats
(Set<String> cats) void
void
void
void
removeListener
(BuddyPluginListener listener) void
void
boolean
setClassicEnabled
(boolean enabled, boolean auto) void
setNickname
(boolean public_network, String str) void
setOnlineStatus
(boolean public_network, int status) void
setPartialBuddy
(Download download, Peer peer, boolean is_partial, boolean manual) protected void
setPublicTagsOrCategories
(String str, boolean persist) protected void
setPublicTagsOrCategories
(Set<String> new_pub_tags_or_cats, boolean persist) protected void
void
byte[]
sign
(boolean public_network, byte[] payload) private void
startup()
protected void
private void
updateNickName
(boolean public_network, String nick) private void
updateOnlineStatus
(boolean public_network, int status) private void
boolean
boolean
verifyPublicKey
(boolean public_network, String key) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.pif.Plugin
getInitialProperties
-
Field Details
-
SUPPORT_ONLINE_STATUS
public static final boolean SUPPORT_ONLINE_STATUS- See Also:
-
TIMER_PERIOD
public static final int TIMER_PERIOD- See Also:
-
FEED_UPDATE_MIN_MILLIS
private static final int FEED_UPDATE_MIN_MILLIS- See Also:
-
VIEW_ID
- See Also:
-
plugin_interface
-
STATUS_ONLINE
public static final int STATUS_ONLINE- See Also:
-
STATUS_AWAY
public static final int STATUS_AWAY- See Also:
-
STATUS_NOT_AVAILABLE
public static final int STATUS_NOT_AVAILABLE- See Also:
-
STATUS_BUSY
public static final int STATUS_BUSY- See Also:
-
STATUS_APPEAR_OFFLINE
public static final int STATUS_APPEAR_OFFLINE- See Also:
-
STATUS_VALUES
-
STATUS_KEYS
-
STATUS_STRINGS
-
classic_enabled_param
-
nick_name_public_param
-
online_status_public_param
-
profile_public_param
-
nick_name_anon_param
-
online_status_anon_param
-
profile_anon_param
-
public_profile_list
-
anon_profile_list
-
enable_chat_notifications
-
cat_pub
-
beta_enabled_param
-
buddy_tracker
-
ta_category
-
logger
-
public_tags_or_categories
-
lan_local_peers
private boolean lan_local_peers -
fp_enable
private boolean fp_enable -
beta_plugin
-
swt_ui
-
swt_ui_waiters
-
listeners
-
pb_listeners
-
configEnabledListener
-
initialization_complete
-
INIT_UNKNOWN
protected static final int INIT_UNKNOWN- See Also:
-
INIT_OK
protected static final int INIT_OK- See Also:
-
INIT_BAD
protected static final int INIT_BAD- See Also:
-
initialisation_state
private volatile int initialisation_state -
inbound_limiter
-
outbound_limiter
-
plugin_networks
-
-
Constructor Details
-
BuddyPlugin
public BuddyPlugin()
-
-
Method Details
-
load
-
initialize
Description copied from interface:Plugin
This method is called when the Plugin is loaded by the client- Specified by:
initialize
in interfacePlugin
- Parameters:
_plugin_interface
- the interface that the plugin must use to communicate with the client
-
getPluginInterface
-
getPluginNetworks
-
getInitialisationState
protected int getInitialisationState() -
isInitializationComplete
public boolean isInitializationComplete() -
getOnlineStatus
-
isClassicEnabled
public boolean isClassicEnabled() -
setClassicEnabled
public boolean setClassicEnabled(boolean enabled, boolean auto) -
isBetaEnabled
public boolean isBetaEnabled() -
getBeta
-
getTracker
-
getPeersAreLANLocal
public boolean getPeersAreLANLocal() -
getFPEnabled
public boolean getFPEnabled() -
isLoggerEnabled
public boolean isLoggerEnabled() -
updateLocale
-
setupDisablePrompt
-
getNickname
-
setNickname
-
getOnlineStatus
public int getOnlineStatus(boolean public_network) -
setOnlineStatus
public void setOnlineStatus(boolean public_network, int status) -
showConfig
public void showConfig() -
fireEnabledStateChanged
protected void fireEnabledStateChanged() -
fireUpdated
protected void fireUpdated() -
getSWTUI
-
addSWTUIWaiter
-
addRateLimiters
-
getPartialBuddies
-
isAvailable
public boolean isAvailable() -
checkAvailable
- Throws:
BuddyPluginException
-
addListener
-
removeListener
-
fireAdded
-
fireRemoved
-
fireDetailsChanged
-
isFullBuddy
-
isPartialBuddy
-
setPartialBuddy
-
getEnableChatNotificationsParameter
-
updateProfiles
private void updateProfiles() -
updateProfileSupport
-
normaliseCat
-
normaliseCats
-
isPublicTagOrCategory
-
addPublicTagOrCategory
-
removePublicTagOrCategory
-
setPublicTagsOrCategories
-
setPublicTagsOrCategories
-
addPartialBuddyListener
-
removePartialBuddyListener
-
partialBuddyAdded
-
partialBuddyChanged
-
partialBuddyRemoved
-
handleURLProtocol
public InputStream handleURLProtocol(AZPluginConnection connection, String arg_str) throws IPCException - Throws:
IPCException
-
getAddedTime
-
escape
-
getRSS
public BuddyPlugin.FeedDetails getRSS(BuddyPluginBuddy buddy, String tag_or_category, String if_mod) throws BuddyPluginException - Throws:
BuddyPluginException
-
getRSSTorrent
public byte[] getRSSTorrent(BuddyPluginBuddy buddy, String category, byte[] hash) throws BuddyPluginException - Throws:
BuddyPluginException
-
createChat
-
getPluginNetwork
-
startup
private void startup() -
updateNickName
-
updateOnlineStatus
private void updateOnlineStatus(boolean public_network, int status) -
getPublicKey
-
getProfileInfo
-
sign
- Throws:
BuddyPluginException
-
verify
public boolean verify(boolean public_network, String pk, byte[] payload, byte[] signature) throws BuddyPluginException - Throws:
BuddyPluginException
-
verifyPublicKey
-
addBuddy
-
peekBuddy
-
getBuddies
-
getBuddyFromPublicKey
-
logMessage
-
logMessage
-
logMessage
-
log
-
log
-