Package com.biglybt.plugin.net.buddy
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 class
static class
class
static interface
static interface
class
class
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
private static Pattern
private static Pattern
private static Pattern
private static Pattern[]
private PluginInterface
static final boolean
static final String
private Map<String,
BuddyPluginBeta.ChatInstance> static final String
private String
static final boolean
private AsyncDispatcher
private static AsyncDispatcher
private static final Object
private boolean
private BooleanParameter
static final int
static final String
static final int
static final String
static final int
static final int
static final int
static final int
static final int
private static final int
private static final int
private static final String
static final String
static final int
static final int
private boolean
private boolean
private boolean
private boolean
private AESemaphore
private final IpFilter
static final String
static final String
static final String
private int
private int
private BuddyPlugin
private PluginInterface
private boolean
static final int
static final int
private AtomicInteger
static final int
private int
static final String
private boolean
private String
private String
private boolean
private String
private boolean
private TimerEventPeriodic
private boolean
static final int
static final int
private boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BuddyPluginBeta
(PluginInterface _pi, BuddyPlugin _plugin, BooleanParameter _enabled) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
void
addListener
(BuddyPluginBeta.ChatManagerListener l, boolean fire_for_existing) private void
private boolean
chatOptionsExists
(String net, String key) protected void
private String
private void
doBind
(BuddyPluginBeta.ChatInstance chat, String meta_key, PluginInterface pi, Object handler, boolean destroy_on_fail) private String
private String
extractLinks
(String str) void
generate
(IndentWriter writer) getAndShowChat
(String network, String key) private boolean
getAutoMute
(String net, String key) private boolean
getBooleanOption
(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.ChatInstance
getChat
(String network, String key, BuddyPluginBeta.ChatParticipant private_target, Object handler, boolean is_private_chat, Map<String, Object> options) getChats()
private boolean
getDisableNewMsgIndications
(String net, String key) private String
getDisplayName
(String net, String key) boolean
private boolean
getEnableNotificationsPost
(String net, String key) boolean
getFavourite
(String net, String key) boolean
boolean
private Object
getGenericOption
(String net, String key, String name) boolean
boolean
private int
getIntOption
(String net, String key, String name, int def) getLastMessageInfo
(String net, String key) private boolean
getLogMessages
(String net, String key) int
int
long
boolean
int
private boolean
getSaveMessages
(String net, String key) boolean
private boolean
getSharedNick
(String net, String key) boolean
boolean
private String
getStringOption
(String net, String key, String name, String def) boolean
private int
getViewType
(String net, String key) boolean
importChat
(String import_data) importDataSource
(Map<String, Object> map) boolean
boolean
boolean
private void
logMessage
(BuddyPluginBeta.ChatInstance chat, BuddyPluginBeta.ChatMessage message) private void
migrateBooleans
(Map<String, Long> map, String name) private void
migrateByteArrays
(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 String
pkToString
(byte[] pk) private void
private void
private void
removeAllOptions
(String net, String key) void
void
private void
void
private void
setAutoMute
(String net, String key, boolean b) private void
setBooleanOption
(String net, String key, String name, boolean value) private void
setByteArrayOption
(String net, String key, String name, byte[] value) void
private void
setDisableNewMsgIndications
(String net, String key, boolean b) private void
setDisplayName
(String net, String key, String str) void
setEnableAutoDownloadChats
(boolean b) private void
setEnableNotificationsPost
(String net, String key, boolean b) void
setFavourite
(String net, String key, boolean b) void
setFlashEnabled
(boolean b) void
setFTUXAccepted
(boolean accepted) private void
setGenericOption
(String net, String key, String name, Object value) void
setHideRatings
(boolean b) void
setHideSearchSubs
(boolean b) private void
setIntOption
(String net, String key, String name, int value) void
setLastMessageInfo
(String net, String key, String info) private void
setLogMessages
(String net, String key, boolean b) void
setMaxUICharsKB
(int num) void
setMaxUILines
(int num) void
void
setPostFriendKey
(boolean b) void
setPrivateChatState
(int state) private void
setSaveMessages
(String net, String key, boolean b) void
setSharedAnonEndpoint
(boolean b) void
setSharedAnonNickname
(String _nick) private void
setSharedNick
(String net, String key, boolean b) void
setSharedPublicNickname
(String _nick) void
setSoundEnabled
(boolean b) void
setSoundFile
(String _file) void
setStandAloneWindows
(boolean b) private void
setStringOption
(String net, String key, String name, String value) void
setUseIPFilter
(boolean b) private void
setViewType
(String net, String key, int vt) void
setWindowsToSidebar
(boolean b) protected void
startup()
void
tagDownload
(Download download) private void
tick()
-
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:
-
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
-
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:
importDataSource
in interfaceDataSourceResolver.DataSourceImporter
-
getChat
- Throws:
Exception
-
getChat
public BuddyPluginBeta.ChatInstance getChat(String network, String key, Map<String, Object> options) throws Exception- Throws:
Exception
-
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:
generate
in interfaceAEDiagnosticsEvidenceGenerator
-
addListener
-
removeListener
-