~alinuxninja/nginx-edge/trunk

« back to all changes in this revision

Viewing changes to debian/modules/ngx_pagespeed/psol/include/third_party/mod_spdy/src/mod_spdy/apache/slave_connection_api.h

  • Committer: Vivian
  • Date: 2015-12-04 18:20:11 UTC
  • Revision ID: git-v1:a36f2bc32e884f7473b3a47040e5411306144d7d
* Do not extract psol.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright 2012 Google Inc.
2
 
 *
3
 
 * Licensed under the Apache License, Version 2.0 (the "License");
4
 
 * you may not use this file except in compliance with the License.
5
 
 * You may obtain a copy of the License at
6
 
 *
7
 
 *      http://www.apache.org/licenses/LICENSE-2.0
8
 
 *
9
 
 * Unless required by applicable law or agreed to in writing, software
10
 
 * distributed under the License is distributed on an "AS IS" BASIS,
11
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
 
 * See the License for the specific language governing permissions and
13
 
 * limitations under the License.
14
 
 */
15
 
 
16
 
/* This is a public header file, to be used by other Apache modules.  So,
17
 
 * identifiers declared here should follow Apache module naming conventions
18
 
 * (specifically, identifiers should be lowercase_with_underscores, and our
19
 
 * identifiers should start with the spdy_ prefix), and this header file must
20
 
 * be valid in old-school C (not just C++). */
21
 
 
22
 
#ifndef MOD_SPDY_APACHE_SLAVE_CONNECTION_API_H_
23
 
#define MOD_SPDY_APACHE_SLAVE_CONNECTION_API_H_
24
 
 
25
 
#include "httpd.h"
26
 
#include "apr_optional.h"
27
 
 
28
 
#ifdef __cplusplus
29
 
extern "C" {
30
 
#endif
31
 
 
32
 
struct ap_filter_rec_t;
33
 
 
34
 
struct spdy_slave_connection_factory;
35
 
struct spdy_slave_connection;
36
 
 
37
 
/** Creates a factory object that can be used to make in-process pseudo-fetches
38
 
 * with the same origin and target hosts as in master_connection
39
 
 */
40
 
APR_DECLARE_OPTIONAL_FN(
41
 
    struct spdy_slave_connection_factory*,
42
 
    spdy_create_slave_connection_factory, (conn_rec* master_connection));
43
 
 
44
 
/** Destroys a factory object. */
45
 
APR_DECLARE_OPTIONAL_FN(
46
 
    void, spdy_destroy_slave_connection_factory,
47
 
        (struct spdy_slave_connection_factory* factory));
48
 
 
49
 
/** Asks mod_spdy to help with fetching a request on a slave connection.
50
 
 * The input_filter must produce the request, and output_filter must
51
 
 * handle the response. May return NULL if functionality is not available.
52
 
 * The request will not be run until spdy_run_slave_connection() is invoked.
53
 
 */
54
 
APR_DECLARE_OPTIONAL_FN(
55
 
    struct spdy_slave_connection*,
56
 
    spdy_create_slave_connection, (
57
 
        struct spdy_slave_connection_factory* factory,
58
 
        struct ap_filter_rec_t* input_filter,
59
 
        void* input_filter_ctx,
60
 
        struct ap_filter_rec_t* output_filter,
61
 
        void* output_filter_ctx));
62
 
 
63
 
/** Actually performs the fetch on the object. Blocks, perhaps for a significant
64
 
 *  amount of time. */
65
 
APR_DECLARE_OPTIONAL_FN(
66
 
    void, spdy_run_slave_connection, (struct spdy_slave_connection* conn));
67
 
 
68
 
/** Cleans up the connection object. Must not be in active use. */
69
 
APR_DECLARE_OPTIONAL_FN(
70
 
    void, spdy_destroy_slave_connection, (struct spdy_slave_connection*));
71
 
 
72
 
/* Used by mod_spdy to setup the exports. Not exported itself */
73
 
void ModSpdyExportSlaveConnectionFunctions(void);
74
 
 
75
 
#ifdef __cplusplus
76
 
}  /* extern "C" */
77
 
#endif
78
 
 
79
 
#endif  /* MOD_SPDY_APACHE_SLAVE_CONNECTION_API_H_ */