blob: 500e0a9b846fc7b7774818a85380d8c95a7e8306 [file] [log] [blame]
James Kuszmaul64391362021-01-17 11:32:00 -08001#pragma once
2#include <rawrtcdc/data_channel.h>
3#include <rawrtcc/code.h>
4#include <re.h>
5
6/**
7 * Data channel parameters.
8 */
9struct rawrtc_data_channel_parameters {
10 char* label; // copied
11 enum rawrtc_data_channel_type channel_type;
12 uint32_t reliability_parameter; // contains either max_packet_lifetime or max_retransmit
13 char* protocol; // copied
14 bool negotiated;
15 uint16_t id;
16};
17
18enum rawrtc_code rawrtc_data_channel_parameters_create_internal(
19 struct rawrtc_data_channel_parameters** const parametersp, // de-referenced
20 char* const label, // referenced, nullable
21 enum rawrtc_data_channel_type const channel_type,
22 uint32_t const reliability_parameter,
23 char* const protocol, // referenced, nullable
24 bool const negotiated,
25 uint16_t const id);