s_file Struct Reference

#include <filesys.h>

Collaboration diagram for s_file:

Collaboration graph
[legend]
List of all members.

Detailed Description

Stores informnations about object in the filesystem.

Author:
VooDooMan
Version:
1
Date:
2004

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_accessaccess
 Access rights of object.
bool complete
 Was the file complete received? (only valid if file_type==ft_file).
vector< s_eventevents
 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).


Constructor & Destructor Documentation

s_file::s_file  )  [inline]
 

Definition at line 213 of file filesys.h.

References clear().

00214     {
00215         clear();
00216     }

Here is the call graph for this function:


Member Function Documentation

bool s_file::can_delete string  user  )  [inline]
 

Checks if the passed user has DELETE permission to this object.

Author:
VooDooMan
Version:
1
Date:
2004
Parameters:
user Name of user to check
Returns:
Returns true if user can DELETE

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     }

bool s_file::can_read string  user  )  [inline]
 

Checks if the passed user has READ permission to this object.

Author:
VooDooMan
Version:
1
Date:
2004
Parameters:
user Name of user to check
Returns:
Returns true if user can READ

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     }

void s_file::clear  )  [inline]
 

Clears the structure.

Author:
VooDooMan
Version:
1
Date:
2004

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     }

bool s_file::is_owner string  user  )  [inline]
 

Checks if the passed user is OWNER of this object.

Author:
VooDooMan
Version:
1
Date:
2004
Parameters:
user Name of user to check
Returns:
Returns true if user is OWNER

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     }


Member Data Documentation

vector<s_access> s_file::access
 

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().

bool s_file::complete
 

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().

vector<s_event> s_file::events
 

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_t s_file::expiration
 

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().

bool s_file::expired
 

Fas the file been deleted after expiration?

Definition at line 190 of file filesys.h.

Referenced by clear().

e_file_type s_file::file_type
 

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_t s_file::ftime
 

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().

string s_file::internal_name
 

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().

string s_file::public_name
 

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().

bool s_file::published
 

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().

string s_file::sender_file_name
 

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().


The documentation for this struct was generated from the following file:
Generated on Sun Jul 10 05:45:48 2005 for VooDoo cIRCle by doxygen 1.4.3

Hosted by SourceForge.net Logo