1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.xnap.plugin.opennap.util;
21
22 import org.xnap.XNap;
23 import org.xnap.util.LinkType;
24
25 /***
26 * Provides a mapping between connection speed and common internet acces
27 * hardware.
28 */
29 public class OpenNapLinkType
30 {
31
32
33
34 public static final LinkType MODEM144
35 = new LinkType(XNap.tr("14.4 kbps"), 14);
36
37 public static final LinkType MODEM288
38 = new LinkType(XNap.tr("28.8 kbps"), 28);
39
40 public static final LinkType MODEM336
41 = new LinkType(XNap.tr("33.6 kbps"), 33);
42
43 public static final LinkType MODEM567
44 = new LinkType(XNap.tr("56.7 kbps"), 56);
45
46 public static final LinkType ISDN64
47 = new LinkType(XNap.tr("64K ISDN"), 64);
48
49 public static final LinkType ISDN128
50 = new LinkType(XNap.tr("128K ISDN"), 128);
51
52 public static final LinkType T1 = new LinkType(XNap.tr("T1"), 3000);
53
54 public static final LinkType[] TYPES = {
55 LinkType.UNKNOWN, MODEM144, MODEM288, MODEM336, MODEM567,
56 ISDN64, ISDN128, LinkType.CABLE, LinkType.DSL, T1, LinkType.T3
57 };
58
59
60
61
62
63
64 public static int getIndexOfType(int speed)
65 {
66 return LinkType.getIndexOfType(TYPES, speed);
67 }
68
69 /***
70 * @see LinkType#getType(int)
71 */
72 public static LinkType getType(int speed)
73 {
74 return LinkType.getType(TYPES, speed);
75 }
76
77 }