⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dav_svn.h

📁 subversion-1.4.3-1.tar.gz 配置svn的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
   processing.  See dav_new_error_tag for parameter documentation.   Note that DESC may be null (it's hard to track this down from   dav_new_error_tag()'s documentation, but see the dav_error type,   which says that its desc field may be NULL). */dav_error *dav_svn__new_error_tag(apr_pool_t *pool, int status,                                  int errno_id, const char *desc,                                  const char *namespace,                                  const char *tagname);/* Test PATH for canonicalness (defined as "what won't make the   svn_path_* functions immediately explode"), returning an   HTTP_BAD_REQUEST error tag if the test fails. */dav_error *dav_svn__test_canonical(const char *path, apr_pool_t *pool);/* activity functions for looking up, storing, and deleting   ACTIVITY->TXN mappings */const char *dav_svn_get_txn(const dav_svn_repos *repos,                            const char *activity_id);dav_error *dav_svn_delete_activity(const dav_svn_repos *repos,                                   const char *activity_id);dav_error *dav_svn_store_activity(const dav_svn_repos *repos,                                  const char *activity_id,                                  const char *txn_name);dav_error *dav_svn_create_activity(const dav_svn_repos *repos,                                   const char **ptxn_name,                                   apr_pool_t *pool);/*  Construct a working resource for a given resource.  The internal information (repository, URL parts, etc) for the new  resource comes from BASE, the activity to use is specified by  ACTIVITY_ID, and the name of the transaction is specified by  TXN_NAME. These will be assembled into a new dav_resource and  returned.  If TWEAK_IN_PLACE is non-zero, then directly tweak BASE into a  working resource and return NULL.*/dav_resource *dav_svn_create_working_resource(dav_resource *base,                                              const char *activity_id,                                              const char *txn_name,                                              int tweak_in_place);/*    Convert a working RESOURCE back into a regular one, in-place.   In particular: change the resource type to regular, removing the   'working' flag, change the fs root from a txn-root to a rev-root,   and set the URL back into either a public URL or bc URL.*/dav_error *dav_svn_working_to_regular_resource(dav_resource *resource);/*    Given a version-resource URI, construct a new version-resource in   POOL and return it in  *VERSION_RES.*/dav_error *dav_svn_create_version_resource(dav_resource **version_res,                                           const char *uri,                                           apr_pool_t *pool);/*    Hook function of types 'checkout' and 'checkin', as defined in   mod_dav.h's versioning provider hooks table (see dav_hooks_vsn).*/dav_error *dav_svn_checkout(dav_resource *resource,                            int auto_checkout,                            int is_unreserved, int is_fork_ok,                            int create_activity,                            apr_array_header_t *activities,                            dav_resource **working_resource);dav_error *dav_svn_checkin(dav_resource *resource,                           int keep_checked_out,                           dav_resource **version_resource);/* For an autoversioning commit, a helper function which attaches an   auto-generated 'svn:log' property to a txn, as well as a property   that indicates the revision was made via autoversioning. */svn_error_t *dav_svn_attach_auto_revprops(svn_fs_txn_t *txn,                                          const char *fs_path,                                          apr_pool_t *pool);enum dav_svn_build_what {  DAV_SVN_BUILD_URI_ACT_COLLECTION, /* the collection of activities */  DAV_SVN_BUILD_URI_BASELINE,   /* a Baseline */  DAV_SVN_BUILD_URI_BC,         /* a Baseline Collection */  DAV_SVN_BUILD_URI_PUBLIC,     /* the "public" VCR */  DAV_SVN_BUILD_URI_VERSION,    /* a Version Resource */  DAV_SVN_BUILD_URI_VCC         /* a Version Controlled Configuration */};/*  Construct various kinds of URIs.  REPOS is always required, as all URIs will be built to refer to elements  within that repository. WHAT specifies the type of URI to build. The  ADD_HREF flag determines whether the URI is to be wrapped inside of  <D:href>uri</D:href> elements (for inclusion in a response).  Different pieces of information are required for the various URI types:  ACT_COLLECTION: no additional params required  BASELINE:       REVISION should be specified  BC:             REVISION should be specified  PUBLIC:         PATH should be specified with a leading slash  VERSION:        REVISION and PATH should be specified  VCC:            no additional params required*/const char *dav_svn_build_uri(const dav_svn_repos *repos,                              enum dav_svn_build_what what,                              svn_revnum_t revision,                              const char *path,                              int add_href,                              apr_pool_t *pool);/* Compare (PATH in ROOT) to (PATH in ROOT/PATH's created_rev).      If these nodes are identical, then return the created_rev.   If the nodes aren't identical, or if PATH simply doesn't exist in   the created_rev, then return the revision represented by ROOT.   (This is a helper to functions that want to build version-urls and    use the CR if possible.)*/svn_revnum_t dav_svn_get_safe_cr(svn_fs_root_t *root,                                 const char *path,                                 apr_pool_t *pool);/*** Simple parsing of a URI. This is used for URIs which appear within a** request body. It enables us to verify and break out the necessary pieces** to figure out what is being referred to.**** ### this is horribly duplicative with the parsing functions in repos.c** ### for now, this implements only a minor subset of the full range of** ### URIs which we may need to parse. it also ignores any scheme, host,** ### and port in the URI and simply assumes it refers to the same server.*/typedef struct {  svn_revnum_t rev;  const char *repos_path;  const char *activity_id;} dav_svn_uri_info;svn_error_t *dav_svn_simple_parse_uri(dav_svn_uri_info *info,                                      const dav_resource *relative,                                      const char *uri,                                      apr_pool_t *pool);/* Given an apache request R and a ROOT_PATH to the svn location   block, set *KIND to the node-kind of the URI's associated   (revision, path) pair, if possible.      Public uris, baseline collections, version resources, and working   (non-baseline) resources all have associated (revision, path)   pairs, and thus one of {svn_node_file, svn_node_dir, svn_node_none}   will be returned.   If URI is something more abstract, then set *KIND to   svn_node_unknown.  This is true for baselines, working baselines,   version controled configurations, activities, histories, and other   private resources.*/dav_error * dav_svn_resource_kind(request_rec *r,                                  const char *uri,                                  const char *root_path,                                  svn_node_kind_t *kind);/* Generate the HTTP response body for a successful MERGE. *//* ### more docco */dav_error * dav_svn__merge_response(ap_filter_t *output,                                    const dav_svn_repos *repos,                                    svn_revnum_t new_rev,                                    char *post_commit_err,                                    apr_xml_elem *prop_elem,                                    svn_boolean_t disable_merge_response,                                    apr_pool_t *pool);dav_error * dav_svn__update_report(const dav_resource *resource,                                   const apr_xml_doc *doc,                                   ap_filter_t *output);/* ### todo: document this, as soon as understand what the heck it   does :-).  -kff */   dav_error * dav_svn__log_report(const dav_resource *resource,                                const apr_xml_doc *doc,                                ap_filter_t *output);/* Respond to a client request for a REPORT of type file-revs-report for the   RESOURCE.  Get request body from DOC and send result to OUTPUT. */dav_error * dav_svn__file_revs_report(const dav_resource *resource,                                      const apr_xml_doc *doc,                                      ap_filter_t *output);dav_error * dav_svn__replay_report(const dav_resource *resource,                                   const apr_xml_doc *doc,                                   ap_filter_t *output);int dav_svn_find_ns(apr_array_header_t *namespaces, const char *uri);/* Output XML data to OUTPUT using BB.  Use FMT as format string for the   output. */svn_error_t * dav_svn__send_xml(apr_bucket_brigade *bb, ap_filter_t *output,                                const char *fmt, ...)       __attribute__((format(printf, 3, 4)));enum dav_svn_time_format {  dav_svn_time_format_iso8601,  dav_svn_time_format_rfc1123};/* Given a mod_dav_svn @a resource, set @a *timeval and @a *datestring   to the last-modified-time of the resource.  The datestring will be   formatted according to @a format.  Use @a pool for both   scratchwork, and to allocate @a *datestring.    If @a timeval or @a datestring is NULL, don't touch it.   Return zero on success, non-zero if an error occurs. */int dav_svn_get_last_modified_time(const char **datestring,                                   apr_time_t *timeval,                                   const dav_resource *resource,                                   enum dav_svn_time_format format,                                   apr_pool_t *pool);dav_error * dav_svn__get_locations_report(const dav_resource *resource,                                          const apr_xml_doc *doc,                                          ap_filter_t *output);/* Return a writable generic stream that will encode its output to base64   and send it to the Apache filter OUTPUT using BB.  Allocate the stream in   POOL. */svn_stream_t * dav_svn_make_base64_output_stream(apr_bucket_brigade *bb,                                                 ap_filter_t *output,                                                 apr_pool_t *pool);/* A baton needed by dav_svn_authz_read(). */typedef struct {  /* The original request, needed to generate a subrequest. */  request_rec *r;  /* We need this to construct a URI based on a repository abs path. */  const dav_svn_repos *repos;} dav_svn_authz_read_baton;/* This function implements 'svn_repos_authz_func_t', specifically   for read authorization.   Convert incoming ROOT and PATH into a version-resource URI and   perform a GET subrequest on it.  This will invoke any authz modules   loaded into apache.  Set *ALLOWED to TRUE if the subrequest   succeeds, FALSE otherwise.   BATON must be a pointer to a dav_svn_authz_read_baton (see above).   Use POOL for for any temporary allocation.*/svn_error_t *dav_svn_authz_read(svn_boolean_t *allowed,                                svn_fs_root_t *root,                                const char *path,                                void *baton,                                apr_pool_t *pool);/* If authz is enabled in the specified BATON, return a read authorization   function. Otherwise, return NULL. */svn_repos_authz_func_tdav_svn_authz_read_func(dav_svn_authz_read_baton *baton);/* Every provider needs to define an opaque locktoken type. */struct dav_locktoken{  /* This is identical to the 'token' field of an svn_lock_t. */  const char *uuid_str;};/* Helper for reading lock-tokens out of request bodies, by looking   for cached body in R->pool's userdata.   Return a hash that maps (const char *) absolute fs paths to (const   char *) locktokens.  Allocate the hash and all keys/vals in POOL.   PATH_PREFIX is the prefix we need to prepend to each relative   'lock-path' in the xml in order to create an absolute fs-path.*/dav_error *dav_svn__build_lock_hash(apr_hash_t **locks,                                    request_rec *r,                                    const char *path_prefix,                                    apr_pool_t *pool);/* Helper: push all of the lock-tokens (hash values) in LOCKS into   RESOURCE's already-open svn_fs_t. */dav_error *dav_svn__push_locks(dav_resource *resource,                               apr_hash_t *locks,                               apr_pool_t *pool);/* Convert @a serr into a dav_error.  If @a new_msg is non-NULL, use   @a new_msg in the returned error, and write the original   @a serr->message to httpd's log.  Destroy the passed-in @a serr,   similarly to dav_svn_convert_err().   @a new_msg is usually a "sanitized" version of @a serr->message.   That is, if @a serr->message contains security-sensitive data,   @a new_msg does not.   The purpose of sanitization is to prevent security-sensitive data   from being transmitted over the network to the client.  The error   messages produced by various APIs (e.g., svn_fs, svn_repos) may   contain security-sensitive data such as the actual server file   system's path to the repository.  We don't want to send that to the   client, but we do want to log the real error on the server side. */dav_error *dav_svn__sanitize_error(svn_error_t *serr,                        const char *new_msg,                        int http_status,                        request_rec *r);#ifdef __cplusplus}#endif /* __cplusplus */#endif /* DAV_SVN_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -