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

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@948 e52654a7-88a9-db11-a3e9-0013d4bc506e
pull/3/head 0.6.0
Tomasz Sowa 9 years ago
parent 145445c713
commit 7468e7a36c

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

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

@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2011, Tomasz Sowa
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
*/
@ -13,6 +13,11 @@
#include <string>
namespace Winix
{
// 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 ");
@ -43,5 +48,8 @@ private:
} // namespace Winix
#endif

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

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

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

@ -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-2014, Tomasz Sowa
* All rights reserved.
*
*/
@ -11,6 +11,9 @@
#include "basethread.h"
namespace Winix
{
BaseThread::BaseThread() : thread_signal(PTHREAD_COND_INITIALIZER)
{
@ -237,3 +240,7 @@ pthread_attr_t attr;
return res == 0;
}
} // namespace Winix

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

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

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

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

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

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

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

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

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

@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2011-2012, Tomasz Sowa
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
*/
@ -10,13 +10,17 @@
#ifndef headerfile_winix_core_crypt
#define headerfile_winix_core_crypt
#include <string>
#include "run.h"
#include "config.h"
#include "user.h"
namespace 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

@ -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-2014, Tomasz Sowa
* All rights reserved.
*
*/
@ -15,6 +15,11 @@
#include "mount.h"
namespace Winix
{
/*
current request and session
*/
@ -31,6 +36,8 @@ struct Cur
} // namespace Winix
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2010, Tomasz Sowa
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
*/