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

📄 svn_ra_svn.h

📁 subversion-1.4.3-1.tar.gz 配置svn的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/** * @copyright * ==================================================================== * Copyright (c) 2000-2006 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/. * ==================================================================== * @endcopyright * * @file svn_ra_svn.h * @brief libsvn_ra_svn functions used by the server */#ifndef SVN_RA_SVN_H#define SVN_RA_SVN_H#include <apr.h>#include <apr_pools.h>#include <apr_network_io.h>#include "svn_config.h"#include "svn_delta.h"#ifdef __cplusplusextern "C" {#endif /* __cplusplus *//** The well-known svn port number. */#define SVN_RA_SVN_PORT 3690/** Currently-defined capabilities. */#define SVN_RA_SVN_CAP_EDIT_PIPELINE "edit-pipeline"#define SVN_RA_SVN_CAP_SVNDIFF1 "svndiff1"#define SVN_RA_SVN_CAP_ABSENT_ENTRIES "absent-entries"/** ra_svn passes @c svn_dirent_t fields over the wire as a list of * words, these are the values used to represent each field. * * @defgroup ra_svn_dirent_fields ra_svn dirent fields * @{ *//** The ra_svn way of saying @c SVN_DIRENT_KIND. */#define SVN_RA_SVN_DIRENT_KIND "kind"/** The ra_svn way of saying @c SVN_DIRENT_SIZE. */#define SVN_RA_SVN_DIRENT_SIZE "size"/** The ra_svn way of saying @c SVN_DIRENT_HAS_PROPS. */#define SVN_RA_SVN_DIRENT_HAS_PROPS "has-props"/** The ra_svn way of saying @c SVN_DIRENT_CREATED_REV. */#define SVN_RA_SVN_DIRENT_CREATED_REV "created-rev"/** The ra_svn way of saying @c SVN_DIRENT_TIME. */#define SVN_RA_SVN_DIRENT_TIME "time"/** The ra_svn way of saying @c SVN_DIRENT_LAST_AUTHOR. */#define SVN_RA_SVN_DIRENT_LAST_AUTHOR "last-author"/** @} *//** A value used to indicate an optional number element in a tuple that was * not received. */#define SVN_RA_SVN_UNSPECIFIED_NUMBER ~((apr_uint64_t) 0)/** A specialized form of @c SVN_ERR to deal with errors which occur in an * svn_ra_svn_command_handler(). * * An error returned with this macro will be passed back to the other side  * of the connection.  Use this macro when performing the requested operation;  * use the regular @c SVN_ERR when performing I/O with the client. */#define SVN_CMD_ERR(expr)                                     \  do {                                                        \    svn_error_t *svn_err__temp = (expr);                      \    if (svn_err__temp)                                        \      return svn_error_create(SVN_ERR_RA_SVN_CMD_ERR,         \                              svn_err__temp, NULL);           \  } while (0)/** an ra_svn connection. */typedef struct svn_ra_svn_conn_st svn_ra_svn_conn_t;/** Command handler, used by svn_ra_svn_handle_commands(). */typedef svn_error_t *(*svn_ra_svn_command_handler)(svn_ra_svn_conn_t *conn,                                                   apr_pool_t *pool,                                                   apr_array_header_t *params,                                                   void *baton);/** Command table, used by svn_ra_svn_handle_commands(). * * If @c terminate is set, command-handling will cease after command is * processed. */typedef struct svn_ra_svn_cmd_entry_t {  const char *cmdname;  svn_ra_svn_command_handler handler;  svn_boolean_t terminate;} svn_ra_svn_cmd_entry_t;/** Memory representation of an on-the-wire data item. */typedef struct svn_ra_svn_item_t {  /** Variant indicator. */  enum {    SVN_RA_SVN_NUMBER,    SVN_RA_SVN_STRING,    SVN_RA_SVN_WORD,    SVN_RA_SVN_LIST  } kind;  /** Variant data. */  union {    apr_uint64_t number;    svn_string_t *string;    const char *word;    /** Contains @c svn_ra_svn_item_t's. */    apr_array_header_t *list;  } u;} svn_ra_svn_item_t;typedef svn_error_t *(*svn_ra_svn_edit_callback)(void *baton);/** Initialize a connection structure for the given socket or * input/output files. * * Either @a sock or @a in_file/@a out_file must be set, not both. */svn_ra_svn_conn_t *svn_ra_svn_create_conn(apr_socket_t *sock,                                          apr_file_t *in_file,                                          apr_file_t *out_file,                                          apr_pool_t *pool);/** Initialize a connection's capabilities to the ones specified in * @a list, which contains svn_ra_svn_item_t entries (which should * be of type SVN_RA_SVN_WORD; a malformed data error will result if * any are not). */svn_error_t *svn_ra_svn_set_capabilities(svn_ra_svn_conn_t *conn,                                         apr_array_header_t *list);/** Return @c TRUE if @a conn has the capability @a capability, or * @c FALSE if it does not. */svn_boolean_t svn_ra_svn_has_capability(svn_ra_svn_conn_t *conn,                                        const char *capability);/** Write a number over the net. * * Writes will be buffered until the next read or flush. */svn_error_t *svn_ra_svn_write_number(svn_ra_svn_conn_t *conn, apr_pool_t *pool,                                     apr_uint64_t number);/** Write a string over the net. * * Writes will be buffered until the next read or flush. */svn_error_t *svn_ra_svn_write_string(svn_ra_svn_conn_t *conn, apr_pool_t *pool,                                     const svn_string_t *str);/** Write a cstring over the net. * * Writes will be buffered until the next read or flush. */svn_error_t *svn_ra_svn_write_cstring(svn_ra_svn_conn_t *conn,                                      apr_pool_t *pool, const char *s);/** Write a word over the net. * * Writes will be buffered until the next read or flush. */svn_error_t *svn_ra_svn_write_word(svn_ra_svn_conn_t *conn, apr_pool_t *pool,                                   const char *word);/** Begin a list.  Writes will be buffered until the next read or flush. */svn_error_t *svn_ra_svn_start_list(svn_ra_svn_conn_t *conn, apr_pool_t *pool);/** End a list.  Writes will be buffered until the next read or flush. */svn_error_t *svn_ra_svn_end_list(svn_ra_svn_conn_t *conn, apr_pool_t *pool);/** Flush the write buffer. *

⌨️ 快捷键说明

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