Amazon Kinesis Webrtc C SDK
StateMachine.h
Go to the documentation of this file.
1 /*******************************************
2 Signaling State Machine internal include file
3 *******************************************/
4 #ifndef __KINESIS_VIDEO_WEBRTC_SIGNALING_STATE_MACHINE__
5 #define __KINESIS_VIDEO_WEBRTC_SIGNALING_STATE_MACHINE__
6 
7 #pragma once
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
16 #define SIGNALING_STATE_NONE ((UINT64) 0)
17 #define SIGNALING_STATE_NEW ((UINT64) (1 << 0))
18 #define SIGNALING_STATE_GET_TOKEN ((UINT64) (1 << 1))
19 #define SIGNALING_STATE_DESCRIBE ((UINT64) (1 << 2))
20 #define SIGNALING_STATE_CREATE ((UINT64) (1 << 3))
21 #define SIGNALING_STATE_GET_ENDPOINT ((UINT64) (1 << 4))
22 #define SIGNALING_STATE_GET_ICE_CONFIG ((UINT64) (1 << 5))
23 #define SIGNALING_STATE_READY ((UINT64) (1 << 6))
24 #define SIGNALING_STATE_CONNECT ((UINT64) (1 << 7))
25 #define SIGNALING_STATE_CONNECTED ((UINT64) (1 << 8))
26 #define SIGNALING_STATE_DISCONNECTED ((UINT64) (1 << 9))
27 #define SIGNALING_STATE_DELETE ((UINT64) (1 << 10))
28 #define SIGNALING_STATE_DELETED ((UINT64) (1 << 11))
29 #define SIGNALING_STATE_DESCRIBE_MEDIA ((UINT64) (1 << 12))
30 #define SIGNALING_STATE_JOIN_SESSION ((UINT64) (1 << 13))
31 #define SIGNALING_STATE_JOIN_SESSION_WAITING ((UINT64) (1 << 14))
32 #define SIGNALING_STATE_JOIN_SESSION_CONNECTED ((UINT64) (1 << 15))
33 
34 // Indicates infinite retries
35 #define INFINITE_RETRY_COUNT_SENTINEL 0
36 
37 // Whether to step the state machine
38 STATUS signalingStateMachineIterator(PSignalingClient, UINT64, UINT64);
39 
42 
46 STATUS fromNewSignalingState(UINT64, PUINT64);
47 STATUS executeNewSignalingState(UINT64, UINT64);
48 STATUS fromGetTokenSignalingState(UINT64, PUINT64);
49 STATUS executeGetTokenSignalingState(UINT64, UINT64);
50 STATUS fromDescribeSignalingState(UINT64, PUINT64);
51 STATUS executeDescribeSignalingState(UINT64, UINT64);
52 STATUS fromDescribeMediaStorageConfState(UINT64, PUINT64);
53 STATUS executeDescribeMediaStorageConfState(UINT64, UINT64);
54 STATUS fromCreateSignalingState(UINT64, PUINT64);
55 STATUS executeCreateSignalingState(UINT64, UINT64);
56 STATUS fromGetEndpointSignalingState(UINT64, PUINT64);
57 STATUS executeGetEndpointSignalingState(UINT64, UINT64);
58 STATUS fromGetIceConfigSignalingState(UINT64, PUINT64);
59 STATUS executeGetIceConfigSignalingState(UINT64, UINT64);
60 STATUS fromReadySignalingState(UINT64, PUINT64);
61 STATUS executeReadySignalingState(UINT64, UINT64);
62 STATUS fromConnectSignalingState(UINT64, PUINT64);
63 STATUS executeConnectSignalingState(UINT64, UINT64);
64 STATUS fromJoinStorageSessionState(UINT64, PUINT64);
65 STATUS executeJoinStorageSessionState(UINT64, UINT64);
66 STATUS fromJoinStorageSessionWaitingState(UINT64, PUINT64);
67 STATUS executeJoinStorageSessionWaitingState(UINT64, UINT64);
68 STATUS fromJoinStorageSessionConnectedState(UINT64, PUINT64);
69 STATUS executeJoinStorageSessionConnectedState(UINT64, UINT64);
70 STATUS fromConnectedSignalingState(UINT64, PUINT64);
71 STATUS executeConnectedSignalingState(UINT64, UINT64);
72 STATUS fromDisconnectedSignalingState(UINT64, PUINT64);
73 STATUS executeDisconnectedSignalingState(UINT64, UINT64);
74 STATUS fromDeleteSignalingState(UINT64, PUINT64);
75 STATUS executeDeleteSignalingState(UINT64, UINT64);
76 STATUS fromDeletedSignalingState(UINT64, PUINT64);
77 STATUS executeDeletedSignalingState(UINT64, UINT64);
78 
79 STATUS defaultSignalingStateTransitionHook(UINT64, PUINT64);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 #endif /* __KINESIS_VIDEO_WEBRTC_SIGNALING_STATE_MACHINE__ */
STATUS executeNewSignalingState(UINT64, UINT64)
Definition: StateMachine.c:286
STATUS executeReadySignalingState(UINT64, UINT64)
Definition: StateMachine.c:755
STATUS executeGetEndpointSignalingState(UINT64, UINT64)
Definition: StateMachine.c:618
STATUS executeDescribeMediaStorageConfState(UINT64, UINT64)
Definition: StateMachine.c:500
STATUS signalingStateMachineIterator(PSignalingClient, UINT64, UINT64)
Definition: StateMachine.c:118
STATUS executeDisconnectedSignalingState(UINT64, UINT64)
Definition: StateMachine.c:1238
STATUS defaultSignalingStateTransitionHook(UINT64, PUINT64)
Definition: StateMachine.c:75
STATUS fromJoinStorageSessionState(UINT64, PUINT64)
Definition: StateMachine.c:954
STATUS fromConnectSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:778
STATUS executeGetIceConfigSignalingState(UINT64, UINT64)
Definition: StateMachine.c:687
STATUS fromDescribeSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:384
STATUS executeJoinStorageSessionState(UINT64, UINT64)
Definition: StateMachine.c:1021
STATUS fromGetTokenSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:309
STATUS fromJoinStorageSessionConnectedState(UINT64, PUINT64)
Definition: StateMachine.c:1134
STATUS executeConnectedSignalingState(UINT64, UINT64)
Definition: StateMachine.c:933
STATUS executeDeletedSignalingState(UINT64, UINT64)
Definition: StateMachine.c:1344
STATUS fromJoinStorageSessionWaitingState(UINT64, PUINT64)
Definition: StateMachine.c:1047
STATUS executeCreateSignalingState(UINT64, UINT64)
Definition: StateMachine.c:559
STATUS fromDescribeMediaStorageConfState(UINT64, PUINT64)
Definition: StateMachine.c:458
STATUS executeJoinStorageSessionWaitingState(UINT64, UINT64)
Definition: StateMachine.c:1091
STATUS fromDeleteSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:1259
STATUS executeDescribeSignalingState(UINT64, UINT64)
Definition: StateMachine.c:431
STATUS fromGetEndpointSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:586
STATUS executeDeleteSignalingState(UINT64, UINT64)
Definition: StateMachine.c:1301
STATUS fromConnectedSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:870
STATUS fromGetIceConfigSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:646
STATUS fromReadySignalingState(UINT64, PUINT64)
Definition: StateMachine.c:714
STATUS fromDisconnectedSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:1202
STATUS executeJoinStorageSessionConnectedState(UINT64, UINT64)
Definition: StateMachine.c:1181
STATUS fromNewSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:267
STATUS acceptSignalingStateMachineState(PSignalingClient, UINT64)
Definition: StateMachine.c:240
STATUS executeGetTokenSignalingState(UINT64, UINT64)
Definition: StateMachine.c:342
SIGNALING_CLIENT_STATE getSignalingStateFromStateMachineState(UINT64)
Definition: StateMachine.c:178
STATUS executeConnectSignalingState(UINT64, UINT64)
Definition: StateMachine.c:846
STATUS fromCreateSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:526
STATUS fromDeletedSignalingState(UINT64, PUINT64)
Definition: StateMachine.c:1326
SIGNALING_CLIENT_STATE
Defines different states a signaling client traverses.
Definition: Include.h:893
Definition: Signaling.h:225