xrootd
Loading...
Searching...
No Matches
XrdSsiSfs.hh
Go to the documentation of this file.
1#ifndef __SSI_SFS_H__
2#define __SSI_SFS_H__
3/******************************************************************************/
4/* */
5/* X r d S s i S f s . h h */
6/* */
7/* (c) 2013 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* Produced by Andrew Hanushevsky for Stanford University under contract */
9/* DE-AC02-76-SFO0515 with the Department of Energy */
10/* */
11/* This file is part of the XRootD software suite. */
12/* */
13/* XRootD is free software: you can redistribute it and/or modify it under */
14/* the terms of the GNU Lesser General Public License as published by the */
15/* Free Software Foundation, either version 3 of the License, or (at your */
16/* option) any later version. */
17/* */
18/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21/* License for more details. */
22/* */
23/* You should have received a copy of the GNU Lesser General Public License */
24/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26/* */
27/* The copyright holder's institutional names and contributor's names may not */
28/* be used to endorse or promote products derived from this software without */
29/* specific prior written permission of the institution or contributor. */
30/******************************************************************************/
31
32#include <sys/types.h>
33
35
36#include "XrdSsi/XrdSsiDir.hh"
37#include "XrdSsi/XrdSsiFile.hh"
38
39struct XrdVersionInfo;
40
41class XrdOucEnv;
42class XrdSecEntity;
43
45{
46friend class XrdSsiFile;
47
48public:
49
50// Object allocation
51//
52 XrdSfsDirectory *newDir(char *user=0, int MonID=0)
53 {return new XrdSsiDir(user, MonID);}
54
55 XrdSfsFile *newFile(char *user=0,int MonID=0)
56 {return new XrdSsiFile(user, MonID);}
57
58// Other functions
59//
60 int chksum( csFunc Func,
61 const char *csName,
62 const char *path,
63 XrdOucErrInfo &eInfo,
64 const XrdSecEntity *client = 0,
65 const char *opaque = 0);
66
67 int chmod(const char *Name,
68 XrdSfsMode Mode,
69 XrdOucErrInfo &eInfo,
70 const XrdSecEntity *client,
71 const char *opaque = 0);
72
73 int exists(const char *fileName,
74 XrdSfsFileExistence &exists_flag,
75 XrdOucErrInfo &eInfo,
76 const XrdSecEntity *client,
77 const char *opaque = 0);
78
79 int fsctl(const int cmd,
80 const char *args,
81 XrdOucErrInfo &eInfo,
82 const XrdSecEntity *client);
83
84 int getStats(char *buff, int blen);
85
86const char *getVersion();
87
88 int mkdir(const char *dirName,
89 XrdSfsMode Mode,
90 XrdOucErrInfo &eInfo,
91 const XrdSecEntity *client,
92 const char *opaque = 0);
93
94 int prepare( XrdSfsPrep &pargs,
95 XrdOucErrInfo &eInfo,
96 const XrdSecEntity *client = 0);
97
98 int rem(const char *path,
99 XrdOucErrInfo &eInfo,
100 const XrdSecEntity *client,
101 const char *info = 0);
102
103 int remdir(const char *dirName,
104 XrdOucErrInfo &eInfo,
105 const XrdSecEntity *client,
106 const char *info = 0);
107
108 int rename(const char *oldFileName,
109 const char *newFileName,
110 XrdOucErrInfo &eInfo,
111 const XrdSecEntity *client,
112 const char *infoO = 0,
113 const char *infoN = 0);
114
115 int stat(const char *Name,
116 struct stat *buf,
117 XrdOucErrInfo &eInfo,
118 const XrdSecEntity *client,
119 const char *opaque = 0);
120
121 int stat(const char *Name,
122 mode_t &mode,
123 XrdOucErrInfo &eInfo,
124 const XrdSecEntity *client,
125 const char *opaque = 0);
126
127 int truncate(const char *Name,
128 XrdSfsFileOffset fileOffset,
129 XrdOucErrInfo &eInfo,
130 const XrdSecEntity *client = 0,
131 const char *opaque = 0);
132
133// Management functions
134//
136
137static void setMax(int mVal) {freeMax = mVal;}
138
140virtual ~XrdSsiSfs() {} // Too complicate to delete :-)
141
142private:
143static int freeMax;
144
145int Emsg(const char *pfx, XrdOucErrInfo &einfo, int ecode,
146 const char *op, const char *target);
147const char *Split(const char *Args, const char **Opq, char *Path, int Plen);
148};
149#endif
#define stat(a, b)
Definition XrdPosix.hh:96
int XrdSfsMode
Definition XrdSfsInterface.hh:129
XrdSfsFileExistence
Definition XrdSfsInterface.hh:133
long long XrdSfsFileOffset
Definition XrdSfsInterface.hh:127
Definition XrdOucEnv.hh:42
Definition XrdOucErrInfo.hh:101
Definition XrdSecEntity.hh:65
Definition XrdSfsInterface.hh:243
Definition XrdSfsInterface.hh:845
csFunc
Definition XrdSfsInterface.hh:927
Definition XrdSfsInterface.hh:369
Definition XrdSsiDir.hh:37
Definition XrdSsiFile.hh:40
Definition XrdSsiSfs.hh:45
int getStats(char *buff, int blen)
XrdSsiSfs()
Definition XrdSsiSfs.hh:139
int rem(const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *info=0)
int stat(const char *Name, mode_t &mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *opaque=0)
XrdSfsFile * newFile(char *user=0, int MonID=0)
Definition XrdSsiSfs.hh:55
friend class XrdSsiFile
Definition XrdSsiSfs.hh:46
int stat(const char *Name, struct stat *buf, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *opaque=0)
int chksum(csFunc Func, const char *csName, const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)
int chmod(const char *Name, XrdSfsMode Mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *opaque=0)
int Emsg(const char *pfx, XrdOucErrInfo &einfo, int ecode, const char *op, const char *target)
void setFeatures(XrdSfsFileSystem *prevFS)
const char * getVersion()
static void setMax(int mVal)
Definition XrdSsiSfs.hh:137
int rename(const char *oldFileName, const char *newFileName, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *infoO=0, const char *infoN=0)
int remdir(const char *dirName, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *info=0)
XrdSfsDirectory * newDir(char *user=0, int MonID=0)
Definition XrdSsiSfs.hh:52
int exists(const char *fileName, XrdSfsFileExistence &exists_flag, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *opaque=0)
int mkdir(const char *dirName, XrdSfsMode Mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *opaque=0)
virtual ~XrdSsiSfs()
Definition XrdSsiSfs.hh:140
const char * Split(const char *Args, const char **Opq, char *Path, int Plen)
int prepare(XrdSfsPrep &pargs, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
int truncate(const char *Name, XrdSfsFileOffset fileOffset, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)
int fsctl(const int cmd, const char *args, XrdOucErrInfo &eInfo, const XrdSecEntity *client)
static int freeMax
Definition XrdSsiSfs.hh:143
< Prepare parameters
Definition XrdSfsInterface.hh:172