00001
00002
00003
00004
00005
00006
00007
00032 #ifndef CHIRP_RELI_H
00033 #define CHIRP_RELI_H
00034
00035 #include "chirp_types.h"
00036
00037 #include <sys/types.h>
00038 #include <stdio.h>
00039
00058 struct chirp_file * chirp_reli_open( const char *host, const char *path, INT64_T flags, INT64_T mode, time_t stoptime );
00059
00068 INT64_T chirp_reli_close( struct chirp_file *file, time_t stoptime );
00069
00080 INT64_T chirp_reli_pread( struct chirp_file *file, void *buffer, INT64_T length, INT64_T offset, time_t stoptime );
00081
00093 INT64_T chirp_reli_pwrite( struct chirp_file *file, const void *buffer, INT64_T length, INT64_T offset, time_t stoptime );
00094
00105 INT64_T chirp_reli_pread_unbuffered( struct chirp_file *file, void *buffer, INT64_T length, INT64_T offset, time_t stoptime );
00106
00117 INT64_T chirp_reli_pwrite_unbuffered( struct chirp_file *file, const void *buffer, INT64_T length, INT64_T offset, time_t stoptime );
00118
00133 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 );
00134
00149 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 );
00150
00159 INT64_T chirp_reli_fstat( struct chirp_file *file, struct chirp_stat *info, time_t stoptime );
00160
00169 INT64_T chirp_reli_fstatfs( struct chirp_file *file, struct chirp_statfs *info, time_t stoptime );
00170
00180 INT64_T chirp_reli_fchown( struct chirp_file *file, INT64_T uid, INT64_T gid, time_t stoptime );
00181
00191 INT64_T chirp_reli_fchmod( struct chirp_file *file, INT64_T mode, time_t stoptime );
00192
00200 INT64_T chirp_reli_ftruncate( struct chirp_file *file, INT64_T length, time_t stoptime );
00201
00211 INT64_T chirp_reli_flush( struct chirp_file *file, time_t stoptime );
00212
00213 INT64_T chirp_reli_fsync( struct chirp_file *file, time_t stoptime );
00214
00227 INT64_T chirp_reli_getfile( const char *host, const char *path, FILE *stream, time_t stoptime );
00228
00240 INT64_T chirp_reli_getfile_buffer( const char *host, const char *path, char **buffer, time_t stoptime );
00241
00255 INT64_T chirp_reli_putfile( const char *host, const char *path, FILE *stream, INT64_T mode, INT64_T length, time_t stoptime );
00256
00269 INT64_T chirp_reli_putfile_buffer( const char *host, const char *path, const char *buffer, INT64_T mode, INT64_T length, time_t stoptime );
00270
00281 INT64_T chirp_reli_getlongdir( const char *host, const char *path, chirp_longdir_t callback, void *arg, time_t stoptime );
00282
00294 INT64_T chirp_reli_getdir( const char *host, const char *path, chirp_dir_t callback, void *arg, time_t stoptime );
00295
00318 struct chirp_dir * chirp_reli_opendir( const char *host, const char *path, time_t stoptime );
00319
00330 struct chirp_dirent * chirp_reli_readdir( struct chirp_dir *dir );
00331
00340 void chirp_reli_closedir( struct chirp_dir *dir );
00341
00342
00343 INT64_T chirp_reli_ticket_create( const char *host, char name[CHIRP_PATH_MAX], unsigned bits, time_t stoptime );
00344 INT64_T chirp_reli_ticket_register( const char *host, const char *name, const char *subject, time_t duration, time_t stoptime );
00345 INT64_T chirp_reli_ticket_delete( const char *host, const char *name, time_t stoptime );
00346 INT64_T chirp_reli_ticket_list( const char *host, const char *subject, char ***list, time_t stoptime );
00347 INT64_T chirp_reli_ticket_get( const char *host, const char *name, char **subject, char **ticket, time_t *duration, char ***rights, time_t stoptime );
00348 INT64_T chirp_reli_ticket_modify( const char *host, const char *name, const char *path, const char *aclmask, time_t stoptime );
00349
00359 INT64_T chirp_reli_getacl( const char *host, const char *path, chirp_dir_t callback, void *arg, time_t stoptime );
00360
00370 INT64_T chirp_reli_setacl( const char *host, const char *path, const char *subject, const char *rights, time_t stoptime );
00371
00380 INT64_T chirp_reli_resetacl( const char *host, const char *path, const char *rights, time_t stoptime );
00381
00390 INT64_T chirp_reli_locate( const char *host, const char *path, chirp_loc_t callback, void *arg, time_t stoptime );
00391
00400 INT64_T chirp_reli_whoami( const char *host, char *subject, INT64_T length, time_t stoptime );
00401
00412 INT64_T chirp_reli_whoareyou( const char *host, const char *rhost, char *subject, INT64_T length, time_t stoptime );
00413
00423 INT64_T chirp_reli_mkfifo( const char *host, const char *path, time_t stoptime );
00424
00432 INT64_T chirp_reli_unlink( const char *host, const char *path, time_t stoptime );
00433
00442 INT64_T chirp_reli_rename( const char *host, const char *path, const char *newpath, time_t stoptime );
00443
00452 INT64_T chirp_reli_link( const char *host, const char *path, const char *newpath, time_t stoptime );
00453
00462 INT64_T chirp_reli_symlink( const char *host, const char *path, const char *newpath, time_t stoptime );
00463
00473 INT64_T chirp_reli_readlink( const char *host, const char *path, char *buf, INT64_T length, time_t stoptime );
00474
00475
00484 INT64_T chirp_reli_mkdir( const char *host, const char *path, INT64_T mode, time_t stoptime );
00485
00494 INT64_T chirp_reli_mkdir_recursive( const char *host, const char *path, INT64_T mode, time_t stoptime );
00495
00504 INT64_T chirp_reli_rmdir( const char *host, const char *path, time_t stoptime );
00505
00516 INT64_T chirp_reli_rmall( const char *host, const char *path, time_t stoptime );
00517
00527 INT64_T chirp_reli_stat( const char *host, const char *path, struct chirp_stat *info, time_t stoptime );
00528
00539 INT64_T chirp_reli_lstat( const char *host, const char *path, struct chirp_stat *info, time_t stoptime );
00540
00549 INT64_T chirp_reli_statfs( const char *host, const char *path, struct chirp_statfs *info, time_t stoptime );
00550
00562 INT64_T chirp_reli_access( const char *host, const char *path, INT64_T flags, time_t stoptime );
00563
00575 INT64_T chirp_reli_chmod( const char *host, const char *path, INT64_T mode, time_t stoptime );
00576
00587 INT64_T chirp_reli_chown( const char *host, const char *path, INT64_T uid, INT64_T gid, time_t stoptime );
00588
00599 INT64_T chirp_reli_lchown( const char *host, const char *path, INT64_T uid, INT64_T gid, time_t stoptime );
00600
00609 INT64_T chirp_reli_truncate( const char *host, const char *path, INT64_T length, time_t stoptime );
00610
00620 INT64_T chirp_reli_utime( const char *host, const char *path, time_t actime, time_t modtime, time_t stoptime );
00621
00635 INT64_T chirp_reli_md5( const char *host, const char *path, unsigned char digest[16], time_t stoptime );
00636
00650 INT64_T chirp_reli_localpath( const char *host, const char *path, char *localpath, int length, time_t stoptime );
00651
00663 INT64_T chirp_reli_audit( const char *host, const char *path, struct chirp_audit **list, time_t stoptime );
00664
00677 INT64_T chirp_reli_thirdput( const char *host, const char *path, const char *thirdhost, const char *thirdpath, time_t stoptime );
00678
00690 INT64_T chirp_reli_mkalloc( const char *host, const char *path, INT64_T size, INT64_T mode, time_t stoptime );
00691
00703 INT64_T chirp_reli_lsalloc( const char *host, const char *path, char *allocpath, INT64_T *total, INT64_T *inuse, time_t stoptime );
00704
00713 INT64_T chirp_reli_group_create( const char *host, char *group, time_t stoptime );
00714
00724 INT64_T chirp_reli_group_list( const char *host, const char *group, chirp_dir_t callback, void *arg, time_t stoptime );
00725
00734 INT64_T chirp_reli_group_add( const char *host, char *group, char *user, time_t stoptime );
00735
00744 INT64_T chirp_reli_group_remove( const char *host, char *group, char *user, time_t stoptime );
00745
00754 INT64_T chirp_reli_group_lookup( const char *host, const char *group, const char *user, time_t stoptime );
00755
00756
00757 INT64_T chirp_reli_group_cache_update( const char *host, const char *group, time_t mod_time, time_t stoptime );
00758 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 );
00759 INT64_T chirp_reli_group_policy_get( const char *host, const char *group, int *policy, int *file_duration, int *dec_duration, time_t stoptime );
00760
00775 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 );
00776
00788 INT64_T chirp_reli_job_commit( const char *host, INT64_T jobid, time_t stoptime );
00789
00805 INT64_T chirp_reli_job_wait( const char *host, INT64_T jobid, struct chirp_job_state *state, int wait_time, time_t stoptime );
00806
00818 INT64_T chirp_reli_job_kill( const char *host, INT64_T jobid, time_t stoptime );
00819
00831 INT64_T chirp_reli_job_remove( const char *host, INT64_T jobid, time_t stoptime );
00832
00843 INT64_T chirp_reli_job_list( const char *host, chirp_joblist_t callback, void *arg, time_t stoptime );
00844
00860 INT64_T chirp_reli_bulkio( struct chirp_bulkio *list, int count, time_t stoptime );
00861
00869 INT64_T chirp_reli_blocksize_get();
00870
00878 void chirp_reli_blocksize_set( INT64_T bs );
00879
00887 void chirp_reli_cleanup_before_fork();
00888
00889 #endif