Files
winix/core/data.cpp
Tomasz Sowa ebd868fa33 removed: Done class (core/done.h, core/done.cpp)
removed: from Session: done, done_status, timers



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@594 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-02-28 21:33:06 +00:00

45 lines
791 B
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2010, Tomasz Sowa
* All rights reserved.
*
*/
#include "data.h"
Data::Data()
{
signal_hup = false;
stdout_is_closed = false;
how_many_logged = 0;
// the rest will be read from a config file
}
void Data::SetAdditionalVariables()
{
SetHttpHost(base_url, base_url_http_host);
SetHttpHost(base_url_auth, base_url_auth_http_host);
}
void Data::SetHttpHost(const std::string & in, std::string & out)
{
if( strncmp(in.c_str(), "http://", 7) == 0 )
out = in.substr(7);
else
if( strncmp(in.c_str(), "https://", 8) == 0 )
out = in.substr(8);
else
out.clear(); // if empty the RequestController::BaseUrlRedirect() returns false and no redirecting will be done
}