summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-09-11 17:31:57 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-09-16 13:07:06 +0200
commit1009e8bb1c822fbda2ae6d8178508b352cc6a5ff (patch)
tree191df97ffec9dbdf2836b230fabc074ddea9f82a /src/net
parent5fd359f67405d772f1a407e7a80b293d9e1f4b8b (diff)
downloadfork-godot-webrtc-native-1009e8bb1c822fbda2ae6d8178508b352cc6a5ff.tar.gz
fork-godot-webrtc-native-1009e8bb1c822fbda2ae6d8178508b352cc6a5ff.tar.bz2
fork-godot-webrtc-native-1009e8bb1c822fbda2ae6d8178508b352cc6a5ff.zip
Add methods to get gathering and signaling state.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/WebRTCPeerConnectionNative.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/net/WebRTCPeerConnectionNative.hpp b/src/net/WebRTCPeerConnectionNative.hpp
index 10c1c9e..e8238f4 100644
--- a/src/net/WebRTCPeerConnectionNative.hpp
+++ b/src/net/WebRTCPeerConnectionNative.hpp
@@ -75,6 +75,21 @@ protected:
};
public:
+ enum GatheringState {
+ GATHERING_STATE_NEW,
+ GATHERING_STATE_GATHERING,
+ GATHERING_STATE_COMPLETE,
+ };
+
+ enum SignalingState {
+ SIGNALING_STATE_STABLE,
+ SIGNALING_STATE_HAVE_LOCAL_OFFER,
+ SIGNALING_STATE_HAVE_REMOTE_OFFER,
+ SIGNALING_STATE_HAVE_LOCAL_PRANSWER,
+ SIGNALING_STATE_HAVE_REMOTE_PRANSWER,
+ SIGNALING_STATE_CLOSED,
+ };
+
static void _register_methods();
static const godot_gdnative_ext_net_3_2_api_struct *_net_api;
@@ -82,6 +97,8 @@ public:
void register_interface(const godot_net_webrtc_peer_connection *interface);
virtual ConnectionState _get_connection_state() const = 0;
+ virtual GatheringState _get_gathering_state() const = 0;
+ virtual SignalingState _get_signaling_state() const = 0;
virtual godot::Error _initialize(const godot::Dictionary &p_config) = 0;
virtual godot::Object *_create_data_channel(const godot::String &p_channel, const godot::Dictionary &p_channel_config) = 0;