Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/include/private/svn_ra_svn_private.h view on Meta::CPAN
/** Flush the write buffer.
*
* Normally this shouldn't be necessary, since the write buffer is flushed
* when a read is attempted.
*/
svn_error_t *
svn_ra_svn__flush(svn_ra_svn_conn_t *conn,
apr_pool_t *pool);
/** Write a tuple, using a printf-like interface.
*
* The format string @a fmt may contain:
*
*@verbatim
Spec Argument type Item type
---- -------------------- ---------
n apr_uint64_t Number
r svn_revnum_t Number
s const svn_string_t * String
c const char * String
w const char * Word
b svn_boolean_t Word ("true" or "false")
( Begin tuple
) End tuple
? Remaining elements optional
! (at beginning or end) Suppress opening or closing of tuple
@endverbatim
*
* Inside the optional part of a tuple, 'r' values may be @c
* SVN_INVALID_REVNUM, 'n' values may be
* SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', and 'w' values may be
* @c NULL; in these cases no data will be written. 'b' and '(' may
* not appear in the optional part of a tuple. Either all or none of
* the optional values should be valid.
*
* (If we ever have a need for an optional boolean value, we should
* invent a 'B' specifier which stores a boolean into an int, using -1
* for unspecified. Right now there is no need for such a thing.)
*
* Use the '!' format specifier to write partial tuples when you have
* to transmit an array or other unusual data. For example, to write
* a tuple containing a revision, an array of words, and a boolean:
* @code
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "r(!", rev));
for (i = 0; i < n; i++)
SVN_ERR(svn_ra_svn_write_word(conn, pool, words[i]));
SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)b", flag)); @endcode
*/
svn_error_t *
svn_ra_svn__write_tuple(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *fmt, ...);
/** Read an item from the network into @a *item. */
svn_error_t *
svn_ra_svn__read_item(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
svn_ra_svn_item_t **item);
/** Scan data on @a conn until we find something which looks like the
* beginning of an svn server greeting (an open paren followed by a
* whitespace character). This function is appropriate for beginning
* a client connection opened in tunnel mode, since people's dotfiles
* sometimes write output to stdout. It may only be called at the
* beginning of a client connection.
*/
svn_error_t *
svn_ra_svn__skip_leading_garbage(svn_ra_svn_conn_t *conn,
apr_pool_t *pool);
/** Parse an array of @c svn_sort__item_t structures as a tuple, using a
* printf-like interface. The format string @a fmt may contain:
*
*@verbatim
Spec Argument type Item type
---- -------------------- ---------
n apr_uint64_t * Number
r svn_revnum_t * Number
s svn_string_t ** String
c const char ** String
w const char ** Word
b svn_boolean_t * Word ("true" or "false")
B apr_uint64_t * Word ("true" or "false")
l apr_array_header_t ** List
( Begin tuple
) End tuple
? Tuple is allowed to end here
@endverbatim
*
* Note that a tuple is only allowed to end precisely at a '?', or at
* the end of the specification. So if @a fmt is "c?cc" and @a list
* contains two elements, an error will result.
*
* 'B' is similar to 'b', but may be used in the optional tuple specification.
* It returns TRUE, FALSE, or SVN_RA_SVN_UNSPECIFIED_NUMBER.
*
* If an optional part of a tuple contains no data, 'r' values will be
* set to @c SVN_INVALID_REVNUM, 'n' and 'B' values will be set to
* SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', 'w', and 'l' values
* will be set to @c NULL. 'b' may not appear inside an optional
* tuple specification; use 'B' instead.
*/
svn_error_t *
svn_ra_svn__parse_tuple(const apr_array_header_t *list,
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_svn_parse_tuple().
*/
svn_error_t *
svn_ra_svn__read_tuple(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *fmt, ...);
/** Parse an array of @c svn_ra_svn_item_t structures as a list of
* properties, storing the properties in a hash table.
*
* @since New in 1.5.
*/
( run in 0.580 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )