📄 ra_dav.h
字号:
apr_file_t *body_file, void set_parser(ne_xml_parser *parser, void *baton), const svn_ra_dav__xml_elm_t *elements, svn_ra_dav__xml_validate_cb validate_cb, svn_ra_dav__xml_startelm_cb startelm_cb, svn_ra_dav__xml_endelm_cb endelm_cb, void *baton, apr_hash_t *extra_headers, int *status_code, svn_boolean_t spool_response, apr_pool_t *pool);/* ### add SVN_RA_DAV_ to these to prefix conflicts with (sys) headers? */enum { /* Redefine Neon elements */ /* With the new API, we need to be able to use element id also as a return * value from the new `startelm' callback, hence all element ids must be * positive. Root element id is the only id that is not positive, it's zero. * `Root state' is never returned by a callback, it's only passed into it. * Therefore, negative element ids are forbidden from now on. */ ELEM_unknown = 1, /* was (-1), see above why it's (1) now */ ELEM_root = NE_XML_STATEROOT, /* (0) */ ELEM_UNUSED = 100, ELEM_207_first = ELEM_UNUSED, ELEM_multistatus = ELEM_207_first, ELEM_response = ELEM_207_first + 1, ELEM_responsedescription = ELEM_207_first + 2, ELEM_href = ELEM_207_first + 3, ELEM_propstat = ELEM_207_first + 4, ELEM_prop = ELEM_207_first + 5, /* `prop' tag in the DAV namespace */ ELEM_status = ELEM_207_first + 6, ELEM_207_UNUSED = ELEM_UNUSED + 100, ELEM_PROPS_UNUSED = ELEM_207_UNUSED + 100, /* DAV elements */ ELEM_activity_coll_set = ELEM_207_UNUSED, ELEM_baseline, ELEM_baseline_coll, ELEM_checked_in, ELEM_collection, ELEM_comment, ELEM_creationdate, ELEM_creator_displayname, ELEM_ignored_set, ELEM_merge_response, ELEM_merged_set, ELEM_options_response, ELEM_set_prop, ELEM_remove_prop, ELEM_resourcetype, ELEM_get_content_length, ELEM_updated_set, ELEM_vcc, ELEM_version_name, ELEM_post_commit_err, ELEM_error, /* SVN elements */ ELEM_absent_directory, ELEM_absent_file, ELEM_add_directory, ELEM_add_file, ELEM_baseline_relpath, ELEM_md5_checksum, ELEM_deleted_path, /* used in log reports */ ELEM_replaced_path, /* used in log reports */ ELEM_added_path, /* used in log reports */ ELEM_modified_path, /* used in log reports */ ELEM_delete_entry, ELEM_fetch_file, ELEM_fetch_props, ELEM_txdelta, ELEM_log_date, ELEM_log_item, ELEM_log_report, ELEM_open_directory, ELEM_open_file, ELEM_target_revision, ELEM_update_report, ELEM_resource_walk, ELEM_resource, ELEM_SVN_prop, /* `prop' tag in the Subversion namespace */ ELEM_dated_rev_report, ELEM_name_version_name, ELEM_name_creationdate, ELEM_name_creator_displayname, ELEM_svn_error, ELEM_human_readable, ELEM_repository_uuid, ELEM_get_locations_report, ELEM_location, ELEM_file_revs_report, ELEM_file_rev, ELEM_rev_prop, ELEM_get_locks_report, ELEM_lock, ELEM_lock_path, ELEM_lock_token, ELEM_lock_owner, ELEM_lock_comment, ELEM_lock_creationdate, ELEM_lock_expirationdate, ELEM_editor_report, ELEM_open_root, ELEM_apply_textdelta, ELEM_change_file_prop, ELEM_change_dir_prop, ELEM_close_file, ELEM_close_directory, ELEM_deadprop_count};/* ### docco */svn_error_t * svn_ra_dav__merge_activity(svn_revnum_t *new_rev, const char **committed_date, const char **committed_author, const char **post_commit_err, svn_ra_dav__session_t *ras, const char *repos_url, const char *activity_url, apr_hash_t *valid_targets, apr_hash_t *lock_tokens, svn_boolean_t keep_locks, svn_boolean_t disable_merge_response, apr_pool_t *pool);/* Make a buffer for repeated use with svn_stringbuf_set(). ### it would be nice to start this buffer with N bytes, but there isn't ### really a way to do that in the string interface (yet), short of ### initializing it with a fake string (and copying it) */#define MAKE_BUFFER(p) svn_stringbuf_ncreate("", 0, (p))void svn_ra_dav__copy_href(svn_stringbuf_t *dst, const char *src);/* If RAS contains authentication info, attempt to store it via client callbacks and using POOL for temporary allocations. */svn_error_t *svn_ra_dav__maybe_store_auth_info(svn_ra_dav__session_t *ras, apr_pool_t *pool);/* Like svn_ra_dav__maybe_store_auth_info(), but conditional on ERR. Attempt to store auth info only if ERR is NULL or if ERR->apr_err is not SVN_ERR_RA_NOT_AUTHORIZED. If ERR is not null, return it no matter what, otherwise return the result of the attempt (if any) to store auth info, else return SVN_NO_ERROR. */svn_error_t *svn_ra_dav__maybe_store_auth_info_after_result(svn_error_t *err, svn_ra_dav__session_t *ras, apr_pool_t *pool);/* Create an error object for an error from neon in the given session, where the return code from neon was RETCODE, and CONTEXT describes what was being attempted. Do temporary allocations in POOL. */svn_error_t *svn_ra_dav__convert_error(ne_session *sess, const char *context, int retcode, apr_pool_t *pool);/* Callback to get data from a Neon request after it has been sent. REQUEST is the request, DISPATCH_RETURN_VAL is the value that ne_request_dispatch(REQUEST) returned to the caller. USERDATA is a closure baton. */typedef svn_error_t *svn_ra_dav__request_interrogator(ne_request *request, int dispatch_return_val, void *userdata);/* Given a neon REQUEST and SESSION, run the request; if CODE_P is non-null, return the http status code in *CODE_P. Return any resulting error (from neon, a <D:error> body response, or any non-2XX status code) as an svn_error_t, otherwise return NULL. The request will be freed either way. SESSION, METHOD, and URL are required as well, as they are used to describe the possible error. The error will be allocated in POOL. OKAY_1 and OKAY_2 are the "acceptable" result codes. Anything other than one of these will generate an error. OKAY_1 should always be specified (e.g. as 200); use 0 for OKAY_2 if a second result code is not allowed. #ifdef SVN_NEON_0_25 If INTERROGATOR is non-NULL, invoke it with the Neon request, the dispatch result, and INTERROGATOR_BATON. This is done regardless of whether the request appears successful or not. If the interrogator has an error result, return that error immediately, after freeing the request. #endif // SVN_NEON_0_25 ### not super sure on this "okay" stuff, but it means that the request ### dispatching code can generate much better errors than the callers ### when something goes wrong. if we need more than two, then we could ### add another param, switch to an array, or do something entirely ### different... */svn_error_t *svn_ra_dav__request_dispatch(int *code_p, ne_request *request, ne_session *session, const char *method, const char *url, int okay_1, int okay_2,#ifdef SVN_NEON_0_25 svn_ra_dav__request_interrogator interrogator, void *interrogator_baton,#endif /* SVN_NEON_0_25 */ apr_pool_t *pool);/* Give PARSER the ability to parse a mod_dav_svn <D:error> response body in the case of a non-2XX response to REQUEST. If a <D:error> response is detected, then set *ERR to the parsed error.*/voidsvn_ra_dav__add_error_handler(ne_request *request, ne_xml_parser *parser, svn_error_t **err, apr_pool_t *pool);/* * Implements the get_locations RA layer function. */svn_error_t *svn_ra_dav__get_locations(svn_ra_session_t *session, apr_hash_t **locations, const char *path, svn_revnum_t peg_revision, apr_array_header_t *location_revisions, apr_pool_t *pool);/* * Implements the get_locks RA layer function. */svn_error_t *svn_ra_dav__get_locks(svn_ra_session_t *session, apr_hash_t **locks, const char *path, apr_pool_t *pool);/* * Implements the get_lock RA layer function. */svn_error_t *svn_ra_dav__get_lock(svn_ra_session_t *session, svn_lock_t **lock, const char *path, apr_pool_t *pool);svn_error_t *svn_ra_dav__replay(svn_ra_session_t *session, svn_revnum_t revision, svn_revnum_t low_water_mark, svn_boolean_t send_deltas, const svn_delta_editor_t *editor, void *edit_baton, apr_pool_t *pool);/* Helper function. Loop over LOCK_TOKENS and assemble all keys and values into a stringbuf allocated in POOL. The string will be of the form <S:lock-token-list xmlns:S="svn:"> <S:lock> <S:lock-path>path</S:lock-path> <S:lock-token>token</S:lock-token> </S:lock> [...] </S:lock-token-list> Callers can then send this in the request bodies, as a way of reliably marshalling potentially unbounded lists of locks. (We do this because httpd has limits on how much data can be sent in 'If:' headers.) */svn_error_t *svn_ra_dav__assemble_locktoken_body(svn_stringbuf_t **body, apr_hash_t *lock_tokens, apr_pool_t *pool);#ifdef __cplusplus}#endif /* __cplusplus */#endif /* SVN_LIBSVN_RA_DAV_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -