Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/include/svn_ra_svn.h view on Meta::CPAN
#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().
*/
typedef struct svn_ra_svn_cmd_entry_t
{
/** Name of the command */
const char *cmdname;
/** Handler for the command */
svn_ra_svn_command_handler handler;
/** Termination flag. If set, command-handling will cease after
* command is processed. */
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.
* @a compression_level specifies the desired network data compression
* level (zlib) from 0 (no compression) to 9 (best but slowest).
*
* If @a zero_copy_limit is not 0, cached file contents smaller than the
* given limit may be sent directly to the network socket. Otherwise,
* it will be copied into a temporary buffer before being forwarded to
* the network stack. Since the zero-copy code path has to enforce strict
* time-outs, the receiver must be able to process @a zero_copy_limit
* bytes within one second. Even temporary failure to do so may cause
* the server to cancel the respective operation with a time-out error.
*
* To reduce the overhead of checking for cancellation requests from the
* data receiver, set @a error_check_interval to some non-zero value.
* It defines the number of bytes that must have been sent since the last
* check before the next check will be made.
*
* Allocate the result in @a pool.
*
* @since New in 1.8
*/
svn_ra_svn_conn_t *svn_ra_svn_create_conn3(apr_socket_t *sock,
apr_file_t *in_file,
apr_file_t *out_file,
int compression_level,
apr_size_t zero_copy_limit,
apr_size_t error_check_interval,
apr_pool_t *pool);
/** Similar to svn_ra_svn_create_conn3() but disables the zero copy code
* path and sets the error checking interval to 0.
*
* @since New in 1.7.
*
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
SVN_DEPRECATED
svn_ra_svn_conn_t *
svn_ra_svn_create_conn2(apr_socket_t *sock,
apr_file_t *in_file,
apr_file_t *out_file,
int compression_level,
apr_pool_t *pool);
/** Similar to svn_ra_svn_create_conn2() but uses the default
* compression level (#SVN_DELTA_COMPRESSION_LEVEL_DEFAULT) for network
* transmissions.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
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);
/** Add the capabilities in @a list to @a conn's capabilities.
* @a list 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).
*
* This is idempotent: if a given capability was already set for
* @a conn, it remains set.
( run in 1.029 second using v1.01-cache-2.11-cpan-d7f47b0818f )