GME
13
|
libsvn_ra_svn functions used by the server More...
Go to the source code of this file.
libsvn_ra_svn functions used by the server
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ====================================================================
Definition in file svn_ra_svn.h.
#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)
A specialized form of 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 SVN_ERR
when performing I/O with the client.
Definition at line 112 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_ABSENT_ENTRIES "absent-entries" |
Definition at line 52 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_ATOMIC_REVPROPS "atomic-revprops" |
Definition at line 64 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_COMMIT_REVPROPS "commit-revprops" |
Definition at line 54 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_DEPTH "depth" |
Definition at line 58 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_EDIT_PIPELINE "edit-pipeline" |
Currently-defined capabilities.
Definition at line 50 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS "ephemeral-txnprops" |
Definition at line 68 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE "file-revs-reverse" |
Definition at line 70 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_INHERITED_PROPS "inherited-props" |
Definition at line 66 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_LOG_REVPROPS "log-revprops" |
Definition at line 60 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_MERGEINFO "mergeinfo" |
Definition at line 56 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_PARTIAL_REPLAY "partial-replay" |
Definition at line 62 of file svn_ra_svn.h.
#define SVN_RA_SVN_CAP_SVNDIFF1 "svndiff1" |
Definition at line 51 of file svn_ra_svn.h.
#define SVN_RA_SVN_PORT 3690 |
The well-known svn port number.
Definition at line 47 of file svn_ra_svn.h.
#define SVN_RA_SVN_UNSPECIFIED_NUMBER ~((apr_uint64_t) 0) |
A value used to indicate an optional number element in a tuple that was not received.
Definition at line 103 of file svn_ra_svn.h.
typedef struct svn_ra_svn_cmd_entry_t svn_ra_svn_cmd_entry_t |
Command table, 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 handler, used by svn_ra_svn_handle_commands().
Definition at line 124 of file svn_ra_svn.h.
typedef struct svn_ra_svn_conn_st svn_ra_svn_conn_t |
an ra_svn connection.
Definition at line 121 of file svn_ra_svn.h.
typedef svn_error_t*(* svn_ra_svn_edit_callback)(void *baton) |
Definition at line 165 of file svn_ra_svn.h.
typedef struct svn_ra_svn_item_t svn_ra_svn_item_t |
Memory representation of an on-the-wire data item.
int svn_ra_svn_compression_level | ( | svn_ra_svn_conn_t * | conn | ) |
Return the data compression level to use for network transmissions.
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.
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.
Perform CRAM-MD5 password authentication. On success, return SVN_NO_ERROR with *user set to the username and *success set to TRUE. On an error which can be reported to the client, report the error and return SVN_NO_ERROR with *success set to FALSE. On communications failure, return an error.
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 | ||
) |
Similar to svn_ra_svn_create_conn2() but uses the default compression level (SVN_DELTA_COMPRESSION_LEVEL_DEFAULT) for network transmissions.
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_conn3() but disables the zero copy code path and sets the error checking interval to 0.
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 | ||
) |
Initialize a connection structure for the given socket or input/output files.
Either sock or in_file/out_file must be set, not both. compression_level specifies the desired network data compression level (zlib) from 0 (no compression) to 9 (best but slowest).
If 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 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 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 pool.
SVN_DEPRECATED 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.
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. On return, *aborted will be set if the edit was aborted. The drive can be terminated with a finish-replay command only if for_replay is TRUE.
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, using conn and pool.
Upon successful completion of the edit, the editor will invoke callback with callback_baton as an argument.
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.
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. 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 conn, it remains set.
const svn_version_t* svn_ra_svn_version | ( | void | ) |
Get libsvn_ra_svn version information.
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.