summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
Diffstat (limited to 'core/io')
-rw-r--r--core/io/file_access_buffered_fa.h9
-rw-r--r--core/io/file_access_memory.cpp4
-rw-r--r--core/io/file_access_network.cpp6
-rw-r--r--core/io/file_access_pack.cpp4
-rw-r--r--core/io/file_access_pack.h2
-rw-r--r--core/io/file_access_zip.cpp2
-rw-r--r--core/io/http_client.cpp12
-rw-r--r--core/io/http_client.h2
-rw-r--r--core/io/image_loader.cpp4
-rw-r--r--core/io/packet_peer_udp.cpp6
-rw-r--r--core/io/packet_peer_udp.h4
-rw-r--r--core/io/resource_format_binary.cpp20
-rw-r--r--core/io/resource_loader.cpp26
-rw-r--r--core/io/resource_saver.cpp4
-rw-r--r--core/io/stream_peer_ssl.cpp6
-rw-r--r--core/io/stream_peer_ssl.h6
-rw-r--r--core/io/stream_peer_tcp.cpp10
-rw-r--r--core/io/stream_peer_tcp.h6
-rw-r--r--core/io/translation_loader_po.cpp2
-rw-r--r--core/io/zip.c2
20 files changed, 72 insertions, 65 deletions
diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h
index 884d40a266..000c2b45f3 100644
--- a/core/io/file_access_buffered_fa.h
+++ b/core/io/file_access_buffered_fa.h
@@ -127,10 +127,11 @@ public:
set_error(OK);
};
-// static void make_default() {
-
- //FileAccess::create_func = FileAccessBufferedFA<T>::create;
-// };
+ /*
+ static void make_default() {
+ FileAccess::create_func = FileAccessBufferedFA<T>::create;
+ };
+ */
virtual uint64_t _get_modified_time(const String& p_file) {
diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp
index a9dbf56c15..32eb003228 100644
--- a/core/io/file_access_memory.cpp
+++ b/core/io/file_access_memory.cpp
@@ -68,7 +68,7 @@ FileAccess* FileAccessMemory::create() {
bool FileAccessMemory::file_exists(const String& p_name) {
String name = fix_path(p_name);
-// name = DirAccess::normalize_path(name);
+ //name = DirAccess::normalize_path(name);
return files && (files->find(name) != NULL);
}
@@ -87,7 +87,7 @@ Error FileAccessMemory::_open(const String& p_path, int p_mode_flags) {
ERR_FAIL_COND_V(!files, ERR_FILE_NOT_FOUND);
String name = fix_path(p_path);
-// name = DirAccess::normalize_path(name);
+ //name = DirAccess::normalize_path(name);
Map<String, Vector<uint8_t> >::Element* E = files->find(name);
ERR_FAIL_COND_V(!E, ERR_FILE_NOT_FOUND);
diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp
index 19076b57be..7bf750f6e1 100644
--- a/core/io/file_access_network.cpp
+++ b/core/io/file_access_network.cpp
@@ -206,7 +206,7 @@ Error FileAccessNetworkClient::connect(const String& p_host,int p_port,const Str
}
DEBUG_PRINT("IP: "+String(ip)+" port "+itos(p_port));
- Error err = client->connect(ip,p_port);
+ Error err = client->connect_to_host(ip,p_port);
ERR_FAIL_COND_V(err,err);
while(client->get_status()==StreamPeerTCP::STATUS_CONNECTING) {
//DEBUG_PRINT("trying to connect....");
@@ -325,7 +325,7 @@ Error FileAccessNetwork::_open(const String& p_path, int p_mode_flags) {
last_page=-1;
last_page_buff=NULL;
-// buffers.clear();
+ //buffers.clear();
nc->unlock_mutex();
DEBUG_PRINT("OPEN POST");
DEBUG_TIME("open_post");
@@ -437,7 +437,7 @@ int FileAccessNetwork::get_buffer(uint8_t *p_dst, int p_length) const{
p_length=total_size-pos;
}
-// FileAccessNetworkClient *nc = FileAccessNetworkClient::singleton;
+ //FileAccessNetworkClient *nc = FileAccessNetworkClient::singleton;
uint8_t *buff=last_page_buff;
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp
index 7e3a6d1fa0..d63539a7a5 100644
--- a/core/io/file_access_pack.cpp
+++ b/core/io/file_access_pack.cpp
@@ -340,7 +340,7 @@ FileAccessPack::~FileAccessPack() {
//////////////////////////////////////////////////////////////////////////////////
-bool DirAccessPack::list_dir_begin() {
+Error DirAccessPack::list_dir_begin() {
list_dirs.clear();
@@ -356,7 +356,7 @@ bool DirAccessPack::list_dir_begin() {
list_files.push_back(E->get());
}
- return true;
+ return OK;
}
String DirAccessPack::get_next(){
diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h
index 83340a662b..0a1320e57b 100644
--- a/core/io/file_access_pack.h
+++ b/core/io/file_access_pack.h
@@ -209,7 +209,7 @@ class DirAccessPack : public DirAccess {
public:
- virtual bool list_dir_begin();
+ virtual Error list_dir_begin();
virtual String get_next();
virtual bool current_is_dir() const;
virtual bool current_is_hidden() const;
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp
index c4439f2599..87f07cb7b1 100644
--- a/core/io/file_access_zip.cpp
+++ b/core/io/file_access_zip.cpp
@@ -165,7 +165,7 @@ unzFile ZipArchive::get_file_handle(String p_file) const {
bool ZipArchive::try_open_pack(const String& p_name) {
//printf("opening zip pack %ls, %i, %i\n", p_name.c_str(), p_name.extension().nocasecmp_to("zip"), p_name.extension().nocasecmp_to("pcz"));
- if (p_name.extension().nocasecmp_to("zip") != 0 && p_name.extension().nocasecmp_to("pcz") != 0)
+ if (p_name.get_extension().nocasecmp_to("zip") != 0 && p_name.get_extension().nocasecmp_to("pcz") != 0)
return false;
zlib_filefunc_def io;
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 5e57f55f87..63c8abbbad 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -33,7 +33,7 @@ void HTTPClient::set_ip_type(IP::Type p_type) {
ip_type = p_type;
}
-Error HTTPClient::connect(const String &p_host, int p_port, bool p_ssl,bool p_verify_host){
+Error HTTPClient::connect_to_host(const String &p_host, int p_port, bool p_ssl,bool p_verify_host){
close();
tcp_connection->set_ip_type(ip_type);
@@ -57,7 +57,7 @@ Error HTTPClient::connect(const String &p_host, int p_port, bool p_ssl,bool p_ve
if (conn_host.is_valid_ip_address()) {
//is ip
- Error err = tcp_connection->connect(IP_Address(conn_host),p_port);
+ Error err = tcp_connection->connect_to_host(IP_Address(conn_host),p_port);
if (err) {
status=STATUS_CANT_CONNECT;
return err;
@@ -232,7 +232,7 @@ Error HTTPClient::get_response_headers(List<String> *r_response) {
void HTTPClient::close(){
if (tcp_connection->get_status()!=StreamPeerTCP::STATUS_NONE)
- tcp_connection->disconnect();
+ tcp_connection->disconnect_from_host();
connection.unref();
status=STATUS_DISCONNECTED;
@@ -267,7 +267,7 @@ Error HTTPClient::poll(){
case IP::RESOLVER_STATUS_DONE: {
IP_Address host = IP::get_singleton()->get_resolve_item_address(resolving);
- Error err = tcp_connection->connect(host,conn_port);
+ Error err = tcp_connection->connect_to_host(host,conn_port);
IP::get_singleton()->erase_resolve_item(resolving);
resolving=IP::RESOLVER_INVALID_ID;
if (err) {
@@ -300,7 +300,7 @@ Error HTTPClient::poll(){
case StreamPeerTCP::STATUS_CONNECTED: {
if (ssl) {
Ref<StreamPeerSSL> ssl = StreamPeerSSL::create();
- Error err = ssl->connect(tcp_connection,true,ssl_verify_host?conn_host:String());
+ Error err = ssl->connect_to_stream(tcp_connection,true,ssl_verify_host?conn_host:String());
if (err!=OK) {
close();
status=STATUS_SSL_HANDSHAKE_ERROR;
@@ -640,7 +640,7 @@ Error HTTPClient::_get_http_data(uint8_t* p_buffer, int p_bytes,int &r_received)
void HTTPClient::_bind_methods() {
ClassDB::bind_method(_MD("set_ip_type","ip_type"),&HTTPClient::set_ip_type);
- ClassDB::bind_method(_MD("connect:Error","host","port","use_ssl","verify_host"),&HTTPClient::connect,DEFVAL(false),DEFVAL(true));
+ ClassDB::bind_method(_MD("connect_to_host:Error","host","port","use_ssl","verify_host"),&HTTPClient::connect_to_host,DEFVAL(false),DEFVAL(true));
ClassDB::bind_method(_MD("set_connection","connection:StreamPeer"),&HTTPClient::set_connection);
ClassDB::bind_method(_MD("get_connection:StreamPeer"),&HTTPClient::get_connection);
ClassDB::bind_method(_MD("request_raw","method","url","headers","body"),&HTTPClient::request_raw);
diff --git a/core/io/http_client.h b/core/io/http_client.h
index c6f96db1d6..496d22530b 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -167,7 +167,7 @@ public:
void set_ip_type(IP::Type p_type);
//Error connect_and_get(const String& p_url,bool p_verify_host=true); //connects to a full url and perform request
- Error connect(const String &p_host,int p_port,bool p_ssl=false,bool p_verify_host=true);
+ Error connect_to_host(const String &p_host,int p_port,bool p_ssl=false,bool p_verify_host=true);
void set_connection(const Ref<StreamPeer>& p_connection);
Ref<StreamPeer> get_connection() const;
diff --git a/core/io/image_loader.cpp b/core/io/image_loader.cpp
index d4d10e2126..2b01e865f4 100644
--- a/core/io/image_loader.cpp
+++ b/core/io/image_loader.cpp
@@ -36,7 +36,7 @@ bool ImageFormatLoader::recognize(const String& p_extension) const {
get_recognized_extensions(&extensions);
for (List<String>::Element *E=extensions.front();E;E=E->next()) {
- if (E->get().nocasecmp_to(p_extension.extension())==0)
+ if (E->get().nocasecmp_to(p_extension.get_extension())==0)
return true;
}
@@ -56,7 +56,7 @@ Error ImageLoader::load_image(String p_file,Image *p_image, FileAccess *p_custom
}
}
- String extension = p_file.extension();
+ String extension = p_file.get_extension();
for (int i=0;i<loader_count;i++) {
diff --git a/core/io/packet_peer_udp.cpp b/core/io/packet_peer_udp.cpp
index 91d1fc5f98..9fec807bfb 100644
--- a/core/io/packet_peer_udp.cpp
+++ b/core/io/packet_peer_udp.cpp
@@ -36,7 +36,7 @@ String PacketPeerUDP::_get_packet_ip() const {
return get_packet_address();
}
-Error PacketPeerUDP::_set_send_address(const String& p_address, int p_port) {
+Error PacketPeerUDP::_set_dest_address(const String& p_address, int p_port) {
IP_Address ip;
if (p_address.is_valid_ip_address()) {
@@ -47,7 +47,7 @@ Error PacketPeerUDP::_set_send_address(const String& p_address, int p_port) {
return ERR_CANT_RESOLVE;
}
- set_send_address(ip,p_port);
+ set_dest_address(ip,p_port);
return OK;
}
@@ -66,7 +66,7 @@ void PacketPeerUDP::_bind_methods() {
ClassDB::bind_method(_MD("get_packet_ip"),&PacketPeerUDP::_get_packet_ip);
//ClassDB::bind_method(_MD("get_packet_address"),&PacketPeerUDP::_get_packet_address);
ClassDB::bind_method(_MD("get_packet_port"),&PacketPeerUDP::get_packet_port);
- ClassDB::bind_method(_MD("set_send_address","host","port"),&PacketPeerUDP::_set_send_address);
+ ClassDB::bind_method(_MD("set_dest_address","host","port"),&PacketPeerUDP::_set_dest_address);
}
diff --git a/core/io/packet_peer_udp.h b/core/io/packet_peer_udp.h
index 17a2817f34..17952b4ac1 100644
--- a/core/io/packet_peer_udp.h
+++ b/core/io/packet_peer_udp.h
@@ -45,7 +45,7 @@ protected:
String _get_packet_ip() const;
- virtual Error _set_send_address(const String& p_address,int p_port);
+ virtual Error _set_dest_address(const String& p_address,int p_port);
public:
@@ -56,7 +56,7 @@ public:
virtual bool is_listening() const=0;
virtual IP_Address get_packet_address() const=0;
virtual int get_packet_port() const=0;
- virtual void set_send_address(const IP_Address& p_address,int p_port)=0;
+ virtual void set_dest_address(const IP_Address& p_address,int p_port)=0;
static Ref<PacketPeerUDP> create_ref();
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index c093b087b8..4af3503434 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -1059,7 +1059,7 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(cons
Ref<ResourceInteractiveLoaderBinary> ria = memnew( ResourceInteractiveLoaderBinary );
ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path);
ria->res_path=ria->local_path;
-// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
+ //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
ria->open(f);
@@ -1114,7 +1114,7 @@ Error ResourceFormatLoaderBinary::load_import_metadata(const String &p_path, Ref
Ref<ResourceInteractiveLoaderBinary> ria = memnew( ResourceInteractiveLoaderBinary );
ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path);
ria->res_path=ria->local_path;
-// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
+ //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
ria->recognize(f);
if(ria->error!=OK)
return ERR_FILE_UNRECOGNIZED;
@@ -1159,14 +1159,14 @@ void ResourceFormatLoaderBinary::get_dependencies(const String& p_path,List<Stri
Ref<ResourceInteractiveLoaderBinary> ria = memnew( ResourceInteractiveLoaderBinary );
ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path);
ria->res_path=ria->local_path;
-// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
+ //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
ria->get_dependencies(f,p_dependencies,p_add_types);
}
Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path,const Map<String,String>& p_map) {
-// Error error=OK;
+ //Error error=OK;
FileAccess *f=FileAccess::open(p_path,FileAccess::READ);
@@ -1250,7 +1250,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path,const
ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path);
ria->res_path=ria->local_path;
ria->remaps=p_map;
- // ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
+ //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
ria->open(f);
err = ria->poll();
@@ -1384,7 +1384,7 @@ String ResourceFormatLoaderBinary::get_resource_type(const String &p_path) const
Ref<ResourceInteractiveLoaderBinary> ria = memnew( ResourceInteractiveLoaderBinary );
ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path);
ria->res_path=ria->local_path;
-// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
+ //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
String r = ria->recognize(f);
return r;
@@ -1708,8 +1708,10 @@ void ResourceFormatSaverBinaryInstance::write_variant(const Variant& p_property,
for(List<Variant>::Element *E=keys.front();E;E=E->next()) {
- //if (!_check_type(dict[E->get()]))
- // continue;
+ /*
+ if (!_check_type(dict[E->get()]))
+ continue;
+ */
write_variant(E->get());
write_variant(d[E->get()]);
@@ -2150,7 +2152,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path,const RES& p_
}
Vector<uint64_t> ofs_table;
-// int saved_idx=0;
+ //int saved_idx=0;
//now actually save the resources
for(List<ResourceData>::Element *E=resources.front();E;E=E->next()) {
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index cc3c8ce006..354efaa83f 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -55,7 +55,7 @@ bool ResourceFormatLoader::recognize(const String& p_extension) const {
get_recognized_extensions(&extensions);
for (List<String>::Element *E=extensions.front();E;E=E->next()) {
- if (E->get().nocasecmp_to(p_extension.extension())==0)
+ if (E->get().nocasecmp_to(p_extension.get_extension())==0)
return true;
}
@@ -182,7 +182,7 @@ RES ResourceLoader::load(const String &p_path, const String& p_type_hint, bool p
if (OS::get_singleton()->is_stdout_verbose())
print_line("load resource: "+remapped_path);
- String extension=remapped_path.extension();
+ String extension=remapped_path.get_extension();
bool found=false;
for (int i=0;i<loader_count;i++) {
@@ -230,7 +230,7 @@ Ref<ResourceImportMetadata> ResourceLoader::load_import_metadata(const String &p
else
local_path = GlobalConfig::get_singleton()->localize_path(p_path);
- String extension=p_path.extension();
+ String extension=p_path.get_extension();
Ref<ResourceImportMetadata> ret;
for (int i=0;i<loader_count;i++) {
@@ -331,7 +331,7 @@ Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String &p_
String remapped_path = PathRemap::get_singleton()->get_remap(local_path);
- String extension=remapped_path.extension();
+ String extension=remapped_path.get_extension();
bool found=false;
for (int i=0;i<loader_count;i++) {
@@ -385,14 +385,16 @@ void ResourceLoader::get_dependencies(const String& p_path, List<String> *p_depe
String remapped_path = PathRemap::get_singleton()->get_remap(local_path);
- String extension=remapped_path.extension();
+ String extension=remapped_path.get_extension();
for (int i=0;i<loader_count;i++) {
if (!loader[i]->recognize(extension))
continue;
- //if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
- // continue;
+ /*
+ if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
+ continue;
+ */
loader[i]->get_dependencies(remapped_path,p_dependencies,p_add_types);
@@ -410,14 +412,16 @@ Error ResourceLoader::rename_dependencies(const String &p_path,const Map<String,
String remapped_path = PathRemap::get_singleton()->get_remap(local_path);
- String extension=remapped_path.extension();
+ String extension=remapped_path.get_extension();
for (int i=0;i<loader_count;i++) {
if (!loader[i]->recognize(extension))
continue;
- //if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
- // continue;
+ /*
+ if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
+ continue;
+ */
return loader[i]->rename_dependencies(p_path,p_map);
@@ -449,7 +453,7 @@ String ResourceLoader::get_resource_type(const String &p_path) {
local_path = GlobalConfig::get_singleton()->localize_path(p_path);
String remapped_path = PathRemap::get_singleton()->get_remap(local_path);
- String extension=remapped_path.extension();
+ String extension=remapped_path.get_extension();
for (int i=0;i<loader_count;i++) {
diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp
index 9081adaa8f..222d3e6bc0 100644
--- a/core/io/resource_saver.cpp
+++ b/core/io/resource_saver.cpp
@@ -40,7 +40,7 @@ ResourceSavedCallback ResourceSaver::save_callback=0;
Error ResourceSaver::save(const String &p_path,const RES& p_resource,uint32_t p_flags) {
- String extension=p_path.extension();
+ String extension=p_path.get_extension();
Error err=ERR_FILE_UNRECOGNIZED;
for (int i=0;i<saver_count;i++) {
@@ -54,7 +54,7 @@ Error ResourceSaver::save(const String &p_path,const RES& p_resource,uint32_t p_
for (List<String>::Element *E=extensions.front();E;E=E->next()) {
- if (E->get().nocasecmp_to(extension.extension())==0)
+ if (E->get().nocasecmp_to(extension.get_extension())==0)
recognized=true;
}
diff --git a/core/io/stream_peer_ssl.cpp b/core/io/stream_peer_ssl.cpp
index aab42a2989..fc535e94b0 100644
--- a/core/io/stream_peer_ssl.cpp
+++ b/core/io/stream_peer_ssl.cpp
@@ -57,10 +57,10 @@ bool StreamPeerSSL::is_available() {
void StreamPeerSSL::_bind_methods() {
- ClassDB::bind_method(_MD("accept:Error","stream:StreamPeer"),&StreamPeerSSL::accept);
- ClassDB::bind_method(_MD("connect:Error","stream:StreamPeer","validate_certs","for_hostname"),&StreamPeerSSL::connect,DEFVAL(false),DEFVAL(String()));
+ ClassDB::bind_method(_MD("accept_stream:Error","stream:StreamPeer"),&StreamPeerSSL::accept_stream);
+ ClassDB::bind_method(_MD("connect_to_stream:Error","stream:StreamPeer","validate_certs","for_hostname"),&StreamPeerSSL::connect_to_stream,DEFVAL(false),DEFVAL(String()));
ClassDB::bind_method(_MD("get_status"),&StreamPeerSSL::get_status);
- ClassDB::bind_method(_MD("disconnect"),&StreamPeerSSL::disconnect);
+ ClassDB::bind_method(_MD("disconnect_from_stream"),&StreamPeerSSL::disconnect_from_stream);
BIND_CONSTANT( STATUS_DISCONNECTED );
BIND_CONSTANT( STATUS_CONNECTED );
BIND_CONSTANT( STATUS_ERROR_NO_CERTIFICATE );
diff --git a/core/io/stream_peer_ssl.h b/core/io/stream_peer_ssl.h
index 8675433a30..9aafac874d 100644
--- a/core/io/stream_peer_ssl.h
+++ b/core/io/stream_peer_ssl.h
@@ -57,11 +57,11 @@ public:
STATUS_ERROR_HOSTNAME_MISMATCH
};
- virtual Error accept(Ref<StreamPeer> p_base)=0;
- virtual Error connect(Ref<StreamPeer> p_base,bool p_validate_certs=false,const String& p_for_hostname=String())=0;
+ virtual Error accept_stream(Ref<StreamPeer> p_base)=0;
+ virtual Error connect_to_stream(Ref<StreamPeer> p_base,bool p_validate_certs=false,const String& p_for_hostname=String())=0;
virtual Status get_status() const=0;
- virtual void disconnect()=0;
+ virtual void disconnect_from_stream()=0;
static StreamPeerSSL* create();
diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp
index 2218057cf7..0a59c32995 100644
--- a/core/io/stream_peer_tcp.cpp
+++ b/core/io/stream_peer_tcp.cpp
@@ -41,24 +41,24 @@ Error StreamPeerTCP::_connect(const String& p_address,int p_port) {
return ERR_CANT_RESOLVE;
}
- connect(ip,p_port);
+ connect_to_host(ip,p_port);
return OK;
}
void StreamPeerTCP::set_ip_type(IP::Type p_type) {
- disconnect();
+ disconnect_from_host();
ip_type = p_type;
}
void StreamPeerTCP::_bind_methods() {
ClassDB::bind_method(_MD("set_ip_type","ip_type"),&StreamPeerTCP::set_ip_type);
- ClassDB::bind_method(_MD("connect","host","port"),&StreamPeerTCP::_connect);
- ClassDB::bind_method(_MD("is_connected"),&StreamPeerTCP::is_connected);
+ ClassDB::bind_method(_MD("connect_to_host","host","port"),&StreamPeerTCP::_connect);
+ ClassDB::bind_method(_MD("is_connected_to_host"),&StreamPeerTCP::is_connected_to_host);
ClassDB::bind_method(_MD("get_status"),&StreamPeerTCP::get_status);
ClassDB::bind_method(_MD("get_connected_host"),&StreamPeerTCP::get_connected_host);
ClassDB::bind_method(_MD("get_connected_port"),&StreamPeerTCP::get_connected_port);
- ClassDB::bind_method(_MD("disconnect"),&StreamPeerTCP::disconnect);
+ ClassDB::bind_method(_MD("disconnect_from_host"),&StreamPeerTCP::disconnect_from_host);
BIND_CONSTANT( STATUS_NONE );
BIND_CONSTANT( STATUS_CONNECTING );
diff --git a/core/io/stream_peer_tcp.h b/core/io/stream_peer_tcp.h
index 8f6dfaf3f8..2b25f31739 100644
--- a/core/io/stream_peer_tcp.h
+++ b/core/io/stream_peer_tcp.h
@@ -60,13 +60,13 @@ protected:
public:
virtual void set_ip_type(IP::Type p_type);
- virtual Error connect(const IP_Address& p_host, uint16_t p_port)=0;
+ virtual Error connect_to_host(const IP_Address& p_host, uint16_t p_port)=0;
//read/write from streampeer
- virtual bool is_connected() const=0;
+ virtual bool is_connected_to_host() const=0;
virtual Status get_status() const=0;
- virtual void disconnect()=0;
+ virtual void disconnect_from_host()=0;
virtual IP_Address get_connected_host() const=0;
virtual uint16_t get_connected_port() const=0;
virtual void set_nodelay(bool p_enabled)=0;
diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp
index 8c4c1c8180..bee38e037f 100644
--- a/core/io/translation_loader_po.cpp
+++ b/core/io/translation_loader_po.cpp
@@ -204,7 +204,7 @@ bool TranslationLoaderPO::handles_type(const String& p_type) const{
String TranslationLoaderPO::get_resource_type(const String &p_path) const {
- if (p_path.extension().to_lower()=="po")
+ if (p_path.get_extension().to_lower()=="po")
return "Translation";
return "";
}
diff --git a/core/io/zip.c b/core/io/zip.c
index 44c79195d9..27a3d3cdc1 100644
--- a/core/io/zip.c
+++ b/core/io/zip.c
@@ -855,7 +855,7 @@ extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* gl
ziinit.z_filefunc.zseek32_file = NULL;
ziinit.z_filefunc.ztell32_file = NULL;
if (pzlib_filefunc64_32_def==NULL) {
-// fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64);
+ //fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64);
} else
ziinit.z_filefunc = *pzlib_filefunc64_32_def;