aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/http/httpcli.h
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-05-04 15:00:14 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-05-04 15:00:14 -0700
commit5b15afd75c69bc81b5378691b21ef8fd16c545d7 (patch)
treefce539418d16c5d66015a2ab891508c8f22fff30 /src/core/lib/http/httpcli.h
parentf51457b34d2705edbbf7c80f747bd2135cf791a0 (diff)
Progress converting to new error system
Diffstat (limited to 'src/core/lib/http/httpcli.h')
-rw-r--r--src/core/lib/http/httpcli.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h
index 11a32a125c..2d57864a1f 100644
--- a/src/core/lib/http/httpcli.h
+++ b/src/core/lib/http/httpcli.h
@@ -81,11 +81,6 @@ typedef struct grpc_httpcli_request {
/* Expose the parser response type as a httpcli response too */
typedef struct grpc_http_response grpc_httpcli_response;
-/* Callback for grpc_httpcli_get and grpc_httpcli_post. */
-typedef void (*grpc_httpcli_response_cb)(grpc_exec_ctx *exec_ctx,
- void *user_data,
- const grpc_http_response *response);
-
void grpc_httpcli_context_init(grpc_httpcli_context *context);
void grpc_httpcli_context_destroy(grpc_httpcli_context *context);
@@ -102,8 +97,8 @@ void grpc_httpcli_context_destroy(grpc_httpcli_context *context);
void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_pollset *pollset,
const grpc_httpcli_request *request,
- gpr_timespec deadline,
- grpc_httpcli_response_cb on_response, void *user_data);
+ gpr_timespec deadline, grpc_closure *on_complete,
+ grpc_httpcli_response *response);
/* Asynchronously perform a HTTP POST.
'context' specifies the http context under which to do the post
@@ -124,19 +119,19 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_pollset *pollset,
const grpc_httpcli_request *request,
const char *body_bytes, size_t body_size,
- gpr_timespec deadline,
- grpc_httpcli_response_cb on_response, void *user_data);
+ gpr_timespec deadline, grpc_closure *on_complete,
+ grpc_httpcli_response *response);
/* override functions return 1 if they handled the request, 0 otherwise */
typedef int (*grpc_httpcli_get_override)(grpc_exec_ctx *exec_ctx,
const grpc_httpcli_request *request,
gpr_timespec deadline,
- grpc_httpcli_response_cb on_response,
- void *user_data);
+ grpc_closure *on_complete,
+ grpc_httpcli_response *response);
typedef int (*grpc_httpcli_post_override)(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
const char *body_bytes, size_t body_size, gpr_timespec deadline,
- grpc_httpcli_response_cb on_response, void *user_data);
+ grpc_closure *on_complete, grpc_httpcli_response *response);
void grpc_httpcli_set_override(grpc_httpcli_get_override get,
grpc_httpcli_post_override post);