Amazon Kinesis Webrtc C SDK
TurnConnectionStateMachine.h
Go to the documentation of this file.
1 /***************************************************
2 TURN Connections State Machine internal include file
3 ***************************************************/
4 #ifndef __KINESIS_VIDEO_WEBRTC_TURN_STATE_MACHINE__
5 #define __KINESIS_VIDEO_WEBRTC_TURN_STATE_MACHINE__
6 
7 #pragma once
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
28 #define TURN_STATE_NONE ((UINT64) 0) // 0x000000000
29 #define TURN_STATE_NEW ((UINT64) (1 << 0)) // 0x000000001
30 #define TURN_STATE_CHECK_SOCKET_CONNECTION ((UINT64) (1 << 1)) // 0x000000002
31 #define TURN_STATE_GET_CREDENTIALS ((UINT64) (1 << 2)) // 0x000000004
32 #define TURN_STATE_ALLOCATION ((UINT64) (1 << 3)) // 0x000000008
33 #define TURN_STATE_CREATE_PERMISSION ((UINT64) (1 << 4)) // 0x000000010
34 #define TURN_STATE_BIND_CHANNEL ((UINT64) (1 << 5)) // 0x000000020
35 #define TURN_STATE_READY ((UINT64) (1 << 6)) // 0x000000040
36 #define TURN_STATE_CLEAN_UP ((UINT64) (1 << 7)) // 0x000000080
37 #define TURN_STATE_FAILED ((UINT64) (1 << 8)) // 0x000000100
38 
39 #define TURN_STATE_NONE_STR (PCHAR) "TURN_STATE_NONE"
40 #define TURN_STATE_NEW_STR (PCHAR) "TURN_STATE_NEW"
41 #define TURN_STATE_CHECK_SOCKET_CONNECTION_STR (PCHAR) "TURN_STATE_CHECK_SOCKET_CONNECTION"
42 #define TURN_STATE_GET_CREDENTIALS_STR (PCHAR) "TURN_STATE_GET_CREDENTIALS"
43 #define TURN_STATE_ALLOCATION_STR (PCHAR) "TURN_STATE_ALLOCATION"
44 #define TURN_STATE_CREATE_PERMISSION_STR (PCHAR) "TURN_STATE_CREATE_PERMISSION"
45 #define TURN_STATE_BIND_CHANNEL_STR (PCHAR) "TURN_STATE_BIND_CHANNEL"
46 #define TURN_STATE_READY_STR (PCHAR) "TURN_STATE_READY"
47 #define TURN_STATE_CLEAN_UP_STR (PCHAR) "TURN_STATE_CLEAN_UP"
48 #define TURN_STATE_FAILED_STR (PCHAR) "TURN_STATE_FAILED"
49 #define TURN_STATE_UNKNOWN_STR (PCHAR) "TURN_STATE_UNKNOWN"
50 
51 // Whether to step the state machine
54 PCHAR turnStateGetStateStr(UINT64 state);
55 
59 STATUS fromNewTurnState(UINT64, PUINT64);
60 STATUS executeNewTurnState(UINT64, UINT64);
61 STATUS fromCheckSocketConnectionTurnState(UINT64, PUINT64);
62 STATUS executeCheckSocketConnectionTurnState(UINT64, UINT64);
63 STATUS fromGetCredentialsTurnState(UINT64, PUINT64);
64 STATUS executeGetCredentialsTurnState(UINT64, UINT64);
65 STATUS fromAllocationTurnState(UINT64, PUINT64);
66 STATUS executeAllocationTurnState(UINT64, UINT64);
67 STATUS fromCreatePermissionTurnState(UINT64, PUINT64);
68 STATUS executeCreatePermissionTurnState(UINT64, UINT64);
69 STATUS fromBindChannelTurnState(UINT64, PUINT64);
70 STATUS executeBindChannelTurnState(UINT64, UINT64);
71 STATUS fromReadyTurnState(UINT64, PUINT64);
72 STATUS executeReadyTurnState(UINT64, UINT64);
73 STATUS fromCleanUpTurnState(UINT64, PUINT64);
74 STATUS executeCleanUpTurnState(UINT64, UINT64);
75 STATUS fromFailedTurnState(UINT64, PUINT64);
76 STATUS executeFailedTurnState(UINT64, UINT64);
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 #endif /* __KINESIS_VIDEO_WEBRTC_TURN_STATE_MACHINE__ */
STATUS executeNewTurnState(UINT64, UINT64)
Definition: TurnConnectionStateMachine.c:146
STATUS executeCleanUpTurnState(UINT64, UINT64)
Definition: TurnConnectionStateMachine.c:665
STATUS executeFailedTurnState(UINT64, UINT64)
Definition: TurnConnectionStateMachine.c:729
STATUS executeCreatePermissionTurnState(UINT64, UINT64)
Definition: TurnConnectionStateMachine.c:416
STATUS stepTurnConnectionStateMachine(PTurnConnection)
Definition: TurnConnectionStateMachine.c:63
STATUS fromCheckSocketConnectionTurnState(UINT64, PUINT64)
Definition: TurnConnectionStateMachine.c:162
STATUS executeReadyTurnState(UINT64, UINT64)
Definition: TurnConnectionStateMachine.c:600
STATUS fromFailedTurnState(UINT64, PUINT64)
Definition: TurnConnectionStateMachine.c:693
STATUS executeAllocationTurnState(UINT64, UINT64)
Definition: TurnConnectionStateMachine.c:325
STATUS fromCreatePermissionTurnState(UINT64, PUINT64)
Definition: TurnConnectionStateMachine.c:359
STATUS executeCheckSocketConnectionTurnState(UINT64, UINT64)
Definition: TurnConnectionStateMachine.c:198
STATUS fromNewTurnState(UINT64, PUINT64)
Definition: TurnConnectionStateMachine.c:128
STATUS fromAllocationTurnState(UINT64, PUINT64)
Definition: TurnConnectionStateMachine.c:290
STATUS executeGetCredentialsTurnState(UINT64, UINT64)
Definition: TurnConnectionStateMachine.c:255
STATUS fromReadyTurnState(UINT64, PUINT64)
Definition: TurnConnectionStateMachine.c:543
STATUS acceptTurnMachineState(PTurnConnection, UINT64)
STATUS fromGetCredentialsTurnState(UINT64, PUINT64)
Definition: TurnConnectionStateMachine.c:218
STATUS fromBindChannelTurnState(UINT64, PUINT64)
Definition: TurnConnectionStateMachine.c:482
PCHAR turnStateGetStateStr(UINT64 state)
STATUS executeBindChannelTurnState(UINT64, UINT64)
Definition: TurnConnectionStateMachine.c:524
STATUS fromCleanUpTurnState(UINT64, PUINT64)
Definition: TurnConnectionStateMachine.c:618
Definition: TurnConnection.h:119