#include <filesys.h>
Collaboration diagram for s_file:
Definition at line 178 of file filesys.h.
Public Member Functions | |
bool | can_delete (string user) |
Checks if the passed user has DELETE permission to this object. | |
bool | can_read (string user) |
Checks if the passed user has READ permission to this object. | |
void | clear () |
Clears the structure. | |
bool | is_owner (string user) |
Checks if the passed user is OWNER of this object. | |
s_file () | |
Public Attributes | |
vector< s_access > | access |
Access rights of object. | |
bool | complete |
Was the file complete received? (only valid if file_type==ft_file). | |
vector< s_event > | events |
Events that occured to the object. | |
time_t | expiration |
Time of expiration. | |
bool | expired |
Fas the file been deleted after expiration? | |
e_file_type | file_type |
Type of object. | |
time_t | ftime |
Time of creation of this object. | |
string | internal_name |
Internal file name of contents of object. | |
string | public_name |
Public name of object. | |
bool | published |
Has the object been published? | |
string | sender_file_name |
Name of the file as provided by sender (only valid if file_type==ft_file). |
|
Definition at line 213 of file filesys.h. References clear(). 00214 { 00215 clear(); 00216 }
Here is the call graph for this function: ![]() |
|
Checks if the passed user has DELETE permission to this object.
Definition at line 262 of file filesys.h. References access. 00263 { 00264 vector<s_access>::iterator i1; 00265 for(i1=access.begin(); i1!=access.end(); i1++) { 00266 if((*i1).del && ((*i1).all_users || !(*i1).user_name.compare(user))) 00267 return true; 00268 } 00269 return false; 00270 }
|
|
Checks if the passed user has READ permission to this object.
Definition at line 244 of file filesys.h. References access. 00245 { 00246 vector<s_access>::iterator i1; 00247 for(i1=access.begin(); i1!=access.end(); i1++) { 00248 if((*i1).read && ((*i1).all_users || !(*i1).user_name.compare(user))) 00249 return true; 00250 } 00251 return false; 00252 }
|
|
Clears the structure.
Definition at line 198 of file filesys.h. References access, complete, events, expiration, expired, file_type, ft_invalid, ftime, internal_name, public_name, published, and sender_file_name. Referenced by filesys_dcc_get_file(), filesys_init(), filesys_logic_get_file(), logic_process_script_output(), s_file(), and s_dcc_client::s_fs::s_fs(). 00199 { 00200 file_type=ft_invalid; 00201 ftime=0; 00202 published=false; 00203 sender_file_name=""; 00204 complete=false; 00205 internal_name=""; 00206 public_name=""; 00207 access.clear(); 00208 events.clear(); 00209 expiration=0; 00210 expired=false; 00211 }
|
|
Checks if the passed user is OWNER of this object.
Definition at line 226 of file filesys.h. References access. 00227 { 00228 vector<s_access>::iterator i1; 00229 for(i1=access.begin(); i1!=access.end(); i1++) { 00230 if((*i1).owner && ((*i1).all_users || !(*i1).user_name.compare(user))) 00231 return true; 00232 } 00233 return false; 00234 }
|
|
Access rights of object.
Definition at line 186 of file filesys.h. Referenced by can_delete(), can_read(), clear(), dcc_file_has_been_read(), dcc_send_file(), filesys_add_file_raw(), filesys_dcc_add_message(), filesys_dcc_set_file_attrs(), filesys_init(), is_owner(), and logic_process_script_output(). |
|
Was the file complete received? (only valid if file_type==ft_file).
Definition at line 181 of file filesys.h. Referenced by clear(), filesys_add_file_raw(), filesys_dcc_add_message(), filesys_init(), and logic_process_script_output(). |
|
Events that occured to the object.
Definition at line 187 of file filesys.h. Referenced by clear(), dcc_file_has_been_read(), and filesys_init(). |
|
Time of expiration.
Definition at line 189 of file filesys.h. Referenced by clear(), filesys_dcc_set_file_attrs(), filesys_init(), and logic_process_script_output(). |
|
Fas the file been deleted after expiration?
Definition at line 190 of file filesys.h. Referenced by clear(). |
|
Type of object.
Definition at line 179 of file filesys.h. Referenced by clear(), filesys_add_file_raw(), filesys_dcc_add_message(), filesys_init(), and logic_process_script_output(). |
|
Time of creation of this object.
Definition at line 183 of file filesys.h. Referenced by clear(), filesys_add_file_raw(), filesys_dcc_add_message(), filesys_init(), and logic_process_script_output(). |
|
Internal file name of contents of object.
Definition at line 184 of file filesys.h. Referenced by clear(), dcc_send_file(), filesys_add_file_raw(), filesys_dcc_add_message(), filesys_init(), and logic_process_script_output(). |
|
Public name of object.
Definition at line 185 of file filesys.h. Referenced by clear(), filesys_add_file_raw(), filesys_dcc_add_message(), filesys_dcc_set_file_attrs(), filesys_init(), and logic_process_script_output(). |
|
Has the object been published?
Definition at line 180 of file filesys.h. Referenced by clear(), filesys_add_file_raw(), filesys_dcc_add_message(), filesys_init(), and logic_process_script_output(). |
|
Name of the file as provided by sender (only valid if file_type==ft_file).
Definition at line 182 of file filesys.h. Referenced by clear(), and filesys_add_file_raw(). |