Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mdfs::MDFSDB Class Reference

Memory DB. Use Berkeley DB to store it permanently. More...

#include <BerkeleyDB_Example.h>

Inheritance diagram for mdfs::MDFSDB:

mdfs::MDFSDBBase mdfs::MDFSDBBase List of all members.

Public Types

enum  MOptions { DEFAULT = 0, URL, LOCAL }

Public Member Functions

 MDFSDB ()
 ~MDFSDB ()
virtual bool UpdateFile (const MFile &f, int options)
 Will add if not exist, update if exist, and add all the parent directories to the DB. The update process does not compare old values, just merely replace the old by the new ones. See base class for additional info.

virtual bool GetFile (MFile &f)
 See base class for info.

virtual void GetList (MQuery &q, MFileList &list)
void GetDirContent (MQuery &q, MFileList &list)
 MDFSDB ()
 ~MDFSDB ()
virtual bool UpdateFile (const MFile &f, int options=0)
void AddFile (const MFile &f)
 Add with no check.

virtual bool GetFile (MFile &f, int options=0)
 See base class for info.

bool GetEntry (const MFile &f, MEntry *&e, int options=0)
virtual void GetList (MQuery &q, MFileList &list)
void GetDirContent (MQuery &q, MFileList &list)
 See base class for info.

int RemoveLocalOrphan (MStringList *shares=NULL)
int RemoveRemoteFiles ()

Detailed Description

Memory DB. Use Berkeley DB to store it permanently.

Use Unmarshall and UpdateFile (Marshall) to load/save from/to a file.

Author:
Mickael Faivre-Macon


Member Enumeration Documentation

enum mdfs::MDFSDB::MOptions
 

Enumeration values:
DEFAULT 
URL 
LOCAL 


Constructor & Destructor Documentation

MDFSDB::MDFSDB (   ) 
 

MDFSDB::~MDFSDB (   ) 
 

mdfs::MDFSDB::MDFSDB (   ) 
 

mdfs::MDFSDB::~MDFSDB (   ) 
 


Member Function Documentation

void MDFSDB::AddFile (  const MFile &  f  ) 
 

Add with no check.

void mdfs::MDFSDB::GetDirContent (  MQuery &  q,
MFileList &  list
) 
 

See base class for info.

void MDFSDB::GetDirContent (  MQuery &  q,
MFileList &  list
) 
 

Todo:
In construction.

bool MDFSDB::GetEntry (  const MFile &  f,
MEntry *&  e,
int  options = 0
) 
 

bool MDFSDB::GetFile (  MFile &  f,
int  options = 0
)  [virtual]
 

See base class for info.

Implements mdfs::MDFSDBBase.

bool MDFSDB::GetFile (  MFile &  f  )  [virtual]
 

See base class for info.

virtual void mdfs::MDFSDB::GetList (  MQuery &  q,
MFileList &  list
)  [virtual]
 

Todo:
In construction. See base class for info.

Implements mdfs::MDFSDBBase.

void MDFSDB::GetList (  MQuery &  q,
MFileList &  list
)  [virtual]
 

Todo:
In construction. See base class for info.

Implements mdfs::MDFSDBBase.

int MDFSDB::RemoveLocalOrphan (  MStringList *  shares = NULL  ) 
 

remove any local entry with a missing corresponding file remove any local entry with a URL not in the shares (shares can be NULL) return the number of entries removed

int MDFSDB::RemoveRemoteFiles (   ) 
 

remove any non local entry return the number of entries removed

virtual bool mdfs::MDFSDB::UpdateFile (  const MFile &  f,
int  options = 0
)  [virtual]
 

Add if not exist, update if exist. The update process does not compare old values, just simply replace the old by the new ones. See base class for additional info.

Implements mdfs::MDFSDBBase.

bool MDFSDB::UpdateFile (  const MFile &  f,
int  options
)  [virtual]
 

Will add if not exist, update if exist, and add all the parent directories to the DB. The update process does not compare old values, just merely replace the old by the new ones. See base class for additional info.

Implements mdfs::MDFSDBBase.


The documentation for this class was generated from the following files:


MDFS SourceForge project page and download

SourceForge.net Logo

Generated on Sat Jan 3 03:14:20 2004 for MDFS by doxygen1.3.5