util_cfgtree.inc 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. * @file util_cfgtree.h
  18. * @brief Config Tree Package
  19. *
  20. * @defgroup APACHE_CORE_CONFIG_TREE Config Tree Package
  21. * @ingroup APACHE_CORE_CONFIG
  22. * @{
  23. *)
  24. {$ifndef AP_CONFTREE_H}
  25. {$define AP_CONFTREE_H}
  26. //#include "ap_config.h"
  27. type
  28. Pap_directive_t = ^ap_directive_t;
  29. PPap_directive_t = ^Pap_directive_t;
  30. {**
  31. * @brief Structure used to build the config tree.
  32. *
  33. * The config tree only stores
  34. * the directives that will be active in the running server. Directives
  35. * that contain other directions, such as <Directory ...> cause a sub-level
  36. * to be created, where the included directives are stored. The closing
  37. * directive (</Directory>) is not stored in the tree.
  38. *}
  39. ap_directive_t = record
  40. {** The current directive *}
  41. directive: PChar;
  42. {** The arguments for the current directive, stored as a space
  43. * separated list *}
  44. args: PChar;
  45. {** The next directive node in the tree *}
  46. next: Pap_directive_t;
  47. {** The first child node of this directive *}
  48. first_child: Pap_directive_t;
  49. {** The parent node of this directive *}
  50. parent: Pap_directive_t;
  51. {** directive's module can store add'l data here *}
  52. data: Pointer;
  53. {* ### these may go away in the future, but are needed for now *}
  54. {** The name of the file this directive was found in *}
  55. filename: PChar;
  56. {** The line number the directive was on *}
  57. line_num: Integer;
  58. {** A short-cut towards the last directive node in the tree.
  59. * The value may not always be up-to-date but it always points to
  60. * somewhere in the tree, nearer to the tail.
  61. * This value is only set in the first node
  62. *}
  63. last: Pap_directive_t;
  64. end;
  65. {**
  66. * The root of the configuration tree
  67. *}
  68. //AP_DECLARE_DATA extern ap_directive_t *ap_conftree;
  69. {**
  70. * Add a node to the configuration tree.
  71. * @param parent The current parent node. If the added node is a first_child,
  72. then this is changed to the current node
  73. * @param current The current node
  74. * @param toadd The node to add to the tree
  75. * @param child Is the node to add a child node
  76. * @return the added node
  77. *}
  78. //ap_directive_t *ap_add_node(ap_directive_t **parent, ap_directive_t *current,
  79. // ap_directive_t *toadd, int child);
  80. {$endif}
  81. (** @} *)