add feature-key-keeper
This commit is contained in:
35
platform/include/internal/tfe_rpc.h
Normal file
35
platform/include/internal/tfe_rpc.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "tfe_future.h"
|
||||
#include "event2/event.h"
|
||||
|
||||
struct tfe_rpc_response_result{
|
||||
int status_code;
|
||||
const char* status_msg;
|
||||
const char* data;
|
||||
int len;
|
||||
};
|
||||
|
||||
enum TFE_RPC_FLAG
|
||||
{
|
||||
CHUNK_CB = 0,
|
||||
DONE_CB,
|
||||
};
|
||||
|
||||
enum TFE_RPC_METHOD
|
||||
{
|
||||
GET = 0,
|
||||
POST,
|
||||
};
|
||||
|
||||
struct tfe_rpc
|
||||
{
|
||||
void* logger;
|
||||
};
|
||||
|
||||
struct tfe_rpc* tfe_rpc_init(const char * profile, const char* section, void* logger);
|
||||
|
||||
struct tfe_rpc* tfe_rpc_destroy(struct tfe_rpc *rpc);
|
||||
|
||||
struct tfe_rpc_response_result* tfe_rpc_release(void* result);
|
||||
|
||||
void tfe_rpc_async_ask(struct future* f, struct tfe_rpc* rpc, const char* url, int method, int flag, const char* data, int data_len, struct event_base * evbase);
|
||||
Reference in New Issue
Block a user