updated to the new Ezc API

[ezc stream] has gone, now we have [ezc out] and [out]
the output streams have names now: it's a std::map, before we have a std::vector
and the streams are serialized to "out" space in json
Request::out_streams[] are split into Request::out_main_stream and Request::out_streams class



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1017 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2015-11-15 22:23:36 +00:00
parent 632b49ab90
commit c433b3fd41
27 changed files with 1123 additions and 889 deletions

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2012-2014, Tomasz Sowa
* Copyright (c) 2012-2015, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -35,6 +35,8 @@
#include "templates.h"
#include "core/misc.h"
#include "functions/functions.h"
#include "miscspace.h"
namespace Winix
{
@@ -44,6 +46,110 @@ namespace TemplatesFunctions
{
void env_str(Info & i)
{
User * puser = cur->session->puser;
if( puser )
puser->env.Serialize(i.out, true, false);
}
void env(Info & i)
{
User * puser = cur->session->puser;
if( puser )
space(i, puser->env);
}
void env_tab(Info & i)
{
User * puser = cur->session->puser;
if( puser )
spaces_tab(i, puser->env);
}
void env_tab_value(Info & i)
{
User * puser = cur->session->puser;
if( puser )
spaces_tab_value(i, puser->env);
}
void env_tab_has_next(Info & i)
{
User * puser = cur->session->puser;
if( puser )
spaces_tab_has_next(i, puser->env);
}
void env_admin_str(Info & i)
{
User * puser = cur->session->puser;
if( puser )
puser->aenv.Serialize(i.out, true, false);
}
void env_admin(Info & i)
{
User * puser = cur->session->puser;
if( puser )
space(i, puser->aenv);
}
void env_admin_tab(Info & i)
{
User * puser = cur->session->puser;
if( puser )
spaces_tab(i, puser->aenv);
}
void env_admin_tab_value(Info & i)
{
User * puser = cur->session->puser;
if( puser )
spaces_tab_value(i, puser->aenv);
}
void env_admin_tab_has_next(Info & i)
{
User * puser = cur->session->puser;
if( puser )
spaces_tab_has_next(i, puser->aenv);
}
void env_user_admin_env_str(Info & i)
{
// only an admin is able to see this variables