]> git.proxmox.com Git - extjs.git/blame - extjs/packages/legacy/modern/src/device/connection/Abstract.js
add extjs 6.0.1 sources
[extjs.git] / extjs / packages / legacy / modern / src / device / connection / Abstract.js
CommitLineData
6527f429
DM
1/**\r
2 * @private\r
3 */\r
4Ext.define('Ext.device.connection.Abstract', {\r
5 extend: 'Ext.Evented',\r
6 mixins: ['Ext.mixin.Observable'],\r
7\r
8 config: {\r
9 online: false,\r
10 type: null\r
11 },\r
12\r
13 /**\r
14 * @event online\r
15 * Fires when the device goes online\r
16 */\r
17 \r
18 /**\r
19 * @event offline\r
20 * Fires when the device goes offline\r
21 */\r
22\r
23 /**\r
24 * @property {String} UNKNOWN\r
25 * Text label for a connection type.\r
26 */\r
27 UNKNOWN: 'Unknown connection',\r
28\r
29 /**\r
30 * @property {String} ETHERNET\r
31 * Text label for a connection type.\r
32 */\r
33 ETHERNET: 'Ethernet connection',\r
34\r
35 /**\r
36 * @property {String} WIFI\r
37 * Text label for a connection type.\r
38 */\r
39 WIFI: 'WiFi connection',\r
40\r
41 /**\r
42 * @property {String} CELL_2G\r
43 * Text label for a connection type.\r
44 */\r
45 CELL_2G: 'Cell 2G connection',\r
46\r
47 /**\r
48 * @property {String} CELL_3G\r
49 * Text label for a connection type.\r
50 */\r
51 CELL_3G: 'Cell 3G connection',\r
52\r
53 /**\r
54 * @property {String} CELL_4G\r
55 * Text label for a connection type.\r
56 */\r
57 CELL_4G: 'Cell 4G connection',\r
58\r
59 /**\r
60 * @property {String} NONE\r
61 * Text label for a connection type.\r
62 */\r
63 NONE: 'No network connection',\r
64\r
65 /**\r
66 * True if the device is currently online\r
67 * @return {Boolean} online\r
68 */\r
69 isOnline: function() {\r
70 return this.getOnline();\r
71 }\r
72\r
73 /**\r
74 * @method getType\r
75 * Returns the current connection type.\r
76 * @return {String} type\r
77 */\r
78});\r