diff options
Diffstat (limited to 'core/io/ip.h')
-rw-r--r-- | core/io/ip.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/core/io/ip.h b/core/io/ip.h index 742dd0e740..64360b9a76 100644 --- a/core/io/ip.h +++ b/core/io/ip.h @@ -48,12 +48,12 @@ public: RESOLVER_STATUS_ERROR, }; - enum AddressType { + enum Type { - ADDRESS_IPV4 = 1, - ADDRESS_IPV6 = 2, - - ADDRESS_ANY = 3, + TYPE_NONE = 0, + TYPE_IPV4 = 1, + TYPE_IPV6 = 2, + TYPE_ANY = 3, }; enum { @@ -73,7 +73,7 @@ protected: static IP*singleton; static void _bind_methods(); - virtual IP_Address _resolve_hostname(const String& p_hostname, IP_Address::AddrType p_type = IP_Address::TYPE_ANY)=0; + virtual IP_Address _resolve_hostname(const String& p_hostname, Type p_type = TYPE_ANY)=0; Array _get_local_addresses() const; static IP* (*_create)(); @@ -81,9 +81,9 @@ public: - IP_Address resolve_hostname(const String& p_hostname, IP_Address::AddrType p_type = IP_Address::TYPE_ANY); + IP_Address resolve_hostname(const String& p_hostname, Type p_type = TYPE_ANY); // async resolver hostname - ResolverID resolve_hostname_queue_item(const String& p_hostname, IP_Address::AddrType p_type = IP_Address::TYPE_ANY); + ResolverID resolve_hostname_queue_item(const String& p_hostname, Type p_type = TYPE_ANY); ResolverStatus get_resolve_item_status(ResolverID p_id) const; IP_Address get_resolve_item_address(ResolverID p_id) const; virtual void get_local_addresses(List<IP_Address> *r_addresses) const=0; @@ -101,4 +101,6 @@ public: }; +VARIANT_ENUM_CAST(IP::Type); + #endif // IP_H |