00001
00002
00003
00004
00005
00006
00007
00063 #ifndef CHIRP_RELI_H
00064 #define CHIRP_RELI_H
00065
00066 #include "chirp_types.h"
00067
00068 #include <sys/types.h>
00069 #include <stdio.h>
00070
00089 struct chirp_file * chirp_reli_open( const char *host, const char *path, INT64_T flags, INT64_T mode, time_t stoptime );
00090
00099 INT64_T chirp_reli_close( struct chirp_file *file, time_t stoptime );
00100
00111 INT64_T chirp_reli_pread( struct chirp_file *file, void *buffer, INT64_T length, INT64_T offset, time_t stoptime );
00112
00124 INT64_T chirp_reli_pwrite( struct chirp_file *file, const void *buffer, INT64_T length, INT64_T offset, time_t stoptime );
00125
00136 INT64_T chirp_reli_pread_unbuffered( struct chirp_file *file, void *buffer, INT64_T length, INT64_T offset, time_t stoptime );
00137
00148 INT64_T chirp_reli_pwrite_unbuffered( struct chirp_file *file, const void *buffer, INT64_T length, INT64_T offset, time_t stoptime );
00149
00164 INT64_T chirp_reli_sread( struct chirp_file *file, void *buffer, INT64_T length, INT64_T stride_length, INT64_T stride_skip, INT64_T offset, time_t stoptime );
00165
00180 INT64_T chirp_reli_swrite( struct chirp_file *file, const void *buffer, INT64_T length, INT64_T stride_length, INT64_T stride_skip, INT64_T offset, time_t stoptime );
00181
00190 INT64_T chirp_reli_fstat( struct chirp_file *file, struct chirp_stat *info, time_t stoptime );
00191
00200 INT64_T chirp_reli_fstatfs( struct chirp_file *file, struct chirp_statfs *info, time_t stoptime );
00201
00211 INT64_T chirp_reli_fchown( struct chirp_file *file, INT64_T uid, INT64_T gid, time_t stoptime );
00212
00222 INT64_T chirp_reli_fchmod( struct chirp_file *file, INT64_T mode, time_t stoptime );
00223
00231 INT64_T chirp_reli_ftruncate( struct chirp_file *file, INT64_T length, time_t stoptime );
00232
00242 INT64_T chirp_reli_flush( struct chirp_file *file, time_t stoptime );
00243
00244 INT64_T chirp_reli_fsync( struct chirp_file *file, time_t stoptime );
00245
00257 INT64_T chirp_reli_getfile( const char *host, const char *path, FILE *stream, time_t stoptime );
00258
00269 INT64_T chirp_reli_getfile_buffer( const char *host, const char *path, char **buffer, time_t stoptime );
00270
00283 INT64_T chirp_reli_putfile( const char *host, const char *path, FILE *stream, INT64_T mode, INT64_T length, time_t stoptime );
00284
00296 INT64_T chirp_reli_putfile_buffer( const char *host, const char *path, const char *buffer, INT64_T mode, INT64_T length, time_t stoptime );
00297
00308 INT64_T chirp_reli_getlongdir( const char *host, const char *path, chirp_longdir_t callback, void *arg, time_t stoptime );
00309
00321 INT64_T chirp_reli_getdir( const char *host, const char *path, chirp_dir_t callback, void *arg, time_t stoptime );
00322
00345 struct chirp_dir * chirp_reli_opendir( const char *host, const char *path, time_t stoptime );
00346
00357 struct chirp_dirent * chirp_reli_readdir( struct chirp_dir *dir );
00358
00367 void chirp_reli_closedir( struct chirp_dir *dir );
00368
00378 INT64_T chirp_reli_getacl( const char *host, const char *path, chirp_dir_t callback, void *arg, time_t stoptime );
00379
00389 INT64_T chirp_reli_setacl( const char *host, const char *path, const char *subject, const char *rights, time_t stoptime );
00390
00399 INT64_T chirp_reli_resetacl( const char *host, const char *path, const char *rights, time_t stoptime );
00400
00409 INT64_T chirp_reli_whoami( const char *host, char *subject, INT64_T length, time_t stoptime );
00410
00421 INT64_T chirp_reli_whoareyou( const char *host, const char *rhost, char *subject, INT64_T length, time_t stoptime );
00422
00432 INT64_T chirp_reli_mkfifo( const char *host, const char *path, time_t stoptime );
00433
00441 INT64_T chirp_reli_unlink( const char *host, const char *path, time_t stoptime );
00442
00451 INT64_T chirp_reli_rename( const char *host, const char *path, const char *newpath, time_t stoptime );
00452
00461 INT64_T chirp_reli_link( const char *host, const char *path, const char *newpath, time_t stoptime );
00462
00471 INT64_T chirp_reli_symlink( const char *host, const char *path, const char *newpath, time_t stoptime );
00472
00482 INT64_T chirp_reli_readlink( const char *host, const char *path, char *buf, INT64_T length, time_t stoptime );
00483
00484
00493 INT64_T chirp_reli_mkdir( const char *host, const char *path, INT64_T mode, time_t stoptime );
00494
00503 INT64_T chirp_reli_mkdir_recursive( const char *host, const char *path, INT64_T mode, time_t stoptime );
00504
00513 INT64_T chirp_reli_rmdir( const char *host, const char *path, time_t stoptime );
00514
00525 INT64_T chirp_reli_rmall( const char *host, const char *path, time_t stoptime );
00526
00536 INT64_T chirp_reli_stat( const char *host, const char *path, struct chirp_stat *info, time_t stoptime );
00537
00548 INT64_T chirp_reli_lstat( const char *host, const char *path, struct chirp_stat *info, time_t stoptime );
00549
00558 INT64_T chirp_reli_statfs( const char *host, const char *path, struct chirp_statfs *info, time_t stoptime );
00559
00571 INT64_T chirp_reli_access( const char *host, const char *path, INT64_T flags, time_t stoptime );
00572
00584 INT64_T chirp_reli_chmod( const char *host, const char *path, INT64_T mode, time_t stoptime );
00585
00596 INT64_T chirp_reli_chown( const char *host, const char *path, INT64_T uid, INT64_T gid, time_t stoptime );
00597
00608 INT64_T chirp_reli_lchown( const char *host, const char *path, INT64_T uid, INT64_T gid, time_t stoptime );
00609
00618 INT64_T chirp_reli_truncate( const char *host, const char *path, INT64_T length, time_t stoptime );
00619
00629 INT64_T chirp_reli_utime( const char *host, const char *path, time_t actime, time_t modtime, time_t stoptime );
00630
00644 INT64_T chirp_reli_md5( const char *host, const char *path, unsigned char digest[16], time_t stoptime );
00645
00659 INT64_T chirp_reli_localpath( const char *host, const char *path, char *localpath, int length, time_t stoptime );
00660
00672 INT64_T chirp_reli_audit( const char *host, const char *path, struct chirp_audit **list, time_t stoptime );
00673
00686 INT64_T chirp_reli_thirdput( const char *host, const char *path, const char *thirdhost, const char *thirdpath, time_t stoptime );
00687
00699 INT64_T chirp_reli_mkalloc( const char *host, const char *path, INT64_T size, INT64_T mode, time_t stoptime );
00700
00712 INT64_T chirp_reli_lsalloc( const char *host, const char *path, char *allocpath, INT64_T *total, INT64_T *inuse, time_t stoptime );
00713
00722 INT64_T chirp_reli_group_create( const char *host, char *group, time_t stoptime );
00723
00733 INT64_T chirp_reli_group_list( const char *host, const char *group, chirp_dir_t callback, void *arg, time_t stoptime );
00734
00743 INT64_T chirp_reli_group_add( const char *host, char *group, char *user, time_t stoptime );
00744
00753 INT64_T chirp_reli_group_remove( const char *host, char *group, char *user, time_t stoptime );
00754
00763 INT64_T chirp_reli_group_lookup( const char *host, const char *group, const char *user, time_t stoptime );
00764
00765
00766 INT64_T chirp_reli_group_cache_update( const char *host, const char *group, time_t mod_time, time_t stoptime );
00767 INT64_T chirp_reli_group_policy_set( const char *host, char *group, unsigned long int file_duration, unsigned long int dec_duration, time_t stoptime );
00768 INT64_T chirp_reli_group_policy_get( const char *host, const char *group, int *policy, int *file_duration, int *dec_duration, time_t stoptime );
00769
00784 INT64_T chirp_reli_job_begin( const char *host, const char *cwd, const char *input, const char *output, const char *error, const char *cmdline, time_t stoptime );
00785
00797 INT64_T chirp_reli_job_commit( const char *host, INT64_T jobid, time_t stoptime );
00798
00814 INT64_T chirp_reli_job_wait( const char *host, INT64_T jobid, struct chirp_job_state *state, int wait_time, time_t stoptime );
00815
00827 INT64_T chirp_reli_job_kill( const char *host, INT64_T jobid, time_t stoptime );
00828
00840 INT64_T chirp_reli_job_remove( const char *host, INT64_T jobid, time_t stoptime );
00841
00852 INT64_T chirp_reli_job_list( const char *host, chirp_joblist_t callback, void *arg, time_t stoptime );
00853
00869 INT64_T chirp_reli_bulkio( struct chirp_bulkio *list, int count, time_t stoptime );
00870
00878 INT64_T chirp_reli_blocksize_get();
00879
00887 void chirp_reli_blocksize_set( INT64_T bs );
00888
00896 void chirp_reli_cleanup_before_fork();
00897
00898 #endif