summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web/js/deluge-all/data/PeerRecord.js
blob: 7f3376939839a4dcdfe6e5679e044945e18fd59a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
 * Deluge.data.PeerRecord.js
 *
 * Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
 *
 * This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
 * the additional special exception to link portions of this program with the OpenSSL library.
 * See LICENSE for more details.
 */
Ext.namespace('Deluge.data');

/**
 * Deluge.data.Peer record
 *
 * @author Damien Churchill <damoxc@gmail.com>
 * @version 1.3
 *
 * @class Deluge.data.Peer
 * @extends Ext.data.Record
 * @constructor
 * @param {Object} data The peer data
 */
Deluge.data.Peer = Ext.data.Record.create([
    {
        name: 'country',
        type: 'string',
    },
    {
        name: 'ip',
        type: 'string',
        sortType: Deluge.data.SortTypes.asIPAddress,
    },
    {
        name: 'client',
        type: 'string',
    },
    {
        name: 'progress',
        type: 'float',
    },
    {
        name: 'down_speed',
        type: 'int',
    },
    {
        name: 'up_speed',
        type: 'int',
    },
    {
        name: 'seed',
        type: 'int',
    },
]);