DWlibTraceIO Class Reference

#include <traceio.h>


Public Member Functions

 DWlibTraceIO ()
 ~DWlibTraceIO ()
void report (void)
void trace (int fileid, char *file)
void removetrace (int fileid)
bool check_opentrace (char *file)
void check_env (void)
int count_current_fd (void)

Classes

struct  TraceIO

Detailed Description

This class is the base class for all io functionality debug.


Constructor & Destructor Documentation

DWlibTraceIO::DWlibTraceIO (  ) 

Constructor : Initialize internal array an set DWLreport fx to be call on exit.

Note:
must be called once.

DWlibTraceIO::~DWlibTraceIO (  ) 

Destructor


Member Function Documentation

void DWlibTraceIO::report ( void   ) 

Print the Dwlib result report.

Note:
Currently print report only on stderr.

void DWlibTraceIO::trace ( int  fileid,
char *  file 
)

Put a trace when file is opened in an internal array.

Parameters:
fileid the kernel fd number corresponding to this file
file the name of file opened
Note:
we get on the fly the realpath path to the file and we sore it. if file is set to 'dwlib-pipe' or 'dwlib-socket' it store as it.

void DWlibTraceIO::removetrace ( int  fileid  ) 

Remove a trace from our internal array.

Parameters:
fileid the kernel fd number corresponding to file to remove

bool DWlibTraceIO::check_opentrace ( char *  file  ) 

Check if we have a trace in our internal array.

Returns:
Return false if no trace found, true otherwise.
Note:
if a trace is found in our internal array this mean that file is still open except if file is close bye unwrapped function

void DWlibTraceIO::check_env ( void   ) 

Check if env had change and set internal bool in consequence.

Note:
this function must be call first in each public function

int DWlibTraceIO::count_current_fd ( void   ) 

Check if env had change and set internal bool in consequence.

Returns:
the number of file descriptors (intercept by DWlib currently in use


The documentation for this class was generated from the following files:
Generated on Tue Nov 14 13:01:05 2006 for dwlib by  doxygen 1.5.1