fileslist.cpp File Reference


Detailed Description

Implementation of FilesList class.

Definition in file fileslist.cpp.

#include <hn/hnprec.h>
#include <hn/fileslist.h>
#include <hn/event.h>
#include <hn/hydranode.h>
#include <hn/prefs.h>
#include <hn/metadata.h>
#include <hn/metadb.h>
#include <hn/sharedfile.h>
#include <hn/partdata.h>
#include <fstream>
#include <boost/filesystem/operations.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/random/mersenne_twister.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/trim.hpp>

Include dependency graph for fileslist.cpp:

Go to the source code of this file.


Variables

static boost::mt19937 getRandom
 Random number generator functor.
static int recursion = 0
 This variable keeps track of recursion count in scanSharedDir (which calls itself during recursive directories scanning) in order to write preferences only during first entrance of the function during recursive scan, but not during any subsequent recursive entrances.

Variable Documentation

boost::mt19937 getRandom [static]
 

Random number generator functor.

Definition at line 39 of file fileslist.cpp.

Referenced by Object::addChild(), and FilesList::createDownload().

int recursion = 0 [static]
 

This variable keeps track of recursion count in scanSharedDir (which calls itself during recursive directories scanning) in order to write preferences only during first entrance of the function during recursive scan, but not during any subsequent recursive entrances.

The variable is initialized to zero, increased by one during every entrance of scanSharedDir() method, and reduced by one during every exit of scanSharedDir() method. Thus, if this variable is set to 1, we are dealing with first entrance of the function. Once the recursion ends, the variable should be back at zero.

Definition at line 165 of file fileslist.cpp.

Referenced by FilesList::scanSharedDir().