GME  13
Defines | Typedefs | Functions
svn_iter.h File Reference

The Subversion Iteration drivers helper routines. More...

Go to the source code of this file.

Defines

#define svn_iter_break(pool)   return svn_iter__break()

Typedefs

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)
typedef svn_error_t *(* svn_iter_apr_array_cb_t )(void *baton, void *item, apr_pool_t *pool)

Functions

svn_error_tsvn_iter_apr_hash (svn_boolean_t *completed, apr_hash_t *hash, svn_iter_apr_hash_cb_t func, void *baton, apr_pool_t *pool)
svn_error_tsvn_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)
svn_error_tsvn_iter__break (void)

Detailed Description

The Subversion Iteration drivers helper routines.

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_iter.h.


Define Documentation

#define svn_iter_break (   pool)    return svn_iter__break()

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.

Definition at line 132 of file svn_iter.h.


Typedef Documentation

typedef svn_error_t*(* svn_iter_apr_array_cb_t)(void *baton, void *item, apr_pool_t *pool)

Iteration callback used in conjuction with svn_iter_apr_array().

Use pool for temporary allocation, it's cleared between invocations.

baton is the baton passed to svn_iter_apr_array(). item is a pointer to the item written to the array with the APR_ARRAY_PUSH() macro.

Since:
New in 1.5.

Definition at line 90 of file svn_iter.h.

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)

Callback function for use with svn_iter_apr_hash(). Use pool for temporary allocation, it's cleared between invocations.

key, klen and val are the values normally retrieved with apr_hash_this().

baton is the baton passed into svn_iter_apr_hash().

Since:
New in 1.5.

Definition at line 53 of file svn_iter.h.


Function Documentation

Internal routine used by svn_iter_break() macro.

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 
)

Iterate over the elements in array calling func for each one until there are no more elements or func returns an error.

Uses pool for temporary allocations.

If completed is not NULL, then on return - if func returns no errors - *completed will be set to TRUE.

If func returns an error other than SVN_ERR_ITER_BREAK, that error is returned. When func returns SVN_ERR_ITER_BREAK, iteration is interrupted, but no error is returned and *completed is set to FALSE (even if this iteration was the last one).

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 
)

Iterate over the elements in hash, calling func for each one until there are no more elements or func returns an error.

Uses pool for temporary allocations.

If completed is not NULL, then on return - if func returns no errors - *completed will be set to TRUE.

If func returns an error other than SVN_ERR_ITER_BREAK, that error is returned. When func returns SVN_ERR_ITER_BREAK, iteration is interrupted, but no error is returned and *completed is set to FALSE (even if this iteration was the last one).

Since:
New in 1.5.