moved: templatesnotify -> notify

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@686 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-12-02 02:16:11 +00:00
parent 35efed9fef
commit 5f46cd2ea5
10 changed files with 0 additions and 0 deletions

81
notify/notify.h Executable file
View File

@@ -0,0 +1,81 @@
/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfilecmslunotify
#define headerfilecmslunotify
#include <vector>
#include <string>
#include "notifypool.h"
#include "templates/misc.h"
#include "notifythread.h"
class Request;
class Config;
class Users;
class Dirs;
class Synchro;
class Notify
{
public:
Notify();
void SetSynchro(Synchro * psynchro);
void SetRequest(Request * prequest);
void SetConfig(Config * pconfig);
void SetUsers(Users * pusers);
void SetDirs(Dirs * pdirs);
void Init();
void StartThread();
void SendSignalToThread(); // use it in lock/unlock
void WaitForThread();
size_t AddTemplate(const std::wstring & file_name);
void ReadTemplates();
void ItemChanged(int notify_code, const Item & item);
private:
Request * request;
Config * config;
Dirs * dirs;
Users * users;
Synchro * synchro;
NotifyThread notify_thread;
NotifyMsg msg;
NotifyPool notify_pool;
// conditional variable
pthread_cond_t thread_signal;
size_t notify_template_cms;
size_t notify_template_thread;
// templates file names
std::vector<std::wstring> templates_names;
// vector table [language][file]
TemplatesFunctions::Patterns patterns;
void CreateItemLink(const Item & item, std::wstring & link, std::wstring & dir_link);
};
#endif