|
||||
File indexing completed on 2025-01-30 10:27:55
0001 #ifndef __OUC_IOVEC_H__ 0002 #define __OUC_IOVEC_H__ 0003 /******************************************************************************/ 0004 /* */ 0005 /* X r d O u c I O V e c . h h */ 0006 /* */ 0007 /* (c) 2012 by the Board of Trustees of the Leland Stanford, Jr., University */ 0008 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 0009 /* DE-AC02-76-SFO0515 with the Department of Energy */ 0010 /* */ 0011 /* This file is part of the XRootD software suite. */ 0012 /* */ 0013 /* XRootD is free software: you can redistribute it and/or modify it under */ 0014 /* the terms of the GNU Lesser General Public License as published by the */ 0015 /* Free Software Foundation, either version 3 of the License, or (at your */ 0016 /* option) any later version. */ 0017 /* */ 0018 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */ 0019 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ 0020 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */ 0021 /* License for more details. */ 0022 /* */ 0023 /* You should have received a copy of the GNU Lesser General Public License */ 0024 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */ 0025 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */ 0026 /* */ 0027 /* The copyright holder's institutional names and contributor's names may not */ 0028 /* be used to endorse or promote products derived from this software without */ 0029 /* specific prior written permission of the institution or contributor. */ 0030 /******************************************************************************/ 0031 0032 //----------------------------------------------------------------------------- 0033 //! XrdOucIOVec 0034 //! 0035 //! The struct defined here is a generic data structure that is used whenever 0036 //! we need to pass a vector of file offsets, lengths, and the corresponding 0037 //! target buffer pointers. It is used by the sfs, ofs, and oss components. 0038 //----------------------------------------------------------------------------- 0039 0040 struct XrdOucIOVec 0041 { 0042 long long offset; // Offset into the file. 0043 int size; // Size of I/O to perform. 0044 int info; // Available for arbitrary use 0045 char *data; // Location to read into. 0046 }; 0047 0048 // Add backward compatible constructor to XrdOucIOVec 0049 // 0050 struct XrdOucIOVec2 : public XrdOucIOVec 0051 { 0052 XrdOucIOVec2(char *buff, long long offs, int sz, int inf=0) 0053 {XrdOucIOVec::offset = offs; 0054 XrdOucIOVec::size = sz; 0055 XrdOucIOVec::info = inf; 0056 XrdOucIOVec::data = buff; 0057 } 0058 }; 0059 0060 // The following correct an error as 'struct iov' was meant to be 'XrdOucIOVec' 0061 // but was never defined. However, method signatures remain and we can't change 0062 // them. So, the 'struct iov' is defined here in a more useable way. It wase 0063 // layout is identical. 0064 // 0065 struct iov : public XrdOucIOVec { }; 0066 0067 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |