build-mac/curl/multi.h
changeset 531 a7cc26cc39f2
parent 340 ff99a398d872
     1.1 --- a/build-mac/curl/multi.h	Wed Apr 20 14:49:57 2016 +0200
     1.2 +++ b/build-mac/curl/multi.h	Wed Apr 20 15:40:00 2016 +0200
     1.3 @@ -11,7 +11,7 @@
     1.4   *
     1.5   * This software is licensed as described in the file COPYING, which
     1.6   * you should have received as part of this distribution. The terms
     1.7 - * are also available at http://curl.haxx.se/docs/copyright.html.
     1.8 + * are also available at https://curl.haxx.se/docs/copyright.html.
     1.9   *
    1.10   * You may opt to use, copy, modify, merge, publish, distribute and/or sell
    1.11   * copies of the Software, and permit persons to whom the Software is
    1.12 @@ -370,6 +370,12 @@
    1.13    /* maximum number of open connections in total */
    1.14    CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13),
    1.15  
    1.16 +   /* This is the server push callback function pointer */
    1.17 +  CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14),
    1.18 +
    1.19 +  /* This is the argument passed to the server push callback */
    1.20 +  CINIT(PUSHDATA, OBJECTPOINT, 15),
    1.21 +
    1.22    CURLMOPT_LASTENTRY /* the last unused */
    1.23  } CURLMoption;
    1.24  
    1.25 @@ -397,6 +403,31 @@
    1.26  CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
    1.27                                          curl_socket_t sockfd, void *sockp);
    1.28  
    1.29 +
    1.30 +/*
    1.31 + * Name: curl_push_callback
    1.32 + *
    1.33 + * Desc: This callback gets called when a new stream is being pushed by the
    1.34 + *       server. It approves or denies the new stream.
    1.35 + *
    1.36 + * Returns: CURL_PUSH_OK or CURL_PUSH_DENY.
    1.37 + */
    1.38 +#define CURL_PUSH_OK   0
    1.39 +#define CURL_PUSH_DENY 1
    1.40 +
    1.41 +struct curl_pushheaders;  /* forward declaration only */
    1.42 +
    1.43 +CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h,
    1.44 +                                        size_t num);
    1.45 +CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h,
    1.46 +                                         const char *name);
    1.47 +
    1.48 +typedef int (*curl_push_callback)(CURL *parent,
    1.49 +                                  CURL *easy,
    1.50 +                                  size_t num_headers,
    1.51 +                                  struct curl_pushheaders *headers,
    1.52 +                                  void *userp);
    1.53 +
    1.54  #ifdef __cplusplus
    1.55  } /* end of extern "C" */
    1.56  #endif