Subversion
|
Typedefs | |
typedef struct svn_wc_context_t | svn_wc_context_t |
The context for all working copy interactions. More... | |
Functions | |
svn_error_t * | svn_wc_context_create (svn_wc_context_t **wc_ctx, const svn_config_t *config, apr_pool_t *result_pool, apr_pool_t *scratch_pool) |
Create a context for the working copy, and return it in *wc_ctx. More... | |
svn_error_t * | svn_wc_context_destroy (svn_wc_context_t *wc_ctx) |
Destroy the working copy context described by wc_ctx, releasing any acquired resources. More... | |
typedef struct svn_wc_context_t svn_wc_context_t |
The context for all working copy interactions.
This is the client-facing datastructure API consumers are required to create and use when interacting with a working copy. Multiple contexts can be created for the same working copy simultaneously, within the same process or different processes. Context mutexing will be handled internally by the working copy library.
svn_error_t* svn_wc_context_create | ( | svn_wc_context_t ** | wc_ctx, |
const svn_config_t * | config, | ||
apr_pool_t * | result_pool, | ||
apr_pool_t * | scratch_pool | ||
) |
Create a context for the working copy, and return it in *wc_ctx.
This context is not associated with a particular working copy, but as operations are performed, will load the appropriate working copy information.
config should hold the various configuration options that may apply to this context. It should live at least as long as result_pool. It may be NULL
.
The context will be allocated in result_pool, and will use result_pool for any internal allocations requiring the same longevity as the context. The context will be automatically destroyed, and its resources released, when result_pool is cleared, or it may be manually destroyed by invoking svn_wc_context_destroy().
Use scratch_pool for temporary allocations. It may be cleared immediately upon returning from this function.
svn_error_t* svn_wc_context_destroy | ( | svn_wc_context_t * | wc_ctx | ) |
Destroy the working copy context described by wc_ctx, releasing any acquired resources.