forked from svt/bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
54 lines (50 loc) · 1.1 KB
/
index.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
50
51
52
53
54
// SPDX-FileCopyrightText: 2022 Sveriges Television AB
//
// SPDX-License-Identifier: MIT
const DIController = require('../../shared/DIController')
require('./SItems')
require('./SState')
require('./STypes')
require('./SClient')
require('./SEvents')
require('./SServer')
require('./SSystem')
require('./SWindow')
require('./SSettings')
require('./SShortcuts')
require('./SVariables')
require('./SCommands')
/**
* This is the base class
* for the server API (SAPI)
*/
class SAPI {
constructor (props) {
this.shortcuts = props.SShortcuts
this.variables = props.SVariables
this.commands = props.SCommands
this.settings = props.SSettings
this.client = props.SClient
this.events = props.SEvents
this.server = props.SServer
this.system = props.SSystem
this.window = props.SWindow
this.items = props.SItems
this.state = props.SState
this.types = props.STypes
}
}
DIController.main.register('SAPI', SAPI, [
'SShortcuts',
'SVariables',
'SCommands',
'SSettings',
'SClient',
'SEvents',
'SServer',
'SSystem',
'SWindow',
'STypes',
'SState',
'SItems'
])