winix/notify/notify.h

78 lines
1.3 KiB
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010-2011, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfile_winix_notify_notify
#define headerfile_winix_notify_notify
#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 ThreadManager;
class Notify
{
public:
Notify();
void SetSynchro(Synchro * psynchro);
void SetCur(Cur * pcur);
void SetConfig(Config * pconfig);
void SetUsers(Users * pusers);
void SetDirs(Dirs * pdirs);
void SetThreadManager(ThreadManager * pmanager);
void Init();
size_t AddTemplate(const std::wstring & file_name);
void ReadTemplates();
void ItemChanged(int notify_code, const Item & item);
void ItemChanged(const NotifyMsg & msg);
private:
Cur * cur;
Config * config;
Dirs * dirs;
Users * users;
Synchro * synchro;
ThreadManager * thread_manager;
NotifyThread notify_thread;
NotifyMsg msg;
NotifyPool notify_pool;
size_t notify_template_cms;
// 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