/* 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
*
*
* 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.
*/
#include "httpd.h"
#include "util_xml.h"
#include "apr_strings.h"
#include "ap_provider.h"
#include "mod_dav.h"
/* forward-declare */
/*
** The namespace URIs that we use. There will only ever be "DAV:".
*/
static const char * 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.
*/
{
{ 0, "resourcetype", DAV_PROPID_resourcetype, 0 },
{ 0 } /* sentinel */
};
{
};
{
const char *s;
long global_ns;
switch (propid)
{
case DAV_PROPID_resourcetype:
{ /* additional type info provided by external modules ? */
int i;
continue;
name) {
else
"<x:", name,
" xmlns:x=\"", uri,
"\"/>", NULL);
}
}
}
break;
}
/* fall through */
if (resource->collection) {
}
else {
/* ### should we denote lock-null resources? */
}
}
break;
break;
break;
break;
default:
/* ### bad juju */
return DAV_PROP_INSERT_NOTDEF;
}
break;
case DAV_PROPID_comment:
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 */
/* assert: info != NULL && info->name != NULL */
if (what == DAV_PROP_INSERT_SUPPORTED) {
s = apr_psprintf(p,
"<D:supported-live-property D:name=\"%s\" "
"D:namespace=\"%s\"/>" DEBUG_CR,
}
}
else {
}
apr_text_append(p, phdr, s);
/* we inserted what was asked for */
return what;
}
{
return info->is_writable;
}
const apr_xml_elem *elem,
int *defer_to_dead)
{
/* all of our writable props go in the dead prop database */
*defer_to_dead = 1;
return NULL;
}
NULL, /* patch_exec */
NULL, /* patch_commit */
NULL, /* patch_rollback */
};
const dav_resource *resource,
const dav_hooks_liveprop **hooks)
{
}
request_rec *r,
const dav_resource *resource,
{
}
{
/* register the namespace URIs */
}