added: std::wstring * Request::ParamValuep(const wchar_t * param_name)
for taking a pointer (can be null) to a parameter value added: bool System::IsSSLRequired(bool try_to_use_ssl) returns true if we should use ssl try_to_use_ssl is to be meant: config->use_ssl, config->use_ssl_static, config->use_ssl_common git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1094 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -283,52 +283,65 @@ return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Request::IsParam(const wchar_t * param_name)
|
||||
std::wstring * Request::ParamValuep(const wchar_t * param_name)
|
||||
{
|
||||
ParamTab::iterator i;
|
||||
ParamTab::iterator i;
|
||||
|
||||
for(i=param_tab.begin() ; i!=param_tab.end() ; ++i)
|
||||
{
|
||||
if( i->name == param_name )
|
||||
return true;
|
||||
return &i->value;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::wstring * Request::ParamValuep(const std::wstring & param_name)
|
||||
{
|
||||
ParamTab::iterator i;
|
||||
|
||||
for(i=param_tab.begin() ; i!=param_tab.end() ; ++i)
|
||||
{
|
||||
if( i->name == param_name )
|
||||
return &i->value;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Request::IsParam(const wchar_t * param_name)
|
||||
{
|
||||
return ParamValuep(param_name) != nullptr;
|
||||
}
|
||||
|
||||
|
||||
bool Request::IsParam(const std::wstring & param_name)
|
||||
{
|
||||
ParamTab::iterator i;
|
||||
|
||||
for(i=param_tab.begin() ; i!=param_tab.end() ; ++i)
|
||||
{
|
||||
if( i->name == param_name )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return ParamValuep(param_name) != nullptr;
|
||||
}
|
||||
|
||||
|
||||
const std::wstring & Request::ParamValue(const wchar_t * param_name)
|
||||
{
|
||||
ParamTab::iterator i;
|
||||
const std::wstring * val = ParamValuep(param_name);
|
||||
|
||||
if( val != nullptr )
|
||||
return *val;
|
||||
|
||||
for(i=param_tab.begin() ; i!=param_tab.end() ; ++i)
|
||||
{
|
||||
if( i->name == param_name )
|
||||
return i->value;
|
||||
}
|
||||
|
||||
return str_empty;
|
||||
return str_empty;
|
||||
}
|
||||
|
||||
|
||||
const std::wstring & Request::ParamValue(const std::wstring & param_name)
|
||||
{
|
||||
return ParamValue(param_name.c_str());
|
||||
const std::wstring * val = ParamValuep(param_name);
|
||||
|
||||
if( val != nullptr )
|
||||
return *val;
|
||||
|
||||
return str_empty;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user