mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-04-25 15:49:02 -05:00
45 lines
1.3 KiB
C
45 lines
1.3 KiB
C
#ifndef _GHTTPPOST_H_
|
|
#define _GHTTPPOST_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "ghttp.h"
|
|
#include "ghttpBuffer.h"
|
|
#include <darray.h>
|
|
|
|
typedef enum {
|
|
GHIPostingError,
|
|
GHIPostingDone,
|
|
GHIPostingPosting
|
|
} GHIPostingResult;
|
|
|
|
typedef struct GHIPostingState {
|
|
DArray states;
|
|
int index;
|
|
int bytesPosted;
|
|
int totalBytes;
|
|
ghttpPostCallback callback;
|
|
void * param;
|
|
} GHIPostingState;
|
|
|
|
GHTTPPost ghiNewPost(void);
|
|
void ghiPostSetAutoFree(GHTTPPost post, GHTTPBool autoFree);
|
|
GHTTPBool ghiIsPostAutoFree(GHTTPPost post);
|
|
void ghiFreePost(GHTTPPost post);
|
|
GHTTPBool ghiPostAddString(GHTTPPost post, const char * name, const char * string);
|
|
GHTTPBool ghiPostAddFileFromDisk(GHTTPPost post, const char * name, const char * filename, const char * reportFilename, const char * contentType);
|
|
GHTTPBool ghiPostAddFileFromMemory(GHTTPPost post, const char * name, const char * buffer, int bufferLen, const char * reportFilename, const char * contentType);
|
|
void ghiPostSetCallback(GHTTPPost post, ghttpPostCallback callback, void * param);
|
|
const char * ghiPostGetContentType(struct GHIConnection * connection);
|
|
GHTTPBool ghiPostInitState(struct GHIConnection * connection);
|
|
void ghiPostCleanupState(struct GHIConnection * connection);
|
|
GHIPostingResult ghiPostDoPosting(struct GHIConnection * connection);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|