Class BuddyPluginBeta
java.lang.Object
com.biglybt.plugin.net.buddy.BuddyPluginBeta
- All Implemented Interfaces:
AEDiagnosticsEvidenceGenerator, DataSourceResolver.DataSourceImporter
public class BuddyPluginBeta
extends Object
implements DataSourceResolver.DataSourceImporter, AEDiagnosticsEvidenceGenerator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classclassstatic interfacestatic interfaceclassclassstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate static Patternprivate static Patternprivate static Patternprivate static Pattern[]private PluginInterfacestatic final booleanstatic final Stringprivate Map<String, BuddyPluginBeta.ChatInstance> static final Stringprivate Stringstatic final booleanprivate AsyncDispatcherprivate static AsyncDispatcherprivate static final Objectprivate booleanprivate BooleanParameterstatic final intstatic final Stringstatic final intstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final intprivate static final intprivate static final intprivate static final Stringstatic final Stringstatic final intstatic final intprivate booleanprivate booleanprivate booleanprivate booleanprivate AESemaphoreprivate final IpFilterstatic final Stringstatic final Stringstatic final Stringprivate intprivate intprivate static final intprivate BuddyPluginprivate PluginInterfaceprivate booleanstatic final intstatic final intprivate AtomicIntegerstatic final intprivate intstatic final Stringprivate booleanprivate Stringprivate Stringprivate booleanprivate Stringprivate booleanprivate TimerEventPeriodicprivate booleanstatic final intstatic final intprivate boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuddyPluginBeta(PluginInterface _pi, BuddyPlugin _plugin, BooleanParameter _enabled) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidvoidaddListener(BuddyPluginBeta.ChatManagerListener l, boolean fire_for_existing) private voidprivate booleanchatOptionsExists(String net, String key) protected voidprivate Stringprivate voiddoBind(BuddyPluginBeta.ChatInstance chat, String meta_key, PluginInterface pi, Object handler, boolean destroy_on_fail) private Stringprivate StringextractLinks(String str) voidgenerate(IndentWriter writer) getAndShowChat(String network, String key) private booleangetAutoMute(String net, String key) private booleangetBooleanOption(String net, String key, String name, boolean def) private byte[]getByteArrayOption(String net, String key, String name) getChat(BuddyPluginBeta.ChatParticipant participant) getChat(BuddyPluginBeta.ChatParticipant parent_participant, Object handler) private BuddyPluginBeta.ChatInstancegetChat(String network, String key, BuddyPluginBeta.ChatParticipant private_target, Object handler, boolean is_private_chat, Map<String, Object> options) getChats()private booleangetDisableNewMsgIndications(String net, String key) private StringgetDisplayName(String net, String key) booleanprivate booleangetEnableNotificationsPost(String net, String key) booleangetFavourite(String net, String key) booleanbooleanprivate ObjectgetGenericOption(String net, String key, String name) booleanbooleanprivate intgetIntOption(String net, String key, String name, int def) getLastMessageInfo(String net, String key) private booleangetLogMessages(String net, String key) intintlongbooleanintprivate booleangetPrivateFlag(String net, String key, int flag) private booleangetSaveMessages(String net, String key) booleanprivate booleangetSharedNick(String net, String key) booleanbooleanprivate StringgetStringOption(String net, String key, String name, String def) booleanprivate intgetViewType(String net, String key) booleanimportChat(String import_data) importDataSource(Map<String, Object> map) booleanbooleanbooleanprivate voidlogMessage(BuddyPluginBeta.ChatInstance chat, BuddyPluginBeta.ChatMessage message) private voidmigrateBooleans(Map<String, Long> map, String name) private voidmigrateByteArrays(Map<String, byte[]> map, String name) peekChatInstance(Download download) peekChatInstance(String network, String key) peekChatInstance(String network, String key, boolean create_if_missing) returns existing chat if found without adding a reference to it.peekChatInstances(Download download) private StringpkToString(byte[] pk) private voidprivate voidprivate voidremoveAllOptions(String net, String key) voidvoidprivate voidvoidprivate voidsetAutoMute(String net, String key, boolean b) private voidsetBooleanOption(String net, String key, String name, boolean value) private voidsetByteArrayOption(String net, String key, String name, byte[] value) voidprivate voidsetDisableNewMsgIndications(String net, String key, boolean b) private voidsetDisplayName(String net, String key, String str) voidsetEnableAutoDownloadChats(boolean b) private voidsetEnableNotificationsPost(String net, String key, boolean b) voidsetFavourite(String net, String key, boolean b) voidsetFlashEnabled(boolean b) voidsetFTUXAccepted(boolean accepted) private voidsetGenericOption(String net, String key, String name, Object value) voidsetHideRatings(boolean b) voidsetHideSearchSubs(boolean b) private voidsetIntOption(String net, String key, String name, int value) voidsetLastMessageInfo(String net, String key, String info) private voidsetLogMessages(String net, String key, boolean b) voidsetMaxUICharsKB(int num) voidsetMaxUILines(int num) voidvoidsetPostFriendKey(boolean b) voidsetPrivateChatState(int state) private voidsetPrivateFlag(String net, String key, int flag, boolean b) private voidsetSaveMessages(String net, String key, boolean b) voidsetSharedAnonEndpoint(boolean b) voidsetSharedAnonNickname(String _nick) private voidsetSharedNick(String net, String key, boolean b) voidsetSharedPublicNickname(String _nick) voidsetSoundEnabled(boolean b) voidsetSoundFile(String _file) voidsetStandAloneWindows(boolean b) private voidsetStringOption(String net, String key, String name, String value) voidsetUseIPFilter(boolean b) private voidsetViewType(String net, String key, int vt) voidsetWindowsToSidebar(boolean b) protected voidstartup()voidtagDownload(Download download) private voidtick()
-
Field Details
-
DEBUG_ENABLED
public static final boolean DEBUG_ENABLED -
BETA_CHAN_ENABLED
public static final boolean BETA_CHAN_ENABLED -
LEGACY_COMMUNITY_CHAT_KEY
- See Also:
-
COMMUNITY_CHAT_KEY
-
LEGACY_ANNOUNCE_CHAT_KEY
- See Also:
-
ANNOUNCE_CHAT_KEY
-
LEGACY_BETA_CHAT_KEY_DEAD
- See Also:
-
BETA_CHAT_KEY
-
PRIVATE_CHAT_DISABLED
public static final int PRIVATE_CHAT_DISABLED- See Also:
-
PRIVATE_CHAT_PINNED_ONLY
public static final int PRIVATE_CHAT_PINNED_ONLY- See Also:
-
PRIVATE_CHAT_ENABLED
public static final int PRIVATE_CHAT_ENABLED- See Also:
-
FLAGS_MSG_STATUS_KEY
- See Also:
-
FLAGS_MSG_STATUS_CHAT_NONE
private static final int FLAGS_MSG_STATUS_CHAT_NONE- See Also:
-
FLAGS_MSG_STATUS_CHAT_QUIT
private static final int FLAGS_MSG_STATUS_CHAT_QUIT- See Also:
-
FLAGS_MSG_ORIGIN_KEY
- See Also:
-
FLAGS_MSG_ORIGIN_USER
public static final int FLAGS_MSG_ORIGIN_USER- See Also:
-
FLAGS_MSG_ORIGIN_RATINGS
public static final int FLAGS_MSG_ORIGIN_RATINGS- See Also:
-
FLAGS_MSG_ORIGIN_SEED_REQ
public static final int FLAGS_MSG_ORIGIN_SEED_REQ- See Also:
-
FLAGS_MSG_ORIGIN_SUBS
public static final int FLAGS_MSG_ORIGIN_SUBS- See Also:
-
FLAGS_MSG_ORIGIN_SEARCH
public static final int FLAGS_MSG_ORIGIN_SEARCH- See Also:
-
FLAGS_MSG_FLASH_OVERRIDE
- See Also:
-
FLAGS_MSG_FLASH_NO
public static final int FLAGS_MSG_FLASH_NO- See Also:
-
FLAGS_MSG_FLASH_YES
public static final int FLAGS_MSG_FLASH_YES- See Also:
-
FLAGS_MSG_TYPE_KEY
- See Also:
-
FLAGS_MSG_TYPE_NORMAL
public static final int FLAGS_MSG_TYPE_NORMAL- See Also:
-
FLAGS_MSG_TYPE_ME
public static final int FLAGS_MSG_TYPE_ME- See Also:
-
VIEW_TYPE_DEFAULT
public static final int VIEW_TYPE_DEFAULT- See Also:
-
VIEW_TYPE_SHARING
public static final int VIEW_TYPE_SHARING- See Also:
-
PF_WELCOME_SHOWN
private static final int PF_WELCOME_SHOWN- See Also:
-
RSS_ITEMS_UNAVAILABLE
- See Also:
-
plugin
-
plugin_interface
-
enabled
-
dispatcher
-
chat_instances_map
-
chat_instances_list
-
azmsgsync_pi
-
timer
-
max_chat_ui_lines
private int max_chat_ui_lines -
max_chat_ui_kb
private int max_chat_ui_kb -
standalone_windows
private boolean standalone_windows -
windows_to_sidebar
private boolean windows_to_sidebar -
use_ip_filter
private boolean use_ip_filter -
enable_auto_dl_chats
private boolean enable_auto_dl_chats -
hide_ratings
private boolean hide_ratings -
hide_search_subs
private boolean hide_search_subs -
private_chat_state
private int private_chat_state -
custom_date_format
-
sound_enabled
private boolean sound_enabled -
sound_file
-
post_friend_key
private boolean post_friend_key -
flash_enabled
private boolean flash_enabled -
opts_map
-
ftux_listeners
-
ftux_accepted
private boolean ftux_accepted -
listeners
-
private_chat_id
-
init_complete
-
ip_filter
-
DOWNLOAD_PEEK_CACHE_KEY
-
dl_peek_dispatcher
-
auto_dup_pattern1
-
auto_dup_pattern2
-
auto_dup_pattern3
-
auto_dup_patterns
-
-
Constructor Details
-
BuddyPluginBeta
-
-
Method Details
-
isAvailable
public boolean isAvailable() -
isInitialised
public boolean isInitialised() -
getMaxUILines
public int getMaxUILines() -
setMaxUILines
public void setMaxUILines(int num) -
getMaxUICharsKB
public int getMaxUICharsKB() -
setMaxUICharsKB
public void setMaxUICharsKB(int num) -
getStandAloneWindows
public boolean getStandAloneWindows() -
setStandAloneWindows
public void setStandAloneWindows(boolean b) -
getWindowsToSidebar
public boolean getWindowsToSidebar() -
setWindowsToSidebar
public void setWindowsToSidebar(boolean b) -
getUseIPFilter
public boolean getUseIPFilter() -
setUseIPFilter
public void setUseIPFilter(boolean b) -
getEnableAutoDownloadChats
public boolean getEnableAutoDownloadChats() -
setEnableAutoDownloadChats
public void setEnableAutoDownloadChats(boolean b) -
getHideRatings
public boolean getHideRatings() -
setHideRatings
public void setHideRatings(boolean b) -
getHideSearchSubs
public boolean getHideSearchSubs() -
setHideSearchSubs
public void setHideSearchSubs(boolean b) -
getFavourite
-
setFavourite
-
getFavourites
-
resetIPFilters
private void resetIPFilters() -
tick
private void tick() -
getNick
-
setNick
-
getSaveMessages
-
setSaveMessages
-
getLogMessages
-
setLogMessages
-
getPrivateFlag
-
setPrivateFlag
-
getAutoMute
-
setAutoMute
-
getDisableNewMsgIndications
-
setDisableNewMsgIndications
-
getEnableNotificationsPost
-
setEnableNotificationsPost
-
getLastMessageInfo
-
setLastMessageInfo
-
getDisplayName
-
setDisplayName
-
getViewType
-
setViewType
-
migrateBooleans
-
migrateByteArrays
-
setBooleanOption
-
getBooleanOption
-
setIntOption
-
getIntOption
-
setStringOption
-
getStringOption
-
setByteArrayOption
-
getByteArrayOption
-
encodeKey
-
decodeKey
-
getGenericOption
-
setGenericOption
-
chatOptionsExists
-
removeAllOptions
-
getPrivateChatState
public int getPrivateChatState() -
setPrivateChatState
public void setPrivateChatState(int state) -
setPostFriendKey
public void setPostFriendKey(boolean b) -
getPostFriendKey
public boolean getPostFriendKey() -
getCustomDateFormat
-
setCustomDateFormat
-
setSoundEnabled
public void setSoundEnabled(boolean b) -
getSoundEnabled
public boolean getSoundEnabled() -
getSoundFile
-
setSoundFile
-
setFlashEnabled
public void setFlashEnabled(boolean b) -
getFlashEnabled
public boolean getFlashEnabled() -
allUpdated
private void allUpdated() -
startup
protected void startup() -
getDownloadTag
-
tagDownload
-
closedown
protected void closedown() -
pluginAdded
-
pluginRemoved
-
isI2PAvailable
public boolean isI2PAvailable() -
selectClassicTab
public void selectClassicTab() -
handleURI
- Throws:
Exception
-
extractLinks
-
escape
-
getFTUXAccepted
public boolean getFTUXAccepted() -
setFTUXAccepted
public void setFTUXAccepted(boolean accepted) -
addFTUXStateChangeListener
-
removeFTUXStateChangeListener
-
logMessage
-
getAndShowChat
- Throws:
Exception
-
showChat
- Throws:
Exception
-
pkToString
-
importChat
- Throws:
Exception
-
getChat
-
importDataSource
- Specified by:
importDataSourcein interfaceDataSourceResolver.DataSourceImporter
-
getChat
- Throws:
Exception
-
getChat
-
getChat
public BuddyPluginBeta.ChatInstance getChat(BuddyPluginBeta.ChatParticipant participant) throws Exception - Throws:
Exception
-
getChat
public BuddyPluginBeta.ChatInstance getChat(BuddyPluginBeta.ChatParticipant parent_participant, Object handler) throws Exception - Throws:
Exception
-
getChat
private BuddyPluginBeta.ChatInstance getChat(String network, String key, BuddyPluginBeta.ChatParticipant private_target, Object handler, boolean is_private_chat, Map<String, Object> options) throws Exception- Throws:
Exception
-
doBind
private void doBind(BuddyPluginBeta.ChatInstance chat, String meta_key, PluginInterface pi, Object handler, boolean destroy_on_fail) throws Exception - Throws:
Exception
-
peekChatInstance
-
peekChatInstance
-
peekChatInstances
-
peekChatInstance
public BuddyPluginBeta.ChatInstance peekChatInstance(String network, String key, boolean create_if_missing) returns existing chat if found without adding a reference to it. If create_if_missing supplied then this will create a new chat (and add a reference to it) so use this parameter with caution -
peekChat
-
peekChat
-
getChats
-
addChatActivity
private void addChatActivity(BuddyPluginBeta.ChatInstance inst, BuddyPluginBeta.ChatMessage message) -
getMyZoneOffset
public long getMyZoneOffset() -
generate
- Specified by:
generatein interfaceAEDiagnosticsEvidenceGenerator
-
addListener
-
removeListener
-