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

Go to the source code of this file.

Classes

struct  __t_replay_database_entry
 
struct  __t_replay_database_heap
 
struct  __t_database_info
 
class  CAReplayDatabase
 

Macros

#define REPLAY_DB_ENTRIES_PER_HEAP   1000
 
#define SECONDS_PER_INTERVALL   600
 

Typedefs

typedef struct __t_replay_database_entry t_replay_databaseEntry
 
typedef t_replay_databaseEntryLP_replay_databaseEntry
 
typedef struct __t_replay_database_heap t_replay_databaseHeap
 
typedef struct __t_database_info t_replay_databaseInfo
 

Functions

THREAD_RETURN replaydb_loopMaintenance (void *param)
 

Macro Definition Documentation

◆ REPLAY_DB_ENTRIES_PER_HEAP

#define REPLAY_DB_ENTRIES_PER_HEAP   1000

Definition at line 42 of file CAReplayDatabase.hpp.

◆ SECONDS_PER_INTERVALL

#define SECONDS_PER_INTERVALL   600

Definition at line 60 of file CAReplayDatabase.hpp.

Typedef Documentation

◆ LP_replay_databaseEntry

Definition at line 40 of file CAReplayDatabase.hpp.

◆ t_replay_databaseEntry

◆ t_replay_databaseHeap

◆ t_replay_databaseInfo

Function Documentation

◆ replaydb_loopMaintenance()

THREAD_RETURN replaydb_loopMaintenance ( void *  param)

Definition at line 111 of file CAReplayDatabase.cpp.

176  {
177  INIT_STACK;
178  BEGIN_STACK("CADatabase::db_loopMaintenance");
179 
180  CAReplayDatabase* pDatabase=(CAReplayDatabase*)param;
181  tReplayTimestamp rt;
182  pDatabase->getCurrentReplayTimestamp(rt);
183  pDatabase->m_currentClock=rt.interval;
184  while(pDatabase->m_bRun)
185  {
186  sSleep(10);
187  SINT32 secondsTilNextClock=((pDatabase->m_currentClock+1)*SECONDS_PER_INTERVALL)+pDatabase->m_refTime-time(NULL);
188  if(secondsTilNextClock<=0&&pDatabase->m_bRun)
189  pDatabase->nextClock();
190  }
191 
192  FINISH_STACK("CADatabase::db_loopMaintenance");
193 
195  }
#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
signed int SINT32
Definition: basetypedefs.h:132
SINT32 getCurrentReplayTimestamp(tReplayTimestamp &replayTimestamp) const
Returns the current Replay timestamp for this database.
volatile bool m_bRun
volatile SINT32 m_currentClock
the Replaytimestamp type
Definition: typedefs.hpp:206