31 #include <apr_pools.h>    33 #include <apr_tables.h>    34 #include <apr_file_io.h>         35 #include <apr_network_io.h>      47 #define SVN_RA_SVN_PORT 3690    50 #define SVN_RA_SVN_CAP_EDIT_PIPELINE "edit-pipeline"    51 #define SVN_RA_SVN_CAP_SVNDIFF1 "svndiff1"    52 #define SVN_RA_SVN_CAP_SVNDIFF2_ACCEPTED "accepts-svndiff2"    53 #define SVN_RA_SVN_CAP_ABSENT_ENTRIES "absent-entries"    55 #define SVN_RA_SVN_CAP_COMMIT_REVPROPS "commit-revprops"    57 #define SVN_RA_SVN_CAP_MERGEINFO "mergeinfo"    59 #define SVN_RA_SVN_CAP_DEPTH "depth"    61 #define SVN_RA_SVN_CAP_LOG_REVPROPS "log-revprops"    63 #define SVN_RA_SVN_CAP_PARTIAL_REPLAY "partial-replay"    65 #define SVN_RA_SVN_CAP_ATOMIC_REVPROPS "atomic-revprops"    67 #define SVN_RA_SVN_CAP_INHERITED_PROPS "inherited-props"    69 #define SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS "ephemeral-txnprops"    71 #define SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE "file-revs-reverse"    73 #define SVN_RA_SVN_CAP_LIST "list"    84 #define SVN_RA_SVN_DIRENT_KIND "kind"    87 #define SVN_RA_SVN_DIRENT_SIZE "size"    90 #define SVN_RA_SVN_DIRENT_HAS_PROPS "has-props"    93 #define SVN_RA_SVN_DIRENT_CREATED_REV "created-rev"    96 #define SVN_RA_SVN_DIRENT_TIME "time"    99 #define SVN_RA_SVN_DIRENT_LAST_AUTHOR "last-author"   106 #define SVN_RA_SVN_UNSPECIFIED_NUMBER ~((apr_uint64_t) 0)   115 #define SVN_CMD_ERR(expr)                                     \   117     svn_error_t *svn_err__temp = (expr);                      \   119       return svn_error_create(SVN_ERR_RA_SVN_CMD_ERR,         \   120                               svn_err__temp, NULL);           \   129                                                    apr_array_header_t *params,
   175 typedef svn_error_t *(*svn_ra_svn_edit_callback)(
void *baton);
   216                                            int compression_level,
   217                                            apr_size_t zero_copy_limit,
   218                                            apr_size_t error_check_interval,
   220                                            apr_uint64_t max_out,
   221                                            apr_pool_t *result_pool);
   234                                            int compression_level,
   235                                            apr_size_t zero_copy_limit,
   236                                            apr_size_t error_check_interval,
   237                                            apr_pool_t *result_pool);
   249                                            apr_file_t *out_file,
   250                                            int compression_level,
   251                                            apr_size_t zero_copy_limit,
   252                                            apr_size_t error_check_interval,
   266                         apr_file_t *out_file,
   267                         int compression_level,
   280                        apr_file_t *out_file,
   292                             const apr_array_header_t *list);
   298                           const char *capability);
   339                       svn_ra_svn_edit_callback callback,
   340                       void *callback_baton);
   414                         apr_uint64_t number);
   548                        const char *fmt, ...);
   615                        const char *fmt, ...);
   627                       const char *fmt, ...);
   653                              const char *fmt, ...);
   702                      const char *fmt, ...);
   716                               const char *fmt, ...);
 Counted-length strings for Subversion, plus some C string goodies. 
 
struct svn_ra_svn_conn_st svn_ra_svn_conn_t
an ra_svn connection. 
 
struct svn_ra_svn_item_t svn_ra_svn_item_t
Memory representation of an on-the-wire data item. 
 
svn_ra_svn_item_kind_t kind
Variant indicator. 
 
svn_error_t * svn_ra_svn_handle_commands(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const svn_ra_svn_cmd_entry_t *commands, void *baton)
Similar to svn_ra_svn_handle_commands2 but error_on_disconnect is always FALSE. 
 
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_conn3() but disables the zero copy code path and sets the error checking...
 
svn_error_t * svn_ra_svn_write_cmd(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *cmdname, const char *fmt,...)
Write a command over the network, using the same format string notation as svn_ra_svn_write_tuple(). 
 
svn_error_t * svn_ra_svn_write_cstring(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *s)
Write a cstring over the net. 
 
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 handler, used by svn_ra_svn_handle_commands(). 
 
svn_error_t * svn_ra_svn_write_number(svn_ra_svn_conn_t *conn, apr_pool_t *pool, apr_uint64_t number)
Write a number over the net. 
 
svn_ra_svn_command_handler handler
Handler for the command. 
 
svn_error_t * svn_ra_svn_write_cmd_response(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *fmt,...)
Write a successful command response over the network, using the same format string notation as svn_ra...
 
void svn_ra_svn_get_editor(const svn_delta_editor_t **editor, void **edit_baton, svn_ra_svn_conn_t *conn, apr_pool_t *pool, svn_ra_svn_edit_callback callback, void *callback_baton)
Set *editor and *edit_baton to an editor which will pass editing operations over the network...
 
A structure full of callback functions the delta source will invoke as it produces the delta...
 
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 string over the net. 
 
svn_error_t * svn_ra_svn_write_proplist(svn_ra_svn_conn_t *conn, apr_pool_t *pool, apr_hash_t *props)
Write a list of properties over the net. 
 
svn_ra_svn_conn_t * svn_ra_svn_create_conn4(apr_socket_t *sock, svn_stream_t *in_stream, svn_stream_t *out_stream, int compression_level, apr_size_t zero_copy_limit, apr_size_t error_check_interval, apr_pool_t *result_pool)
Similar to svn_ra_svn_create_conn5() but with max_in and max_out set to 0. 
 
svn_error_t * svn_ra_svn_handle_commands2(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const svn_ra_svn_cmd_entry_t *commands, void *baton, svn_boolean_t error_on_disconnect)
Accept commands over the network and handle them according to commands. 
 
struct svn_ra_svn_cmd_entry_t svn_ra_svn_cmd_entry_t
Command table, used by svn_ra_svn_handle_commands(). 
 
const char * cmdname
Name of the command. 
 
struct svn_config_t svn_config_t
Opaque structure describing a set of configuration options. 
 
svn_error_t * svn_ra_svn_read_tuple(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *fmt,...)
Read a tuple from the network and parse it as a tuple, using the format string notation from svn_ra_s...
 
svn_error_t * svn_ra_svn_parse_tuple(const apr_array_header_t *list, apr_pool_t *pool, const char *fmt,...)
Parse an array of svn_sort__item_t structures as a tuple, using a printf-like interface. 
 
Command table, used by svn_ra_svn_handle_commands(). 
 
svn_error_t * svn_ra_svn_skip_leading_garbage(svn_ra_svn_conn_t *conn, apr_pool_t *pool)
Scan data on conn until we find something which looks like the beginning of an svn server greeting (a...
 
apr_array_header_t * list
Contains svn_ra_svn_item_t's. 
 
svn_error_t * svn_ra_svn_parse_proplist(const apr_array_header_t *list, apr_pool_t *pool, apr_hash_t **props)
Parse an array of svn_ra_svn_item_t structures as a list of properties, storing the properties in a h...
 
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_conn4() but only supports apr_file_t handles instead of the more generic...
 
struct svn_stream_t svn_stream_t
An abstract stream of bytes–either incoming or outgoing or both. 
 
apr_size_t svn_ra_svn_zero_copy_limit(svn_ra_svn_conn_t *conn)
Return the zero-copy data block limit to use for network transmissions. 
 
Subversion's data types. 
 
const svn_version_t * svn_ra_svn_version(void)
Get libsvn_ra_svn version information. 
 
svn_error_t * svn_ra_svn_read_cmd_response(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *fmt,...)
Read a command response from the network and parse it as a tuple, using the format string notation fr...
 
svn_error_t * svn_ra_svn_write_word(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *word)
Write a word over the net. 
 
#define SVN_DEPRECATED
Macro used to mark deprecated functions. 
 
svn_error_t * svn_ra_svn_end_list(svn_ra_svn_conn_t *conn, apr_pool_t *pool)
End a list. 
 
svn_boolean_t svn_ra_svn_has_capability(svn_ra_svn_conn_t *conn, const char *capability)
Return TRUE if conn has the capability capability, or FALSE if it does not. 
 
const char * svn_ra_svn_conn_remote_host(svn_ra_svn_conn_t *conn)
Returns the remote address of the connection as a string, if known, or NULL if inapplicable. 
 
int svn_ra_svn_compression_level(svn_ra_svn_conn_t *conn)
Return the data compression level to use for network transmissions. 
 
Memory representation of an on-the-wire data item. 
 
svn_ra_svn_conn_t * svn_ra_svn_create_conn5(apr_socket_t *sock, svn_stream_t *in_stream, svn_stream_t *out_stream, int compression_level, apr_size_t zero_copy_limit, apr_size_t error_check_interval, apr_uint64_t max_in, apr_uint64_t max_out, apr_pool_t *result_pool)
Initialize a connection structure for the given socket or input/output streams. 
 
svn_error_t * svn_ra_svn_cram_server(svn_ra_svn_conn_t *conn, apr_pool_t *pool, svn_config_t *pwdb, const char **user, svn_boolean_t *success)
This function is only intended for use by svnserve. 
 
Accessing SVN configuration files. 
 
svn_error_t * svn_ra_svn_drive_editor(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const svn_delta_editor_t *editor, void *edit_baton, svn_boolean_t *aborted)
Like svn_ra_svn_drive_editor2, but with for_replay always FALSE. 
 
int svn_boolean_t
YABT: Yet Another Boolean Type. 
 
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)
Similar to svn_ra_svn_create_conn2() but uses the default compression level (SVN_DELTA_COMPRESSION_LE...
 
svn_boolean_t terminate
Termination flag. 
 
svn_error_t * svn_ra_svn_write_cmd_failure(svn_ra_svn_conn_t *conn, apr_pool_t *pool, svn_error_t *err)
Write an unsuccessful command response over the network. 
 
svn_ra_svn_item_kind_t
Data types defined by the svn:// protocol. 
 
svn_error_t * svn_ra_svn_write_tuple(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *fmt,...)
Write a tuple, using a printf-like interface. 
 
svn_error_t * svn_ra_svn_start_list(svn_ra_svn_conn_t *conn, apr_pool_t *pool)
Begin a list. 
 
svn_error_t * svn_ra_svn_read_item(svn_ra_svn_conn_t *conn, apr_pool_t *pool, svn_ra_svn_item_t **item)
Read an item from the network into *item. 
 
svn_error_t * svn_ra_svn_flush(svn_ra_svn_conn_t *conn, apr_pool_t *pool)
Flush the write buffer. 
 
svn_error_t * svn_ra_svn_set_capabilities(svn_ra_svn_conn_t *conn, const apr_array_header_t *list)
Add the capabilities in list to conn's capabilities. 
 
svn_error_t * svn_ra_svn_drive_editor2(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const svn_delta_editor_t *editor, void *edit_baton, svn_boolean_t *aborted, svn_boolean_t for_replay)
Receive edit commands over the network and use them to drive editor with edit_baton.