Implement missing methods

This commit is contained in:
Fabio Alessandrelli
2018-08-12 06:53:24 +02:00
parent 501e09d6d8
commit faac4c97e5
2 changed files with 40 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;