forked from hslbck/gnome-shell-extension-radio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchannel.js
49 lines (39 loc) · 986 Bytes
/
channel.js
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
/* jshint esnext:true */
const Lang = imports.lang;
const Channel = new Lang.Class({
Name: 'Channel',
_init: function (name, uri, favourite, encoding) {
this._name = name;
this._uri = uri;
this._favourite = favourite;
this._encoding = encoding;
},
setName: function (name) {
this._name = name;
},
setUri: function (uri) {
this._uri = uri;
},
setFavourite: function (favourite) {
this._favourite = favourite;
},
setEncoding: function (encoding) {
this._encoding = encoding;
},
getName: function () {
return this._name;
},
getUri: function () {
return this._uri;
},
getFavourite: function () {
return this._favourite;
},
getEncoding: function () {
if(typeof this._encoding === 'string') {
return this._encoding.toLowerCase();
} else {
return this._encoding;
}
}
});