Quellcode durchsuchen

feat(ts) TypeScript enum for VideoSIPGWConstants

dev1
Gary Hunt vor 3 Jahren
Ursprung
Commit
74721c4800
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden

+ 0
- 63
modules/videosipgw/VideoSIPGWConstants.js Datei anzeigen

@@ -1,63 +0,0 @@
1
-/**
2
- * Status that video SIP GW service is available.
3
- * @type {string}
4
- */
5
-export const STATUS_AVAILABLE = 'available';
6
-
7
-/**
8
- * Status that video SIP GW service is not available.
9
- * @type {string}
10
- */
11
-export const STATUS_UNDEFINED = 'undefined';
12
-
13
-/**
14
- * Status that video SIP GW service is available but there are no free nodes
15
- * at the moment to serve new requests.
16
- * @type {string}
17
- */
18
-export const STATUS_BUSY = 'busy';
19
-
20
-/**
21
- * Video SIP GW session state, currently running.
22
- * @type {string}
23
- */
24
-export const STATE_ON = 'on';
25
-
26
-/**
27
- * Video SIP GW session state, currently stopped and not running.
28
- * @type {string}
29
- */
30
-export const STATE_OFF = 'off';
31
-
32
-/**
33
- * Video SIP GW session state, currently is starting.
34
- * @type {string}
35
- */
36
-export const STATE_PENDING = 'pending';
37
-
38
-/**
39
- * Video SIP GW session state, has observed some issues and is retrying at the
40
- * moment.
41
- * @type {string}
42
- */
43
-export const STATE_RETRYING = 'retrying';
44
-
45
-/**
46
- * Video SIP GW session state, tried to start but it failed.
47
- * @type {string}
48
- */
49
-export const STATE_FAILED = 'failed';
50
-
51
-/**
52
- * Error on trying to create video SIP GW session in conference where
53
- * there is no room connection (hasn't joined or has left the room).
54
- * @type {string}
55
- */
56
-export const ERROR_NO_CONNECTION = 'error_no_connection';
57
-
58
-/**
59
- * Error on trying to create video SIP GW session with address for which
60
- * there is an already created session.
61
- * @type {string}
62
- */
63
-export const ERROR_SESSION_EXISTS = 'error_session_already_exists';

+ 73
- 0
modules/videosipgw/VideoSIPGWConstants.ts Datei anzeigen

@@ -0,0 +1,73 @@
1
+export enum VideoSIPGWStatusConstants {
2
+    /**
3
+     * Status that video SIP GW service is available.
4
+     */
5
+    STATUS_AVAILABLE = 'available',
6
+
7
+    /**
8
+     * Status that video SIP GW service is not available.
9
+     */
10
+    STATUS_UNDEFINED = 'undefined',
11
+
12
+    /**
13
+     * Status that video SIP GW service is available but there are no free nodes
14
+     * at the moment to serve new requests.
15
+     */
16
+    STATUS_BUSY = 'busy'
17
+};
18
+
19
+export enum VideoSIPGWStateConstants {
20
+    /**
21
+     * Video SIP GW session state, currently running.
22
+     */
23
+    STATE_ON = 'on',
24
+
25
+    /**
26
+     * Video SIP GW session state, currently stopped and not running.
27
+     */
28
+    STATE_OFF = 'off',
29
+
30
+    /**
31
+     * Video SIP GW session state, currently is starting.
32
+     */
33
+    STATE_PENDING = 'pending',
34
+
35
+    /**
36
+     * Video SIP GW session state, has observed some issues and is retrying at the
37
+     * moment.
38
+     */
39
+    STATE_RETRYING = 'retrying',
40
+
41
+    /**
42
+     * Video SIP GW session state, tried to start but it failed.
43
+     */
44
+    STATE_FAILED = 'failed'
45
+};
46
+
47
+export enum VideoSIPGWErrorConstants {
48
+    /**
49
+     * Error on trying to create video SIP GW session in conference where
50
+     * there is no room connection (hasn't joined or has left the room).
51
+     */
52
+    ERROR_NO_CONNECTION = 'error_no_connection',
53
+
54
+    /**
55
+     * Error on trying to create video SIP GW session with address for which
56
+     * there is an already created session.
57
+     */
58
+    ERROR_SESSION_EXISTS = 'error_session_already_exists'
59
+};
60
+
61
+// exported for backward compatibility
62
+export const STATUS_AVAILABLE = VideoSIPGWStatusConstants.STATUS_AVAILABLE;
63
+export const STATUS_UNDEFINED = VideoSIPGWStatusConstants.STATUS_UNDEFINED;
64
+export const STATUS_BUSY = VideoSIPGWStatusConstants.STATUS_BUSY;
65
+
66
+export const STATE_ON = VideoSIPGWStateConstants.STATE_ON;
67
+export const STATE_OFF = VideoSIPGWStateConstants.STATE_OFF;
68
+export const STATE_PENDING = VideoSIPGWStateConstants.STATE_PENDING;
69
+export const STATE_RETRYING = VideoSIPGWStateConstants.STATE_RETRYING;
70
+export const STATE_FAILED = VideoSIPGWStateConstants.STATE_FAILED;
71
+
72
+export const ERROR_NO_CONNECTION = VideoSIPGWErrorConstants.ERROR_NO_CONNECTION;
73
+export const ERROR_SESSION_EXISTS = VideoSIPGWErrorConstants.ERROR_SESSION_EXISTS;

+ 60
- 54
types/auto/modules/videosipgw/VideoSIPGWConstants.d.ts Datei anzeigen

@@ -1,54 +1,60 @@
1
-/**
2
- * Status that video SIP GW service is available.
3
- * @type {string}
4
- */
5
-export const STATUS_AVAILABLE: string;
6
-/**
7
- * Status that video SIP GW service is not available.
8
- * @type {string}
9
- */
10
-export const STATUS_UNDEFINED: string;
11
-/**
12
- * Status that video SIP GW service is available but there are no free nodes
13
- * at the moment to serve new requests.
14
- * @type {string}
15
- */
16
-export const STATUS_BUSY: string;
17
-/**
18
- * Video SIP GW session state, currently running.
19
- * @type {string}
20
- */
21
-export const STATE_ON: string;
22
-/**
23
- * Video SIP GW session state, currently stopped and not running.
24
- * @type {string}
25
- */
26
-export const STATE_OFF: string;
27
-/**
28
- * Video SIP GW session state, currently is starting.
29
- * @type {string}
30
- */
31
-export const STATE_PENDING: string;
32
-/**
33
- * Video SIP GW session state, has observed some issues and is retrying at the
34
- * moment.
35
- * @type {string}
36
- */
37
-export const STATE_RETRYING: string;
38
-/**
39
- * Video SIP GW session state, tried to start but it failed.
40
- * @type {string}
41
- */
42
-export const STATE_FAILED: string;
43
-/**
44
- * Error on trying to create video SIP GW session in conference where
45
- * there is no room connection (hasn't joined or has left the room).
46
- * @type {string}
47
- */
48
-export const ERROR_NO_CONNECTION: string;
49
-/**
50
- * Error on trying to create video SIP GW session with address for which
51
- * there is an already created session.
52
- * @type {string}
53
- */
54
-export const ERROR_SESSION_EXISTS: string;
1
+export declare enum VideoSIPGWStatusConstants {
2
+    /**
3
+     * Status that video SIP GW service is available.
4
+     */
5
+    STATUS_AVAILABLE = "available",
6
+    /**
7
+     * Status that video SIP GW service is not available.
8
+     */
9
+    STATUS_UNDEFINED = "undefined",
10
+    /**
11
+     * Status that video SIP GW service is available but there are no free nodes
12
+     * at the moment to serve new requests.
13
+     */
14
+    STATUS_BUSY = "busy"
15
+}
16
+export declare enum VideoSIPGWStateConstants {
17
+    /**
18
+     * Video SIP GW session state, currently running.
19
+     */
20
+    STATE_ON = "on",
21
+    /**
22
+     * Video SIP GW session state, currently stopped and not running.
23
+     */
24
+    STATE_OFF = "off",
25
+    /**
26
+     * Video SIP GW session state, currently is starting.
27
+     */
28
+    STATE_PENDING = "pending",
29
+    /**
30
+     * Video SIP GW session state, has observed some issues and is retrying at the
31
+     * moment.
32
+     */
33
+    STATE_RETRYING = "retrying",
34
+    /**
35
+     * Video SIP GW session state, tried to start but it failed.
36
+     */
37
+    STATE_FAILED = "failed"
38
+}
39
+export declare enum VideoSIPGWErrorConstants {
40
+    /**
41
+     * Error on trying to create video SIP GW session in conference where
42
+     * there is no room connection (hasn't joined or has left the room).
43
+     */
44
+    ERROR_NO_CONNECTION = "error_no_connection",
45
+    /**
46
+     * Error on trying to create video SIP GW session with address for which
47
+     * there is an already created session.
48
+     */
49
+    ERROR_SESSION_EXISTS = "error_session_already_exists"
50
+}
51
+export declare const STATUS_AVAILABLE = VideoSIPGWStatusConstants.STATUS_AVAILABLE;
52
+export declare const STATUS_UNDEFINED = VideoSIPGWStatusConstants.STATUS_UNDEFINED;
53
+export declare const STATUS_BUSY = VideoSIPGWStatusConstants.STATUS_BUSY;
54
+export declare const STATE_ON = VideoSIPGWStateConstants.STATE_ON;
55
+export declare const STATE_OFF = VideoSIPGWStateConstants.STATE_OFF;
56
+export declare const STATE_PENDING = VideoSIPGWStateConstants.STATE_PENDING;
57
+export declare const STATE_RETRYING = VideoSIPGWStateConstants.STATE_RETRYING;
58
+export declare const STATE_FAILED = VideoSIPGWStateConstants.STATE_FAILED;
59
+export declare const ERROR_NO_CONNECTION = VideoSIPGWErrorConstants.ERROR_NO_CONNECTION;
60
+export declare const ERROR_SESSION_EXISTS = VideoSIPGWErrorConstants.ERROR_SESSION_EXISTS;

Laden…
Abbrechen
Speichern