Applied the last IpAddress modifications to CSFML

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1457 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-03-13 10:20:13 +00:00
parent 691eea4c69
commit ca7c1d1690
4 changed files with 18 additions and 21 deletions

View File

@ -71,16 +71,6 @@ CSFML_API sfIpAddress sfIpAddress_FromBytes(sfUint8 byte0, sfUint8 byte1, sfUint
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_FromInteger(sfUint32 address);
////////////////////////////////////////////////////////////
/// Tell if an address is a valid one
///
/// \param address : Address to check
///
/// \return sfTrue if address has a valid syntax
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfIpAddress_IsValid(sfIpAddress address);
////////////////////////////////////////////////////////////
/// Get a string representation of an address
///
@ -129,5 +119,13 @@ CSFML_API sfIpAddress sfIpAddress_GetPublicAddress(float timeout);
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_LocalHost();
////////////////////////////////////////////////////////////
/// Get the empty/invalid address
///
/// \return Empty object that represents invalid addresses
///
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_None();
#endif // SFML_IPADDRESS_H

View File

@ -80,15 +80,6 @@ sfIpAddress sfIpAddress_FromInteger(sfUint32 address)
}
////////////////////////////////////////////////////////////
/// Tell if an address is a valid one
////////////////////////////////////////////////////////////
sfBool sfIpAddress_IsValid(sfIpAddress address)
{
return ToSFMLAddress(address).IsValid() ? sfTrue : sfFalse;
}
////////////////////////////////////////////////////////////
/// Get a string representation of an address
////////////////////////////////////////////////////////////
@ -136,3 +127,11 @@ sfIpAddress sfIpAddress_LocalHost()
{
return FromSFMLAddress(sf::IpAddress::LocalHost);
}
////////////////////////////////////////////////////////////
/// Get the empty/invalid address
////////////////////////////////////////////////////////////
sfIpAddress sfIpAddress_None()
{
return FromSFMLAddress(sf::IpAddress::None);
}

View File

@ -52,12 +52,12 @@ EXPORTS
sfIpAddress_FromString
sfIpAddress_FromBytes
sfIpAddress_FromInteger
sfIpAddress_IsValid
sfIpAddress_ToString
sfIpAddress_ToInteger
sfIpAddress_GetLocalAddress
sfIpAddress_GetPublicAddress
sfIpAddress_LocalHost
sfIpAddress_None
sfSocketTCP_Create
sfSocketTCP_Destroy
sfSocketTCP_SetBlocking

View File

@ -52,12 +52,12 @@ EXPORTS
sfIpAddress_FromString
sfIpAddress_FromBytes
sfIpAddress_FromInteger
sfIpAddress_IsValid
sfIpAddress_ToString
sfIpAddress_ToInteger
sfIpAddress_GetLocalAddress
sfIpAddress_GetPublicAddress
sfIpAddress_LocalHost
sfIpAddress_None
sfSocketTCP_Create
sfSocketTCP_Copy
sfSocketTCP_Destroy