1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#ifndef VSF_ACCESS_H
#define VSF_ACCESS_H
struct mystr;
/* vsf_access_check_file()
* PURPOSE
* Check whether the current session has permission to access the given
* filename.
* PARAMETERS
* p_filename_str - the filename to check access for
* RETURNS
* Returns 1 if access is granted, otherwise 0.
*/
int vsf_access_check_file(const struct mystr* p_filename_str);
/* vsf_access_check_file_visible()
* PURPOSE
* Check whether the current session has permission to view the given
* filename in directory listings.
* PARAMETERS
* p_filename_str - the filename to check visibility for
* RETURNS
* Returns 1 if the file should be visible, otherwise 0.
*/
int vsf_access_check_file_visible(const struct mystr* p_filename_str);
/* vsf_access_check_file_upload()
* PURPOSE
* Check whether the current session has permission to upload a file
* using the given filename.
* PARAMETERS
* p_filename_str - the filename to check upload permission for
* RETURNS
* Returns 1 if the file may be uploaded, otherwise 0.
*/
int vsf_access_check_file_upload(const struct mystr* p_filename_str);
/* vsf_access_check_file_download()
* PURPOSE
* Check whether the current session has permission to download a file
* with the given filename.
* PARAMETERS
* p_filename_str - the filename to check download permission for
* RETURNS
* Returns 1 if the file may be downloaded, otherwise 0.
*/
int vsf_access_check_file_download(const struct mystr* p_filename_str);
#endif /* VSF_ACCESS_H */
|