mirror of https://github.com/zlatinb/muwire
wip on chat
parent
761bf0a177
commit
b6f5ec7d22
|
@ -31,6 +31,7 @@ class MuWireSettings {
|
|||
boolean shareHiddenFiles
|
||||
boolean searchComments
|
||||
boolean browseFiles
|
||||
boolean enableChat
|
||||
Set<String> watchedDirectories
|
||||
float downloadSequentialRatio
|
||||
int hostClearInterval, hostHopelessInterval, hostRejectInterval
|
||||
|
@ -79,6 +80,7 @@ class MuWireSettings {
|
|||
speedSmoothSeconds = Integer.valueOf(props.getProperty("speedSmoothSeconds","60"))
|
||||
totalUploadSlots = Integer.valueOf(props.getProperty("totalUploadSlots","-1"))
|
||||
uploadSlotsPerUser = Integer.valueOf(props.getProperty("uploadSlotsPerUser","-1"))
|
||||
enableChat = Boolean.valueOf(props.getProperty("enableChat","false"))
|
||||
|
||||
watchedDirectories = DataUtil.readEncodedSet(props, "watchedDirectories")
|
||||
watchedKeywords = DataUtil.readEncodedSet(props, "watchedKeywords")
|
||||
|
@ -127,6 +129,7 @@ class MuWireSettings {
|
|||
props.setProperty("speedSmoothSeconds", String.valueOf(speedSmoothSeconds))
|
||||
props.setProperty("totalUploadSlots", String.valueOf(totalUploadSlots))
|
||||
props.setProperty("uploadSlotsPerUser", String.valueOf(uploadSlotsPerUser))
|
||||
props.setProperty("enableChat", String.valueOf(enableChat))
|
||||
|
||||
DataUtil.writeEncodedSet(watchedDirectories, "watchedDirectories", props)
|
||||
DataUtil.writeEncodedSet(watchedKeywords, "watchedKeywords", props)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
package com.muwire.core.chat;
|
||||
|
||||
public enum ChatConnectionAttemptStatus {
|
||||
SUCCESSFUL, REJECTED, FAILED
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.muwire.core.chat
|
||||
|
||||
import com.muwire.core.Event
|
||||
import com.muwire.core.Persona
|
||||
|
||||
class ChatConnectionEvent extends Event {
|
||||
ChatConnectionAttemptStatus status
|
||||
Persona persona
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.muwire.core.chat
|
||||
|
||||
import com.muwire.core.Event
|
||||
import com.muwire.core.Persona
|
||||
|
||||
class ChatDisconnectionEvent extends Event {
|
||||
Persona persona
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.muwire.core.chat
|
||||
|
||||
import com.muwire.core.Event
|
||||
import com.muwire.core.Persona
|
||||
|
||||
class ChatMessageEvent extends Event {
|
||||
String payload
|
||||
Persona sender
|
||||
String room
|
||||
long chatTime
|
||||
byte [] sig
|
||||
}
|
Loading…
Reference in New Issue