changed: now we do not use std::string and char* in the Winix API
everywhere we are using std::wstring and wchar_t*
(std::string and char* is used only locally in some places
especially when creating a path to OS file system etc.)
added: to the special thread when winix closes:
a write function for curl: FetchPageOnExitCurlCallback()
without this function the curl library will print
the page's content to the standart output
changed: TextStream<> class from core can make
UTF8<->wide strings conversions
removed: from config: utf8 option
now winix expects UTF8 from the user's input (html forms, url-es)
and outputs strings in the UTF8 format
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@965 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
+19
-15
@@ -10,7 +10,8 @@ edb.o: ../../../pikotools/convert/convert.h
|
||||
edb.o: ../../../pikotools/convert/inttostr.h
|
||||
edb.o: ../../../pikotools/membuffer/membuffer.h
|
||||
edb.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h
|
||||
edb.o: ../../../winix/core/error.h ../../../pikotools/space/spaceparser.h
|
||||
edb.o: ../../../winix/core/winix_const.h ../../../winix/core/error.h
|
||||
edb.o: ../../../pikotools/space/spaceparser.h
|
||||
edb.o: ../../../pikotools/space/space.h export.h ../../../winix/core/dirs.h
|
||||
edb.o: ../../../winix/core/dircontainer.h ../../../winix/db/db.h
|
||||
edb.o: ../../../winix/db/dbbase.h ../../../winix/db/dbitemquery.h
|
||||
@@ -67,6 +68,7 @@ exportinfo.o: ../../../winix/core/htmlfilter.h
|
||||
exportinfo.o: ../../../winix/templates/htmltextstream.h
|
||||
exportinfo.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
exportinfo.o: ../../../pikotools/utf8/utf8.h
|
||||
exportinfo.o: ../../../winix/core/winix_const.h
|
||||
exportinfo.o: ../../../pikotools/space/spacetojson.h
|
||||
exportinfo.o: ../../../winix/core/session.h ../../../winix/core/user.h
|
||||
exportinfo.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
|
||||
@@ -109,6 +111,7 @@ exportthread.o: ../../../pikotools/convert/inttostr.h
|
||||
exportthread.o: ../../../pikotools/membuffer/membuffer.h
|
||||
exportthread.o: ../../../pikotools/textstream/types.h
|
||||
exportthread.o: ../../../pikotools/utf8/utf8.h
|
||||
exportthread.o: ../../../winix/core/winix_const.h
|
||||
funexport.o: funexport.h ../../../winix/functions/functionbase.h
|
||||
funexport.o: ../../../winix/core/item.h ../../../winix/db/db.h
|
||||
funexport.o: ../../../winix/db/dbbase.h ../../../winix/db/dbitemquery.h
|
||||
@@ -133,7 +136,7 @@ funexport.o: ../../../pikotools/space/space.h
|
||||
funexport.o: ../../../winix/core/htmlfilter.h
|
||||
funexport.o: ../../../winix/templates/htmltextstream.h
|
||||
funexport.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
funexport.o: ../../../pikotools/utf8/utf8.h
|
||||
funexport.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
funexport.o: ../../../pikotools/space/spacetojson.h
|
||||
funexport.o: ../../../winix/core/session.h ../../../winix/core/user.h
|
||||
funexport.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
|
||||
@@ -184,19 +187,20 @@ init.o: ../../../pikotools/space/spaceparser.h
|
||||
init.o: ../../../pikotools/space/space.h ../../../winix/core/htmlfilter.h
|
||||
init.o: ../../../winix/templates/htmltextstream.h
|
||||
init.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
|
||||
init.o: ../../../pikotools/utf8/utf8.h ../../../pikotools/space/spacetojson.h
|
||||
init.o: ../../../winix/core/session.h ../../../winix/core/user.h
|
||||
init.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
|
||||
init.o: ../../../winix/core/ipban.h ../../../winix/core/mount.h
|
||||
init.o: ../../../winix/templates/locale.h ../../../winix/core/system.h
|
||||
init.o: ../../../winix/core/job.h ../../../winix/core/basethread.h
|
||||
init.o: ../../../winix/core/synchro.h ../../../winix/core/dirs.h
|
||||
init.o: ../../../winix/core/dircontainer.h ../../../winix/db/db.h
|
||||
init.o: ../../../winix/db/dbbase.h ../../../winix/db/dbitemquery.h
|
||||
init.o: ../../../winix/core/item.h ../../../winix/db/dbitemcolumns.h
|
||||
init.o: ../../../winix/core/user.h ../../../winix/core/group.h
|
||||
init.o: ../../../winix/core/dircontainer.h ../../../winix/core/ugcontainer.h
|
||||
init.o: ../../../winix/notify/notify.h ../../../winix/notify/notifypool.h
|
||||
init.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
|
||||
init.o: ../../../pikotools/space/spacetojson.h ../../../winix/core/session.h
|
||||
init.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
|
||||
init.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
|
||||
init.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
|
||||
init.o: ../../../winix/core/system.h ../../../winix/core/job.h
|
||||
init.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
|
||||
init.o: ../../../winix/core/dirs.h ../../../winix/core/dircontainer.h
|
||||
init.o: ../../../winix/db/db.h ../../../winix/db/dbbase.h
|
||||
init.o: ../../../winix/db/dbitemquery.h ../../../winix/core/item.h
|
||||
init.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
|
||||
init.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
|
||||
init.o: ../../../winix/core/ugcontainer.h ../../../winix/notify/notify.h
|
||||
init.o: ../../../winix/notify/notifypool.h
|
||||
init.o: ../../../winix/templates/patterns.h ../../../winix/templates/locale.h
|
||||
init.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
|
||||
init.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
|
||||
@@ -54,7 +54,6 @@ ExportThread * ExportThread::exp_thread;
|
||||
ExportThread::ExportThread()
|
||||
{
|
||||
exp_thread = 0;
|
||||
utf8 = false;
|
||||
browser_name = "Winix Export";
|
||||
conn_timeout = 5;
|
||||
conn_max_errors = 3;
|
||||
@@ -62,17 +61,12 @@ ExportThread::ExportThread()
|
||||
|
||||
|
||||
|
||||
void ExportThread::SetUTF8(bool use_utf8)
|
||||
{
|
||||
utf8 = use_utf8;
|
||||
}
|
||||
|
||||
|
||||
void ExportThread::SetBaseUrl(const std::wstring & url)
|
||||
{
|
||||
// SetBaseUrl() is called before the this thread
|
||||
// SetBaseUrl() is called before this thread
|
||||
// is started so we can use 'base_url' later without locking
|
||||
// the same is for 'utf8'
|
||||
base_url = url;
|
||||
}
|
||||
|
||||
@@ -277,12 +271,7 @@ return len;
|
||||
void ExportThread::Convert(const std::wstring & in, std::string & out, bool clear)
|
||||
{
|
||||
Lock();
|
||||
|
||||
if( utf8 )
|
||||
PT::WideToUTF8(in, out, clear);
|
||||
else
|
||||
AssignString(in, out, clear);
|
||||
|
||||
PT::WideToUTF8(in, out, clear);
|
||||
Unlock();
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ public:
|
||||
|
||||
ExportThread();
|
||||
|
||||
void SetUTF8(bool use_utf8);
|
||||
void SetBaseUrl(const std::wstring & url);
|
||||
|
||||
void AddMessage(const Message & message);
|
||||
@@ -72,7 +71,6 @@ private:
|
||||
std::string url_a;
|
||||
std::string buffer;
|
||||
size_t buffer_read_index;
|
||||
bool utf8;
|
||||
std::wstring base_url;
|
||||
|
||||
std::string browser_name;
|
||||
|
||||
@@ -86,7 +86,6 @@ void FstabChanged(PluginInfo & info)
|
||||
|
||||
void InitPlugin(PluginInfo & info)
|
||||
{
|
||||
export_thread.SetUTF8(info.config->utf8);
|
||||
export_thread.SetBaseUrl(info.config->base_url);
|
||||
|
||||
info.system->thread_manager.Add(&export_thread, L"export");
|
||||
|
||||
Reference in New Issue
Block a user