Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/mod_dav_svn/liveprops.c view on Meta::CPAN
modifiable (writable) live properties. */
return NULL;
}
static dav_error *
patch_exec(const dav_resource *resource,
const apr_xml_elem *elem,
int operation,
void *context,
dav_liveprop_rollback **rollback_ctx)
{
/* NOTE: this function will not be called unless/until we have
modifiable (writable) live properties. */
return NULL;
}
static void
patch_commit(const dav_resource *resource,
int operation,
void *context,
dav_liveprop_rollback *rollback_ctx)
{
/* NOTE: this function will not be called unless/until we have
modifiable (writable) live properties. */
}
static dav_error *
patch_rollback(const dav_resource *resource,
int operation,
void *context,
dav_liveprop_rollback *rollback_ctx)
{
/* NOTE: this function will not be called unless/until we have
modifiable (writable) live properties. */
return NULL;
}
static const dav_hooks_liveprop hooks_liveprop = {
insert_prop,
is_writable,
namespace_uris,
patch_validate,
patch_exec,
patch_commit,
patch_rollback,
};
const dav_liveprop_group dav_svn__liveprop_group =
{
props,
namespace_uris,
&hooks_liveprop
};
void
dav_svn__gather_propsets(apr_array_header_t *uris)
{
/* ### what should we use for a URL to describe the available prop set? */
/* ### for now... nothing. we will *only* have DAV properties */
#if 0
*(const char **)apr_array_push(uris) =
"<http://subversion.tigris.org/dav/propset/svn/1>";
#endif
}
int
dav_svn__find_liveprop(const dav_resource *resource,
const char *ns_uri,
const char *name,
const dav_hooks_liveprop **hooks)
{
/* don't try to find any liveprops if this isn't "our" resource */
if (resource->hooks != &dav_svn__hooks_repository)
return 0;
return dav_do_find_liveprop(ns_uri, name, &dav_svn__liveprop_group, hooks);
}
void
dav_svn__insert_all_liveprops(request_rec *r,
const dav_resource *resource,
dav_prop_insert what,
apr_text_header *phdr)
{
const dav_liveprop_spec *spec;
apr_pool_t *iterpool;
/* don't insert any liveprops if this isn't "our" resource */
if (resource->hooks != &dav_svn__hooks_repository)
return;
if (!resource->exists)
{
/* a lock-null resource */
/*
** ### technically, we should insert empty properties. dunno offhand
** ### what part of the spec said this, but it was essentially thus:
** ### "the properties should be defined, but may have no value".
*/
return;
}
iterpool = svn_pool_create(resource->pool);
for (spec = props; spec->name != NULL; ++spec)
{
svn_pool_clear(iterpool);
(void) insert_prop_internal(resource, spec->propid, what, phdr,
resource->pool, iterpool);
}
svn_pool_destroy(iterpool);
/* ### we know the others aren't defined as liveprops */
}
( run in 0.587 second using v1.01-cache-2.11-cpan-71847e10f99 )