Property handling header file - prop-set, prop-get, prop-list. More...
#include <sys/types.h>#include "global.h"#include "hash_ops.h"

Go to the source code of this file.
Enumerations | |
| enum | prp__set_from_aprhash_e { DEFAULT = 0, STORE_IN_FS = 1, ONLY_KEEP_USERDEF = 2 } |
Bitmasks for prp__set_from_aprhash() operation. More... | |
Functions | |
| int | prp__set (hash_t db, const char *name, const char *data, int datalen) |
| Set a property by name and data/datalen. | |
| int | prp__set_svnstr (hash_t db, const char *name, const svn_string_t *utf8_value) |
| Set a property by svn_string_t. | |
| int | prp__set_from_aprhash (struct estat *sts, apr_hash_t *props, enum prp__set_from_aprhash_e flags, hash_t *props_db, apr_pool_t *pool) |
| Writes the given set of properties of sts into its prop file. | |
| static int | prp__prop_will_be_removed (datum data) |
| Test function for to-be-removed properties. | |
Opening a property file. | |
| int | prp__open_byname (char *wcfile, int gdbm_mode, hash_t *db) |
| Open a property file, by WC-path. | |
| int | prp__open_byestat (struct estat *sts, int gdbm_mode, hash_t *db) |
| Open a property file, by struct estat. | |
| int | prp__db_open_byname (char *wcfile, int flags, char *name, hash_t *db) |
| Wrapper functions, if we need to have some compatibility layer. | |
| int | prp__get (hash_t db, char *keycp, datum *value) |
Get a value, addressed by a string; key length is calculated inclusive the \0. | |
| int | prp__store (hash_t db, datum key, datum value) |
| Store the value; basic function. | |
| static int | prp__first (hash_t db, datum *key) |
| Get first key. | |
| static int | prp__next (hash_t db, datum *key, const datum *oldkey) |
| Get next key. | |
| static int | prp__fetch (hash_t db, datum key, datum *value) |
| Fetch a value. | |
| int | prp__open_get_close (struct estat *sts, char *name, char **data, int *len) |
| Open, fetch, close a property hash corresponding to sts and name. | |
| int | prp__unlink_db_for_estat (struct estat *sts) |
| -. | |
Variables | |
| work_t | prp__g_work |
| Prop-get worker function. | |
| work_t | prp__s_work |
| Prop-set worker function. | |
| work_t | prp__l_work |
| Prop-list worker function. | |
| const char | prp___to_be_removed_value [] |
| Value string for to-be-removed properties. | |
Property handling header file - prop-set, prop-get, prop-list.
Definition in file props.h.
Bitmasks for prp__set_from_aprhash() operation.
| int prp__db_open_byname | ( | char * | wcfile, | |
| int | flags, | |||
| char * | name, | |||
| hash_t * | db | |||
| ) |
Wrapper functions, if we need to have some compatibility layer.
Open a database, path specified through wcfile and name.
| static int prp__fetch | ( | hash_t | db, | |
| datum | key, | |||
| datum * | value | |||
| ) | [inline, static] |
Fetch a value.
Definition at line 92 of file props.h.
References BUG_ON, DEBUGP, and hsh__fetch().
Referenced by ci___send_user_props(), prp__g_work(), prp__get(), prp__l_work(), and prp__s_work().


| static int prp__first | ( | hash_t | db, | |
| datum * | key | |||
| ) | [inline, static] |
Get first key.
Definition at line 70 of file props.h.
References BUG_ON, and hsh__first().
Referenced by ci___send_user_props(), and prp__l_work().


| int prp__get | ( | hash_t | db, | |
| char * | keycp, | |||
| datum * | value | |||
| ) |
Get a value, addressed by a string; key length is calculated inclusive the \0.
Get a value, addressed by a string; key length is calculated inclusive the \0.
Wrapper for prp__fetch().
Definition at line 445 of file props.c.
References prp__fetch().
Referenced by prp__open_get_close(), and up__fetch_decoder().


| static int prp__next | ( | hash_t | db, | |
| datum * | key, | |||
| const datum * | oldkey | |||
| ) | [inline, static] |
Get next key.
Definition at line 81 of file props.h.
References BUG_ON, and hsh__next().
Referenced by ci___send_user_props(), and prp__l_work().


Open a property file, by struct estat.
Open a property file, by struct estat.
Returns ENOENT silently.
Definition at line 366 of file props.c.
References ops__build_path(), prp__open_byname(), and STOPIF.
Referenced by ops__apply_group(), prp__open_get_close(), prp__s_work(), prp__set_from_aprhash(), and up__fetch_decoder().


| int prp__open_byname | ( | char * | wcfile, | |
| int | gdbm_mode, | |||
| hash_t * | db | |||
| ) |
Open a property file, by WC-path.
Open a property file, by WC-path.
Just a wrapper for the normal property operation.
Must be silent for ENOENT, so that fsvs pl * doesn't give an error.
Definition at line 350 of file props.c.
References hsh__new(), STOPIF, and WAA__PROP_EXT.
Referenced by prp__g_work(), prp__l_work(), and prp__open_byestat().


| int prp__open_get_close | ( | struct estat * | sts, | |
| char * | name, | |||
| char ** | data, | |||
| int * | len | |||
| ) |
Open, fetch, close a property hash corresponding to sts and name.
Open, fetch, close a property hash corresponding to sts and name.
data and len are optional output parameters, ie. may be NULL. if data is used, it must be free()d.
Returns ENOENT silently.
Definition at line 749 of file props.c.
References hsh__close(), IF_FREE, prp__get(), prp__open_byestat(), and STOPIF.

| static int prp__prop_will_be_removed | ( | datum | data | ) | [inline, static] |
Test function for to-be-removed properties.
Definition at line 128 of file props.h.
References prp___to_be_removed_value.
Referenced by ci___send_user_props(), prp__g_work(), and prp__l_work().

| int prp__set | ( | hash_t | db, | |
| const char * | name, | |||
| const char * | data, | |||
| int | datalen | |||
| ) |
Set a property by name and data/datalen.
Set a property by name and data/datalen.
If datalen is -1, strlen(data) is used.
Definition at line 383 of file props.c.
References BUG_ON, prp__store(), and STOPIF.
Referenced by prp__set_svnstr().


| int prp__set_from_aprhash | ( | struct estat * | sts, | |
| apr_hash_t * | props, | |||
| enum prp__set_from_aprhash_e | flags, | |||
| hash_t * | props_db, | |||
| apr_pool_t * | pool | |||
| ) |
Writes the given set of properties of sts into its prop file.
Writes the given set of properties of sts into its prop file.
The meta-data of the entry is overwritten with the data coming from the repository; its estat::remote_status is set. If props_db is not NULL, the still opened property database is returned.
Definition at line 461 of file props.c.
References DEBUGP, HASH_REMEMBER_FILENAME, hsh__close(), ONLY_KEEP_USERDEF, prp__open_byestat(), prp__set_svnstr(), prp__unlink_db_for_estat(), STOPIF, STORE_IN_FS, and up__parse_prop().
Referenced by ops__apply_group(), rev__get_props(), rev__get_text_to_stream(), and rev__install_file().


| int prp__set_svnstr | ( | hash_t | db, | |
| const char * | name, | |||
| const svn_string_t * | utf8_value | |||
| ) | [inline] |
Set a property by svn_string_t.
Set a property by svn_string_t.
Convenience function. The svn_string_t has the number of characters used, whereas we store the \0 at the end, too.
Definition at line 422 of file props.c.
References prp__set().
Referenced by prp__set_from_aprhash().


| int prp__store | ( | hash_t | db, | |
| datum | key, | |||
| datum | value | |||
| ) |
Store the value; basic function.
Definition at line 432 of file props.c.
References DEBUGP, hsh__store(), and STOPIF.
Referenced by prp__s_work(), and prp__set().


| int prp__unlink_db_for_estat | ( | struct estat * | sts | ) |
-.
Definition at line 869 of file props.c.
References ops__build_path(), STOPIF, waa__get_gwd_flag(), waa__get_waa_directory(), and WAA__PROP_EXT.
Referenced by prp__set_from_aprhash().


| const char prp___to_be_removed_value[] |
Value string for to-be-removed properties.
Value string for to-be-removed properties.
I thought about using "constant prefix.$random" => "$propertyname" for them - but it's more work than simply ignoring them before listing.
And as they're not widely used, it's easier this way.
Definition at line 339 of file props.c.
Referenced by prp__prop_will_be_removed(), and prp__s_work().
1.6.1