Mixe for Privacy and Anonymity in the Internet
Classes | Macros | Typedefs | Functions
CADatabase.hpp File Reference
#include "CAMutex.hpp"
#include "CAThread.hpp"
Include dependency graph for CADatabase.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _t_database_entry
 
struct  _t_database_info
 
class  CADatabase
 

Macros

#define SECONDS_PER_INTERVALL   30
 
#define FUTURE_TOLERANCE   5
 

Typedefs

typedef struct _t_database_entry t_databaseEntry
 
typedef struct _t_database_info t_databaseInfo
 

Functions

THREAD_RETURN db_loopMaintenance (void *param)
 

Macro Definition Documentation

◆ FUTURE_TOLERANCE

#define FUTURE_TOLERANCE   5

Definition at line 48 of file CADatabase.hpp.

◆ SECONDS_PER_INTERVALL

#define SECONDS_PER_INTERVALL   30

Definition at line 47 of file CADatabase.hpp.

Typedef Documentation

◆ t_databaseEntry

◆ t_databaseInfo

Function Documentation

◆ db_loopMaintenance()

THREAD_RETURN db_loopMaintenance ( void *  param)

Definition at line 77 of file CADatabase.cpp.

242  {
243  INIT_STACK;
244  BEGIN_STACK("CADatabase::db_loopMaintenance");
245 
246  CADatabase* pDatabase=(CADatabase*)param;
247  while(pDatabase->m_bRun)
248  {
249  sSleep(10);
250  UINT32 currentTime=(UINT32)time(NULL);
251  if (pDatabase->m_lastSwitch+SECONDS_PER_INTERVALL<=currentTime)
252  {
253  pDatabase->nextClock();
254  }
255  }
256 
257  FINISH_STACK("CADatabase::db_loopMaintenance");
258 
260  }
#define SECONDS_PER_INTERVALL
Definition: CADatabase.hpp:47
#define INIT_STACK
Definition: CAThread.hpp:48
#define BEGIN_STACK(methodName)
Definition: CAThread.hpp:49
#define FINISH_STACK(methodName)
Definition: CAThread.hpp:50
SINT32 sSleep(UINT32 sec)
Sleeps sec Seconds.
Definition: CAUtil.cpp:425
#define THREAD_RETURN_SUCCESS
Definition: StdAfx.h:542
unsigned int UINT32
Definition: basetypedefs.h:131
UINT64 m_lastSwitch
Definition: CADatabase.hpp:103
SINT32 nextClock()
Definition: CADatabase.cpp:262
volatile bool m_bRun
Definition: CADatabase.hpp:107