mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-15 10:05:46 -04:00
dep/rcheevos: Update to 8a717b1
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
#define RC_API_REQUEST_H
|
||||
|
||||
#include "rc_error.h"
|
||||
#include "../src/rc_util.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
@ -9,32 +10,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* A block of memory for variable length data (like strings and arrays).
|
||||
*/
|
||||
typedef struct rc_api_buffer_chunk_t {
|
||||
/* The current location where data is being written */
|
||||
char* write;
|
||||
/* The first byte past the end of data where writing cannot occur */
|
||||
char* end;
|
||||
/* The first byte of the data */
|
||||
char* start;
|
||||
/* The next block in the allocated memory chain */
|
||||
struct rc_api_buffer_chunk_t* next;
|
||||
}
|
||||
rc_api_buffer_chunk_t;
|
||||
|
||||
/**
|
||||
* A preallocated block of memory for variable length data (like strings and arrays).
|
||||
*/
|
||||
typedef struct rc_api_buffer_t {
|
||||
/* The chunk data (will point at the local data member) */
|
||||
struct rc_api_buffer_chunk_t chunk;
|
||||
/* Small chunk of memory pre-allocated for the chunk */
|
||||
char data[256];
|
||||
}
|
||||
rc_api_buffer_t;
|
||||
|
||||
/**
|
||||
* A constructed request to send to the retroachievements server.
|
||||
*/
|
||||
@ -47,7 +22,7 @@ typedef struct rc_api_request_t {
|
||||
const char* content_type;
|
||||
|
||||
/* Storage for the url and post_data */
|
||||
rc_api_buffer_t buffer;
|
||||
rc_buffer_t buffer;
|
||||
}
|
||||
rc_api_request_t;
|
||||
|
||||
@ -59,9 +34,11 @@ typedef struct rc_api_response_t {
|
||||
int succeeded;
|
||||
/* Server-provided message associated to the failure */
|
||||
const char* error_message;
|
||||
/* Server-provided error code associated to the failure */
|
||||
const char* error_code;
|
||||
|
||||
/* Storage for the response data */
|
||||
rc_api_buffer_t buffer;
|
||||
rc_buffer_t buffer;
|
||||
}
|
||||
rc_api_response_t;
|
||||
|
||||
@ -79,6 +56,11 @@ typedef struct rc_api_server_response_t {
|
||||
int http_status_code;
|
||||
} rc_api_server_response_t;
|
||||
|
||||
enum {
|
||||
RC_API_SERVER_RESPONSE_CLIENT_ERROR = -1,
|
||||
RC_API_SERVER_RESPONSE_RETRYABLE_CLIENT_ERROR = -2
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user