/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
*/
/* ** The namespace URIs that we use. There will only ever be "DAV:".
*/ staticconstchar * const dav_core_namespace_uris[] =
{ "DAV:",
NULL /* sentinel */
};
/* ** Define each of the core properties that this provider will handle. ** Note that all of them are in the DAV: namespace, which has a ** provider-local index of 0.
*/ staticconst dav_liveprop_spec dav_core_props[] =
{
{ 0, "comment", DAV_PROPID_comment, 1 },
{ 0, "creator-displayname", DAV_PROPID_creator_displayname, 1 },
{ 0, "displayname", DAV_PROPID_displayname, 1 },
{ 0, "resourcetype", DAV_PROPID_resourcetype, 0 },
{ 0, "source", DAV_PROPID_source, 1 },
for (i = 0; i < extensions->nelts; i++, entry++) { const dav_resource_type_provider *res_hooks =
dav_get_resource_type_providers(entry->provider_name); constchar *name = NULL, *uri = NULL;
if (!res_hooks || !res_hooks->get_resource_type) continue;
if (!res_hooks->get_resource_type(resource, &name, &uri) &&
name) {
if (!uri || !strcasecmp(uri, "DAV:"))
value = apr_pstrcat(p, value ? value : "", ", name, "/>", NULL); else
value = apr_pstrcat(p, value ? value : "", ", name, " xmlns:x=\"", uri, "\"/>", NULL);
}
}
} switch (resource->type) { case DAV_RESOURCE_TYPE_VERSION: if (resource->baselined) {
value = apr_pstrcat(p, value ? value : "", "", NULL); break;
} /* fall through */ case DAV_RESOURCE_TYPE_REGULAR: case DAV_RESOURCE_TYPE_WORKING: if (resource->collection) {
value = apr_pstrcat(p, value ? value : "", "", NULL);
} else { /* ### should we denote lock-null resources? */ if (value == NULL) {
value = ""; /* becomes: <D:resourcetype/> */
}
} break; case DAV_RESOURCE_TYPE_HISTORY:
value = apr_pstrcat(p, value ? value : "", "", NULL); break; case DAV_RESOURCE_TYPE_WORKSPACE:
value = apr_pstrcat(p, value ? value : "", "", NULL); break; case DAV_RESOURCE_TYPE_ACTIVITY:
value = apr_pstrcat(p, value ? value : "", "", NULL); break;
default: /* ### bad juju */ return DAV_PROP_INSERT_NOTDEF;
} break;
case DAV_PROPID_comment: case DAV_PROPID_creator_displayname: case DAV_PROPID_displayname: case DAV_PROPID_source: default: /* ** This property is known, but not defined as a liveprop. However, ** it may be a dead property.
*/ return DAV_PROP_INSERT_NOTDEF;
}
/* assert: value != NULL */
/* get the information and global NS index for the property */
global_ns = dav_get_liveprop_info(propid, &dav_core_liveprop_group, &info);
static dav_error * dav_core_patch_validate(const dav_resource *resource, const apr_xml_elem *elem, int operation, void **context, int *defer_to_dead)
{ /* all of our writable props go in the dead prop database */
*defer_to_dead = 1;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.