1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.xnap.plugin.limewire;
21
22 import org.xnap.util.AbstractPluginPreferences;
23
24 /***
25 * Provides the LimeWire preferences.
26 */
27 public class LimeWirePreferences extends AbstractPluginPreferences {
28
29
30
31 public static final int VERSION = 1;
32
33
34
35
36
37 public LimeWirePreferences()
38 {
39 super("plugin.limewire", VERSION);
40
41 setDefault("allowBrowser", "true");
42 setDefault("authenticatedConnectionsOnly", "false");
43 setDefault("autoConnect", "true");
44 setDefault("chatEnabled", "true");
45 setDefault("connectionTableColumns",
46 "host;status;msgCount;dropped;bandwidth;hosts;protocol;vendor;uptime");
47 setDefault("disableUltraPeer", "false");
48 setDefault("forcedIPAddressString", "0.0.0.0");
49 setDefault("forcedPort", "6349");
50 setDefault("forceIPAdress", "false");
51 setDefault("port", "6349");
52 }
53
54
55
56 public void convert(int oldVersion)
57 {
58
59 }
60
61 public boolean getAuthenticatedConnectionsOnly() {
62 return getBoolean("authenticatedConnectionsOnly");
63 }
64
65 public void setAuthenticatedConnectionsOnly(boolean newValue) {
66 set("authenticatedConnectionsOnly", newValue);
67 }
68
69 public boolean getAutoConnect() {
70 return getBoolean("autoConnect");
71 }
72
73 public void setAutoConnect(boolean newValue) {
74 set("autoConnect", newValue);
75 }
76
77 public boolean getDisableUltraPeer() {
78 return getBoolean("disableUltraPeer");
79 }
80
81 public void setDisableUltraPeer(boolean newValue) {
82 set("disableUltraPeer", newValue);
83 }
84
85 public int getPort() {
86 return getInt("port");
87 }
88
89 public void setPort(int newValue) {
90 set("port", newValue);
91 }
92
93 }