James Kuszmaul | 4a42b18 | 2021-01-17 11:32:46 -0800 | [diff] [blame^] | 1 | #include "gatherer.h" |
| 2 | #include <rawrtc/ice_gatherer.h> |
| 3 | #include <rawrtcc/code.h> |
| 4 | |
| 5 | /* |
| 6 | * Get the current state of an ICE gatherer. |
| 7 | */ |
| 8 | enum rawrtc_code rawrtc_ice_gatherer_get_state( |
| 9 | enum rawrtc_ice_gatherer_state* const statep, // de-referenced |
| 10 | struct rawrtc_ice_gatherer* const gatherer) { |
| 11 | // Check arguments |
| 12 | if (!statep || !gatherer) { |
| 13 | return RAWRTC_CODE_INVALID_ARGUMENT; |
| 14 | } |
| 15 | |
| 16 | // Set state |
| 17 | *statep = gatherer->state; |
| 18 | return RAWRTC_CODE_SUCCESS; |
| 19 | } |