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

#include <magic_xattr.h>

Inheritance diagram for MagicXattrManager:
Collaboration diagram for MagicXattrManager:

Public Types

enum  EVisibility { kVisibilityAlways, kVisibilityNever, kVisibilityRootOnly }

Public Member Functions

 MagicXattrManager (MountPoint *mountpoint, EVisibility visibility)
BaseMagicXattrGetLocked (const std::string &name, PathString path, catalog::DirectoryEntry *d)
std::string GetListString (catalog::DirectoryEntry *dirent)
void Register (const std::string &name, BaseMagicXattr *magic_xattr)
EVisibility visibility ()

Protected Attributes

std::map< std::string,
BaseMagicXattr * > 
EVisibility visibility_

Additional Inherited Members

- Protected Member Functions inherited from SingleCopy
 SingleCopy ()

Detailed Description

This class is acting as a user entry point for magic extended attributes. It instantiates all defined attributes in the constructor. Users can:

  1. Register additional attributes
  2. Get a string containing zero-byte delimited list of attribute names (used in "")
  3. Get an attribute by name. Specifically, get a RAII wrapper around a singleton attribute instance. This means that the attribute instance registered with the manager does not get cloned or copied inside Get(). Instead, member variables are set and the original instance is returned. A mutex prevents from race conditions in case of concurrent access.

Definition at line 142 of file magic_xattr.h.

Member Enumeration Documentation


Definition at line 144 of file magic_xattr.h.

Constructor & Destructor Documentation

MagicXattrManager::MagicXattrManager ( MountPoint mountpoint,
EVisibility  visibility 

This file is part of the CernVM File System.

Definition at line 19 of file

Here is the call graph for this function:

Member Function Documentation

std::string MagicXattrManager::GetListString ( catalog::DirectoryEntry dirent)

Definition at line 69 of file

Referenced by cvmfs::cvmfs_listxattr().

Here is the call graph for this function:

Here is the caller graph for this function:

BaseMagicXattr * MagicXattrManager::GetLocked ( const std::string &  name,
PathString  path,
catalog::DirectoryEntry d 

The returned BaseMagicXattr* is supposed to be wrapped by a MagicXattrRAIIWrapper

Definition at line 108 of file

Referenced by cvmfs::cvmfs_getxattr().

Here is the call graph for this function:

Here is the caller graph for this function:

void MagicXattrManager::Register ( const std::string &  name,
BaseMagicXattr magic_xattr 

Definition at line 124 of file

Referenced by MagicXattrManager(), and RegisterMagicXattrs().

Here is the caller graph for this function:

EVisibility MagicXattrManager::visibility ( )

Definition at line 154 of file magic_xattr.h.

Referenced by cvmfs::cvmfs_listxattr(), and GetListString().

Here is the caller graph for this function:

Member Data Documentation

MountPoint* MagicXattrManager::mount_point_

Definition at line 158 of file magic_xattr.h.

Referenced by GetListString(), and Register().

EVisibility MagicXattrManager::visibility_

Definition at line 159 of file magic_xattr.h.

Referenced by visibility().

std::map<std::string, BaseMagicXattr *> MagicXattrManager::xattr_list_

Definition at line 157 of file magic_xattr.h.

Referenced by GetListString(), GetLocked(), and Register().

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