blob: 92c6fb5ad35834ebc2cc8219643297d7402254bb [file] [log] [blame]
James Kuszmaul4a42b182021-01-17 11:32:46 -08001#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 */
8enum 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}