we can create links (hard links, symbolic links) now
added winix functions: ln winix function 'default' can be used without redirecting now added new tickets types: TypeProgress, TypeString, TypeMultistring, TypeImages, TypeFiles now tickets are combined with files added winix functions: showtickets fixed mountpoints: when the default root mount was created its parameter table was empty and it caused accessing to a non-existing objects fixed logger: modifiers (log1, log2, log3) were incorrectly treated added modifier: log4 (debug info) now we are moving threads to a new plugin 'thread' created directory: plugins/thread (not finished yet) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@704 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
27
plugins/thread/Makefile
Executable file
27
plugins/thread/Makefile
Executable file
@@ -0,0 +1,27 @@
|
||||
include Makefile.o.dep
|
||||
|
||||
name = thread.so
|
||||
|
||||
|
||||
all: $(o)
|
||||
$(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o
|
||||
|
||||
|
||||
|
||||
.SUFFIXES: .cpp .o
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) -c $(CXXFLAGS) $<
|
||||
|
||||
|
||||
|
||||
depend:
|
||||
makedepend -Y. -I../.. -I../../../ezc/src -f- *.cpp > Makefile.dep
|
||||
echo -n "o = " > Makefile.o.dep
|
||||
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f $(name)
|
||||
|
||||
include Makefile.dep
|
||||
374
plugins/thread/Makefile.dep
Executable file
374
plugins/thread/Makefile.dep
Executable file
@@ -0,0 +1,374 @@
|
||||
# DO NOT DELETE
|
||||
|
||||
createticket.o: createticket.h tdb.h ticket.h ../../db/dbbase.h
|
||||
createticket.o: ../../db/dbconn.h ../../db/dbtextstream.h
|
||||
createticket.o: ../../core/textstream.h ../../core/misc.h ../../core/item.h
|
||||
createticket.o: ../../core/error.h ../../core/log.h ../../core/textstream.h
|
||||
createticket.o: ../../functions/functionbase.h ../../core/item.h
|
||||
createticket.o: ../../db/db.h ../../db/dbbase.h ../../db/dbitemquery.h
|
||||
createticket.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
|
||||
createticket.o: ../../core/thread.h ../../core/dircontainer.h
|
||||
createticket.o: ../../core/ugcontainer.h ../../core/request.h
|
||||
createticket.o: ../../core/requesttypes.h ../../core/session.h
|
||||
createticket.o: ../../core/error.h ../../core/user.h ../../core/plugindata.h
|
||||
createticket.o: ../../core/rebus.h ../../core/config.h
|
||||
createticket.o: ../../core/confparser.h ../../core/htmlfilter.h
|
||||
createticket.o: ../../templates/htmltextstream.h ../../core/config.h
|
||||
createticket.o: ../../core/system.h ../../core/dirs.h
|
||||
createticket.o: ../../core/dircontainer.h ../../core/request.h
|
||||
createticket.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
createticket.o: ../../templates/locale.h ../../core/confparser.h
|
||||
createticket.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
createticket.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
createticket.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
createticket.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
createticket.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
createticket.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
createticket.o: ../../core/basethread.h ../../core/synchro.h
|
||||
createticket.o: ../../notify/templatesnotify.h ../../core/users.h
|
||||
createticket.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
||||
createticket.o: ../../core/mounts.h ../../core/mount.h
|
||||
createticket.o: ../../core/mountparser.h ../../core/users.h
|
||||
createticket.o: ../../core/groups.h ../../core/group.h ../../core/loadavg.h
|
||||
createticket.o: ../../core/thumb.h ../../core/basethread.h
|
||||
createticket.o: ../../core/synchro.h ticketinfo.h ticketparser.h ticketconf.h
|
||||
createticket.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
createticket.o: ../../functions/functionparser.h ../../functions/adduser.h
|
||||
createticket.o: ../../functions/cat.h ../../functions/chmod.h
|
||||
createticket.o: ../../functions/privchanger.h ../../functions/chown.h
|
||||
createticket.o: ../../functions/ckeditor.h ../../functions/cp.h
|
||||
createticket.o: ../../functions/createthread.h ../../functions/default.h
|
||||
createticket.o: ../../functions/download.h ../../functions/emacs.h
|
||||
createticket.o: ../../functions/last.h ../../functions/login.h
|
||||
createticket.o: ../../functions/logout.h ../../functions/ln.h
|
||||
createticket.o: ../../functions/ls.h ../../functions/mkdir.h
|
||||
createticket.o: ../../functions/mv.h ../../functions/node.h
|
||||
createticket.o: ../../functions/priv.h ../../functions/reload.h
|
||||
createticket.o: ../../functions/rm.h ../../functions/run.h
|
||||
createticket.o: ../../functions/specialdefault.h ../../functions/stat.h
|
||||
createticket.o: ../../functions/subject.h ../../functions/funthread.h
|
||||
createticket.o: ../../functions/template.h ../../functions/tinymce.h
|
||||
createticket.o: ../../functions/uname.h ../../functions/upload.h
|
||||
createticket.o: ../../functions/uptime.h ../../functions/who.h
|
||||
createticket.o: ../../functions/vim.h ../../core/htmlfilter.h sessiondata.h
|
||||
createticket.o: ../../core/plugindata.h
|
||||
editticket.o: editticket.h tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
editticket.o: ../../db/dbtextstream.h ../../core/textstream.h
|
||||
editticket.o: ../../core/misc.h ../../core/item.h ../../core/error.h
|
||||
editticket.o: ../../core/log.h ../../core/textstream.h ticketinfo.h
|
||||
editticket.o: ticketparser.h ticketconf.h ../../core/item.h
|
||||
editticket.o: ../../core/system.h ../../core/dirs.h ../../core/dircontainer.h
|
||||
editticket.o: ../../db/db.h ../../db/dbbase.h ../../db/dbitemquery.h
|
||||
editticket.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
|
||||
editticket.o: ../../core/thread.h ../../core/dircontainer.h
|
||||
editticket.o: ../../core/ugcontainer.h ../../core/request.h
|
||||
editticket.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
editticket.o: ../../templates/locale.h ../../core/confparser.h
|
||||
editticket.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
editticket.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
editticket.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
editticket.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
editticket.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
editticket.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
editticket.o: ../../core/basethread.h ../../core/synchro.h
|
||||
editticket.o: ../../notify/templatesnotify.h ../../core/config.h
|
||||
editticket.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h
|
||||
editticket.o: ../../core/lastcontainer.h ../../core/mounts.h
|
||||
editticket.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h
|
||||
editticket.o: ../../core/config.h ../../core/confparser.h
|
||||
editticket.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h
|
||||
editticket.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
|
||||
editticket.o: ../../core/thumb.h ../../core/basethread.h
|
||||
editticket.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
editticket.o: ../../functions/functionparser.h ../../core/request.h
|
||||
editticket.o: ../../core/requesttypes.h ../../core/session.h
|
||||
editticket.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
editticket.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
editticket.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
editticket.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
editticket.o: ../../functions/cp.h ../../functions/createthread.h
|
||||
editticket.o: ../../functions/default.h ../../functions/download.h
|
||||
editticket.o: ../../functions/emacs.h ../../functions/last.h
|
||||
editticket.o: ../../functions/login.h ../../functions/logout.h
|
||||
editticket.o: ../../functions/ln.h ../../functions/ls.h
|
||||
editticket.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
editticket.o: ../../functions/node.h ../../functions/priv.h
|
||||
editticket.o: ../../functions/reload.h ../../functions/rm.h
|
||||
editticket.o: ../../functions/run.h ../../functions/specialdefault.h
|
||||
editticket.o: ../../functions/stat.h ../../functions/subject.h
|
||||
editticket.o: ../../functions/funthread.h ../../functions/template.h
|
||||
editticket.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
editticket.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
editticket.o: ../../functions/who.h ../../functions/vim.h
|
||||
editticket.o: ../../core/htmlfilter.h ../../functions/functionbase.h
|
||||
editticket.o: ../../core/synchro.h sessiondata.h ../../core/plugindata.h
|
||||
funticket.o: funticket.h tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
funticket.o: ../../db/dbtextstream.h ../../core/textstream.h
|
||||
funticket.o: ../../core/misc.h ../../core/item.h ../../core/error.h
|
||||
funticket.o: ../../core/log.h ../../core/textstream.h ticketinfo.h
|
||||
funticket.o: ticketparser.h ticketconf.h ../../core/item.h
|
||||
funticket.o: ../../core/system.h ../../core/dirs.h ../../core/dircontainer.h
|
||||
funticket.o: ../../db/db.h ../../db/dbbase.h ../../db/dbitemquery.h
|
||||
funticket.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
|
||||
funticket.o: ../../core/thread.h ../../core/dircontainer.h
|
||||
funticket.o: ../../core/ugcontainer.h ../../core/request.h
|
||||
funticket.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
funticket.o: ../../templates/locale.h ../../core/confparser.h
|
||||
funticket.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
funticket.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
funticket.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
funticket.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
funticket.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
funticket.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
funticket.o: ../../core/basethread.h ../../core/synchro.h
|
||||
funticket.o: ../../notify/templatesnotify.h ../../core/config.h
|
||||
funticket.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h
|
||||
funticket.o: ../../core/lastcontainer.h ../../core/mounts.h
|
||||
funticket.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h
|
||||
funticket.o: ../../core/config.h ../../core/confparser.h
|
||||
funticket.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h
|
||||
funticket.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
|
||||
funticket.o: ../../core/thumb.h ../../core/basethread.h
|
||||
funticket.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
funticket.o: ../../functions/functionparser.h ../../core/request.h
|
||||
funticket.o: ../../core/requesttypes.h ../../core/session.h
|
||||
funticket.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
funticket.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
funticket.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
funticket.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
funticket.o: ../../functions/cp.h ../../functions/createthread.h
|
||||
funticket.o: ../../functions/default.h ../../functions/download.h
|
||||
funticket.o: ../../functions/emacs.h ../../functions/last.h
|
||||
funticket.o: ../../functions/login.h ../../functions/logout.h
|
||||
funticket.o: ../../functions/ln.h ../../functions/ls.h
|
||||
funticket.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
funticket.o: ../../functions/node.h ../../functions/priv.h
|
||||
funticket.o: ../../functions/reload.h ../../functions/rm.h
|
||||
funticket.o: ../../functions/run.h ../../functions/specialdefault.h
|
||||
funticket.o: ../../functions/stat.h ../../functions/subject.h
|
||||
funticket.o: ../../functions/funthread.h ../../functions/template.h
|
||||
funticket.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
funticket.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
funticket.o: ../../functions/who.h ../../functions/vim.h
|
||||
funticket.o: ../../core/htmlfilter.h ../../functions/functionbase.h
|
||||
funticket.o: ../../core/synchro.h
|
||||
init.o: tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
init.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/misc.h
|
||||
init.o: ../../core/item.h ../../core/error.h ../../core/log.h
|
||||
init.o: ../../core/textstream.h funticket.h ticketinfo.h ticketparser.h
|
||||
init.o: ticketconf.h ../../core/item.h ../../core/system.h ../../core/dirs.h
|
||||
init.o: ../../core/dircontainer.h ../../db/db.h ../../db/dbbase.h
|
||||
init.o: ../../db/dbitemquery.h ../../db/dbitemcolumns.h ../../core/user.h
|
||||
init.o: ../../core/group.h ../../core/thread.h ../../core/dircontainer.h
|
||||
init.o: ../../core/ugcontainer.h ../../core/request.h ../../notify/notify.h
|
||||
init.o: ../../notify/notifypool.h ../../templates/locale.h
|
||||
init.o: ../../core/confparser.h ../../templates/misc.h
|
||||
init.o: ../../templates/localefilter.h ../../templates/locale.h
|
||||
init.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
|
||||
init.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
init.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
init.o: ../../../ezc/src/stringconv.h ../../templates/htmltextstream.h
|
||||
init.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
init.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
init.o: ../../core/config.h ../../core/users.h ../../core/user.h
|
||||
init.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
||||
init.o: ../../core/mounts.h ../../core/mount.h ../../core/error.h
|
||||
init.o: ../../core/mountparser.h ../../core/config.h ../../core/confparser.h
|
||||
init.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h
|
||||
init.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
|
||||
init.o: ../../core/thumb.h ../../core/basethread.h
|
||||
init.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
init.o: ../../functions/functionparser.h ../../core/request.h
|
||||
init.o: ../../core/requesttypes.h ../../core/session.h
|
||||
init.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
init.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
init.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
init.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
init.o: ../../functions/cp.h ../../functions/createthread.h
|
||||
init.o: ../../functions/default.h ../../functions/download.h
|
||||
init.o: ../../functions/emacs.h ../../functions/last.h
|
||||
init.o: ../../functions/login.h ../../functions/logout.h ../../functions/ln.h
|
||||
init.o: ../../functions/ls.h ../../functions/mkdir.h ../../functions/mv.h
|
||||
init.o: ../../functions/node.h ../../functions/priv.h
|
||||
init.o: ../../functions/reload.h ../../functions/rm.h ../../functions/run.h
|
||||
init.o: ../../functions/specialdefault.h ../../functions/stat.h
|
||||
init.o: ../../functions/subject.h ../../functions/funthread.h
|
||||
init.o: ../../functions/template.h ../../functions/tinymce.h
|
||||
init.o: ../../functions/uname.h ../../functions/upload.h
|
||||
init.o: ../../functions/uptime.h ../../functions/who.h ../../functions/vim.h
|
||||
init.o: ../../core/htmlfilter.h ../../functions/functionbase.h
|
||||
init.o: ../../core/synchro.h editticket.h createticket.h showtickets.h
|
||||
init.o: ../../core/log.h ../../core/plugin.h ../../core/pluginmsg.h
|
||||
init.o: ../../core/system.h ../../core/sessionmanager.h
|
||||
init.o: ../../core/sessioncontainer.h ../../templates/templates.h
|
||||
init.o: ../../templates/patterncacher.h ../../templates/ckeditorgetparser.h
|
||||
init.o: ../../core/httpsimpleparser.h ../../core/log.h
|
||||
init.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
|
||||
init.o: sessiondata.h ../../core/plugindata.h
|
||||
sessiondata.o: sessiondata.h ../../core/plugindata.h ticket.h
|
||||
showtickets.o: showtickets.h tdb.h ticket.h ../../db/dbbase.h
|
||||
showtickets.o: ../../db/dbconn.h ../../db/dbtextstream.h
|
||||
showtickets.o: ../../core/textstream.h ../../core/misc.h ../../core/item.h
|
||||
showtickets.o: ../../core/error.h ../../core/log.h ../../core/textstream.h
|
||||
showtickets.o: ticketinfo.h ticketparser.h ticketconf.h ../../core/item.h
|
||||
showtickets.o: ../../core/system.h ../../core/dirs.h
|
||||
showtickets.o: ../../core/dircontainer.h ../../db/db.h ../../db/dbbase.h
|
||||
showtickets.o: ../../db/dbitemquery.h ../../db/dbitemcolumns.h
|
||||
showtickets.o: ../../core/user.h ../../core/group.h ../../core/thread.h
|
||||
showtickets.o: ../../core/dircontainer.h ../../core/ugcontainer.h
|
||||
showtickets.o: ../../core/request.h ../../notify/notify.h
|
||||
showtickets.o: ../../notify/notifypool.h ../../templates/locale.h
|
||||
showtickets.o: ../../core/confparser.h ../../templates/misc.h
|
||||
showtickets.o: ../../templates/localefilter.h ../../templates/locale.h
|
||||
showtickets.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
|
||||
showtickets.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
showtickets.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
showtickets.o: ../../../ezc/src/stringconv.h ../../templates/htmltextstream.h
|
||||
showtickets.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
showtickets.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
showtickets.o: ../../core/config.h ../../core/users.h ../../core/user.h
|
||||
showtickets.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
||||
showtickets.o: ../../core/mounts.h ../../core/mount.h ../../core/error.h
|
||||
showtickets.o: ../../core/mountparser.h ../../core/config.h
|
||||
showtickets.o: ../../core/confparser.h ../../core/htmlfilter.h
|
||||
showtickets.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
showtickets.o: ../../core/rebus.h ../../core/loadavg.h ../../core/thumb.h
|
||||
showtickets.o: ../../core/basethread.h ../../functions/functions.h
|
||||
showtickets.o: ../../functions/functionbase.h
|
||||
showtickets.o: ../../functions/functionparser.h ../../core/request.h
|
||||
showtickets.o: ../../core/requesttypes.h ../../core/session.h
|
||||
showtickets.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
showtickets.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
showtickets.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
showtickets.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
showtickets.o: ../../functions/cp.h ../../functions/createthread.h
|
||||
showtickets.o: ../../functions/default.h ../../functions/download.h
|
||||
showtickets.o: ../../functions/emacs.h ../../functions/last.h
|
||||
showtickets.o: ../../functions/login.h ../../functions/logout.h
|
||||
showtickets.o: ../../functions/ln.h ../../functions/ls.h
|
||||
showtickets.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
showtickets.o: ../../functions/node.h ../../functions/priv.h
|
||||
showtickets.o: ../../functions/reload.h ../../functions/rm.h
|
||||
showtickets.o: ../../functions/run.h ../../functions/specialdefault.h
|
||||
showtickets.o: ../../functions/stat.h ../../functions/subject.h
|
||||
showtickets.o: ../../functions/funthread.h ../../functions/template.h
|
||||
showtickets.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
showtickets.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
showtickets.o: ../../functions/who.h ../../functions/vim.h
|
||||
showtickets.o: ../../core/htmlfilter.h ../../functions/functionbase.h
|
||||
showtickets.o: ../../core/synchro.h
|
||||
tdb.o: tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
tdb.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/misc.h
|
||||
tdb.o: ../../core/item.h ../../core/error.h ../../core/log.h
|
||||
tdb.o: ../../core/textstream.h ../../core/log.h
|
||||
templates.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
|
||||
templates.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
templates.o: ../../core/item.h ../../../ezc/src/functions.h
|
||||
templates.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
templates.o: ticketinfo.h ticket.h ticketparser.h ticketconf.h
|
||||
templates.o: ../../core/item.h ../../core/system.h ../../core/dirs.h
|
||||
templates.o: ../../core/dircontainer.h ../../db/db.h ../../db/dbbase.h
|
||||
templates.o: ../../db/dbitemquery.h ../../db/dbitemcolumns.h
|
||||
templates.o: ../../core/user.h ../../core/group.h ../../core/thread.h
|
||||
templates.o: ../../core/dircontainer.h ../../core/ugcontainer.h
|
||||
templates.o: ../../core/log.h ../../core/textstream.h ../../core/request.h
|
||||
templates.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
templates.o: ../../templates/locale.h ../../core/confparser.h
|
||||
templates.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
templates.o: ../../templates/locale.h ../../templates/htmltextstream.h
|
||||
templates.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
templates.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
templates.o: ../../core/textstream.h ../../core/misc.h ../../core/config.h
|
||||
templates.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h
|
||||
templates.o: ../../core/lastcontainer.h ../../core/mounts.h
|
||||
templates.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h
|
||||
templates.o: ../../core/config.h ../../core/confparser.h
|
||||
templates.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h
|
||||
templates.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
|
||||
templates.o: ../../core/thumb.h ../../core/basethread.h
|
||||
templates.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
templates.o: ../../functions/functionparser.h ../../core/request.h
|
||||
templates.o: ../../core/requesttypes.h ../../core/session.h
|
||||
templates.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
templates.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
templates.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
templates.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
templates.o: ../../functions/cp.h ../../functions/createthread.h
|
||||
templates.o: ../../functions/default.h ../../functions/download.h
|
||||
templates.o: ../../functions/emacs.h ../../functions/last.h
|
||||
templates.o: ../../functions/login.h ../../functions/logout.h
|
||||
templates.o: ../../functions/ln.h ../../functions/ls.h
|
||||
templates.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
templates.o: ../../functions/node.h ../../functions/priv.h
|
||||
templates.o: ../../functions/reload.h ../../functions/rm.h
|
||||
templates.o: ../../functions/run.h ../../functions/specialdefault.h
|
||||
templates.o: ../../functions/stat.h ../../functions/subject.h
|
||||
templates.o: ../../functions/funthread.h ../../functions/template.h
|
||||
templates.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
templates.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
templates.o: ../../functions/who.h ../../functions/vim.h
|
||||
templates.o: ../../core/htmlfilter.h tdb.h ../../db/dbbase.h
|
||||
templates.o: ../../db/dbconn.h ../../db/dbtextstream.h ../../core/error.h
|
||||
templates.o: editticket.h ../../functions/functionbase.h ../../core/synchro.h
|
||||
templates.o: createticket.h ../../core/misc.h ../../core/plugin.h
|
||||
templates.o: ../../core/pluginmsg.h ../../core/system.h
|
||||
templates.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
|
||||
templates.o: ../../templates/templates.h ../../templates/patterncacher.h
|
||||
templates.o: ../../templates/ckeditorgetparser.h
|
||||
templates.o: ../../core/httpsimpleparser.h ../../core/log.h
|
||||
templates.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
|
||||
templates.o: sessiondata.h ../../core/plugindata.h
|
||||
ticketconf.o: ticketconf.h
|
||||
ticketinfo.o: ticketinfo.h ticket.h ticketparser.h ticketconf.h
|
||||
ticketinfo.o: ../../core/item.h ../../core/system.h ../../core/dirs.h
|
||||
ticketinfo.o: ../../core/item.h ../../core/dircontainer.h ../../db/db.h
|
||||
ticketinfo.o: ../../db/dbbase.h ../../db/dbitemquery.h
|
||||
ticketinfo.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
|
||||
ticketinfo.o: ../../core/thread.h ../../core/dircontainer.h
|
||||
ticketinfo.o: ../../core/ugcontainer.h ../../core/log.h
|
||||
ticketinfo.o: ../../core/textstream.h ../../core/request.h
|
||||
ticketinfo.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
ticketinfo.o: ../../templates/locale.h ../../core/confparser.h
|
||||
ticketinfo.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
ticketinfo.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
ticketinfo.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
ticketinfo.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
ticketinfo.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
ticketinfo.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
ticketinfo.o: ../../core/basethread.h ../../core/synchro.h
|
||||
ticketinfo.o: ../../notify/templatesnotify.h ../../core/textstream.h
|
||||
ticketinfo.o: ../../core/misc.h ../../core/config.h ../../core/users.h
|
||||
ticketinfo.o: ../../core/user.h ../../core/ugcontainer.h
|
||||
ticketinfo.o: ../../core/lastcontainer.h ../../core/mounts.h
|
||||
ticketinfo.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h
|
||||
ticketinfo.o: ../../core/config.h ../../core/confparser.h
|
||||
ticketinfo.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h
|
||||
ticketinfo.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
|
||||
ticketinfo.o: ../../core/thumb.h ../../core/basethread.h
|
||||
ticketinfo.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
ticketinfo.o: ../../functions/functionparser.h ../../core/request.h
|
||||
ticketinfo.o: ../../core/requesttypes.h ../../core/session.h
|
||||
ticketinfo.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
ticketinfo.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
ticketinfo.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
ticketinfo.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
ticketinfo.o: ../../functions/cp.h ../../functions/createthread.h
|
||||
ticketinfo.o: ../../functions/default.h ../../functions/download.h
|
||||
ticketinfo.o: ../../functions/emacs.h ../../functions/last.h
|
||||
ticketinfo.o: ../../functions/login.h ../../functions/logout.h
|
||||
ticketinfo.o: ../../functions/ln.h ../../functions/ls.h
|
||||
ticketinfo.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
ticketinfo.o: ../../functions/node.h ../../functions/priv.h
|
||||
ticketinfo.o: ../../functions/reload.h ../../functions/rm.h
|
||||
ticketinfo.o: ../../functions/run.h ../../functions/specialdefault.h
|
||||
ticketinfo.o: ../../functions/stat.h ../../functions/subject.h
|
||||
ticketinfo.o: ../../functions/funthread.h ../../functions/template.h
|
||||
ticketinfo.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
ticketinfo.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
ticketinfo.o: ../../functions/who.h ../../functions/vim.h
|
||||
ticketinfo.o: ../../core/htmlfilter.h tdb.h ../../db/dbbase.h
|
||||
ticketinfo.o: ../../db/dbconn.h ../../db/dbtextstream.h ../../core/error.h
|
||||
ticketinfo.o: ../../core/log.h ../../core/misc.h sessiondata.h
|
||||
ticketinfo.o: ../../core/plugindata.h
|
||||
ticketparser.o: ticketparser.h ticketconf.h ../../core/log.h
|
||||
ticketparser.o: ../../core/misc.h
|
||||
1
plugins/thread/Makefile.o.dep
Executable file
1
plugins/thread/Makefile.o.dep
Executable file
@@ -0,0 +1 @@
|
||||
o = createticket.o editticket.o funticket.o init.o sessiondata.o showtickets.o tdb.o templates.o ticketconf.o ticketinfo.o ticketparser.o
|
||||
141
plugins/thread/init.cpp
Executable file
141
plugins/thread/init.cpp
Executable file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "tdb.h"
|
||||
#include "funthread.h"
|
||||
#include "createthread.h"
|
||||
#include "showthreads.h"
|
||||
#include "core/log.h"
|
||||
#include "core/plugin.h"
|
||||
|
||||
|
||||
extern "C" void Init(PluginInfo &);
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
const wchar_t plugin_name[] = L"thread";
|
||||
|
||||
TDb tdb;
|
||||
ThreadInfo thread_info;
|
||||
|
||||
FunThread fun_thread;
|
||||
CreateThread fun_create_thread;
|
||||
ShowThreads fun_show_threads;
|
||||
|
||||
|
||||
void AddFunctions(PluginInfo & info)
|
||||
{
|
||||
info.functions->Add(fun_thread);
|
||||
info.functions->Add(fun_create_thread);
|
||||
}
|
||||
|
||||
|
||||
void SelectDefaultFunction(PluginInfo & info)
|
||||
{
|
||||
if( info.system->mounts.pmount->type == thread_info.mount_type_thread )
|
||||
{
|
||||
if( info.request->is_item )
|
||||
info.request->function = &fun_thread;
|
||||
else
|
||||
info.request->function = &fun_show_threads;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AddMounts(PluginInfo & info)
|
||||
{
|
||||
Mounts & m = info.system->mounts;
|
||||
|
||||
ticket_info.mount_type_thread = m.AddMountType(L"thread");
|
||||
ticket_info.mount_par_thread_enable = m.AddMountPar(L"thread_enable");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void ProcessRequest(PluginInfo & info)
|
||||
{
|
||||
if( info.request->function == &info.functions->fun_reload )
|
||||
{
|
||||
if( info.request->IsParam(L"tickets") )
|
||||
ticket_info.ReadTicketConf();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RemoveThread(PluginInfo & i)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void InitTicket(PluginInfo & info)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void AddNotifyTemplate(PluginInfo & info)
|
||||
{
|
||||
ticket_info.template_index = info.system->notify.AddTemplate(L"notify_email_thread.txt");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AddEzcFunctions(PluginInfo & info);
|
||||
|
||||
} // namespace Thread
|
||||
|
||||
|
||||
|
||||
void Init(PluginInfo & info)
|
||||
{
|
||||
using namespace Ticket;
|
||||
|
||||
plugin.Assign(WINIX_CREATE_FUNCTIONS, AddFunctions);
|
||||
plugin.Assign(WINIX_SELECT_DEFAULT_FUNCTION, SelectDefaultFunction);
|
||||
plugin.Assign(WINIX_ADD_MOUNTS, AddMounts);
|
||||
plugin.Assign(WINIX_FILE_REMOVED, RemoveThread);
|
||||
plugin.Assign(WINIX_PLUGIN_INIT, InitTicket);
|
||||
plugin.Assign(WINIX_NOTIFY_ADD_TEMPLATE, AddNotifyTemplate);
|
||||
|
||||
plugin.Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, AddEzcFunctions);
|
||||
plugin.Assign(WINIX_PROCESS_REQUEST, ProcessRequest);
|
||||
|
||||
tdb.SetConn(info.db->GetConn());
|
||||
tdb.LogQueries(info.config->log_db_query);
|
||||
|
||||
ticket_info.SetDb(info.db);
|
||||
ticket_info.SetTDb(&tdb);
|
||||
ticket_info.SetConfig(info.config);
|
||||
ticket_info.SetSystem(info.system);
|
||||
ticket_info.SetRequest(info.request);
|
||||
ticket_info.SetFunctions(info.functions);
|
||||
ticket_info.plugin_id = info.plugin_id;
|
||||
|
||||
fun_ticket.SetTDb(&tdb);
|
||||
fun_ticket.SetTicketInfo(&ticket_info);
|
||||
|
||||
fun_edit_ticket.SetTDb(&tdb);
|
||||
fun_edit_ticket.SetTicketInfo(&ticket_info);
|
||||
|
||||
fun_create_ticket.SetTDb(&tdb);
|
||||
fun_create_ticket.SetTicketInfo(&ticket_info);
|
||||
|
||||
fun_show_tickets.SetTDb(&tdb);
|
||||
fun_show_tickets.SetTicketInfo(&ticket_info);
|
||||
|
||||
info.p1 = (void*)(plugin_name);
|
||||
}
|
||||
|
||||
|
||||
23
plugins/thread/showthreads.cpp
Executable file
23
plugins/thread/showthreads.cpp
Executable file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "showthreads.h"
|
||||
#include "functions.h"
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
35
plugins/thread/showthreads.h
Executable file
35
plugins/thread/showthreads.h
Executable file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_plugins_thread_showthreads
|
||||
#define headerfile_winix_plugins_thread_showthreads
|
||||
|
||||
#include "functions/functionbase.h"
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
|
||||
class ShowThreads : public FunctionBase
|
||||
{
|
||||
public:
|
||||
|
||||
bool HasAccess();
|
||||
void MakePost();
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
277
plugins/thread/tdb.cpp
Executable file
277
plugins/thread/tdb.cpp
Executable file
@@ -0,0 +1,277 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "tdb.h"
|
||||
#include "core/log.h"
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
|
||||
|
||||
Error Db::GetThreadByDirId(long dir_id, Thread & thread)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R("select thread.id, thread.parent_id, thread.dir_id, thread.closed, thread.items, "
|
||||
"thread.last_item, item.date_modification, item.user_id "
|
||||
"from core.thread left join core.item on thread.last_item = item.id "
|
||||
"where thread.dir_id = ") << dir_id << R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_TUPLES_OK);
|
||||
|
||||
int rows = Rows(r);
|
||||
|
||||
if( rows > 1 )
|
||||
log << log1 << "Db: there is more than one thread with dir_id: " << dir_id << logend;
|
||||
else
|
||||
if( rows == 0 )
|
||||
throw Error(WINIX_ERR_NO_THREAD);
|
||||
|
||||
int cid = AssertColumn(r, "id");
|
||||
int cparent_id = AssertColumn(r, "parent_id");
|
||||
int cdir_id = AssertColumn(r, "dir_id");
|
||||
int cclosed = AssertColumn(r, "closed");
|
||||
int citems = AssertColumn(r, "items");
|
||||
int clast_item = AssertColumn(r, "last_item");
|
||||
|
||||
int cdate_modification = PQfnumber(r, "date_modification"); // !! tych kolumn mo<6D>e nie by<62>? czemu PQfnumber a nie AssertColumn?
|
||||
int cuser_id = PQfnumber(r, "user_id");
|
||||
|
||||
thread.id = AssertValueLong(r, 0, cid);
|
||||
thread.parent_id = AssertValueLong(r, 0, cparent_id);
|
||||
thread.dir_id = AssertValueLong(r, 0, cdir_id);
|
||||
thread.closed = AssertValueLong(r, 0, cclosed) == 0 ? false : true;
|
||||
thread.items = AssertValueLong(r, 0, citems);
|
||||
thread.last_item.id = AssertValueLong(r, 0, clast_item);
|
||||
thread.last_item.date_modification = AssertValueTm(r, 0, cdate_modification);
|
||||
thread.last_item.user_id = AssertValueLong(r, 0, cuser_id);
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
status = e;
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Error Db::GetThreads(long parent_id, std::vector<Thread> & thread_tab)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R("select thread.id, thread.parent_id, thread.dir_id, thread.closed, "
|
||||
"thread.items, thread.last_item, item.date_modification, item.user_id, item.guest_name "
|
||||
"from core.thread left join core.item on thread.last_item = item.id "
|
||||
"where thread.parent_id = ") << parent_id << R(" order by date_modification asc;");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_TUPLES_OK);
|
||||
|
||||
int rows = Rows(r);
|
||||
Thread thread;
|
||||
|
||||
int cid = AssertColumn(r, "id");
|
||||
int cparent_id = AssertColumn(r, "parent_id");
|
||||
int cdir_id = AssertColumn(r, "dir_id");
|
||||
int cclosed = AssertColumn(r, "closed");
|
||||
int citems = AssertColumn(r, "items");
|
||||
int clast_item = AssertColumn(r, "last_item");
|
||||
int cdate_modification = PQfnumber(r, "date_modification"); // !! czemu tutaj jest pqfnumber zamiast assertcolumn?
|
||||
int cuser_id = PQfnumber(r, "user_id");
|
||||
int cguest_name = PQfnumber(r, "guest_name");
|
||||
|
||||
|
||||
for(int i=0 ; i<rows ; ++i)
|
||||
{
|
||||
thread.id = AssertValueLong(r, i, cid);
|
||||
thread.parent_id = AssertValueLong(r, i, cparent_id);
|
||||
thread.dir_id = AssertValueLong(r, i, cdir_id);
|
||||
thread.closed = AssertValueLong(r, i, cclosed) == 0 ? false : true;
|
||||
thread.items = AssertValueLong(r, i, citems);
|
||||
thread.last_item.id = AssertValueLong(r, i, clast_item);
|
||||
thread.last_item.date_modification = AssertValueTm(r, i, cdate_modification);
|
||||
thread.last_item.user_id = AssertValueLong(r, i, cuser_id);
|
||||
thread.last_item.guest_name = AssertValueWide(r, i, cguest_name);
|
||||
|
||||
thread_tab.push_back(thread);
|
||||
}
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
status = e;
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Error Db::AddThread(Thread & thread)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R("insert into core.thread (parent_id, dir_id, closed, items, last_item) values (")
|
||||
<< thread.parent_id
|
||||
<< thread.dir_id
|
||||
<< (thread.closed ? 1 : 0 )
|
||||
<< thread.items
|
||||
<< thread.last_item.id
|
||||
<< R(");");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_COMMAND_OK);
|
||||
|
||||
thread.id = AssertCurrval("core.thread_id_seq");
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
status = e;
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Error Db::EditThreadAddItem(long dir_id, long item_id)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R("update core.thread set (last_item, items) = (")
|
||||
<< item_id
|
||||
<< R(", items+1) where dir_id=")
|
||||
<< dir_id
|
||||
<< R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_COMMAND_OK);
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
status = e;
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Error Db::EditThreadRemoveItem(long dir_id)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
|
||||
try
|
||||
{
|
||||
long last_item_id = -1;
|
||||
|
||||
query.Clear();
|
||||
query << R("select id from core.item where parent_id=")
|
||||
<< dir_id
|
||||
<< R(" order by date_creation desc limit 1;");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_TUPLES_OK);
|
||||
|
||||
if( Rows(r) == 1 )
|
||||
last_item_id = AssertValueLong(r, 0, 0);
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
query.Clear();
|
||||
query << R("update core.thread set (items, last_item) = (items-1,")
|
||||
<< last_item_id
|
||||
<< R(") where dir_id=")
|
||||
<< dir_id
|
||||
<< R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_COMMAND_OK);
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
status = e;
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Error Db::RemoveThread(long dir_id)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R("delete from core.thread where dir_id=") << dir_id << R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_COMMAND_OK);
|
||||
|
||||
long rows = AffectedRows(r);
|
||||
|
||||
if( rows > 0 )
|
||||
log << log2 << "Db: deleted " << rows << " rows from core.thread" << logend;
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
status = e;
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
47
plugins/thread/tdb.h
Executable file
47
plugins/thread/tdb.h
Executable file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_plugins_thread_tdb
|
||||
#define headerfile_winix_plugins_thread_tdb
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include "ticket.h"
|
||||
#include "db/dbbase.h"
|
||||
#include "core/error.h"
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
|
||||
class TDb : public DbBase
|
||||
{
|
||||
public:
|
||||
|
||||
Error AddThread(Thread & thread);
|
||||
Error GetThreadByDirId(long dir_id, Thread & thread);
|
||||
Error GetThreads(long parent_id, std::vector<Thread> & thread_tab);
|
||||
Error EditThreadAddItem(long dir_id, long item_id);
|
||||
Error EditThreadRemoveItem(long dir_id);
|
||||
Error RemoveThread(long dir_id);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
DbTextStream query;
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
36
plugins/thread/threadinfo.h
Executable file
36
plugins/thread/threadinfo.h
Executable file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_plugins_thread_threadinfo
|
||||
#define headerfile_winix_plugins_thread_threadinfo
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
|
||||
|
||||
// id of a mount type
|
||||
int mount_type_thread;
|
||||
|
||||
// enable a thread in a specific directory
|
||||
int mount_par_thread_enable;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user