📄 ra_dav.h
字号:
/* * ra_dav.h : private declarations for the RA/DAV module * * ==================================================================== * Copyright (c) 2000-2004 CollabNet. All rights reserved. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at http://subversion.tigris.org/license-1.html. * If newer versions of this license are posted there, you may use a * newer version instead, at your option. * * This software consists of voluntary contributions made by many * individuals. For exact contribution history, see the revision * history and logs, available at http://subversion.tigris.org/. * ==================================================================== */#ifndef SVN_LIBSVN_RA_DAV_H#define SVN_LIBSVN_RA_DAV_H#include <apr_pools.h>#include <apr_tables.h>#include <ne_request.h>#include <ne_uri.h>#include <ne_207.h> /* for NE_ELM_207_UNUSED */#include <ne_props.h> /* for ne_propname */#include "svn_types.h"#include "svn_string.h"#include "svn_delta.h"#include "svn_ra.h"#include "svn_dav.h"#include "svn_private_config.h"#ifdef __cplusplusextern "C" {#endif /* __cplusplus *//* Rename these types and constants to abstract from Neon */#define SVN_RA_DAV__XML_VALID (0)#define SVN_RA_DAV__XML_INVALID (-1)#define SVN_RA_DAV__XML_DECLINE (-2)#define SVN_RA_DAV__XML_CDATA (1<<1)#define SVN_RA_DAV__XML_COLLECT ((1<<2) | SVN_RA_DAV__XML_CDATA)typedef int svn_ra_dav__xml_elmid;/** XML element */typedef struct { /** XML namespace. */ const char *nspace; /** XML tag name. */ const char *name; /** XML tag id to be passed to a handler. */ svn_ra_dav__xml_elmid id; /** Processing flags for this namespace:tag. * * 0 (zero) - regular element, may have children, * SVN_RA_DAV__XML_CDATA - child-less element, * SVN_RA_DAV__XML_COLLECT - complete contents of such element must be * collected as CDATA, includes *_CDATA flag. */ unsigned int flags;} svn_ra_dav__xml_elm_t;/** (Neon 0.23) Callback to validate a new child element. * * @a parent and @a child are element ids found in the array of * elements, @a userdata is a user baton. Returns: * * SVN_RA_DAV__XML_VALID - this is a valid element processed by this * handler; * SVN_RA_DAV__XML_INVALID - this is not a valid element, parsing should * stop; * SVN_RA_DAV__XML_DECLINE - this handler doesn't know about this element, * someone else may handle it. * * (See @a shim_xml_push_handler in util.c for more information.) */typedef int svn_ra_dav__xml_validate_cb(void *userdata, svn_ra_dav__xml_elmid parent, svn_ra_dav__xml_elmid child);/** (Neon 0.23) Callback to start parsing a new child element. * * @a userdata is a user baton. @elm is a member of elements array, * and @a atts is an array of name-value XML attributes. * See @c svn_ra_dav__xml_validate_cb for return values. * * (See @a shim_xml_push_handler in util.c for more information.) */typedef int svn_ra_dav__xml_startelm_cb(void *userdata, const svn_ra_dav__xml_elm_t *elm, const char **atts);/** (Neon 0.23) Callback to finish parsing a child element. * * Callback for @c svn_ra_dav__xml_push_handler. @a userdata is a user * baton. @elm is a member of elements array, and @a cdata is the contents * of the element. * See @c svn_ra_dav__xml_validate_cb for return values. * * (See @a shim_xml_push_handler in util.c for more information.) */typedef int svn_ra_dav__xml_endelm_cb(void *userdata, const svn_ra_dav__xml_elm_t *elm, const char *cdata);/* Context for neon request hooks; shared by the neon callbacks in session.c. */struct lock_request_baton{ /* The method neon is about to execute. */ const char *method; /* The current working revision of item being locked. */ svn_revnum_t current_rev; /* Whether client is "forcing" a lock or unlock. */ svn_boolean_t force; /* The creation-date returned for newly created lock. */ apr_time_t creation_date; /* The person who created the lock. */ const char *lock_owner; /* A parser for handling <D:error> responses from mod_dav_svn. */ ne_xml_parser *error_parser; /* If <D:error> is returned, here's where the parsed result goes. */ svn_error_t *err; /* The neon request being executed */ ne_request *request; /* A place for allocating fields in this structure. */ apr_pool_t *pool;};typedef struct { apr_pool_t *pool; svn_stringbuf_t *url; /* original, unparsed session url */ ne_uri root; /* parsed version of above */ const char *repos_root; /* URL for repository root */ ne_session *sess; /* HTTP session to server */ ne_session *sess2; const svn_ra_callbacks2_t *callbacks; /* callbacks to get auth data */ void *callback_baton; svn_auth_iterstate_t *auth_iterstate; /* state of authentication retries */ const char *auth_username; /* last authenticated username used */ svn_boolean_t compression; /* should we use http compression? */ const char *uuid; /* repository UUID */ struct lock_request_baton *lrb; /* used by lock/unlock */ struct copy_baton *cb; /* used by COPY */} svn_ra_dav__session_t;/* Id used with ne_set_session_private() and ne_get_session_private() to retrieve the userdata (which is currently the RA session baton!) */#define SVN_RA_NE_SESSION_ID "SVN"#ifdef SVN_DEBUG#define DEBUG_CR "\n"#else#define DEBUG_CR ""#endif/** vtable function prototypes */svn_error_t *svn_ra_dav__get_latest_revnum(svn_ra_session_t *session, svn_revnum_t *latest_revnum, apr_pool_t *pool);svn_error_t *svn_ra_dav__get_dated_revision(svn_ra_session_t *session, svn_revnum_t *revision, apr_time_t timestamp, apr_pool_t *pool);svn_error_t *svn_ra_dav__change_rev_prop(svn_ra_session_t *session, svn_revnum_t rev, const char *name, const svn_string_t *value, apr_pool_t *pool);svn_error_t *svn_ra_dav__rev_proplist(svn_ra_session_t *session, svn_revnum_t rev, apr_hash_t **props, apr_pool_t *pool);svn_error_t *svn_ra_dav__rev_prop(svn_ra_session_t *session, svn_revnum_t rev, const char *name, svn_string_t **value, apr_pool_t *pool);svn_error_t * svn_ra_dav__get_commit_editor(svn_ra_session_t *session, const svn_delta_editor_t **editor, void **edit_baton, const char *log_msg, svn_commit_callback2_t callback, void *callback_baton, apr_hash_t *lock_tokens, svn_boolean_t keep_locks, apr_pool_t *pool);svn_error_t * svn_ra_dav__get_file(svn_ra_session_t *session, const char *path, svn_revnum_t revision, svn_stream_t *stream, svn_revnum_t *fetched_rev, apr_hash_t **props, apr_pool_t *pool);svn_error_t *svn_ra_dav__get_dir(svn_ra_session_t *session, apr_hash_t **dirents, svn_revnum_t *fetched_rev, apr_hash_t **props, const char *path, svn_revnum_t revision, apr_uint32_t dirent_fields, apr_pool_t *pool);svn_error_t * svn_ra_dav__abort_commit(void *session_baton, void *edit_baton);svn_error_t * svn_ra_dav__do_update(svn_ra_session_t *session, const svn_ra_reporter2_t **reporter, void **report_baton, svn_revnum_t revision_to_update_to, const char *update_target, svn_boolean_t recurse, const svn_delta_editor_t *wc_update, void *wc_update_baton, apr_pool_t *pool);svn_error_t * svn_ra_dav__do_status(svn_ra_session_t *session, const svn_ra_reporter2_t **reporter, void **report_baton, const char *status_target, svn_revnum_t revision, svn_boolean_t recurse, const svn_delta_editor_t *wc_status, void *wc_status_baton, apr_pool_t *pool);svn_error_t * svn_ra_dav__do_switch(svn_ra_session_t *session, const svn_ra_reporter2_t **reporter, void **report_baton, svn_revnum_t revision_to_update_to, const char *update_target, svn_boolean_t recurse, const char *switch_url, const svn_delta_editor_t *wc_update, void *wc_update_baton, apr_pool_t *pool);svn_error_t * svn_ra_dav__do_diff(svn_ra_session_t *session, const svn_ra_reporter2_t **reporter, void **report_baton, svn_revnum_t revision, const char *diff_target, svn_boolean_t recurse, svn_boolean_t ignore_ancestry, svn_boolean_t text_deltas, const char *versus_url, const svn_delta_editor_t *wc_diff, void *wc_diff_baton, apr_pool_t *pool);svn_error_t * svn_ra_dav__get_log(svn_ra_session_t *session, const apr_array_header_t *paths, svn_revnum_t start, svn_revnum_t end, int limit, svn_boolean_t discover_changed_paths, svn_boolean_t strict_node_history,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -