}
else {
/* assert: what == DAV_PROP_INSERT_SUPPORTED */
- s = apr_psprintf(p, "<supported-live-property name=\"%s\""
- " namespace=\"%s\" xmlns=\"DAV:\"/>" DEBUG_CR,
+ s = apr_psprintf(p,
+ "<D:supported-live-property D:name=\"%s\" "
+ "D:namespace=\"%s\"/>" DEBUG_CR,
info->name, dav_fs_namespace_uris[info->ns]);
}
ap_text_append(p, phdr, s);
}
-static dav_error *dav_fs_patch_exec(dav_resource *resource,
+static dav_error *dav_fs_patch_exec(const dav_resource *resource,
const ap_xml_elem *elem,
int operation,
void *context,
return NULL;
}
-static void dav_fs_patch_commit(dav_resource *resource,
+static void dav_fs_patch_commit(const dav_resource *resource,
int operation,
void *context,
dav_liveprop_rollback *rollback_ctx)
/* nothing to do */
}
-static dav_error *dav_fs_patch_rollback(dav_resource *resource,
+static dav_error *dav_fs_patch_rollback(const dav_resource *resource,
int operation,
void *context,
dav_liveprop_rollback *rollback_ctx)
if ((err = dav_open_lockdb(r, 0, &lockdb)) != NULL) {
return dav_push_error(r->pool, err->status, 0,
"The lock database could not be opened, "
- "preventing report of supported lock properties.",
+ "preventing the reporting of supported lock "
+ "properties.",
err);
}
/* open the property database (readonly) for the resource */
- if ((err = dav_open_propdb(r, lockdb,
- (dav_resource *)resource, 1,
- NULL, &propdb)) != NULL) {
+ if ((err = dav_open_propdb(r, lockdb, resource, 1, NULL,
+ &propdb)) != NULL) {
if (lockdb != NULL)
(*lockdb->hooks->close_lockdb)(lockdb);
if (name == NULL) {
err = dav_new_error(r->pool, HTTP_BAD_REQUEST, 0,
- "A DAV:supported-live-property element "
- "does not have a \"name\" attribute");
+ "A DAV:supported-live-property "
+ "element does not have a \"name\" "
+ "attribute");
break;
}
if ((err = (*vsn_hooks->avail_reports)(resource, &reports)) != NULL) {
return dav_push_error(r->pool, err->status, 0,
- "DAV:supported-report-set could not be determined "
- "due to a problem fetching the available reports "
- "for this resource.",
- err);
+ "DAV:supported-report-set could not be "
+ "determined due to a problem fetching the "
+ "available reports for this resource.",
+ err);
}
if (reports != NULL) {
}
else if (resource->working) {
apr_table_addn(methods, "CHECKIN", "");
+
+ /* ### we might not support this DeltaV option */
apr_table_addn(methods, "UNCHECKOUT", "");
}
else if (vsn_hooks->add_label != NULL) {
** Note: we cast to lose the "const". The propdb won't try to change
** the resource, however, since we are opening readonly.
*/
- err = dav_open_propdb(ctx->r, ctx->w.lockdb,
- (dav_resource *)wres->resource, 1,
+ err = dav_open_propdb(ctx->r, ctx->w.lockdb, wres->resource, 1,
ctx->doc ? ctx->doc->namespaces : NULL, &propdb);
if (err != NULL) {
/* ### do something with err! */
resource (it may be present as a dead
property). */
DAV_PROP_INSERT_NOTSUPP, /* property is recognized by this provider,
- * but it is not supported, and cannot be
- * treated as a dead property */
+ but it is not supported, and cannot be
+ treated as a dead property */
DAV_PROP_INSERT_NAME, /* a property name (empty elem) was
inserted into the text block */
DAV_PROP_INSERT_VALUE, /* a property name/value pair was inserted
** a DAV:supported-live-property element, as defined
** by the DeltaV extensions to RFC2518.
**
- ** Providers should return DAV_PROP_INSERT_NOTDEF if they do not define
- ** the specified propid, but allow the property to be handled as a
- ** dead property. If a provider recognizes, but does not support,
- ** a property, and does not want it handled as a dead property, it should
+ ** Providers should return DAV_PROP_INSERT_NOTDEF if the property is
+ ** known and not defined for this resource, so should be handled as a
+ ** dead property. If a provider recognizes, but does not support, a
+ ** property, and does not want it handled as a dead property, it should
** return DAV_PROP_INSERT_NOTSUPP.
**
** Returns one of DAV_PROP_INSERT_* based on what happened.
int *defer_to_dead);
/* ### doc... */
- dav_error * (*patch_exec)(dav_resource *resource,
+ dav_error * (*patch_exec)(const dav_resource *resource,
const ap_xml_elem *elem,
int operation,
void *context,
dav_liveprop_rollback **rollback_ctx);
/* ### doc... */
- void (*patch_commit)(dav_resource *resource,
+ void (*patch_commit)(const dav_resource *resource,
int operation,
void *context,
dav_liveprop_rollback *rollback_ctx);
/* ### doc... */
- dav_error * (*patch_rollback)(dav_resource *resource,
+ dav_error * (*patch_rollback)(const dav_resource *resource,
int operation,
void *context,
dav_liveprop_rollback *rollback_ctx);
dav_error *dav_open_propdb(
request_rec *r,
dav_lockdb *lockdb,
- dav_resource *resource,
+ const dav_resource *resource,
int ro,
apr_array_header_t *ns_xlate,
dav_propdb **propdb);
apr_pool_t *p; /* the pool we should use */
request_rec *r; /* the request record */
- dav_resource *resource; /* the target resource */
+ const dav_resource *resource; /* the target resource */
int deferred; /* open of db has been deferred */
dav_db *db; /* underlying database containing props */
priv->propid = dav_find_liveprop_provider(propdb, ns_uri, elem->name,
&hooks);
+
+ /* ### this test seems redundant... */
if (priv->propid != DAV_PROPID_CORE_UNKNOWN) {
priv->provider = hooks;
}
}
dav_error *dav_open_propdb(request_rec *r, dav_lockdb *lockdb,
- dav_resource *resource,
+ const dav_resource *resource,
int ro,
apr_array_header_t * ns_xlate,
dav_propdb **p_propdb)
}
/*
- ** If not handled as a live property, look in the dead property database
+ ** If not handled as a live property, look in the dead property
+ ** database.
*/
if (!is_liveprop) {
/* make sure propdb is really open */
/* assert: info != NULL && info->name != NULL */
if (what == DAV_PROP_INSERT_SUPPORTED) {
- s = apr_psprintf(p, "<supported-live-property name=\"%s\""
- " namespace=\"%s\" xmlns=\"DAV:\"/>" DEBUG_CR,
+ s = apr_psprintf(p,
+ "<D:supported-live-property D:name=\"%s\" "
+ "D:namespace=\"%s\"/>" DEBUG_CR,
info->name, dav_core_namespace_uris[info->ns]);
}
- else if (what == DAV_PROP_INSERT_VALUE && *value != '\0') {
+ else if (what == DAV_PROP_INSERT_VALUE && *value != '\0') {
s = apr_psprintf(p, "<lp%d:%s>%s</lp%d:%s>" DEBUG_CR,
global_ns, info->name, value, global_ns, info->name);
}