File: mod_layout.h

package info (click to toggle)
libapache-mod-layout 3.2.1-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 328 kB
  • ctags: 224
  • sloc: ansic: 1,448; makefile: 122; sh: 43
file content (119 lines) | stat: -rwxr-xr-x 2,631 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
109
110
111
112
113
114
115
116
117
118
119
/* 
**  mod_layout.h -- Common defines.
**  $Revision: 1.33 $
*/

#define CORE_PRIVATE
#include <sys/stat.h>
#include <unistd.h>
#include "httpd.h"
#include "http_config.h"
#include "http_protocol.h"
#include "http_request.h"
#include "http_main.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)

/* layout ? */
#define APPEND (1)
#define REPLACE (2)
#define PREPEND (3)

#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;									/* If it is static, file, dynamic */
	int kind;									/* Header, Footer or random layout */
	int append;								/* Either APPEND, REPLACE, or PREPEND */
	const char *string;				/* Whatever the layout is */
	const char *comment;			/* The comment that is displayed if comments are on */
	const char *pattern;			/* The pattern we match against */
} 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;
	array_header *layouts;
	int header_enabled;
	int footer_enabled;
	int pattern_enabled;
	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 *tag_ignore;
	table *tag_ignore_footer;
	table *tag_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;
	const char *dir;
	int layout_html_handler;
} layout_conf;

module MODULE_VAR_EXPORT layout_module;

#include "proto.h"