]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add dav_get_liveprop_element() to hide the implementation by which
authorGraham Leggett <minfrin@apache.org>
Sun, 26 Sep 2021 12:27:59 +0000 (12:27 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 26 Sep 2021 12:27:59 +0000 (12:27 +0000)
the element is passed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893643 13f79535-47bb-0310-9956-ffa450edef68

include/ap_mmn.h
modules/dav/main/mod_dav.h
modules/dav/main/props.c

index 01aa08b0e3c6855bedd6dbc1bcbbf3c2113fff90..496bc4b24fd3657747d3b1ac8988db355e259adf 100644 (file)
  *                         for 20210506.0 + 20210924.0, MINOR bump only for
  *                         adding ap_proxy_tunnel_conn_bytes_{in,out}().
  * 20210924.1 (2.5.1-dev)  Add ap_proxy_fill_error_brigade()
+ * 20210926.0 (2.5.1-dev)  Add dav_get_liveprop_element(), remove DAV_PROP_ELEMENT.
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
 
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20210924
+#define MODULE_MAGIC_NUMBER_MAJOR 20210926
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 1             /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 0             /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
index b6a6a5f8e446f798cc05f5c2bad87078cebd51f5..dd54499bf872d371f72a3d098eb2b12466d5c6ed 100644 (file)
@@ -1068,20 +1068,18 @@ DAV_DECLARE(long) dav_get_liveprop_ns_count(void);
 DAV_DECLARE(void) dav_add_all_liveprop_xmlns(apr_pool_t *p,
                                              apr_text_header *phdr);
 
-/*
- ** When calling insert_prop(), the request element is associated with
- ** the pool userdata attached to the resource. Access as follows:
- **
- ** apr_pool_userdata_get(&elem, DAV_PROP_ELEMENT, resource->pool);
- **
- */
-#define DAV_PROP_ELEMENT "mod_dav-element"
-
 typedef struct {
     const apr_xml_doc *doc;
     const apr_xml_elem *elem;
 } dav_liveprop_elem;
 
+/*
+ ** When calling insert_prop(), the associated request element and
+ ** document is accessible using the following call.
+ */
+DAV_DECLARE(dav_liveprop_elem *) dav_get_liveprop_element(const dav_resource
+                                                          *resource);
+
 /*
 ** The following three functions are part of mod_dav's internal handling
 ** for the core WebDAV properties. They are not part of mod_dav's API.
index 37c5666ac1b690e8fdf0351dc5e8e44c134d17c6..dc5e5b7472b45d518e4d7239a6722e2d33c8b572 100644 (file)
 
 #define DAV_EMPTY_VALUE                "\0"    /* TWO null terms */
 
+#define DAV_PROP_ELEMENT "mod_dav-element"
+
 struct dav_propdb {
     apr_pool_t *p;                /* the pool we should use */
     request_rec *r;               /* the request record */
@@ -1057,6 +1059,15 @@ DAV_DECLARE(void) dav_get_liveprop_supported(dav_propdb *propdb,
     }
 }
 
+DAV_DECLARE(dav_liveprop_elem *) dav_get_liveprop_element(const dav_resource *resource)
+{
+    dav_liveprop_elem *element;
+
+    apr_pool_userdata_get((void **)&element, DAV_PROP_ELEMENT, resource->pool);
+
+    return element;
+}
+
 DAV_DECLARE_NONSTD(void) dav_prop_validate(dav_prop_ctx *ctx)
 {
     dav_propdb *propdb = ctx->propdb;