CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LibContext Class Reference

#include <libcvmfs_int.h>

Inheritance diagram for LibContext:
Collaboration diagram for LibContext:

Public Member Functions

 ~LibContext ()
 
void EnableMultiThreaded ()
 
int GetAttr (const char *c_path, struct stat *info)
 
int Readlink (const char *path, char *buf, size_t size)
 
int ListDirectory (const char *path, char ***buf, size_t *listlen, size_t *buflen, bool self_reference)
 
int ListDirectoryStat (const char *c_path, cvmfs_stat_t **buf, size_t *listlen, size_t *buflen)
 
int Open (const char *c_path)
 
int64_t Pread (int fd, void *buf, uint64_t size, uint64_t off)
 
int Close (int fd)
 
int GetExtAttr (const char *c_path, struct cvmfs_attr *info)
 
int GetNestedCatalogAttr (const char *c_path, struct cvmfs_nc_attr *nc_attr)
 
int ListNestedCatalogs (const char *path, char ***buf, size_t *buflen)
 
int Remount ()
 
uint64_t GetRevision ()
 
MountPointmount_point ()
 
void set_options_mgr (OptionsManager *value)
 

Static Public Member Functions

static LibContextCreate (const std::string &fqrn, OptionsManager *options_mgr)
 

Private Member Functions

 LibContext ()
 
FileSystemfile_system ()
 
void AppendStringToList (char const *str, char ***buf, size_t *listlen, size_t *buflen)
 
void AppendStatToList (const cvmfs_stat_t st, cvmfs_stat_t **buf, size_t *listlen, size_t *buflen)
 
bool GetDirentForPath (const PathString &path, catalog::DirectoryEntry *dirent)
 
void CvmfsAttrFromDirent (const catalog::DirectoryEntry dirent, struct cvmfs_attr *attr)
 
- Private Member Functions inherited from SingleCopy
 SingleCopy ()
 

Private Attributes

OptionsManageroptions_mgr_
 
MountPointmount_point_
 

Static Private Attributes

static const int kFdChunked = 1 << 30
 

Detailed Description

Encapsulates a single attached repository. It uses a MountPoint object for creating the state of all the necessary manager objects. On top of the managers it implements file system operations (read, list, ...).

Definition at line 95 of file libcvmfs_int.h.

Constructor & Destructor Documentation

LibContext::~LibContext ( )

Definition at line 218 of file libcvmfs_int.cc.

LibContext::LibContext ( )
private

use static method Create() for construction

Definition at line 212 of file libcvmfs_int.cc.

Referenced by Create().

Here is the caller graph for this function:

Member Function Documentation

void LibContext::AppendStatToList ( const cvmfs_stat_t  st,
cvmfs_stat_t **  buf,
size_t *  listlen,
size_t *  buflen 
)
private

Definition at line 279 of file libcvmfs_int.cc.

Referenced by ListDirectoryStat().

Here is the call graph for this function:

Here is the caller graph for this function:

void LibContext::AppendStringToList ( char const *  str,
char ***  buf,
size_t *  listlen,
size_t *  buflen 
)
private

Definition at line 256 of file libcvmfs_int.cc.

Referenced by ListDirectory(), and ListNestedCatalogs().

Here is the call graph for this function:

Here is the caller graph for this function:

int LibContext::Close ( int  fd)

Definition at line 744 of file libcvmfs_int.cc.

Referenced by cvmfs_close().

Here is the call graph for this function:

Here is the caller graph for this function:

LibContext * LibContext::Create ( const std::string &  fqrn,
OptionsManager options_mgr 
)
static

Definition at line 198 of file libcvmfs_int.cc.

Referenced by cvmfs_attach_repo(), and cvmfs_attach_repo_v2().

Here is the call graph for this function:

Here is the caller graph for this function:

void LibContext::CvmfsAttrFromDirent ( const catalog::DirectoryEntry  dirent,
struct cvmfs_attr attr 
)
private

Definition at line 316 of file libcvmfs_int.cc.

Referenced by GetExtAttr().

Here is the call graph for this function:

Here is the caller graph for this function:

void LibContext::EnableMultiThreaded ( )

Definition at line 223 of file libcvmfs_int.cc.

Referenced by cvmfs_enable_threaded().

Here is the call graph for this function:

Here is the caller graph for this function:

FileSystem* LibContext::file_system ( )
inlineprivate

Definition at line 137 of file libcvmfs_int.h.

Referenced by Close(), Create(), GetAttr(), Open(), Pread(), and Readlink().

Here is the call graph for this function:

Here is the caller graph for this function:

int LibContext::GetAttr ( const char *  c_path,
struct stat *  info 
)

Definition at line 296 of file libcvmfs_int.cc.

Referenced by cvmfs_lstat(), cvmfs_stat(), and expand_path().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LibContext::GetDirentForPath ( const PathString path,
catalog::DirectoryEntry dirent 
)
private

Definition at line 227 of file libcvmfs_int.cc.

Referenced by GetAttr(), GetExtAttr(), ListDirectory(), ListDirectoryStat(), Open(), and Readlink().

Here is the call graph for this function:

Here is the caller graph for this function:

int LibContext::GetExtAttr ( const char *  c_path,
struct cvmfs_attr info 
)

Definition at line 335 of file libcvmfs_int.cc.

Referenced by cvmfs_stat_attr().

Here is the call graph for this function:

Here is the caller graph for this function:

int LibContext::GetNestedCatalogAttr ( const char *  c_path,
struct cvmfs_nc_attr nc_attr 
)

Definition at line 510 of file libcvmfs_int.cc.

Referenced by cvmfs_stat_nc().

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t LibContext::GetRevision ( )

Definition at line 785 of file libcvmfs_int.cc.

Referenced by cvmfs_get_revision().

Here is the call graph for this function:

Here is the caller graph for this function:

int LibContext::ListDirectory ( const char *  path,
char ***  buf,
size_t *  listlen,
size_t *  buflen,
bool  self_reference 
)

Definition at line 411 of file libcvmfs_int.cc.

Referenced by cvmfs_listdir(), and cvmfs_listdir_contents().

Here is the call graph for this function:

Here is the caller graph for this function:

int LibContext::ListDirectoryStat ( const char *  c_path,
cvmfs_stat_t **  buf,
size_t *  listlen,
size_t *  buflen 
)

Definition at line 468 of file libcvmfs_int.cc.

Referenced by cvmfs_listdir_stat().

Here is the call graph for this function:

Here is the caller graph for this function:

int LibContext::ListNestedCatalogs ( const char *  path,
char ***  buf,
size_t *  buflen 
)

Definition at line 557 of file libcvmfs_int.cc.

Referenced by cvmfs_list_nc().

Here is the call graph for this function:

Here is the caller graph for this function:

MountPoint* LibContext::mount_point ( )
inline

Definition at line 125 of file libcvmfs_int.h.

Referenced by cvmfs_attach_repo(), cvmfs_statistics_format(), and expand_path().

Here is the caller graph for this function:

int LibContext::Open ( const char *  c_path)

Definition at line 593 of file libcvmfs_int.cc.

Referenced by cvmfs_open().

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t LibContext::Pread ( int  fd,
void *  buf,
uint64_t  size,
uint64_t  off 
)

Definition at line 660 of file libcvmfs_int.cc.

Referenced by cvmfs_pread().

Here is the call graph for this function:

Here is the caller graph for this function:

int LibContext::Readlink ( const char *  path,
char *  buf,
size_t  size 
)

Definition at line 384 of file libcvmfs_int.cc.

Referenced by cvmfs_readlink(), and expand_path().

Here is the call graph for this function:

Here is the caller graph for this function:

int LibContext::Remount ( )

Definition at line 761 of file libcvmfs_int.cc.

Referenced by cvmfs_remount().

Here is the call graph for this function:

Here is the caller graph for this function:

void LibContext::set_options_mgr ( OptionsManager value)
inline

Definition at line 126 of file libcvmfs_int.h.

Referenced by cvmfs_adopt_options(), and cvmfs_attach_repo().

Here is the caller graph for this function:

Member Data Documentation

const int LibContext::kFdChunked = 1 << 30
staticprivate

File descriptors of chunked files have bit 30 set.

Definition at line 132 of file libcvmfs_int.h.

Referenced by Close(), Open(), and Pread().

OptionsManager* LibContext::options_mgr_
private

Only non-NULL if cvmfs_attache_repo is used for initialization. In this case, the options manager needs to be cleaned up by cvmfs_fini.

Definition at line 156 of file libcvmfs_int.h.

Referenced by set_options_mgr(), and ~LibContext().


The documentation for this class was generated from the following files: