diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/WebRTCPeer.cpp | 5 | ||||
-rw-r--r-- | src/WebRTCPeer.hpp | 5 | ||||
-rw-r--r-- | src/init.cpp | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/WebRTCPeer.cpp b/src/WebRTCPeer.cpp index 38303e1..f7572ad 100644 --- a/src/WebRTCPeer.cpp +++ b/src/WebRTCPeer.cpp @@ -1,5 +1,7 @@ #include "WebRTCPeer.hpp" +using namespace godot_webrtc; + void WebRTCPeer::set_write_mode(godot_int mode) { } @@ -64,6 +66,9 @@ void WebRTCPeer::_init() { register_interface(&interface); } +WebRTCPeer::WebRTCPeer() { +} + WebRTCPeer::~WebRTCPeer() { if (_owner) { printf("Unbinding PacketPeer interface"); diff --git a/src/WebRTCPeer.hpp b/src/WebRTCPeer.hpp index 52a754b..72560bc 100644 --- a/src/WebRTCPeer.hpp +++ b/src/WebRTCPeer.hpp @@ -5,6 +5,8 @@ #include "net/WebRTCPeerNative.hpp" +namespace godot_webrtc { + class WebRTCPeer : public WebRTCPeerNative { GODOT_CLASS(WebRTCPeer, WebRTCPeerNative); @@ -30,7 +32,10 @@ public: virtual godot_int get_available_packet_count() const; virtual godot_int get_max_packet_size() const; + WebRTCPeer(); ~WebRTCPeer(); }; +} + #endif // WEBRTC_PEER_H diff --git a/src/init.cpp b/src/init.cpp index 544bfa2..60aaf45 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -21,5 +21,5 @@ extern "C" void GDN_EXPORT godot_gdnative_terminate(godot_gdnative_terminate_opt extern "C" void GDN_EXPORT godot_nativescript_init(void *handle) { godot::Godot::nativescript_init(handle); - godot::register_class<WebRTCPeer>(); + godot::register_class<godot_webrtc::WebRTCPeer>(); } |