now winix is using 'pikotools' (confparser, utf8, mainparser)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@792 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
# DO NOT DELETE
|
||||
|
||||
db.o: db.h dbbase.h dbconn.h dbtextstream.h ../core/textstream.h
|
||||
db.o: ../core/misc.h ../core/item.h ../core/confparser.h
|
||||
db.o: ../core/requesttypes.h ../core/error.h ../core/confparser.h
|
||||
db.o: ../core/misc.h ../core/item.h ../core/requesttypes.h ../core/error.h
|
||||
db.o: dbitemquery.h ../core/item.h dbitemcolumns.h ../core/user.h
|
||||
db.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h
|
||||
db.o: ../core/log.h ../core/textstream.h ../core/logmanipulators.h
|
||||
@@ -11,17 +10,14 @@ db.o: ../core/config.h ../core/htmlfilter.h ../templates/htmltextstream.h
|
||||
db.o: ../core/session.h ../core/user.h ../core/plugindata.h ../core/rebus.h
|
||||
db.o: ../core/mount.h ../templates/locale.h ../core/log.h ../core/misc.h
|
||||
dbbase.o: dbbase.h dbconn.h dbtextstream.h ../core/textstream.h
|
||||
dbbase.o: ../core/misc.h ../core/item.h ../core/confparser.h
|
||||
dbbase.o: ../core/requesttypes.h ../core/error.h ../core/confparser.h
|
||||
dbbase.o: ../core/log.h ../core/misc.h ../../ezc/src/utf8.h
|
||||
dbbase.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
|
||||
dbbase.o: ../core/error.h ../core/log.h ../core/misc.h
|
||||
dbconn.o: dbconn.h dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
dbconn.o: ../core/item.h ../core/confparser.h ../core/requesttypes.h
|
||||
dbconn.o: ../core/log.h ../core/error.h
|
||||
dbconn.o: ../core/item.h ../core/requesttypes.h ../core/log.h ../core/error.h
|
||||
dbitemcolumns.o: dbitemcolumns.h ../core/item.h dbbase.h dbconn.h
|
||||
dbitemcolumns.o: dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
dbitemcolumns.o: ../core/item.h ../core/confparser.h ../core/requesttypes.h
|
||||
dbitemcolumns.o: ../core/error.h ../core/confparser.h ../core/log.h
|
||||
dbitemcolumns.o: ../core/item.h ../core/requesttypes.h ../core/error.h
|
||||
dbitemcolumns.o: ../core/log.h
|
||||
dbitemquery.o: dbitemquery.h ../core/item.h
|
||||
dbtextstream.o: dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
dbtextstream.o: ../core/item.h ../core/confparser.h ../core/requesttypes.h
|
||||
dbtextstream.o: ../../ezc/src/utf8.h
|
||||
dbtextstream.o: ../core/item.h ../core/requesttypes.h
|
||||
|
||||
@@ -142,7 +142,7 @@ return DoCommand(query);
|
||||
}
|
||||
|
||||
|
||||
Error Db::ChangeUserEnv(long user_id, const Space & space)
|
||||
Error Db::ChangeUserEnv(long user_id, const PT::Space & space)
|
||||
{
|
||||
query.Clear();
|
||||
query << R("update core.user set(env) = (")
|
||||
@@ -155,7 +155,7 @@ return DoCommand(query);
|
||||
}
|
||||
|
||||
|
||||
Error Db::ChangeUserAdminEnv(long user_id, const Space & space)
|
||||
Error Db::ChangeUserAdminEnv(long user_id, const PT::Space & space)
|
||||
{
|
||||
query.Clear();
|
||||
query << R("update core.user set(aenv) = (")
|
||||
@@ -1262,7 +1262,7 @@ return EndTrans(result);
|
||||
|
||||
|
||||
|
||||
Error Db::EditMetaById(const Space & meta, long id)
|
||||
Error Db::EditMetaById(const PT::Space & meta, long id)
|
||||
{
|
||||
query.Clear();
|
||||
query << R("update core.item set (meta) = (")
|
||||
|
||||
6
db/db.h
6
db/db.h
@@ -49,8 +49,8 @@ public:
|
||||
|
||||
// !! change name to: ChangeUserPass ?
|
||||
Error ChangePass(const std::wstring & login, const std::wstring & password, const std::string & password_encrypted, int pass_type, bool pass_hash_salted);
|
||||
Error ChangeUserEnv(long user_id, const Space & space);
|
||||
Error ChangeUserAdminEnv(long user_id, const Space & space);
|
||||
Error ChangeUserEnv(long user_id, const PT::Space & space);
|
||||
Error ChangeUserAdminEnv(long user_id, const PT::Space & space);
|
||||
|
||||
Error AddItem(Item & item);
|
||||
Error EditItemById(Item & item, bool with_url = true);
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
Error EditParentUrlById(Item & item, long id);
|
||||
Error EditFileById(const Item & item, long id); // file_path, file_fs, file_type
|
||||
Error EditHasThumbById(bool has_thumb, long id);
|
||||
Error EditMetaById(const Space & meta, long id);
|
||||
Error EditMetaById(const PT::Space & meta, long id);
|
||||
|
||||
Error DelDirById(long id);
|
||||
Error DelFileById(long file_id);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "core/log.h"
|
||||
#include "core/error.h"
|
||||
#include "core/misc.h"
|
||||
#include "utf8.h"
|
||||
#include "utf8/utf8.h"
|
||||
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ const std::wstring & DbBase::AssertValueWide(PGresult * r, int row, int col)
|
||||
const char * res = AssertValue(r, row, col);
|
||||
static std::wstring temp_wide_value; // !! dac jako skladowa klasy (niestatyczna)
|
||||
|
||||
Ezc::UTF8ToWide(res, temp_wide_value);
|
||||
PT::UTF8ToWide(res, temp_wide_value);
|
||||
|
||||
return temp_wide_value;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void DbBase::AssertValueBin(PGresult * r, int row, int col, std::string & result
|
||||
void DbBase::AssertValueWide(PGresult * r, int row, int col, std::wstring & result)
|
||||
{
|
||||
const char * res = AssertValue(r, row, col);
|
||||
Ezc::UTF8ToWide(res, result);
|
||||
PT::UTF8ToWide(res, result);
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ tm DbBase::AssertValueTm(PGresult * r, int row, int col)
|
||||
}
|
||||
|
||||
|
||||
bool DbBase::AssertValueSpace(PGresult * r, int row, int col, Space & space, bool split_single)
|
||||
bool DbBase::AssertValueSpace(PGresult * r, int row, int col, PT::Space & space, bool split_single)
|
||||
{
|
||||
const char * res = AssertValue(r, row, col);
|
||||
|
||||
@@ -219,13 +219,13 @@ bool DbBase::AssertValueSpace(PGresult * r, int row, int col, Space & space, boo
|
||||
conf_parser.SetSpace(space);
|
||||
space.Clear();
|
||||
|
||||
ConfParser::Status status = conf_parser.ParseString(res);
|
||||
PT::ConfParser::Status status = conf_parser.ParseString(res);
|
||||
|
||||
if( status != ConfParser::ok )
|
||||
if( status != PT::ConfParser::ok )
|
||||
{
|
||||
log << log1 << "Db: a problem with parsing a Space";
|
||||
log << log1 << "Db: a problem with parsing a PT::Space";
|
||||
|
||||
if( status == ConfParser::syntax_error )
|
||||
if( status == PT::ConfParser::syntax_error )
|
||||
log << ", syntax error at line: " << conf_parser.line;
|
||||
|
||||
log << logend;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "core/error.h"
|
||||
#include "core/confparser.h"
|
||||
#include "confparser/confparser.h"
|
||||
|
||||
|
||||
class DbBase
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
static tm AssertValueTm(PGresult * r, int row, int col);
|
||||
|
||||
// non static assignments
|
||||
bool AssertValueSpace(PGresult * r, int row, int col, Space & space, bool split_single = true);
|
||||
bool AssertValueSpace(PGresult * r, int row, int col, PT::Space & space, bool split_single = true);
|
||||
|
||||
void ClearResult(PGresult * r);
|
||||
long AssertCurrval(const char * table);
|
||||
@@ -94,7 +94,7 @@ private:
|
||||
static int UnescapeBin(const char * str, size_t & i, size_t len);
|
||||
|
||||
DbTextStream bquery;
|
||||
ConfParser conf_parser;
|
||||
PT::ConfParser conf_parser;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
||||
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -33,7 +33,7 @@ struct DbItemQuery
|
||||
bool sel_file; // file_path, file_fs, file_type, has_thumb, hash, hash_type, file_size
|
||||
bool sel_html_template; // template
|
||||
bool sel_sort_index; // sort_index
|
||||
bool sel_meta; // meta Space
|
||||
bool sel_meta; // meta PT::Space
|
||||
|
||||
bool where_id; //
|
||||
bool where_parent_id; //
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "dbtextstream.h"
|
||||
#include "utf8.h"
|
||||
#include "utf8/utf8.h"
|
||||
|
||||
|
||||
DbTextStream::DbTextStream()
|
||||
@@ -56,7 +56,7 @@ DbTextStream & DbTextStream::PutText(const std::string & str)
|
||||
|
||||
DbTextStream & DbTextStream::PutText(const wchar_t * str)
|
||||
{
|
||||
Ezc::WideToUTF8(str, buffer, false);
|
||||
PT::WideToUTF8(str, buffer, false);
|
||||
was_param = false;
|
||||
|
||||
return *this;
|
||||
@@ -256,7 +256,7 @@ DbTextStream & DbTextStream::ETextPutChar(wchar_t c)
|
||||
buffer += "\\\'"; // don't use "''" because we use the method for PQconnectdb too
|
||||
else
|
||||
if( c != 0 )
|
||||
Ezc::IntToUTF8(int(c), buffer, false);
|
||||
PT::IntToUTF8(int(c), buffer, false);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -577,7 +577,7 @@ return buffer;
|
||||
|
||||
|
||||
|
||||
DbTextStream & DbTextStream::operator<<(const Space * space)
|
||||
DbTextStream & DbTextStream::operator<<(const PT::Space * space)
|
||||
{
|
||||
space_stream.Clear();
|
||||
// !! IMPROVE ME
|
||||
@@ -590,7 +590,7 @@ return *this;
|
||||
}
|
||||
|
||||
|
||||
DbTextStream & DbTextStream::operator<<(const Space & space)
|
||||
DbTextStream & DbTextStream::operator<<(const PT::Space & space)
|
||||
{
|
||||
return operator<<(&space);
|
||||
}
|
||||
|
||||
@@ -152,8 +152,8 @@ public:
|
||||
DbTextStream & operator<<(const void *);
|
||||
DbTextStream & operator<<(const tm & t);
|
||||
DbTextStream & operator<<(const std::vector<long> & tabid);
|
||||
DbTextStream & operator<<(const Space * space);
|
||||
DbTextStream & operator<<(const Space & space);
|
||||
DbTextStream & operator<<(const PT::Space * space);
|
||||
DbTextStream & operator<<(const PT::Space & space);
|
||||
|
||||
|
||||
static const char * ConvertTime(const tm & t);
|
||||
|
||||
Reference in New Issue
Block a user