diff --git a/winixd/Makefile.dep b/winixd/Makefile.dep index 0de8831..e6725c2 100644 --- a/winixd/Makefile.dep +++ b/winixd/Makefile.dep @@ -1 +1 @@ -winix.src.files = ./core/config.cpp ./core/config.h ./core/acceptencodingparser.h ./core/app.cpp ./core/app.h ./core/basethread.cpp ./core/basethread.h ./core/compress.cpp ./core/compress.h ./core/cookieparser.h ./core/crypt.cpp ./core/crypt.h ./core/cur.h ./core/dircontainer.cpp ./core/dircontainer.h ./core/dirs.cpp ./core/dirs.h ./core/error.h ./core/filelog.cpp ./core/filelog.h ./core/groups.cpp ./core/groups.h ./core/httpsimpleparser.cpp ./core/httpsimpleparser.h ./core/image.cpp ./core/image.h ./core/ipban.h ./core/ipbancontainer.cpp ./core/ipbancontainer.h ./core/job.cpp ./core/job.h ./core/lastcontainer.cpp ./core/lastcontainer.h ./core/loadavg.cpp ./core/loadavg.h ./core/lock.h ./core/lock.cpp ./core/log.cpp ./core/log.h ./core/logmanipulators.h ./core/misc.cpp ./core/misc.h ./core/mount.cpp ./core/mount.h ./core/mountparser.cpp ./core/mountparser.h ./core/mounts.cpp ./core/mounts.h ./core/plugin.cpp ./core/plugin.h ./core/plugindata.cpp ./core/plugindata.h ./core/pluginmsg.h ./core/postmultiparser.cpp ./core/postmultiparser.h ./core/postparser.h ./core/rebus.cpp ./core/rebus.h ./core/request.cpp ./core/request.h ./core/requesttypes.h ./core/run.cpp ./core/run.h ./core/session.cpp ./core/session.h ./core/sessioncontainer.cpp ./core/sessioncontainer.h ./core/sessionidmanager.cpp ./core/sessionidmanager.h ./core/sessionmanager.cpp ./core/sessionmanager.h ./core/sessionparser.cpp ./core/sessionparser.h ./core/slog.cpp ./core/slog.h ./core/synchro.cpp ./core/synchro.h ./core/system.cpp ./core/system.h ./core/textstream.h ./core/threadmanager.cpp ./core/timezone.h ./core/threadmanager.h ./core/timezone.cpp ./core/timezones.cpp ./core/timezones.h ./core/ugcontainer.h ./core/users.cpp ./core/users.h ./core/version.h ./core/winix_const.h ./core/winixbase.cpp ./core/winixbase.h ./core/winixrequest.cpp ./core/winixrequest.h ./core/winixsystem.cpp ./core/winixsystem.h ./core/winixmodeldeprecated.h ./core/winixmodeldeprecated.cpp ./core/header.h ./core/acceptparser.h ./db/db.cpp ./db/db.h ./db/dbbase.cpp ./db/dbbase.h ./db/dbconn.cpp ./db/dbconn.h ./db/dbtextstream.cpp ./db/dbtextstream.h ./functions/account.cpp ./functions/account.h ./functions/adduser.cpp ./functions/adduser.h ./functions/cat.cpp ./functions/cat.h ./functions/chmod.cpp ./functions/chmod.h ./functions/chown.cpp ./functions/chown.h ./functions/ckeditor.cpp ./functions/ckeditor.h ./functions/cp.cpp ./functions/cp.h ./functions/default.cpp ./functions/default.h ./functions/download.cpp ./functions/download.h ./functions/emacs.cpp ./functions/emacs.h ./functions/env.cpp ./functions/env.h ./functions/functionbase.cpp ./functions/functionbase.h ./functions/functionparser.cpp ./functions/functionparser.h ./functions/functions.cpp ./functions/functions.h ./functions/imgcrop.cpp ./functions/imgcrop.h ./functions/ipban.cpp ./functions/ipban.h ./functions/last.cpp ./functions/last.h ./functions/ln.cpp ./functions/ln.h ./functions/locale.cpp ./functions/locale.h ./functions/login.cpp ./functions/login.h ./functions/logout.cpp ./functions/logout.h ./functions/ls.cpp ./functions/ls.h ./functions/man.cpp ./functions/man.h ./functions/meta.cpp ./functions/meta.h ./functions/mkdir.cpp ./functions/mkdir.h ./functions/mount.cpp ./functions/mount.h ./functions/mv.cpp ./functions/mv.h ./functions/nicedit.cpp ./functions/nicedit.h ./functions/node.cpp ./functions/node.h ./functions/passwd.cpp ./functions/passwd.h ./functions/priv.cpp ./functions/priv.h ./functions/privchanger.cpp ./functions/privchanger.h ./functions/pw.cpp ./functions/pw.h ./functions/reload.cpp ./functions/reload.h ./functions/rm.cpp ./functions/rm.h ./functions/rmuser.cpp ./functions/rmuser.h ./functions/run.cpp ./functions/run.h ./functions/sort.cpp ./functions/sort.h ./functions/specialdefault.cpp ./functions/specialdefault.h ./functions/stat.cpp ./functions/stat.h ./functions/subject.cpp ./functions/subject.h ./functions/template.cpp ./functions/template.h ./functions/timezone.cpp ./functions/timezone.h ./functions/tinymce.cpp ./functions/tinymce.h ./functions/uname.cpp ./functions/uname.h ./functions/upload.cpp ./functions/upload.h ./functions/uptime.cpp ./functions/uptime.h ./functions/vim.cpp ./functions/vim.h ./functions/who.cpp ./functions/who.h ./main/main.cpp ./models/group.cpp ./models/group.h ./models/item.cpp ./models/item.h ./models/itemcontent.cpp ./models/itemcontent.h ./models/migration.cpp ./models/migration.h ./models/user.cpp ./models/user.h ./models/winixmodel.h ./models/winixmodelconnector.h ./models/winixmodel.cpp ./models/winixmodelconnector.cpp ./models/userwrapper.h ./notify/notify.cpp ./notify/notify.h ./notify/notifypool.cpp ./notify/notifypool.h ./notify/notifythread.cpp ./notify/notifythread.h ./notify/templatesnotify.cpp ./notify/templatesnotify.h ./plugins/export/edb.cpp ./plugins/export/edb.h ./plugins/export/export.h ./plugins/export/exportinfo.cpp ./plugins/export/exportinfo.h ./plugins/export/exportthread.cpp ./plugins/export/exportthread.h ./plugins/export/funexport.cpp ./plugins/export/funexport.h ./plugins/export/init.cpp ./plugins/export/message.h ./plugins/gallery/gallery.cpp ./plugins/gallery/gallery.h ./plugins/gallery/galleryinfo.cpp ./plugins/gallery/galleryinfo.h ./plugins/gallery/init.cpp ./plugins/gallery/templates.cpp ./plugins/group/groupinfo.cpp ./plugins/group/groupinfo.h ./plugins/group/groups.cpp ./plugins/group/groups.h ./plugins/group/init.cpp ./plugins/group/templates.cpp ./plugins/mailregister/funregistermail.cpp ./plugins/mailregister/funregistermail.h ./plugins/mailregister/funregistermail_showusers.cpp ./plugins/mailregister/funregistermail_showusers.h ./plugins/mailregister/init.cpp ./plugins/mailregister/mdb.cpp ./plugins/mailregister/mdb.h ./plugins/mailregister/registermail_info.cpp ./plugins/mailregister/registermail_info.h ./plugins/mailregister/templates.cpp ./plugins/menu/cache.cpp ./plugins/menu/cache.h ./plugins/menu/init.cpp ./plugins/menu/templates.cpp ./plugins/seo/init.cpp ./plugins/seo/seo.cpp ./plugins/seo/seo.h ./plugins/stats/bot.cpp ./plugins/stats/bot.h ./plugins/stats/init.cpp ./plugins/stats/stats.cpp ./plugins/stats/stats.h ./plugins/stats/statssession.h ./plugins/stats/templates.cpp ./plugins/stats/templates.h ./plugins/thread/createthread.cpp ./plugins/thread/createthread.h ./plugins/thread/funthread.cpp ./plugins/thread/funthread.h ./plugins/thread/init.cpp ./plugins/thread/pluginmsg.h ./plugins/thread/reply.cpp ./plugins/thread/reply.h ./plugins/thread/showthreads.cpp ./plugins/thread/showthreads.h ./plugins/thread/tdb.cpp ./plugins/thread/tdb.h ./plugins/thread/templates.cpp ./plugins/thread/templates.h ./plugins/thread/thread.cpp ./plugins/thread/thread.h ./plugins/thread/threadfiles.cpp ./plugins/thread/threadfiles.h ./plugins/thread/threadinfo.cpp ./plugins/thread/threadinfo.h ./plugins/ticket/createticket.cpp ./plugins/ticket/createticket.h ./plugins/ticket/editticket.cpp ./plugins/ticket/editticket.h ./plugins/ticket/funticket.cpp ./plugins/ticket/funticket.h ./plugins/ticket/init.cpp ./plugins/ticket/pluginmsg.h ./plugins/ticket/sessiondata.cpp ./plugins/ticket/sessiondata.h ./plugins/ticket/showtickets.cpp ./plugins/ticket/showtickets.h ./plugins/ticket/tdb.cpp ./plugins/ticket/tdb.h ./plugins/ticket/templates.cpp ./plugins/ticket/ticket.h ./plugins/ticket/ticketinfo.cpp ./plugins/ticket/ticketinfo.h ./templates/adduser.cpp ./templates/antispam.cpp ./templates/changepatterns.cpp ./templates/changepatterns.h ./templates/config.cpp ./templates/currentdate.cpp ./templates/dir.cpp ./templates/doc.cpp ./templates/misc.h ./templates/filters.cpp ./templates/generic.cpp ./templates/htmltextstream.cpp ./templates/htmltextstream.h ./templates/indexpatterns.cpp ./templates/indexpatterns.h ./templates/insert.cpp ./templates/ipban.cpp ./templates/locale.cpp ./templates/last.cpp ./templates/priv.cpp ./templates/locale.h ./templates/localefilter.cpp ./templates/localefilter.h ./templates/login.cpp ./templates/ls.cpp ./templates/man.cpp ./templates/misc.cpp ./templates/templates.cpp ./templates/templates.h ./templates/who.cpp ./templates/mount.cpp ./templates/passwd.cpp ./templates/patterncacher.cpp ./templates/patterncacher.h ./templates/patterns.cpp ./templates/patterns.h ./templates/user.cpp ./templates/rebus.cpp ./templates/server.cpp ./templates/slog.cpp ./templates/stat.cpp ./templates/sys.cpp ./templates/template.cpp ./templates/winix.cpp ./templates/textextstream.cpp ./templates/textextstream.h ./templates/upload.cpp ./templates/uptime.cpp ./utils/acceptbaseparser.h ./utils/acceptbaseparser.cpp ../../ezc/src/blocks.cpp ../../ezc/src/blocks.h ../../ezc/src/cache.cpp ../../ezc/src/cache.h ../../ezc/src/expressionparser.h ../../ezc/src/ezc.h ../../ezc/src/functions.h ../../ezc/src/generator.h ../../ezc/src/item.cpp ../../ezc/src/item.h ../../ezc/src/objects.h ../../ezc/src/pattern.cpp ../../ezc/src/outstreams.h ../../ezc/src/funinfo.h ../../ezc/src/pattern.h ../../ezc/src/patternparser.cpp ../../ezc/src/patternparser.h ../../ezc/src/models.cpp ../../ezc/src/models.h ../../tito/src/aes.cpp ../../tito/src/aes.h ../../tito/src/base32.cpp ../../tito/src/base32.h ../../tito/src/base64.cpp ../../tito/src/base64.h ../../tito/src/crypto.cpp ../../tito/src/crypto.h ../../tito/src/misc.cpp ../../tito/src/misc.h ../../pikotools/src/convert/convert.h ../../pikotools/src/convert/inttostr.cpp ../../pikotools/src/convert/inttostr.h ../../pikotools/src/convert/misc.cpp ../../pikotools/src/convert/misc.h ../../pikotools/src/convert/patternreplacer.h ../../pikotools/src/convert/strtoint.h ../../pikotools/src/convert/text.cpp ../../pikotools/src/convert/text.h ../../pikotools/src/convert/text_private.h ../../pikotools/src/convert/double.h ../../pikotools/src/convert/double.cpp ../../pikotools/src/convert/baseparser.cpp ../../pikotools/src/convert/baseparser.h ../../pikotools/src/date/date.cpp ../../pikotools/src/date/date.h ../../pikotools/src/log/filelog.cpp ../../pikotools/src/log/filelog.h ../../pikotools/src/log/log.cpp ../../pikotools/src/log/log.h ../../pikotools/src/membuffer/membuffer.h ../../pikotools/src/space/space.cpp ../../pikotools/src/space/space.h ../../pikotools/src/space/spaceparser.cpp ../../pikotools/src/space/spaceparser.h ../../pikotools/src/textstream/textstream.h ../../pikotools/src/textstream/types.h ../../pikotools/src/textstream/stream.h ../../pikotools/src/utf8/utf8.cpp ../../pikotools/src/utf8/utf8.h ../../pikotools/src/utf8/utf8_private.cpp ../../pikotools/src/utf8/utf8_private.h ../../pikotools/src/utf8/utf8_templates.h ../../pikotools/src/utf8/utf8_stream.h ../../pikotools/src/html/bbcodeparser.cpp ../../pikotools/src/html/bbcodeparser.h ../../pikotools/src/html/htmlparser.cpp ../../pikotools/src/html/htmlparser.h ../../pikotools/src/csv/csvparser.cpp ../../pikotools/src/csv/csvparser.h ../../pikotools/src/mainoptions/mainoptionsparser.cpp ../../pikotools/src/mainoptions/mainoptionsparser.h ../../morm/src/outstream.h ../../morm/src/baseexpression.cpp ../../morm/src/baseexpression.h ../../morm/src/clearer.cpp ../../morm/src/clearer.h ../../morm/src/cursor.h ../../morm/src/cursorhelper.h ../../morm/src/dbconnector.cpp ../../morm/src/dbconnector.h ../../morm/src/dbexpression.cpp ../../morm/src/dbexpression.h ../../morm/src/fieldvaluehelper.h ../../morm/src/finder.h ../../morm/src/finderhelper.h ../../morm/src/flatconnector.cpp ../../morm/src/flatconnector.h ../../morm/src/flatexpression.cpp ../../morm/src/flatexpression.h ../../morm/src/jsonconnector.cpp ../../morm/src/jsonconnector.h ../../morm/src/jsonexpression.cpp ../../morm/src/jsonexpression.h ../../morm/src/model.cpp ../../morm/src/model.h ../../morm/src/modelconnector.cpp ../../morm/src/modelconnector.h ../../morm/src/modeldata.h ../../morm/src/modelenv.h ../../morm/src/morm.h ../../morm/src/morm_types.h ../../morm/src/postgresqlconnector.cpp ../../morm/src/postgresqlconnector.h ../../morm/src/postgresqlexpression.cpp ../../morm/src/postgresqlexpression.h ../../morm/src/postgresqlqueryresult.cpp ../../morm/src/postgresqlqueryresult.h ../../morm/src/queryresult.cpp ../../morm/src/queryresult.h ../../morm/src/ft.h ../../morm/src/baseobjectwrapper.h ../../morm/src/modelcontainerwrapper.h ../../morm/src/spacewrapper.h ../../morm/src/wrapper.h \ No newline at end of file +winix.src.files = ./core/config.cpp ./core/config.h ./core/acceptencodingparser.h ./core/app.cpp ./core/app.h ./core/basethread.cpp ./core/basethread.h ./core/compress.cpp ./core/compress.h ./core/cookieparser.h ./core/crypt.cpp ./core/crypt.h ./core/cur.h ./core/dircontainer.cpp ./core/dircontainer.h ./core/dirs.cpp ./core/dirs.h ./core/error.h ./core/filelog.cpp ./core/filelog.h ./core/groups.cpp ./core/groups.h ./core/httpsimpleparser.cpp ./core/httpsimpleparser.h ./core/image.cpp ./core/image.h ./core/ipban.h ./core/ipbancontainer.cpp ./core/ipbancontainer.h ./core/job.cpp ./core/job.h ./core/lastcontainer.cpp ./core/lastcontainer.h ./core/loadavg.cpp ./core/loadavg.h ./core/lock.h ./core/lock.cpp ./core/log.cpp ./core/log.h ./core/logmanipulators.h ./core/misc.cpp ./core/misc.h ./core/mount.cpp ./core/mount.h ./core/mountparser.cpp ./core/mountparser.h ./core/mounts.cpp ./core/mounts.h ./core/plugin.cpp ./core/plugin.h ./core/plugindata.cpp ./core/plugindata.h ./core/pluginmsg.h ./core/postmultiparser.cpp ./core/postmultiparser.h ./core/postparser.h ./core/rebus.cpp ./core/rebus.h ./core/request.cpp ./core/request.h ./core/requesttypes.h ./core/run.cpp ./core/run.h ./core/session.cpp ./core/session.h ./core/sessioncontainer.cpp ./core/sessioncontainer.h ./core/sessionidmanager.cpp ./core/sessionidmanager.h ./core/sessionmanager.cpp ./core/sessionmanager.h ./core/sessionparser.cpp ./core/sessionparser.h ./core/slog.cpp ./core/slog.h ./core/synchro.cpp ./core/synchro.h ./core/system.cpp ./core/system.h ./core/textstream.h ./core/threadmanager.cpp ./core/timezone.h ./core/threadmanager.h ./core/timezone.cpp ./core/timezones.cpp ./core/timezones.h ./core/ugcontainer.h ./core/users.cpp ./core/users.h ./core/version.h ./core/winix_const.h ./core/winixbase.cpp ./core/winixbase.h ./core/winixrequest.cpp ./core/winixrequest.h ./core/winixsystem.cpp ./core/winixsystem.h ./core/winixmodeldeprecated.h ./core/winixmodeldeprecated.cpp ./core/header.h ./db/db.cpp ./db/db.h ./db/dbbase.cpp ./db/dbbase.h ./db/dbconn.cpp ./db/dbconn.h ./db/dbtextstream.cpp ./db/dbtextstream.h ./functions/account.cpp ./functions/account.h ./functions/adduser.cpp ./functions/adduser.h ./functions/cat.cpp ./functions/cat.h ./functions/chmod.cpp ./functions/chmod.h ./functions/chown.cpp ./functions/chown.h ./functions/ckeditor.cpp ./functions/ckeditor.h ./functions/cp.cpp ./functions/cp.h ./functions/default.cpp ./functions/default.h ./functions/download.cpp ./functions/download.h ./functions/emacs.cpp ./functions/emacs.h ./functions/env.cpp ./functions/env.h ./functions/functionbase.cpp ./functions/functionbase.h ./functions/functionparser.cpp ./functions/functionparser.h ./functions/functions.cpp ./functions/functions.h ./functions/imgcrop.cpp ./functions/imgcrop.h ./functions/ipban.cpp ./functions/ipban.h ./functions/last.cpp ./functions/last.h ./functions/ln.cpp ./functions/ln.h ./functions/locale.cpp ./functions/locale.h ./functions/login.cpp ./functions/login.h ./functions/logout.cpp ./functions/logout.h ./functions/ls.cpp ./functions/ls.h ./functions/man.cpp ./functions/man.h ./functions/meta.cpp ./functions/meta.h ./functions/mkdir.cpp ./functions/mkdir.h ./functions/mount.cpp ./functions/mount.h ./functions/mv.cpp ./functions/mv.h ./functions/nicedit.cpp ./functions/nicedit.h ./functions/node.cpp ./functions/node.h ./functions/passwd.cpp ./functions/passwd.h ./functions/priv.cpp ./functions/priv.h ./functions/privchanger.cpp ./functions/privchanger.h ./functions/pw.cpp ./functions/pw.h ./functions/reload.cpp ./functions/reload.h ./functions/rm.cpp ./functions/rm.h ./functions/rmuser.cpp ./functions/rmuser.h ./functions/run.cpp ./functions/run.h ./functions/sort.cpp ./functions/sort.h ./functions/specialdefault.cpp ./functions/specialdefault.h ./functions/stat.cpp ./functions/stat.h ./functions/subject.cpp ./functions/subject.h ./functions/template.cpp ./functions/template.h ./functions/timezone.cpp ./functions/timezone.h ./functions/tinymce.cpp ./functions/tinymce.h ./functions/uname.cpp ./functions/uname.h ./functions/upload.cpp ./functions/upload.h ./functions/uptime.cpp ./functions/uptime.h ./functions/vim.cpp ./functions/vim.h ./functions/who.cpp ./functions/who.h ./main/main.cpp ./models/group.cpp ./models/group.h ./models/item.cpp ./models/item.h ./models/itemcontent.cpp ./models/itemcontent.h ./models/migration.cpp ./models/migration.h ./models/user.cpp ./models/user.h ./models/winixmodel.h ./models/winixmodelconnector.h ./models/winixmodel.cpp ./models/winixmodelconnector.cpp ./models/userwrapper.h ./notify/notify.cpp ./notify/notify.h ./notify/notifypool.cpp ./notify/notifypool.h ./notify/notifythread.cpp ./notify/notifythread.h ./notify/templatesnotify.cpp ./notify/templatesnotify.h ./plugins/export/edb.cpp ./plugins/export/edb.h ./plugins/export/export.h ./plugins/export/exportinfo.cpp ./plugins/export/exportinfo.h ./plugins/export/exportthread.cpp ./plugins/export/exportthread.h ./plugins/export/funexport.cpp ./plugins/export/funexport.h ./plugins/export/init.cpp ./plugins/export/message.h ./plugins/gallery/gallery.cpp ./plugins/gallery/gallery.h ./plugins/gallery/galleryinfo.cpp ./plugins/gallery/galleryinfo.h ./plugins/gallery/init.cpp ./plugins/gallery/templates.cpp ./plugins/group/groupinfo.cpp ./plugins/group/groupinfo.h ./plugins/group/groups.cpp ./plugins/group/groups.h ./plugins/group/init.cpp ./plugins/group/templates.cpp ./plugins/mailregister/funregistermail.cpp ./plugins/mailregister/funregistermail.h ./plugins/mailregister/funregistermail_showusers.cpp ./plugins/mailregister/funregistermail_showusers.h ./plugins/mailregister/init.cpp ./plugins/mailregister/mdb.cpp ./plugins/mailregister/mdb.h ./plugins/mailregister/registermail_info.cpp ./plugins/mailregister/registermail_info.h ./plugins/mailregister/templates.cpp ./plugins/menu/cache.cpp ./plugins/menu/cache.h ./plugins/menu/init.cpp ./plugins/menu/templates.cpp ./plugins/seo/init.cpp ./plugins/seo/seo.cpp ./plugins/seo/seo.h ./plugins/stats/bot.cpp ./plugins/stats/bot.h ./plugins/stats/init.cpp ./plugins/stats/stats.cpp ./plugins/stats/stats.h ./plugins/stats/statssession.h ./plugins/stats/templates.cpp ./plugins/stats/templates.h ./plugins/thread/createthread.cpp ./plugins/thread/createthread.h ./plugins/thread/funthread.cpp ./plugins/thread/funthread.h ./plugins/thread/init.cpp ./plugins/thread/pluginmsg.h ./plugins/thread/reply.cpp ./plugins/thread/reply.h ./plugins/thread/showthreads.cpp ./plugins/thread/showthreads.h ./plugins/thread/tdb.cpp ./plugins/thread/tdb.h ./plugins/thread/templates.cpp ./plugins/thread/templates.h ./plugins/thread/thread.cpp ./plugins/thread/thread.h ./plugins/thread/threadfiles.cpp ./plugins/thread/threadfiles.h ./plugins/thread/threadinfo.cpp ./plugins/thread/threadinfo.h ./plugins/ticket/createticket.cpp ./plugins/ticket/createticket.h ./plugins/ticket/editticket.cpp ./plugins/ticket/editticket.h ./plugins/ticket/funticket.cpp ./plugins/ticket/funticket.h ./plugins/ticket/init.cpp ./plugins/ticket/pluginmsg.h ./plugins/ticket/sessiondata.cpp ./plugins/ticket/sessiondata.h ./plugins/ticket/showtickets.cpp ./plugins/ticket/showtickets.h ./plugins/ticket/tdb.cpp ./plugins/ticket/tdb.h ./plugins/ticket/templates.cpp ./plugins/ticket/ticket.h ./plugins/ticket/ticketinfo.cpp ./plugins/ticket/ticketinfo.h ./templates/adduser.cpp ./templates/antispam.cpp ./templates/changepatterns.cpp ./templates/changepatterns.h ./templates/config.cpp ./templates/currentdate.cpp ./templates/dir.cpp ./templates/doc.cpp ./templates/misc.h ./templates/filters.cpp ./templates/generic.cpp ./templates/htmltextstream.cpp ./templates/htmltextstream.h ./templates/indexpatterns.cpp ./templates/indexpatterns.h ./templates/insert.cpp ./templates/ipban.cpp ./templates/locale.cpp ./templates/last.cpp ./templates/priv.cpp ./templates/locale.h ./templates/localefilter.cpp ./templates/localefilter.h ./templates/login.cpp ./templates/ls.cpp ./templates/man.cpp ./templates/misc.cpp ./templates/templates.cpp ./templates/templates.h ./templates/who.cpp ./templates/mount.cpp ./templates/passwd.cpp ./templates/patterncacher.cpp ./templates/patterncacher.h ./templates/patterns.cpp ./templates/patterns.h ./templates/user.cpp ./templates/rebus.cpp ./templates/server.cpp ./templates/slog.cpp ./templates/stat.cpp ./templates/sys.cpp ./templates/template.cpp ./templates/winix.cpp ./templates/textextstream.cpp ./templates/textextstream.h ./templates/upload.cpp ./templates/uptime.cpp ./utils/acceptbaseparser.h ./utils/acceptbaseparser.cpp ../../ezc/src/blocks.cpp ../../ezc/src/blocks.h ../../ezc/src/cache.cpp ../../ezc/src/cache.h ../../ezc/src/expressionparser.h ../../ezc/src/ezc.h ../../ezc/src/functions.h ../../ezc/src/generator.h ../../ezc/src/item.cpp ../../ezc/src/item.h ../../ezc/src/objects.h ../../ezc/src/pattern.cpp ../../ezc/src/outstreams.h ../../ezc/src/funinfo.h ../../ezc/src/pattern.h ../../ezc/src/patternparser.cpp ../../ezc/src/patternparser.h ../../ezc/src/models.cpp ../../ezc/src/models.h ../../tito/src/aes.cpp ../../tito/src/aes.h ../../tito/src/base32.cpp ../../tito/src/base32.h ../../tito/src/base64.cpp ../../tito/src/base64.h ../../tito/src/crypto.cpp ../../tito/src/crypto.h ../../tito/src/misc.cpp ../../tito/src/misc.h ../../pikotools/src/convert/convert.h ../../pikotools/src/convert/inttostr.cpp ../../pikotools/src/convert/inttostr.h ../../pikotools/src/convert/misc.cpp ../../pikotools/src/convert/misc.h ../../pikotools/src/convert/patternreplacer.h ../../pikotools/src/convert/strtoint.h ../../pikotools/src/convert/text.cpp ../../pikotools/src/convert/text.h ../../pikotools/src/convert/text_private.h ../../pikotools/src/convert/double.h ../../pikotools/src/convert/double.cpp ../../pikotools/src/convert/baseparser.cpp ../../pikotools/src/convert/baseparser.h ../../pikotools/src/date/date.cpp ../../pikotools/src/date/date.h ../../pikotools/src/log/filelog.cpp ../../pikotools/src/log/filelog.h ../../pikotools/src/log/log.cpp ../../pikotools/src/log/log.h ../../pikotools/src/membuffer/membuffer.h ../../pikotools/src/space/space.cpp ../../pikotools/src/space/space.h ../../pikotools/src/space/spaceparser.cpp ../../pikotools/src/space/spaceparser.h ../../pikotools/src/textstream/textstream.h ../../pikotools/src/textstream/types.h ../../pikotools/src/textstream/stream.h ../../pikotools/src/utf8/utf8.cpp ../../pikotools/src/utf8/utf8.h ../../pikotools/src/utf8/utf8_private.cpp ../../pikotools/src/utf8/utf8_private.h ../../pikotools/src/utf8/utf8_templates.h ../../pikotools/src/utf8/utf8_stream.h ../../pikotools/src/html/bbcodeparser.cpp ../../pikotools/src/html/bbcodeparser.h ../../pikotools/src/html/htmlparser.cpp ../../pikotools/src/html/htmlparser.h ../../pikotools/src/csv/csvparser.cpp ../../pikotools/src/csv/csvparser.h ../../pikotools/src/mainoptions/mainoptionsparser.cpp ../../pikotools/src/mainoptions/mainoptionsparser.h ../../morm/src/outstream.h ../../morm/src/baseexpression.cpp ../../morm/src/baseexpression.h ../../morm/src/clearer.cpp ../../morm/src/clearer.h ../../morm/src/cursor.h ../../morm/src/cursorhelper.h ../../morm/src/dbconnector.cpp ../../morm/src/dbconnector.h ../../morm/src/dbexpression.cpp ../../morm/src/dbexpression.h ../../morm/src/fieldvaluehelper.h ../../morm/src/finder.h ../../morm/src/finderhelper.h ../../morm/src/flatconnector.cpp ../../morm/src/flatconnector.h ../../morm/src/flatexpression.cpp ../../morm/src/flatexpression.h ../../morm/src/jsonconnector.cpp ../../morm/src/jsonconnector.h ../../morm/src/jsonexpression.cpp ../../morm/src/jsonexpression.h ../../morm/src/model.cpp ../../morm/src/model.h ../../morm/src/modelconnector.cpp ../../morm/src/modelconnector.h ../../morm/src/modeldata.h ../../morm/src/modelenv.h ../../morm/src/morm.h ../../morm/src/morm_types.h ../../morm/src/postgresqlconnector.cpp ../../morm/src/postgresqlconnector.h ../../morm/src/postgresqlexpression.cpp ../../morm/src/postgresqlexpression.h ../../morm/src/postgresqlqueryresult.cpp ../../morm/src/postgresqlqueryresult.h ../../morm/src/queryresult.cpp ../../morm/src/queryresult.h ../../morm/src/ft.h ../../morm/src/baseobjectwrapper.h ../../morm/src/modelcontainerwrapper.h ../../morm/src/spacewrapper.h ../../morm/src/wrapper.h \ No newline at end of file diff --git a/winixd/core/Makefile.dep b/winixd/core/Makefile.dep index 9502593..f3b3aae 100644 --- a/winixd/core/Makefile.dep +++ b/winixd/core/Makefile.dep @@ -145,7 +145,8 @@ app.o: ../../../winix/winixd/templates/indexpatterns.h app.o: ../../../winix/winixd/templates/patterns.h app.o: ../../../winix/winixd/templates/changepatterns.h compress.h app.o: postparser.h httpsimpleparser.h cookieparser.h postmultiparser.h -app.o: acceptencodingparser.h acceptparser.h winixrequest.h +app.o: acceptencodingparser.h ../../../winix/winixd/utils/acceptbaseparser.h +app.o: ../../../winix/winixd/core/header.h winixrequest.h app.o: ../../../winix/winixd/models/migration.h basethread.o: basethread.h synchro.h winixmodeldeprecated.h basethread.o: ../../../winix/winixd/core/winixbase.h diff --git a/winixd/core/acceptencodingparser.h b/winixd/core/acceptencodingparser.h index 35668aa..02feba2 100644 --- a/winixd/core/acceptencodingparser.h +++ b/winixd/core/acceptencodingparser.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2008-2014, Tomasz Sowa + * Copyright (c) 2008-2022, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,7 +60,7 @@ public: } - void ParseAndLog(const wchar_t * str) + void ParseAndLog(const wchar_t * str, Log & log) { parse(str); @@ -84,9 +84,9 @@ public: } - void ParseAndLog(const std::wstring & str) + void ParseAndLog(const std::wstring & str, Log & log) { - ParseAndLog(str.c_str()); + ParseAndLog(str.c_str(), log); } @@ -99,7 +99,7 @@ private: } - void Param(const std::wstring & param, double q) + void parsed_name_q(const std::wstring & param, double q) { if( param == L"deflate" && q!=0.0 ) { diff --git a/winixd/core/acceptparser.h b/winixd/core/acceptparser.h deleted file mode 100644 index a3f6979..0000000 --- a/winixd/core/acceptparser.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * This file is a part of Winix - * and is distributed under the 2-Clause BSD licence. - * Author: Tomasz Sowa - */ - -/* - * Copyright (c) 2022, Tomasz Sowa - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef headerfile_winix_core_acceptparser -#define headerfile_winix_core_acceptparser - -#include "utils/acceptbaseparser.h" -#include "log.h" -#include "header.h" - - -namespace Winix -{ - - - -class AcceptParser : public AcceptBaseParser -{ -public: - - static constexpr size_t MAX_CONTAINER_LENGTH = 16; - - /* - * IMPROVEME add support for something like "text/html;level=1" (skip the level part) - * - * https://developer.mozilla.org/en-US/docs/Glossary/Quality_values - * Some syntax, like the one of Accept, allow additional specifiers like text/html;level=1. - * These increase the specificity of the value. Their use is extremely rare. - * - * - */ - - void Parse(const wchar_t * str, std::vector & header_values, bool clear_header_values = true) - { - if( clear_header_values ) - header_values.clear(); - - this->header_values = &header_values; - AcceptBaseParser::parse(str); - - std::sort(header_values.begin(), header_values.end(), [](HeaderValue & h1, HeaderValue & h2) -> bool { - return h1.weight > h2.weight; - }); - - PutToLog(header_values); - } - - - void Parse(const std::wstring & str, std::vector & header_values, bool clear_header_values = true) - { - Parse(str.c_str(), header_values, clear_header_values); - } - - -private: - - std::vector * header_values; - - void Param(const std::wstring & param, double q) - { - if( header_values->size() < MAX_CONTAINER_LENGTH && q > 0.0 ) - { - if( q > 1.0 ) - q = 1.0; - - header_values->resize(header_values->size() + 1); - header_values->back().value = param; - header_values->back().weight = q; - } - } - - void PutToLog(std::vector & header_values) - { - if( !header_values.empty() ) - { - log << log3 << "AP: " << Header::accept << " header consists of: "; - HeaderValue::log_values(header_values, log); - log << logend; - } - else - { - log << log3 << "AP: there is no " << Header::accept << " header" << logend; - } - } - -}; - - - -} // namespace Winix - - -#endif diff --git a/winixd/core/app.cpp b/winixd/core/app.cpp index 756715e..adef8b3 100644 --- a/winixd/core/app.cpp +++ b/winixd/core/app.cpp @@ -385,9 +385,6 @@ bool App::Init() cookie_parser.set_dependency(&winix_model); - accept_encoding_parser.set_dependency(&winix_base); - accept_parser.set_dependency(&winix_base); - plugin.Call((Session*)0, WINIX_PLUGIN_INIT); return true; @@ -935,6 +932,23 @@ void App::LogEnvironmentHTTPVariables() } +void App::ParseAcceptHeader() +{ + accept_base_parser.parse(cur.request->env_http_accept, cur.request->accept_mime_types, 16); + + if( !cur.request->accept_mime_types.empty() ) + { + log << log3 << "App: " << Winix::Header::accept << " header consists of: "; + HeaderValue::log_values(cur.request->accept_mime_types, log); + log << logend; + } + else + { + log << log3 << "App: there is no " << Winix::Header::accept << " header" << logend; + } +} + + /* * reading the request (without GET parameters in the URL) @@ -952,16 +966,16 @@ void App::ReadRequest() ReadPostVars(); - cookie_parser.Parse(cur.request->env_http_cookie, cur.request->cookie_tab); - accept_encoding_parser.ParseAndLog(cur.request->env_http_accept_encoding); - accept_parser.Parse(cur.request->env_http_accept, cur.request->accept_mime_types); - if( config.log_env_variables ) LogEnvironmentVariables(); if( config.log_env_http_variables ) LogEnvironmentHTTPVariables(); + ParseAcceptHeader(); + accept_encoding_parser.ParseAndLog(cur.request->env_http_accept_encoding, log); + cookie_parser.Parse(cur.request->env_http_cookie, cur.request->cookie_tab); + CheckIE(); CheckKonqueror(); CheckHtmx(); diff --git a/winixd/core/app.h b/winixd/core/app.h index 98e4691..e67d638 100644 --- a/winixd/core/app.h +++ b/winixd/core/app.h @@ -140,8 +140,8 @@ private: std::string post_buffer; CookieParser cookie_parser; + AcceptBaseParser accept_base_parser; AcceptEncodingParser accept_encoding_parser; - AcceptParser accept_parser; Compress compress; FCGX_Request fcgi_request; int fcgi_socket; @@ -240,6 +240,7 @@ private: void LogEnvironmentVariables(); void LogEnvironmentHTTPVariables(); + void ParseAcceptHeader(); void SetEnv(const char * name, std::wstring & env); void ReadEnvVariables(); diff --git a/winixd/main/Makefile.dep b/winixd/main/Makefile.dep index d5a6b33..e40f64e 100644 --- a/winixd/main/Makefile.dep +++ b/winixd/main/Makefile.dep @@ -183,6 +183,7 @@ main.o: ../../../winix/winixd/core/httpsimpleparser.h main.o: ../../../winix/winixd/core/cookieparser.h main.o: ../../../winix/winixd/core/postmultiparser.h main.o: ../../../winix/winixd/core/acceptencodingparser.h -main.o: ../../../winix/winixd/core/acceptparser.h +main.o: ../../../winix/winixd/utils/acceptbaseparser.h +main.o: ../../../winix/winixd/core/header.h main.o: ../../../winix/winixd/core/winixrequest.h main.o: ../../../winix/winixd/core/version.h diff --git a/winixd/utils/Makefile.dep b/winixd/utils/Makefile.dep index f87720b..3b93daa 100644 --- a/winixd/utils/Makefile.dep +++ b/winixd/utils/Makefile.dep @@ -1,3 +1,53 @@ # DO NOT DELETE -acceptbaseparser.o: acceptbaseparser.h ../../../tito/src/misc.h +acceptbaseparser.o: acceptbaseparser.h ../../../winix/winixd/core/header.h +acceptbaseparser.o: ../../../winix/winixd/core/log.h +acceptbaseparser.o: ../../../winix/winixd/core/logmanipulators.h +acceptbaseparser.o: ../../../pikotools/src/log/log.h +acceptbaseparser.o: ../../../pikotools/src/textstream/textstream.h +acceptbaseparser.o: ../../../pikotools/src/textstream/stream.h +acceptbaseparser.o: ../../../pikotools/src/space/space.h +acceptbaseparser.o: ../../../pikotools/src/textstream/types.h +acceptbaseparser.o: ../../../pikotools/src/convert/inttostr.h +acceptbaseparser.o: ../../../pikotools/src/utf8/utf8.h +acceptbaseparser.o: ../../../pikotools/src/textstream/stream.h +acceptbaseparser.o: ../../../pikotools/src/utf8/utf8_templates.h +acceptbaseparser.o: ../../../pikotools/src/utf8/utf8_private.h +acceptbaseparser.o: ../../../pikotools/src/date/date.h +acceptbaseparser.o: ../../../pikotools/src/membuffer/membuffer.h +acceptbaseparser.o: ../../../pikotools/src/textstream/types.h +acceptbaseparser.o: ../../../pikotools/src/log/filelog.h +acceptbaseparser.o: ../../../morm/src/morm.h ../../../morm/src/morm_types.h +acceptbaseparser.o: ../../../morm/src/model.h +acceptbaseparser.o: ../../../morm/src/modelconnector.h +acceptbaseparser.o: ../../../morm/src/clearer.h +acceptbaseparser.o: ../../../morm/src/dbconnector.h +acceptbaseparser.o: ../../../morm/src/queryresult.h ../../../morm/src/ft.h +acceptbaseparser.o: ../../../morm/src/flatconnector.h +acceptbaseparser.o: ../../../morm/src/dbexpression.h +acceptbaseparser.o: ../../../morm/src/baseexpression.h +acceptbaseparser.o: ../../../morm/src/modelenv.h +acceptbaseparser.o: ../../../morm/src/modeldata.h +acceptbaseparser.o: ../../../morm/src/cursorhelper.h +acceptbaseparser.o: ../../../morm/src/finderhelper.h +acceptbaseparser.o: ../../../morm/src/fieldvaluehelper.h +acceptbaseparser.o: ../../../morm/src/wrapper.h +acceptbaseparser.o: ../../../morm/src/spacewrapper.h +acceptbaseparser.o: ../../../morm/src/baseobjectwrapper.h +acceptbaseparser.o: ../../../morm/src/modelcontainerwrapper.h +acceptbaseparser.o: ../../../pikotools/src/convert/text.h +acceptbaseparser.o: ../../../morm/src/flatexpression.h +acceptbaseparser.o: ../../../morm/src/finder.h ../../../morm/src/cursor.h +acceptbaseparser.o: ../../../morm/src/jsonexpression.h +acceptbaseparser.o: ../../../morm/src/postgresqlexpression.h +acceptbaseparser.o: ../../../morm/src/jsonconnector.h +acceptbaseparser.o: ../../../morm/src/postgresqlconnector.h +acceptbaseparser.o: ../../../morm/src/postgresqlqueryresult.h +acceptbaseparser.o: ../../../pikotools/src/convert/convert.h +acceptbaseparser.o: ../../../pikotools/src/convert/inttostr.h +acceptbaseparser.o: ../../../pikotools/src/convert/patternreplacer.h +acceptbaseparser.o: ../../../pikotools/src/convert/strtoint.h +acceptbaseparser.o: ../../../pikotools/src/convert/text.h +acceptbaseparser.o: ../../../pikotools/src/convert/misc.h +acceptbaseparser.o: ../../../pikotools/src/utf8/utf8_stream.h +acceptbaseparser.o: ../../../pikotools/src/convert/double.h diff --git a/winixd/utils/acceptbaseparser.cpp b/winixd/utils/acceptbaseparser.cpp index 4212cf9..b58a572 100644 --- a/winixd/utils/acceptbaseparser.cpp +++ b/winixd/utils/acceptbaseparser.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2008-2014, Tomasz Sowa + * Copyright (c) 2008-2022, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,107 +32,167 @@ * */ -#include #include "acceptbaseparser.h" -#include "core/misc.h" - +#include "convert/convert.h" namespace Winix { - - -bool AcceptBaseParser::IsWhite(int c) +AcceptBaseParser::AcceptBaseParser() { - if( c==' ' || c=='\t' ) - return true; +} -return false; +AcceptBaseParser::~AcceptBaseParser() +{ } -void AcceptBaseParser::skip_white() + +bool AcceptBaseParser::is_delimiter(wchar_t c, wchar_t delimiter) { - while( IsWhite(*text) ) + return delimiter != 0 && delimiter == c; +} + + +bool AcceptBaseParser::is_delimiter(wchar_t c, wchar_t delimiter1, wchar_t delimiter2, wchar_t delimiter3) +{ + return is_delimiter(c, delimiter1) || is_delimiter(c, delimiter2) || is_delimiter(c, delimiter3); +} + + +void AcceptBaseParser::read_token(std::wstring & token, size_t max_len, wchar_t delimiter1, wchar_t delimiter2, wchar_t delimiter3) +{ + token.clear(); + text = pt::skip_white(text, false, false); + + while( *text!=0 && !is_delimiter(*text, delimiter1, delimiter2, delimiter3) ) + { + if( token.size() < max_len ) + { + token += *text; + } + ++text; + } + + pt::trim_white(token); } +void AcceptBaseParser::read_name() +{ + read_token(name, MAX_NAME_LENGTH, ',', ';'); + + if( !name.empty() ) + { + parsed_name(name); + } +} void AcceptBaseParser::read_parameter() { - param.clear(); - skip_white(); + param_value.clear(); + read_token(param, MAX_PARAM_LENGTH, '=', ',', ';'); - while( *text!=0 && *text!=',' && *text!=';' ) + if( *text == '=' ) { - param += *text; ++text; + read_token(param_value, MAX_PARAM_VALUE_LENGTH, ';', ','); } - TrimWhite(param); + if( !name.empty() && !param.empty() ) + { + parsed_param(param, param_value); + } + + if( param == L"q" && !param_value.empty() ) + { + q = pt::to_double(param_value); + } } -void AcceptBaseParser::ReadQ() +void AcceptBaseParser::read_loop(std::vector * header_values, size_t max_len) { - q = 1.0; - skip_white(); + while( *text != 0 ) + { + q = 1.0; + read_name(); - if( *text != ';' ) - return; + while( *text == ';' ) + { + ++text; + read_parameter(); + } - ++text; // skipping a semicolon + if( !name.empty() && q > 0.0 ) + { + if( q > 1.0 ) + q = 1.0; - while( *text!=0 && *text!=',' && *text!='=' ) - // skipping until ',' or '=' - ++text; + parsed_name_q(name, q); - if( *text==0 || *text==',' ) - return; + if( header_values && (max_len == 0 || header_values->size() < max_len) ) + { + header_values->resize(header_values->size() + 1); + header_values->back().value = name; + header_values->back().weight = q; + } + } - ++text; // skipping '=' - - skip_white(); - q = wcstod(text, (wchar_t**)&text); + if( *text != 0 ) + ++text; + } } -void AcceptBaseParser::SkipParam() +void AcceptBaseParser::read(const wchar_t * str, std::vector * header_values, size_t max_len) { - skip_white(); + text = str; + init(); - if( *text == ',' ) - ++text; + read_loop(header_values, max_len); + + name.clear(); + param.clear(); + param_value.clear(); } - void AcceptBaseParser::parse(const wchar_t * str) { - text = str; - init(); - - while( *text != 0 ) - { - read_parameter(); - ReadQ(); - SkipParam(); - Param(param, q); - } + read(str, nullptr, 0); } - void AcceptBaseParser::parse(const std::wstring & str) { parse(str.c_str()); } +void AcceptBaseParser::parse(const wchar_t * str, std::vector & header_values, size_t max_len, bool clear_header_values) +{ + if( clear_header_values ) + header_values.clear(); + + AcceptBaseParser::read(str, &header_values, max_len); + + std::sort(header_values.begin(), header_values.end(), [](HeaderValue & h1, HeaderValue & h2) -> bool { + return h1.weight > h2.weight; + }); +} + + +void AcceptBaseParser::parse(const std::wstring & str, std::vector & header_values, size_t max_len, bool clear_header_values) +{ + return parse(str.c_str(), header_values, max_len, clear_header_values); +} + + } // namespace Winix diff --git a/winixd/utils/acceptbaseparser.h b/winixd/utils/acceptbaseparser.h index 6e5333c..b0d2fbf 100644 --- a/winixd/utils/acceptbaseparser.h +++ b/winixd/utils/acceptbaseparser.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2008-2018, Tomasz Sowa + * Copyright (c) 2008-2022, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,44 +32,64 @@ * */ -#ifndef headerfile_winix_core_acceptbaseparser -#define headerfile_winix_core_acceptbaseparser +#ifndef headerfile_winix_utils_acceptbaseparser +#define headerfile_winix_utils_acceptbaseparser #include -#include "core/winixbase.h" +#include "core/header.h" namespace Winix { - - - -// sample (you must create your own class derived from this one): -// object.parse(L" text/html ; , ; q = 45, application / xhtml+xml ; q = 0.4 , application/xml ; q = 0.9 , */* ; q = 0.8 "); -class AcceptBaseParser : public WinixBase +class AcceptBaseParser { public: + static size_t constexpr MAX_NAME_LENGTH = 64; + static size_t constexpr MAX_PARAM_LENGTH = 32; + static size_t constexpr MAX_PARAM_VALUE_LENGTH = 32; + + AcceptBaseParser(); + virtual ~AcceptBaseParser(); + + /* + * + * + * + * + */ + // sample: + // object.parse(L" text/html , text/* ; q = 45, application / xhtml+xml ; q = 0.4 ; limit = 1 , application/xml ; charset = UTF-8 ; q = 0.9 , */* ; q = 0.8 "); void parse(const wchar_t * str); void parse(const std::wstring & str); + void parse(const wchar_t * str, std::vector & header_values, size_t max_len, bool clear_header_values = true); + void parse(const std::wstring & str, std::vector & header_values, size_t max_len, bool clear_header_values = true); + private: - virtual void init() {} ; - virtual void Param(const std::wstring & param, double q) = 0; - - bool IsWhite(int c); - void skip_white(); + bool is_delimiter(wchar_t c, wchar_t delimiter); + bool is_delimiter(wchar_t c, wchar_t delimiter1, wchar_t delimiter2, wchar_t delimiter3); + void read_token(std::wstring & token, size_t max_len, wchar_t delimiter1, wchar_t delimiter2 = 0, wchar_t delimiter3 = 0); + void read_name(); void read_parameter(); - void ReadQ(); - void SkipParam(); - + void read_loop(std::vector * header_values, size_t max_len); + void read(const wchar_t * str, std::vector * header_values, size_t max_len); + + virtual void init() {} ; + virtual void parsed_name(const std::wstring & name) {}; + virtual void parsed_param(const std::wstring & param, const std::wstring & param_value) {}; + virtual void parsed_name_q(const std::wstring & name, double q) {}; const wchar_t * text; + std::wstring name; std::wstring param; + std::wstring param_value; double q; + + };