GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
rawapin.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Copyright:
3  * GSI, Gesellschaft fuer Schwerionenforschung mbH
4  * Planckstr. 1
5  * D-64291 Darmstadt
6  * Germany
7  * created 1.12.2000 by Horst Goeringer
8  *********************************************************************
9  * rawapin.h
10  * entry definitions for client API
11  * new version
12  *********************************************************************
13  * 7. 2.2001, H.G.: rfio_gsi_query added
14  * 26. 2.2001, H.G.: rfio_fstat, rfio_perror, rfio_serror added
15  * for ROOT version 300-05
16  * 15.10.2002, H.G.: remove declaration of fLogFile
17  * 13. 1.2003, H.G.: remove definition PORT_MOVER (in rawcommn.h)
18  * 12. 6.2003, H.G.: add externals fLogFile, piFilelist
19  * 4. 8.2004, H.G.: new entries rfio_[f]endfile, rfio_[f]newfile
20  * 17. 2.2005, H.G.: add C++ binding
21  * 20. 4.2005, H.G.: mod C++ binding for rootcint
22  * 22. 5.2007, H.G.: new entries rfio_open64, rfio_lseek64
23  * 29. 5.2007, H.G.: new entries rfio_stat64, rfio_fstat64
24  * 14.11.2008, H.G.: new entry rfio_cache_stat
25  * 17.11.2008, H.G.: new entr. rfio_preseek64, rfio_mkdir, rfio_closedir
26  * mod file args from 'char *' to 'const char *' in:
27  * rfio_access, rfio_fwrite, rfio_open, rfio_open64,
28  * rfio_unlink, rfio_write
29  * 11. 2.2009, H.G.: new entries rfio_open_gsidaq, rfio_fopen_gsidaq
30  * 26. 6.2009, H.G.: for 64 bit client: replace int args:
31  * rfio_fread: return, args 2, 3 by size_t
32  * rfio_fwrite: return, args 2, 3 by size_t
33  * rfio_read: arg 3 by size_t, return by ssize_t
34  * rfio_write: arg 3 by size_t, return by ssize_t
35  * 26. 2.2010, H.G.: rfio_gsi_query: add parameter (len output string)
36  * include unistd.h, if not yet done
37  * 23. 4.2010, H.G.: new entry rfio_fopen_gsidaq_dm
38  *********************************************************************
39  */
40 
41 #ifndef RAWAPI__H
42 #define RAWAPI__H
43 
44 #ifdef Lynx
45 
46 #ifndef USER_API
47 #define USER_API
48 FILE *fLogFile; /* external in some C functions */
49 #endif
50 
51 #else /* not Lynx */
52 
53 #ifndef __cplusplus
54 FILE *fLogFile; /* external in some C functions */
55 #endif
56 
57 #ifndef _STDINT_H
58 #include <stdint.h>
59 #endif
60 
61 #ifndef _UNISTD_H
62 #include <unistd.h>
63 #endif
64 
65 #endif /* not Lynx */
66 
67 #include "rawcommn.h"
68 #include "rawclin.h"
69 
70 #define RFILE srawAPIFile
71 
72 /****************** entries using 64 bit functions *******************/
73 
74 #ifdef __USE_LARGEFILE64
75 
76 #ifdef __cplusplus
77 extern "C" {
78 #endif
79 int rfio_open64(const char *, int, int);
80  /* open connection to server and file */
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #ifdef __cplusplus
86 extern "C" {
87 #endif
88 int64_t rfio_lseek64(int, int64_t, int);
89  /* move read/write pointer */
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #ifdef __cplusplus
95 extern "C" {
96 #endif
97 int rfio_stat64(const char *, struct stat64 *);
98  /* get large file status */
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #ifdef __cplusplus
104 extern "C" {
105 #endif
106 int rfio_fstat64(int, struct stat64 *);
107  /* get large file status */
108 #ifdef __cplusplus
109 }
110 #endif
111 
112 #ifdef __cplusplus
113 extern "C" {
114 #endif
115 int rfio_preseek64(int, const struct iovec64 *, int);
116  /* move read/write pointer */
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 #endif /* __USE_LARGEFILE64 */
122 
123 /********************* entries using file ptr ************************/
124 
125 #ifdef __cplusplus
126 extern "C" {
127 #endif
129  char *, char *, char *, int *, int, char *, int, int, int);
130  /* open connection to gStore server and file and prepare copy
131  to lustre or read cache before migration to tape,
132  provide data mover name and running no. */
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #ifdef __cplusplus
138 extern "C" {
139 #endif
140 RFILE *rfio_fopen_gsidaq(char *, char *, int, char *, int, int, int);
141  /* open connection to gStore server and file and prepare copy
142  to lustre or read cache before migration to tape */
143 #ifdef __cplusplus
144 }
145 #endif
146 
147 #ifdef __cplusplus
148 extern "C" {
149 #endif
150 RFILE *rfio_fopen(char *, char *);
151  /* open connection to gStore server and file */
152 #ifdef __cplusplus
153 }
154 #endif
155 
156 #ifdef __cplusplus
157 extern "C" {
158 #endif
159 size_t rfio_fread(char *, size_t, size_t, RFILE *);
160  /* read file buffer */
161 #ifdef __cplusplus
162 }
163 #endif
164 
165 #ifdef __cplusplus
166 extern "C" {
167 #endif
168 size_t rfio_fwrite(const char *, size_t, size_t, RFILE *);
169  /* write file buffer */
170 #ifdef __cplusplus
171 }
172 #endif
173 
174 #ifdef __cplusplus
175 extern "C" {
176 #endif
177 int rfio_fclose(RFILE *);
178  /* close connection to server and file */
179 #ifdef __cplusplus
180 }
181 #endif
182 
183 #ifdef __cplusplus
184 extern "C" {
185 #endif
186 int rfio_fendfile(RFILE *);
187  /* close file, keep connection to server */
188 #ifdef __cplusplus
189 }
190 #endif
191 
192 #ifdef __cplusplus
193 extern "C" {
194 #endif
195 int rfio_fnewfile(RFILE *, char *);
196  /* open new file on already connected server */
197 #ifdef __cplusplus
198 }
199 #endif
200 
201 #ifdef __cplusplus
202 extern "C" {
203 #endif
204 int rfio_mkdir(const char *, int);
205  /* open new file on already connected server */
206 #ifdef __cplusplus
207 }
208 #endif
209 
210 /********************** entries using file id ********************************/
211 
212 #ifdef __cplusplus
213 extern "C" {
214 #endif
215 int rfio_open_gsidaq(const char *, int, int, int, char *, int, int, int);
216  /* open connection to gStore server and file and prepare copy
217  to lustre or read cache before migration to tape */
218 #ifdef __cplusplus
219 }
220 #endif
221 
222 #ifdef __cplusplus
223 extern "C" {
224 #endif
225 int rfio_open(const char *, int, int);
226  /* open connection to gStore server and file */
227 #ifdef __cplusplus
228 }
229 #endif
230 
231 #ifdef __cplusplus
232 extern "C" {
233 #endif
234 ssize_t rfio_read(int, char *, size_t);
235  /* read file buffer */
236 #ifdef __cplusplus
237 }
238 #endif
239 
240 #ifdef __cplusplus
241 extern "C" {
242 #endif
243 ssize_t rfio_write(int, const char *, size_t);
244  /* write file buffer */
245 #ifdef __cplusplus
246 }
247 #endif
248 
249 #ifdef __cplusplus
250 extern "C" {
251 #endif
252 int rfio_close(int);
253  /* close connection to server and file */
254 #ifdef __cplusplus
255 }
256 #endif
257 
258 #ifdef __cplusplus
259 extern "C" {
260 #endif
261 int rfio_endfile(int);
262  /* close file, keep connection to server */
263 #ifdef __cplusplus
264 }
265 #endif
266 
267 #ifdef __cplusplus
268 extern "C" {
269 #endif
270 int rfio_newfile(int, char *);
271  /* open new file on already connected server */
272 #ifdef __cplusplus
273 }
274 #endif
275 
276 #ifdef __cplusplus
277 extern "C" {
278 #endif
279 int rfio_lseek(int, int, int);
280  /* move read/write pointer */
281 #ifdef __cplusplus
282 }
283 #endif
284 
285 #ifdef __cplusplus
286 extern "C" {
287 #endif
288 int rfio_fstat(int, struct stat *);
289  /* get file status (still dummy) */
290 #ifdef __cplusplus
291 }
292 #endif
293 
294 #ifdef __cplusplus
295 extern "C" {
296 #endif
297 void rfio_perror(const char *);
298  /* print error message */
299 #ifdef __cplusplus
300 }
301 #endif
302 
303 #ifdef __cplusplus
304 extern "C" {
305 #endif
306 char *rfio_serror();
307  /* get error message */
308 #ifdef __cplusplus
309 }
310 #endif
311 
312 /**************************** other entries **********************************/
313 
314 #ifdef __cplusplus
315 extern "C" {
316 #endif
317 int rfio_cache_stat(const char *);
318  /* get query info for remote file already opened */
319 #ifdef __cplusplus
320 }
321 #endif
322 
323 #ifdef __cplusplus
324 extern "C" {
325 #endif
326 int rfio_gsi_query(int, int, int, char *);
327  /* get query info for remote file already opened */
328 #ifdef __cplusplus
329 }
330 #endif
331 
332 /********************** (still) dummy entries ********************************/
333 
334 #ifdef __cplusplus
335 extern "C" {
336 #endif
337 int rfio_access(const char *, int);
338  /* get access status (still dummy) */
339 #ifdef __cplusplus
340 }
341 #endif
342 
343 #ifdef __cplusplus
344 extern "C" {
345 #endif
346 int rfio_stat(const char *, struct stat *);
347  /* get file status (still dummy) */
348 #ifdef __cplusplus
349 }
350 #endif
351 
352 #ifdef __cplusplus
353 extern "C" {
354 #endif
355 int rfio_parse(char *, char **, char **);
356  /* parse name to host and path (still dummy) */
357 #ifdef __cplusplus
358 }
359 #endif
360 
361 #ifdef __cplusplus
362 extern "C" {
363 #endif
364 int rfio_unlink(const char *);
365  /* (still dummy) */
366 #ifdef __cplusplus
367 }
368 #endif
369 
370 #ifdef __cplusplus
371 extern "C" {
372 #endif
373 int rfio_closedir(void *);
374  /* (still dummy) */
375 #ifdef __cplusplus
376 }
377 #endif
378 
379 #endif /* RAWAPI__H */
int rfio_fendfile(RFILE *)
Definition: rawapin.c:4386
RFILE * rfio_fopen_gsidaq_dm(char *, char *, char *, int *, int, char *, int, int, int)
Definition: rawapin.c:4043
int rfio_endfile(int)
Definition: rawapin.c:2395
size_t rfio_fread(char *, size_t, size_t, RFILE *)
Definition: rawapin.c:4308
int rfio_access(const char *, int)
Definition: rawapin.c:4443
void rfio_perror(const char *)
Definition: rawapin.c:4752
int rfio_gsi_query(int, int, int, char *)
Definition: rawapin.c:5311
int rfio_open_gsidaq(const char *, int, int, int, char *, int, int, int)
Definition: rawapin.c:314
int rfio_unlink(const char *)
Definition: rawapin.c:4809
int rfio_closedir(void *)
Definition: rawapin.c:4931
int rfio_fclose(RFILE *)
Definition: rawapin.c:4415
int rfio_cache_stat(const char *)
Definition: rawapin.c:5183
int rfio_stat(const char *, struct stat *)
Definition: rawapin.c:5074
size_t rfio_fwrite(const char *, size_t, size_t, RFILE *)
Definition: rawapin.c:4346
int rfio_fnewfile(RFILE *, char *)
Definition: rawapin.c:4239
int rfio_newfile(int, char *)
Definition: rawapin.c:3017
int rfio_open(const char *, int, int)
Definition: rawapin.c:275
int rfio_fstat(int, struct stat *)
Definition: rawapin.c:4646
RFILE * rfio_fopen_gsidaq(char *, char *, int, char *, int, int, int)
Definition: rawapin.c:4152
char * rfio_serror()
Definition: rawapin.c:4780
#define RFILE
Definition: rawapin.h:70
int rfio_mkdir(const char *, int)
Definition: rawapin.c:4856
ssize_t rfio_read(int, char *, size_t)
Definition: rawapin.c:2530
FILE * fLogFile
Definition: rawapin.h:54
int rfio_lseek(int, int, int)
Definition: rawapin.c:3940
RFILE * rfio_fopen(char *, char *)
Definition: rawapin.c:4003
int rfio_close(int)
Definition: rawapin.c:3717
ssize_t rfio_write(int, const char *, size_t)
Definition: rawapin.c:2843
int rfio_parse(char *, char **, char **)
Definition: rawapin.c:4727