summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-09-11 18:26:08 +0200
committerGitHub <noreply@github.com>2022-09-11 18:26:08 +0200
commit822e0532c23354c02fcdbdef90dc70236ece6255 (patch)
tree5eebac3b7ac82500601084e883086139bc29b01b /src/net
parent2ad1bf171653c3fb72d8f987b403ab65c9ad6a46 (diff)
parentd8cbd14a28d8c3c526c8ba1759b4052cbfead2c9 (diff)
downloadfork-godot-webrtc-native-822e0532c23354c02fcdbdef90dc70236ece6255.tar.gz
fork-godot-webrtc-native-822e0532c23354c02fcdbdef90dc70236ece6255.tar.bz2
fork-godot-webrtc-native-822e0532c23354c02fcdbdef90dc70236ece6255.zip
Merge pull request #60 from Faless/bump/alpha16
Update to Godot alpha16
Diffstat (limited to 'src/net')
-rw-r--r--src/net/WebRTCDataChannelNative.cpp2
-rw-r--r--src/net/WebRTCDataChannelNative.hpp12
-rw-r--r--src/net/WebRTCPeerConnectionNative.hpp14
3 files changed, 14 insertions, 14 deletions
diff --git a/src/net/WebRTCDataChannelNative.cpp b/src/net/WebRTCDataChannelNative.cpp
index 4639021..c594dd6 100644
--- a/src/net/WebRTCDataChannelNative.cpp
+++ b/src/net/WebRTCDataChannelNative.cpp
@@ -72,7 +72,7 @@ godot_int get_max_packet_size_wdc(const void *user) {
}
void set_write_mode_wdc(void *user, godot_int write_mode) {
- ((WebRTCDataChannelNative *)user)->_set_write_mode(write_mode);
+ ((WebRTCDataChannelNative *)user)->_set_write_mode((godot::WebRTCDataChannel::WriteMode)write_mode);
}
godot_int get_write_mode_wdc(const void *user) {
diff --git a/src/net/WebRTCDataChannelNative.hpp b/src/net/WebRTCDataChannelNative.hpp
index a8ab697..d00929d 100644
--- a/src/net/WebRTCDataChannelNative.hpp
+++ b/src/net/WebRTCDataChannelNative.hpp
@@ -112,11 +112,11 @@ public:
void _init();
void register_interface(const godot_net_webrtc_data_channel *interface);
- virtual void _set_write_mode(int64_t mode) = 0;
- virtual int64_t _get_write_mode() const = 0;
+ virtual void _set_write_mode(WriteMode mode) = 0;
+ virtual WriteMode _get_write_mode() const = 0;
virtual bool _was_string_packet() const = 0;
- virtual int64_t _get_ready_state() const = 0;
+ virtual ChannelState _get_ready_state() const = 0;
virtual godot::String _get_label() const = 0;
virtual bool _is_ordered() const = 0;
virtual int64_t _get_id() const = 0;
@@ -126,12 +126,12 @@ public:
virtual bool _is_negotiated() const = 0;
virtual int64_t _get_buffered_amount() const = 0;
- virtual int64_t _poll() = 0;
+ virtual godot::Error _poll() = 0;
virtual void _close() = 0;
/* PacketPeer */
- virtual int64_t _get_packet(const uint8_t **r_buffer, int32_t *r_len) = 0;
- virtual int64_t _put_packet(const uint8_t *p_buffer, int64_t p_len) = 0;
+ virtual godot::Error _get_packet(const uint8_t **r_buffer, int32_t *r_len) = 0;
+ virtual godot::Error _put_packet(const uint8_t *p_buffer, int64_t p_len) = 0;
virtual int64_t _get_available_packet_count() const = 0;
virtual int64_t _get_max_packet_size() const = 0;
diff --git a/src/net/WebRTCPeerConnectionNative.hpp b/src/net/WebRTCPeerConnectionNative.hpp
index 1613b53..10c1c9e 100644
--- a/src/net/WebRTCPeerConnectionNative.hpp
+++ b/src/net/WebRTCPeerConnectionNative.hpp
@@ -81,15 +81,15 @@ public:
void _init();
void register_interface(const godot_net_webrtc_peer_connection *interface);
- virtual int64_t _get_connection_state() const = 0;
+ virtual ConnectionState _get_connection_state() const = 0;
- virtual int64_t _initialize(const godot::Dictionary &p_config) = 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;
- virtual int64_t _create_offer() = 0;
- virtual int64_t _set_remote_description(const godot::String &type, const godot::String &sdp) = 0;
- virtual int64_t _set_local_description(const godot::String &type, const godot::String &sdp) = 0;
- virtual int64_t _add_ice_candidate(const godot::String &sdpMidName, int64_t sdpMlineIndexName, const godot::String &sdpName) = 0;
- virtual int64_t _poll() = 0;
+ virtual godot::Error _create_offer() = 0;
+ virtual godot::Error _set_remote_description(const godot::String &type, const godot::String &sdp) = 0;
+ virtual godot::Error _set_local_description(const godot::String &type, const godot::String &sdp) = 0;
+ virtual godot::Error _add_ice_candidate(const godot::String &sdpMidName, int64_t sdpMlineIndexName, const godot::String &sdpName) = 0;
+ virtual godot::Error _poll() = 0;
virtual void _close() = 0;
~WebRTCPeerConnectionNative();