Subversion 1.6.16

svn_config.h

Go to the documentation of this file.
00001 /**
00002  * @copyright
00003  * ====================================================================
00004  * Copyright (c) 2000-2008 CollabNet.  All rights reserved.
00005  *
00006  * This software is licensed as described in the file COPYING, which
00007  * you should have received as part of this distribution.  The terms
00008  * are also available at http://subversion.tigris.org/license-1.html.
00009  * If newer versions of this license are posted there, you may use a
00010  * newer version instead, at your option.
00011  *
00012  * This software consists of voluntary contributions made by many
00013  * individuals.  For exact contribution history, see the revision
00014  * history and logs, available at http://subversion.tigris.org/.
00015  * ====================================================================
00016  * @endcopyright
00017  *
00018  * @file svn_config.h
00019  * @brief Accessing SVN configuration files.
00020  */
00021 
00022 
00023 
00024 #ifndef SVN_CONFIG_H
00025 #define SVN_CONFIG_H
00026 
00027 #include <apr.h>        /* for apr_int64_t */
00028 #include <apr_pools.h>  /* for apr_pool_t */
00029 #include <apr_hash.h>   /* for apr_hash_t */
00030 
00031 #include "svn_types.h"
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif /* __cplusplus */
00036 
00037 
00038 /**************************************************************************
00039  ***                                                                    ***
00040  ***  For a description of the SVN configuration file syntax, see       ***
00041  ***  your ~/.subversion/README, which is written out automatically by  ***
00042  ***  svn_config_ensure().                                              ***
00043  ***                                                                    ***
00044  **************************************************************************/
00045 
00046 
00047 /** Opaque structure describing a set of configuration options. */
00048 typedef struct svn_config_t svn_config_t;
00049 
00050 
00051 /*** Configuration Defines ***/
00052 
00053 /**
00054  * @name Client configuration files strings
00055  * Strings for the names of files, sections, and options in the
00056  * client configuration files.
00057  * @{
00058  */
00059 #define SVN_CONFIG_CATEGORY_SERVERS        "servers"
00060 #define SVN_CONFIG_SECTION_GROUPS               "groups"
00061 #define SVN_CONFIG_SECTION_GLOBAL               "global"
00062 #define SVN_CONFIG_OPTION_HTTP_PROXY_HOST           "http-proxy-host"
00063 #define SVN_CONFIG_OPTION_HTTP_PROXY_PORT           "http-proxy-port"
00064 #define SVN_CONFIG_OPTION_HTTP_PROXY_USERNAME       "http-proxy-username"
00065 #define SVN_CONFIG_OPTION_HTTP_PROXY_PASSWORD       "http-proxy-password"
00066 #define SVN_CONFIG_OPTION_HTTP_PROXY_EXCEPTIONS     "http-proxy-exceptions"
00067 #define SVN_CONFIG_OPTION_HTTP_TIMEOUT              "http-timeout"
00068 #define SVN_CONFIG_OPTION_HTTP_COMPRESSION          "http-compression"
00069 #define SVN_CONFIG_OPTION_NEON_DEBUG_MASK           "neon-debug-mask"
00070 #define SVN_CONFIG_OPTION_HTTP_AUTH_TYPES           "http-auth-types"
00071 #define SVN_CONFIG_OPTION_SSL_AUTHORITY_FILES       "ssl-authority-files"
00072 #define SVN_CONFIG_OPTION_SSL_TRUST_DEFAULT_CA      "ssl-trust-default-ca"
00073 #define SVN_CONFIG_OPTION_SSL_CLIENT_CERT_FILE      "ssl-client-cert-file"
00074 #define SVN_CONFIG_OPTION_SSL_CLIENT_CERT_PASSWORD  "ssl-client-cert-password"
00075 #define SVN_CONFIG_OPTION_SSL_PKCS11_PROVIDER       "ssl-pkcs11-provider"
00076 #define SVN_CONFIG_OPTION_HTTP_LIBRARY              "http-library"
00077 #define SVN_CONFIG_OPTION_STORE_PASSWORDS           "store-passwords"
00078 #define SVN_CONFIG_OPTION_STORE_PLAINTEXT_PASSWORDS "store-plaintext-passwords"
00079 #define SVN_CONFIG_OPTION_STORE_AUTH_CREDS          "store-auth-creds"
00080 #define SVN_CONFIG_OPTION_STORE_SSL_CLIENT_CERT_PP  "store-ssl-client-cert-pp"
00081 #define SVN_CONFIG_OPTION_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT \
00082                                           "store-ssl-client-cert-pp-plaintext"
00083 #define SVN_CONFIG_OPTION_USERNAME                  "username"
00084 
00085 #define SVN_CONFIG_CATEGORY_CONFIG          "config"
00086 #define SVN_CONFIG_SECTION_AUTH                 "auth"
00087 #define SVN_CONFIG_OPTION_PASSWORD_STORES           "password-stores"
00088 #define SVN_CONFIG_OPTION_KWALLET_WALLET            "kwallet-wallet"
00089 #define SVN_CONFIG_OPTION_KWALLET_SVN_APPLICATION_NAME_WITH_PID "kwallet-svn-application-name-with-pid"
00090 /* The majority of options of the "auth" section
00091  * has been moved to SVN_CONFIG_CATEGORY_SERVERS. */
00092 #define SVN_CONFIG_SECTION_HELPERS              "helpers"
00093 #define SVN_CONFIG_OPTION_EDITOR_CMD                "editor-cmd"
00094 #define SVN_CONFIG_OPTION_DIFF_CMD                  "diff-cmd"
00095 #define SVN_CONFIG_OPTION_DIFF3_CMD                 "diff3-cmd"
00096 #define SVN_CONFIG_OPTION_DIFF3_HAS_PROGRAM_ARG     "diff3-has-program-arg"
00097 #define SVN_CONFIG_OPTION_MERGE_TOOL_CMD            "merge-tool-cmd"
00098 #define SVN_CONFIG_SECTION_MISCELLANY           "miscellany"
00099 #define SVN_CONFIG_OPTION_GLOBAL_IGNORES            "global-ignores"
00100 #define SVN_CONFIG_OPTION_LOG_ENCODING              "log-encoding"
00101 #define SVN_CONFIG_OPTION_USE_COMMIT_TIMES          "use-commit-times"
00102 #define SVN_CONFIG_OPTION_TEMPLATE_ROOT             "template-root"
00103 #define SVN_CONFIG_OPTION_ENABLE_AUTO_PROPS         "enable-auto-props"
00104 #define SVN_CONFIG_OPTION_NO_UNLOCK                 "no-unlock"
00105 #define SVN_CONFIG_OPTION_MIMETYPES_FILE            "mime-types-file"
00106 #define SVN_CONFIG_OPTION_PRESERVED_CF_EXTS         "preserved-conflict-file-exts"
00107 #define SVN_CONFIG_OPTION_INTERACTIVE_CONFLICTS     "interactive-conflicts"
00108 #define SVN_CONFIG_SECTION_TUNNELS              "tunnels"
00109 #define SVN_CONFIG_SECTION_AUTO_PROPS           "auto-props"
00110 /** @} */
00111 
00112 /** @name Repository conf directory configuration files strings
00113  * Strings for the names of sections and options in the
00114  * repository conf directory configuration files.
00115  * @{
00116  */
00117 /* For repository svnserve.conf files */
00118 #define SVN_CONFIG_SECTION_GENERAL              "general"
00119 #define SVN_CONFIG_OPTION_ANON_ACCESS               "anon-access"
00120 #define SVN_CONFIG_OPTION_AUTH_ACCESS               "auth-access"
00121 #define SVN_CONFIG_OPTION_PASSWORD_DB               "password-db"
00122 #define SVN_CONFIG_OPTION_REALM                     "realm"
00123 #define SVN_CONFIG_OPTION_AUTHZ_DB                  "authz-db"
00124 #define SVN_CONFIG_SECTION_SASL                 "sasl"
00125 #define SVN_CONFIG_OPTION_USE_SASL                  "use-sasl"
00126 #define SVN_CONFIG_OPTION_MIN_SSF                   "min-encryption"
00127 #define SVN_CONFIG_OPTION_MAX_SSF                   "max-encryption"
00128 
00129 /* For repository password database */
00130 #define SVN_CONFIG_SECTION_USERS                "users"
00131 /** @} */
00132 
00133 /*** Configuration Default Values ***/
00134 
00135 /* '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'. */
00136 /* We want this to be printed on two lines in the generated config file,
00137  * but we don't want the # character to end up in the variable.
00138  */
00139 #define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 \
00140   "*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo"
00141 #define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2 \
00142   "*.rej *~ #*# .#* .*.swp .DS_Store"
00143 
00144 #define SVN_CONFIG_DEFAULT_GLOBAL_IGNORES \
00145   SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 " " \
00146   SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2
00147 
00148 #define SVN_CONFIG_TRUE  "TRUE"
00149 #define SVN_CONFIG_FALSE "FALSE"
00150 #define SVN_CONFIG_ASK   "ASK"
00151 
00152 /* Default values for some options. Should be passed as default values
00153  * to svn_config_get and friends, instead of hard-coding the defaults in
00154  * multiple places. */
00155 #define SVN_CONFIG_DEFAULT_OPTION_STORE_PASSWORDS            TRUE
00156 #define SVN_CONFIG_DEFAULT_OPTION_STORE_PLAINTEXT_PASSWORDS  SVN_CONFIG_ASK
00157 #define SVN_CONFIG_DEFAULT_OPTION_STORE_AUTH_CREDS           TRUE
00158 #define SVN_CONFIG_DEFAULT_OPTION_STORE_SSL_CLIENT_CERT_PP   TRUE
00159 #define SVN_CONFIG_DEFAULT_OPTION_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT \
00160                                                              SVN_CONFIG_ASK
00161 
00162 /** Read configuration information from the standard sources and merge it
00163  * into the hash @a *cfg_hash.  If @a config_dir is not NULL it specifies a
00164  * directory from which to read the configuration files, overriding all
00165  * other sources.  Otherwise, first read any system-wide configurations
00166  * (from a file or from the registry), then merge in personal
00167  * configurations (again from file or registry).  The hash and all its data
00168  * are allocated in @a pool.
00169  *
00170  * @a *cfg_hash is a hash whose keys are @c const char * configuration
00171  * categories (@c SVN_CONFIG_CATEGORY_SERVERS,
00172  * @c SVN_CONFIG_CATEGORY_CONFIG, etc.) and whose values are the @c
00173  * svn_config_t * items representing the configuration values for that
00174  * category.
00175  */
00176 svn_error_t *
00177 svn_config_get_config(apr_hash_t **cfg_hash,
00178                       const char *config_dir,
00179                       apr_pool_t *pool);
00180 
00181 
00182 /** Read configuration data from @a file (a file or registry path) into
00183  * @a *cfgp, allocated in @a pool.
00184  *
00185  * If @a file does not exist, then if @a must_exist, return an error,
00186  * otherwise return an empty @c svn_config_t.
00187  */
00188 svn_error_t *
00189 svn_config_read(svn_config_t **cfgp,
00190                 const char *file,
00191                 svn_boolean_t must_exist,
00192                 apr_pool_t *pool);
00193 
00194 /** Like svn_config_read(), but merges the configuration data from @a file
00195  * (a file or registry path) into @a *cfg, which was previously returned
00196  * from svn_config_read().  This function invalidates all value
00197  * expansions in @a cfg, so that the next svn_config_get() takes the
00198  * modifications into account.
00199  */
00200 svn_error_t *
00201 svn_config_merge(svn_config_t *cfg,
00202                  const char *file,
00203                  svn_boolean_t must_exist);
00204 
00205 
00206 /** Find the value of a (@a section, @a option) pair in @a cfg, set @a
00207  * *valuep to the value.
00208  *
00209  * If @a cfg is @c NULL, just sets @a *valuep to @a default_value. If
00210  * the value does not exist, expand and return @a default_value. @a
00211  * default_value can be NULL.
00212  *
00213  * The returned value will be valid at least until the next call to
00214  * svn_config_get(), or for the lifetime of @a default_value. It is
00215  * safest to consume the returned value immediately.
00216  *
00217  * This function may change @a cfg by expanding option values.
00218  */
00219 void
00220 svn_config_get(svn_config_t *cfg,
00221                const char **valuep,
00222                const char *section,
00223                const char *option,
00224                const char *default_value);
00225 
00226 /** Add or replace the value of a (@a section, @a option) pair in @a cfg with
00227  * @a value.
00228  *
00229  * This function invalidates all value expansions in @a cfg.
00230  *
00231  * To remove an option, pass NULL for the @c value.
00232  */
00233 void
00234 svn_config_set(svn_config_t *cfg,
00235                const char *section,
00236                const char *option,
00237                const char *value);
00238 
00239 /** Like svn_config_get(), but for boolean values.
00240  *
00241  * Parses the option as a boolean value. The recognized representations
00242  * are 'TRUE'/'FALSE', 'yes'/'no', 'on'/'off', '1'/'0'; case does not
00243  * matter. Returns an error if the option doesn't contain a known string.
00244  */
00245 svn_error_t *
00246 svn_config_get_bool(svn_config_t *cfg,
00247                     svn_boolean_t *valuep,
00248                     const char *section,
00249                     const char *option,
00250                     svn_boolean_t default_value);
00251 
00252 /** Like svn_config_set(), but for boolean values.
00253  *
00254  * Sets the option to 'TRUE'/'FALSE', depending on @a value.
00255  */
00256 void
00257 svn_config_set_bool(svn_config_t *cfg,
00258                     const char *section,
00259                     const char *option,
00260                     svn_boolean_t value);
00261 
00262 /** Like svn_config_get(), but only for yes/no/ask values.
00263  *
00264  * Parse @a option in @a section and set @a *valuep to one of
00265  * SVN_CONFIG_TRUE, SVN_CONFIG_FALSE, or SVN_CONFIG_ASK.  If there is
00266  * no setting for @a option, then parse @a default_value and set
00267  * @a *valuep accordingly.  If @a default_value is NULL, the result is
00268  * undefined, and may be an error; we recommend that you pass one of
00269  * SVN_CONFIG_TRUE, SVN_CONFIG_FALSE, or SVN_CONFIG_ASK for @a default value.
00270  *
00271  * Valid representations are (at least) "true"/"false", "yes"/"no",
00272  * "on"/"off", "1"/"0", and "ask"; they are case-insensitive.  Return
00273  * an SVN_ERR_BAD_CONFIG_VALUE error if either @a default_value or
00274  * @a option's value is not a valid representation.
00275  *
00276  * @since New in 1.6.
00277  */
00278 svn_error_t *
00279 svn_config_get_yes_no_ask(svn_config_t *cfg,
00280                           const char **valuep,
00281                           const char *section,
00282                           const char *option,
00283                           const char* default_value);
00284 
00285 /** Similar to @c svn_config_section_enumerator2_t, but is not
00286  * provided with a memory pool argument.
00287  *
00288  * See svn_config_enumerate_sections() for the details of this type.
00289  *
00290  * @deprecated Provided for backwards compatibility with the 1.2 API.
00291  */
00292 typedef svn_boolean_t (*svn_config_section_enumerator_t)(const char *name,
00293                                                          void *baton);
00294 
00295 /** Similar to svn_config_enumerate_sections2(), but uses a memory pool of
00296  * @a cfg instead of one that is explicitely provided.
00297  *
00298  * @deprecated Provided for backwards compatibility with the 1.2 API.
00299  */
00300 SVN_DEPRECATED
00301 int
00302 svn_config_enumerate_sections(svn_config_t *cfg,
00303                               svn_config_section_enumerator_t callback,
00304                               void *baton);
00305 
00306 /** A callback function used in enumerating config sections.
00307  *
00308  * See svn_config_enumerate_sections2() for the details of this type.
00309  *
00310  * @since New in 1.3.
00311  */
00312 typedef svn_boolean_t (*svn_config_section_enumerator2_t)(const char *name,
00313                                                           void *baton,
00314                                                           apr_pool_t *pool);
00315 
00316 /** Enumerate the sections, passing @a baton and the current section's name
00317  * to @a callback.  Continue the enumeration if @a callback returns @c TRUE.
00318  * Return the number of times @a callback was called.
00319  *
00320  * ### See kff's comment to svn_config_enumerate2().  It applies to this
00321  * function, too. ###
00322  *
00323  * @a callback's @a name parameter is only valid for the duration of the call.
00324  *
00325  * @since New in 1.3.
00326  */
00327 int
00328 svn_config_enumerate_sections2(svn_config_t *cfg,
00329                                svn_config_section_enumerator2_t callback,
00330                                void *baton, apr_pool_t *pool);
00331 
00332 /** Similar to @c svn_config_enumerator2_t, but is not
00333  * provided with a memory pool argument.
00334  * See svn_config_enumerate() for the details of this type.
00335  *
00336  * @deprecated Provided for backwards compatibility with the 1.2 API.
00337  */
00338 typedef svn_boolean_t (*svn_config_enumerator_t)(const char *name,
00339                                                  const char *value,
00340                                                  void *baton);
00341 
00342 /** Similar to svn_config_enumerate2(), but uses a memory pool of
00343  * @a cfg instead of one that is explicitely provided.
00344  *
00345  * @deprecated Provided for backwards compatibility with the 1.2 API.
00346  */
00347 SVN_DEPRECATED
00348 int
00349 svn_config_enumerate(svn_config_t *cfg,
00350                      const char *section,
00351                      svn_config_enumerator_t callback,
00352                      void *baton);
00353 
00354 
00355 /** A callback function used in enumerating config options.
00356  *
00357  * See svn_config_enumerate2() for the details of this type.
00358  *
00359  * @since New in 1.3.
00360  */
00361 typedef svn_boolean_t (*svn_config_enumerator2_t)(const char *name,
00362                                                   const char *value,
00363                                                   void *baton,
00364                                                   apr_pool_t *pool);
00365 
00366 /** Enumerate the options in @a section, passing @a baton and the current
00367  * option's name and value to @a callback.  Continue the enumeration if
00368  * @a callback returns @c TRUE.  Return the number of times @a callback
00369  * was called.
00370  *
00371  * ### kff asks: A more usual interface is to continue enumerating
00372  *     while @a callback does not return error, and if @a callback does
00373  *     return error, to return the same error (or a wrapping of it)
00374  *     from svn_config_enumerate().  What's the use case for
00375  *     svn_config_enumerate()?  Is it more likely to need to break out
00376  *     of an enumeration early, with no error, than an invocation of
00377  *     @a callback is likely to need to return an error? ###
00378  *
00379  * @a callback's @a name and @a value parameters are only valid for the
00380  * duration of the call.
00381  *
00382  * @since New in 1.3.
00383  */
00384 int
00385 svn_config_enumerate2(svn_config_t *cfg,
00386                       const char *section,
00387                       svn_config_enumerator2_t callback,
00388                       void *baton,
00389                       apr_pool_t *pool);
00390 
00391 /**
00392  * Return @c TRUE if @a section exists in @a cfg, @c FALSE otherwise.
00393  *
00394  * @since New in 1.4.
00395  */
00396 svn_boolean_t
00397 svn_config_has_section(svn_config_t *cfg,
00398                        const char *section);
00399 
00400 /** Enumerate the group @a master_section in @a cfg.  Each variable
00401  * value is interpreted as a list of glob patterns (separated by comma
00402  * and optional whitespace).  Return the name of the first variable
00403  * whose value matches @a key, or @c NULL if no variable matches.
00404  */
00405 const char *
00406 svn_config_find_group(svn_config_t *cfg,
00407                       const char *key,
00408                       const char *master_section,
00409                       apr_pool_t *pool);
00410 
00411 /** Retrieve value corresponding to @a option_name in @a cfg, or
00412  *  return @a default_value if none is found.
00413  *
00414  *  The config will first be checked for a default.
00415  *  If @a server_group is not @c NULL, the config will also be checked
00416  *  for an override in a server group,
00417  *
00418  */
00419 const char *
00420 svn_config_get_server_setting(svn_config_t *cfg,
00421                               const char* server_group,
00422                               const char* option_name,
00423                               const char* default_value);
00424 
00425 /** Retrieve value into @a result_value corresponding to @a option_name for a
00426  *  given @a server_group in @a cfg, or return @a default_value if none is
00427  *  found.
00428  *
00429  *  The config will first be checked for a default, then will be checked for
00430  *  an override in a server group. If the value found is not a valid integer,
00431  *  a @c svn_error_t* will be returned.
00432  */
00433 svn_error_t *
00434 svn_config_get_server_setting_int(svn_config_t *cfg,
00435                                   const char *server_group,
00436                                   const char *option_name,
00437                                   apr_int64_t default_value,
00438                                   apr_int64_t *result_value,
00439                                   apr_pool_t *pool);
00440 
00441 
00442 /** Set @a *valuep according to @a option_name for a given
00443  * @a  server_group in @a cfg, or set to @a default_value if no value is
00444  * specified.
00445  *
00446  * Check first a default, then for an override in a server group.  If
00447  * a value is found but is not a valid boolean, return an
00448  * SVN_ERR_BAD_CONFIG_VALUE error.
00449  *
00450  * @since New in 1.6.
00451  */
00452 svn_error_t *
00453 svn_config_get_server_setting_bool(svn_config_t *cfg,
00454                                    svn_boolean_t *valuep,
00455                                    const char *server_group,
00456                                    const char *option_name,
00457                                    svn_boolean_t default_value);
00458 
00459 
00460 
00461 /** Try to ensure that the user's ~/.subversion/ area exists, and create
00462  * no-op template files for any absent config files.  Use @a pool for any
00463  * temporary allocation.  If @a config_dir is not @c NULL it specifies a
00464  * directory from which to read the config overriding all other sources.
00465  *
00466  * Don't error if something exists but is the wrong kind (for example,
00467  * ~/.subversion exists but is a file, or ~/.subversion/servers exists
00468  * but is a directory).
00469  *
00470  * Also don't error if trying to create something and failing -- it's
00471  * okay for the config area or its contents not to be created.
00472  * However, if creating a config template file succeeds, return an
00473  * error if unable to initialize its contents.
00474  */
00475 svn_error_t *
00476 svn_config_ensure(const char *config_dir,
00477                   apr_pool_t *pool);
00478 
00479 
00480 
00481 
00482 /** Accessing cached authentication data in the user config area.
00483  *
00484  * @defgroup cached_authentication_data Cached authentication data
00485  * @{
00486  */
00487 
00488 
00489 /** A hash-key pointing to a realmstring.  Every file containing
00490  * authentication data should have this key.
00491  */
00492 #define SVN_CONFIG_REALMSTRING_KEY  "svn:realmstring"
00493 
00494 /** Use @a cred_kind and @a realmstring to locate a file within the
00495  * ~/.subversion/auth/ area.  If the file exists, initialize @a *hash
00496  * and load the file contents into the hash, using @a pool.  If the
00497  * file doesn't exist, set @a *hash to NULL.
00498  *
00499  * If @a config_dir is not NULL it specifies a directory from which to
00500  * read the config overriding all other sources.
00501  *
00502  * Besides containing the original credential fields, the hash will
00503  * also contain @c SVN_CONFIG_REALMSTRING_KEY.  The caller can examine
00504  * this value as a sanity-check that the correct file was loaded.
00505  *
00506  * The hashtable will contain <tt>const char *</tt> keys and
00507  * <tt>svn_string_t *</tt> values.
00508  */
00509 svn_error_t *
00510 svn_config_read_auth_data(apr_hash_t **hash,
00511                           const char *cred_kind,
00512                           const char *realmstring,
00513                           const char *config_dir,
00514                           apr_pool_t *pool);
00515 
00516 /** Use @a cred_kind and @a realmstring to create or overwrite a file
00517  * within the ~/.subversion/auth/ area.  Write the contents of @a hash into
00518  * the file.  If @a config_dir is not NULL it specifies a directory to read
00519  * the config overriding all other sources.
00520  *
00521  * Also, add @a realmstring to the file, with key @c
00522  * SVN_CONFIG_REALMSTRING_KEY.  This allows programs (or users) to
00523  * verify exactly which set credentials live within the file.
00524  *
00525  * The hashtable must contain <tt>const char *</tt> keys and
00526  * <tt>svn_string_t *</tt> values.
00527  */
00528 svn_error_t *
00529 svn_config_write_auth_data(apr_hash_t *hash,
00530                            const char *cred_kind,
00531                            const char *realmstring,
00532                            const char *config_dir,
00533                            apr_pool_t *pool);
00534 
00535 /** Put the absolute path to the user's configuration directory,
00536  * or to a file within that directory, into @a *path.
00537  *
00538  * If @a config_dir is not NULL, it must point to an alternative
00539  * config directory location. If it is NULL, the default location
00540  * is used.  If @a fname is not NULL, it must specify the last
00541  * component of the path to be returned. This can be used to create
00542  * a path to any file in the configuration directory.
00543  *
00544  * Do all allocations in @a pool.
00545  *
00546  * Hint:
00547  * To get the user configuration file, pass @c SVN_CONFIG_CATEGORY_CONFIG
00548  * for @a fname. To get the servers configuration file, pass
00549  * @c SVN_CONFIG_CATEGORY_SERVERS for @a fname.
00550  *
00551  * @since New in 1.6.
00552  */
00553 svn_error_t *
00554 svn_config_get_user_config_path(const char **path,
00555                                 const char *config_dir,
00556                                 const char *fname,
00557                                 apr_pool_t *pool);
00558 
00559 /** @} */
00560 
00561 #ifdef __cplusplus
00562 }
00563 #endif /* __cplusplus */
00564 
00565 #endif /* SVN_CONFIG_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines