translation_unit
comment "//"
comment "// The developer of the original code and/or files is Tripwi"...
comment "// Portions created by Tripwire, Inc. are copyright (C) 2000"...
comment "// Inc. Tripwire is a registered trademark of Tripwire, Inc."...
comment "// reserved."
comment "// "
comment "// This program is free software. The contents of this file"...
comment "// to the terms of the GNU General Public License as publish"...
comment "// Free Software Foundation; either version 2 of the License"...
comment "// option) any later version. You may redistribute it and/o"...
comment "// only in compliance with the GNU General Public License."
comment "// "
comment "// This program is distributed in the hope that it will be u"...
comment "// However, this program is distributed AS-IS WITHOUT ANY"
comment "// WARRANTY; INCLUDING THE IMPLIED WARRANTY OF MERCHANTABILI"...
comment "// FOR A PARTICULAR PURPOSE. Please see the GNU General Pub"...
comment "// for more details."
comment "// "
comment "// You should have received a copy of the GNU General Public"...
comment "// along with this program; if not, write to the Free Softwa"...
comment "// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA"...
comment "// USA."
comment "// "
comment "// Nothing in the GNU General Public License or any other li"...
comment "// the code or files shall permit you to use Tripwire's trad"...
comment "// service marks, or other intellectual property without Tri"...
comment "// prior written consent."
comment "// "
comment "// If you have any questions, please contact Tripwire, Inc. "...
comment "// info@tripwire.org or www.tripwire.org."
comment "//"
comment "////////////////////////////////////////////////////////////"...
comment "// fsservices.h"
comment "//"
comment "// iFSServices -- interface to the file system services clas"...
comment "//"
comment "// objective:"
comment "// abstract all file system calls, except for reading/wri"...
comment "// to elaborate: this class does not handle any file I"...
comment "// intend to use streams to abstract out file I/O"
comment "// abstract case sensitivity of underlying file system"
comment "//"
ERROR
#ifndef "#ifndef"
identifier "__FSSERVICES_H"
preproc_def
#define "#define"
identifier "__FSSERVICES_H"
comment "//=========================================================="...
comment "// INCLUDES"
comment "//=========================================================="...
preproc_ifdef
#ifndef "#ifndef"
identifier "__TYPES_H"
preproc_include
#include "#include"
string_literal
" "\""
string_content "types.h"
" "\""
#endif "#endif"
preproc_ifdef
#ifndef "#ifndef"
identifier "__TCHAR_H"
preproc_include
#include "#include"
string_literal
" "\""
string_content "core/tchar.h"
" "\""
#endif "#endif"
preproc_ifdef
#ifndef "#ifndef"
identifier "__DEBUG_H"
preproc_include
#include "#include"
string_literal
" "\""
string_content "debug.h"
" "\""
#endif "#endif"
preproc_ifdef
#ifndef "#ifndef"
identifier "__FILEERROR_H"
preproc_include
#include "#include"
string_literal
" "\""
string_content "fileerror.h"
" "\""
#endif "#endif"
comment "//=========================================================="...
comment "// STANDARD LIBRARY INCLUDES"
comment "//=========================================================="...
preproc_if
#if "#if"
identifier "HAVE_SYS_PARAM_H"
"\n"
preproc_include
#include "# include"
system_lib_string "<sys/param.h>"
#endif "#endif"
preproc_if
#if "#if"
identifier "HAVE_SYS_STAT_H"
"\n"
preproc_include
#include "# include"
system_lib_string "<sys/stat.h>"
#endif "#endif"
comment "//=========================================================="...
comment "// DEFINES AND MACROS"
comment "//=========================================================="...
comment "// macros for extracting the major and minor portions of int"...
preproc_if (+74 nodes collapsed)
comment "/* !major */"
comment "//=========================================================="...
comment "// TYPEDEFS"
comment "//=========================================================="...
type_definition
typedef "typedef"
type_identifier "int64"
type_identifier "cFSTime"
; ";"
type_definition
typedef "typedef"
type_identifier "int64"
type_identifier "cFSType"
; ";"
comment "//=========================================================="...
comment "// GLOBALS"
comment "//=========================================================="...
comment "//=========================================================="...
comment "// FORWARD DECLARATIONS"
comment "//=========================================================="...
comment "//=========================================================="...
comment "// DECLARATION OF CLASSES"
comment "//=========================================================="...
comment "// filesystem access control lists"
comment "// it is the union of MAX(elem) for all the file systems"...
comment "/*class cACLElem {\n // TODO this is just a place holder\n "...
comment "// this class is used only to pass arguments to iFSServices"
comment "// it is the union of MAX(elem) for all the file systems"...
struct_specifier
struct "struct"
type_identifier "cFSStatArgs"
field_declaration_list
{ "{"
field_declaration
enum_specifier
enum "enum"
type_identifier "FileType"
enumerator_list
{ "{"
enumerator
identifier "TY_INVALID"
, ","
comment "// lazy evaluation"
enumerator
identifier "TY_FILE"
, ","
enumerator
identifier "TY_DIR"
, ","
enumerator
identifier "TY_BLOCKDEV"
, ","
enumerator
identifier "TY_CHARDEV"
, ","
enumerator
identifier "TY_SYMLINK"
, ","
enumerator
identifier "TY_FIFO"
, ","
enumerator
identifier "TY_SOCK"
, ","
enumerator
identifier "TY_DOOR"
, ","
enumerator
identifier "TY_PORT"
} "}"
; ";"
comment "// attr is fs dependent?"
field_declaration
type_identifier "uint64"
field_identifier "dev"
; ";"
comment "// dep"
field_declaration
type_identifier "int64"
field_identifier "ino"
; ";"
comment "// dep"
field_declaration
type_identifier "int64"
field_identifier "mode"
; ";"
comment "// dep"
field_declaration
type_identifier "int64"
field_identifier "nlink"
; ";"
comment "// indep"
field_declaration
type_identifier "int64"
field_identifier "uid"
; ";"
comment "// dep"
field_declaration
type_identifier "int64"
field_identifier "gid"
; ";"
comment "// dep"
field_declaration
type_identifier "uint64"
field_identifier "rdev"
; ";"
comment "// dep"
field_declaration
type_identifier "int64"
field_identifier "size"
; ";"
comment "// indep"
field_declaration
type_identifier "cFSTime"
field_identifier "atime"
; ";"
comment "// indep"
field_declaration
type_identifier "cFSTime"
field_identifier "mtime"
; ";"
comment "// indep"
field_declaration
type_identifier "cFSTime"
field_identifier "ctime"
; ";"
comment "// indep"
field_declaration
type_identifier "int64"
field_identifier "blksize"
; ";"
comment "// indep"
field_declaration
type_identifier "int64"
field_identifier "blocks"
; ";"
comment "// dep"
field_declaration
type_identifier "int64"
field_identifier "fstype"
; ";"
comment "// dep"
field_declaration
type_identifier "TSTRING"
field_identifier "usid"
; ";"
comment "// dep"
field_declaration
type_identifier "TSTRING"
field_identifier "gsid"
; ";"
comment "// dep"
comment "// int64 mFileType; // Matt's addition..."
field_declaration
type_identifier "FileType"
field_identifier "mFileType"
; ";"
comment "// redundant with other information in this struct, but"
comment "// broken out for convenience"
comment "//TODO: access control list should go here, too"
comment "//std::list <cACLElem> mACL; // indep"
} "}"
; ";"
comment "//=========================================================="...
comment "//"
comment "// eFSServices -- exception class"
comment "//"
comment "//=========================================================="...
expression_statement
call_expression
identifier "TSS_FILE_EXCEPTION"
argument_list
( "("
identifier "eFSServices"
, ","
identifier "eFileError"
) ")"
; ";"
expression_statement
call_expression
identifier "TSS_FILE_EXCEPTION"
argument_list
( "("
identifier "eFSServicesGeneric"
, ","
identifier "eFSServices"
) ")"
; ";"
comment "//=========================================================="...
comment "//"
comment "// iFSServices -- abstracts all file system calls, except fo"...
comment "// and writing, which will be handled by standard c++. "
comment "// NOTE -- all paths returned from this class will be del"...
comment "//"
comment "//=========================================================="...
type_identifier "class"
identifier "iFSServices"
{ "{"
labeled_statement
statement_identifier "public"
: ":"
ERROR
type_identifier "virtual"
ERROR
~ "~"
function_declarator
identifier "iFSServices"
parameter_list
( "("
) ")"
compound_statement
{ "{"
} "}"
comment "////////////////////////////////////////////////////////////"...
comment "// ENUMS"
comment "////////////////////////////////////////////////////////////"...
comment "////////////////////////////////////////"
comment "// file creation modes"
comment "////////////////////////////////////////"
enum_specifier (+45 nodes collapsed)
; ";"
comment "////////////////////////////////////////"
comment "// maximum path length on platform"
comment "////////////////////////////////////////"
enum_specifier
enum "enum"
enumerator_list
{ "{"
preproc_ifdef
#ifdef "#ifdef"
identifier "MAXPATHLEN"
enumerator
identifier "TW_MAX_PATH"
= "="
identifier "MAXPATHLEN"
preproc_else
#else "#else"
enumerator
identifier "TW_MAX_PATH"
= "="
number_literal "1024"
#endif "#endif"
} "}"
; ";"
comment "////////////////////////////////////////////////////////////"...
comment "// MEMBER FUNCTIONS"
comment "////////////////////////////////////////////////////////////"...
comment "////////////////////////////////////////"
comment "// platform specific functions"
comment "////////////////////////////////////////"
function_definition (+689 nodes collapsed)
function_definition (+27 nodes collapsed)
preproc_call
preproc_directive "#endif"