added: namespace Winix over all *.h/*.cpp files

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@948 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2014-02-12 16:30:49 +00:00
parent 145445c713
commit 7468e7a36c
335 changed files with 2452 additions and 505 deletions

View File

@ -56,7 +56,7 @@ winix.so: $(winix.src.files)
winix: winix.so $(winix.src.files) winix: winix.so $(winix.src.files)
@cd main ; $(MAKE) -e @cd main ; $(MAKE) -e
$(CXX) -o winix $(CXXFLAGS) $(LDFLAGS) main/*.o winix.so $(CXX) -o winix $(CXXFLAGS) $(LDFLAGS) main/*.o winix.so -lfcgi

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,11 @@
#include "acceptbaseparser.h" #include "acceptbaseparser.h"
namespace Winix
{
bool AcceptBaseParser::IsWhite(int c) bool AcceptBaseParser::IsWhite(int c)
{ {
@ -112,3 +117,7 @@ void AcceptBaseParser::Parse(const char * str)
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2011, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -13,6 +13,11 @@
#include <string> #include <string>
namespace Winix
{
// sample (you must create your own class derived from this one): // sample (you must create your own class derived from this one):
// object.Parse(" text/html ; , ; q = 45, application / xhtml+xml ; q = 0.4 , application/xml ; q = 0.9 , */* ; q = 0.8 "); // object.Parse(" text/html ; , ; q = 45, application / xhtml+xml ; q = 0.4 , application/xml ; q = 0.9 , */* ; q = 0.8 ");
@ -43,5 +48,8 @@ private:
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2011, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -14,6 +14,11 @@
#include "log.h" #include "log.h"
namespace Winix
{
class AcceptEncodingParser : public AcceptBaseParser class AcceptEncodingParser : public AcceptBaseParser
{ {
public: public:
@ -82,4 +87,7 @@ private:
} // namespace Winix
#endif #endif

View File

@ -23,6 +23,10 @@
#include "utf8/utf8.h" #include "utf8/utf8.h"
namespace Winix
{
App::App() App::App()
@ -1727,3 +1731,8 @@ void App::CreateStaticTree()
CreateDirs(config.upload_dir.c_str(), L"tmp", config.upload_dirs_chmod); CreateDirs(config.upload_dir.c_str(), L"tmp", config.upload_dirs_chmod);
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2013, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -37,6 +37,12 @@
namespace Winix
{
class App class App
{ {
public: public:
@ -198,6 +204,10 @@ private:
time_t last_sessions_save; time_t last_sessions_save;
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2011, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,9 @@
#include "basethread.h" #include "basethread.h"
namespace Winix
{
BaseThread::BaseThread() : thread_signal(PTHREAD_COND_INITIALIZER) BaseThread::BaseThread() : thread_signal(PTHREAD_COND_INITIALIZER)
{ {
@ -237,3 +240,7 @@ pthread_attr_t attr;
return res == 0; return res == 0;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2012, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -14,6 +14,11 @@
#include "synchro.h" #include "synchro.h"
namespace Winix
{
class BaseThread class BaseThread
{ {
@ -120,6 +125,9 @@ protected:
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2011, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,6 +10,10 @@
#include "bbcodeparser.h" #include "bbcodeparser.h"
namespace Winix
{
bool BBCODEParser::Equal(const wchar_t * str1, const wchar_t * str2) bool BBCODEParser::Equal(const wchar_t * str1, const wchar_t * str2)
@ -590,3 +594,8 @@ void BBCODEParser::Uninit()
if( has_open_ul_tag ) if( has_open_ul_tag )
(*out_string) += L"</ul>\n"; (*out_string) += L"</ul>\n";
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2011, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -13,6 +13,9 @@
#include "htmlfilter.h" #include "htmlfilter.h"
namespace Winix
{
class BBCODEParser : public HTMLFilter class BBCODEParser : public HTMLFilter
@ -90,4 +93,8 @@ class BBCODEParser : public HTMLFilter
bool has_open_li_tag; // has open html <li> tag bool has_open_li_tag; // has open html <li> tag
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,10 @@
#include "log.h" #include "log.h"
namespace Winix
{
Compress::Compress() Compress::Compress()
@ -398,3 +402,7 @@ z_stream * pstrm;
return ret; return ret;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,6 +15,10 @@
#include "requesttypes.h" #include "requesttypes.h"
namespace Winix
{
class Compress class Compress
{ {
@ -66,4 +70,7 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -14,6 +14,10 @@
#include "crypt.h" #include "crypt.h"
namespace Winix
{
Config::Config() Config::Config()
{ {
@ -468,5 +472,8 @@ void Config::Print(std::wostream & out)
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,6 +15,10 @@
#include "htmlfilter.h" #include "htmlfilter.h"
namespace Winix
{
@ -654,6 +658,9 @@ private:
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,10 @@
#include "log.h" #include "log.h"
namespace Winix
{
class CookieParser : public HttpSimpleParser class CookieParser : public HttpSimpleParser
{ {
@ -98,4 +102,7 @@ public:
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2011-2012, Tomasz Sowa * Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -14,6 +14,11 @@
namespace Winix
{
void Crypt::SetConfig(Config * pconfig) void Crypt::SetConfig(Config * pconfig)
{ {
config = pconfig; config = pconfig;
@ -312,3 +317,7 @@ void Crypt::PassHashCrypt(UserPass & up)
PassCrypt(config->pass_rsa_private_key, up); PassCrypt(config->pass_rsa_private_key, up);
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2011-2012, Tomasz Sowa * Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,13 +10,17 @@
#ifndef headerfile_winix_core_crypt #ifndef headerfile_winix_core_crypt
#define headerfile_winix_core_crypt #define headerfile_winix_core_crypt
#include <string> #include <string>
#include "run.h" #include "run.h"
#include "config.h" #include "config.h"
#include "user.h" #include "user.h"
namespace Winix
{
/* /*
the kind of hashes we are able to obtain in winix the kind of hashes we are able to obtain in winix
*/ */
@ -258,5 +262,8 @@ void Crypt::ConvertToHexForm(const std::string & in, StringType & out)
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2011, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,6 +15,11 @@
#include "mount.h" #include "mount.h"
namespace Winix
{
/* /*
current request and session current request and session
*/ */
@ -31,6 +36,8 @@ struct Cur
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2010, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,11 @@
#include "log.h" #include "log.h"
namespace Winix
{
std::wstring DirContainer::dir_etc = L"etc"; std::wstring DirContainer::dir_etc = L"etc";
std::wstring DirContainer::dir_var = L"var"; std::wstring DirContainer::dir_var = L"var";
@ -328,3 +333,8 @@ bool DirContainer::DelById(long id)
return true; return true;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,6 +15,10 @@
#include "item.h" #include "item.h"
namespace Winix
{
class DirContainer class DirContainer
{ {
@ -92,4 +96,8 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,9 @@
#include "log.h" #include "log.h"
namespace Winix
{
void Dirs::SetDb(Db * pdb) void Dirs::SetDb(Db * pdb)
@ -756,3 +759,6 @@ void Dirs::LogDir(const std::vector<Item*> & dir_tab)
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -22,7 +22,13 @@
#include "notify/notify.h" #include "notify/notify.h"
namespace Winix
{
// !! IMPROVE ME
// we do not support '..' in a path (for simplicity and security reasons) // we do not support '..' in a path (for simplicity and security reasons)
// (we will support '..' in the future)
class Dirs class Dirs
@ -115,4 +121,7 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2011, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,9 @@
#define headerfile_winix_core_error #define headerfile_winix_core_error
namespace Winix
{
#define WINIX_ERR_OK 0 #define WINIX_ERR_OK 0
@ -77,4 +80,7 @@ typedef int Error;
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2010, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -14,6 +14,10 @@
#include <vector> #include <vector>
namespace Winix
{
struct Group struct Group
{ {
@ -38,6 +42,8 @@ struct Group
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,6 +10,9 @@
#include "groups.h" #include "groups.h"
namespace Winix
{
Groups::Groups() Groups::Groups()
@ -94,23 +97,5 @@ bool Groups::Remove(long group_id)
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -17,6 +17,10 @@
#include "db/db.h" #include "db/db.h"
namespace Winix
{
class Groups class Groups
{ {
@ -45,8 +49,7 @@ public:
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2011, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,6 +10,11 @@
#include "htmlfilter.h" #include "htmlfilter.h"
namespace Winix
{
void HTMLFilter::Item::Clear() void HTMLFilter::Item::Clear()
{ {
@ -1397,4 +1402,5 @@ void HTMLFilter::Read()
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2011, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,10 @@
#include <algorithm> #include <algorithm>
namespace Winix
{
// max length of a name of a html tag (with terminating null) // max length of a name of a html tag (with terminating null)
@ -295,5 +299,8 @@ protected:
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2010, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,6 +10,12 @@
#include "httpsimpleparser.h" #include "httpsimpleparser.h"
namespace Winix
{
void HttpSimpleParser::ToLower(std::string & s) void HttpSimpleParser::ToLower(std::string & s)
{ {
std::string::iterator i; std::string::iterator i;
@ -223,13 +229,5 @@ void HttpSimpleParser::Parse()
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2010, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,10 +10,13 @@
#ifndef headerfile_winix_core_httpsimpleparser #ifndef headerfile_winix_core_httpsimpleparser
#define headerfile_winix_core_httpsimpleparser #define headerfile_winix_core_httpsimpleparser
#include <string> #include <string>
namespace Winix
{
class HttpSimpleParser class HttpSimpleParser
{ {
@ -65,4 +68,7 @@ public:
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2013, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -17,6 +17,11 @@
namespace Winix
{
void Image::SetDb(Db * pdb) void Image::SetDb(Db * pdb)
{ {
@ -520,7 +525,7 @@ void Image::SaveImage()
log << log1 << "Image: cannot move a temporary file: " << stream_tmp_path.Str() log << log1 << "Image: cannot move a temporary file: " << stream_tmp_path.Str()
<< ", to: " << dst_path << logend; << ", to: " << dst_path << logend;
::RemoveFile(stream_tmp_path.Str()); Winix::RemoveFile(stream_tmp_path.Str());
} }
} }
else else
@ -592,3 +597,7 @@ void Image::CreateThumbnail()
*/ */
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2013, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -19,6 +19,11 @@
#include "core/config.h" #include "core/config.h"
namespace Winix
{
class System; class System;
@ -179,4 +184,7 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012-2013, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -13,6 +13,12 @@
#include <ctime> #include <ctime>
namespace Winix
{
// telling if the IPBan record is active // telling if the IPBan record is active
// we have two records: active and non active // we have two records: active and non active
// non active records is something like a history // non active records is something like a history
@ -147,4 +153,8 @@ struct IPBan
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -13,6 +13,10 @@
#include "date/date.h" #include "date/date.h"
namespace Winix
{
IPBanContainer::IPBanContainer() IPBanContainer::IPBanContainer()
{ {
@ -216,6 +220,9 @@ bool IPBanContainer::SortIPBansFunction(const IPBan & ip1, const IPBan & ip2)
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -14,6 +14,10 @@
#include "ipban.h" #include "ipban.h"
namespace Winix
{
class IPBanContainer class IPBanContainer
{ {
@ -54,5 +58,8 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2012, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,11 @@
#include "crypt.h" #include "crypt.h"
namespace Winix
{
Item::Item() Item::Item()
{ {
@ -80,3 +85,6 @@ void Item::Clear()
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,6 +15,9 @@
#include "date/date.h" #include "date/date.h"
namespace Winix
{
#define WINIX_ITEM_FILETYPE_NONE 0 #define WINIX_ITEM_FILETYPE_NONE 0
#define WINIX_ITEM_FILETYPE_IMAGE 1 #define WINIX_ITEM_FILETYPE_IMAGE 1
@ -118,5 +121,8 @@ friend struct DbItemColumns;
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,11 @@
#include "log.h" #include "log.h"
namespace Winix
{
Job::Job() Job::Job()
{ {
@ -162,4 +167,7 @@ void Job::DoWinixJob(PT::Space & job)
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,10 @@
#include "space/space.h" #include "space/space.h"
namespace Winix
{
#define WINIX_JOBS_HOW_MANY_PRIORITIES 32 #define WINIX_JOBS_HOW_MANY_PRIORITIES 32
@ -78,5 +82,9 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2009, Tomasz Sowa * Copyright (c) 2009-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -13,6 +13,12 @@
#include "misc.h" #include "misc.h"
namespace Winix
{
LastItem::LastItem() LastItem::LastItem()
{ {
user_id = 0; user_id = 0;
@ -106,3 +112,8 @@ LastTab::iterator i = FindNotLoggedOut(user_id, session_id);
<< user_id << " ses_id: " << session_id << logend; << user_id << " ses_id: " << session_id << logend;
} }
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2009, Tomasz Sowa * Copyright (c) 2009-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -18,6 +18,11 @@
namespace Winix
{
// how many items we store in the 'last' function // how many items we store in the 'last' function
#define WINIX_LASTCONTAINER_TABLE_SIZE 100 #define WINIX_LASTCONTAINER_TABLE_SIZE 100
@ -75,4 +80,8 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2010, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,10 @@
#include "log.h" #include "log.h"
namespace Winix
{
LoadAvg::LoadAvg() LoadAvg::LoadAvg()
{ {
@ -370,3 +374,8 @@ double LoadAvg::ReqPerSec15()
return cache_req_per_sec15; return cache_req_per_sec15;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2010, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -13,6 +13,10 @@
#include <ctime> #include <ctime>
namespace Winix
{
// in seconds // in seconds
@ -110,5 +114,8 @@ private:
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,6 +10,11 @@
#include "lock.h" #include "lock.h"
namespace Winix
{
Lock::Lock() Lock::Lock()
{ {
@ -47,3 +52,6 @@ void Lock::Unlock()
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -13,6 +13,11 @@
#include "synchro.h" #include "synchro.h"
namespace Winix
{
class Lock class Lock
{ {
public: public:
@ -34,4 +39,8 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -14,6 +14,11 @@
#include "timezones.h" #include "timezones.h"
namespace Winix
{
Log::Log() Log::Log()
{ {
log_level = 1; log_level = 1;
@ -453,28 +458,5 @@ void Log::SaveLog()
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -20,6 +20,11 @@
#include "textstream/textstream.h" #include "textstream/textstream.h"
namespace Winix
{
class TimeZones; class TimeZones;
@ -155,6 +160,12 @@ return *this;
extern Log log; extern Log log;
extern Log nlog; extern Log nlog;
} // namespace Winix
// for convenience, we have to use only #include "log.h" in the winix // for convenience, we have to use only #include "log.h" in the winix
#include "slog.h" #include "slog.h"

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2011, Tomasz Sowa * Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,12 @@
#define headerfile_winix_core_logmanipulators #define headerfile_winix_core_logmanipulators
namespace Winix
{
/* /*
log1 - the first level log1 - the first level
log2 log2
@ -44,5 +50,9 @@ enum LogManipulators
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,11 @@
#include "templates/templates.h" #include "templates/templates.h"
namespace Winix
{
namespace misc_private namespace misc_private
{ {
@ -1156,3 +1161,6 @@ void RemovePostFileTmp(PostFileTab & post_file_tab)
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,7 +10,6 @@
#ifndef headerfile_winix_core_misc #ifndef headerfile_winix_core_misc
#define headerfile_winix_core_misc #define headerfile_winix_core_misc
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <ctime> #include <ctime>
@ -22,6 +21,10 @@
#include "utf8/utf8.h" #include "utf8/utf8.h"
namespace Winix
{
/* /*
@ -1042,6 +1045,7 @@ void JSONescape(Stream & out, const StringType & str)
} }
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2009-2010, Tomasz Sowa * Copyright (c) 2009-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,11 @@
#include "misc.h" #include "misc.h"
namespace Winix
{
Mount::Mount() Mount::Mount()
{ {
@ -109,3 +114,7 @@ const std::wstring & Mount::FirstArg(int code) const
return Arg(code, 0); return Arg(code, 0);
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2009-2010, Tomasz Sowa * Copyright (c) 2009-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,10 @@
#include <vector> #include <vector>
namespace Winix
{
class Mount class Mount
{ {
@ -67,5 +71,8 @@ private:
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2011, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,11 @@
#include "misc.h" #include "misc.h"
namespace Winix
{
MountParser::MountParser() MountParser::MountParser()
{ {
dirs = 0; dirs = 0;
@ -494,9 +499,5 @@ void MountParser::Parse(const std::wstring & input, std::map<long, Mount> & outp
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2011, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -22,6 +22,11 @@
namespace Winix
{
class MountParser class MountParser
{ {
public: public:
@ -82,4 +87,8 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2009-2012, Tomasz Sowa * Copyright (c) 2009-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,6 +15,10 @@
namespace Winix
{
Mounts::Mounts() Mounts::Mounts()
{ {
@ -321,3 +325,8 @@ Mount * Mounts::GetEmptyMount()
{ {
return &empty_mount; return &empty_mount;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2009-2012, Tomasz Sowa * Copyright (c) 2009-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -23,6 +23,11 @@
#include "mountparser.h" #include "mountparser.h"
namespace Winix
{
class Mounts class Mounts
{ {
@ -165,5 +170,8 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -14,6 +14,9 @@
#include "misc.h" #include "misc.h"
namespace Winix
{
void Plugin::UnloadPlugins() void Plugin::UnloadPlugins()
@ -500,3 +503,6 @@ const Plugin::Plugins * Plugin::GetPlugins()
return &plugins; return &plugins;
} }
} // namespace Winix

View File

@ -2,11 +2,10 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
#ifndef headerfile_winix_core_plugin #ifndef headerfile_winix_core_plugin
#define headerfile_winix_core_plugin #define headerfile_winix_core_plugin
@ -26,6 +25,12 @@
#include "templates/templates.h" #include "templates/templates.h"
namespace Winix
{
/* /*
all your plugin functions can have signature either: all your plugin functions can have signature either:
void my_function(PluginInfo & info); or void my_function(PluginInfo & info); or
@ -246,5 +251,9 @@ private:
extern Plugin plugin; extern Plugin plugin;
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -13,6 +13,10 @@
#include "session.h" #include "session.h"
namespace Winix
{
PluginData::PluginData() PluginData::PluginData()
@ -153,3 +157,8 @@ size_t old_size = table.size();
for(size_t i = old_size ; i<new_size ; ++i) for(size_t i = old_size ; i<new_size ; ++i)
table[i] = 0; table[i] = 0;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,11 @@
#define headerfile_winix_core_plugindata #define headerfile_winix_core_plugindata
#include <vector> #include <vector>
#include <cstddef>
namespace Winix
{
struct Session; struct Session;
@ -65,5 +70,8 @@ private:
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,12 @@
#define headerfile_winix_core_pluginmsg #define headerfile_winix_core_pluginmsg
namespace Winix
{
// here you can add your own EZC functions ([function]) // here you can add your own EZC functions ([function])
// PluginInfo.p1 is a pointer to Ezc::Functions object // PluginInfo.p1 is a pointer to Ezc::Functions object
// session pointer is null // session pointer is null
@ -292,5 +298,9 @@
// see plugins/ticket/pluginmsg.h // see plugins/ticket/pluginmsg.h
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,6 +15,12 @@
namespace Winix
{
PostMultiParser::PostMultiParser() PostMultiParser::PostMultiParser()
{ {
in_buffer = new unsigned char[WINIX_POSTMULTI_INPUT_BUFFER]; in_buffer = new unsigned char[WINIX_POSTMULTI_INPUT_BUFFER];
@ -586,3 +592,8 @@ Error PostMultiParser::Parse(FCGX_Stream * in_, PostTab & post_tab_, PostFileTab
return err; return err;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2011, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -19,6 +19,11 @@
#include "misc.h" #include "misc.h"
namespace Winix
{
// 2 MB // 2 MB
#define WINIX_POSTMULTI_INPUT_BUFFER 2097152 #define WINIX_POSTMULTI_INPUT_BUFFER 2097152
#define WINIX_POSTMULTI_OUTPUT_BUFFER 2097152 #define WINIX_POSTMULTI_OUTPUT_BUFFER 2097152
@ -128,5 +133,8 @@ return added;
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -21,6 +21,10 @@
#include "plugin.h" #include "plugin.h"
namespace Winix
{
class PostParser : public HttpSimpleParser class PostParser : public HttpSimpleParser
{ {
@ -148,4 +152,8 @@ public:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2010, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,6 +15,11 @@
#include "cur.h" #include "cur.h"
namespace Winix
{
void Rebus::SetCur(Cur * pcur) void Rebus::SetCur(Cur * pcur)
{ {
@ -162,9 +167,5 @@ return false;
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2010, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,11 +10,15 @@
#ifndef headerfile_winix_core_rebus #ifndef headerfile_winix_core_rebus
#define headerfile_winix_core_rebus #define headerfile_winix_core_rebus
#include <string> #include <string>
#include <vector> #include <vector>
namespace Winix
{
struct Cur; struct Cur;
@ -48,4 +52,9 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -14,6 +14,9 @@
namespace Winix
{
@ -307,4 +310,7 @@ const std::wstring & Request::ParamValue(const std::wstring & param_name)
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -25,6 +25,11 @@
#include "textstream/textstream.h" #include "textstream/textstream.h"
namespace Winix
{
class FunctionBase; class FunctionBase;
@ -397,5 +402,8 @@ std::wstring & Request::AddCookie(const NameType & name, const ValueType & value
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,11 @@
#include "textstream/textstream.h" #include "textstream/textstream.h"
namespace Winix
{
// !! IMPROVE ME // !! IMPROVE ME
// !! narazie uzywane tylko w post multi parserze // !! narazie uzywane tylko w post multi parserze
// dodac do zwyklego parsera post // dodac do zwyklego parsera post
@ -50,4 +55,8 @@ typedef std::map<std::wstring, std::wstring> CookieTab;
typedef PT::TextStreamBase<char, 1, 4096> BinaryPage; typedef PT::TextStreamBase<char, 1, 4096> BinaryPage;
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2011, Tomasz Sowa * Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,11 +11,17 @@
#include <sys/uio.h> #include <sys/uio.h>
#include <unistd.h> #include <unistd.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <cstring>
#include "run.h" #include "run.h"
#include "log.h" #include "log.h"
namespace Winix
{
Run::Run() Run::Run()
{ {
@ -384,3 +390,6 @@ int Run::Go(std::string & out)
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2011-2013, Tomasz Sowa * Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,6 +15,11 @@
#include <unistd.h> #include <unistd.h>
namespace Winix
{
/* /*
how many parameters and environment variables can be passed to a program how many parameters and environment variables can be passed to a program
*/ */
@ -160,5 +165,9 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,9 @@
#include "misc.h" #include "misc.h"
namespace Winix
{
Session::Session() Session::Session()
@ -92,3 +95,7 @@ void Session::ClearAfterRequest()
ip_ban = 0; ip_ban = 0;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -23,6 +23,10 @@
#include "ipban.h" #include "ipban.h"
namespace Winix
{
struct Session struct Session
{ {
@ -95,6 +99,9 @@ struct Session
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,11 @@
#include "misc.h" #include "misc.h"
namespace Winix
{
SessionContainer::SessionContainer() SessionContainer::SessionContainer()
{ {
@ -207,5 +212,8 @@ return false;
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -19,6 +19,11 @@
#include "config.h" #include "config.h"
namespace Winix
{
class SessionContainer class SessionContainer
{ {
@ -71,4 +76,8 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -17,6 +17,9 @@
namespace Winix
{
@ -603,3 +606,6 @@ void SessionManager::DeleteSession(Session * del_session)
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -24,6 +24,11 @@
namespace Winix
{
class SessionManager : public BaseThread class SessionManager : public BaseThread
{ {
public: public:
@ -102,4 +107,7 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2010, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,10 @@
#include "misc.h" #include "misc.h"
namespace Winix
{
bool SessionParser::Parse(const std::string & path, SessionContainer & container) bool SessionParser::Parse(const std::string & path, SessionContainer & container)
{ {
@ -166,3 +170,7 @@ bool is_sign = false;
return res; return res;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2010, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -17,6 +17,10 @@
#include "users.h" #include "users.h"
namespace Winix
{
class SessionParser class SessionParser
{ {
@ -46,5 +50,9 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2011-2012, Tomasz Sowa * Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,6 +10,10 @@
#include "slog.h" #include "slog.h"
namespace Winix
{
SLog::SLog() SLog::SLog()
@ -222,3 +226,6 @@ SLog & SLog::operator<<(TranslateTextHelper<std::wstring> raw)
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2011-2012, Tomasz Sowa * Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,11 @@
#include "textstream/textstream.h" #include "textstream/textstream.h"
namespace Winix
{
#define WINIX_SLOG_MAX_LOG_SIZE 10240 #define WINIX_SLOG_MAX_LOG_SIZE 10240
@ -137,5 +142,9 @@ return *this;
extern SLog slog; extern SLog slog;
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2012, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,11 @@
#include "synchro.h" #include "synchro.h"
namespace Winix
{
Synchro::Synchro() : mutex(PTHREAD_MUTEX_INITIALIZER) Synchro::Synchro() : mutex(PTHREAD_MUTEX_INITIALIZER)
{ {
was_stop_signal = false; was_stop_signal = false;
@ -54,4 +59,5 @@ void Synchro::Unlock()
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2012, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -13,6 +13,10 @@
#include <pthread.h> #include <pthread.h>
namespace Winix
{
struct Synchro struct Synchro
{ {
@ -38,6 +42,9 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2013, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,12 @@
namespace Winix
{
void System::SetCur(Cur * pcur) void System::SetCur(Cur * pcur)
{ {
cur = pcur; cur = pcur;
@ -1369,3 +1375,7 @@ bool System::AddCommonFileToVar(const wchar_t * file_path, const wchar_t * url,
return AddFile(file_content_item, false) == WINIX_ERR_OK; return AddFile(file_content_item, false) == WINIX_ERR_OK;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2013, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -29,6 +29,11 @@
#include "timezones.h" #include "timezones.h"
namespace Winix
{
class Functions; class Functions;
class SessionManager; class SessionManager;
@ -211,5 +216,9 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2010-2013, Tomasz Sowa * Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -18,6 +18,11 @@
#include "textstream/textstream.h" #include "textstream/textstream.h"
namespace Winix
{
/* /*
a special class representing a stream buffer a special class representing a stream buffer
@ -366,6 +371,9 @@ return *this;
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2011-2012, Tomasz Sowa * Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,12 @@
#include "log.h" #include "log.h"
namespace Winix
{
ThreadManager::ThreadManager() ThreadManager::ThreadManager()
{ {
were_started = false; were_started = false;
@ -134,3 +140,6 @@ void ThreadManager::StopAll()
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2011-2012, Tomasz Sowa * Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,11 @@
#include "synchro.h" #include "synchro.h"
namespace Winix
{
class ThreadManager class ThreadManager
{ {
@ -61,5 +66,9 @@ private:
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,6 +11,10 @@
#include "misc.h" #include "misc.h"
namespace Winix
{
TimeZone::Dst::Dst() TimeZone::Dst::Dst()
@ -287,3 +291,7 @@ return result;
} }
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -17,6 +17,12 @@
namespace Winix
{
class TimeZone class TimeZone
{ {
public: public:
@ -132,10 +138,7 @@ private:
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,10 @@
#include "log.h" #include "log.h"
namespace Winix
{
TimeZones::TimeZones() TimeZones::TimeZones()
{ {
@ -174,5 +178,5 @@ bool TimeZones::ReadTimeZones(const std::wstring & path)
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,11 @@
#include "space/spaceparser.h" #include "space/spaceparser.h"
namespace Winix
{
class TimeZones class TimeZones
{ {
@ -77,5 +82,8 @@ private:
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,6 +15,10 @@
#include "log.h" #include "log.h"
namespace Winix
{
template<class Type> template<class Type>
class UGContainer class UGContainer
@ -274,4 +278,8 @@ return result;
} }
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2012, Tomasz Sowa * Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -10,6 +10,11 @@
#include "user.h" #include "user.h"
namespace Winix
{
User::User() User::User()
{ {
Clear(); Clear();
@ -47,19 +52,6 @@ return false;
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -16,6 +16,11 @@
#include "date/date.h" #include "date/date.h"
namespace Winix
{
#define WINIX_ACCOUNT_MAX_LOGIN_SIZE 250 #define WINIX_ACCOUNT_MAX_LOGIN_SIZE 250
#define WINIX_ACCOUNT_MAX_PASSWORD_SIZE 250 #define WINIX_ACCOUNT_MAX_PASSWORD_SIZE 250
#define WINIX_ACCOUNT_MAX_EMAIL_SIZE 250 #define WINIX_ACCOUNT_MAX_EMAIL_SIZE 250
@ -105,4 +110,7 @@ struct User
}; };
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -13,6 +13,10 @@
#include "plugin.h" #include "plugin.h"
namespace Winix
{
Users::Users() Users::Users()
{ {
@ -292,3 +296,6 @@ long Users::HowManyLogged()
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -17,6 +17,12 @@
#include "cur.h" #include "cur.h"
#include "db/db.h" #include "db/db.h"
namespace Winix
{
class SessionManager; class SessionManager;
@ -71,7 +77,7 @@ private:
} // namespace Winix

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2013, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -11,9 +11,17 @@
#define headerfile_winix_core_version #define headerfile_winix_core_version
namespace Winix
{
#define WINIX_VER_MAJOR 0 #define WINIX_VER_MAJOR 0
#define WINIX_VER_MINOR 5 #define WINIX_VER_MINOR 6
#define WINIX_VER_REVISION 6 #define WINIX_VER_REVISION 0
} // namespace Winix
#endif #endif

View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -12,6 +12,9 @@
#include "core/misc.h" #include "core/misc.h"
namespace Winix
{
@ -1732,3 +1735,6 @@ void Db::GetGroups(UGContainer<Group> & group_tab)
} }
} // namespace Winix

11
db/db.h
View File

@ -2,7 +2,7 @@
* This file is a part of Winix * This file is a part of Winix
* and is not publicly distributed * and is not publicly distributed
* *
* Copyright (c) 2008-2012, Tomasz Sowa * Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
*/ */
@ -15,11 +15,9 @@
#include <cstdio> #include <cstdio>
#include <ctime> #include <ctime>
#include <cstring> #include <cstring>
#include "dbbase.h" #include "dbbase.h"
#include "dbitemquery.h" #include "dbitemquery.h"
#include "dbitemcolumns.h" #include "dbitemcolumns.h"
#include "core/item.h" #include "core/item.h"
#include "core/user.h" #include "core/user.h"
#include "core/group.h" #include "core/group.h"
@ -27,6 +25,9 @@
#include "core/ugcontainer.h" #include "core/ugcontainer.h"
namespace Winix
{
@ -141,5 +142,9 @@ protected:
}; };
} // namespace Winix
#endif #endif

Some files were not shown because too many files have changed in this diff Show More