Squashed 'third_party/rawrtc/rawrtc-data-channel/' content from commit 7b1b8d57c

Change-Id: I84850720e2b51961981d55f67238f4d282314fff
git-subtree-dir: third_party/rawrtc/rawrtc-data-channel
git-subtree-split: 7b1b8d57c6d07da18cc0de8bbca8cc5e8bd06eae
diff --git a/src/data_channel_parameters/parameters.h b/src/data_channel_parameters/parameters.h
new file mode 100644
index 0000000..500e0a9
--- /dev/null
+++ b/src/data_channel_parameters/parameters.h
@@ -0,0 +1,25 @@
+#pragma once
+#include <rawrtcdc/data_channel.h>
+#include <rawrtcc/code.h>
+#include <re.h>
+
+/**
+ * Data channel parameters.
+ */
+struct rawrtc_data_channel_parameters {
+    char* label;  // copied
+    enum rawrtc_data_channel_type channel_type;
+    uint32_t reliability_parameter;  // contains either max_packet_lifetime or max_retransmit
+    char* protocol;  // copied
+    bool negotiated;
+    uint16_t id;
+};
+
+enum rawrtc_code rawrtc_data_channel_parameters_create_internal(
+    struct rawrtc_data_channel_parameters** const parametersp,  // de-referenced
+    char* const label,  // referenced, nullable
+    enum rawrtc_data_channel_type const channel_type,
+    uint32_t const reliability_parameter,
+    char* const protocol,  // referenced, nullable
+    bool const negotiated,
+    uint16_t const id);