Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

filesystem access contexts

Filesystem Access Contexts. More...

Typedefs

typedef svn_fs_access_t svn_fs_access_t
 An opaque object representing temporary user data.


Functions

svn_error_tsvn_fs_create_access (svn_fs_access_t **access_ctx, const char *username, apr_pool_t *pool)
 Set *access_ctx to a new svn_fs_access_t object representing username, allocated in pool.

svn_error_tsvn_fs_set_access (svn_fs_t *fs, svn_fs_access_t *access_ctx)
 Associate access_ctx with an open fs.

svn_error_tsvn_fs_get_access (svn_fs_access_t **access_ctx, svn_fs_t *fs)
 Set *access_ctx to the current fs access context, or NULL if there is no current fs access context.

svn_error_tsvn_fs_access_get_username (const char **username, svn_fs_access_t *access_ctx)
 Set *username to the name represented by access_ctx.

svn_error_tsvn_fs_access_add_lock_token (svn_fs_access_t *access_ctx, const char *token)
 Push a lock-token token into the context access_ctx.


Detailed Description

Filesystem Access Contexts.

Since:
New in 1.2.
At certain times, filesystem functions need access to temporary user data. For example, which user is changing a file? If the file is locked, has an appropriate lock-token been supplied?

This temporary user data is stored in an "access context" object, and the access context is then connected to the filesystem object. Whenever a filesystem function requires information, it can pull things out of the context as needed.


Function Documentation

svn_error_t* svn_fs_access_add_lock_token svn_fs_access_t access_ctx,
const char *  token
 

Push a lock-token token into the context access_ctx.

The context remembers all tokens it receives, and makes them available to fs functions. The token is not duplicated into access_ctx's pool; make sure the token's lifetime is at least as long as access_ctx.

svn_error_t* svn_fs_create_access svn_fs_access_t **  access_ctx,
const char *  username,
apr_pool_t *  pool
 

Set *access_ctx to a new svn_fs_access_t object representing username, allocated in pool.

username is presumed to have been authenticated by the caller.

svn_error_t* svn_fs_set_access svn_fs_t fs,
svn_fs_access_t access_ctx
 

Associate access_ctx with an open fs.

This function can be run multiple times on the same open filesystem, in order to change the filesystem access context for different filesystem operations. Pass a NULL value for access_ctx to disassociate the current access context from the filesystem.


Generated on Wed May 3 12:53:10 2006 for Subversion by doxygen 1.3.6