diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-06-06 09:44:38 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-06-06 09:44:38 -0300 |
commit | 9acab32daaea38e09c4d74d5f0340479d3dd41bd (patch) | |
tree | c978e8206cc9319f32c71168fb612fc30b4ec809 /core/io/packet_peer.cpp | |
parent | 07a466f6e6dd28bbb8b917690b634070537f1613 (diff) |
new file dialog!
-ItemList control for easier lists/thumbnails
-New file dialog, with support for thumbnails, favorites, recent places,
etc
-Moved .fscache out of the project, no more bugs due to committed/pulled
.fscache!
-Dir dialog now sorts directories
Diffstat (limited to 'core/io/packet_peer.cpp')
-rw-r--r-- | core/io/packet_peer.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp index 7b5ea65a4b..be566471a8 100644 --- a/core/io/packet_peer.cpp +++ b/core/io/packet_peer.cpp @@ -36,7 +36,7 @@ PacketPeer::PacketPeer() { - + last_get_error=OK; } Error PacketPeer::get_packet_buffer(DVector<uint8_t> &r_buffer) const { @@ -108,10 +108,29 @@ Variant PacketPeer::_bnd_get_var() const { return var; }; +Error PacketPeer::_put_packet(const DVector<uint8_t> &p_buffer) { + return put_packet_buffer(p_buffer); +} +DVector<uint8_t> PacketPeer::_get_packet() const { + + DVector<uint8_t> raw; + last_get_error=get_packet_buffer(raw); + return raw; +} + +Error PacketPeer::_get_packet_error() const { + + return last_get_error; +} + + void PacketPeer::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_var"),&PacketPeer::_bnd_get_var); ObjectTypeDB::bind_method(_MD("put_var", "var:var"),&PacketPeer::put_var); + ObjectTypeDB::bind_method(_MD("get_packet:Error"),&PacketPeer::_get_packet); + ObjectTypeDB::bind_method(_MD("put_packet", "buffer"),&PacketPeer::_get_packet); + ObjectTypeDB::bind_method(_MD("get_packet_error:Error"),&PacketPeer::_get_packet_error); ObjectTypeDB::bind_method(_MD("get_available_packet_count"),&PacketPeer::get_available_packet_count); }; |