James Kuszmaul | 4a42b18 | 2021-01-17 11:32:46 -0800 | [diff] [blame^] | 1 | #pragma once |
| 2 | #include <rawrtcc/code.h> |
| 3 | |
| 4 | /* |
| 5 | * Transport layers. |
| 6 | */ |
| 7 | enum { |
| 8 | RAWRTC_LAYER_SCTP = 20, |
| 9 | RAWRTC_LAYER_DTLS_SRTP_STUN = 10, // TODO: Pretty sure we are able to detect STUN earlier |
| 10 | RAWRTC_LAYER_ICE = 0, |
| 11 | RAWRTC_LAYER_STUN = -10, |
| 12 | RAWRTC_LAYER_TURN = -10, |
| 13 | }; |
| 14 | |
| 15 | /* |
| 16 | * Configuration. |
| 17 | */ |
| 18 | struct rawrtc_config; |
| 19 | |
| 20 | /* |
| 21 | * Initialise rawrtc. Must be called before making a call to any other |
| 22 | * function. |
| 23 | * |
| 24 | * Note: In case `init_re` is not set to `true`, you MUST initialise |
| 25 | * re yourselves before calling this function. |
| 26 | */ |
| 27 | enum rawrtc_code rawrtc_init(bool const init_re); |
| 28 | |
| 29 | /* |
| 30 | * Close rawrtc and free up all resources. |
| 31 | * |
| 32 | * Note: In case `close_re` is not set to `true`, you MUST close |
| 33 | * re yourselves. |
| 34 | */ |
| 35 | enum rawrtc_code rawrtc_close(bool const close_re); |