~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to parrot/src/pfs_service.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-05-07 09:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20110507090500-lqpmdtwndor6e7os
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
 
3
Copyright (C) 2005- The University of Notre Dame
 
4
This software is distributed under the GNU General Public License.
 
5
See the file COPYING for details.
 
6
*/
 
7
 
 
8
#ifndef PFS_SERVICE_H
 
9
#define PFS_SERVICE_H
 
10
 
 
11
#include "pfs_name.h"
 
12
#include "pfs_file.h"
 
13
#include "pfs_dir.h"
 
14
#include "pfs_location.h"
 
15
 
 
16
class pfs_service {
 
17
public:
 
18
        pfs_service();
 
19
        virtual ~pfs_service();
 
20
 
 
21
        virtual void * connect( pfs_name *name );
 
22
        virtual void disconnect( pfs_name *name, void *cxn );
 
23
        virtual int get_default_port();
 
24
        virtual int tilde_is_special();
 
25
        virtual int is_seekable();
 
26
        virtual int is_local();
 
27
 
 
28
        virtual pfs_file * open( pfs_name *name, int flags, mode_t mode );
 
29
        virtual pfs_dir * getdir( pfs_name *name );
 
30
 
 
31
        virtual int stat( pfs_name *name, struct pfs_stat *buf );
 
32
        virtual int statfs( pfs_name *name, struct pfs_statfs *buf );
 
33
        virtual int lstat( pfs_name *name, struct pfs_stat *buf );
 
34
        virtual int unlink( pfs_name *name );
 
35
        virtual int access( pfs_name *name, mode_t mode );
 
36
        virtual int chmod( pfs_name *name, mode_t mode );
 
37
        virtual int chown( pfs_name *name, uid_t uid, gid_t gid );
 
38
        virtual int lchown( pfs_name *name, uid_t uid, gid_t gid );
 
39
        virtual int truncate( pfs_name *name, pfs_off_t length );
 
40
        virtual int utime( pfs_name *name, struct utimbuf *buf );
 
41
        virtual int rename( pfs_name *oldname, pfs_name *newname );
 
42
        virtual int chdir( pfs_name *name, char *newpath );
 
43
        virtual int link( pfs_name *oldname, pfs_name *newname );
 
44
        virtual int symlink( const char *linkname, pfs_name *newname );
 
45
        virtual int readlink( pfs_name *name, char *buf, pfs_size_t bufsiz );
 
46
        virtual int mknod( pfs_name *name, mode_t mode, dev_t dev );
 
47
        virtual int mkdir( pfs_name *name, mode_t mode );
 
48
        virtual int rmdir( pfs_name *name );
 
49
 
 
50
        virtual int mkalloc( pfs_name *name, pfs_ssize_t size, mode_t mode );
 
51
        virtual int lsalloc( pfs_name *name, char *alloc_name, pfs_ssize_t *size, pfs_ssize_t *inuse );
 
52
        virtual int whoami( pfs_name *name, char *buf, int size );
 
53
        virtual int getacl( pfs_name *name, char *buf, int size );
 
54
        virtual int setacl( pfs_name *name, const char *subject, const char *rights );
 
55
        virtual pfs_location* locate( pfs_name *name );
 
56
 
 
57
        virtual int putfile( pfs_name *source, pfs_name *target );
 
58
        virtual int getfile( pfs_name *source, pfs_name *target );
 
59
        virtual int thirdput( pfs_name *source, pfs_name *target );
 
60
        virtual int md5( pfs_name *source, unsigned char *digest );
 
61
};
 
62
 
 
63
 
 
64
pfs_service * pfs_service_lookup( const char *name );
 
65
pfs_service * pfs_service_lookup_default();
 
66
 
 
67
void pfs_service_print();
 
68
 
 
69
void pfs_service_emulate_statfs( struct pfs_statfs *buf );
 
70
void pfs_service_emulate_stat( pfs_name *name, struct pfs_stat *buf );
 
71
 
 
72
void pfs_service_set_block_size( int bs );
 
73
int  pfs_service_get_block_size();
 
74
 
 
75
void * pfs_service_connect_cache( pfs_name *name );
 
76
void pfs_service_disconnect_cache( pfs_name *name, void *cxn, int invalidate );
 
77
 
 
78
#endif