Fixed linker errors in sfml-network and csfml-network
Made every read-only pointer "const" in CSFML git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1290 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
29ecc552c2
commit
d979ca254e
62 changed files with 438 additions and 429 deletions
|
@ -128,7 +128,7 @@ CSFML_API void sfFtpListingResponse_Destroy(sfFtpListingResponse* ftpListingResp
|
|||
/// \return sfTrue if status is success (code < 400)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFtpListingResponse_IsOk(sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_API sfBool sfFtpListingResponse_IsOk(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the response status code
|
||||
|
@ -138,7 +138,7 @@ CSFML_API sfBool sfFtpListingResponse_IsOk(sfFtpListingResponse* ftpListingRespo
|
|||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus(sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the full message contained in the response
|
||||
|
@ -148,7 +148,7 @@ CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus(sfFtpListingResponse* ftpLi
|
|||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpListingResponse_GetMessage(sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_API const char* sfFtpListingResponse_GetMessage(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the number of filenames in the listing
|
||||
|
@ -158,7 +158,7 @@ CSFML_API const char* sfFtpListingResponse_GetMessage(sfFtpListingResponse* ftpL
|
|||
/// \return Total number of filenames
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API size_t sfFtpListingResponse_GetCount(sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_API size_t sfFtpListingResponse_GetCount(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the Index-th filename in the directory
|
||||
|
@ -169,7 +169,7 @@ CSFML_API size_t sfFtpListingResponse_GetCount(sfFtpListingResponse* ftpListingR
|
|||
/// \return Index-th filename
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpListingResponse_GetFilename(sfFtpListingResponse* ftpListingResponse, size_t index);
|
||||
CSFML_API const char* sfFtpListingResponse_GetFilename(const sfFtpListingResponse* ftpListingResponse, size_t index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing Ftp directory response
|
||||
|
@ -188,7 +188,7 @@ CSFML_API void sfFtpDirectoryResponse_Destroy(sfFtpDirectoryResponse* ftpDirecto
|
|||
/// \return sfTrue if status is success (code < 400)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFtpDirectoryResponse_IsOk(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_API sfBool sfFtpDirectoryResponse_IsOk(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the response status code
|
||||
|
@ -198,7 +198,7 @@ CSFML_API sfBool sfFtpDirectoryResponse_IsOk(sfFtpDirectoryResponse* ftpDirector
|
|||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the full message contained in the response
|
||||
|
@ -208,7 +208,7 @@ CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(sfFtpDirectoryResponse* f
|
|||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpDirectoryResponse_GetMessage(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_API const char* sfFtpDirectoryResponse_GetMessage(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the directory returned in the response
|
||||
|
@ -218,7 +218,7 @@ CSFML_API const char* sfFtpDirectoryResponse_GetMessage(sfFtpDirectoryResponse*
|
|||
/// \return Directory name
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpDirectoryResponse_GetDirectory(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_API const char* sfFtpDirectoryResponse_GetDirectory(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -238,7 +238,7 @@ CSFML_API void sfFtpResponse_Destroy(sfFtpResponse* ftpResponse);
|
|||
/// \return sfTrue if status is success (code < 400)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFtpResponse_IsOk(sfFtpResponse* ftpResponse);
|
||||
CSFML_API sfBool sfFtpResponse_IsOk(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the response status code
|
||||
|
@ -248,7 +248,7 @@ CSFML_API sfBool sfFtpResponse_IsOk(sfFtpResponse* ftpResponse);
|
|||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpStatus sfFtpResponse_GetStatus(sfFtpResponse* ftpResponse);
|
||||
CSFML_API sfFtpStatus sfFtpResponse_GetStatus(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the full message contained in the response
|
||||
|
@ -258,7 +258,7 @@ CSFML_API sfFtpStatus sfFtpResponse_GetStatus(sfFtpResponse* ftpResponse);
|
|||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpResponse_GetMessage(sfFtpResponse* ftpResponse);
|
||||
CSFML_API const char* sfFtpResponse_GetMessage(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Construct a new Ftp
|
||||
|
|
|
@ -164,7 +164,7 @@ CSFML_API void sfHttpResponse_Destroy(sfHttpResponse* httpResponse);
|
|||
/// \return Value of the field (NULL if it doesn't exist)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfHttpResponse_GetField(sfHttpResponse* httpResponse, const char* field);
|
||||
CSFML_API const char* sfHttpResponse_GetField(const sfHttpResponse* httpResponse, const char* field);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the status of a response
|
||||
|
@ -174,7 +174,7 @@ CSFML_API const char* sfHttpResponse_GetField(sfHttpResponse* httpResponse, cons
|
|||
/// \return Status of the response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfHttpStatus sfHttpResponse_GetStatus(sfHttpResponse* httpResponse);
|
||||
CSFML_API sfHttpStatus sfHttpResponse_GetStatus(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the major HTTP version of a response
|
||||
|
@ -184,7 +184,7 @@ CSFML_API sfHttpStatus sfHttpResponse_GetStatus(sfHttpResponse* httpResponse);
|
|||
/// \return HTTP major version of the response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfHttpResponse_GetMajorVersion(sfHttpResponse* httpResponse);
|
||||
CSFML_API unsigned int sfHttpResponse_GetMajorVersion(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minor HTTP version of a response
|
||||
|
@ -194,7 +194,7 @@ CSFML_API unsigned int sfHttpResponse_GetMajorVersion(sfHttpResponse* httpRespon
|
|||
/// \return HTTP minor version of the response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfHttpResponse_GetMinorVersion(sfHttpResponse* httpResponse);
|
||||
CSFML_API unsigned int sfHttpResponse_GetMinorVersion(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the body of the response. The body can contain :
|
||||
|
@ -208,7 +208,7 @@ CSFML_API unsigned int sfHttpResponse_GetMinorVersion(sfHttpResponse* httpRespon
|
|||
/// \return Body of the response (empty string if no body)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfHttpResponse_GetBody(sfHttpResponse* httpResponse);
|
||||
CSFML_API const char* sfHttpResponse_GetBody(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Construct a new Http object
|
||||
|
@ -251,7 +251,7 @@ CSFML_API void sfHttp_SetHost(sfHttp* http, const char* host, unsigned short por
|
|||
/// \return Server's response, or NULL if request is invalid
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfHttpResponse* sfHttp_SendRequest(sfHttp* http, sfHttpRequest* request, float timeout);
|
||||
CSFML_API sfHttpResponse* sfHttp_SendRequest(sfHttp* http, const sfHttpRequest* request, float timeout);
|
||||
|
||||
|
||||
#endif // SFML_HTTP_H
|
||||
|
|
|
@ -56,7 +56,7 @@ CSFML_API void sfPacket_Destroy(sfPacket* packet);
|
|||
/// \param sizeInBytes : Number of bytes to append
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfPacket_Append(sfPacket* packet, void* data, size_t sizeInBytes);
|
||||
CSFML_API void sfPacket_Append(sfPacket* packet, const void* data, size_t sizeInBytes);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Clear all the data of a packet
|
||||
|
@ -76,7 +76,7 @@ CSFML_API void sfPacket_Clear(sfPacket* packet);
|
|||
/// \return Pointer to the data
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfPacket_GetData(sfPacket* packet);
|
||||
CSFML_API const char* sfPacket_GetData(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the size of the data contained in a packet
|
||||
|
@ -86,7 +86,7 @@ CSFML_API const char* sfPacket_GetData(sfPacket* packet);
|
|||
/// \return Data size, in bytes
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API size_t sfPacket_GetDataSize(sfPacket* packet);
|
||||
CSFML_API size_t sfPacket_GetDataSize(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the reading position has reached the end of the packet
|
||||
|
@ -96,7 +96,7 @@ CSFML_API size_t sfPacket_GetDataSize(sfPacket* packet);
|
|||
/// \return sfTrue if all data have been read into the packet
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfPacket_EndOfPacket(sfPacket* packet);
|
||||
CSFML_API sfBool sfPacket_EndOfPacket(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the validity of packet
|
||||
|
@ -106,7 +106,7 @@ CSFML_API sfBool sfPacket_EndOfPacket(sfPacket* packet);
|
|||
/// \return sfTrue if last data extraction from packet was successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfPacket_CanRead(sfPacket* packet);
|
||||
CSFML_API sfBool sfPacket_CanRead(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Functions to extract data from a packet
|
||||
|
|
|
@ -104,8 +104,8 @@ CSFML_API unsigned int sfSelectorUDP_Wait(sfSelectorUDP* selector, float timeout
|
|||
/// \return The Index-th socket
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketTCP* sfSelectorTCP_GetSocketReady(sfSelectorTCP* selector, unsigned int index);
|
||||
CSFML_API sfSocketUDP* sfSelectorUDP_GetSocketReady(sfSelectorUDP* selector, unsigned int index);
|
||||
CSFML_API sfSocketTCP* sfSelectorTCP_GetSocketReady(const sfSelectorTCP* selector, unsigned int index);
|
||||
CSFML_API sfSocketUDP* sfSelectorUDP_GetSocketReady(const sfSelectorUDP* selector, unsigned int index);
|
||||
|
||||
|
||||
#endif // SFML_SELECTOR_H
|
||||
|
|
|
@ -164,7 +164,7 @@ CSFML_API sfBool sfSocketTCP_Close(sfSocketTCP* socket);
|
|||
/// \return True if the socket is valid
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSocketTCP_IsValid(sfSocketTCP* socket);
|
||||
CSFML_API sfBool sfSocketTCP_IsValid(const sfSocketTCP* socket);
|
||||
|
||||
|
||||
#endif // SFML_SOCKETTCP_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue