Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:27:54

0001 #ifndef __XRDPUCCACHECM_HH__
0002 #define __XRDPUCCACHECM_HH__
0003 /******************************************************************************/
0004 /*                                                                            */
0005 /*                      X r d O u c C a c h e C M . h h                       */
0006 /*                                                                            */
0007 /* (c) 2018 by the Board of Trustees of the Leland Stanford, Jr., University  */
0008 /*                            All Rights Reserved                             */
0009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
0010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
0011 /*                                                                            */
0012 /* This file is part of the XRootD software suite.                            */
0013 /*                                                                            */
0014 /* XRootD is free software: you can redistribute it and/or modify it under    */
0015 /* the terms of the GNU Lesser General Public License as published by the     */
0016 /* Free Software Foundation, either version 3 of the License, or (at your     */
0017 /* option) any later version.                                                 */
0018 /*                                                                            */
0019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT      */
0020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      */
0021 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public       */
0022 /* License for more details.                                                  */
0023 /*                                                                            */
0024 /* You should have received a copy of the GNU Lesser General Public License   */
0025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file  */
0026 /* COPYING (GPL license).  If not, see <http://www.gnu.org/licenses/>.        */
0027 /*                                                                            */
0028 /* The copyright holder's institutional names and contributor's names may not */
0029 /* be used to endorse or promote products derived from this software without  */
0030 /* specific prior written permission of the institution or contributor.       */
0031 /******************************************************************************/
0032 
0033 /* The class defined here is used to implement a cache context management
0034    plugin. It is loaded as run time can interact with the cache, as needed.
0035    The pss.ccmlib directive is used to load the plugin. However, it is only
0036    loaded if a cache has been enabled for use.
0037 
0038    Your plug-in must exist in a shared library and have the following extern C
0039    function defined:
0040 */
0041 
0042 //------------------------------------------------------------------------------
0043 //! Initialize a cache context management plugin.
0044 //!
0045 //! @param  Cache         Reference to the object that interacts with the cache.
0046 //! @param  Logger     -> The message routing object to be used in conjunction
0047 //!                       with an XrdSysError object for error messages. When
0048 //!                       nil, you should use std::cerr.
0049 //! @param  Config     -> The name of the config file. When nil there was no
0050 //!                       configuration file.
0051 //! @param  Parms      -> Any parameters specified after the path on the
0052 //!                       pss.ccmlib directive. If there are no parameters, the
0053 //!                       pointer may be zero.
0054 //! @param  envP       -> Environmental information.; nil if none.
0055 //!
0056 //! @return True          Upon success.
0057 //!         False         Upon failure.
0058 //!
0059 //! The function must be declared as an extern "C" function in a loadable
0060 //! shared library as follows:
0061 //------------------------------------------------------------------------------
0062 
0063 class XrdOucEnv;
0064 class XrdPosixCache;
0065 class XrdSysLogger;
0066 
0067 typedef bool (*XrdOucCacheCMInit_t)(XrdPosixCache &Cache,
0068                                     XrdSysLogger  *Logger,
0069                                     const char    *Config,
0070                                     const char    *Parms,
0071                                     XrdOucEnv     *envP);
0072 /*!
0073    extern "C"
0074    {
0075    bool XrdOucCacheCMInit(XrdPosixCache &Cache,   // Cache interface
0076                           XrdSysLogger  *Logger,  // Where messages go
0077                           const char    *Config,  // Config file used
0078                           const char    *Parms,   // Optional parm string
0079                           XrdOucEnv     *envP);   // Environmental information
0080    }
0081 */
0082 
0083 //------------------------------------------------------------------------------
0084 //! Declare compilation version.
0085 //!
0086 //! Additionally, you *should* declare the xrootd version you used to compile
0087 //! your plug-in. While not currently required, it is highly recommended to
0088 //! avoid execution issues should the class definition change. Declare it as:
0089 //------------------------------------------------------------------------------
0090 
0091 /*! #include "XrdVersion.hh"
0092     XrdVERSIONINFO(XrdOucCacheCMInit,<name>);
0093 
0094     where <name> is a 1- to 15-character unquoted name identifying your plugin.
0095 */
0096 #endif