- now the mess with threads has gone away

- we have a class BaseThread -- this is a base class -- we can inherit from it when
  creating a new thread
- others treads are correctly stopped (when signal comes) -- pthread_join
- we have a special thread only for signals



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@685 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-12-02 01:02:02 +00:00
parent 08e53919e2
commit 35efed9fef
52 changed files with 2464 additions and 1825 deletions

View File

@@ -7,8 +7,8 @@
*
*/
#ifndef headerfilecmslucorefs
#define headerfilecmslucorefs
#ifndef headerfilecmslucoresystem
#define headerfilecmslucoresystem
#include "dirs.h"
@@ -20,7 +20,9 @@
#include "groups.h"
#include "rebus.h"
#include "loadavg.h"
#include "synchro.h"
#include <ctime>
#include "templatesnotify/notify.h"
@@ -48,6 +50,9 @@ public:
// load averages
LoadAvg load_avg;
// notifications (by emails)
Notify notify;
// the time when the winix starts
time_t system_start;
@@ -55,6 +60,7 @@ public:
void SetRequest(Request * prequest);
void SetConfig(Config * pconfig);
void SetDb(Db * pdb);
void SetSynchro(Synchro * psynchro);
void Init();
void RedirectTo(const Item & item, const wchar_t * postfix = 0);
@@ -83,8 +89,8 @@ public:
bool MakePath(const Item & item, std::wstring & path, bool create_dir);
bool MakePath(Item & item, bool create_dir); // output path is: item.auth_path
Error AddFile(Item & item, bool notify = true);
Error EditFile(Item & item, bool with_url = true, bool notify = true);
Error AddFile(Item & item, int notify_code = 0);
Error EditFile(Item & item, bool with_url = true, int notify_code = 0);
// converting GMT time to local time (different for each user)
time_t LocalTime(time_t gmt_time);
@@ -97,6 +103,7 @@ private:
Request * request;
Config * config;
Db * db;
Synchro * synchro;
std::wstring path;
bool MakePathSimpleFs(std::wstring & path, long dir_id, bool create_dir);