~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to include/util_cfgtree.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Licensed to the Apache Software Foundation (ASF) under one or more
 
2
 * contributor license agreements.  See the NOTICE file distributed with
 
3
 * this work for additional information regarding copyright ownership.
 
4
 * The ASF licenses this file to You under the Apache License, Version 2.0
 
5
 * (the "License"); you may not use this file except in compliance with
 
6
 * the License.  You may obtain a copy of the License at
 
7
 *
 
8
 *     http://www.apache.org/licenses/LICENSE-2.0
 
9
 *
 
10
 * Unless required by applicable law or agreed to in writing, software
 
11
 * distributed under the License is distributed on an "AS IS" BASIS,
 
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 */
 
16
 
 
17
/**
 
18
 * @file  util_cfgtree.h
 
19
 * @brief Config Tree Package
 
20
 *
 
21
 * @defgroup APACHE_CORE_CONFIG_TREE Config Tree Package
 
22
 * @ingroup  APACHE_CORE_CONFIG
 
23
 * @{
 
24
 */
 
25
 
 
26
#ifndef AP_CONFTREE_H
 
27
#define AP_CONFTREE_H
 
28
 
 
29
#include "ap_config.h"
 
30
 
 
31
typedef struct ap_directive_t ap_directive_t;
 
32
 
 
33
/**
 
34
 * @brief Structure used to build the config tree.  
 
35
 *
 
36
 * The config tree only stores
 
37
 * the directives that will be active in the running server.  Directives
 
38
 * that contain other directions, such as <Directory ...> cause a sub-level
 
39
 * to be created, where the included directives are stored.  The closing
 
40
 * directive (</Directory>) is not stored in the tree.
 
41
 */
 
42
struct ap_directive_t {
 
43
    /** The current directive */
 
44
    const char *directive;
 
45
    /** The arguments for the current directive, stored as a space 
 
46
     *  separated list */
 
47
    const char *args;
 
48
    /** The next directive node in the tree
 
49
     *  @defvar ap_directive_t *next */
 
50
    struct ap_directive_t *next;
 
51
    /** The first child node of this directive 
 
52
     *  @defvar ap_directive_t *first_child */
 
53
    struct ap_directive_t *first_child;
 
54
    /** The parent node of this directive 
 
55
     *  @defvar ap_directive_t *parent */
 
56
    struct ap_directive_t *parent;
 
57
 
 
58
    /** directive's module can store add'l data here */
 
59
    void *data;
 
60
 
 
61
    /* ### these may go away in the future, but are needed for now */
 
62
    /** The name of the file this directive was found in */
 
63
    const char *filename;
 
64
    /** The line number the directive was on */
 
65
    int line_num;
 
66
};
 
67
 
 
68
/**
 
69
 * The root of the configuration tree
 
70
 * @defvar ap_directive_t *conftree
 
71
 */
 
72
AP_DECLARE_DATA extern ap_directive_t *ap_conftree;
 
73
 
 
74
/**
 
75
 * Add a node to the configuration tree.
 
76
 * @param parent The current parent node.  If the added node is a first_child,
 
77
                 then this is changed to the current node
 
78
 * @param current The current node
 
79
 * @param toadd The node to add to the tree
 
80
 * @param child Is the node to add a child node
 
81
 * @return the added node
 
82
 */
 
83
ap_directive_t *ap_add_node(ap_directive_t **parent, ap_directive_t *current, 
 
84
                            ap_directive_t *toadd, int child);
 
85
 
 
86
#endif
 
87
/** @} */