mirror of
https://github.com/rtlduino/RTL8710AF_GCC.git
synced 2024-11-28 17:20:30 +00:00
24 lines
840 B
C
24 lines
840 B
C
|
#ifndef GOOGLENEST_H
|
||
|
#define GOOGLENEST_H
|
||
|
|
||
|
#include <polarssl/ssl.h>
|
||
|
|
||
|
typedef struct {
|
||
|
int socket;
|
||
|
char *host;
|
||
|
ssl_context ssl;
|
||
|
} googlenest_context;
|
||
|
|
||
|
int gn_connect(googlenest_context *googlenest, char *host, int port);
|
||
|
void gn_close(googlenest_context *googlenest);
|
||
|
int gn_put(googlenest_context *googlenest, char *uri, char *content);
|
||
|
int gn_patch(googlenest_context *googlenest, char *uri, char *content);
|
||
|
int gn_post(googlenest_context *googlenest, char *uri, char *content, unsigned char *out_buffer, size_t out_len);
|
||
|
int gn_get(googlenest_context *googlenest, char *uri, unsigned char *out_buffer, size_t out_len);
|
||
|
int gn_delete(googlenest_context *googlenest, char *uri);
|
||
|
int gn_stream(googlenest_context *googlenest, char *uri);
|
||
|
void google_retrieve_data_hook_callback(void (*callback)(char *));
|
||
|
|
||
|
#endif
|
||
|
|