This repository has been archived by the owner on Oct 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbeta.h
125 lines (96 loc) · 3.7 KB
/
beta.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#pragma once
#include <Stamina\Semaphore.h>
#define BETA_LOGIN 0 //pch
#define BETA_PASSMD5 1 //pch
#define BETA_AFIREWALL 4
#define BETA_AMODEM 5
#define BETA_AWBLINDS 8
#define BETA_ANONYMOUS 9
#define BETA_ANONYMOUS_LOGIN 10
#define BETA_LAST_REPORT 11
#define BETA_URID 12
#define BETA_LOGIN_CHANGE 13 //pch
#define BETA_LAST_STATICREPORT 14 //pch
// Data trzymana jest w identyfikatorze wiersza jako _time64 / 86400
#define STATS_DATE 0 // _time64 / 86400
#define STATS_STARTCOUNT 1
#define STATS_UPTIME 2
#define STATS_MSGSENT 3
#define STATS_MSGRECV 4
#define STATS_REPORTED 5
#define REP_DATE 0
#define REP_TYPE 1 //int
#define REP_TITLE 2
#define REP_MSG 3
#define REP_OS 4
#define REP_PLUGS 5
//#define REP_VERSIONINFO 6
#define REP_INFO 7
#define REP_LOG 8
#define REP_REPORTED 9
#define REP_DIGEST 10
#define REP_VERSION 11
#define REPTYPE_PROPOSAL 0
#define REPTYPE_BUG 1
#define REPTYPE_EXCEPTION 0x10
#define REPTYPE_ERROR 0x11
//#define URL_BETA_CENTRAL ""
#define BETA_SERVER_COUNT 2
#define BETA_SERVER_START 1
#define PATH_BETA dataPath + "beta"
#define FILE_BETA dataPath + "beta\\beta.dtb"
#define FILE_REPORTS dataPath + "beta\\beta_reports.dtb"
#define FILE_STATS dataPath + "beta\\beta_stats.dtb"
#define URL_BETA "http://www.konnekt.info"
#define URL_HELP "doc\\index.html"
#define URL_REGISTER "http://www.konnekt.info/kweb/register.php"
#define BLANK_PASS "_____"
namespace Konnekt {
namespace Beta {
struct ErrorReport {
CStdString msg;
CStdString info;
};
const int reportInterval = 86400 * 3; // min. czas pomiêdzy raportami w sekundach - 3 dni
const int anonymousReportInterval = 86400 * 7; // min. czas pomiêdzy raportami w sekundach - 3 dni
const int minimumReportInterval = 20 * 60; // absolutnie min. czas pomiêdzy raportami w sekundach - 20 minut
const int anonymousMinimumReportInterval = 60 * 60; // absolutnie min. czas pomiêdzy raportami w sekundach - 20 minut
const int checkInterval = 5 * 60; // czas pomiêdzy próbami w razie braku po³¹czenia z sieci¹...
extern string betaLogin;
extern string betaPass;
extern bool anonymous;
extern __time64_t lastStat;
extern CdTable Beta;
extern CdTable Reports;
extern CdTable Stats;
extern bool hwndBeta;
extern bool loggedIn;
extern Stamina::Semaphore sendSemaphore;
void init();
void setStats(__time64_t forTime);
VOID CALLBACK setStats(LPVOID lParam, DWORD dwTimerLowValue , DWORD dwTimerHighValue );
void showBeta(bool modal=false);
void showReport();
void send(bool force = false);
/** wywo³uje send z opóŸnieniem... */
void sendPostponed();
void close();
int report(int type , const char * title , const char * msg , const char * digest, const CStdString& log, bool send);
string makeDigest(const string& txt);
string info_log();
string info_serial();
string info_other(bool extended=false);
string info_os();
string info_plugins();
void imdigest(string & msg);
void stackdigest(string & msg);
void lockdown();
void cutoffWindow(HWND hwnd);
void errorreport(int type , const CStdString & title , CStdString & msg, const char * digest, const CStdString& log);
int CALLBACK BetaDialogProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
int CALLBACK ReportDialogProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
int CALLBACK ErrorDialogProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
LRESULT DummyProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
void makeReport(CStdString filename, bool open, bool usedate, bool silent);
};
};