moved: templatesnotify -> notify
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@686 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
66
notify/notifythread.h
Executable file
66
notify/notifythread.h
Executable file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslunotifythread
|
||||
#define headerfilecmslunotifythread
|
||||
|
||||
#include "core/basethread.h"
|
||||
#include "templatesnotify.h"
|
||||
#include "ezc.h"
|
||||
#include "templates/misc.h"
|
||||
#include "core/config.h"
|
||||
#include "core/users.h"
|
||||
|
||||
|
||||
|
||||
// we have set following pointers: request, config, system (from BaseThread)
|
||||
|
||||
class NotifyThread : public BaseThread
|
||||
{
|
||||
public:
|
||||
|
||||
NotifyThread();
|
||||
|
||||
void SetConfig(Config * pconfig);
|
||||
void SetUsers(Users * pusers);
|
||||
void SetNotifyPool(NotifyPool * pool);
|
||||
void SetPatterns(TemplatesFunctions::Patterns * pat);
|
||||
void PatternsChanged();
|
||||
|
||||
private:
|
||||
|
||||
Config * config;
|
||||
Users * users;
|
||||
NotifyPool * notify_pool;
|
||||
TemplatesFunctions::Patterns * pat_global;
|
||||
|
||||
NotifyUserMsg msg;
|
||||
typedef std::list<NotifyUserMsg> NotifyUser;
|
||||
NotifyUser notify_user;
|
||||
std::string sendmail_command;
|
||||
bool patterns_changed;
|
||||
TemplatesFunctions::Patterns patterns;
|
||||
TemplatesNotifyFunctions::NotifyStream notify_stream;
|
||||
Ezc::Generator<TemplatesNotifyFunctions::NotifyStream> generator;
|
||||
|
||||
virtual bool Init();
|
||||
virtual bool SignalReceived();
|
||||
bool AddNextNotify();
|
||||
virtual void Do();
|
||||
void SendMail();
|
||||
void SendMail(const std::wstring & email, const std::wstring & message);
|
||||
void SendMail(FILE * sendmail, const std::wstring & message);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user