File: mod_layout.h

package info (click to toggle)
libapache-mod-layout 3.0.3-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 328 kB
  • ctags: 218
  • sloc: ansic: 1,331; makefile: 114; sh: 93
file content (108 lines) | stat: -rw-r--r-- 2,182 bytes parent folder | download
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/* 
**  mod_layout.h -- Common defines.
**  $Revision: 1.29 $
*/

#define CORE_PRIVATE
#include <sys/stat.h>
#include <unistd.h>
#include "httpd.h"
#include "http_config.h"
#include "http_protocol.h"
#include "ap_config.h"
#include "http_log.h"
#include "buff.h"
#include "fnmatch.h"
#include "http_core.h"
#include <sys/mman.h>
#include "version.h"

#define BUFFER_LENGTH 1024

#define UNSET (-1)
#define OFF (0)
#define ON (1)
#define isOff(a) ((a == ON) ? 0 : 1 )
#define isOn(a) ((a == ON) ? 1 : 0 )
/* Yeah, I write perl, got a problem with that? */
#define unless(a) if(!a)

/* layout states */
#define LAYOUT (0)
#define HTTP (1)
#define HEADER (2)
#define ORIGIN (3)
#define FOOTER (4)

#define WATCHPOINT printf("WATCHPOINT %s %d\n", __FILE__, __LINE__);
#define AWATCHPOINT ap_rprintf(r, "WATCHPOINT %s %d\n", __FILE__, __LINE__);
#define LAYOUT_EXPORT(type)    type

#define LAYOUT_CACHE "/tmp"
#define LAYOUT_BEGINTAG "<body*>"
#define LAYOUT_ENDTAG "</body>"
#define LAYOUT_TIMEFORMAT "%A, %d-%b-%Y %H:%M:%S %Z"

typedef struct {
	int type;
	const char *string;
	const char *comment;
} layout_string;

typedef struct {
	size_t size;
	char *file;
} mmap_data;

typedef struct {
	int http_header;
	int header;
	int footer;
	int length;
	int pid;
	int http;
	int origin;
	int merge;
	const char *type;
	const char *mime;
} layout_request;

typedef struct {
	int proxy;
	int glob;
	int header_enabled;
	array_header *header;
	int footer_enabled;
	array_header *footer;
	int display_origin;
	table *override;
	table *override_uri;
	int async_post;
	const char *async_cache;
	int http_header_enabled;
	int comment;
	/* These next three variables change with each request */
	char *http_header;
	const char *time_format;
	table *types;
	table *uris_ignore;
	table *uris_ignore_header;
	table *uris_ignore_http_header;
	table *uris_ignore_footer;
	table *merge_ignore;
	table *merge_ignore_footer;
	table *merge_ignore_header;
	int append_header;
	int append_footer;
	int cache_needed;
	int merge;
	int notes;
	int replace_tags;
	const char *begin_tag;
	const char *end_tag;
	int layout_html_handler;
} layout_conf;

module MODULE_VAR_EXPORT layout_module;

#include "proto.h"