Lines Matching defs:resource
171 const dav_resource *resource,
187 if ((err = (*lockdb->hooks->create_lock)(lockdb, resource,
266 if ((*wres->resource->hooks->is_same_resource)(wres->resource,
271 wres->resource, 1,
292 ** dav_add_lock: Add a direct lock for resource, and indirect locks for
297 const dav_resource *resource,
307 * Depth: 0 for null resource, existing resource, or existing collection
315 if (!resource->collection) {
322 ** Append the new (direct) lock to the resource's existing locks.
326 if ((err = (*lockdb->hooks->append_locks)(lockdb, resource, 0,
341 ctx.w.root = resource;
347 err = (*resource->hooks->walk)(&ctx.w, DAV_INFINITY, &multi_status);
370 const dav_resource *resource,
380 return (*lockdb->hooks->get_locks)(lockdb, resource,
392 if (wres->resource->working) {
394 if ((err = dav_auto_checkin(ctx->r, (dav_resource *) wres->resource,
402 wres->resource,
415 ** Find a lock on the specified resource, then return the resource the
417 ** return the direct lock's corresponding resource).
426 const dav_resource *resource,
431 resource, direct_resource);
441 while (resource != NULL) {
447 ** Find the lock specified by <locktoken> on <resource>. If it is
452 if ((err = (*lockdb->hooks->find_lock)(lockdb, resource, locktoken,
462 "to an existing lock on this resource.");
466 /* we found the direct lock. return this resource. */
468 *direct_resource = resource;
473 if ((err = (*resource->hooks->get_parent_resource)(resource,
478 resource = parent;
484 "on this resource.");
497 DAV_DECLARE(int) dav_unlock(request_rec *r, const dav_resource *resource,
502 const dav_resource *lock_resource = resource;
504 const dav_hooks_repository *repos_hooks = resource->hooks;
514 /* 2518 requires the entire lock to be removed if resource/locktoken
515 * point to an indirect lock. We need resource of the _direct_
518 * Walk up the resource hierarchy until we see a direct lock.
523 * Just start removing all locks at and below resource.
534 locktoken, resource,
571 && (*wres->resource->hooks->is_same_resource)(wres->resource,
578 wres->resource, 1,
583 ** dav_inherit_locks: When a resource or collection is added to a collection,
584 ** locks on the collection should be inherited to the resource/collection.
586 ** parent of resource to resource and below.
589 const dav_resource *resource,
598 const dav_hooks_repository *repos_hooks = resource->hooks;
603 if ((err = (*repos_hooks->get_parent_resource)(resource,
611 "Could not fetch parent resource. Unable to "
613 "them to this resource.");
618 which_resource = resource;
662 ctx.w.root = resource;
680 ** dav_get_resource_state: Returns the state of the resource
687 const dav_resource *resource)
691 if (resource->exists)
700 ** A locknull resource has the form:
704 ** It would be nice to look into <resource> to verify this form,
707 ** there is no way we could have a locknull resource -- it must
708 ** be a plain, null resource.
712 ** it can't be a locknull resource.
724 err = (*hooks->has_locks)(lockdb, resource, &locks_present);
747 const dav_resource *resource,
756 ** The resource is no longer a locknull resource. This will remove
759 ** Note that a locknull resource has already inherited all of the
766 (void)(*lockdb->hooks->remove_locknull_state)(lockdb, resource);
773 (err = dav_inherit_locks(r, lockdb, resource, 0)) != NULL) {
784 /* this resource should inherit locks from its parent */
785 if ((err = dav_inherit_locks(r, lockdb, resource, 1)) != NULL) {
788 "The resource was created successfully, but "
790 "the parent resource.",
795 /* else the resource already exists and its locks are correct. */