summaryrefslogtreecommitdiffstats
path: root/lib/nghttp2_outbound_item.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nghttp2_outbound_item.c')
-rw-r--r--lib/nghttp2_outbound_item.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/nghttp2_outbound_item.c b/lib/nghttp2_outbound_item.c
index 2a3041d..a9e9f76 100644
--- a/lib/nghttp2_outbound_item.c
+++ b/lib/nghttp2_outbound_item.c
@@ -27,6 +27,32 @@
#include <assert.h>
#include <string.h>
+nghttp2_data_provider_wrap *
+nghttp2_data_provider_wrap_v1(nghttp2_data_provider_wrap *dpw,
+ const nghttp2_data_provider *data_prd) {
+ if (!data_prd) {
+ return NULL;
+ }
+
+ dpw->version = NGHTTP2_DATA_PROVIDER_V1;
+ dpw->data_prd.v1 = *data_prd;
+
+ return dpw;
+}
+
+nghttp2_data_provider_wrap *
+nghttp2_data_provider_wrap_v2(nghttp2_data_provider_wrap *dpw,
+ const nghttp2_data_provider2 *data_prd) {
+ if (!data_prd) {
+ return NULL;
+ }
+
+ dpw->version = NGHTTP2_DATA_PROVIDER_V2;
+ dpw->data_prd.v2 = *data_prd;
+
+ return dpw;
+}
+
void nghttp2_outbound_item_init(nghttp2_outbound_item *item) {
item->cycle = 0;
item->qnext = NULL;