Pyrogenesis trunk
Classes | Macros | Variables
UserReport.cpp File Reference
#include "precompiled.h"
#include "UserReport.h"
#include "lib/timer.h"
#include "lib/utf8.h"
#include "lib/external_libraries/curl.h"
#include "lib/external_libraries/zlib.h"
#include "lib/file/archive/stream.h"
#include "lib/os_path.h"
#include "lib/sysdep/sysdep.h"
#include "ps/ConfigDB.h"
#include "ps/Filesystem.h"
#include "ps/Profiler2.h"
#include "ps/Pyrogenesis.h"
#include "ps/Threading.h"
#include <condition_variable>
#include <deque>
#include <fstream>
#include <mutex>
#include <string>
#include <thread>
Include dependency graph for UserReport.cpp:

Classes

struct  CUserReport
 
class  CUserReporterWorker
 

Macros

#define DEBUG_UPLOADS   0
 

Variables

static const int REPORTER_VERSION = 1
 Version number stored in config file when the user agrees to the reporting. More...
 
static const double TIMER_CHECK_INTERVAL = 10.0
 Time interval (seconds) at which the worker thread will check its reconnection timers. More...
 
static const double RECONNECT_INVERVAL = 60.0
 Seconds we should wait before reconnecting to the server after a failure. More...
 
CUserReporter g_UserReporter
 

Macro Definition Documentation

◆ DEBUG_UPLOADS

#define DEBUG_UPLOADS   0

Variable Documentation

◆ g_UserReporter

CUserReporter g_UserReporter

◆ RECONNECT_INVERVAL

const double RECONNECT_INVERVAL = 60.0
static

Seconds we should wait before reconnecting to the server after a failure.

◆ REPORTER_VERSION

const int REPORTER_VERSION = 1
static

Version number stored in config file when the user agrees to the reporting.

Reporting will be disabled if the config value is missing or is less than this value. If we start reporting a lot more data, we should increase this value and get the user to re-confirm.

◆ TIMER_CHECK_INTERVAL

const double TIMER_CHECK_INTERVAL = 10.0
static

Time interval (seconds) at which the worker thread will check its reconnection timers.

(This should be relatively high so the thread doesn't waste much time continually waking up.)