From faac4c97e5e3bf897aceaaf94a2e27d94910cd31 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sun, 12 Aug 2018 06:53:24 +0200 Subject: Implement missing methods --- src/WebRTCPeer.cpp | 36 ++++++++++++++++++++++++++++++++++++ src/net/WebRTCPeerNative.hpp | 8 ++++---- 2 files changed, 40 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/WebRTCPeer.cpp b/src/WebRTCPeer.cpp index bc77438..5eada1f 100644 --- a/src/WebRTCPeer.cpp +++ b/src/WebRTCPeer.cpp @@ -1,5 +1,41 @@ #include "WebRTCPeer.hpp" +void WebRTCPeer::set_write_mode(godot_int mode) { + +} + +godot_int WebRTCPeer::get_write_mode() const { + return 0; +} + +bool WebRTCPeer::was_string_packet() const { + return false; +} + +godot_int WebRTCPeer::get_connection_state() const { + return 0; +} + +godot_error WebRTCPeer::create_offer() { + return GODOT_FAILED; +} + +godot_error WebRTCPeer::set_remote_description(const char *type, const char *sdp) { + return GODOT_FAILED; +} + +godot_error WebRTCPeer::set_local_description(const char *type, const char *sdp) { + return GODOT_FAILED; +} + +godot_error WebRTCPeer::add_ice_candidate(const char *sdpMidName, int sdpMlineIndexName, const char *sdpName) { + return GODOT_FAILED; +} + +godot_error WebRTCPeer::poll() { + return GODOT_FAILED; +} + godot_error WebRTCPeer::get_packet(const uint8_t **r_buffer, int &r_len) { printf("Get packet"); r_len = 0; diff --git a/src/net/WebRTCPeerNative.hpp b/src/net/WebRTCPeerNative.hpp index 30b4536..6339a2f 100644 --- a/src/net/WebRTCPeerNative.hpp +++ b/src/net/WebRTCPeerNative.hpp @@ -43,10 +43,10 @@ public: void _init(); - virtual void set_write_mode(godot_int mode); - virtual godot_int get_write_mode() const; - virtual bool was_string_packet() const; - virtual godot_int get_connection_state() const; + virtual void set_write_mode(godot_int mode) = 0; + virtual godot_int get_write_mode() const = 0; + virtual bool was_string_packet() const = 0; + virtual godot_int get_connection_state() const = 0; virtual godot_error create_offer() = 0; virtual godot_error set_remote_description(const char * type, const char * sdp) = 0; -- cgit v1.2.3