GME  13
Classes | Defines | Typedefs | Functions
svn_ra_svn.h File Reference

libsvn_ra_svn functions used by the server More...

Go to the source code of this file.

Classes

struct  svn_ra_svn_cmd_entry_t
struct  svn_ra_svn_item_t

Defines

#define SVN_RA_SVN_PORT   3690
#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"
#define SVN_RA_SVN_CAP_COMMIT_REVPROPS   "commit-revprops"
#define SVN_RA_SVN_CAP_MERGEINFO   "mergeinfo"
#define SVN_RA_SVN_CAP_DEPTH   "depth"
#define SVN_RA_SVN_CAP_LOG_REVPROPS   "log-revprops"
#define SVN_RA_SVN_CAP_PARTIAL_REPLAY   "partial-replay"
#define SVN_RA_SVN_CAP_ATOMIC_REVPROPS   "atomic-revprops"
#define SVN_RA_SVN_CAP_INHERITED_PROPS   "inherited-props"
#define SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS   "ephemeral-txnprops"
#define SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE   "file-revs-reverse"
#define SVN_RA_SVN_DIRENT_KIND   "kind"
#define SVN_RA_SVN_DIRENT_SIZE   "size"
#define SVN_RA_SVN_DIRENT_HAS_PROPS   "has-props"
#define SVN_RA_SVN_DIRENT_CREATED_REV   "created-rev"
#define SVN_RA_SVN_DIRENT_TIME   "time"
#define SVN_RA_SVN_DIRENT_LAST_AUTHOR   "last-author"
#define SVN_RA_SVN_UNSPECIFIED_NUMBER   ~((apr_uint64_t) 0)
#define SVN_CMD_ERR(expr)

Typedefs

typedef struct svn_ra_svn_conn_st svn_ra_svn_conn_t
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)
typedef struct
svn_ra_svn_cmd_entry_t 
svn_ra_svn_cmd_entry_t
typedef struct svn_ra_svn_item_t svn_ra_svn_item_t
typedef svn_error_t *(* svn_ra_svn_edit_callback )(void *baton)

Functions

svn_ra_svn_conn_tsvn_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)
SVN_DEPRECATED svn_ra_svn_conn_tsvn_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)
SVN_DEPRECATED svn_ra_svn_conn_tsvn_ra_svn_create_conn (apr_socket_t *sock, apr_file_t *in_file, apr_file_t *out_file, apr_pool_t *pool)
svn_error_tsvn_ra_svn_set_capabilities (svn_ra_svn_conn_t *conn, const apr_array_header_t *list)
svn_boolean_t svn_ra_svn_has_capability (svn_ra_svn_conn_t *conn, const char *capability)
int svn_ra_svn_compression_level (svn_ra_svn_conn_t *conn)
apr_size_t svn_ra_svn_zero_copy_limit (svn_ra_svn_conn_t *conn)
const char * svn_ra_svn_conn_remote_host (svn_ra_svn_conn_t *conn)
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)
svn_error_tsvn_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)
SVN_DEPRECATED svn_error_tsvn_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)
svn_error_tsvn_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)
const svn_version_tsvn_ra_svn_version (void)
SVN_DEPRECATED svn_error_tsvn_ra_svn_write_number (svn_ra_svn_conn_t *conn, apr_pool_t *pool, apr_uint64_t number)
SVN_DEPRECATED svn_error_tsvn_ra_svn_write_string (svn_ra_svn_conn_t *conn, apr_pool_t *pool, const svn_string_t *str)
SVN_DEPRECATED svn_error_tsvn_ra_svn_write_cstring (svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *s)
SVN_DEPRECATED svn_error_tsvn_ra_svn_write_word (svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *word)
SVN_DEPRECATED svn_error_tsvn_ra_svn_write_proplist (svn_ra_svn_conn_t *conn, apr_pool_t *pool, apr_hash_t *props)
SVN_DEPRECATED svn_error_tsvn_ra_svn_start_list (svn_ra_svn_conn_t *conn, apr_pool_t *pool)
SVN_DEPRECATED svn_error_tsvn_ra_svn_end_list (svn_ra_svn_conn_t *conn, apr_pool_t *pool)
SVN_DEPRECATED svn_error_tsvn_ra_svn_flush (svn_ra_svn_conn_t *conn, apr_pool_t *pool)
SVN_DEPRECATED svn_error_tsvn_ra_svn_write_tuple (svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *fmt,...)
SVN_DEPRECATED svn_error_tsvn_ra_svn_read_item (svn_ra_svn_conn_t *conn, apr_pool_t *pool, svn_ra_svn_item_t **item)
SVN_DEPRECATED svn_error_tsvn_ra_svn_skip_leading_garbage (svn_ra_svn_conn_t *conn, apr_pool_t *pool)
SVN_DEPRECATED svn_error_tsvn_ra_svn_parse_tuple (const apr_array_header_t *list, apr_pool_t *pool, const char *fmt,...)
SVN_DEPRECATED svn_error_tsvn_ra_svn_read_tuple (svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *fmt,...)
SVN_DEPRECATED svn_error_tsvn_ra_svn_parse_proplist (const apr_array_header_t *list, apr_pool_t *pool, apr_hash_t **props)
SVN_DEPRECATED svn_error_tsvn_ra_svn_read_cmd_response (svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *fmt,...)
SVN_DEPRECATED svn_error_tsvn_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)
SVN_DEPRECATED svn_error_tsvn_ra_svn_handle_commands (svn_ra_svn_conn_t *conn, apr_pool_t *pool, const svn_ra_svn_cmd_entry_t *commands, void *baton)
SVN_DEPRECATED svn_error_tsvn_ra_svn_write_cmd (svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *cmdname, const char *fmt,...)
SVN_DEPRECATED svn_error_tsvn_ra_svn_write_cmd_response (svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *fmt,...)
SVN_DEPRECATED svn_error_tsvn_ra_svn_write_cmd_failure (svn_ra_svn_conn_t *conn, apr_pool_t *pool, svn_error_t *err)

Detailed Description

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 Documentation

#define SVN_CMD_ERR (   expr)
Value:
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 Documentation

Command table, used by svn_ra_svn_handle_commands().

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.

Definition at line 165 of file svn_ra_svn.h.

Memory representation of an on-the-wire data item.


Function Documentation

Return the data compression level to use for network transmissions.

Since:
New in 1.7.

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.

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_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.

Since:
New in 1.7.
Deprecated:
Provided for backward compatibility with the 1.7 API.
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.

Since:
New in 1.8
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.

Deprecated:
Provided for backward compatibility with the 1.3 API.
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.

Since:
New in 1.4.
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.

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.

Since:
New in 1.1.

Return the zero-copy data block limit to use for network transmissions.

See also:
http://en.wikipedia.org/wiki/Zero-copy
Since:
New in 1.8.