xrootd
Loading...
Searching...
No Matches
XrdSsiFile.hh
Go to the documentation of this file.
1#ifndef __SSI_FILE_H__
2#define __SSI_FILE_H__
3/******************************************************************************/
4/* */
5/* X r d S s i F i l e . 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 <cstring>
33#include <sys/types.h>
34
36
37class XrdSsiFileSess;
38
39class XrdSsiFile : public XrdSfsFile
40{
41public:
42
43// SfsFile methods
44//
45 int open(const char *fileName,
46 XrdSfsFileOpenMode openMode,
47 mode_t createMode,
48 const XrdSecEntity *client = 0,
49 const char *opaque = 0);
50
51 int close();
52
53 int fctl(const int cmd,
54 const char *args,
55 XrdOucErrInfo &out_error);
56
57 int fctl(const int cmd,
58 int alen,
59 const char *args,
60 const XrdSecEntity *client);
61
62 const char *FName();
63
64 int getCXinfo(char cxtype[4], int &cxrsz);
65
66 int getMmap(void **Addr, off_t &Size);
67
68 int read(XrdSfsFileOffset fileOffset,
69 XrdSfsXferSize preread_sz);
70
72 char *buffer,
73 XrdSfsXferSize buffer_size);
74
75 int read(XrdSfsAio *aioparm);
76
78 int readCount);
79
80 int SendData(XrdSfsDio *sfDio,
81 XrdSfsFileOffset offset,
82 XrdSfsXferSize size);
83
84 void setXio(XrdSfsXio *xP);
85
86 int stat(struct stat *buf);
87
88 int sync();
89
90 int sync(XrdSfsAio *aiop);
91
92 int truncate(XrdSfsFileOffset fileOffset);
93
95 const char *buffer,
96 XrdSfsXferSize buffer_size);
97
98 int write(XrdSfsAio *aioparm);
99
100// Constructor and destructor
101//
102 XrdSsiFile(const char *user, int MonID)
103 : XrdSfsFile(myEInfo), fsFile(0), fSessP(0),
104 myEInfo(user, MonID) {}
105
106virtual ~XrdSsiFile();
107
108private:
109
113};
114#endif
#define stat(a, b)
Definition XrdPosix.hh:96
int XrdSfsFileOpenMode
Definition XrdSfsInterface.hh:128
long long XrdSfsFileOffset
Definition XrdSfsInterface.hh:127
int XrdSfsXferSize
Definition XrdSfsInterface.hh:130
Definition XrdOucErrInfo.hh:101
Definition XrdSecEntity.hh:65
Definition XrdSfsAio.hh:59
Definition XrdSfsDio.hh:47
Definition XrdSfsInterface.hh:369
Definition XrdSfsXio.hh:55
Definition XrdSsiFileSess.hh:47
Definition XrdSsiFile.hh:40
XrdSsiFile(const char *user, int MonID)
Definition XrdSsiFile.hh:102
int write(XrdSfsAio *aioparm)
XrdSfsXferSize readv(XrdOucIOVec *readV, int readCount)
XrdSsiFileSess * fSessP
Definition XrdSsiFile.hh:111
int fctl(const int cmd, int alen, const char *args, const XrdSecEntity *client)
int fctl(const int cmd, const char *args, XrdOucErrInfo &out_error)
XrdSfsXferSize read(XrdSfsFileOffset fileOffset, char *buffer, XrdSfsXferSize buffer_size)
virtual ~XrdSsiFile()
XrdSfsXferSize write(XrdSfsFileOffset fileOffset, const char *buffer, XrdSfsXferSize buffer_size)
int getCXinfo(char cxtype[4], int &cxrsz)
const char * FName()
int read(XrdSfsAio *aioparm)
XrdOucErrInfo myEInfo
Definition XrdSsiFile.hh:112
void setXio(XrdSfsXio *xP)
int getMmap(void **Addr, off_t &Size)
int stat(struct stat *buf)
int open(const char *fileName, XrdSfsFileOpenMode openMode, mode_t createMode, const XrdSecEntity *client=0, const char *opaque=0)
int truncate(XrdSfsFileOffset fileOffset)
int read(XrdSfsFileOffset fileOffset, XrdSfsXferSize preread_sz)
XrdSfsFile * fsFile
Definition XrdSsiFile.hh:110
int SendData(XrdSfsDio *sfDio, XrdSfsFileOffset offset, XrdSfsXferSize size)
int sync(XrdSfsAio *aiop)
Definition XrdOucIOVec.hh:41