/usr/include/subversion-1/svn_iter.h is in libsvn-dev 1.6.17dfsg-3ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | /**
* @copyright
* ====================================================================
* Copyright (c) 2007 CollabNet. All rights reserved.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://subversion.tigris.org/license-1.html.
* If newer versions of this license are posted there, you may use a
* newer version instead, at your option.
*
* This software consists of voluntary contributions made by many
* individuals. For exact contribution history, see the revision
* history and logs, available at http://subversion.tigris.org/.
* ====================================================================
* @endcopyright
*
* @file svn_iter.h
* @brief The Subversion Iteration drivers helper routines
*
*/
#ifndef SVN_ITER_H
#define SVN_ITER_H
#include <apr.h> /* for apr_ssize_t */
#include <apr_pools.h> /* for apr_pool_t */
#include <apr_hash.h> /* for apr_hash_t */
#include <apr_tables.h> /* for apr_array_header_t */
#include "svn_types.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/** Callback function for use with svn_iter_apr_hash().
* Use @a pool for temporary allocation, it's cleared between invocations.
*
* @a key, @a klen and @a val are the values normally retrieved with
* apr_hash_this().
*
* @a baton is the baton passed into svn_iter_apr_hash().
*
* @since New in 1.5.
*/
typedef svn_error_t *(*svn_iter_apr_hash_cb_t)(void *baton,
const void *key,
apr_ssize_t klen,
void *val, apr_pool_t *pool);
/** Iterate over the elements in @a hash, calling @a func for each one until
* there are no more elements or @a func returns an error.
*
* Uses @a pool for temporary allocations.
*
* If @a completed is not NULL, then on return - if @a func returns no
* errors - @a *completed will be set to @c TRUE.
*
* If @a func returns an error other than @c SVN_ERR_ITER_BREAK, that
* error is returned. When @a func returns @c SVN_ERR_ITER_BREAK,
* iteration is interrupted, but no error is returned and @a *completed is
* set to @c FALSE.
*
* @since New in 1.5.
*/
svn_error_t *
svn_iter_apr_hash(svn_boolean_t *completed,
apr_hash_t *hash,
svn_iter_apr_hash_cb_t func,
void *baton,
apr_pool_t *pool);
/** Iteration callback used in conjuction with svn_iter_apr_array().
*
* Use @a pool for temporary allocation, it's cleared between invocations.
*
* @a baton is the baton passed to svn_iter_apr_array(). @a item
* is a pointer to the item written to the array with the APR_ARRAY_PUSH()
* macro.
*
* @since New in 1.5.
*/
typedef svn_error_t *(*svn_iter_apr_array_cb_t)(void *baton,
void *item,
apr_pool_t *pool);
/** Iterate over the elements in @a array calling @a func for each one until
* there are no more elements or @a func returns an error.
*
* Uses @a pool for temporary allocations.
*
* If @a completed is not NULL, then on return - if @a func returns no
* errors - @a *completed will be set to @c TRUE.
*
* If @a func returns an error other than @c SVN_ERR_ITER_BREAK, that
* error is returned. When @a func returns @c SVN_ERR_ITER_BREAK,
* iteration is interrupted, but no error is returned and @a *completed is
* set to @c FALSE.
*
* @since New in 1.5.
*/
svn_error_t *
svn_iter_apr_array(svn_boolean_t *completed,
const apr_array_header_t *array,
svn_iter_apr_array_cb_t func,
void *baton,
apr_pool_t *pool);
/** Internal routine used by svn_iter_break() macro.
*/
svn_error_t *
svn_iter__break(void);
/** Helper macro to break looping in svn_iter_apr_array() and
* svn_iter_apr_hash() driven loops.
*
* @note The error is just a means of communicating between
* driver and callback. There is no need for it to exist
* past the lifetime of the iterpool.
*
* @since New in 1.5.
*/
#define svn_iter_break(pool) return svn_iter__break()
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_ITER_H */
|