Lines Matching refs:reader
110 struct Curl_creader *reader = data->req.reader_stack; in cl_reset_reader() local
111 while(reader) { in cl_reset_reader()
112 data->req.reader_stack = reader->next; in cl_reset_reader()
113 reader->crt->do_close(data, reader); in cl_reset_reader()
114 free(reader); in cl_reset_reader()
115 reader = data->req.reader_stack; in cl_reset_reader()
527 struct Curl_creader *reader, in Curl_creader_read() argument
532 if(!reader) in Curl_creader_read()
534 return reader->crt->do_read(data, reader, buf, blen, nread, eos); in Curl_creader_read()
538 struct Curl_creader *reader) in Curl_creader_def_init() argument
541 (void)reader; in Curl_creader_def_init()
546 struct Curl_creader *reader) in Curl_creader_def_close() argument
549 (void)reader; in Curl_creader_def_close()
553 struct Curl_creader *reader, in Curl_creader_def_read() argument
557 if(reader->next) in Curl_creader_def_read()
558 return reader->next->crt->do_read(data, reader->next, buf, blen, in Curl_creader_def_read()
568 struct Curl_creader *reader) in Curl_creader_def_needs_rewind() argument
571 (void)reader; in Curl_creader_def_needs_rewind()
576 struct Curl_creader *reader) in Curl_creader_def_total_length() argument
578 return reader->next ? in Curl_creader_def_total_length()
579 reader->next->crt->total_length(data, reader->next) : -1; in Curl_creader_def_total_length()
583 struct Curl_creader *reader, in Curl_creader_def_resume_from() argument
587 (void)reader; in Curl_creader_def_resume_from()
593 struct Curl_creader *reader) in Curl_creader_def_rewind() argument
596 (void)reader; in Curl_creader_def_rewind()
601 struct Curl_creader *reader) in Curl_creader_def_unpause() argument
604 (void)reader; in Curl_creader_def_unpause()
609 struct Curl_creader *reader) in Curl_creader_def_is_paused() argument
612 (void)reader; in Curl_creader_def_is_paused()
617 struct Curl_creader *reader, int premature) in Curl_creader_def_done() argument
620 (void)reader; in Curl_creader_def_done()
637 static CURLcode cr_in_init(struct Curl_easy *data, struct Curl_creader *reader) in cr_in_init() argument
639 struct cr_in_ctx *ctx = reader->ctx; in cr_in_init()
650 struct Curl_creader *reader, in cr_in_read() argument
654 struct cr_in_ctx *ctx = reader->ctx; in cr_in_read()
748 struct Curl_creader *reader) in cr_in_needs_rewind() argument
750 struct cr_in_ctx *ctx = reader->ctx; in cr_in_needs_rewind()
756 struct Curl_creader *reader) in cr_in_total_length() argument
758 struct cr_in_ctx *ctx = reader->ctx; in cr_in_total_length()
764 struct Curl_creader *reader, in cr_in_resume_from() argument
767 struct cr_in_ctx *ctx = reader->ctx; in cr_in_resume_from()
827 struct Curl_creader *reader) in cr_in_rewind() argument
829 struct cr_in_ctx *ctx = reader->ctx; in cr_in_rewind()
881 struct Curl_creader *reader) in cr_in_unpause() argument
883 struct cr_in_ctx *ctx = reader->ctx; in cr_in_unpause()
890 struct Curl_creader *reader) in cr_in_is_paused() argument
892 struct cr_in_ctx *ctx = reader->ctx; in cr_in_is_paused()
917 struct Curl_creader *reader = NULL; in Curl_creader_create() local
926 reader = (struct Curl_creader *)p; in Curl_creader_create()
927 reader->crt = crt; in Curl_creader_create()
928 reader->ctx = p; in Curl_creader_create()
929 reader->phase = phase; in Curl_creader_create()
930 result = crt->do_init(data, reader); in Curl_creader_create()
933 *preader = result ? NULL : reader; in Curl_creader_create()
935 free(reader); in Curl_creader_create()
939 void Curl_creader_free(struct Curl_easy *data, struct Curl_creader *reader) in Curl_creader_free() argument
941 if(reader) { in Curl_creader_free()
942 reader->crt->do_close(data, reader); in Curl_creader_free()
943 free(reader); in Curl_creader_free()
955 static CURLcode cr_lc_init(struct Curl_easy *data, struct Curl_creader *reader) in cr_lc_init() argument
957 struct cr_lc_ctx *ctx = reader->ctx; in cr_lc_init()
963 static void cr_lc_close(struct Curl_easy *data, struct Curl_creader *reader) in cr_lc_close() argument
965 struct cr_lc_ctx *ctx = reader->ctx; in cr_lc_close()
972 struct Curl_creader *reader, in cr_lc_read() argument
976 struct cr_lc_ctx *ctx = reader->ctx; in cr_lc_read()
995 result = Curl_creader_read(data, reader->next, buf, blen, &nread, &eos); in cr_lc_read()
1057 struct Curl_creader *reader) in cr_lc_total_length() argument
1061 (void)reader; in cr_lc_total_length()
1082 struct Curl_creader *reader = NULL; in cr_lc_add() local
1085 result = Curl_creader_create(&reader, data, &cr_lc, in cr_lc_add()
1088 result = Curl_creader_add(data, reader); in cr_lc_add()
1090 if(result && reader) in cr_lc_add()
1091 Curl_creader_free(data, reader); in cr_lc_add()
1144 struct Curl_creader *reader) in Curl_creader_add() argument
1157 while(*anchor && (*anchor)->phase < reader->phase) in Curl_creader_add()
1159 reader->next = *anchor; in Curl_creader_add()
1160 *anchor = reader; in Curl_creader_add()
1205 struct Curl_creader *reader = data->req.reader_stack; in Curl_creader_needs_rewind() local
1206 while(reader) { in Curl_creader_needs_rewind()
1207 if(reader->crt->needs_rewind(data, reader)) { in Curl_creader_needs_rewind()
1211 reader = reader->next; in Curl_creader_needs_rewind()
1217 struct Curl_creader *reader, in cr_null_read() argument
1222 (void)reader; in cr_null_read()
1231 struct Curl_creader *reader) in cr_null_total_length() argument
1235 (void)reader; in cr_null_total_length()
1275 struct Curl_creader *reader, in cr_buf_read() argument
1279 struct cr_buf_ctx *ctx = reader->ctx; in cr_buf_read()
1301 struct Curl_creader *reader) in cr_buf_needs_rewind() argument
1303 struct cr_buf_ctx *ctx = reader->ctx; in cr_buf_needs_rewind()
1309 struct Curl_creader *reader) in cr_buf_total_length() argument
1311 struct cr_buf_ctx *ctx = reader->ctx; in cr_buf_total_length()
1317 struct Curl_creader *reader, in cr_buf_resume_from() argument
1320 struct cr_buf_ctx *ctx = reader->ctx; in cr_buf_resume_from()
1400 struct Curl_creader *reader = data->req.reader_stack; in Curl_creader_unpause() local
1403 while(reader) { in Curl_creader_unpause()
1404 result = reader->crt->unpause(data, reader); in Curl_creader_unpause()
1407 reader = reader->next; in Curl_creader_unpause()
1414 struct Curl_creader *reader = data->req.reader_stack; in Curl_creader_is_paused() local
1416 while(reader) { in Curl_creader_is_paused()
1417 if(reader->crt->is_paused(data, reader)) in Curl_creader_is_paused()
1419 reader = reader->next; in Curl_creader_is_paused()
1426 struct Curl_creader *reader = data->req.reader_stack; in Curl_creader_done() local
1427 while(reader) { in Curl_creader_done()
1428 reader->crt->done(data, reader, premature); in Curl_creader_done()
1429 reader = reader->next; in Curl_creader_done()