-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathngx_http_python_module.h
42 lines (32 loc) · 1.13 KB
/
ngx_http_python_module.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Author: Jakub Dornak (jakub.dornak@misli.cz)
*/
#ifndef _NGX_HTTP_PYTHON_MODULE_H_
#define _NGX_HTTP_PYTHON_MODULE_H_
#include <xmlrpc.h>
#include <python3.1/Python.h>
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
typedef struct {
ngx_str_t path;
} ngx_http_python_main_conf_t;
typedef struct {
ngx_uint_t handler;
ngx_str_t module;
ngx_str_t xmlrpc_dispatcher;
ngx_str_t soap_dispatcher;
PyObject *pModule;
PyObject *pXmlrpcDispatcher;
PyObject *pSoapDispatcher;
} ngx_http_python_loc_conf_t;
#define NGX_HTTP_PYTHON_HANDLER_XMLRPC 1
#define NGX_HTTP_PYTHON_HANDLER_SOAP 2
static void *ngx_http_python_create_main_conf(ngx_conf_t *cf);
static void *ngx_http_python_create_loc_conf(ngx_conf_t *cf);
static char *ngx_http_python_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child);
static ngx_int_t ngx_http_python_init(ngx_conf_t *cf);
static ngx_int_t ngx_http_python_init_worker(ngx_cycle_t *cycle);
void ngx_http_python_exit_worker(ngx_cycle_t *cycle);
static void ngx_http_python_xmlrpc_handler(ngx_http_request_t *r);
#endif