id.h revision 299742
1/* id.h : interface to node ID functions, private to libsvn_fs_base 2 * 3 * ==================================================================== 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 * ==================================================================== 21 */ 22 23#ifndef SVN_LIBSVN_FS_BASE_ID_H 24#define SVN_LIBSVN_FS_BASE_ID_H 25 26#include "svn_fs.h" 27 28#ifdef __cplusplus 29extern "C" { 30#endif /* __cplusplus */ 31 32 33/*** ID accessor functions. ***/ 34 35/* Get the "node id" portion of ID. */ 36const char *svn_fs_base__id_node_id(const svn_fs_id_t *id); 37 38/* Get the "copy id" portion of ID. */ 39const char *svn_fs_base__id_copy_id(const svn_fs_id_t *id); 40 41/* Get the "txn id" portion of ID. */ 42const char *svn_fs_base__id_txn_id(const svn_fs_id_t *id); 43 44/* Convert ID into string form, allocated in POOL. */ 45svn_string_t *svn_fs_base__id_unparse(const svn_fs_id_t *id, 46 apr_pool_t *pool); 47 48/* Return true if A and B are equal. */ 49svn_boolean_t svn_fs_base__id_eq(const svn_fs_id_t *a, 50 const svn_fs_id_t *b); 51 52/* Return true if A and B are related. */ 53svn_boolean_t svn_fs_base__id_check_related(const svn_fs_id_t *a, 54 const svn_fs_id_t *b); 55 56/* Return the noderev relationship between A and B. */ 57svn_fs_node_relation_t svn_fs_base__id_compare(const svn_fs_id_t *a, 58 const svn_fs_id_t *b); 59 60/* Create an ID based on NODE_ID, COPY_ID, and TXN_ID, allocated in 61 POOL. */ 62svn_fs_id_t *svn_fs_base__id_create(const char *node_id, 63 const char *copy_id, 64 const char *txn_id, 65 apr_pool_t *pool); 66 67/* Return a copy of ID, allocated from POOL. */ 68svn_fs_id_t *svn_fs_base__id_copy(const svn_fs_id_t *id, 69 apr_pool_t *pool); 70 71/* Return an ID resulting from parsing the string DATA (with length 72 LEN), or NULL if DATA is an invalid ID string. */ 73svn_fs_id_t *svn_fs_base__id_parse(const char *data, 74 apr_size_t len, 75 apr_pool_t *pool); 76 77#ifdef __cplusplus 78} 79#endif /* __cplusplus */ 80 81#endif /* SVN_LIBSVN_FS_ID_H */ 82