added: Export plugin (not finished yet)
added: ThreadManager
all threads are connected to the ThreadManager
they are started/stopped by the manager
changed: FunctionParser
now we are parsing directly what is in URI
(we were using GetParser beforehand)
we are able to recognize ordinary URI scheme (with '?' and '#' characters)
sample:
http://domain.com/dir1/dir2/item/function?par1=val2&par2=val2#htmlanchor
is the same as:
http://domain.com/dir1/dir2/item/function/par1:val2/par2:val2#htmlanchor
'htmlanchor' is put in Request::anchor field,
and the default function can be used like this:
http://domain.com/dir1/dir2/item?par1=val2&par2=val2#htmlanchor
but there is not an equivalent in winix form
e.g. http://domain.com/dir1/dir2/item/par1:val2/par2:val2#htmlanchor
because 'par1:val2' would be treated as a function name
removed: GetParser
now we don't have Request::get_tab structure
removed: CKEditorGetParser
it is not needed now
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@752 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -20,13 +20,12 @@ notify.o: ../db/dbtextstream.h ../core/error.h ../db/dbitemquery.h
|
||||
notify.o: ../core/item.h ../db/dbitemcolumns.h ../core/group.h
|
||||
notify.o: ../core/dircontainer.h ../core/ugcontainer.h
|
||||
notify.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
notify.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
notify.o: ../core/log.h ../templates/indexpatterns.h ../core/cur.h
|
||||
notify.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
|
||||
notify.o: ../notify/notify.h ../core/mounts.h ../core/mountparser.h
|
||||
notify.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
notify.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
notify.o: ../core/basethread.h ../core/sessionmanager.h
|
||||
notify.o: ../templates/indexpatterns.h ../core/cur.h ../core/system.h
|
||||
notify.o: ../core/dirs.h ../core/dircontainer.h ../notify/notify.h
|
||||
notify.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
|
||||
notify.o: ../core/run.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
notify.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
notify.o: ../core/threadmanager.h ../core/sessionmanager.h
|
||||
notify.o: ../core/sessioncontainer.h ../core/system.h ../core/htmlfilter.h
|
||||
notify.o: ../core/request.h ../core/dirs.h ../core/synchro.h ../core/plugin.h
|
||||
notify.o: ../core/pluginmsg.h ../core/sessionmanager.h
|
||||
@@ -88,7 +87,8 @@ templatesnotify.o: ../core/dirs.h ../core/dircontainer.h ../notify/notify.h
|
||||
templatesnotify.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
|
||||
templatesnotify.o: ../core/run.h ../core/users.h ../core/groups.h
|
||||
templatesnotify.o: ../core/group.h ../core/ugcontainer.h ../core/loadavg.h
|
||||
templatesnotify.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
templatesnotify.o: ../core/thumb.h ../core/basethread.h
|
||||
templatesnotify.o: ../core/threadmanager.h ../core/synchro.h
|
||||
templatesnotify.o: ../functions/functionparser.h ../core/cur.h
|
||||
templatesnotify.o: ../functions/adduser.h ../functions/cat.h
|
||||
templatesnotify.o: ../functions/chmod.h ../functions/privchanger.h
|
||||
@@ -107,8 +107,6 @@ templatesnotify.o: ../functions/tinymce.h ../functions/uname.h
|
||||
templatesnotify.o: ../functions/upload.h ../functions/uptime.h
|
||||
templatesnotify.o: ../functions/who.h ../functions/vim.h ../core/htmlfilter.h
|
||||
templatesnotify.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
templatesnotify.o: ../templates/ckeditorgetparser.h
|
||||
templatesnotify.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
templatesnotify.o: ../templates/indexpatterns.h ../templates/localefilter.h
|
||||
templatesnotify.o: ../templates/locale.h ../templates/htmltextstream.h
|
||||
templatesnotify.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -54,6 +54,10 @@ void Notify::SetDirs(Dirs * pdirs)
|
||||
dirs = pdirs;
|
||||
}
|
||||
|
||||
void Notify::SetThreadManager(ThreadManager * pmanager)
|
||||
{
|
||||
thread_manager = pmanager;
|
||||
}
|
||||
|
||||
|
||||
void Notify::Init()
|
||||
@@ -63,8 +67,9 @@ void Notify::Init()
|
||||
notify_thread.SetNotifyPool(¬ify_pool);
|
||||
notify_thread.SetPatterns(&patterns);
|
||||
notify_thread.SetSynchro(synchro);
|
||||
thread_manager->Add(¬ify_thread);
|
||||
|
||||
notify_template_cms = AddTemplate(L"notify_email_cms.txt");
|
||||
notify_template_cms = AddTemplate(L"notify_email_cms.txt");
|
||||
|
||||
plugin.Call(WINIX_NOTIFY_ADD_TEMPLATE);
|
||||
}
|
||||
@@ -125,26 +130,6 @@ void Notify::ItemChanged(const NotifyMsg & msg)
|
||||
|
||||
|
||||
|
||||
void Notify::StartThread()
|
||||
{
|
||||
if( !notify_thread.StartThread() )
|
||||
log << log1 << "Notify: I can't create a thread for sending emails" << logend;
|
||||
}
|
||||
|
||||
|
||||
void Notify::PrepareToStopThread()
|
||||
{
|
||||
// synchro->was_stop_signal is true
|
||||
notify_thread.WakeUpThread();
|
||||
}
|
||||
|
||||
|
||||
void Notify::WaitForThread()
|
||||
{
|
||||
notify_thread.WaitForThread();
|
||||
}
|
||||
|
||||
|
||||
size_t Notify::AddTemplate(const std::wstring & file_name)
|
||||
{
|
||||
size_t index = templates_names.size();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -22,6 +22,7 @@ class Config;
|
||||
class Users;
|
||||
class Dirs;
|
||||
class Synchro;
|
||||
class ThreadManager;
|
||||
|
||||
|
||||
class Notify
|
||||
@@ -35,13 +36,10 @@ public:
|
||||
void SetConfig(Config * pconfig);
|
||||
void SetUsers(Users * pusers);
|
||||
void SetDirs(Dirs * pdirs);
|
||||
void SetThreadManager(ThreadManager * pmanager);
|
||||
|
||||
void Init();
|
||||
|
||||
void StartThread();
|
||||
void PrepareToStopThread();
|
||||
void WaitForThread();
|
||||
|
||||
size_t AddTemplate(const std::wstring & file_name);
|
||||
void ReadTemplates();
|
||||
|
||||
@@ -55,6 +53,7 @@ private:
|
||||
Dirs * dirs;
|
||||
Users * users;
|
||||
Synchro * synchro;
|
||||
ThreadManager * thread_manager;
|
||||
|
||||
NotifyThread notify_thread;
|
||||
NotifyMsg msg;
|
||||
|
||||
Reference in New Issue
Block a user