Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/include/svn_repos.h view on Meta::CPAN
svn_node_action_change,
svn_node_action_add,
svn_node_action_delete,
svn_node_action_replace
};
/** The different policies for processing the UUID in the dumpfile. */
enum svn_repos_load_uuid
{
/** only update uuid if the repos has no revisions. */
svn_repos_load_uuid_default,
/** never update uuid. */
svn_repos_load_uuid_ignore,
/** always update uuid. */
svn_repos_load_uuid_force
};
/** Callback type for checking authorization on paths produced by (at
* least) svn_repos_dir_delta2().
*
* Set @a *allowed to TRUE to indicate that some operation is
* authorized for @a path in @a root, or set it to FALSE to indicate
* unauthorized (presumably according to state stored in @a baton).
*
* Do not assume @a pool has any lifetime beyond this call.
*
* The exact operation being authorized depends on the callback
* implementation. For read authorization, for example, the caller
* would implement an instance that does read checking, and pass it as
* a parameter named [perhaps] 'authz_read_func'. The receiver of
* that parameter might also take another parameter named
* 'authz_write_func', which although sharing this type, would be a
* different implementation.
*
* @note If someday we want more sophisticated authorization states
* than just yes/no, @a allowed can become an enum type.
*/
typedef svn_error_t *(*svn_repos_authz_func_t)(svn_boolean_t *allowed,
svn_fs_root_t *root,
const char *path,
void *baton,
apr_pool_t *pool);
/** An enum defining the kinds of access authz looks up.
*
* @since New in 1.3.
*/
typedef enum svn_repos_authz_access_t
{
/** No access. */
svn_authz_none = 0,
/** Path can be read. */
svn_authz_read = 1,
/** Path can be altered. */
svn_authz_write = 2,
/** The other access credentials are recursive. */
svn_authz_recursive = 4
} svn_repos_authz_access_t;
/** Callback type for checking authorization on paths produced by
* the repository commit editor.
*
* Set @a *allowed to TRUE to indicate that the @a required access on
* @a path in @a root is authorized, or set it to FALSE to indicate
* unauthorized (presumable according to state stored in @a baton).
*
* If @a path is NULL, the callback should perform a global authz
* lookup for the @a required access. That is, the lookup should
* check if the @a required access is granted for at least one path of
* the repository, and set @a *allowed to TRUE if so. @a root may
* also be NULL if @a path is NULL.
*
* This callback is very similar to svn_repos_authz_func_t, with the
* exception of the addition of the @a required parameter.
* This is due to historical reasons: when authz was first implemented
* for svn_repos_dir_delta2(), it seemed there would need only checks
* for read and write operations, hence the svn_repos_authz_func_t
* callback prototype and usage scenario. But it was then realized
* that lookups due to copying needed to be recursive, and that
* brute-force recursive lookups didn't square with the O(1)
* performances a copy operation should have.
*
* So a special way to ask for a recursive lookup was introduced. The
* commit editor needs this capability to retain acceptable
* performance. Instead of revving the existing callback, causing
* unnecessary revving of functions that don't actually need the
* extended functionality, this second, more complete callback was
* introduced, for use by the commit editor.
*
* Some day, it would be nice to reunite these two callbacks and do
* the necessary revving anyway, but for the time being, this dual
* callback mechanism will do.
*/
typedef svn_error_t *(*svn_repos_authz_callback_t)
(svn_repos_authz_access_t required,
svn_boolean_t *allowed,
svn_fs_root_t *root,
const char *path,
void *baton,
apr_pool_t *pool);
/**
* Similar to #svn_file_rev_handler_t, but without the @a
* result_of_merge parameter.
*
* @deprecated Provided for backward compatibility with 1.4 API.
* @since New in 1.1.
*/
typedef svn_error_t *(*svn_repos_file_rev_handler_t)
(void *baton,
const char *path,
svn_revnum_t rev,
apr_hash_t *rev_props,
svn_txdelta_window_handler_t *delta_handler,
void **delta_baton,
( run in 1.393 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )